mirror of
https://github.com/paricafe/misskey.git
synced 2024-11-28 09:36:43 -06:00
fix noteClickToOpen in MkSub
This commit is contained in:
parent
37491881fd
commit
91b3a27e02
1 changed files with 11 additions and 0 deletions
|
@ -36,11 +36,22 @@ import MkMediaList from '@/components/MkMediaList.vue';
|
||||||
import MkPoll from '@/components/MkPoll.vue';
|
import MkPoll from '@/components/MkPoll.vue';
|
||||||
import { i18n } from '@/i18n.js';
|
import { i18n } from '@/i18n.js';
|
||||||
import { shouldCollapsed } from '@@/js/collapsed.js';
|
import { shouldCollapsed } from '@@/js/collapsed.js';
|
||||||
|
import { defaultStore } from '@/store.js';
|
||||||
|
import { useRouter } from '@/router/supplier.js';
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
note: Misskey.entities.Note;
|
note: Misskey.entities.Note;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
|
const router = useRouter();
|
||||||
|
|
||||||
|
function noteClickToOpen(id: string) {
|
||||||
|
const selection = document.getSelection();
|
||||||
|
if (selection?.toString().length === 0) {
|
||||||
|
router.push(`/notes/${id}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const isLong = shouldCollapsed(props.note, []);
|
const isLong = shouldCollapsed(props.note, []);
|
||||||
|
|
||||||
const collapsed = ref(isLong);
|
const collapsed = ref(isLong);
|
||||||
|
|
Loading…
Reference in a new issue