From 4d899553266a0c47f0980b0d8a51066b550748db Mon Sep 17 00:00:00 2001 From: Gio Date: Tue, 4 Jun 2024 00:29:39 -0500 Subject: [PATCH] Minor fixes: building, selectors, flashnav --- src/components/Page/PageBanner.vue | 2 +- src/components/SpecialPages/Firefly.vue | 1 + src/components/TabFrame.vue | 5 ++- src/components/UIElements/MediaEmbed.vue | 8 ++++- src/store/localData.js | 44 ++++++++++++------------ vue.config.js | 10 +++++- 6 files changed, 44 insertions(+), 26 deletions(-) diff --git a/src/components/Page/PageBanner.vue b/src/components/Page/PageBanner.vue index 6ca174ba..40c85461 100644 --- a/src/components/Page/PageBanner.vue +++ b/src/components/Page/PageBanner.vue @@ -1,7 +1,7 @@ diff --git a/src/components/SpecialPages/Firefly.vue b/src/components/SpecialPages/Firefly.vue index f986db6e..b1bfa091 100644 --- a/src/components/SpecialPages/Firefly.vue +++ b/src/components/SpecialPages/Firefly.vue @@ -216,6 +216,7 @@ export default { position: absolute; height: 150px; width: 200px; + pointer-events: none; } } diff --git a/src/components/TabFrame.vue b/src/components/TabFrame.vue index adab5b36..d333294f 100644 --- a/src/components/TabFrame.vue +++ b/src/components/TabFrame.vue @@ -5,7 +5,10 @@ theme, { hidden: !tabIsActive, - forceScrollBar: $localData.settings.forceScrollBar, + forceScrollBar: ( + $localData.settings.forceScrollBar + && resolveComponent != 'FULLSCREENFLASH' + ), forceLoad } ]" diff --git a/src/components/UIElements/MediaEmbed.vue b/src/components/UIElements/MediaEmbed.vue index 3e4d63a6..dbb16e09 100644 --- a/src/components/UIElements/MediaEmbed.vue +++ b/src/components/UIElements/MediaEmbed.vue @@ -349,9 +349,15 @@ export default { }) } } + window.open = function(url, name, features, replace) { + console.log("Flash invoked window.open") + vm.invokeFromFlash("link?" + url) + } if (typeof navigation !== 'undefined') { navigation.addEventListener("navigate", (e) => { - console.log("srcdoc navigating: ", e, e.destination) + console.log("srcdoc navigating: ", e, e.destination, + e.destination.url + ) if (!e.destination.sameDocument) { console.log(e.destination.url) vm.invokeFromFlash("link?" + e.destination.url) diff --git a/src/store/localData.js b/src/store/localData.js index bccfdad7..51133b38 100644 --- a/src/store/localData.js +++ b/src/store/localData.js @@ -1,29 +1,29 @@ import Vue from 'vue' -var store; -if (!window.isWebApp) { - const Store = require('electron-store') - store = new Store({ - migrations: { - '2.3.0': store => { - // Migrate storage - console.log("Migrating localData monolith") - const local_data_prev = store.get('localData', {}) - store.delete('localData') - store.set(local_data_prev) - }, - '2.4.4': store => { - // Migrate storage - console.log("Migrating line height") - const settings_prev = store.get('settings', {}) - const incremented_height = Number(settings_prev.textOverride.lineHeight) + 1 - settings_prev.textOverride.lineHeight = incremented_height - store.set(settings_prev) - } +var store +const migrations = { + '2.3.0': store => { + // Migrate storage + console.log("Migrating localData monolith for 2.3.0") + const local_data_prev = store.get('localData', {}) + store.delete('localData') + store.set(local_data_prev) + }, + '2.4.4': store => { + // Migrate storage + console.log("Migrating line height for 2.4.4") + const settings_prev = store.get('settings', {}) + if (settings_prev && settings_prev.textOverride) { + const incremented_height = Number(settings_prev.textOverride.lineHeight) + 1 + settings_prev.textOverride.lineHeight = incremented_height + store.set(settings_prev) } - }) + } } +const Store = require('electron-store') +store = new Store({migrations}) + const LOADED_TAB_LIMIT = 10 const DEAD_TAB_LIMIT = 15 const HISTORY_LIMIT = 350 @@ -670,4 +670,4 @@ export default { } }) }, -} \ No newline at end of file +} diff --git a/vue.config.js b/vue.config.js index c0c77883..f3f4582e 100644 --- a/vue.config.js +++ b/vue.config.js @@ -21,7 +21,15 @@ module.exports = { maxSize: 250000 } }, - devtool: "source-map", + devServer: { + stats: { + chunks: false, + chunkModules: false, + modules: false + } + }, + // devtool: "source-map", + devtool: "eval-source-map", resolve: { alias: { // Include the vue compiler so mods can use templates