diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index 46dea949d21378c8ab6bb6b690b9b0570963fa68..366c4a33cd25bb68143faa53a7c411389b1ad00b 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -291,6 +291,7 @@ common/views/components/theme.vue: install-a-theme: "テーマã®ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«" theme-code: "テーマコード" install: "インストール" + installed: "「{}ã€ã‚’インストールã—ã¾ã—ãŸ" create-a-theme: "テーマã®ä½œæˆ" save-created-theme: "テーマをä¿å˜" primary-color: "プライマリ カラー" @@ -306,6 +307,8 @@ common/views/components/theme.vue: saved: "ä¿å˜ã—ã¾ã—ãŸ" installed-themes: "インストールã•ã‚ŒãŸãƒ†ãƒ¼ãƒž" select-theme: "テーマをé¸æŠžã—ã¦ãã ã•ã„" + uninstall: "アンインストール" + uninstalled: "「{}ã€ã‚’アンインストールã—ã¾ã—ãŸ" common/views/components/cw-button.vue: hide: "éš ã™" diff --git a/src/client/app/common/views/components/theme.vue b/src/client/app/common/views/components/theme.vue index 27888d1e8598cf1830f1f21a898c2413c3891323..56b07da498defd66cc88fccdc8f2719e4c726f76 100644 --- a/src/client/app/common/views/components/theme.vue +++ b/src/client/app/common/views/components/theme.vue @@ -58,13 +58,13 @@ <ui-textarea readonly :value="selectedInstalledThemeCode"> <span>%i18n:@theme-code%</span> </ui-textarea> + <ui-button @click="uninstall()">%i18n:@uninstall%</ui-button> </details> </div> </template> <script lang="ts"> import Vue from 'vue'; -import { apiUrl, docsUrl } from '../../../config'; import { lightTheme, darkTheme, builtinThemes, applyTheme } from '../../../theme'; import { Chrome } from 'vue-color'; import * as uuid from 'uuid'; @@ -151,6 +151,16 @@ export default Vue.extend({ this.$store.commit('device/set', { key: 'themes', value: themes }); + alert('%i18n:@installed%'.replace('{}', theme.meta.name)); + }, + + uninstall() { + const theme = this.installedThemes.find(x => x.meta.id == this.selectedInstalledTheme); + const themes = this.$store.state.device.themes.filter(t => t.meta.id != theme.meta.id); + this.$store.commit('device/set', { + key: 'themes', value: themes + }); + alert('%i18n:@uninstalled%'.replace('{}', theme.meta.name)); }, preview() {