Skip to content

Commit a1d1e95

Browse files
chore (maintenance): lint + tscheck
1 parent 35ed3d6 commit a1d1e95

File tree

5 files changed

+45
-42
lines changed

5 files changed

+45
-42
lines changed

public/assets/components/form.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,6 @@ export function $renderInput(options = {}) {
287287
else if ((val || "").substring(0, 20) === "data:application/pdf") $preview.appendChild(createElement(`
288288
<object class="full-width" type="application/pdf" data="${val}" style="height:250px;" />
289289
`));
290-
console.log("DRAW", $preview, (val || "").substring(0, 10))
291290
};
292291
qs($file, "input").onchange = (e) => {
293292
if (e.target.files.length === 0) return;

public/assets/components/modal.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class ModalComponent extends HTMLElement {
3737
await loadCSS(import.meta.url, "./modal.css");
3838
}
3939

40-
trigger($node, { withButtonsLeft = null, withButtonsRight = null, targetHeight = 0, onQuit = (a) => Promise.resolve(a) }) {
40+
trigger($node, { withButtonsLeft = null, withButtonsRight = null, targetHeight = 0, onQuit = (_a, _b) => Promise.resolve() }) {
4141
const close$ = new rxjs.Subject();
4242

4343
// feature: build the dom

public/assets/lib/rx.d.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import {
66
map, mapTo, filter, mergeMap, EMPTY, empty,
77
switchMapTo, switchMap,
88
BehaviorSubject, Subject, ReplaySubject,
9-
pipe, share, toArray, distinctUntilChanged, from,
9+
pipe, share, toArray, distinctUntilChanged, from, finalize,
1010
combineLatest, shareReplay, race, repeat, interval, merge,
1111
debounceTime, debounce, delay, concatMap, distinct, scan, throwError,
1212
zip, animationFrames, retry, forkJoin, skip, takeUntil, timer,
@@ -42,6 +42,7 @@ declare const rxjs: {
4242
map: typeof map,
4343
mapTo: typeof mapTo,
4444
filter: typeof filter,
45+
finalize: typeof finalize,
4546
mergeMap: typeof mergeMap,
4647
switchMapTo: typeof switchMapTo,
4748
switchMap: typeof switchMap,

public/assets/model/chromecast.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
export function init(config) {
2-
if (navigator.onLine === false) return Promise.resolve()
2+
if (navigator.onLine === false) return Promise.resolve();
33
if (!config["enable_chromecast"]) {
44
return Promise.resolve();
55
} else if (!("chrome" in window)) {

public/assets/pages/filespage/ctrl_submenu.js

Lines changed: 41 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -230,45 +230,48 @@ function componentRight(render, { getSelectionLength$ }) {
230230
effect(getSelectionLength$.pipe(
231231
rxjs.filter((l) => l === 0),
232232
rxjs.mergeMap(() => getState$().pipe(rxjs.first())),
233-
rxjs.map(({ view, sort, search }) => ({ search, $page: render(createFragment(`
234-
<form style="display: inline-block;" onsubmit="event.preventDefault()">
235-
<input class="hidden" placeholder="${t("search")}" name="q" style="
236-
background: transparent;
237-
border: none;
238-
padding-left: 5px;
239-
color: var(--color);
240-
font-size: 0.95rem;"
241-
value="${search || ""}"
242-
</form>
243-
<button data-action="search" title="${t("Search")}">
244-
<img class="component_icon" draggable="false" src="data:image/svg+xml;base64,${ICONS.MAGNIFYING_GLASS}" alt="search" />
245-
</button>
246-
<button data-action="view" title="${t("Layout")}">
247-
${defaultLayout(view)}
248-
</button>
249-
<button data-action="sort" title="${t("Sort")}">
250-
${defaultSort(sort)}
251-
</button>
252-
<div class="component_dropdown view sort" data-target="sort">
253-
<div class="dropdown_container">
254-
<ul>
255-
<li data-target="type">
256-
${t("Sort By Type")}
257-
<img class="component_icon" draggable="false" src="data:image/svg+xml;base64,${ICONS.CHECK}" alt="check" />
258-
</li>
259-
<li data-target="date">
260-
${t("Sort By Date")}
261-
</li>
262-
<li data-target="name">
263-
${t("Sort By Name")}
264-
</li>
265-
<li data-target="size">
266-
${t("Sort By Size")}
267-
</li>
268-
</ul>
233+
rxjs.map(({ view, sort, search }) => ({
234+
search,
235+
$page: render(createFragment(`
236+
<form style="display: inline-block;" onsubmit="event.preventDefault()">
237+
<input class="hidden" placeholder="${t("search")}" name="q" style="
238+
background: transparent;
239+
border: none;
240+
padding-left: 5px;
241+
color: var(--color);
242+
font-size: 0.95rem;"
243+
value="${search || ""}"
244+
</form>
245+
<button data-action="search" title="${t("Search")}">
246+
<img class="component_icon" draggable="false" src="data:image/svg+xml;base64,${ICONS.MAGNIFYING_GLASS}" alt="search" />
247+
</button>
248+
<button data-action="view" title="${t("Layout")}">
249+
${defaultLayout(view)}
250+
</button>
251+
<button data-action="sort" title="${t("Sort")}">
252+
${defaultSort(sort)}
253+
</button>
254+
<div class="component_dropdown view sort" data-target="sort">
255+
<div class="dropdown_container">
256+
<ul>
257+
<li data-target="type">
258+
${t("Sort By Type")}
259+
<img class="component_icon" draggable="false" src="data:image/svg+xml;base64,${ICONS.CHECK}" alt="check" />
260+
</li>
261+
<li data-target="date">
262+
${t("Sort By Date")}
263+
</li>
264+
<li data-target="name">
265+
${t("Sort By Name")}
266+
</li>
267+
<li data-target="size">
268+
${t("Sort By Size")}
269+
</li>
270+
</ul>
271+
</div>
269272
</div>
270-
</div>
271-
`))})),
273+
`))
274+
})),
272275
rxjs.mergeMap(({ $page, search }) => rxjs.merge(
273276
// feature: view button
274277
onClick(qs($page, `[data-action="view"]`)).pipe(rxjs.tap(($button) => {

0 commit comments

Comments
 (0)