Compare commits

...

3 Commits

Author SHA1 Message Date
naskya 3af8f86924
chore: lint 2024-05-09 02:06:10 +09:00
naskya 276cabbbe3
ci: fix clippy task 2024-05-09 01:15:09 +09:00
naskya af14bee31f
docs: update changelog 2024-05-09 00:41:49 +09:00
8 changed files with 26 additions and 20 deletions

View File

@ -185,6 +185,7 @@ cargo_clippy:
when: never
services: []
before_script:
- apt-get update && apt-get -y upgrade
- apt-get install -y --no-install-recommends build-essential clang mold perl
- cp ci/cargo/config.toml /usr/local/cargo/config.toml
- rustup component add clippy

View File

@ -5,6 +5,11 @@ Critical security updates are indicated by the :warning: icon.
- Server administrators should check [notice-for-admins.md](./notice-for-admins.md) as well.
- Third-party client/bot developers may want to check [api-change.md](./api-change.md) as well.
## Unreleased
- Improve timeline UX
- Fix bugs
## [v20240504](https://firefish.dev/firefish/firefish/-/merge_requests/10790/commits)
- Fix bugs

View File

@ -18,8 +18,8 @@
class="reply-to"
/>
<MkNoteSub
v-else-if="!detailedView && !collapsedReply && parents"
v-for="n of parents"
v-else-if="!detailedView && !collapsedReply && parents"
:key="n.id"
:note="n"
class="reply-to"
@ -354,7 +354,7 @@ import { deepClone } from "@/scripts/clone";
import { getNoteSummary } from "@/scripts/get-note-summary";
import icon from "@/scripts/icon";
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<{
note: NoteType;
@ -368,7 +368,7 @@ const props = defineProps<{
isLongJudger?: (note: entities.Note) => boolean;
}>();
//#region Constants
// #region Constants
const router = useRouter();
const inChannel = inject("inChannel", null);
const keymap = {
@ -398,9 +398,9 @@ const currentClipPage = inject<Ref<entities.Clip> | null>(
"currentClipPage",
null,
);
//#endregion
// #endregion
//#region Variables bound to Notes
// #region Variables bound to Notes
let capture: ReturnType<typeof useNoteCapture> | undefined;
const note = ref(deepClone(props.note));
const postIsExpanded = ref(false);
@ -408,9 +408,9 @@ const translation = ref<NoteTranslation | null>(null);
const translating = ref(false);
const isDeleted = ref(false);
const renotes = ref(props.renotes?.filter((rn) => !_isDeleted(rn.id)));
//#endregion
// #endregion
//#region computed
// #region computed
const renotesSliced = computed(() => renotes.value?.slice(0, 5));
@ -470,7 +470,7 @@ const accessibleLabel = computed(() => {
label += `${date.toLocaleTimeString()}`;
return label;
});
//#endregion
// #endregion
async function pluginInit(newNote: NoteType) {
// plugin

View File

@ -1,9 +1,9 @@
<template>
<div
v-show="!deleted"
ref="el"
v-size="{ min: [350, 500] }"
class="yohlumlk"
ref="el"
>
<MkAvatar class="avatar" :user="note.user" />
<div class="main">
@ -17,9 +17,9 @@
<script lang="ts" setup>
import type { entities } from "firefish-js";
import { computed, ref, watch } from "vue";
import XNoteHeader from "@/components/MkNoteHeader.vue";
import MkSubNoteContent from "@/components/MkSubNoteContent.vue";
import { computed, ref, watch } from "vue";
import { deepClone } from "@/scripts/clone";
import { useNoteCapture } from "@/scripts/use-note-capture";
import { isDeleted } from "@/scripts/note";

View File

@ -28,9 +28,9 @@
ref="tlComponent"
:no-gap="!defaultStore.state.showGapBetweenNotesInTimeline"
:pagination="pagination"
:folder
@queue="(x) => (queue = x)"
@status="pullToRefreshComponent?.setDisabled($event)"
:folder
/>
</MkPullToRefresh>
<XNotes
@ -38,9 +38,9 @@
ref="tlComponent"
:no-gap="!defaultStore.state.showGapBetweenNotesInTimeline"
:pagination="pagination"
:folder
@queue="(x) => (queue = x)"
@status="pullToRefreshComponent?.setDisabled($event)"
:folder
/>
</template>

View File

@ -14,10 +14,10 @@
>
</template>
</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>
</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 })}}
</button>
</template>

View File

@ -1,11 +1,11 @@
import type { entities } from "firefish-js";
import { isDeleted, isRenote } from "./note";
import type {
FoldableNotification,
NotificationFolded,
} from "@/types/notification";
import type { NoteType, NoteThread, NoteFolded } from "@/types/note";
import type { NoteFolded, NoteThread, NoteType } from "@/types/note";
import { me } from "@/me";
import { isDeleted, isRenote } from "./note";
interface FoldOption {
/** If items length is 1, skip aggregation */

View File

@ -12,19 +12,19 @@ export type NoteType = entities.Note & {
_prId_?: string;
};
export type NoteFolded = {
export interface NoteFolded {
id: string;
key: string;
createdAt: entities.Note["createdAt"];
folded: "renote";
note: entities.Note;
renotesArr: entities.Note[];
};
}
export type NoteThread = {
export interface NoteThread {
id: string;
createdAt: entities.Note["createdAt"];
folded: "thread";
note: entities.Note;
parents: entities.Note[];
};
}