|
@@ -1,5 +1,5 @@
|
|
|
<template>
|
|
<template>
|
|
|
- <div class="edit frame flex flex-col fixed-full">
|
|
|
|
|
|
|
+ <div class="edit frame flex flex-col abs-full">
|
|
|
<div class="edit-header flex mr-1c">
|
|
<div class="edit-header flex mr-1c">
|
|
|
<nav>
|
|
<nav>
|
|
|
<div
|
|
<div
|
|
@@ -26,43 +26,43 @@
|
|
|
<button v-text="i18n('buttonClose')" @click="close"/>
|
|
<button v-text="i18n('buttonClose')" @click="close"/>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
- <div class="frame-block flex-auto pos-rel">
|
|
|
|
|
- <vm-code
|
|
|
|
|
- class="abs-full"
|
|
|
|
|
- :value="code"
|
|
|
|
|
- :readOnly="readOnly"
|
|
|
|
|
- ref="code"
|
|
|
|
|
- v-show="nav === 'code'"
|
|
|
|
|
- :active="nav === 'code'"
|
|
|
|
|
- :commands="commands"
|
|
|
|
|
- @code-dirty="codeDirty = $event"
|
|
|
|
|
- />
|
|
|
|
|
- <vm-settings
|
|
|
|
|
- class="abs-full edit-body"
|
|
|
|
|
- v-show="nav === 'settings'"
|
|
|
|
|
- :readOnly="readOnly"
|
|
|
|
|
- :active="nav === 'settings'"
|
|
|
|
|
- :settings="settings"
|
|
|
|
|
- :value="script"
|
|
|
|
|
- />
|
|
|
|
|
- <vm-values
|
|
|
|
|
- class="abs-full edit-body"
|
|
|
|
|
- v-show="nav === 'values'"
|
|
|
|
|
- :readOnly="readOnly"
|
|
|
|
|
- :active="nav === 'values'"
|
|
|
|
|
- :script="script"
|
|
|
|
|
- />
|
|
|
|
|
- <vm-externals
|
|
|
|
|
- class="abs-full"
|
|
|
|
|
- v-if="nav === 'externals'"
|
|
|
|
|
- :value="script"
|
|
|
|
|
- />
|
|
|
|
|
- <vm-help
|
|
|
|
|
- class="abs-full edit-body"
|
|
|
|
|
- v-show="nav === 'help'"
|
|
|
|
|
- :hotkeys="hotkeys"
|
|
|
|
|
- />
|
|
|
|
|
- </div>
|
|
|
|
|
|
|
+
|
|
|
|
|
+ <vm-code
|
|
|
|
|
+ class="flex-auto"
|
|
|
|
|
+ :value="code"
|
|
|
|
|
+ :readOnly="readOnly"
|
|
|
|
|
+ ref="code"
|
|
|
|
|
+ v-show="nav === 'code'"
|
|
|
|
|
+ :active="nav === 'code'"
|
|
|
|
|
+ :commands="commands"
|
|
|
|
|
+ @code-dirty="codeDirty = $event"
|
|
|
|
|
+ />
|
|
|
|
|
+ <vm-settings
|
|
|
|
|
+ class="edit-body"
|
|
|
|
|
+ v-show="nav === 'settings'"
|
|
|
|
|
+ :readOnly="readOnly"
|
|
|
|
|
+ :active="nav === 'settings'"
|
|
|
|
|
+ :settings="settings"
|
|
|
|
|
+ :value="script"
|
|
|
|
|
+ />
|
|
|
|
|
+ <vm-values
|
|
|
|
|
+ class="edit-body"
|
|
|
|
|
+ v-show="nav === 'values'"
|
|
|
|
|
+ :readOnly="readOnly"
|
|
|
|
|
+ :active="nav === 'values'"
|
|
|
|
|
+ :script="script"
|
|
|
|
|
+ />
|
|
|
|
|
+ <vm-externals
|
|
|
|
|
+ class="flex-auto"
|
|
|
|
|
+ v-if="nav === 'externals'"
|
|
|
|
|
+ :value="script"
|
|
|
|
|
+ />
|
|
|
|
|
+ <vm-help
|
|
|
|
|
+ class="edit-body"
|
|
|
|
|
+ v-show="nav === 'help'"
|
|
|
|
|
+ :hotkeys="hotkeys"
|
|
|
|
|
+ />
|
|
|
|
|
+
|
|
|
<div v-if="errors" class="errors my-1c">
|
|
<div v-if="errors" class="errors my-1c">
|
|
|
<p v-for="e in errors" :key="e" v-text="e" class="text-red"/>
|
|
<p v-for="e in errors" :key="e" v-text="e" class="text-red"/>
|
|
|
<p class="my-1">
|
|
<p class="my-1">
|
|
@@ -239,6 +239,7 @@ export default {
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
async mounted() {
|
|
async mounted() {
|
|
|
|
|
+ document.body.classList.add('edit-open');
|
|
|
store.storageSize = 0;
|
|
store.storageSize = 0;
|
|
|
this.nav = 'code';
|
|
this.nav = 'code';
|
|
|
const { custom, config } = this.script;
|
|
const { custom, config } = this.script;
|
|
@@ -359,6 +360,7 @@ export default {
|
|
|
},
|
|
},
|
|
|
},
|
|
},
|
|
|
beforeUnmount() {
|
|
beforeUnmount() {
|
|
|
|
|
+ document.body.classList.remove('edit-open');
|
|
|
store.title = null;
|
|
store.title = null;
|
|
|
this.toggleUnloadSentry(false);
|
|
this.toggleUnloadSentry(false);
|
|
|
this.disposeList?.forEach(dispose => {
|
|
this.disposeList?.forEach(dispose => {
|
|
@@ -372,16 +374,20 @@ export default {
|
|
|
.edit {
|
|
.edit {
|
|
|
z-index: 2000;
|
|
z-index: 2000;
|
|
|
&-header {
|
|
&-header {
|
|
|
|
|
+ position: sticky;
|
|
|
|
|
+ top: 0;
|
|
|
|
|
+ z-index: 1;
|
|
|
align-items: center;
|
|
align-items: center;
|
|
|
justify-content: space-between;
|
|
justify-content: space-between;
|
|
|
border-bottom: 1px solid var(--fill-3);
|
|
border-bottom: 1px solid var(--fill-3);
|
|
|
|
|
+ background: inherit;
|
|
|
}
|
|
}
|
|
|
&-name {
|
|
&-name {
|
|
|
font-weight: bold;
|
|
font-weight: bold;
|
|
|
}
|
|
}
|
|
|
&-body {
|
|
&-body {
|
|
|
padding: .5rem 1rem;
|
|
padding: .5rem 1rem;
|
|
|
- overflow: auto;
|
|
|
|
|
|
|
+ // overflow: auto;
|
|
|
background: var(--bg);
|
|
background: var(--bg);
|
|
|
}
|
|
}
|
|
|
&-nav-item {
|
|
&-nav-item {
|
|
@@ -438,6 +444,12 @@ export default {
|
|
|
.edit-hint {
|
|
.edit-hint {
|
|
|
display: none;
|
|
display: none;
|
|
|
}
|
|
}
|
|
|
|
|
+ .edit {
|
|
|
|
|
+ // fixed/absolute doesn't work well with scroll in Firefox Android
|
|
|
|
|
+ position: static;
|
|
|
|
|
+ // larger than 100vh to force overflow so that the toolbar can be hidden in Firefox Android
|
|
|
|
|
+ min-height: calc(100vh + 1px);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@media (max-width: 500px) {
|
|
@media (max-width: 500px) {
|