client: tweak ui

This commit is contained in:
syuilo
2021-12-02 20:09:12 +09:00
parent 4cc2a561d5
commit f38b6a1806
33 changed files with 199 additions and 185 deletions

View File

@ -1,6 +1,6 @@
<template>
<FormBase>
<FormSelect v-model="selectedThemeId">
<div class="_formRoot">
<FormSelect v-model="selectedThemeId" class="_formBlock">
<template #label>{{ $ts.theme }}</template>
<optgroup :label="$ts._theme.installedThemes">
<option v-for="x in installedThemes" :key="x.id" :value="x.id">{{ x.name }}</option>
@ -10,31 +10,31 @@
</optgroup>
</FormSelect>
<template v-if="selectedTheme">
<FormInput readonly :modelValue="selectedTheme.author">
<span>{{ $ts.author }}</span>
<FormInput readonly :modelValue="selectedTheme.author" class="_formBlock">
<template #label>{{ $ts.author }}</template>
</FormInput>
<FormTextarea v-if="selectedTheme.desc" readonly :modelValue="selectedTheme.desc">
<span>{{ $ts._theme.description }}</span>
<FormTextarea v-if="selectedTheme.desc" readonly :modelValue="selectedTheme.desc" class="_formBlock">
<template #label>{{ $ts._theme.description }}</template>
</FormTextarea>
<FormTextarea readonly tall :modelValue="selectedThemeCode">
<span>{{ $ts._theme.code }}</span>
<template #desc><button class="_textButton" @click="copyThemeCode()">{{ $ts.copy }}</button></template>
<FormTextarea readonly tall :modelValue="selectedThemeCode" class="_formBlock">
<template #label>{{ $ts._theme.code }}</template>
<template #caption><button class="_textButton" @click="copyThemeCode()">{{ $ts.copy }}</button></template>
</FormTextarea>
<FormButton v-if="!builtinThemes.some(t => t.id == selectedTheme.id)" danger @click="uninstall()"><i class="fas fa-trash-alt"></i> {{ $ts.uninstall }}</FormButton>
<FormButton v-if="!builtinThemes.some(t => t.id == selectedTheme.id)" class="_formBlock" danger @click="uninstall()"><i class="fas fa-trash-alt"></i> {{ $ts.uninstall }}</FormButton>
</template>
</FormBase>
</div>
</template>
<script lang="ts">
import { defineComponent } from 'vue';
import * as JSON5 from 'json5';
import FormTextarea from '@/components/debobigego/textarea.vue';
import FormSelect from '@/components/debobigego/select.vue';
import FormRadios from '@/components/debobigego/radios.vue';
import FormTextarea from '@/components/form/textarea.vue';
import FormSelect from '@/components/form/select.vue';
import FormRadios from '@/components/form/radios.vue';
import FormBase from '@/components/debobigego/base.vue';
import FormGroup from '@/components/debobigego/group.vue';
import FormInput from '@/components/debobigego/input.vue';
import FormButton from '@/components/debobigego/button.vue';
import FormInput from '@/components/form/input.vue';
import FormButton from '@/components/ui/button.vue';
import { Theme, builtinThemes } from '@/scripts/theme';
import copyToClipboard from '@/scripts/copy-to-clipboard';
import * as os from '@/os';