Compare commits
4 Commits
7f88144dcb
...
265f96221f
Author | SHA1 | Date |
---|---|---|
Natty | 265f96221f | |
Natty | a2954851e0 | |
Natty | b35a8cb9a2 | |
Natty | 0428e449b5 |
20
Dockerfile
20
Dockerfile
|
@ -18,17 +18,17 @@ RUN corepack enable
|
||||||
|
|
||||||
WORKDIR /misskey
|
WORKDIR /misskey
|
||||||
|
|
||||||
COPY --link ["pnpm-lock.yaml", "pnpm-workspace.yaml", "package.json", "./"]
|
COPY ["pnpm-lock.yaml", "pnpm-workspace.yaml", "package.json", "./"]
|
||||||
COPY --link ["scripts", "./scripts"]
|
COPY ["scripts", "./scripts"]
|
||||||
COPY --link ["packages/backend/package.json", "./packages/backend/"]
|
COPY ["packages/backend/package.json", "./packages/backend/"]
|
||||||
COPY --link ["packages/frontend/package.json", "./packages/frontend/"]
|
COPY ["packages/frontend/package.json", "./packages/frontend/"]
|
||||||
COPY --link ["packages/sw/package.json", "./packages/sw/"]
|
COPY ["packages/sw/package.json", "./packages/sw/"]
|
||||||
COPY --link ["packages/misskey-js/package.json", "./packages/misskey-js/"]
|
COPY ["packages/misskey-js/package.json", "./packages/misskey-js/"]
|
||||||
|
|
||||||
RUN --mount=type=cache,target=/root/.local/share/pnpm/store,sharing=locked \
|
RUN --mount=type=cache,target=/root/.local/share/pnpm/store,sharing=locked \
|
||||||
pnpm i --frozen-lockfile --aggregate-output
|
pnpm i --frozen-lockfile --aggregate-output
|
||||||
|
|
||||||
COPY --link . ./
|
COPY . ./
|
||||||
|
|
||||||
ARG NODE_ENV=production
|
ARG NODE_ENV=production
|
||||||
|
|
||||||
|
@ -48,9 +48,9 @@ RUN corepack enable
|
||||||
|
|
||||||
WORKDIR /misskey
|
WORKDIR /misskey
|
||||||
|
|
||||||
COPY --link ["pnpm-lock.yaml", "pnpm-workspace.yaml", "package.json", "./"]
|
COPY ["pnpm-lock.yaml", "pnpm-workspace.yaml", "package.json", "./"]
|
||||||
COPY --link ["scripts", "./scripts"]
|
COPY ["scripts", "./scripts"]
|
||||||
COPY --link ["packages/backend/package.json", "./packages/backend/"]
|
COPY ["packages/backend/package.json", "./packages/backend/"]
|
||||||
|
|
||||||
RUN --mount=type=cache,target=/root/.local/share/pnpm/store,sharing=locked \
|
RUN --mount=type=cache,target=/root/.local/share/pnpm/store,sharing=locked \
|
||||||
pnpm i --frozen-lockfile --aggregate-output
|
pnpm i --frozen-lockfile --aggregate-output
|
||||||
|
|
|
@ -45,6 +45,7 @@ pin: "Pin to profile"
|
||||||
unpin: "Unpin from profile"
|
unpin: "Unpin from profile"
|
||||||
copyContent: "Copy contents"
|
copyContent: "Copy contents"
|
||||||
copyLink: "Copy link"
|
copyLink: "Copy link"
|
||||||
|
copyLinkRemote: "Copy remote link"
|
||||||
copyLinkRenote: "Copy renote link"
|
copyLinkRenote: "Copy renote link"
|
||||||
delete: "Delete"
|
delete: "Delete"
|
||||||
deleteAndEdit: "Delete and edit"
|
deleteAndEdit: "Delete and edit"
|
||||||
|
|
|
@ -11,12 +11,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
v-hotkey="keymap"
|
v-hotkey="keymap"
|
||||||
:class="$style.root"
|
:class="$style.root"
|
||||||
>
|
>
|
||||||
<div v-if="appearNote.reply && appearNote.reply.replyId">
|
<MkNoteSub v-for="note in conversation" :key="note.id" :class="$style.replyToMore" :note="note"/>
|
||||||
<div v-if="!conversationLoaded" style="padding: 16px">
|
|
||||||
<MkButton style="margin: 0 auto;" primary rounded @click="loadConversation">{{ i18n.ts.loadConversation }}</MkButton>
|
|
||||||
</div>
|
|
||||||
<MkNoteSub v-for="note in conversation" :key="note.id" :class="$style.replyToMore" :note="note"/>
|
|
||||||
</div>
|
|
||||||
<MkNoteSub v-if="appearNote.reply" :note="appearNote.reply" :class="$style.replyTo"/>
|
<MkNoteSub v-if="appearNote.reply" :note="appearNote.reply" :class="$style.replyTo"/>
|
||||||
<div v-if="isRenote" :class="$style.renote">
|
<div v-if="isRenote" :class="$style.renote">
|
||||||
<MkAvatar :class="$style.renoteAvatar" :user="note.user" link preview/>
|
<MkAvatar :class="$style.renoteAvatar" :user="note.user" link preview/>
|
||||||
|
@ -137,11 +132,8 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<div v-if="tab === 'replies'" :class="$style.tab_replies">
|
<div v-if="tab === 'replies'" :class="$style.tab_replies">
|
||||||
<div v-if="!repliesLoaded" style="padding: 16px">
|
|
||||||
<MkButton style="margin: 0 auto;" primary rounded @click="loadReplies">{{ i18n.ts.loadReplies }}</MkButton>
|
|
||||||
</div>
|
|
||||||
<MkNoteSub v-for="note in replies" :key="note.id" :note="note" :class="$style.reply" :detail="true"/>
|
<MkNoteSub v-for="note in replies" :key="note.id" :note="note" :class="$style.reply" :detail="true"/>
|
||||||
</div>
|
</div>
|
||||||
<div v-else-if="tab === 'renotes'" :class="$style.tab_renotes">
|
<div v-else-if="tab === 'renotes'" :class="$style.tab_renotes">
|
||||||
<MkPagination :pagination="renotesPagination" :disableAutoLoad="true">
|
<MkPagination :pagination="renotesPagination" :disableAutoLoad="true">
|
||||||
<template #default="{ items }">
|
<template #default="{ items }">
|
||||||
|
@ -495,20 +487,14 @@ function blur() {
|
||||||
el.value.blur();
|
el.value.blur();
|
||||||
}
|
}
|
||||||
|
|
||||||
const repliesLoaded = ref(false);
|
os.api('notes/children', {
|
||||||
function loadReplies() {
|
noteId: appearNote.id,
|
||||||
repliesLoaded.value = true;
|
limit: 30,
|
||||||
os.api('notes/children', {
|
}).then(res => {
|
||||||
noteId: appearNote.id,
|
replies.value = res;
|
||||||
limit: 30,
|
});
|
||||||
}).then(res => {
|
|
||||||
replies.value = res;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
const conversationLoaded = ref(false);
|
if (appearNote.replyId) {
|
||||||
function loadConversation() {
|
|
||||||
conversationLoaded.value = true;
|
|
||||||
os.api('notes/conversation', {
|
os.api('notes/conversation', {
|
||||||
noteId: appearNote.replyId,
|
noteId: appearNote.replyId,
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
|
|
|
@ -117,6 +117,17 @@ export function getCopyNoteLinkMenu(note: misskey.entities.Note, text: string):
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function getCopyNoteLinkRemoteMenu(note: misskey.entities.Note, text: string): MenuItem {
|
||||||
|
return (note.url || note.uri) ? {
|
||||||
|
icon: 'ti ti-link',
|
||||||
|
text,
|
||||||
|
action: (): void => {
|
||||||
|
copyToClipboard(note.url || note.uri);
|
||||||
|
os.success();
|
||||||
|
},
|
||||||
|
} : undefined;
|
||||||
|
}
|
||||||
|
|
||||||
export function getNoteMenu(props: {
|
export function getNoteMenu(props: {
|
||||||
note: Misskey.entities.Note;
|
note: Misskey.entities.Note;
|
||||||
menuButton: Ref<HTMLElement>;
|
menuButton: Ref<HTMLElement>;
|
||||||
|
@ -272,6 +283,7 @@ export function getNoteMenu(props: {
|
||||||
text: i18n.ts.copyContent,
|
text: i18n.ts.copyContent,
|
||||||
action: copyContent,
|
action: copyContent,
|
||||||
}, getCopyNoteLinkMenu(appearNote, i18n.ts.copyLink)
|
}, getCopyNoteLinkMenu(appearNote, i18n.ts.copyLink)
|
||||||
|
, getCopyNoteLinkRemoteMenu(appearNote, i18n.ts.copyLinkRemote)
|
||||||
, (appearNote.url || appearNote.uri) ? {
|
, (appearNote.url || appearNote.uri) ? {
|
||||||
icon: 'ti ti-external-link',
|
icon: 'ti ti-external-link',
|
||||||
text: i18n.ts.showOnRemote,
|
text: i18n.ts.showOnRemote,
|
||||||
|
@ -376,6 +388,7 @@ export function getNoteMenu(props: {
|
||||||
text: i18n.ts.copyContent,
|
text: i18n.ts.copyContent,
|
||||||
action: copyContent,
|
action: copyContent,
|
||||||
}, getCopyNoteLinkMenu(appearNote, i18n.ts.copyLink)
|
}, getCopyNoteLinkMenu(appearNote, i18n.ts.copyLink)
|
||||||
|
, getCopyNoteLinkRemoteMenu(appearNote, i18n.ts.copyLinkRemote)
|
||||||
, (appearNote.url || appearNote.uri) ? {
|
, (appearNote.url || appearNote.uri) ? {
|
||||||
icon: 'ti ti-external-link',
|
icon: 'ti ti-external-link',
|
||||||
text: i18n.ts.showOnRemote,
|
text: i18n.ts.showOnRemote,
|
||||||
|
|
Loading…
Reference in New Issue