From 09ccca909a6bbfa357ef629ba995f681c2204df6 Mon Sep 17 00:00:00 2001
From: AkiraFukushima
Date: Fri, 26 Mar 2021 23:13:14 +0900
Subject: [PATCH] [clean] Remove relaunch codes
---
src/config/locales/en/translation.json | 7 -------
src/renderer/components/Preferences/Language.vue | 14 --------------
src/renderer/store/Preferences/General.ts | 3 ---
src/renderer/store/Preferences/Language.ts | 3 ---
4 files changed, 27 deletions(-)
diff --git a/src/config/locales/en/translation.json b/src/config/locales/en/translation.json
index 95ae69f6..0f69a0e8 100644
--- a/src/config/locales/en/translation.json
+++ b/src/config/locales/en/translation.json
@@ -229,13 +229,6 @@
},
"language": {
"title": "Language",
- "notice": "These settings will take effect after a relaunch",
- "confirm": {
- "title": "Confirm",
- "message": "You have to restart this application. Continue?",
- "ok": "Restart Now",
- "cancel": "Cancel"
- },
"language": {
"title": "Language",
"description": "Choose the language you would like to use with Whalebird."
diff --git a/src/renderer/components/Preferences/Language.vue b/src/renderer/components/Preferences/Language.vue
index 954b2a64..e08a82b0 100644
--- a/src/renderer/components/Preferences/Language.vue
+++ b/src/renderer/components/Preferences/Language.vue
@@ -7,7 +7,6 @@
- {{ $t('preferences.language.notice') }}
@@ -94,19 +93,6 @@ export default {
},
created() {
this.$store.dispatch('Preferences/Language/loadLanguage')
- },
- methods: {
- confirm() {
- this.$confirm(this.$t('preferences.language.confirm.message'), this.$t('preferences.language.confirm.title'), {
- confirmButtonText: this.$t('preferences.language.confirm.ok'),
- cancelButtonText: this.$t('preferences.language.confirm.cancel'),
- type: 'warning'
- })
- .then(() => {
- this.$store.dispatch('Preferences/Language/relaunch')
- })
- .catch(() => {})
- }
}
}
diff --git a/src/renderer/store/Preferences/General.ts b/src/renderer/store/Preferences/General.ts
index 6d16a12f..639b63a6 100644
--- a/src/renderer/store/Preferences/General.ts
+++ b/src/renderer/store/Preferences/General.ts
@@ -96,9 +96,6 @@ const actions: ActionTree = {
commit(MUTATION_TYPES.UPDATE_GENERAL, conf.general as General)
dispatch('App/loadPreferences', null, { root: true })
await win.ipcRenderer.invoke('change-auto-launch', newOther.launch)
- },
- relaunch: () => {
- win.ipcRenderer.send('relaunch')
}
}
diff --git a/src/renderer/store/Preferences/Language.ts b/src/renderer/store/Preferences/Language.ts
index 46cbc621..30ec8b3d 100644
--- a/src/renderer/store/Preferences/Language.ts
+++ b/src/renderer/store/Preferences/Language.ts
@@ -63,9 +63,6 @@ const actions: ActionTree = {
const langs: Array = await win.ipcRenderer.invoke('update-spellchecker-languages', languages)
commit(MUTATION_TYPES.UPDATE_SPELLCHECKER_LANGUAGES, langs)
return langs
- },
- relaunch: () => {
- win.ipcRenderer.send('relaunch')
}
}