Skip to content

Commit

Permalink
Minor fixes: building, selectors, flashnav
Browse files Browse the repository at this point in the history
  • Loading branch information
GiovanH committed Jun 4, 2024
1 parent d98ae91 commit 4d89955
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 26 deletions.
2 changes: 1 addition & 1 deletion src/components/Page/PageBanner.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<div class="bannerDiv" v-if="!!banner" @mouseover="mouseEnter" @mousemove="positionTooltip" @mouseleave="mouseLeave" >
<Media :url="banner.url" :title="banner.title" class="bannerImage" noncritical />
<img v-if="imgTooltip" :src="imgTooltip" class="imgTooltip" />
<img v-if="imgTooltip" :src="$getResourceURL(imgTooltip)" class="imgTooltip" />
</div>
</template>

Expand Down
1 change: 1 addition & 0 deletions src/components/SpecialPages/Firefly.vue
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@ export default {
position: absolute;
height: 150px;
width: 200px;
pointer-events: none;
}
}
Expand Down
5 changes: 4 additions & 1 deletion src/components/TabFrame.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@
theme,
{
hidden: !tabIsActive,
forceScrollBar: $localData.settings.forceScrollBar,
forceScrollBar: (
$localData.settings.forceScrollBar
&& resolveComponent != 'FULLSCREENFLASH'
),
forceLoad
}
]"
Expand Down
8 changes: 7 additions & 1 deletion src/components/UIElements/MediaEmbed.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
44 changes: 22 additions & 22 deletions src/store/localData.js
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -670,4 +670,4 @@ export default {
}
})
},
}
}
10 changes: 9 additions & 1 deletion vue.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4d89955

Please sign in to comment.