-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
29 changed files
with
1,072 additions
and
1,120 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import tseslint from 'typescript-eslint'; | ||
import config from '@axonivy/eslint-config'; | ||
|
||
export default tseslint.config( | ||
...config.base, | ||
// TypeScript recommended configs | ||
{ | ||
name: 'typescript-eslint', | ||
languageOptions: { | ||
parserOptions: { | ||
project: true, // Uses tsconfig.json from current directory | ||
tsconfigRootDir: import.meta.dirname | ||
} | ||
} | ||
} | ||
); |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,61 +1,59 @@ | ||
export namespace URLParams { | ||
export function parameter(key: string): string | undefined { | ||
const param = new URLSearchParams(window.location.search).get(key); | ||
return param !== null ? decodeURIComponent(param) : undefined; | ||
} | ||
export function parameter(key: string): string | undefined { | ||
const param = new URLSearchParams(window.location.search).get(key); | ||
return param !== null ? decodeURIComponent(param) : undefined; | ||
} | ||
|
||
export function app(): string { | ||
return parameter('app') ?? ''; | ||
} | ||
export function appParam(): string { | ||
return parameter('app') ?? ''; | ||
} | ||
|
||
export function pmv(): string { | ||
return parameter('pmv') ?? ''; | ||
} | ||
export function pmvParam(): string { | ||
return parameter('pmv') ?? ''; | ||
} | ||
|
||
export function file(): string { | ||
return parameter('file') ?? ''; | ||
} | ||
export function fileParam(): string { | ||
return parameter('file') ?? ''; | ||
} | ||
|
||
export function directSave(): boolean { | ||
return parameter('directSave') !== undefined; | ||
export function directSaveParam(): boolean { | ||
return parameter('directSave') !== undefined; | ||
} | ||
|
||
export function themeParam(): 'dark' | 'light' { | ||
const theme = parameter('theme'); | ||
if (theme === 'dark') { | ||
return theme; | ||
} | ||
return 'light'; | ||
} | ||
|
||
export function theme(): 'dark' | 'light' { | ||
const theme = parameter('theme'); | ||
if (theme === 'dark') { | ||
return theme; | ||
} | ||
return 'light'; | ||
export function readonlyParam(): boolean { | ||
const readonly = parameter('readonly'); | ||
if (readonly === 'true') { | ||
return true; | ||
} | ||
return false; | ||
} | ||
|
||
export function webSocketBaseParam(): string { | ||
return `${isSecureConnection() ? 'wss' : 'ws'}://${server()}`; | ||
} | ||
|
||
export function readonly(): boolean { | ||
const readonly = parameter('readonly'); | ||
if (readonly === 'true') { | ||
return true; | ||
} | ||
const isSecureConnection = () => { | ||
const secureParam = parameter('secure'); | ||
if (secureParam === 'true') { | ||
return true; | ||
} | ||
if (secureParam === 'false') { | ||
return false; | ||
} | ||
return window.location.protocol === 'https:'; | ||
}; | ||
|
||
export function webSocketBase(): string { | ||
return `${isSecureConnection() ? 'wss' : 'ws'}://${server()}`; | ||
} | ||
const server = () => { | ||
return parameter('server') ?? basePath(); | ||
}; | ||
|
||
const isSecureConnection = () => { | ||
const secureParam = parameter('secure'); | ||
if (secureParam === 'true') { | ||
return true; | ||
} | ||
if (secureParam === 'false') { | ||
return false; | ||
} | ||
return window.location.protocol === 'https:'; | ||
}; | ||
|
||
const server = () => { | ||
return parameter('server') ?? basePath(); | ||
}; | ||
|
||
const basePath = () => { | ||
return 'localhost:8081'; | ||
}; | ||
} | ||
const basePath = () => { | ||
return 'localhost:8081'; | ||
}; |
Oops, something went wrong.