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 { |
|||
constructor() { |
@ -1,4 +1,4 @@ |
|||
import type { AllKeys } from "./common" |
|||
import type { AllKeys } from "../common" |
|||
|
|||
const curProgress = ref(0) |
|||
api.on<AllKeys>("progress", () => { |
@ -1,10 +1,8 @@ |
|||
import { broadcast } from "main/utils" |
|||
import { AllKeys } from "./common" |
|||
import { AllKeys } from "../common" |
|||
|
|||
function emitProgress(...argu) { |
|||
broadcast<AllKeys>("progress", ...argu) |
|||
} |
|||
|
|||
export { |
|||
emitProgress |
|||
} |
|||
export { emitProgress } |
|||
|
@ -1,5 +1,5 @@ |
|||
import { PlatForm } from "@/platform/PlatForm" |
|||
import { Tabs } from "@/platform/Tabs" |
|||
import { PlatForm } from "./event/PlatForm" |
|||
import { Tabs } from "./event/Tabs" |
|||
|
|||
export function usePlatForm() { |
|||
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", |
|||
"include": ["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"], |
|||
"compilerOptions": { |
|||
"composite": true, |
|||
"emitDecoratorMetadata": true, |
|||
"experimentalDecorators": true, |
|||
"types": ["electron-vite/node", "reflect-metadata",], |
|||
"baseUrl": ".", |
|||
"paths": { |
|||
"#": ["src/types/index"], |
|||
"#/*": ["src/types/*"], |
|||
"config": ["config/index.ts"], |
|||
"config/*": ["config/*"], |
|||
"main/*": ["src/main/*"], |
|||
"common/*": ["src/common/*"], |
|||
"@res/*": ["resources/*"], |
|||
"locales/*": ["packages/locales/*"], |
|||
"extends": "@electron-toolkit/tsconfig/tsconfig.node.json", |
|||
"include": [ |
|||
"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": { |
|||
"composite": true, |
|||
"emitDecoratorMetadata": true, |
|||
"experimentalDecorators": true, |
|||
"types": [ |
|||
"electron-vite/node", |
|||
"reflect-metadata", |
|||
], |
|||
"baseUrl": ".", |
|||
"paths": { |
|||
"#": [ |
|||
"src/types/index" |
|||
], |
|||
"#/*": [ |
|||
"src/types/*" |
|||
], |
|||
"config": [ |
|||
"config/index.ts" |
|||
], |
|||
"config/*": [ |
|||
"config/*" |
|||
], |
|||
"main/*": [ |
|||
"src/main/*" |
|||
], |
|||
"common/*": [ |
|||
"src/common/*" |
|||
], |
|||
"@res/*": [ |
|||
"resources/*" |
|||
], |
|||
"locales/*": [ |
|||
"packages/locales/*" |
|||
], |
|||
} |
|||
} |
|||
} |
|||
} |
|||
|
@ -1,39 +1,56 @@ |
|||
{ |
|||
"extends": "@electron-toolkit/tsconfig/tsconfig.web.json", |
|||
"include": [ |
|||
"src/renderer/auto-imports.d.ts", |
|||
"src/renderer/components.d.ts", |
|||
"src/renderer/src/env.d.ts", |
|||
"src/renderer/src/**/*", |
|||
"src/renderer/src/**/*.vue", |
|||
"src/preload/*.d.ts", |
|||
"src/types/**/*", |
|||
"config/**/*", |
|||
"./typed-router.d.ts", |
|||
"src/common/**/*.renderer.ts", |
|||
"src/common/**/renderer.ts", |
|||
"src/common/**/*.common.ts", "src/common/**/common.ts", |
|||
], |
|||
"vueCompilerOptions": { |
|||
"plugins": ["unplugin-vue-macros/volar"], |
|||
}, |
|||
"compilerOptions": { |
|||
"composite": true, |
|||
"baseUrl": ".", |
|||
"moduleResolution": "Bundler", |
|||
"types": ["unplugin-vue-macros/macros-global", "vite-plugin-vue-layouts/client"], |
|||
"paths": { |
|||
"#": ["src/types/index"], |
|||
"#/*": ["src/types/*"], |
|||
"config": ["config/index.ts"], |
|||
"config/*": ["config/*"], |
|||
"common/*": ["src/common/*"], |
|||
"@/*": [ |
|||
"src/renderer/src/*" |
|||
], |
|||
"@res/*": [ |
|||
"resources/*" |
|||
], |
|||
"extends": "@electron-toolkit/tsconfig/tsconfig.web.json", |
|||
"include": [ |
|||
"src/renderer/auto-imports.d.ts", |
|||
"src/renderer/components.d.ts", |
|||
"src/renderer/src/env.d.ts", |
|||
"src/renderer/src/**/*", |
|||
"src/renderer/src/**/*.vue", |
|||
"src/preload/*.d.ts", |
|||
"src/types/**/*", |
|||
"config/**/*", |
|||
"./typed-router.d.ts", |
|||
"src/common/**/*" |
|||
], |
|||
"exclude": [ |
|||
"src/common/**/*.main.ts", |
|||
"src/common/**/main.ts" |
|||
], |
|||
"vueCompilerOptions": { |
|||
"plugins": [ |
|||
"unplugin-vue-macros/volar" |
|||
], |
|||
}, |
|||
"compilerOptions": { |
|||
"composite": true, |
|||
"baseUrl": ".", |
|||
"moduleResolution": "Bundler", |
|||
"types": [ |
|||
"unplugin-vue-macros/macros-global", |
|||
"vite-plugin-vue-layouts/client" |
|||
], |
|||
"paths": { |
|||
"#": [ |
|||
"src/types/index" |
|||
], |
|||
"#/*": [ |
|||
"src/types/*" |
|||
], |
|||
"config": [ |
|||
"config/index.ts" |
|||
], |
|||
"config/*": [ |
|||
"config/*" |
|||
], |
|||
"common/*": [ |
|||
"src/common/*" |
|||
], |
|||
"@/*": [ |
|||
"src/renderer/src/*" |
|||
], |
|||
"@res/*": [ |
|||
"resources/*" |
|||
], |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} |
Loading…
Reference in new issue