summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2018-10-03 03:07:46 +0900
committersyuilo <syuilotan@yahoo.co.jp>2018-10-03 03:07:46 +0900
commit16b6b1f2b3d83a6a113a229edbcabbd11675c66d (patch)
tree22f3198fa658cb82e492dbb41a74b3569ad3a5da /src
parentImprove usability (diff)
downloadsharkey-16b6b1f2b3d83a6a113a229edbcabbd11675c66d.tar.gz
sharkey-16b6b1f2b3d83a6a113a229edbcabbd11675c66d.tar.bz2
sharkey-16b6b1f2b3d83a6a113a229edbcabbd11675c66d.zip
テーマ関連機能の強化
Diffstat (limited to 'src')
-rw-r--r--src/client/app/common/views/components/theme.vue9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/client/app/common/views/components/theme.vue b/src/client/app/common/views/components/theme.vue
index b2defb212f..4b0e6da24c 100644
--- a/src/client/app/common/views/components/theme.vue
+++ b/src/client/app/common/views/components/theme.vue
@@ -25,6 +25,9 @@
<ui-input v-model="myThemeName">
<span>%i18n:@theme-name%</span>
</ui-input>
+ <ui-textarea v-model="myThemeDesc">
+ <span>%i18n:@desc%</span>
+ </ui-textarea>
</div>
<div>
<div style="padding-bottom:8px;">%i18n:@primary-color%:</div>
@@ -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', {