parent
04b8a981ef
commit
33de1cbce9
@ -979,6 +979,18 @@
|
|||||||
"description": "Menu text; select window",
|
"description": "Menu text; select window",
|
||||||
"message": "Set Renaming Mask"
|
"message": "Set Renaming Mask"
|
||||||
},
|
},
|
||||||
|
"set_mask_text": {
|
||||||
|
"description": "dialog text",
|
||||||
|
"message": "Set a new renaming mask"
|
||||||
|
},
|
||||||
|
"set_referrer": {
|
||||||
|
"description": "menu text",
|
||||||
|
"message": "Set Referrer"
|
||||||
|
},
|
||||||
|
"set_referrer_text": {
|
||||||
|
"description": "dialog text",
|
||||||
|
"message": "Set a new referrer"
|
||||||
|
},
|
||||||
"single_batchexamples": {
|
"single_batchexamples": {
|
||||||
"description": "Header text; single window",
|
"description": "Header text; single window",
|
||||||
"message": "Batches are supported, e.g.:"
|
"message": "Batches are supported, e.g.:"
|
||||||
|
@ -93,6 +93,7 @@ html, body {
|
|||||||
.icon-file-video:before { content: '\e825'; } /* '' */
|
.icon-file-video:before { content: '\e825'; } /* '' */
|
||||||
.icon-file-generic:before { content: '\e826'; } /* '' */
|
.icon-file-generic:before { content: '\e826'; } /* '' */
|
||||||
.icon-question-dark:before { content: '\e827'; } /* '' */
|
.icon-question-dark:before { content: '\e827'; } /* '' */
|
||||||
|
.icon-forward:before { content: '\e828'; } /* '' */
|
||||||
.icon-filter:before { content: '\f0b0'; } /* '' */
|
.icon-filter:before { content: '\f0b0'; } /* '' */
|
||||||
.icon-donate:before { content: '\f0d6'; } /* '' */
|
.icon-donate:before { content: '\f0d6'; } /* '' */
|
||||||
.icon-file-doc:before { content: '\f0f6'; } /* '' */
|
.icon-file-doc:before { content: '\f0f6'; } /* '' */
|
||||||
@ -105,7 +106,8 @@ html, body {
|
|||||||
.icon-file-image:before { content: '\f1c5'; } /* '' */
|
.icon-file-image:before { content: '\f1c5'; } /* '' */
|
||||||
.icon-file-archive:before { content: '\f1c6'; } /* '' */
|
.icon-file-archive:before { content: '\f1c6'; } /* '' */
|
||||||
.icon-file-audio:before { content: '\f1c7'; } /* '' */
|
.icon-file-audio:before { content: '\f1c7'; } /* '' */
|
||||||
.icon-toggle:before { content: '\f205'; } /* '' */
|
.icon-toggle-off:before { content: '\f204'; } /* '' */
|
||||||
|
.icon-toggle-on:before { content: '\f205'; } /* '' */
|
||||||
.icon-server:before { content: '\f233'; } /* '' */
|
.icon-server:before { content: '\f233'; } /* '' */
|
||||||
.icon-question-light:before { content: '\f29c'; } /* '' */
|
.icon-question-light:before { content: '\f29c'; } /* '' */
|
||||||
|
|
||||||
|
BIN
style/downthemall.woff2
Normal file → Executable file
BIN
style/downthemall.woff2
Normal file → Executable file
Binary file not shown.
@ -39,7 +39,7 @@
|
|||||||
<th id="colTitle" data-i18n="title">Title</th>
|
<th id="colTitle" data-i18n="title">Title</th>
|
||||||
<th id="colDescription" data-i18n="description">Description</th>
|
<th id="colDescription" data-i18n="description">Description</th>
|
||||||
<th id="colMask" data-i18n="mask">Mask</th>
|
<th id="colMask" data-i18n="mask">Mask</th>
|
||||||
<!--<th id="colReferrer" data-i18n="referrer">Referrer</th>-->
|
<th id="colReferrer" data-i18n="referrer">Referrer</th>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
@ -84,6 +84,7 @@
|
|||||||
<li id="ctx-toggle-selected" data-icon="icon-unchecked" data-i18n="toggle-selected-items">Toggle Check for Selected Items</li>
|
<li id="ctx-toggle-selected" data-icon="icon-unchecked" data-i18n="toggle-selected-items">Toggle Check for Selected Items</li>
|
||||||
<li>-</li>
|
<li>-</li>
|
||||||
<li id="ctx-mask" data-icon="icon-tags" data-i18n="set-mask">Mask</li>
|
<li id="ctx-mask" data-icon="icon-tags" data-i18n="set-mask">Mask</li>
|
||||||
|
<li id="ctx-referrer" data-icon="icon-forward" data-i18n="set-referrer">Referrer</li>
|
||||||
<li>-</li>
|
<li>-</li>
|
||||||
<li id="ctx-select-all" data-key="ACCEL-KeyA" data-i18n="select-all">Select All</li>
|
<li id="ctx-select-all" data-key="ACCEL-KeyA" data-i18n="select-all">Select All</li>
|
||||||
<li id="ctx-select-filtered" data-key="ACCEL-KeyF" data-i18n="select-checked">Select Checked</li>
|
<li id="ctx-select-filtered" data-key="ACCEL-KeyF" data-i18n="select-checked">Select Checked</li>
|
||||||
|
@ -117,7 +117,9 @@ class CheckClasser extends Map<string, string> {
|
|||||||
let result = super.get(key);
|
let result = super.get(key);
|
||||||
if (typeof result !== "string") {
|
if (typeof result !== "string") {
|
||||||
result = this.gen.next().value;
|
result = this.gen.next().value;
|
||||||
super.set(key, result);
|
if (result) {
|
||||||
|
super.set(key, result);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -352,7 +354,7 @@ class SelectionTable extends VirtualTable {
|
|||||||
try {
|
try {
|
||||||
Keys.suppressed = true;
|
Keys.suppressed = true;
|
||||||
const newmask = await ModalDialog.prompt(
|
const newmask = await ModalDialog.prompt(
|
||||||
"Renaming mask", "Set new renaming mask", oldmask);
|
_("set_mask"), _("set_mask_text"), oldmask);
|
||||||
for (const r of this.selection) {
|
for (const r of this.selection) {
|
||||||
this.items.at(r).mask = newmask;
|
this.items.at(r).mask = newmask;
|
||||||
this.invalidateRow(r);
|
this.invalidateRow(r);
|
||||||
@ -366,6 +368,57 @@ class SelectionTable extends VirtualTable {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
this.contextMenu.on("ctx-referrer", async() => {
|
||||||
|
if (this.selection.empty) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
let oldref = "";
|
||||||
|
for (const r of this.selection) {
|
||||||
|
const m = this.items.at(r).usableReferrer;
|
||||||
|
if (oldref && m !== oldref) {
|
||||||
|
oldref = "";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
oldref = m || oldref;
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
Keys.suppressed = true;
|
||||||
|
const newref = await ModalDialog.prompt(
|
||||||
|
_("set_referrer"), _("set_referrer_text"), oldref);
|
||||||
|
try {
|
||||||
|
let ref;
|
||||||
|
if (!newref) {
|
||||||
|
ref = {
|
||||||
|
referrer: undefined,
|
||||||
|
usableReferrer: undefined,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
const u = new URL(newref);
|
||||||
|
u.hash = "";
|
||||||
|
ref = {
|
||||||
|
referrer: u.toString(),
|
||||||
|
usableReferrer: decodeURIComponent(u.toString()),
|
||||||
|
};
|
||||||
|
}
|
||||||
|
for (const r of this.selection) {
|
||||||
|
Object.assign(this.items.at(r), ref);
|
||||||
|
this.invalidateRow(r);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch {
|
||||||
|
// ignored
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (ex) {
|
||||||
|
console.warn("mask dismissed", ex);
|
||||||
|
}
|
||||||
|
finally {
|
||||||
|
Keys.suppressed = false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
this.contextMenu.on("dismissed", () => this.table.focus());
|
this.contextMenu.on("dismissed", () => this.table.focus());
|
||||||
|
|
||||||
this.on("contextmenu", (tree, event) => {
|
this.on("contextmenu", (tree, event) => {
|
||||||
@ -527,7 +580,11 @@ class SelectionTable extends VirtualTable {
|
|||||||
if (!item || !matched(item) || !item.matched) {
|
if (!item || !matched(item) || !item.matched) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
return ["filtered", this.checkClasser.get(item.matched)];
|
const m = this.checkClasser.get(item.matched);
|
||||||
|
if (!m) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return ["filtered", m];
|
||||||
}
|
}
|
||||||
|
|
||||||
getCellIcon(rowid: number, colid: number) {
|
getCellIcon(rowid: number, colid: number) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user