theme description
This commit is contained in:
@@ -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) {
|
||||
|
Reference in New Issue
Block a user