From a3687dd65312b81679e82fdf09c55eebb5d633b7 Mon Sep 17 00:00:00 2001 From: syuilo Date: Wed, 14 Apr 2021 16:24:07 +0900 Subject: theme description --- src/client/pages/settings/theme.manage.vue | 3 +++ src/client/pages/theme-editor.vue | 12 ++++++++++++ 2 files changed, 15 insertions(+) (limited to 'src') diff --git a/src/client/pages/settings/theme.manage.vue b/src/client/pages/settings/theme.manage.vue index 6f5a946e0b..ea9d5949ff 100644 --- a/src/client/pages/settings/theme.manage.vue +++ b/src/client/pages/settings/theme.manage.vue @@ -13,6 +13,9 @@ {{ $ts.author }} + + {{ $ts._theme.description }} + {{ $ts._theme.code }} diff --git a/src/client/pages/theme-editor.vue b/src/client/pages/theme-editor.vue index 0558451e2c..db273746a8 100644 --- a/src/client/pages/theme-editor.vue +++ b/src/client/pages/theme-editor.vue @@ -35,6 +35,7 @@ + {{ $ts._theme.code }} @@ -42,6 +43,14 @@ {{ $ts.apply }} {{ $ts.editCode }} + + + + {{ $ts._theme.description }} + + + {{ $ts.addDescription }} + {{ $ts.preview }} {{ $ts.saveAs }} @@ -88,6 +97,8 @@ export default defineComponent({ props: lightTheme.props } as Theme, codeEnabled: false, + descriptionEnabled: false, + description: null, themeCode: null, bgColors: [ { color: '#f5f5f5', kind: 'light', forPreview: '#f5f5f5' }, @@ -218,6 +229,7 @@ export default defineComponent({ this.theme.id = uuid(); this.theme.name = name; this.theme.author = `@${this.$i.username}@${toUnicode(host)}`; + if (this.description) this.theme.desc = this.description; addTheme(this.theme); applyTheme(this.theme); if (this.$store.state.darkMode) { -- cgit v1.2.3-freya