refactor: remove duplicate shutdown button from settings
Keep only one shutdown button in header, remove duplicate from settings page Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -34,15 +34,6 @@ export class SettingRoute implements VanComponent {
|
|||||||
() => _that.loading.val ? '' : div({ class: 'vstack gap-4' },
|
() => _that.loading.val ? '' : div({ class: 'vstack gap-4' },
|
||||||
SaveFolderSetting(_that),
|
SaveFolderSetting(_that),
|
||||||
div({ class: 'hstack gap-3' },
|
div({ class: 'hstack gap-3' },
|
||||||
button({
|
|
||||||
class: 'btn btn-outline-secondary', onclick() {
|
|
||||||
if (!confirm('确定要关闭软件吗?')) return
|
|
||||||
fetch('/api/quit').then(res => res.json()).then(res => {
|
|
||||||
if (!res.success) alert(res.message)
|
|
||||||
else document.write(`<h2 style="text-align: center; padding: 30px 20px;">软件已关闭</h2>`)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}, '关闭软件'),
|
|
||||||
button({
|
button({
|
||||||
class: 'btn btn-outline-danger', onclick() {
|
class: 'btn btn-outline-danger', onclick() {
|
||||||
if (!confirm('确定要退出登录吗?')) return
|
if (!confirm('确定要退出登录吗?')) return
|
||||||
|
|||||||
Reference in New Issue
Block a user