ui tweaks for downstream (archiveweb.page):

- don't show page editing options when in sidebar mode
- don't autorefresh in replay and sidebar not visibile
- disable plugins by default now
This commit is contained in:
Ilya Kreymer
2021-02-15 15:24:22 -08:00
parent 2fbea9b970
commit 72194c308a
7 changed files with 45 additions and 32 deletions
+25 -20
View File
@@ -87,7 +87,7 @@ class ElectronReplayApp
return "index.html";
}
init() {
init(includePlugins = false) {
// Single instance check
const gotTheLock = app.requestSingleInstanceLock();
@@ -101,30 +101,35 @@ class ElectronReplayApp
});
}
switch (process.platform) {
case 'win32':
this.pluginPath = path.join(this.projPath, "plugins-win", `pepflashplayer-x86${process.arch === 'x64' ? '_64' : ''}.dll`);
break;
case 'darwin':
this.pluginPath = path.join(this.projPath, "plugins-mac", "PepperFlashPlayer.plugin");
break;
case 'linux':
this.pluginPath = path.join(this.projPath, "plugins-mac", "libpepflashplayer.so");
break;
default:
console.log('platform unsupported: ' + process.platform);
break;
}
if (includePlugins) {
switch (process.platform) {
case 'win32':
this.pluginPath = path.join(this.projPath, "plugins-win", `pepflashplayer-x86${process.arch === 'x64' ? '_64' : ''}.dll`);
break;
case 'darwin':
this.pluginPath = path.join(this.projPath, "plugins-mac", "PepperFlashPlayer.plugin");
break;
case 'linux':
this.pluginPath = path.join(this.projPath, "plugins-mac", "libpepflashplayer.so");
break;
default:
console.log('platform unsupported: ' + process.platform);
break;
}
app.commandLine.appendSwitch('ppapi-flash-path', this.pluginPath);
app.commandLine.appendSwitch('ppapi-flash-path', this.pluginPath);
}
console.log('app path', this.appPath);
console.log('dir name', __dirname);
console.log('proj path', this.projPath);
console.log('plugin path', this.pluginPath);
if (includePlugins) {
console.log('plugin path', this.pluginPath);
}
console.log('app data', app.getPath('appData'));
console.log('user data', app.getPath('userData'));