21 changed files with 243 additions and 186 deletions
@ -0,0 +1,25 @@ |
|||||
|
import { _Base } from "common/lib/_Base" |
||||
|
|
||||
|
class PlatForm extends _Base { |
||||
|
constructor() { |
||||
|
super() |
||||
|
} |
||||
|
|
||||
|
async showAbout() { |
||||
|
return await fetch("api://fuck/BasicService/showAbout") |
||||
|
} |
||||
|
|
||||
|
async isFullScreen() { |
||||
|
return await api.call("BasicCommand.isFullscreen") |
||||
|
} |
||||
|
|
||||
|
async toggleFullScreen() { |
||||
|
return api.call("BasicCommand.fullscreen") |
||||
|
} |
||||
|
|
||||
|
async toggleDevTools() { |
||||
|
return api.call("BasicCommand.toggleDevTools") |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
export { PlatForm } |
@ -1,4 +1,4 @@ |
|||||
import { _Base } from "./_Base" |
import { _Base } from "../../lib/_Base" |
||||
|
|
||||
export class Tabs extends _Base { |
export class Tabs extends _Base { |
||||
constructor() { |
constructor() { |
@ -1,4 +1,4 @@ |
|||||
import type { AllKeys } from "./common" |
import type { AllKeys } from "../common" |
||||
|
|
||||
const curProgress = ref(0) |
const curProgress = ref(0) |
||||
api.on<AllKeys>("progress", () => { |
api.on<AllKeys>("progress", () => { |
@ -1,10 +1,8 @@ |
|||||
import { broadcast } from "main/utils" |
import { broadcast } from "main/utils" |
||||
import { AllKeys } from "./common" |
import { AllKeys } from "../common" |
||||
|
|
||||
function emitProgress(...argu) { |
function emitProgress(...argu) { |
||||
broadcast<AllKeys>("progress", ...argu) |
broadcast<AllKeys>("progress", ...argu) |
||||
} |
} |
||||
|
|
||||
export { |
export { emitProgress } |
||||
emitProgress |
|
||||
} |
|
||||
|
@ -1,5 +1,5 @@ |
|||||
import { PlatForm } from "@/platform/PlatForm" |
import { PlatForm } from "./event/PlatForm" |
||||
import { Tabs } from "@/platform/Tabs" |
import { Tabs } from "./event/Tabs" |
||||
|
|
||||
export function usePlatForm() { |
export function usePlatForm() { |
||||
return { |
return { |
@ -1,17 +0,0 @@ |
|||||
import { _Base } from "./_Base" |
|
||||
|
|
||||
class PlatForm extends _Base { |
|
||||
constructor() { |
|
||||
super() |
|
||||
} |
|
||||
|
|
||||
toggleFullScreen() { |
|
||||
return api.call("BasicCommand.fullscreen") |
|
||||
} |
|
||||
|
|
||||
toggleDevTools() { |
|
||||
return api.call("BasicCommand.toggleDevTools") |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
export { PlatForm } |
|
@ -1,22 +1,51 @@ |
|||||
{ |
{ |
||||
"extends": "@electron-toolkit/tsconfig/tsconfig.node.json", |
"extends": "@electron-toolkit/tsconfig/tsconfig.node.json", |
||||
"include": ["electron.vite.config.*", "src/main/**/*", "src/preload/**/*", "config/**/*", "src/types/**/*", "packages/locales/main.ts", |
"include": [ |
||||
"src/common/**/*.main.ts", "src/common/**/main.ts", "src/common/**/*.common.ts", "src/common/**/common.ts"], |
"electron.vite.config.*", |
||||
|
"src/main/**/*", |
||||
|
"src/preload/**/*", |
||||
|
"config/**/*", |
||||
|
"src/types/**/*", |
||||
|
"packages/locales/main.ts", |
||||
|
"src/common/**/*.main.ts", |
||||
|
"src/common/**/main.ts", |
||||
|
"src/common/**/*.common.ts", |
||||
|
"src/common/**/common.ts" |
||||
|
, "src/common/event/_Base.ts" ], |
||||
"compilerOptions": { |
"compilerOptions": { |
||||
"composite": true, |
"composite": true, |
||||
"emitDecoratorMetadata": true, |
"emitDecoratorMetadata": true, |
||||
"experimentalDecorators": true, |
"experimentalDecorators": true, |
||||
"types": ["electron-vite/node", "reflect-metadata",], |
"types": [ |
||||
|
"electron-vite/node", |
||||
|
"reflect-metadata", |
||||
|
], |
||||
"baseUrl": ".", |
"baseUrl": ".", |
||||
"paths": { |
"paths": { |
||||
"#": ["src/types/index"], |
"#": [ |
||||
"#/*": ["src/types/*"], |
"src/types/index" |
||||
"config": ["config/index.ts"], |
], |
||||
"config/*": ["config/*"], |
"#/*": [ |
||||
"main/*": ["src/main/*"], |
"src/types/*" |
||||
"common/*": ["src/common/*"], |
], |
||||
"@res/*": ["resources/*"], |
"config": [ |
||||
"locales/*": ["packages/locales/*"], |
"config/index.ts" |
||||
|
], |
||||
|
"config/*": [ |
||||
|
"config/*" |
||||
|
], |
||||
|
"main/*": [ |
||||
|
"src/main/*" |
||||
|
], |
||||
|
"common/*": [ |
||||
|
"src/common/*" |
||||
|
], |
||||
|
"@res/*": [ |
||||
|
"resources/*" |
||||
|
], |
||||
|
"locales/*": [ |
||||
|
"packages/locales/*" |
||||
|
], |
||||
} |
} |
||||
} |
} |
||||
} |
} |
||||
|
Loading…
Reference in new issue