Compare commits

...

4 Commits

Author SHA1 Message Date
Natty 7f88144dcb Unfucked note view 2023-11-26 18:31:06 +00:00
Natty fb4973eb8b Also try URI for remote note links 2023-11-26 18:23:22 +00:00
Natty 0648b9ff9f Remote copy button 2023-11-26 18:23:22 +00:00
Natty 45594d6d91 Fixed Dockerfile for Podman 2023-11-26 18:23:22 +00:00
4 changed files with 33 additions and 35 deletions

View File

@ -18,17 +18,17 @@ RUN corepack enable
WORKDIR /misskey
COPY --link ["pnpm-lock.yaml", "pnpm-workspace.yaml", "package.json", "./"]
COPY --link ["scripts", "./scripts"]
COPY --link ["packages/backend/package.json", "./packages/backend/"]
COPY --link ["packages/frontend/package.json", "./packages/frontend/"]
COPY --link ["packages/sw/package.json", "./packages/sw/"]
COPY --link ["packages/misskey-js/package.json", "./packages/misskey-js/"]
COPY ["pnpm-lock.yaml", "pnpm-workspace.yaml", "package.json", "./"]
COPY ["scripts", "./scripts"]
COPY ["packages/backend/package.json", "./packages/backend/"]
COPY ["packages/frontend/package.json", "./packages/frontend/"]
COPY ["packages/sw/package.json", "./packages/sw/"]
COPY ["packages/misskey-js/package.json", "./packages/misskey-js/"]
RUN --mount=type=cache,target=/root/.local/share/pnpm/store,sharing=locked \
pnpm i --frozen-lockfile --aggregate-output
COPY --link . ./
COPY . ./
ARG NODE_ENV=production
@ -48,9 +48,9 @@ RUN corepack enable
WORKDIR /misskey
COPY --link ["pnpm-lock.yaml", "pnpm-workspace.yaml", "package.json", "./"]
COPY --link ["scripts", "./scripts"]
COPY --link ["packages/backend/package.json", "./packages/backend/"]
COPY ["pnpm-lock.yaml", "pnpm-workspace.yaml", "package.json", "./"]
COPY ["scripts", "./scripts"]
COPY ["packages/backend/package.json", "./packages/backend/"]
RUN --mount=type=cache,target=/root/.local/share/pnpm/store,sharing=locked \
pnpm i --frozen-lockfile --aggregate-output

View File

@ -45,6 +45,7 @@ pin: "Pin to profile"
unpin: "Unpin from profile"
copyContent: "Copy contents"
copyLink: "Copy link"
copyLinkRemote: "Copy remote link"
copyLinkRenote: "Copy renote link"
delete: "Delete"
deleteAndEdit: "Delete and edit"

View File

@ -11,12 +11,7 @@ SPDX-License-Identifier: AGPL-3.0-only
v-hotkey="keymap"
:class="$style.root"
>
<div v-if="appearNote.reply && appearNote.reply.replyId">
<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"/>
<div v-if="isRenote" :class="$style.renote">
<MkAvatar :class="$style.renoteAvatar" :user="note.user" link preview/>
@ -146,9 +141,6 @@ SPDX-License-Identifier: AGPL-3.0-only
</div>
<div>
<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"/>
</div>
<div v-else-if="tab === 'renotes'" :class="$style.tab_renotes">
@ -460,22 +452,14 @@ function blur() {
el.value.blur();
}
const repliesLoaded = ref(false);
function loadReplies() {
repliesLoaded.value = true;
os.api('notes/children', {
os.api('notes/children', {
noteId: appearNote.id,
limit: 30,
}).then(res => {
}).then(res => {
replies.value = res;
});
}
});
const conversationLoaded = ref(false);
function loadConversation() {
conversationLoaded.value = true;
if (appearNote.replyId) {
os.api('notes/conversation', {
noteId: appearNote.replyId,
}).then(res => {

View File

@ -118,6 +118,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: {
note: Misskey.entities.Note;
menuButton: Ref<HTMLElement>;
@ -273,6 +284,7 @@ export function getNoteMenu(props: {
text: i18n.ts.copyContent,
action: copyContent,
}, getCopyNoteLinkMenu(appearNote, i18n.ts.copyLink)
, getCopyNoteLinkRemoteMenu(appearNote, i18n.ts.copyLinkRemote)
, (appearNote.url || appearNote.uri) ? {
icon: 'ti ti-external-link',
text: i18n.ts.showOnRemote,
@ -377,6 +389,7 @@ export function getNoteMenu(props: {
text: i18n.ts.copyContent,
action: copyContent,
}, getCopyNoteLinkMenu(appearNote, i18n.ts.copyLink)
, getCopyNoteLinkRemoteMenu(appearNote, i18n.ts.copyLinkRemote)
, (appearNote.url || appearNote.uri) ? {
icon: 'ti ti-external-link',
text: i18n.ts.showOnRemote,