summaryrefslogtreecommitdiff
path: root/src/client
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2018-09-30 23:03:21 +0900
committersyuilo <syuilotan@yahoo.co.jp>2018-09-30 23:03:21 +0900
commitff76c815b15a4bb3ceda0ef3cf6d5adb73f535e2 (patch)
tree224b04c374a28857600f2fec6905e32533bafa96 /src/client
parentUpdate post-form.vue (#2790) (diff)
downloadsharkey-ff76c815b15a4bb3ceda0ef3cf6d5adb73f535e2.tar.gz
sharkey-ff76c815b15a4bb3ceda0ef3cf6d5adb73f535e2.tar.bz2
sharkey-ff76c815b15a4bb3ceda0ef3cf6d5adb73f535e2.zip
テーマインストール時の動作をわかりやすくしたりテーマをアンインストールできるようにしたり
Diffstat (limited to 'src/client')
-rw-r--r--src/client/app/common/views/components/theme.vue12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/client/app/common/views/components/theme.vue b/src/client/app/common/views/components/theme.vue
index 27888d1e85..56b07da498 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() {