feat(settings): replicate the WorkBuddy general settings panel (TODO 10)
This commit is contained in:
1 parent
401926d7eb
commit
7b68d9eb25
21 files changed
+1150
-11
No files matched your search
@@ -138,7 +138,12 @@ async function buildBundle(tempRoot: string, state: TestState, name: string): Pr
|
||||
const state = globalThis[${stateKey}];
|
||||
export const app = {
|
||||
getPath: (name) => name === 'userData' ? state.userData : name === 'home' ? state.home : state.userData,
|
||||
getName: () => 'YCode', getVersion: () => '0.1.0'
|
||||
getName: () => 'YCode', getVersion: () => '0.1.0',
|
||||
isPackaged: false,
|
||||
isReady: () => true,
|
||||
getAppPath: () => state.userData,
|
||||
getLoginItemSettings: () => ({ openAtLogin: false }),
|
||||
setLoginItemSettings: () => {}
|
||||
};
|
||||
export const safeStorage = {
|
||||
isEncryptionAvailable: () => false,
|
||||
@@ -150,7 +155,12 @@ async function buildBundle(tempRoot: string, state: TestState, name: string): Pr
|
||||
showOpenDialog: async (...args) => ({ canceled: false, filePaths: state.dialogPaths.splice(0) }),
|
||||
showSaveDialog: async () => ({ canceled: true, filePath: undefined })
|
||||
};
|
||||
export const shell = { openPath: async () => '' };
|
||||
export const shell = { openPath: async () => '', openExternal: async () => {} };
|
||||
export const powerSaveBlocker = {
|
||||
start: () => { state.powerBlockers = (state.powerBlockers ?? 0) + 1; return state.powerBlockers; },
|
||||
stop: () => true,
|
||||
isStarted: () => (state.powerBlockers ?? 0) > 0
|
||||
};
|
||||
export class BrowserWindow {}
|
||||
export class WebContentsView {}
|
||||
`
|
||||
|
||||
Reference in new issue
Block a user