@@ -109,6 +110,9 @@ import gameVersions from '../data/gameVersions.json';
// Util
import { translate } from '../i18n/localeHelper';
+// Code Configs
+import {getConfig as qftGetConfig} from './codes/qft/codegen';
+
export default {
data() {
return {
@@ -122,6 +126,12 @@ export default {
stageLoaderCodes: [],
showStageLoaderHelp: false,
generation: 0,
+ codeConfigs: {},
+ };
+ },
+ created() {
+ this.codeConfigs = {
+ qft: qftGetConfig(),
};
},
methods: {
@@ -192,6 +202,10 @@ export default {
this.showStageLoaderHelp = false;
this.inspectingCode = code;
},
+
+ onCodeConfigChanged(e) {
+ this.codeConfigs = {...this.codeConfigs, ...e};
+ },
},
};
diff --git a/site/.vuepress/components/Preview.vue b/site/.vuepress/components/Preview.vue
new file mode 100644
index 0000000..1f90874
--- /dev/null
+++ b/site/.vuepress/components/Preview.vue
@@ -0,0 +1,66 @@
+
+
+
+
+
+
+
diff --git a/site/.vuepress/components/PreviewString.vue b/site/.vuepress/components/PreviewString.vue
new file mode 100644
index 0000000..ba07369
--- /dev/null
+++ b/site/.vuepress/components/PreviewString.vue
@@ -0,0 +1,97 @@
+
+
+
+
+
+
+
diff --git a/site/.vuepress/components/codes/qft/codegen.js b/site/.vuepress/components/codes/qft/codegen.js
index 62c35d6..fd8e01d 100644
--- a/site/.vuepress/components/codes/qft/codegen.js
+++ b/site/.vuepress/components/codes/qft/codegen.js
@@ -26,7 +26,8 @@ export const defaultConfig = {
};
export function getConfig() {
- const config = parseJSON(localStorage.getItem(lskey)) ?? {};
+ const config =
+ (typeof localStorage !== 'undefined' && parseJSON(localStorage.getItem(lskey))) || {};
return {
...defaultConfig,
...config,
diff --git a/site/.vuepress/components/codes/qft/config.vue b/site/.vuepress/components/codes/qft/config.vue
index 5d0549f..88577a0 100644
--- a/site/.vuepress/components/codes/qft/config.vue
+++ b/site/.vuepress/components/codes/qft/config.vue
@@ -22,21 +22,7 @@
{{l.alpha}}/255={{(bgA/2.55).toFixed(1)}}%