A fork of https://github.com/ueokande/vim-vixen
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
484 B
18 lines
484 B
import { JSONTextSettings, SettingSource } from '../../src/shared/SettingData'; |
|
import Settings from '../../src/shared/settings/Settings'; |
|
|
|
export default class SettingRepository { |
|
constructor( |
|
private readonly browser: any, |
|
) { |
|
} |
|
|
|
async saveJSON(settings: Settings): Promise<void> { |
|
await this.browser.storage.local.set({ |
|
settings: { |
|
source: SettingSource.JSON, |
|
json: JSONTextSettings.fromSettings(settings).toJSONText(), |
|
} |
|
}); |
|
} |
|
}
|
|
|