fix(project): detail all task list fix
This commit is contained in:
@@ -12,8 +12,6 @@ import ScaleComponent from "./components/ScaleComponent"
|
||||
|
||||
import { Box, Flex, LoadingOverlay, Stack } from "@mantine/core"
|
||||
import { showNotification } from "@mantine/notifications"
|
||||
import { getName } from "@tauri-apps/api/app"
|
||||
import { getCurrentWindow } from "@tauri-apps/api/window"
|
||||
import { getLabelResult } from "./api/label"
|
||||
import { Comment, WorkLoad } from "./api/label/typing"
|
||||
import { getProjectDetail } from "./api/project"
|
||||
@@ -1125,34 +1123,6 @@ const LabelPage = ({
|
||||
}
|
||||
}, [])
|
||||
|
||||
const detectEnvironment = async () => {
|
||||
try {
|
||||
const result = await getName()
|
||||
console.log("Running in Tauri environment", result)
|
||||
return true
|
||||
} catch {
|
||||
// console.log("Not running in Tauri environment", error);
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
// tauri://close-requested
|
||||
useEffect(() => {
|
||||
;(async () => {
|
||||
if (await detectEnvironment()) {
|
||||
const window = getCurrentWindow()
|
||||
const unlisten = await window.onCloseRequested(async (event) => {
|
||||
useTopToolsStore.getState().setNeedBackup(true)
|
||||
event.preventDefault()
|
||||
})
|
||||
|
||||
return () => {
|
||||
unlisten()
|
||||
}
|
||||
}
|
||||
})()
|
||||
}, [])
|
||||
|
||||
const mainBoxHeight = useMemo(() => {
|
||||
if (projectDetail?.label_type === 5 && metaOperation) {
|
||||
let h = `calc(100% - ${headerHeight}px - 198px)`
|
||||
|
||||
Reference in New Issue
Block a user