chore: lint
This commit is contained in:
parent
276cabbbe3
commit
3af8f86924
6 changed files with 20 additions and 20 deletions
|
@ -18,8 +18,8 @@
|
||||||
class="reply-to"
|
class="reply-to"
|
||||||
/>
|
/>
|
||||||
<MkNoteSub
|
<MkNoteSub
|
||||||
v-else-if="!detailedView && !collapsedReply && parents"
|
|
||||||
v-for="n of parents"
|
v-for="n of parents"
|
||||||
|
v-else-if="!detailedView && !collapsedReply && parents"
|
||||||
:key="n.id"
|
:key="n.id"
|
||||||
:note="n"
|
:note="n"
|
||||||
class="reply-to"
|
class="reply-to"
|
||||||
|
@ -354,7 +354,7 @@ import { deepClone } from "@/scripts/clone";
|
||||||
import { getNoteSummary } from "@/scripts/get-note-summary";
|
import { getNoteSummary } from "@/scripts/get-note-summary";
|
||||||
import icon from "@/scripts/icon";
|
import icon from "@/scripts/icon";
|
||||||
import type { NoteTranslation, NoteType } from "@/types/note";
|
import type { NoteTranslation, NoteType } from "@/types/note";
|
||||||
import { isRenote as _isRenote, isDeleted as _isDeleted } from "@/scripts/note";
|
import { isDeleted as _isDeleted, isRenote as _isRenote } from "@/scripts/note";
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
note: NoteType;
|
note: NoteType;
|
||||||
|
@ -368,7 +368,7 @@ const props = defineProps<{
|
||||||
isLongJudger?: (note: entities.Note) => boolean;
|
isLongJudger?: (note: entities.Note) => boolean;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
//#region Constants
|
// #region Constants
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const inChannel = inject("inChannel", null);
|
const inChannel = inject("inChannel", null);
|
||||||
const keymap = {
|
const keymap = {
|
||||||
|
@ -398,9 +398,9 @@ const currentClipPage = inject<Ref<entities.Clip> | null>(
|
||||||
"currentClipPage",
|
"currentClipPage",
|
||||||
null,
|
null,
|
||||||
);
|
);
|
||||||
//#endregion
|
// #endregion
|
||||||
|
|
||||||
//#region Variables bound to Notes
|
// #region Variables bound to Notes
|
||||||
let capture: ReturnType<typeof useNoteCapture> | undefined;
|
let capture: ReturnType<typeof useNoteCapture> | undefined;
|
||||||
const note = ref(deepClone(props.note));
|
const note = ref(deepClone(props.note));
|
||||||
const postIsExpanded = ref(false);
|
const postIsExpanded = ref(false);
|
||||||
|
@ -408,9 +408,9 @@ const translation = ref<NoteTranslation | null>(null);
|
||||||
const translating = ref(false);
|
const translating = ref(false);
|
||||||
const isDeleted = ref(false);
|
const isDeleted = ref(false);
|
||||||
const renotes = ref(props.renotes?.filter((rn) => !_isDeleted(rn.id)));
|
const renotes = ref(props.renotes?.filter((rn) => !_isDeleted(rn.id)));
|
||||||
//#endregion
|
// #endregion
|
||||||
|
|
||||||
//#region computed
|
// #region computed
|
||||||
|
|
||||||
const renotesSliced = computed(() => renotes.value?.slice(0, 5));
|
const renotesSliced = computed(() => renotes.value?.slice(0, 5));
|
||||||
|
|
||||||
|
@ -470,7 +470,7 @@ const accessibleLabel = computed(() => {
|
||||||
label += `${date.toLocaleTimeString()}`;
|
label += `${date.toLocaleTimeString()}`;
|
||||||
return label;
|
return label;
|
||||||
});
|
});
|
||||||
//#endregion
|
// #endregion
|
||||||
|
|
||||||
async function pluginInit(newNote: NoteType) {
|
async function pluginInit(newNote: NoteType) {
|
||||||
// plugin
|
// plugin
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
<template>
|
<template>
|
||||||
<div
|
<div
|
||||||
v-show="!deleted"
|
v-show="!deleted"
|
||||||
|
ref="el"
|
||||||
v-size="{ min: [350, 500] }"
|
v-size="{ min: [350, 500] }"
|
||||||
class="yohlumlk"
|
class="yohlumlk"
|
||||||
ref="el"
|
|
||||||
>
|
>
|
||||||
<MkAvatar class="avatar" :user="note.user" />
|
<MkAvatar class="avatar" :user="note.user" />
|
||||||
<div class="main">
|
<div class="main">
|
||||||
|
@ -17,9 +17,9 @@
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import type { entities } from "firefish-js";
|
import type { entities } from "firefish-js";
|
||||||
|
import { computed, ref, watch } from "vue";
|
||||||
import XNoteHeader from "@/components/MkNoteHeader.vue";
|
import XNoteHeader from "@/components/MkNoteHeader.vue";
|
||||||
import MkSubNoteContent from "@/components/MkSubNoteContent.vue";
|
import MkSubNoteContent from "@/components/MkSubNoteContent.vue";
|
||||||
import { computed, ref, watch } from "vue";
|
|
||||||
import { deepClone } from "@/scripts/clone";
|
import { deepClone } from "@/scripts/clone";
|
||||||
import { useNoteCapture } from "@/scripts/use-note-capture";
|
import { useNoteCapture } from "@/scripts/use-note-capture";
|
||||||
import { isDeleted } from "@/scripts/note";
|
import { isDeleted } from "@/scripts/note";
|
||||||
|
|
|
@ -28,9 +28,9 @@
|
||||||
ref="tlComponent"
|
ref="tlComponent"
|
||||||
:no-gap="!defaultStore.state.showGapBetweenNotesInTimeline"
|
:no-gap="!defaultStore.state.showGapBetweenNotesInTimeline"
|
||||||
:pagination="pagination"
|
:pagination="pagination"
|
||||||
|
:folder
|
||||||
@queue="(x) => (queue = x)"
|
@queue="(x) => (queue = x)"
|
||||||
@status="pullToRefreshComponent?.setDisabled($event)"
|
@status="pullToRefreshComponent?.setDisabled($event)"
|
||||||
:folder
|
|
||||||
/>
|
/>
|
||||||
</MkPullToRefresh>
|
</MkPullToRefresh>
|
||||||
<XNotes
|
<XNotes
|
||||||
|
@ -38,9 +38,9 @@
|
||||||
ref="tlComponent"
|
ref="tlComponent"
|
||||||
:no-gap="!defaultStore.state.showGapBetweenNotesInTimeline"
|
:no-gap="!defaultStore.state.showGapBetweenNotesInTimeline"
|
||||||
:pagination="pagination"
|
:pagination="pagination"
|
||||||
|
:folder
|
||||||
@queue="(x) => (queue = x)"
|
@queue="(x) => (queue = x)"
|
||||||
@status="pullToRefreshComponent?.setDisabled($event)"
|
@status="pullToRefreshComponent?.setDisabled($event)"
|
||||||
:folder
|
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
|
@ -14,10 +14,10 @@
|
||||||
>
|
>
|
||||||
</template>
|
</template>
|
||||||
</I18n>
|
</I18n>
|
||||||
<I18n :src="i18n.ts.i18nServerInfo" v-if="serverLang" tag="span">
|
<I18n v-if="serverLang" :src="i18n.ts.i18nServerInfo" tag="span">
|
||||||
<template #language><strong>{{ langs.find(a => a[0] === serverLang)?.[1] ?? serverLang }}</strong></template>
|
<template #language><strong>{{ langs.find(a => a[0] === serverLang)?.[1] ?? serverLang }}</strong></template>
|
||||||
</I18n>
|
</I18n>
|
||||||
<button class="_textButton" @click="updateServerLang" v-if="lang && lang !== serverLang">
|
<button v-if="lang && lang !== serverLang" class="_textButton" @click="updateServerLang">
|
||||||
{{i18n.t(serverLang ? "i18nServerChange" : "i18nServerSet", { language: langs.find(a => a[0] === lang)?.[1] ?? lang })}}
|
{{i18n.t(serverLang ? "i18nServerChange" : "i18nServerSet", { language: langs.find(a => a[0] === lang)?.[1] ?? lang })}}
|
||||||
</button>
|
</button>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
import type { entities } from "firefish-js";
|
import type { entities } from "firefish-js";
|
||||||
|
import { isDeleted, isRenote } from "./note";
|
||||||
import type {
|
import type {
|
||||||
FoldableNotification,
|
FoldableNotification,
|
||||||
NotificationFolded,
|
NotificationFolded,
|
||||||
} from "@/types/notification";
|
} from "@/types/notification";
|
||||||
import type { NoteType, NoteThread, NoteFolded } from "@/types/note";
|
import type { NoteFolded, NoteThread, NoteType } from "@/types/note";
|
||||||
import { me } from "@/me";
|
import { me } from "@/me";
|
||||||
import { isDeleted, isRenote } from "./note";
|
|
||||||
|
|
||||||
interface FoldOption {
|
interface FoldOption {
|
||||||
/** If items length is 1, skip aggregation */
|
/** If items length is 1, skip aggregation */
|
||||||
|
|
|
@ -12,19 +12,19 @@ export type NoteType = entities.Note & {
|
||||||
_prId_?: string;
|
_prId_?: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type NoteFolded = {
|
export interface NoteFolded {
|
||||||
id: string;
|
id: string;
|
||||||
key: string;
|
key: string;
|
||||||
createdAt: entities.Note["createdAt"];
|
createdAt: entities.Note["createdAt"];
|
||||||
folded: "renote";
|
folded: "renote";
|
||||||
note: entities.Note;
|
note: entities.Note;
|
||||||
renotesArr: entities.Note[];
|
renotesArr: entities.Note[];
|
||||||
};
|
}
|
||||||
|
|
||||||
export type NoteThread = {
|
export interface NoteThread {
|
||||||
id: string;
|
id: string;
|
||||||
createdAt: entities.Note["createdAt"];
|
createdAt: entities.Note["createdAt"];
|
||||||
folded: "thread";
|
folded: "thread";
|
||||||
note: entities.Note;
|
note: entities.Note;
|
||||||
parents: entities.Note[];
|
parents: entities.Note[];
|
||||||
};
|
}
|
||||||
|
|
Loading…
Reference in a new issue