Fix web app issues

Fix plugins not loading from cache
Disable screen orientation lock
Fix loading issue in older browsers
This commit is contained in:
JannisX11 2021-03-08 12:56:02 +01:00
parent 64b7791845
commit 232666b03c
4 changed files with 7 additions and 6 deletions

View File

@ -810,8 +810,8 @@ onVueSetup(function() {
var round_num = canvasGridSize(e2.shiftKey, e2.ctrlOrCmd)
}
value = Math.round(value/round_num)*round_num
previousValue = previousValue ?? value;
originalValue = originalValue ?? value;
previousValue = previousValue == undefined ? value : previousValue;
originalValue = originalValue == undefined ? value : originalValue;
if (value !== previousValue) {
value_diff = value - (previousValue||0);

View File

@ -33,8 +33,6 @@ var Prop = {
const mouse_pos = {x:0,y:0}
const sort_collator = new Intl.Collator(undefined, {numeric: true, sensitivity: 'base'});
$.ajaxSetup({ cache: false });
function onVueSetup(func) {
if (!onVueSetup.funcs) {
onVueSetup.funcs = []

View File

@ -58,7 +58,6 @@ if (isApp) {
updateRecentProjects()
}
if (!isApp) {
async function registerSW() {
if ('serviceWorker' in navigator) {
@ -72,6 +71,10 @@ if (!isApp) {
registerSW();
}
if (!Blockbench.isWeb || !Blockbench.isPWA) {
$.ajaxSetup({ cache: false });
}
Blockbench.on('before_closing', (event) => {
if (!Blockbench.hasFlag('no_localstorage_saving')) {
Settings.saveLocalStorages()

View File

@ -25,5 +25,5 @@
"theme_color": "#3e90ff",
"display": "standalone",
"display_override": ["tabbed", "minimal-ui"],
"orientation": "portrait"
"orientation": "portrait-primary"
}