From fa86fb1b0d0f9b861a00085fd885a89ef9df8548 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 18 Oct 2020 00:49:02 +0900 Subject: [PATCH] Add sample view in theme-editor --- src/client/components/sample.vue | 116 ++++++++++++++++++++++++++++++ src/client/pages/theme-editor.vue | 12 +++- 2 files changed, 126 insertions(+), 2 deletions(-) create mode 100644 src/client/components/sample.vue diff --git a/src/client/components/sample.vue b/src/client/components/sample.vue new file mode 100644 index 000000000..2e21b785d --- /dev/null +++ b/src/client/components/sample.vue @@ -0,0 +1,116 @@ + + + diff --git a/src/client/pages/theme-editor.vue b/src/client/pages/theme-editor.vue index 5b59d025d..e5b593137 100644 --- a/src/client/pages/theme-editor.vue +++ b/src/client/pages/theme-editor.vue @@ -75,6 +75,12 @@ +
+
+ {{ $t('sample') }} + +
+
{{ $t('preview') }} @@ -88,16 +94,17 @@ import { defineComponent } from 'vue'; import { faPalette, faChevronDown, faKeyboard } from '@fortawesome/free-solid-svg-icons'; import * as JSON5 from 'json5'; +import { toUnicode } from 'punycode'; import MkRadio from '@/components/ui/radio.vue'; import MkButton from '@/components/ui/button.vue'; import MkInput from '@/components/ui/input.vue'; import MkTextarea from '@/components/ui/textarea.vue'; import MkSelect from '@/components/ui/select.vue'; +import MkSample from '@/components/sample.vue'; import { convertToMisskeyTheme, ThemeValue, convertToViewModel, ThemeViewModel } from '@/scripts/theme-editor'; import { Theme, applyTheme, lightTheme, darkTheme, themeProps, validateTheme } from '@/scripts/theme'; -import { toUnicode } from 'punycode'; import { host } from '@/config'; import * as os from '@/os'; @@ -107,7 +114,8 @@ export default defineComponent({ MkButton, MkInput, MkTextarea, - MkSelect + MkSelect, + MkSample, }, data() {