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
+1 -1
View File
@@ -2,7 +2,7 @@
v1.3.9 (tip) v1.3.9 (tip)
- Fidelity: Upgrade to wabac.js 2.6.0-beta.0, wombat 3.1.0: improved POST request rewriting for multipart/form-data, Tableau dashboard fidelity - Fidelity: Upgrade to wabac.js 2.6.0-beta.0, wombat 3.1.0: improved POST request rewriting for multipart/form-data, Tableau dashboard fidelity
- UI: style fix on page delete spinner (editable mode) - UI: editable mode: style fix on page delete spinner, don't show editing options on sidebar
v1.3.8 v1.3.8
- UI: Native files: Support asking permission when doing a full reload of a local file. - UI: Native files: Support asking permission when doing a full reload of a local file.
+8 -2
View File
@@ -146,7 +146,7 @@ class Coll extends LitElement
} }
if (changedProperties.has("editable")) { if (changedProperties.has("editable")) {
if (this.editable) { if (this.editable) {
this._pollColl = setInterval(() => this.doUpdateInfo(), 10000); this._pollColl = setInterval(() => this.doUpdateInfo(true), 10000);
} else if (this._pollColl) { } else if (this._pollColl) {
clearInterval(this._pollColl); clearInterval(this._pollColl);
} }
@@ -230,7 +230,13 @@ class Coll extends LitElement
} }
} }
async doUpdateInfo() { async doUpdateInfo(autorefresh = false)
{
// if auto-refresh, and replay and no sidebar, than skip update
if (autorefresh && this.tabData.url && !this.showSidebar) {
return;
}
let coll = this.loadInfo && this.loadInfo.customColl; let coll = this.loadInfo && this.loadInfo.customColl;
if (!coll) { if (!coll) {
+1 -1
View File
@@ -8,4 +8,4 @@ const replayApp = new ElectronReplayApp({
profileName: "replaywebpage" profileName: "replaywebpage"
}); });
replayApp.init(); replayApp.init(true);
+6 -1
View File
@@ -87,7 +87,7 @@ class ElectronReplayApp
return "index.html"; return "index.html";
} }
init() { init(includePlugins = false) {
// Single instance check // Single instance check
const gotTheLock = app.requestSingleInstanceLock(); const gotTheLock = app.requestSingleInstanceLock();
@@ -101,6 +101,7 @@ class ElectronReplayApp
}); });
} }
if (includePlugins) {
switch (process.platform) { switch (process.platform) {
case 'win32': case 'win32':
this.pluginPath = path.join(this.projPath, "plugins-win", `pepflashplayer-x86${process.arch === 'x64' ? '_64' : ''}.dll`); this.pluginPath = path.join(this.projPath, "plugins-win", `pepflashplayer-x86${process.arch === 'x64' ? '_64' : ''}.dll`);
@@ -120,11 +121,15 @@ class ElectronReplayApp
} }
app.commandLine.appendSwitch('ppapi-flash-path', this.pluginPath); app.commandLine.appendSwitch('ppapi-flash-path', this.pluginPath);
}
console.log('app path', this.appPath); console.log('app path', this.appPath);
console.log('dir name', __dirname); console.log('dir name', __dirname);
console.log('proj path', this.projPath); console.log('proj path', this.projPath);
if (includePlugins) {
console.log('plugin path', this.pluginPath); console.log('plugin path', this.pluginPath);
}
console.log('app data', app.getPath('appData')); console.log('app data', app.getPath('appData'));
console.log('user data', app.getPath('userData')); console.log('user data', app.getPath('userData'));
+4 -2
View File
@@ -182,8 +182,10 @@ class PageEntry extends LitElement
const hasSize = typeof(p.size) === "number"; const hasSize = typeof(p.size) === "number";
const editable = this.editable && !this.isSidebar;
return html` return html`
${this.editable ? html` ${editable ? html`
<div class="check-select"> <div class="check-select">
<label class="checkbox"> <label class="checkbox">
<input @change=${this.onSendSelToggle} type="checkbox" .checked="${this.selected}"> <input @change=${this.onSendSelToggle} type="checkbox" .checked="${this.selected}">
@@ -229,7 +231,7 @@ class PageEntry extends LitElement
</div> </div>
</div> </div>
${this.editable ? html` ${editable ? html`
${!this.deleting ? html` ${!this.deleting ? html`
<button @click="${this.onSendDeletePage}" class="delete"></button>` : html` <button @click="${this.onSendDeletePage}" class="delete"></button>` : html`
<button class="button delete is-loading is-static"></button> <button class="button delete is-loading is-static"></button>
+1 -1
View File
@@ -614,7 +614,7 @@ class Pages extends LitElement
renderPageHeader() { renderPageHeader() {
return html` return html`
${this.editable && this.filteredPages.length ? html` ${!this.isSidebar && this.editable && this.filteredPages.length ? html`
<div class="check-select"> <div class="check-select">
<label class="checkbox"> <label class="checkbox">
<input @change=${this.onSelectAll} type="checkbox" .checked="${this.allSelected}"> <input @change=${this.onSelectAll} type="checkbox" .checked="${this.allSelected}">
+5 -5
View File
File diff suppressed because one or more lines are too long