fix: 补齐审查清单里还没落地的交互和代理复测
This commit is contained in:
+14
-3
@@ -1,6 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import { onMounted, onUnmounted, ref } from "vue";
|
||||
import { NButton, NDropdown, NIcon, NLayout, NLayoutSider, NMenu, NTooltip } from "naive-ui";
|
||||
import { NButton, NDropdown, NIcon, NLayout, NLayoutSider, NMenu, NTooltip, useDialog } from "naive-ui";
|
||||
import { LogOutOutline, MoonOutline, PersonOutline, SunnyOutline } from "@vicons/ionicons5";
|
||||
import { isDark, toggleTheme } from "../shared/theme";
|
||||
import { navOptions, type PageKey } from "./navigation";
|
||||
@@ -11,6 +11,7 @@ import TrainingsView from "../features/trainings/TrainingsView.vue";
|
||||
|
||||
const props = defineProps<{ employeeId: string }>();
|
||||
const emit = defineEmits<{ logout: []; revoke: [] }>();
|
||||
const dialog = useDialog();
|
||||
const page = ref<PageKey>(pageFromHash());
|
||||
const collapsed = ref(window.innerWidth < 800);
|
||||
const holdOpen = ref(false);
|
||||
@@ -82,8 +83,18 @@ function onMenu(key: string) {
|
||||
}
|
||||
|
||||
function onLogout(key: string) {
|
||||
if (key === "revoke") emit("revoke");
|
||||
else emit("logout");
|
||||
if (key !== "revoke") {
|
||||
emit("logout");
|
||||
return;
|
||||
}
|
||||
dialog.warning({
|
||||
title: "注销当前账号",
|
||||
content: "注销后所有设备都会退出,正在进行的学习会停止,已保存的密码和登录凭证也会清除。",
|
||||
positiveText: "注销",
|
||||
negativeText: "取消",
|
||||
positiveButtonProps: { type: "error" },
|
||||
onPositiveClick: () => emit("revoke"),
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user