From 16b6b1f2b3d83a6a113a229edbcabbd11675c66d Mon Sep 17 00:00:00 2001 From: syuilo Date: Wed, 3 Oct 2018 03:07:46 +0900 Subject: [PATCH] =?UTF-8?q?=E3=83=86=E3=83=BC=E3=83=9E=E9=96=A2=E9=80=A3?= =?UTF-8?q?=E6=A9=9F=E8=83=BD=E3=81=AE=E5=BC=B7=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- locales/ja-JP.yml | 1 + src/client/app/common/views/components/theme.vue | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index 65f72eced..62c6355c3 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -314,6 +314,7 @@ common/views/components/theme.vue: export: "エクスポート" import: "インポート" import-by-code: "またはコードをペースト" + theme-name-required: "テーマ名は必須です。" common/views/components/cw-button.vue: hide: "隠す" diff --git a/src/client/app/common/views/components/theme.vue b/src/client/app/common/views/components/theme.vue index b2defb212..4b0e6da24 100644 --- a/src/client/app/common/views/components/theme.vue +++ b/src/client/app/common/views/components/theme.vue @@ -25,6 +25,9 @@ %i18n:@theme-name% + + %i18n:@desc% +
%i18n:@primary-color%:
@@ -108,6 +111,7 @@ export default Vue.extend({ selectedInstalledThemeId: null, myThemeBase: 'light', myThemeName: '', + myThemeDesc: '', myThemePrimary: lightTheme.vars.primary, myThemeSecondary: lightTheme.vars.secondary, myThemeText: lightTheme.vars.text @@ -147,6 +151,7 @@ export default Vue.extend({ return { name: this.myThemeName, author: this.$store.state.i.username, + desc: this.myThemeDesc, base: this.myThemeBase, vars: { primary: tinycolor(typeof this.myThemePrimary == 'string' ? this.myThemePrimary : this.myThemePrimary.rgba).toRgbString(), @@ -252,6 +257,10 @@ export default Vue.extend({ gen() { const theme = this.myTheme; + if (theme.name == null || theme.name.trim() == '') { + alert('%i18n:@theme-name-required%'); + return; + } theme.id = uuid(); const themes = this.$store.state.device.themes.concat(theme); this.$store.commit('device/set', {