File tree 4 files changed +10
-5
lines changed
packages/frontend/src/components
4 files changed +10
-5
lines changed Original file line number Diff line number Diff line change 10
10
- Enhance: リアクション受け入れが「いいねのみ」の場合はリアクション絵文字一覧を表示しないように
11
11
- Fix: 一部のページ内リンクが正しく動作しない問題を修正
12
12
- Fix: 周年の実績が閏年を考慮しない問題を修正
13
+ - Fix: ローカルURLのプレビューポップアップが左上に表示される
13
14
14
15
### Server
15
16
- Enhance: エンドポイント` antennas/update ` の必須項目を` antennaId ` のみに
Original file line number Diff line number Diff line change @@ -29,13 +29,13 @@ const self = props.url.startsWith(local);
29
29
const attr = self ? 'to' : 'href';
30
30
const target = self ? null : '_blank';
31
31
32
- const el = ref<HTMLElement>();
32
+ const el = ref<HTMLElement | { $el: HTMLElement } >();
33
33
34
34
useTooltip(el, (showing) => {
35
35
os.popup(defineAsyncComponent(() => import('@/components/MkUrlPreviewPopup.vue')), {
36
36
showing,
37
37
url: props.url,
38
- source: el.value,
38
+ source: el.value instanceof HTMLElement ? el.value : el.value?.$el ,
39
39
}, {}, 'closed');
40
40
});
41
41
</script>
Original file line number Diff line number Diff line change @@ -4,13 +4,13 @@ SPDX-License-Identifier: AGPL-3.0-only
4
4
-->
5
5
6
6
<template>
7
- <a :href="to" :class="active ? activeClass : null" @click.prevent="nav" @contextmenu.prevent.stop="onContextmenu">
7
+ <a ref="el" :href="to" :class="active ? activeClass : null" @click.prevent="nav" @contextmenu.prevent.stop="onContextmenu">
8
8
<slot></slot>
9
9
</a>
10
10
</template>
11
11
12
12
<script lang="ts" setup>
13
- import { computed } from 'vue';
13
+ import { computed, shallowRef } from 'vue';
14
14
import * as os from '@/os.js';
15
15
import copyToClipboard from '@/scripts/copy-to-clipboard.js';
16
16
import { url } from '@/config.js';
@@ -26,6 +26,10 @@ const props = withDefaults(defineProps<{
26
26
behavior: null,
27
27
});
28
28
29
+ const el = shallowRef<HTMLElement>();
30
+
31
+ defineExpose({ $el: el });
32
+
29
33
const router = useRouter();
30
34
31
35
const active = computed(() => {
Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ if (props.showUrlPreview) {
49
49
os.popup(defineAsyncComponent(() => import('@/components/MkUrlPreviewPopup.vue')), {
50
50
showing,
51
51
url: props.url,
52
- source: el.value,
52
+ source: el.value instanceof HTMLElement ? el.value : el.value?.$el ,
53
53
}, {}, 'closed');
54
54
});
55
55
}
You can’t perform that action at this time.
0 commit comments