mirror of
https://github.com/zen-browser/surfer.git
synced 2025-07-09 01:35:34 +02:00
✨ Add method for specifying the branding type
This commit is contained in:
parent
f5bf98d03a
commit
3d3eb547f7
7 changed files with 75 additions and 9 deletions
21
src/commands/set.ts
Normal file
21
src/commands/set.ts
Normal file
|
@ -0,0 +1,21 @@
|
|||
import { log } from '../log'
|
||||
import { dynamicConfig } from '../utils'
|
||||
|
||||
export const set = (key: string, value?: string) => {
|
||||
if (key in dynamicConfig.defaultValues) {
|
||||
log.warning(`The key ${key} is not found within the dynamic config options`)
|
||||
return
|
||||
}
|
||||
|
||||
if (value) {
|
||||
dynamicConfig.set(key as dynamicConfig.DefaultValuesKeys, value)
|
||||
log.info(`Set ${key} to ${value}`)
|
||||
return
|
||||
}
|
||||
|
||||
log.info(
|
||||
`The key '${key}' has ${dynamicConfig.get(
|
||||
key as dynamicConfig.DefaultValuesKeys
|
||||
)}`
|
||||
)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue