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.*", |
||||
"compilerOptions": { |
"src/main/**/*", |
||||
"composite": true, |
"src/preload/**/*", |
||||
"emitDecoratorMetadata": true, |
"config/**/*", |
||||
"experimentalDecorators": true, |
"src/types/**/*", |
||||
"types": ["electron-vite/node", "reflect-metadata",], |
"packages/locales/main.ts", |
||||
"baseUrl": ".", |
"src/common/**/*.main.ts", |
||||
"paths": { |
"src/common/**/main.ts", |
||||
"#": ["src/types/index"], |
"src/common/**/*.common.ts", |
||||
"#/*": ["src/types/*"], |
"src/common/**/common.ts" |
||||
"config": ["config/index.ts"], |
, "src/common/event/_Base.ts" ], |
||||
"config/*": ["config/*"], |
"compilerOptions": { |
||||
"main/*": ["src/main/*"], |
"composite": true, |
||||
"common/*": ["src/common/*"], |
"emitDecoratorMetadata": true, |
||||
"@res/*": ["resources/*"], |
"experimentalDecorators": true, |
||||
"locales/*": ["packages/locales/*"], |
"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", |
"extends": "@electron-toolkit/tsconfig/tsconfig.web.json", |
||||
"include": [ |
"include": [ |
||||
"src/renderer/auto-imports.d.ts", |
"src/renderer/auto-imports.d.ts", |
||||
"src/renderer/components.d.ts", |
"src/renderer/components.d.ts", |
||||
"src/renderer/src/env.d.ts", |
"src/renderer/src/env.d.ts", |
||||
"src/renderer/src/**/*", |
"src/renderer/src/**/*", |
||||
"src/renderer/src/**/*.vue", |
"src/renderer/src/**/*.vue", |
||||
"src/preload/*.d.ts", |
"src/preload/*.d.ts", |
||||
"src/types/**/*", |
"src/types/**/*", |
||||
"config/**/*", |
"config/**/*", |
||||
"./typed-router.d.ts", |
"./typed-router.d.ts", |
||||
"src/common/**/*.renderer.ts", |
"src/common/**/*" |
||||
"src/common/**/renderer.ts", |
], |
||||
"src/common/**/*.common.ts", "src/common/**/common.ts", |
"exclude": [ |
||||
], |
"src/common/**/*.main.ts", |
||||
"vueCompilerOptions": { |
"src/common/**/main.ts" |
||||
"plugins": ["unplugin-vue-macros/volar"], |
], |
||||
}, |
"vueCompilerOptions": { |
||||
"compilerOptions": { |
"plugins": [ |
||||
"composite": true, |
"unplugin-vue-macros/volar" |
||||
"baseUrl": ".", |
], |
||||
"moduleResolution": "Bundler", |
}, |
||||
"types": ["unplugin-vue-macros/macros-global", "vite-plugin-vue-layouts/client"], |
"compilerOptions": { |
||||
"paths": { |
"composite": true, |
||||
"#": ["src/types/index"], |
"baseUrl": ".", |
||||
"#/*": ["src/types/*"], |
"moduleResolution": "Bundler", |
||||
"config": ["config/index.ts"], |
"types": [ |
||||
"config/*": ["config/*"], |
"unplugin-vue-macros/macros-global", |
||||
"common/*": ["src/common/*"], |
"vite-plugin-vue-layouts/client" |
||||
"@/*": [ |
], |
||||
"src/renderer/src/*" |
"paths": { |
||||
], |
"#": [ |
||||
"@res/*": [ |
"src/types/index" |
||||
"resources/*" |
], |
||||
], |
"#/*": [ |
||||
|
"src/types/*" |
||||
|
], |
||||
|
"config": [ |
||||
|
"config/index.ts" |
||||
|
], |
||||
|
"config/*": [ |
||||
|
"config/*" |
||||
|
], |
||||
|
"common/*": [ |
||||
|
"src/common/*" |
||||
|
], |
||||
|
"@/*": [ |
||||
|
"src/renderer/src/*" |
||||
|
], |
||||
|
"@res/*": [ |
||||
|
"resources/*" |
||||
|
], |
||||
|
} |
||||
} |
} |
||||
} |
} |
||||
} |
|
Loading…
Reference in new issue