-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: allow for selecting different model-check baseline bundle in lo…
- Loading branch information
1 parent
a1988e2
commit 6425eb8
Showing
28 changed files
with
506 additions
and
56 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
baselines | ||
sde-prep |
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,3 +1,4 @@ | ||
baselines | ||
sde-prep | ||
*.vdf | ||
*.vdfx | ||
|
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 +1,2 @@ | ||
baselines | ||
sde-prep |
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 |
---|---|---|
@@ -0,0 +1,36 @@ | ||
// Copyright (c) 2022 Climate Interactive / New Venture Fund | ||
|
||
import type { Writable } from 'svelte/store' | ||
import { writable } from 'svelte/store' | ||
|
||
/** | ||
* Return a Svelte writable store that is backed by local storage. | ||
*/ | ||
export function localStorageWritableBoolean(key: string, defaultValue: boolean): Writable<boolean> { | ||
const initialStringValue = localStorage.getItem(key) | ||
let initialValue: boolean | ||
if (initialStringValue !== undefined) { | ||
initialValue = initialStringValue === '1' | ||
} else { | ||
initialValue = defaultValue | ||
} | ||
|
||
let currentValue = initialValue | ||
const { subscribe, set } = writable(initialValue) | ||
|
||
const _set = (newValue: boolean) => { | ||
currentValue = newValue | ||
localStorage.setItem(key, newValue ? '1' : '0') | ||
set(newValue) | ||
} | ||
|
||
const _update = (updater: (value: boolean) => boolean) => { | ||
_set(updater(currentValue)) | ||
} | ||
|
||
return { | ||
subscribe, | ||
set: _set, | ||
update: _update | ||
} | ||
} |
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
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,13 @@ | ||
//- Copyright (c) 2021-2022 Climate Interactive / New Venture Fund | ||
//- Note: These mixins are kept in an external pug file to work around a | ||
//- Svelte issue related to `each` and TypeScript, see: | ||
//- https://github.com/sveltejs/svelte-preprocess/issues/207 | ||
mixin optionsL | ||
+each(`$bundleNamesL as name`) | ||
option(selected!='{name === viewModel.nameL}') { name } | ||
|
||
mixin optionsR | ||
+each(`$bundleNamesR as name`) | ||
option(selected!='{name === viewModel.nameR}') { name } |
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
Oops, something went wrong.