- added NcModal.vue, NcActions.vue, NcButton.vue, FirstrunWizard.vue, Card.vue, Page0.vue, Page1.vue, Page2.vue, Page3.vue and some icons
Some checks failed
CI Pipeline / japa-tests (push) Failing after 51s
Some checks failed
CI Pipeline / japa-tests (push) Failing after 51s
- added lime color inside tailwind.config.js - added some utilities scripts needed for components - npm updates - changed postcss.config.js for nesting css styles - added about function to NavBar.vue
This commit is contained in:
parent
cefd9081ae
commit
87e9314b00
25 changed files with 3475 additions and 401 deletions
16
resources/js/utils/initialState.ts
Normal file
16
resources/js/utils/initialState.ts
Normal file
|
@ -0,0 +1,16 @@
|
|||
export function loadState<T>(app: string, key: string, fallback?: T): T {
|
||||
const elem = <HTMLInputElement>document.querySelector(`#initial-state-${app}-${key}`);
|
||||
if (elem === null) {
|
||||
if (fallback !== undefined) {
|
||||
return fallback;
|
||||
}
|
||||
throw new Error(`Could not find initial state ${key} of ${app}`);
|
||||
}
|
||||
|
||||
try {
|
||||
const value = atob(elem.value);
|
||||
return JSON.parse(value);
|
||||
} catch (e) {
|
||||
throw new Error(`Could not parse initial state ${key} of ${app}`);
|
||||
}
|
||||
}
|
Loading…
Add table
editor.link_modal.header
Reference in a new issue