diff options
| author | syuilo <Syuilotan@yahoo.co.jp> | 2021-04-14 16:24:07 +0900 |
|---|---|---|
| committer | syuilo <Syuilotan@yahoo.co.jp> | 2021-04-14 16:24:07 +0900 |
| commit | a3687dd65312b81679e82fdf09c55eebb5d633b7 (patch) | |
| tree | 224a5d68d8954f42db44c2d14152ae14ebb17ca0 /src | |
| parent | fix bug (diff) | |
| download | misskey-a3687dd65312b81679e82fdf09c55eebb5d633b7.tar.gz misskey-a3687dd65312b81679e82fdf09c55eebb5d633b7.tar.bz2 misskey-a3687dd65312b81679e82fdf09c55eebb5d633b7.zip | |
theme description
Diffstat (limited to 'src')
| -rw-r--r-- | src/client/pages/settings/theme.manage.vue | 3 | ||||
| -rw-r--r-- | src/client/pages/theme-editor.vue | 12 |
2 files changed, 15 insertions, 0 deletions
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 @@ <FormInput readonly :value="selectedTheme.author"> <span>{{ $ts.author }}</span> </FormInput> + <FormTextarea readonly :value="selectedTheme.desc" v-if="selectedTheme.desc"> + <span>{{ $ts._theme.description }}</span> + </FormTextarea> <FormTextarea readonly tall :value="selectedThemeCode"> <span>{{ $ts._theme.code }}</span> <template #desc><button @click="copyThemeCode()" class="_textButton">{{ $ts.copy }}</button></template> 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 @@ </div> </div> </div> + <FormGroup v-if="codeEnabled"> <FormTextarea v-model:value="themeCode" tall> <span>{{ $ts._theme.code }}</span> @@ -42,6 +43,14 @@ <FormButton @click="applyThemeCode" primary>{{ $ts.apply }}</FormButton> </FormGroup> <FormButton v-else @click="codeEnabled = true"><Fa :icon="faCode"/> {{ $ts.editCode }}</FormButton> + + <FormGroup v-if="descriptionEnabled"> + <FormTextarea v-model:value="description"> + <span>{{ $ts._theme.description }}</span> + </FormTextarea> + </FormGroup> + <FormButton v-else @click="descriptionEnabled = true">{{ $ts.addDescription }}</FormButton> + <FormGroup> <FormButton @click="showPreview"><Fa :icon="faEye"/> {{ $ts.preview }}</FormButton> <FormButton @click="saveAs" primary><Fa :icon="faSave"/> {{ $ts.saveAs }}</FormButton> @@ -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) { |