From 7778fc0a6d9b504440c0f2aa093e46696bf6fab7 Mon Sep 17 00:00:00 2001 From: thepaperpilot Date: Sat, 12 Jun 2021 00:19:49 -0500 Subject: [PATCH] Allowed go back button to be disabled in modInfo --- src/components/system/LayerTab.vue | 11 ++++++++++- src/components/system/Tabs.vue | 6 +++++- src/data/modInfo.json | 1 + 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/src/components/system/LayerTab.vue b/src/components/system/LayerTab.vue index 62a423a..42d53aa 100644 --- a/src/components/system/LayerTab.vue +++ b/src/components/system/LayerTab.vue @@ -2,7 +2,7 @@
- + @@ -18,6 +18,7 @@ import { layers } from '../../store/layers'; import { player } from '../../store/proxies'; import { coerceComponent } from '../../util/vue'; import { isPlainObject } from '../../util/common'; +import modInfo from '../../data/modInfo.json'; import themes from '../../data/themes'; export default { @@ -27,6 +28,9 @@ export default { index: Number, forceFirstTab: Boolean }, + data() { + return { allowGoBack: modInfo.allowGoBack }; + }, computed: { floating() { return themes[player.theme].floatingTabs; @@ -131,6 +135,11 @@ export default { padding-left: 0; } +.subtabs:not(.floating).firstTab { + padding-left: 0; + padding-right: 0; +} + .subtabs:not(.floating):first-child { margin-top: -50px; border-top: 0; diff --git a/src/components/system/Tabs.vue b/src/components/system/Tabs.vue index 5f00212..0275cec 100644 --- a/src/components/system/Tabs.vue +++ b/src/components/system/Tabs.vue @@ -2,7 +2,7 @@
- +
@@ -22,9 +22,13 @@ import { mapState } from 'vuex'; import { layers } from '../../store/layers'; import { player } from '../../store/proxies'; +import modInfo from '../../data/modInfo.json'; export default { name: 'Tabs', + data() { + return { allowGoBack: modInfo.allowGoBack }; + }, computed: { ...mapState([ 'tabs' ]), components() { diff --git a/src/data/modInfo.json b/src/data/modInfo.json index feef8d0..53d4469 100644 --- a/src/data/modInfo.json +++ b/src/data/modInfo.json @@ -8,6 +8,7 @@ "versionNumber": "0.0", "versionTitle": "Initial Commit", + "allowGoBack": false, "allowSmall": false, "defaultDecimalsShown": 2, "useHeader": true,