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)`
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
"use client"
|
||||
import { getName } from "@tauri-apps/api/app"
|
||||
import { getCurrentWindow } from "@tauri-apps/api/window"
|
||||
import { usePathname } from "next/navigation"
|
||||
import { useEffect } from "react"
|
||||
import { getProjectAdminList } from "./api/project"
|
||||
import { getUserAll, getUserGroupTree } from "./api/user"
|
||||
import {
|
||||
useAllTaskStore,
|
||||
useAllUserStore,
|
||||
usePermissionStore,
|
||||
} from "./store/auth"
|
||||
import { getUserAll, getUserGroupTree } from "./api/user"
|
||||
import { usePathname } from "next/navigation"
|
||||
import { getProjectAdminList } from "./api/project"
|
||||
|
||||
export function OptStore() {
|
||||
const detectEnvironment = async () => {
|
||||
@@ -17,8 +17,8 @@ export function OptStore() {
|
||||
const result = await getName()
|
||||
console.log("Running in Tauri environment", result)
|
||||
return true
|
||||
} catch (error) {
|
||||
console.log("Not running in Tauri environment", error)
|
||||
} catch {
|
||||
console.log("Not running in Tauri environment")
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
@@ -76,7 +76,7 @@ export namespace Task {
|
||||
page_number: number
|
||||
page_size: number
|
||||
project_id?: number[]
|
||||
rejected?: boolean
|
||||
rejected?: number
|
||||
review_user1?: number[]
|
||||
review_user2?: number[]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user