|
243 | 243 | <el-checkbox v-model="config.fullscreen" border size="medium">{{ |
244 | 244 | $t("configuration.other.fullscreen") |
245 | 245 | }}</el-checkbox> |
246 | | - <el-checkbox v-model="config.awake" border size="medium">{{ |
247 | | - $t("configuration.other.awake") |
248 | | - }}</el-checkbox> |
| 246 | + <el-tooltip |
| 247 | + class="item" |
| 248 | + effect="dark" |
| 249 | + :content="$t('configuration.other.awake.tooltip')" |
| 250 | + placement="top" |
| 251 | + > |
| 252 | + <el-checkbox v-model="config.awake" border size="medium">{{ |
| 253 | + $t("configuration.other.awake.content") |
| 254 | + }}</el-checkbox> |
| 255 | + </el-tooltip> |
249 | 256 | <el-checkbox v-model="config.touch" border size="medium">{{ |
250 | 257 | $t("configuration.other.touch") |
251 | 258 | }}</el-checkbox> |
|
270 | 277 | </el-tooltip> |
271 | 278 | </el-form-item> |
272 | 279 | <el-divider content-position="right"> |
273 | | - <el-button type="text" @click="changeLocale">中/English</el-button> |
| 280 | + <el-button type="text" @click="changeLocale">简/繁/English</el-button> |
274 | 281 | </el-divider> |
275 | 282 | <div style="margin:10px auto;text-align:center"> |
276 | 283 | <el-button type="primary" @click.native.prevent="save" plain v-waves>{{ |
@@ -350,6 +357,16 @@ export default { |
350 | 357 | ] |
351 | 358 | }; |
352 | 359 | }, |
| 360 | + watch: { |
| 361 | + "config.control"(newVal, oldVal) { |
| 362 | + if (this.config.awake && !newVal) { |
| 363 | + this.config.awake = false |
| 364 | + } |
| 365 | + }, |
| 366 | + "config.awake"(newVal, oldVal) { |
| 367 | + newVal && (this.config.control = true); |
| 368 | + } |
| 369 | + }, |
353 | 370 | created() { |
354 | 371 | if (this.$store.has("config")) { |
355 | 372 | this.config = this.$store.get("config"); |
@@ -409,7 +426,13 @@ export default { |
409 | 426 | this.$store.put("config", this.config); |
410 | 427 | }, |
411 | 428 | changeLocale() { |
412 | | - localStorage.setItem("lang", this.$i18n.locale === "zh" ? "en" : "zh"); |
| 429 | + let nextLang = "en"; |
| 430 | + if (this.$i18n.locale === "zhCN") { |
| 431 | + nextLang = "zhTW"; |
| 432 | + } else if (this.$i18n.locale === "en") { |
| 433 | + nextLang = "zhCN"; |
| 434 | + } |
| 435 | + localStorage.setItem("lang", nextLang); |
413 | 436 | window.tray.destroy(); |
414 | 437 | window.location.reload(); |
415 | 438 | } |
|
0 commit comments