From 4b19c53697e3edae1ffd5dff1f78d25837cafe7f Mon Sep 17 00:00:00 2001 From: syuilo Date: Sat, 8 Aug 2020 10:27:37 +0900 Subject: [PATCH] =?UTF-8?q?client:=20=E3=83=86=E3=83=BC=E3=83=9E=E3=82=B3?= =?UTF-8?q?=E3=83=BC=E3=83=89=E3=82=92=E3=82=B3=E3=83=94=E3=83=BC=E3=81=A7?= =?UTF-8?q?=E3=81=8D=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB=E3=81=97=E3=81=9F?= =?UTF-8?q?=E3=82=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- locales/ja-JP.yml | 1 + src/client/pages/preferences/theme.vue | 18 +++++++++++++----- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index e87a1af90e..d3891a41a6 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -557,6 +557,7 @@ wordMute: "ワードミュート" userSaysSomething: "{name}が何かを言いました" makeActive: "アクティブにする" display: "表示" +copy: "コピー" _sidebar: full: "フル" diff --git a/src/client/pages/preferences/theme.vue b/src/client/pages/preferences/theme.vue index 173ccd7091..2461504a42 100644 --- a/src/client/pages/preferences/theme.vue +++ b/src/client/pages/preferences/theme.vue @@ -55,8 +55,8 @@ {{ $t('_theme.code') }} - {{ $t('install') }} - {{ $t('preview') }} + {{ $t('install') }} + {{ $t('preview') }}
@@ -68,6 +68,7 @@ @@ -80,7 +81,6 @@ import Vue from 'vue'; import { faPalette, faDownload, faFolderOpen, faCheck, faTrashAlt, faEye } from '@fortawesome/free-solid-svg-icons'; import * as JSON5 from 'json5'; -import MkInput from '../../components/ui/input.vue'; import MkButton from '../../components/ui/button.vue'; import MkSelect from '../../components/ui/select.vue'; import MkSwitch from '../../components/ui/switch.vue'; @@ -88,10 +88,10 @@ import MkTextarea from '../../components/ui/textarea.vue'; import { Theme, builtinThemes, applyTheme, validateTheme } from '../../scripts/theme'; import { selectFile } from '../../scripts/select-file'; import { isDeviceDarkmode } from '../../scripts/is-device-darkmode'; +import copyToClipboard from '../../scripts/copy-to-clipboard'; export default Vue.extend({ components: { - MkInput, MkButton, MkSelect, MkSwitch, @@ -192,6 +192,14 @@ export default Vue.extend({ }); }, + copyThemeCode() { + copyToClipboard(this.selectedThemeCode); + this.$root.dialog({ + type: 'success', + iconOnly: true, autoClose: true + }); + }, + parseThemeCode(code) { let theme; @@ -247,7 +255,7 @@ export default Vue.extend({ key: 'themes', value: themes }); this.$root.dialog({ - type: 'info', + type: 'success', iconOnly: true, autoClose: true }); },