From 6d6b63cce1a198eb2e2caadab3a08edf40d011c8 Mon Sep 17 00:00:00 2001 From: lyswhut Date: Thu, 27 Feb 2020 23:21:28 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=AF=B9=E4=B8=BB=E9=A2=98?= =?UTF-8?q?=E5=90=8D=E5=AD=97=E7=9A=84=E7=BF=BB=E8=AF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/renderer/App.vue | 1 - src/renderer/assets/styles/variables.less | 290 +++++++++++----------- src/renderer/lang/cns/store/state.json | 12 + src/renderer/lang/cnt/store/state.json | 12 + src/renderer/lang/en/store/state.json | 12 + src/renderer/plugins/i18n.js | 2 +- src/renderer/store/state.js | 8 +- src/renderer/views/Setting.vue | 14 +- 8 files changed, 198 insertions(+), 153 deletions(-) create mode 100644 src/renderer/lang/cns/store/state.json create mode 100644 src/renderer/lang/cnt/store/state.json create mode 100644 src/renderer/lang/en/store/state.json diff --git a/src/renderer/App.vue b/src/renderer/App.vue index efc09ae0..35c52dfb 100644 --- a/src/renderer/App.vue +++ b/src/renderer/App.vue @@ -55,7 +55,6 @@ export default { }), }, created() { - this.$i18n.locale = this.setting.langId this.saveSetting = throttle(n => { window.electronStore_config.set('setting', n) }) diff --git a/src/renderer/assets/styles/variables.less b/src/renderer/assets/styles/variables.less index f92019db..2c526a9f 100644 --- a/src/renderer/assets/styles/variables.less +++ b/src/renderer/assets/styles/variables.less @@ -1,6 +1,6 @@ @import './colors.less'; -@themes: green, yellow, blue, red, purple, orange, grey, midAutumn, dhHyrz, happyNewYear; +@themes: green, yellow, blue, red, purple, orange, grey, mid_autumn, naruto, happy_new_year; // Colors @@ -413,152 +413,152 @@ @color-grey-badge-info: #b19b9f; @color-grey-badge-info-font: #fff; -@color-midAutumn-theme: rgba(74, 55, 82, 1); -@color-midAutumn-theme-bgimg: url(../images/jqbg.jpg); -@color-midAutumn-theme-bgposition: center; -@color-midAutumn-theme-bgsize: auto 100%; -@color-midAutumn-theme-hover: fadeout(lighten(@color-midAutumn-theme, 10%), 40%); -@color-midAutumn-theme-active: fadeout(lighten(@color-midAutumn-theme, 15%), 60%); -@color-midAutumn-theme-font: rgba(246, 233, 255, 0.9); -@color-midAutumn-theme-font-label: fadeout(lighten(@color-midAutumn-theme, 20%), 20%); -@color-midAutumn-theme_2: rgba(255, 255, 255, .93); -@color-midAutumn-theme_2-background_1: #eeedef; -@color-midAutumn-theme_2-background_2: fadeout(@color-midAutumn-theme_2-background_1, 2%); -@color-midAutumn-theme_2-hover: fadeout(lighten(@color-midAutumn-theme, 10%), 65%); -@color-midAutumn-theme_2-active: fadeout(darken(@color-midAutumn-theme, 5%), 70%); -@color-midAutumn-theme_2-font: darken(@color-midAutumn-theme_2, 70%); -@color-midAutumn-theme_2-font-label: desaturate(lighten(@color-midAutumn-theme, 30%), 45%); -@color-midAutumn-theme_2-line: lighten(@color-midAutumn-theme, 63%); -@color-midAutumn-theme-sidebar: rgba(255, 255, 255, 0); -@color-midAutumn-btn: fadeout(darken(@color-midAutumn-theme, 5%), 27%); -@color-midAutumn-btn-background: fadeout(lighten(@color-midAutumn-theme, 35%), 70%); -@color-midAutumn-pagination-background: fadeout(lighten(@color-midAutumn-theme, 45%), 50%); -@color-midAutumn-pagination-hover: fadeout(lighten(@color-midAutumn-theme, 10%), 70%); -@color-midAutumn-pagination-active: fadeout(darken(@color-midAutumn-theme, 10%), 70%); -@color-midAutumn-pagination-select: fadeout(lighten(@color-midAutumn-theme, 10%), 55%); -@color-midAutumn-search-form-background: fadeout(lighten(@color-midAutumn-theme, 50%), 10%); -@color-midAutumn-search-list-hover: fadeout(darken(@color-midAutumn-theme, 10%), 70%); -@color-midAutumn-scrollbar-track: fadeout(@color-midAutumn-theme, 80%); -@color-midAutumn-scrollbar-thumb: fadeout(@color-midAutumn-theme, 60%); -@color-midAutumn-scrollbar-thumb-hover: fadeout(@color-midAutumn-theme, 40%); -@color-midAutumn-player-pic-c1: fadeout(@color-midAutumn-theme_2, 50%); -@color-midAutumn-player-pic-c2: darken(@color-midAutumn-theme_2, 30%); -@color-midAutumn-player-progress: darken(@color-midAutumn-theme_2, 10%); -@color-midAutumn-player-progress-bar1: darken(@color-midAutumn-theme_2, 12%); -@color-midAutumn-player-progress-bar2: lighten(@color-midAutumn-theme, 12%); -@color-midAutumn-player-status-text: lighten(@color-midAutumn-theme_2-font, 10%); -@color-midAutumn-tab-btn-background: fadeout(lighten(@color-midAutumn-theme, 10%), 80%); -@color-midAutumn-tab-btn-background-hover: @color-midAutumn-theme_2-hover; -@color-midAutumn-tab-border-top: fadeout(lighten(@color-midAutumn-theme, 5%), 50%); -@color-midAutumn-tab-border-bottom: lighten(@color-midAutumn-theme, 5%); -@color-midAutumn-minBtn: #85c43b; -@color-midAutumn-maxBtn: #e7aa36; -@color-midAutumn-closeBtn: #ea6e4d; -@color-midAutumn-minBtn-hover: fadeout(@color-midAutumn-minBtn, 10%); -@color-midAutumn-maxBtn-hover: fadeout(@color-midAutumn-maxBtn, 10%); -@color-midAutumn-closeBtn-hover: fadeout(@color-midAutumn-closeBtn, 10%); -@color-midAutumn-badge-success: lighten(@color-midAutumn-theme, 25%); -@color-midAutumn-badge-success-font: #fff; -@color-midAutumn-badge-info: #af9479; -@color-midAutumn-badge-info-font: #fff; +@color-mid_autumn-theme: rgba(74, 55, 82, 1); +@color-mid_autumn-theme-bgimg: url(../images/jqbg.jpg); +@color-mid_autumn-theme-bgposition: center; +@color-mid_autumn-theme-bgsize: auto 100%; +@color-mid_autumn-theme-hover: fadeout(lighten(@color-mid_autumn-theme, 10%), 40%); +@color-mid_autumn-theme-active: fadeout(lighten(@color-mid_autumn-theme, 15%), 60%); +@color-mid_autumn-theme-font: rgba(246, 233, 255, 0.9); +@color-mid_autumn-theme-font-label: fadeout(lighten(@color-mid_autumn-theme, 20%), 20%); +@color-mid_autumn-theme_2: rgba(255, 255, 255, .93); +@color-mid_autumn-theme_2-background_1: #eeedef; +@color-mid_autumn-theme_2-background_2: fadeout(@color-mid_autumn-theme_2-background_1, 2%); +@color-mid_autumn-theme_2-hover: fadeout(lighten(@color-mid_autumn-theme, 10%), 65%); +@color-mid_autumn-theme_2-active: fadeout(darken(@color-mid_autumn-theme, 5%), 70%); +@color-mid_autumn-theme_2-font: darken(@color-mid_autumn-theme_2, 70%); +@color-mid_autumn-theme_2-font-label: desaturate(lighten(@color-mid_autumn-theme, 30%), 45%); +@color-mid_autumn-theme_2-line: lighten(@color-mid_autumn-theme, 63%); +@color-mid_autumn-theme-sidebar: rgba(255, 255, 255, 0); +@color-mid_autumn-btn: fadeout(darken(@color-mid_autumn-theme, 5%), 27%); +@color-mid_autumn-btn-background: fadeout(lighten(@color-mid_autumn-theme, 35%), 70%); +@color-mid_autumn-pagination-background: fadeout(lighten(@color-mid_autumn-theme, 45%), 50%); +@color-mid_autumn-pagination-hover: fadeout(lighten(@color-mid_autumn-theme, 10%), 70%); +@color-mid_autumn-pagination-active: fadeout(darken(@color-mid_autumn-theme, 10%), 70%); +@color-mid_autumn-pagination-select: fadeout(lighten(@color-mid_autumn-theme, 10%), 55%); +@color-mid_autumn-search-form-background: fadeout(lighten(@color-mid_autumn-theme, 50%), 10%); +@color-mid_autumn-search-list-hover: fadeout(darken(@color-mid_autumn-theme, 10%), 70%); +@color-mid_autumn-scrollbar-track: fadeout(@color-mid_autumn-theme, 80%); +@color-mid_autumn-scrollbar-thumb: fadeout(@color-mid_autumn-theme, 60%); +@color-mid_autumn-scrollbar-thumb-hover: fadeout(@color-mid_autumn-theme, 40%); +@color-mid_autumn-player-pic-c1: fadeout(@color-mid_autumn-theme_2, 50%); +@color-mid_autumn-player-pic-c2: darken(@color-mid_autumn-theme_2, 30%); +@color-mid_autumn-player-progress: darken(@color-mid_autumn-theme_2, 10%); +@color-mid_autumn-player-progress-bar1: darken(@color-mid_autumn-theme_2, 12%); +@color-mid_autumn-player-progress-bar2: lighten(@color-mid_autumn-theme, 12%); +@color-mid_autumn-player-status-text: lighten(@color-mid_autumn-theme_2-font, 10%); +@color-mid_autumn-tab-btn-background: fadeout(lighten(@color-mid_autumn-theme, 10%), 80%); +@color-mid_autumn-tab-btn-background-hover: @color-mid_autumn-theme_2-hover; +@color-mid_autumn-tab-border-top: fadeout(lighten(@color-mid_autumn-theme, 5%), 50%); +@color-mid_autumn-tab-border-bottom: lighten(@color-mid_autumn-theme, 5%); +@color-mid_autumn-minBtn: #85c43b; +@color-mid_autumn-maxBtn: #e7aa36; +@color-mid_autumn-closeBtn: #ea6e4d; +@color-mid_autumn-minBtn-hover: fadeout(@color-mid_autumn-minBtn, 10%); +@color-mid_autumn-maxBtn-hover: fadeout(@color-mid_autumn-maxBtn, 10%); +@color-mid_autumn-closeBtn-hover: fadeout(@color-mid_autumn-closeBtn, 10%); +@color-mid_autumn-badge-success: lighten(@color-mid_autumn-theme, 25%); +@color-mid_autumn-badge-success-font: #fff; +@color-mid_autumn-badge-info: #af9479; +@color-mid_autumn-badge-info-font: #fff; -@color-dhHyrz-theme: rgb(87, 144, 167); -@color-dhHyrz-theme-bgimg: url(../images/myzcbg.jpeg); -@color-dhHyrz-theme-bgposition: center; -@color-dhHyrz-theme-bgsize: auto 100%; -@color-dhHyrz-theme-hover: fadeout(lighten(@color-dhHyrz-theme, 10%), 45%); -@color-dhHyrz-theme-active: fadeout(lighten(@color-dhHyrz-theme, 15%), 60%); -@color-dhHyrz-theme-font: rgba(67, 118, 148, 0.9); -@color-dhHyrz-theme-font-label: fadeout(darken(@color-dhHyrz-theme, 20%), 20%); -@color-dhHyrz-theme_2: rgba(255, 255, 255, 0.8); -@color-dhHyrz-theme_2-background_1: #e9faff; -@color-dhHyrz-theme_2-background_2: fadeout(@color-dhHyrz-theme_2-background_1, 2%); -@color-dhHyrz-theme_2-hover: fadeout(lighten(@color-dhHyrz-theme, 10%), 65%); -@color-dhHyrz-theme_2-active: fadeout(darken(@color-dhHyrz-theme, 5%), 70%); -@color-dhHyrz-theme_2-font: darken(@color-dhHyrz-theme_2, 80%); -@color-dhHyrz-theme_2-font-label: desaturate(lighten(@color-dhHyrz-theme, 10%), 45%); -@color-dhHyrz-theme_2-line: fadeout(lighten(@color-dhHyrz-theme, 36%), 70%); -@color-dhHyrz-theme-sidebar: rgba(255, 255, 255, .3); -@color-dhHyrz-btn: fadeout(darken(@color-dhHyrz-theme, 5%), 15%); -@color-dhHyrz-btn-background: fadeout(lighten(@color-dhHyrz-theme, 35%), 70%); -@color-dhHyrz-pagination-background: fadeout(lighten(@color-dhHyrz-theme, 20%), 70%); -@color-dhHyrz-pagination-hover: fadeout(lighten(@color-dhHyrz-theme, 10%), 60%); -@color-dhHyrz-pagination-active: fadeout(darken(@color-dhHyrz-theme, 10%), 70%); -@color-dhHyrz-pagination-select: fadeout(lighten(@color-dhHyrz-theme, 10%), 50%); -@color-dhHyrz-search-form-background: fadeout(lighten(@color-dhHyrz-theme, 30%), 20%); -@color-dhHyrz-search-list-hover: fadeout(darken(@color-dhHyrz-theme, 10%), 50%); -@color-dhHyrz-scrollbar-track: fadeout(@color-dhHyrz-theme, 80%); -@color-dhHyrz-scrollbar-thumb: fadeout(@color-dhHyrz-theme, 60%); -@color-dhHyrz-scrollbar-thumb-hover: fadeout(@color-dhHyrz-theme, 40%); -@color-dhHyrz-player-pic-c1: fadeout(@color-dhHyrz-theme_2, 50%); -@color-dhHyrz-player-pic-c2: darken(@color-dhHyrz-theme_2, 30%); -@color-dhHyrz-player-progress: darken(@color-dhHyrz-theme_2, 10%); -@color-dhHyrz-player-progress-bar1: darken(@color-dhHyrz-theme_2, 12%); -@color-dhHyrz-player-progress-bar2: lighten(@color-dhHyrz-theme, 12%); -@color-dhHyrz-player-status-text: lighten(@color-dhHyrz-theme_2-font, 10%); -@color-dhHyrz-tab-btn-background: fadeout(lighten(@color-dhHyrz-theme, 10%), 80%); -@color-dhHyrz-tab-btn-background-hover: @color-dhHyrz-theme_2-hover; -@color-dhHyrz-tab-border-top: fadeout(lighten(@color-dhHyrz-theme, 5%), 50%); -@color-dhHyrz-tab-border-bottom: lighten(@color-dhHyrz-theme, 5%); -@color-dhHyrz-minBtn: #85c43b; -@color-dhHyrz-maxBtn: #e7aa36; -@color-dhHyrz-closeBtn: #ea6e4d; -@color-dhHyrz-minBtn-hover: fadeout(@color-dhHyrz-minBtn, 10%); -@color-dhHyrz-maxBtn-hover: fadeout(@color-dhHyrz-maxBtn, 10%); -@color-dhHyrz-closeBtn-hover: fadeout(@color-dhHyrz-closeBtn, 10%); -@color-dhHyrz-badge-success: #7fb575; -@color-dhHyrz-badge-success-font: #fff; -@color-dhHyrz-badge-info: lighten(@color-dhHyrz-theme, 10%); -@color-dhHyrz-badge-info-font: #fff; +@color-naruto-theme: rgb(87, 144, 167); +@color-naruto-theme-bgimg: url(../images/myzcbg.jpeg); +@color-naruto-theme-bgposition: center; +@color-naruto-theme-bgsize: auto 100%; +@color-naruto-theme-hover: fadeout(lighten(@color-naruto-theme, 10%), 45%); +@color-naruto-theme-active: fadeout(lighten(@color-naruto-theme, 15%), 60%); +@color-naruto-theme-font: rgba(67, 118, 148, 0.9); +@color-naruto-theme-font-label: fadeout(darken(@color-naruto-theme, 20%), 20%); +@color-naruto-theme_2: rgba(255, 255, 255, 0.8); +@color-naruto-theme_2-background_1: #e9faff; +@color-naruto-theme_2-background_2: fadeout(@color-naruto-theme_2-background_1, 2%); +@color-naruto-theme_2-hover: fadeout(lighten(@color-naruto-theme, 10%), 65%); +@color-naruto-theme_2-active: fadeout(darken(@color-naruto-theme, 5%), 70%); +@color-naruto-theme_2-font: darken(@color-naruto-theme_2, 80%); +@color-naruto-theme_2-font-label: desaturate(lighten(@color-naruto-theme, 10%), 45%); +@color-naruto-theme_2-line: fadeout(lighten(@color-naruto-theme, 36%), 70%); +@color-naruto-theme-sidebar: rgba(255, 255, 255, .3); +@color-naruto-btn: fadeout(darken(@color-naruto-theme, 5%), 15%); +@color-naruto-btn-background: fadeout(lighten(@color-naruto-theme, 35%), 70%); +@color-naruto-pagination-background: fadeout(lighten(@color-naruto-theme, 20%), 70%); +@color-naruto-pagination-hover: fadeout(lighten(@color-naruto-theme, 10%), 60%); +@color-naruto-pagination-active: fadeout(darken(@color-naruto-theme, 10%), 70%); +@color-naruto-pagination-select: fadeout(lighten(@color-naruto-theme, 10%), 50%); +@color-naruto-search-form-background: fadeout(lighten(@color-naruto-theme, 30%), 20%); +@color-naruto-search-list-hover: fadeout(darken(@color-naruto-theme, 10%), 50%); +@color-naruto-scrollbar-track: fadeout(@color-naruto-theme, 80%); +@color-naruto-scrollbar-thumb: fadeout(@color-naruto-theme, 60%); +@color-naruto-scrollbar-thumb-hover: fadeout(@color-naruto-theme, 40%); +@color-naruto-player-pic-c1: fadeout(@color-naruto-theme_2, 50%); +@color-naruto-player-pic-c2: darken(@color-naruto-theme_2, 30%); +@color-naruto-player-progress: darken(@color-naruto-theme_2, 10%); +@color-naruto-player-progress-bar1: darken(@color-naruto-theme_2, 12%); +@color-naruto-player-progress-bar2: lighten(@color-naruto-theme, 12%); +@color-naruto-player-status-text: lighten(@color-naruto-theme_2-font, 10%); +@color-naruto-tab-btn-background: fadeout(lighten(@color-naruto-theme, 10%), 80%); +@color-naruto-tab-btn-background-hover: @color-naruto-theme_2-hover; +@color-naruto-tab-border-top: fadeout(lighten(@color-naruto-theme, 5%), 50%); +@color-naruto-tab-border-bottom: lighten(@color-naruto-theme, 5%); +@color-naruto-minBtn: #85c43b; +@color-naruto-maxBtn: #e7aa36; +@color-naruto-closeBtn: #ea6e4d; +@color-naruto-minBtn-hover: fadeout(@color-naruto-minBtn, 10%); +@color-naruto-maxBtn-hover: fadeout(@color-naruto-maxBtn, 10%); +@color-naruto-closeBtn-hover: fadeout(@color-naruto-closeBtn, 10%); +@color-naruto-badge-success: #7fb575; +@color-naruto-badge-success-font: #fff; +@color-naruto-badge-info: lighten(@color-naruto-theme, 10%); +@color-naruto-badge-info-font: #fff; -@color-happyNewYear-theme: rgb(252, 57, 57); -@color-happyNewYear-theme-bgimg: url(../images/xnkl.jpg); -@color-happyNewYear-theme-bgposition: center; -@color-happyNewYear-theme-bgsize: auto 100%; -@color-happyNewYear-theme-hover: fadeout(lighten(@color-happyNewYear-theme, 10%), 45%); -@color-happyNewYear-theme-active: fadeout(lighten(@color-happyNewYear-theme, 15%), 60%); -@color-happyNewYear-theme-font: rgba(255, 255, 255, 0.9); -@color-happyNewYear-theme-font-label: fadeout(lighten(@color-happyNewYear-theme, 20%), 20%); -@color-happyNewYear-theme_2: rgba(255, 199, 199, 0.8); -@color-happyNewYear-theme_2-background_1: #f2a4a4; -@color-happyNewYear-theme_2-background_2: fadeout(@color-happyNewYear-theme_2-background_1, 2%); -@color-happyNewYear-theme_2-hover: fadeout(lighten(@color-happyNewYear-theme, 10%), 55%); -@color-happyNewYear-theme_2-active: fadeout(darken(@color-happyNewYear-theme, 5%), 70%); -@color-happyNewYear-theme_2-font: darken(@color-happyNewYear-theme_2, 90%); -@color-happyNewYear-theme_2-font-label: desaturate(darken(@color-happyNewYear-theme, 5%), 50%); -@color-happyNewYear-theme_2-line: fadeout(lighten(@color-happyNewYear-theme, 16%), 70%); -@color-happyNewYear-theme-sidebar: rgba(119, 37, 18, 0.1); -@color-happyNewYear-btn: fadeout(darken(@color-happyNewYear-theme, 5%), 15%); -@color-happyNewYear-btn-background: fadeout(lighten(@color-happyNewYear-theme, 15%), 60%); -@color-happyNewYear-pagination-background: fadeout(lighten(@color-happyNewYear-theme, 15%), 40%); -@color-happyNewYear-pagination-hover: fadeout(lighten(@color-happyNewYear-theme, 10%), 70%); -@color-happyNewYear-pagination-active: fadeout(darken(@color-happyNewYear-theme, 10%), 70%); -@color-happyNewYear-pagination-select: fadeout(lighten(@color-happyNewYear-theme, 10%), 55%); -@color-happyNewYear-search-form-background: fadeout(lighten(@color-happyNewYear-theme, 15%), 20%); -@color-happyNewYear-search-list-hover: fadeout(darken(@color-happyNewYear-theme, 10%), 50%); -@color-happyNewYear-scrollbar-track: fadeout(@color-happyNewYear-theme, 80%); -@color-happyNewYear-scrollbar-thumb: fadeout(@color-happyNewYear-theme, 60%); -@color-happyNewYear-scrollbar-thumb-hover: fadeout(@color-happyNewYear-theme, 40%); -@color-happyNewYear-player-pic-c1: fadeout(@color-happyNewYear-theme_2, 50%); -@color-happyNewYear-player-pic-c2: darken(@color-happyNewYear-theme_2, 30%); -@color-happyNewYear-player-progress: darken(@color-happyNewYear-theme_2, 10%); -@color-happyNewYear-player-progress-bar1: darken(@color-happyNewYear-theme_2, 12%); -@color-happyNewYear-player-progress-bar2: lighten(@color-happyNewYear-theme, 9%); -@color-happyNewYear-player-status-text: lighten(@color-happyNewYear-theme_2-font, 10%); -@color-happyNewYear-tab-btn-background: fadeout(lighten(@color-happyNewYear-theme, 10%), 80%); -@color-happyNewYear-tab-btn-background-hover: @color-happyNewYear-theme_2-hover; -@color-happyNewYear-tab-border-top: fadeout(lighten(@color-happyNewYear-theme, 5%), 50%); -@color-happyNewYear-tab-border-bottom: lighten(@color-happyNewYear-theme, 5%); -@color-happyNewYear-minBtn: #c4943b; -@color-happyNewYear-maxBtn: #e7aa36; -@color-happyNewYear-closeBtn: #ea6e4d; -@color-happyNewYear-minBtn-hover: fadeout(@color-happyNewYear-minBtn, 10%); -@color-happyNewYear-maxBtn-hover: fadeout(@color-happyNewYear-maxBtn, 10%); -@color-happyNewYear-closeBtn-hover: fadeout(@color-happyNewYear-closeBtn, 10%); -@color-happyNewYear-badge-success: @color-happyNewYear-theme; -@color-happyNewYear-badge-success-font: #fff; -@color-happyNewYear-badge-info: #c4943b; -@color-happyNewYear-badge-info-font: #fff; +@color-happy_new_year-theme: rgb(252, 57, 57); +@color-happy_new_year-theme-bgimg: url(../images/xnkl.jpg); +@color-happy_new_year-theme-bgposition: center; +@color-happy_new_year-theme-bgsize: auto 100%; +@color-happy_new_year-theme-hover: fadeout(lighten(@color-happy_new_year-theme, 10%), 45%); +@color-happy_new_year-theme-active: fadeout(lighten(@color-happy_new_year-theme, 15%), 60%); +@color-happy_new_year-theme-font: rgba(255, 255, 255, 0.9); +@color-happy_new_year-theme-font-label: fadeout(lighten(@color-happy_new_year-theme, 20%), 20%); +@color-happy_new_year-theme_2: rgba(255, 199, 199, 0.8); +@color-happy_new_year-theme_2-background_1: #f2a4a4; +@color-happy_new_year-theme_2-background_2: fadeout(@color-happy_new_year-theme_2-background_1, 2%); +@color-happy_new_year-theme_2-hover: fadeout(lighten(@color-happy_new_year-theme, 10%), 55%); +@color-happy_new_year-theme_2-active: fadeout(darken(@color-happy_new_year-theme, 5%), 70%); +@color-happy_new_year-theme_2-font: darken(@color-happy_new_year-theme_2, 90%); +@color-happy_new_year-theme_2-font-label: desaturate(darken(@color-happy_new_year-theme, 5%), 50%); +@color-happy_new_year-theme_2-line: fadeout(lighten(@color-happy_new_year-theme, 16%), 70%); +@color-happy_new_year-theme-sidebar: rgba(119, 37, 18, 0.1); +@color-happy_new_year-btn: fadeout(darken(@color-happy_new_year-theme, 5%), 15%); +@color-happy_new_year-btn-background: fadeout(lighten(@color-happy_new_year-theme, 15%), 60%); +@color-happy_new_year-pagination-background: fadeout(lighten(@color-happy_new_year-theme, 15%), 40%); +@color-happy_new_year-pagination-hover: fadeout(lighten(@color-happy_new_year-theme, 10%), 70%); +@color-happy_new_year-pagination-active: fadeout(darken(@color-happy_new_year-theme, 10%), 70%); +@color-happy_new_year-pagination-select: fadeout(lighten(@color-happy_new_year-theme, 10%), 55%); +@color-happy_new_year-search-form-background: fadeout(lighten(@color-happy_new_year-theme, 15%), 20%); +@color-happy_new_year-search-list-hover: fadeout(darken(@color-happy_new_year-theme, 10%), 50%); +@color-happy_new_year-scrollbar-track: fadeout(@color-happy_new_year-theme, 80%); +@color-happy_new_year-scrollbar-thumb: fadeout(@color-happy_new_year-theme, 60%); +@color-happy_new_year-scrollbar-thumb-hover: fadeout(@color-happy_new_year-theme, 40%); +@color-happy_new_year-player-pic-c1: fadeout(@color-happy_new_year-theme_2, 50%); +@color-happy_new_year-player-pic-c2: darken(@color-happy_new_year-theme_2, 30%); +@color-happy_new_year-player-progress: darken(@color-happy_new_year-theme_2, 10%); +@color-happy_new_year-player-progress-bar1: darken(@color-happy_new_year-theme_2, 12%); +@color-happy_new_year-player-progress-bar2: lighten(@color-happy_new_year-theme, 9%); +@color-happy_new_year-player-status-text: lighten(@color-happy_new_year-theme_2-font, 10%); +@color-happy_new_year-tab-btn-background: fadeout(lighten(@color-happy_new_year-theme, 10%), 80%); +@color-happy_new_year-tab-btn-background-hover: @color-happy_new_year-theme_2-hover; +@color-happy_new_year-tab-border-top: fadeout(lighten(@color-happy_new_year-theme, 5%), 50%); +@color-happy_new_year-tab-border-bottom: lighten(@color-happy_new_year-theme, 5%); +@color-happy_new_year-minBtn: #c4943b; +@color-happy_new_year-maxBtn: #e7aa36; +@color-happy_new_year-closeBtn: #ea6e4d; +@color-happy_new_year-minBtn-hover: fadeout(@color-happy_new_year-minBtn, 10%); +@color-happy_new_year-maxBtn-hover: fadeout(@color-happy_new_year-maxBtn, 10%); +@color-happy_new_year-closeBtn-hover: fadeout(@color-happy_new_year-closeBtn, 10%); +@color-happy_new_year-badge-success: @color-happy_new_year-theme; +@color-happy_new_year-badge-success-font: #fff; +@color-happy_new_year-badge-info: #c4943b; +@color-happy_new_year-badge-info-font: #fff; diff --git a/src/renderer/lang/cns/store/state.json b/src/renderer/lang/cns/store/state.json new file mode 100644 index 00000000..6f4b3250 --- /dev/null +++ b/src/renderer/lang/cns/store/state.json @@ -0,0 +1,12 @@ +{ + "theme_green": "绿意盎然", + "theme_blue": "蓝田生玉", + "theme_yellow": "信口雌黄", + "theme_orange": "橙黄橘绿", + "theme_red": "热情似火", + "theme_purple": "重斤球紫", + "theme_grey": "灰常美丽", + "theme_mid_autumn": "月里嫦娥", + "theme_naruto": "木叶之村", + "theme_happy_new_year": "新年快乐" +} diff --git a/src/renderer/lang/cnt/store/state.json b/src/renderer/lang/cnt/store/state.json new file mode 100644 index 00000000..6fdf18da --- /dev/null +++ b/src/renderer/lang/cnt/store/state.json @@ -0,0 +1,12 @@ +{ + "theme_green": "綠意盎然", + "theme_blue": "藍田生玉", + "theme_yellow": "信口雌黃", + "theme_orange": "橙黃橘綠", + "theme_red": "熱情似火", + "theme_purple": "重斤球紫", + "theme_grey": "灰常美麗", + "theme_mid_autumn": "月裡嫦娥", + "theme_naruto": "木葉之村", + "theme_happy_new_year": "新年快樂" +} diff --git a/src/renderer/lang/en/store/state.json b/src/renderer/lang/en/store/state.json new file mode 100644 index 00000000..803ca062 --- /dev/null +++ b/src/renderer/lang/en/store/state.json @@ -0,0 +1,12 @@ +{ + "theme_green": "Green", + "theme_blue": "Blue", + "theme_yellow": "Yellow", + "theme_orange": "Orange", + "theme_red": "Red", + "theme_purple": "Purple", + "theme_grey": "Grey", + "theme_mid_autumn": "Mid-Autumn", + "theme_naruto": "Naruto", + "theme_happy_new_year": "New Year" +} diff --git a/src/renderer/plugins/i18n.js b/src/renderer/plugins/i18n.js index ece3cbb3..7197a2b9 100644 --- a/src/renderer/plugins/i18n.js +++ b/src/renderer/plugins/i18n.js @@ -13,7 +13,7 @@ import messages from '@/lang' Vue.use(VueI18n) -const i18n = new VueI18n({ +const i18n = window.i18n = new VueI18n({ locale: 'cns', fallbackLocale: 'cns', messages, diff --git a/src/renderer/store/state.js b/src/renderer/store/state.js index 82f6d79d..22c1c514 100644 --- a/src/renderer/store/state.js +++ b/src/renderer/store/state.js @@ -30,6 +30,8 @@ electronStore_config.set('version', settingVersion) electronStore_config.set('setting', setting) process.versions.app = version +window.i18n.locale = setting.langId + export default { themes: [ { @@ -70,17 +72,17 @@ export default { { id: 7, name: '月里嫦娥', - class: 'midAutumn', + class: 'mid_autumn', }, { id: 8, name: '木叶之村', - class: 'dhHyrz', + class: 'naruto', }, { id: 9, name: '新年快乐', - class: 'happyNewYear', + class: 'happy_new_year', }, ], version: { diff --git a/src/renderer/views/Setting.vue b/src/renderer/views/Setting.vue index 773a76d3..15e7a84d 100644 --- a/src/renderer/views/Setting.vue +++ b/src/renderer/views/Setting.vue @@ -6,9 +6,9 @@ div.scroll(:class="$style.setting") h3 {{$t('view.setting.basic_theme')}} div ul(:class="$style.theme") - li(v-for="theme in themes.list" :key="theme.id" @click="current_setting.themeId = theme.id" :class="[theme.class, themes.active == theme.id ? $style.active : '']") + li(v-for="theme in themes.list" :key="theme.id" :title="$t('store.state.theme_' + theme.class)" @click="current_setting.themeId = theme.id" :class="[theme.class, themes.active == theme.id ? $style.active : '']") span - | {{theme.name}} + label {{$t('store.state.theme_' + theme.class)}} dd(:title="$t('view.setting.basic_animation_title')") h3 {{$t('view.setting.basic_animation')}} @@ -637,7 +637,8 @@ export default { // color: @color-theme; margin-right: 30px; transition: color .3s ease; - margin-bottom: 20px; + margin-bottom: 18px; + width: 56px; &:last-child { margin-right: 0; @@ -664,6 +665,13 @@ export default { } } + label { + width: 100%; + text-align: center; + height: 1.2em; + .mixin-ellipsis-1; + } + each(@themes, { &:global(.@{value}) { span {