summaryrefslogtreecommitdiff
path: root/packages/frontend/src/scripts/get-note-menu.ts
diff options
context:
space:
mode:
authorおさむのひと <46447427+samunohito@users.noreply.github.com>2023-11-30 08:15:13 +0900
committerGitHub <noreply@github.com>2023-11-30 08:15:13 +0900
commit413f7bfb44e885c82ba49fc098b620831830d0c5 (patch)
tree00b51ac3e8eaf26fac3eea24aa8f2f204aae7b6e /packages/frontend/src/scripts/get-note-menu.ts
parentenhance(frontend): Shareページでの投稿完了時にpostMessageを発火... (diff)
downloadsharkey-413f7bfb44e885c82ba49fc098b620831830d0c5.tar.gz
sharkey-413f7bfb44e885c82ba49fc098b620831830d0c5.tar.bz2
sharkey-413f7bfb44e885c82ba49fc098b620831830d0c5.zip
Fix: navigator.share未サポートの場合は共有ボタンを非表示にする(+URLのコピーボタンを設置) (#12506)
* navigator.share未サポートの場合は共有ボタンを非表示にする * fix CHANGELOG.md * ライセンス表示追加 * URLのコピーボタンを設置
Diffstat (limited to 'packages/frontend/src/scripts/get-note-menu.ts')
-rw-r--r--packages/frontend/src/scripts/get-note-menu.ts7
1 files changed, 4 insertions, 3 deletions
diff --git a/packages/frontend/src/scripts/get-note-menu.ts b/packages/frontend/src/scripts/get-note-menu.ts
index d0753872ff..763f6ff513 100644
--- a/packages/frontend/src/scripts/get-note-menu.ts
+++ b/packages/frontend/src/scripts/get-note-menu.ts
@@ -18,6 +18,7 @@ import { getUserMenu } from '@/scripts/get-user-menu.js';
import { clipsCache } from '@/cache.js';
import { MenuItem } from '@/types/menu.js';
import MkRippleEffect from '@/components/MkRippleEffect.vue';
+import { isSupportShare } from '@/scripts/navigator.js';
export async function getNoteClipMenu(props: {
note: Misskey.entities.Note;
@@ -280,11 +281,11 @@ export function getNoteMenu(props: {
window.open(appearNote.url ?? appearNote.uri, '_blank');
},
} : undefined,
- {
+ ...(isSupportShare() ? [{
icon: 'ti ti-share',
text: i18n.ts.share,
action: share,
- },
+ }] : []),
$i && $i.policies.canUseTranslator && instance.translatorAvailable ? {
icon: 'ti ti-language-hiragana',
text: i18n.ts.translate,
@@ -484,7 +485,7 @@ export function getRenoteMenu(props: {
}]);
}
- if (!appearNote.channel || appearNote.channel?.allowRenoteToExternal) {
+ if (!appearNote.channel || appearNote.channel.allowRenoteToExternal) {
normalRenoteItems.push(...[{
text: i18n.ts.renote,
icon: 'ti ti-repeat',