mirror of
https://github.com/algerkong/AlgerMusicPlayer.git
synced 2026-04-23 23:57:22 +08:00
✨ feat: 添加设置页面 可配置代理开关
This commit is contained in:
@@ -175,6 +175,10 @@ const options = [
|
||||
{
|
||||
label: '退出登录',
|
||||
key: 'logout'
|
||||
},
|
||||
{
|
||||
label: '设置',
|
||||
key: 'set'
|
||||
}
|
||||
]
|
||||
|
||||
@@ -208,6 +212,9 @@ const selectItem = async (key: any) => {
|
||||
case 'login':
|
||||
router.push("/login")
|
||||
break;
|
||||
case 'set':
|
||||
router.push("/set")
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div id="title-bar" @mousedown="drag">
|
||||
<div id="title-bar" @mousedown="drag" v-if="isElectron">
|
||||
<div id="title">Alger Music</div>
|
||||
<div id="buttons">
|
||||
<button @click="minimize">
|
||||
@@ -19,13 +19,18 @@
|
||||
import { useDialog } from 'naive-ui'
|
||||
|
||||
const dialog = useDialog()
|
||||
const windowData = window as any
|
||||
|
||||
const isElectron = computed(() => {
|
||||
return !!windowData.electronAPI.minimize
|
||||
})
|
||||
|
||||
const minimize = () => {
|
||||
window.electronAPI.minimize()
|
||||
windowData.electronAPI.minimize()
|
||||
}
|
||||
|
||||
const maximize = () => {
|
||||
window.electronAPI.maximize()
|
||||
windowData.electronAPI.maximize()
|
||||
}
|
||||
|
||||
const close = () => {
|
||||
@@ -35,16 +40,16 @@ const close = () => {
|
||||
positiveText: '最小化',
|
||||
negativeText: '关闭',
|
||||
onPositiveClick: () => {
|
||||
window.electronAPI.miniTray()
|
||||
windowData.electronAPI.miniTray()
|
||||
},
|
||||
onNegativeClick: () => {
|
||||
window.electronAPI.close()
|
||||
windowData.electronAPI.close()
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
const drag = (event: HTMLElement) => {
|
||||
window.electronAPI.dragStart(event)
|
||||
const drag = (event: MouseEvent) => {
|
||||
windowData.electronAPI.dragStart(event)
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user