Skip to content

Commit 302597c

Browse files
committed
fixes
1 parent 5f22c01 commit 302597c

23 files changed

+100
-160
lines changed

env.node.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
declare module "eslint-plugin-vuetify";

package-lock.json

Lines changed: 16 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,9 @@
5050
"devDependencies": {
5151
"@playwright/test": "^1.51.1",
5252
"@tsconfig/node22": "^22.0.1",
53+
"@types/hammerjs": "^2.0.46",
5354
"@types/jsdom": "^21.1.7",
55+
"@types/mousetrap": "^1.6.15",
5456
"@types/node": "^22.13.14",
5557
"@vite-pwa/assets-generator": "^1.0.0",
5658
"@vitejs/plugin-vue": "^5.2.3",

src/Analyzer/FavoritesAnalyzerResult.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
</v-list-item-title>
1616
<template v-slot:append>
1717
<!-- <v-btn icon="mdi-pencil" size="x-small" variant="tonal"></v-btn> -->
18-
{{ item.size }}
18+
{{ item.size }}
1919
</template>
2020
</v-list-item>
2121
</template>
@@ -35,7 +35,7 @@ import {
3535
watch,
3636
watchEffect,
3737
} from "vue";
38-
import type { IAnalyzeTagsArgs, IProgressEvent } from "@/worker/AnalyzeService";
38+
import type { IAnalyzeTagsArgs, IAnalyzeTagsResult, IProgressEvent } from "@/worker/AnalyzeService";
3939
import { getAnalyzeService } from "@/worker/services";
4040
import { cloneDeep, debounce } from "lodash";
4141
import * as Comlink from "comlink";
@@ -62,7 +62,7 @@ const args = computed<IAnalyzeTagsArgs>(() => {
6262
};
6363
});
6464
65-
const result = ref();
65+
const result = ref<IAnalyzeTagsResult>();
6666
6767
const analyze = debounce(async (a) => {
6868
const service = await getAnalyzeService();

src/App/InstallMenu.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
</v-card-text>
1919
<v-card-actions>
2020
<v-spacer />
21-
<v-btn variant="text" color @click="hide">Never show again</v-btn>
21+
<v-btn variant="text" @click="hide">Never show again</v-btn>
2222
<v-btn variant="text" color="primary" @click="install">Install</v-btn>
2323
</v-card-actions>
2424
</v-card>

src/ArtistDashboard/DashboardResult.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ const route = useRoute();
105105
106106
const artist = computed<string>(() => {
107107
let name = "";
108-
if (route.params.name) name = route.params.name;
108+
if (route.params.name) name = typeof route.params.name === "string" ? route.params.name : route.params.name[0];
109109
return name;
110110
});
111111

src/Parser/ParserTestPage.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,12 @@
1313
import { useUrlStore } from "@/services";
1414
import DText from "./DText.vue";
1515
import { useHead } from "@unhead/vue";
16+
import { ref } from "vue";
1617
1718
useHead({ title: "Parser Test Page", });
1819
1920
const urlStore = useUrlStore(); // todo: properly convert to vue 3 api
20-
const testText = `
21+
const testText = ref(`
2122
h1. Hello there
2223
Edit this text and see the results below.
2324
@@ -79,5 +80,5 @@ header | header | header
7980
row | row | row
8081
row | row | row
8182
[/table]
82-
`
83+
`)
8384
</script>

src/Post/FullscreenDialog.vue

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<template>
22
<v-dialog dark :model-value="open" fullscreen :scrim="false" transition="dialog-bottom-transition" scrollable
33
persistent>
4-
<div class="fullscreen bg-grey-darken-4" ref="dialog">
4+
<div class="fullscreen bg-grey-darken-4">
55
<div class="flex">
66
<div v-show="!hideUi" class="float-left" v-ripple="hasPreviousFullscreenPost" @click="showPreviousImage">
77
<v-icon size="50" v-if="hasPreviousFullscreenPost">
@@ -90,7 +90,7 @@ document.querySelector("#app")?.addEventListener("fullscreenchange", () => {
9090
appIsFullscreen.value = !!document.fullscreenElement;
9191
});
9292
93-
const emit = defineEmits(["close", "next-post", "previous-post"]);
93+
const emit = defineEmits(["close", "next-post", "previous-post", "set-post-favorite", "open-post-details"]);
9494
9595
9696
const props = defineProps({
@@ -115,7 +115,6 @@ const blacklist = useBlacklistStore();
115115
const posts = usePostsStore();
116116
const shortcutService = useShortcutService();
117117
118-
const dialog = ref<Vue>();
119118
const lastFullscreenId = ref<number | null>();
120119
const isZoomed = ref(false);
121120
const postIsBlacklisted = computed(() =>
@@ -186,7 +185,7 @@ const showPreviousImage = () => {
186185
};
187186
188187
const updateFavorite = (favorited: (current: boolean) => boolean) => () =>
189-
props.current && !props.current?.__meta.isFavoriteLoading && props.current.is_favorited !== favorited(props.current.is_favorited) && context.emit("set-post-favorite", {
188+
props.current && !props.current?.__meta.isFavoriteLoading && props.current.is_favorited !== favorited(props.current.is_favorited) && emit("set-post-favorite", {
190189
postId: props.current.id,
191190
favorited: favorited(props.current.is_favorited),
192191
} as Parameters<ReturnType<typeof usePostListManager>["setPostFavorite"]>["0"]);

src/Post/PostButtons.vue

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,14 @@
11
<template>
22
<div>
3-
<post-button
4-
:post="post"
5-
v-for="(button, idx) in buttons"
6-
:key="idx"
7-
:type="button"
3+
<post-button :post="post" v-for="(button, idx) in buttons" :key="idx" :type="button"
84
@open-post-details="$emit('open-post-details', $event)"
95
@open-post-fullscreen="$emit('open-post-fullscreen', $event)"
10-
@set-post-favorite="$emit('set-post-favorite', $event)"
11-
/>
6+
@set-post-favorite="$emit('set-post-favorite', $event)" />
127
</div>
138
</template>
149

1510
<script lang="ts">
1611
import type { ButtonType } from "@/services/types";
17-
import { Post } from "@/worker/api";
1812
import type { EnhancedPost } from "@/worker/ApiService";
1913
import type { PropType } from "vue";
2014
import { defineComponent } from "vue";

src/Post/PostsPage.vue

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,23 @@
22
<div>
33
<portal to="toolbar">
44
<div style="display: flex; align-items: center; flex-grow: 999;">
5-
<tag-search v-view-transition-name="'tagsearch'" style="flex: 1 1 auto" :tags="tags" @add-tag="addTag" @remove-tag="removeTag"
6-
@confirm-search="updateQuery() && onSearchClick()" label="Tags" />
7-
<v-btn icon @click="updateQuery() && onSearchClick()" :loading="loading">
5+
<tag-search v-view-transition-name="'tagsearch'" style="flex: 1 1 auto" :tags="tags" @add-tag="addTag"
6+
@remove-tag="removeTag" @confirm-search="updateQuery(), onSearchClick()" label="Tags" />
7+
<v-btn icon @click="updateQuery(), onSearchClick()" :loading="loading">
88
<v-icon>mdi-magnify</v-icon>
99
</v-btn>
10-
<v-menu location="bottom left" max-height="300" offset-y transition="slide-y-transition"
11-
v-if="mdAndUp">
10+
<v-menu location="bottom left" max-height="300" offset-y transition="slide-y-transition" v-if="mdAndUp">
1211
<template #activator="{ props }">
1312
<v-btn v-bind="props" icon>
1413
<v-icon>mdi-history</v-icon>
1514
</v-btn>
1615
</template>
17-
<history-list :entries="historyEntries" @delete-entry="removeHistoryEntry($event)"
18-
@click-entry="onHistoryEntryClick" />
16+
<v-card>
17+
<v-card-text>
18+
<history-list :entries="historyEntries" @delete-entry="removeHistoryEntry($event)"
19+
@click-entry="onHistoryEntryClick" />
20+
</v-card-text>
21+
</v-card>
1922
</v-menu>
2023
</div>
2124
</portal>
@@ -61,7 +64,7 @@ const { tags, addTag, removeTag, updateQuery, query, setTags } =
6164
const urlStore = useUrlStore();
6265
const route = useRoute();
6366
64-
const {removeRouterQuery, updateRouterQuery} = useRouterQueryHelpers();
67+
const { removeRouterQuery, updateRouterQuery } = useRouterQueryHelpers();
6568
6669
const {
6770
loadPreviousPage,

src/Post/ZoomPanImage.vue

Lines changed: 13 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,7 @@
11
<template>
2-
<div
3-
ref="middle"
4-
class="middle bg-black"
5-
@wheel="onScroll"
6-
@mousewheel="onScroll"
7-
>
8-
<div
9-
ref="overflow"
10-
class="overflow"
11-
@mousedown.prevent="onMouseDown"
12-
@mouseup="onMouseUp"
13-
>
14-
<div
15-
:style="containerStyle"
16-
ref="zoom"
17-
class="zoom-container text-center"
18-
style="position: relative"
19-
>
2+
<div ref="middle" class="middle bg-black" @wheel="onScroll" @mousewheel="onScroll">
3+
<div ref="overflow" class="overflow" @mousedown.prevent="onMouseDown" @mouseup="onMouseUp">
4+
<div :style="containerStyle" ref="zoom" class="zoom-container text-center" style="position: relative">
205
<slot />
216
</div>
227
</div>
@@ -48,8 +33,8 @@ export default defineComponent({
4833
startLevel: 0,
4934
};
5035
51-
const middle = ref<Element>();
52-
const zoom = ref<Element>();
36+
const middle = ref<HTMLElement>();
37+
const zoom = ref<HTMLElement>();
5338
5439
const currentZoom = reactive(clone(initialZoom));
5540
@@ -64,7 +49,7 @@ export default defineComponent({
6449
hammer.destroy();
6550
hammer = null;
6651
}
67-
if(!middle.value) return;
52+
if (!middle.value) return;
6853
hammer = new Hammer.Manager(middle.value, {
6954
recognizers: [
7055
[Hammer.Tap],
@@ -77,16 +62,16 @@ export default defineComponent({
7762
[Hammer.Pinch, { enable: true, threshold: 0.01 }, ["pan"]],
7863
],
7964
});
80-
hammer.on("swipeleft", (event) => {
65+
hammer.on("swipeleft", () => {
8166
context.emit("swipe-left", zoomInfo.value);
8267
});
83-
hammer.on("swiperight", (event) => {
68+
hammer.on("swiperight", () => {
8469
context.emit("swipe-right", zoomInfo.value);
8570
});
86-
hammer.on("swipedown", (event) => {
71+
hammer.on("swipedown", () => {
8772
context.emit("swipe-down", zoomInfo.value);
8873
});
89-
hammer.on("swipeup", (event) => {
74+
hammer.on("swipeup", () => {
9075
context.emit("swipe-up", zoomInfo.value);
9176
});
9277
hammer.on("pinchstart", () => {
@@ -106,7 +91,7 @@ export default defineComponent({
10691
};
10792
10893
const constrainZoom = () => {
109-
if(!middle.value || !zoom.value) return;
94+
if (!middle.value || !zoom.value) return;
11095
const padding = 0;
11196
const constraints = {
11297
left: {
@@ -203,9 +188,8 @@ export default defineComponent({
203188
const zoom = currentZoom;
204189
const style = {
205190
"transform-origin": "top left",
206-
transform: `translate(${-zoom.left}px, ${-zoom.top}px) scale(${
207-
zoom.level
208-
})`,
191+
transform: `translate(${-zoom.left}px, ${-zoom.top}px) scale(${zoom.level
192+
})`,
209193
display: "block",
210194
};
211195
return style;

src/Settings/KeyboardShortcutEditor.vue

Lines changed: 6 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
<template>
2-
<v-data-table
3-
disable-sort
4-
:headers="headers"
5-
:items="shortcuts"
6-
>
2+
<v-data-table disable-sort :headers="headers" :items="shortcuts">
73
<template #top>
84
<div class="pa-2">
95
<v-dialog v-model="dialog" max-width="500px">
@@ -21,23 +17,13 @@
2117
<v-container>
2218
<v-row>
2319
<v-col cols="12" sm="6">
24-
<v-select
25-
:items="actions"
26-
v-model="editedItem.action"
27-
label="Action"
28-
/>
20+
<v-select :items="actions" v-model="editedItem.action" label="Action" />
2921
</v-col>
3022
<v-col cols="12" sm="6">
31-
<v-text-field
32-
v-model="editedItem.sequence"
33-
label="Recorded sequence"
34-
readonly
35-
/>
23+
<v-text-field v-model="editedItem.sequence" label="Recorded sequence" readonly />
3624
</v-col>
3725
<v-col cols="12">
38-
<keyboard-shortcut-recorder
39-
@recorded="editedItem.sequence = $event"
40-
/>
26+
<keyboard-shortcut-recorder @recorded="editedItem.sequence = $event" />
4127
</v-col>
4228
</v-row>
4329
</v-container>
@@ -89,13 +75,14 @@ import {
8975
import { clone } from "lodash";
9076
import KeyboardShortcutRecorder from "./KeyboardShortcutRecorder.vue";
9177
import { useShortcutStore } from "@/services";
78+
import type { DataTableHeader } from "vuetify";
9279
9380
export default defineComponent({
9481
props: {},
9582
components: { KeyboardShortcutRecorder },
9683
setup(props, context) {
9784
const shortcutStore = useShortcutStore();
98-
const headers = [
85+
const headers: DataTableHeader[] = [
9986
{ title: "Action", value: "action" },
10087
{ title: "Sequence", value: "sequence" },
10188
{ title: "", value: "buttons", align: "end" },

0 commit comments

Comments
 (0)