Skip to content

Commit c77689e

Browse files
committed
fix: disable trash for nginx-log, sites list, streams list
1 parent ff65350 commit c77689e

File tree

5 files changed

+18
-13
lines changed

5 files changed

+18
-13
lines changed

app/src/App.vue

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,9 @@ import zh_CN from 'ant-design-vue/es/locale/zh_CN'
55
import zh_TW from 'ant-design-vue/es/locale/zh_TW'
66
import loadTranslations from '@/api/translations'
77
import gettext from '@/gettext'
8-
import { useSettingsStore, useUserStore } from '@/pinia'
8+
import { useSettingsStore } from '@/pinia'
99
1010
const route = useRoute()
11-
const router = useRouter()
1211
1312
const media = window.matchMedia('(prefers-color-scheme: dark)')
1413
@@ -47,20 +46,9 @@ const lang = computed(() => {
4746
})
4847
4948
const settings = useSettingsStore()
50-
const user = useUserStore()
5149
const is_theme_dark = computed(() => settings.theme === 'dark')
5250
5351
loadTranslations(route)
54-
55-
if (user.isLogin) {
56-
watch(route, () => {
57-
settings.route_path = route.path
58-
})
59-
60-
onMounted(() => {
61-
router.push(settings.route_path)
62-
})
63-
}
6452
</script>
6553

6654
<template>

app/src/layouts/BaseLayout.vue

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ import FooterLayout from './FooterLayout.vue'
88
import HeaderLayout from './HeaderLayout.vue'
99
import SideBar from './SideBar.vue'
1010
11+
const route = useRoute()
12+
const router = useRouter()
13+
1114
const drawerVisible = ref(false)
1215
const collapsed = ref(false)
1316
const hideLayoutSidebar = ref(false)
@@ -47,6 +50,17 @@ provide('breadList', breadList)
4750
4851
const userStore = useUserStore()
4952
const { token } = storeToRefs(userStore)
53+
54+
const settingsStore = useSettingsStore()
55+
const { route_path } = storeToRefs(settingsStore)
56+
57+
watch(route, () => {
58+
route_path.value = route.path
59+
})
60+
61+
onMounted(() => {
62+
router.push(route_path.value)
63+
})
5064
</script>
5165

5266
<template>

app/src/views/nginx_log/NginxLogList.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ function viewLog(record: { type: string, path: string }) {
7575
disable-add
7676
disable-export
7777
disable-delete
78+
disable-trash
7879
disable-view
7980
disable-edit
8081
>

app/src/views/site/site_list/SiteList.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ function handle_click_duplicate(name: string) {
7272
}"
7373
disable-add
7474
disable-delete
75+
disable-trash
7576
disable-view
7677
disable-export
7778
row-selection-type="checkbox"

app/src/views/stream/StreamList.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ function handleAddStream() {
8686
}"
8787
disable-add
8888
disable-delete
89+
disable-trash
8990
disable-view
9091
disable-export
9192
row-selection-type="checkbox"

0 commit comments

Comments
 (0)