投稿排他 (#171) (#345)

#171

#171

#171

#171

#171

#171

#171

Co-authored-by: miteruzo <miteruzo@naver.com>
Reviewed-on: #345
This commit was merged in pull request #345.
This commit is contained in:
2026-05-10 11:16:49 +09:00
parent b47cdc7ad7
commit e03cc01109
30 changed files with 1333 additions and 275 deletions
+13 -5
View File
@@ -3,6 +3,7 @@ import YoutubeEmbed from 'react-youtube'
import NicoViewer from '@/components/NicoViewer'
import TwitterEmbed from '@/components/TwitterEmbed'
import { useDialogue } from '@/components/dialogues/DialogueProvider'
import type { FC, RefObject } from 'react'
@@ -16,6 +17,8 @@ type Props = {
export default (({ ref, post, onLoadComplete, onMetadataChange }: Props) => {
const dialogue = useDialogue ()
const url = new URL (post.url)
switch (url.hostname.split ('.').slice (-2).join ('.'))
@@ -82,12 +85,17 @@ export default (({ ref, post, onLoadComplete, onMetadataChange }: Props) => {
height={360}/>)
: (
<div>
<a href="#" onClick={e => {
<a href="#" onClick={async e => {
e.preventDefault ()
setFramed (confirm ('未確認の外部ページを表示します。\n'
+ '悪意のあるスクリプトが実行される可能性があります。\n'
+ '表示しますか?'))
return
setFramed (await dialogue.confirm ({
title: '未確認の外部ページを表示します',
description: (
<div>
<p></p>
<p>?</p>
</div>),
confirmText: '表示' }))
}}>
</a>