committed by
愚道
16 changed files with 1 additions and 350 deletions
@ -1,74 +0,0 @@ |
|||
import React from 'react'; |
|||
import { Tooltip, Icon } from 'antd'; |
|||
import { formatMessage } from 'umi/locale'; |
|||
import styles from './ThemeColor.less'; |
|||
|
|||
const Tag = ({ color, check, ...rest }) => ( |
|||
<div |
|||
{...rest} |
|||
style={{ |
|||
backgroundColor: color, |
|||
}} |
|||
> |
|||
{check ? <Icon type="check" /> : ''} |
|||
</div> |
|||
); |
|||
|
|||
const ThemeColor = ({ colors, title, value, onChange }) => { |
|||
let colorList = colors; |
|||
if (!colors) { |
|||
colorList = [ |
|||
{ |
|||
key: 'dust', |
|||
color: '#F5222D', |
|||
}, |
|||
{ |
|||
key: 'volcano', |
|||
color: '#FA541C', |
|||
}, |
|||
{ |
|||
key: 'sunset', |
|||
color: '#FAAD14', |
|||
}, |
|||
{ |
|||
key: 'cyan', |
|||
color: '#13C2C2', |
|||
}, |
|||
{ |
|||
key: 'green', |
|||
color: '#52C41A', |
|||
}, |
|||
{ |
|||
key: 'daybreak', |
|||
color: '#1890FF', |
|||
}, |
|||
{ |
|||
key: 'geekblue', |
|||
color: '#2F54EB', |
|||
}, |
|||
{ |
|||
key: 'purple', |
|||
color: '#722ED1', |
|||
}, |
|||
]; |
|||
} |
|||
return ( |
|||
<div className={styles.themeColor}> |
|||
<h3 className={styles.title}>{title}</h3> |
|||
<div className={styles.content}> |
|||
{colorList.map(({ key, color }) => ( |
|||
<Tooltip key={color} title={formatMessage({ id: `app.setting.themecolor.${key}` })}> |
|||
<Tag |
|||
className={styles.colorBlock} |
|||
color={color} |
|||
check={value === color} |
|||
onClick={() => onChange && onChange(color)} |
|||
/> |
|||
</Tooltip> |
|||
))} |
|||
</div> |
|||
</div> |
|||
); |
|||
}; |
|||
|
|||
export default ThemeColor; |
|||
@ -1,21 +0,0 @@ |
|||
.themeColor { |
|||
overflow: hidden; |
|||
margin-top: 24px; |
|||
.title { |
|||
font-size: 14px; |
|||
color: rgba(0, 0, 0, 0.65); |
|||
line-height: 22px; |
|||
margin-bottom: 12px; |
|||
} |
|||
.colorBlock { |
|||
width: 20px; |
|||
height: 20px; |
|||
border-radius: 2px; |
|||
float: left; |
|||
cursor: pointer; |
|||
margin-right: 8px; |
|||
text-align: center; |
|||
color: #fff; |
|||
font-weight: bold; |
|||
} |
|||
} |
|||
@ -1,74 +0,0 @@ |
|||
@import '~antd/lib/style/themes/default.less'; |
|||
|
|||
.content { |
|||
min-height: 100%; |
|||
background: #fff; |
|||
position: relative; |
|||
} |
|||
|
|||
.blockChecbox { |
|||
display: flex; |
|||
.item { |
|||
margin-right: 16px; |
|||
position: relative; |
|||
// box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.1); |
|||
border-radius: @border-radius-base; |
|||
cursor: pointer; |
|||
img { |
|||
width: 48px; |
|||
} |
|||
} |
|||
.selectIcon { |
|||
position: absolute; |
|||
top: 0; |
|||
right: 0; |
|||
width: 100%; |
|||
padding-top: 15px; |
|||
padding-left: 24px; |
|||
height: 100%; |
|||
color: @primary-color; |
|||
font-size: 14px; |
|||
font-weight: bold; |
|||
} |
|||
} |
|||
|
|||
.color_block { |
|||
width: 38px; |
|||
height: 22px; |
|||
margin: 4px; |
|||
border-radius: 4px; |
|||
cursor: pointer; |
|||
margin-right: 12px; |
|||
display: inline-block; |
|||
vertical-align: middle; |
|||
} |
|||
|
|||
.title { |
|||
font-size: 14px; |
|||
color: @heading-color; |
|||
line-height: 22px; |
|||
margin-bottom: 12px; |
|||
} |
|||
|
|||
.handle { |
|||
position: absolute; |
|||
top: 240px; |
|||
background: @primary-color; |
|||
width: 48px; |
|||
height: 48px; |
|||
right: 300px; |
|||
display: flex; |
|||
justify-content: center; |
|||
align-items: center; |
|||
cursor: pointer; |
|||
pointer-events: auto; |
|||
z-index: 0; |
|||
text-align: center; |
|||
font-size: 16px; |
|||
border-radius: 4px 0 0 4px; |
|||
} |
|||
|
|||
.productionHint { |
|||
font-size: 12px; |
|||
margin-top: 16px; |
|||
} |
|||
@ -1,6 +0,0 @@ |
|||
export default { |
|||
'app.pwa.offline': 'You are offline now', |
|||
'app.pwa.serviceworker.updated': 'New content is available', |
|||
'app.pwa.serviceworker.updated.hint': 'Please press the "Refresh" button to reload current page', |
|||
'app.pwa.serviceworker.updated.ok': 'Refresh', |
|||
}; |
|||
@ -1,31 +0,0 @@ |
|||
export default { |
|||
'app.setting.pagestyle': 'Page style setting', |
|||
'app.setting.pagestyle.dark': 'Dark style', |
|||
'app.setting.pagestyle.light': 'Light style', |
|||
'app.setting.content-width': 'Content Width', |
|||
'app.setting.content-width.fixed': 'Fixed', |
|||
'app.setting.content-width.fluid': 'Fluid', |
|||
'app.setting.themecolor': 'Theme Color', |
|||
'app.setting.themecolor.dust': 'Dust Red', |
|||
'app.setting.themecolor.volcano': 'Volcano', |
|||
'app.setting.themecolor.sunset': 'Sunset Orange', |
|||
'app.setting.themecolor.cyan': 'Cyan', |
|||
'app.setting.themecolor.green': 'Polar Green', |
|||
'app.setting.themecolor.daybreak': 'Daybreak Blue (default)', |
|||
'app.setting.themecolor.geekblue': 'Geek Glue', |
|||
'app.setting.themecolor.purple': 'Golden Purple', |
|||
'app.setting.navigationmode': 'Navigation Mode', |
|||
'app.setting.sidemenu': 'Side Menu Layout', |
|||
'app.setting.topmenu': 'Top Menu Layout', |
|||
'app.setting.fixedheader': 'Fixed Header', |
|||
'app.setting.fixedsidebar': 'Fixed Sidebar', |
|||
'app.setting.fixedsidebar.hint': 'Works on Side Menu Layout', |
|||
'app.setting.hideheader': 'Hidden Header when scrolling', |
|||
'app.setting.hideheader.hint': 'Works when Hidden Header is enabled', |
|||
'app.setting.othersettings': 'Other Settings', |
|||
'app.setting.weakmode': 'Weak Mode', |
|||
'app.setting.copy': 'Copy Setting', |
|||
'app.setting.copyinfo': 'copy success,please replace defaultSettings in src/models/setting.js', |
|||
'app.setting.production.hint': |
|||
'Setting panel shows in development environment only, please manually modify', |
|||
}; |
|||
@ -1,7 +0,0 @@ |
|||
export default { |
|||
'app.pwa.offline': 'Você está offline agora', |
|||
'app.pwa.serviceworker.updated': 'Novo conteúdo está disponível', |
|||
'app.pwa.serviceworker.updated.hint': |
|||
'Por favor, pressione o botão "Atualizar" para recarregar a página atual', |
|||
'app.pwa.serviceworker.updated.ok': 'Atualizar', |
|||
}; |
|||
@ -1,32 +0,0 @@ |
|||
export default { |
|||
'app.setting.pagestyle': 'Configuração de estilo da página', |
|||
'app.setting.pagestyle.dark': 'Dark style', |
|||
'app.setting.pagestyle.light': 'Light style', |
|||
'app.setting.content-width': 'Largura do conteúdo', |
|||
'app.setting.content-width.fixed': 'Fixo', |
|||
'app.setting.content-width.fluid': 'Fluido', |
|||
'app.setting.themecolor': 'Cor do Tema', |
|||
'app.setting.themecolor.dust': 'Dust Red', |
|||
'app.setting.themecolor.volcano': 'Volcano', |
|||
'app.setting.themecolor.sunset': 'Sunset Orange', |
|||
'app.setting.themecolor.cyan': 'Cyan', |
|||
'app.setting.themecolor.green': 'Polar Green', |
|||
'app.setting.themecolor.daybreak': 'Daybreak Blue (default)', |
|||
'app.setting.themecolor.geekblue': 'Geek Glue', |
|||
'app.setting.themecolor.purple': 'Golden Purple', |
|||
'app.setting.navigationmode': 'Modo de Navegação', |
|||
'app.setting.sidemenu': 'Layout do Menu Lateral', |
|||
'app.setting.topmenu': 'Layout do Menu Superior', |
|||
'app.setting.fixedheader': 'Cabeçalho fixo', |
|||
'app.setting.fixedsidebar': 'Barra lateral fixa', |
|||
'app.setting.fixedsidebar.hint': 'Funciona no layout do menu lateral', |
|||
'app.setting.hideheader': 'Esconder o cabeçalho quando rolar', |
|||
'app.setting.hideheader.hint': 'Funciona quando o esconder cabeçalho está abilitado', |
|||
'app.setting.othersettings': 'Outras configurações', |
|||
'app.setting.weakmode': 'Weak Mode', |
|||
'app.setting.copy': 'Copiar Configuração', |
|||
'app.setting.copyinfo': |
|||
'copiado com sucesso,por favor trocar o defaultSettings em src/models/setting.js', |
|||
'app.setting.production.hint': |
|||
'O painel de configuração apenas é exibido no ambiente de desenvolvimento, por favor modifique manualmente o', |
|||
}; |
|||
@ -1,6 +0,0 @@ |
|||
export default { |
|||
'app.pwa.offline': '当前处于离线状态', |
|||
'app.pwa.serviceworker.updated': '有新内容', |
|||
'app.pwa.serviceworker.updated.hint': '请点击“刷新”按钮或者手动刷新页面', |
|||
'app.pwa.serviceworker.updated.ok': '刷新', |
|||
}; |
|||
@ -1,31 +0,0 @@ |
|||
export default { |
|||
'app.setting.pagestyle': '整体风格设置', |
|||
'app.setting.pagestyle.dark': '暗色菜单风格', |
|||
'app.setting.pagestyle.light': '亮色菜单风格', |
|||
'app.setting.content-width': '内容区域宽度', |
|||
'app.setting.content-width.fixed': '定宽', |
|||
'app.setting.content-width.fluid': '流式', |
|||
'app.setting.themecolor': '主题色', |
|||
'app.setting.themecolor.dust': '薄暮', |
|||
'app.setting.themecolor.volcano': '火山', |
|||
'app.setting.themecolor.sunset': '日暮', |
|||
'app.setting.themecolor.cyan': '明青', |
|||
'app.setting.themecolor.green': '极光绿', |
|||
'app.setting.themecolor.daybreak': '拂晓蓝(默认)', |
|||
'app.setting.themecolor.geekblue': '极客蓝', |
|||
'app.setting.themecolor.purple': '酱紫', |
|||
'app.setting.navigationmode': '导航模式', |
|||
'app.setting.sidemenu': '侧边菜单布局', |
|||
'app.setting.topmenu': '顶部菜单布局', |
|||
'app.setting.fixedheader': '固定 Header', |
|||
'app.setting.fixedsidebar': '固定侧边菜单', |
|||
'app.setting.fixedsidebar.hint': '侧边菜单布局时可配置', |
|||
'app.setting.hideheader': '下滑时隐藏 Header', |
|||
'app.setting.hideheader.hint': '固定 Header 时可配置', |
|||
'app.setting.othersettings': '其他设置', |
|||
'app.setting.weakmode': '色弱模式', |
|||
'app.setting.copy': '拷贝设置', |
|||
'app.setting.copyinfo': '拷贝成功,请到 src/defaultSettings.js 中替换默认配置', |
|||
'app.setting.production.hint': |
|||
'配置栏只在开发环境用于预览,生产环境不会展现,请拷贝后手动修改配置文件', |
|||
}; |
|||
@ -1,6 +0,0 @@ |
|||
export default { |
|||
'app.pwa.offline': '當前處於離線狀態', |
|||
'app.pwa.serviceworker.updated': '有新內容', |
|||
'app.pwa.serviceworker.updated.hint': '請點擊“刷新”按鈕或者手動刷新頁面', |
|||
'app.pwa.serviceworker.updated.ok': '刷新', |
|||
}; |
|||
@ -1,31 +0,0 @@ |
|||
export default { |
|||
'app.setting.pagestyle': '整體風格設置', |
|||
'app.setting.pagestyle.dark': '暗色菜單風格', |
|||
'app.setting.pagestyle.light': '亮色菜單風格', |
|||
'app.setting.content-width': '內容區域寬度', |
|||
'app.setting.content-width.fixed': '定寬', |
|||
'app.setting.content-width.fluid': '流式', |
|||
'app.setting.themecolor': '主題色', |
|||
'app.setting.themecolor.dust': '薄暮', |
|||
'app.setting.themecolor.volcano': '火山', |
|||
'app.setting.themecolor.sunset': '日暮', |
|||
'app.setting.themecolor.cyan': '明青', |
|||
'app.setting.themecolor.green': '極光綠', |
|||
'app.setting.themecolor.daybreak': '拂曉藍(默認)', |
|||
'app.setting.themecolor.geekblue': '極客藍', |
|||
'app.setting.themecolor.purple': '醬紫', |
|||
'app.setting.navigationmode': '導航模式', |
|||
'app.setting.sidemenu': '側邊菜單布局', |
|||
'app.setting.topmenu': '頂部菜單布局', |
|||
'app.setting.fixedheader': '固定 Header', |
|||
'app.setting.fixedsidebar': '固定側邊菜單', |
|||
'app.setting.fixedsidebar.hint': '側邊菜單布局時可配置', |
|||
'app.setting.hideheader': '下滑時隱藏 Header', |
|||
'app.setting.hideheader.hint': '固定 Header 時可配置', |
|||
'app.setting.othersettings': '其他設置', |
|||
'app.setting.weakmode': '色弱模式', |
|||
'app.setting.copy': '拷貝設置', |
|||
'app.setting.copyinfo': '拷貝成功,請到 src/defaultSettings.js 中替換默認配置', |
|||
'app.setting.production.hint': |
|||
'配置欄只在開發環境用於預覽,生產環境不會展現,請拷貝後手動修改配置文件', |
|||
}; |
|||
Loading…
Reference in new issue