mirror of
https://github.com/misode/misode.github.io.git
synced 2026-04-26 00:16:51 +00:00
Support exporting YAML + minified
This commit is contained in:
@@ -6,6 +6,7 @@ export namespace Store {
|
||||
export const ID_THEME = 'theme'
|
||||
export const ID_VERSION = 'schema_version'
|
||||
export const ID_INDENT = 'indentation'
|
||||
export const ID_FORMAT = 'output_format'
|
||||
export const ID_SOUNDS_VERSION = 'minecraft_sounds_version'
|
||||
|
||||
export function getLanguage() {
|
||||
@@ -28,6 +29,10 @@ export namespace Store {
|
||||
return localStorage.getItem(ID_INDENT) ?? '2_spaces'
|
||||
}
|
||||
|
||||
export function getFormat() {
|
||||
return localStorage.getItem(ID_FORMAT) ?? 'json'
|
||||
}
|
||||
|
||||
export function getSoundsVersion() {
|
||||
return localStorage.getItem(ID_SOUNDS_VERSION) ?? 'latest'
|
||||
}
|
||||
@@ -48,6 +53,10 @@ export namespace Store {
|
||||
if (indent) localStorage.setItem(ID_INDENT, indent)
|
||||
}
|
||||
|
||||
export function setFormat(format: string | undefined) {
|
||||
if (format) localStorage.setItem(ID_FORMAT, format)
|
||||
}
|
||||
|
||||
export function setSoundsVersion(version: string | undefined) {
|
||||
if (version) localStorage.setItem(ID_SOUNDS_VERSION, version)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user