summaryrefslogtreecommitdiff
path: root/packages/client/src/components
diff options
context:
space:
mode:
authorfutchitwo <74236683+futchitwo@users.noreply.github.com>2022-06-18 18:27:09 +0900
committerGitHub <noreply@github.com>2022-06-18 18:27:09 +0900
commit5b7595d9d7e313271c692a849fc915e73fcea108 (patch)
tree2e20578ce771986d813bba100004469f37c65b24 /packages/client/src/components
parentRefactor clip page to Composition API (#8822) (diff)
downloadmisskey-5b7595d9d7e313271c692a849fc915e73fcea108.tar.gz
misskey-5b7595d9d7e313271c692a849fc915e73fcea108.tar.bz2
misskey-5b7595d9d7e313271c692a849fc915e73fcea108.zip
Improve: unclip (#8823)
* Refactor clip page to use Composition API * Refactor clip page * Refactor clip page * Refactor clip page * Improve: unclip * Fix unclip * Fix unclip * chore: better type and name * Fix * Fix clipPage vue provider Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>
Diffstat (limited to 'packages/client/src/components')
-rw-r--r--packages/client/src/components/note-detailed.vue4
-rw-r--r--packages/client/src/components/note.vue8
2 files changed, 7 insertions, 5 deletions
diff --git a/packages/client/src/components/note-detailed.vue b/packages/client/src/components/note-detailed.vue
index 6234b710d2..ba47bfcd4a 100644
--- a/packages/client/src/components/note-detailed.vue
+++ b/packages/client/src/components/note-detailed.vue
@@ -251,12 +251,12 @@ function onContextmenu(ev: MouseEvent): void {
ev.preventDefault();
react();
} else {
- os.contextMenu(getNoteMenu({ note: note, translating, translation, menuButton }), ev).then(focus);
+ os.contextMenu(getNoteMenu({ note: note, translating, translation, menuButton, isDeleted }), ev).then(focus);
}
}
function menu(viaKeyboard = false): void {
- os.popupMenu(getNoteMenu({ note: note, translating, translation, menuButton }), menuButton.value, {
+ os.popupMenu(getNoteMenu({ note: note, translating, translation, menuButton, isDeleted }), menuButton.value, {
viaKeyboard,
}).then(focus);
}
diff --git a/packages/client/src/components/note.vue b/packages/client/src/components/note.vue
index e5744d1ce9..b06f4edd0a 100644
--- a/packages/client/src/components/note.vue
+++ b/packages/client/src/components/note.vue
@@ -105,7 +105,7 @@
</template>
<script lang="ts" setup>
-import { computed, inject, onMounted, onUnmounted, reactive, ref } from 'vue';
+import { computed, inject, onMounted, onUnmounted, reactive, ref, Ref } from 'vue';
import * as mfm from 'mfm-js';
import * as misskey from 'misskey-js';
import MkNoteSub from './MkNoteSub.vue';
@@ -225,6 +225,8 @@ function undoReact(note): void {
});
}
+const cullentClipPage = inject<Ref<misskey.entities.Clip>>('cullentClipPage');
+
function onContextmenu(ev: MouseEvent): void {
const isLink = (el: HTMLElement) => {
if (el.tagName === 'A') return true;
@@ -239,12 +241,12 @@ function onContextmenu(ev: MouseEvent): void {
ev.preventDefault();
react();
} else {
- os.contextMenu(getNoteMenu({ note: note, translating, translation, menuButton }), ev).then(focus);
+ os.contextMenu(getNoteMenu({ note: note, translating, translation, menuButton, isDeleted, cullentClipPage }), ev).then(focus);
}
}
function menu(viaKeyboard = false): void {
- os.popupMenu(getNoteMenu({ note: note, translating, translation, menuButton }), menuButton.value, {
+ os.popupMenu(getNoteMenu({ note: note, translating, translation, menuButton, isDeleted, cullentClipPage }), menuButton.value, {
viaKeyboard,
}).then(focus);
}