- {/* Authentication Section */}
- {!user ? (
-
- setHandleInput(e.target.value)}
- onKeyDown={(e) => {
- if (e.key === 'Enter') {
- e.preventDefault();
- executeOAuth();
- }
- }}
- />
-
-
- ) : (
-
-
-
-

-
-
{user.displayName || user.handle}
-
@{user.handle}
-
{user.did}
-
-
-
-
-
- {/* Admin Section - User Management */}
- {isAdmin(user) && (
-
-
管理者機能 - ユーザーリスト管理
-
- {/* User List Form */}
-
-
- {/* User List Records */}
-
-
ユーザーリスト一覧 ({userListRecords.length}件)
- {userListRecords.length === 0 ? (
-
ユーザーリストが見つかりません
- ) : (
- userListRecords.map((record, index) => (
-
-
-
- {new Date(record.value.createdAt).toLocaleString()}
-
-
-
-
-
-
-
-
- {record.value.users && record.value.users.map((user, userIndex) => (
-
- {user.handle}
- ({new URL(user.pds).hostname})
-
- ))}
-
-
- URI: {record.uri}
-
- Updated by: {record.value.updatedBy?.handle || 'unknown'}
-
-
- {/* JSON Display */}
- {showJsonFor === record.uri && (
-
-
JSON Record:
-
- {JSON.stringify(record, null, 2)}
-
-
- )}
-
-
- ))
- )}
-
-
- )}
-
-
- )}
-
- {/* Tab Navigation */}
-
-
-
-
-
-
-
- {/* Comments List */}
- {activeTab === 'comments' && (
-
- {comments.filter(shouldShowComment).length === 0 ? (
-
- {appConfig.rkey ? `No comments for this post yet` : `No comments yet`}
-
- ) : (
- comments.filter(shouldShowComment).map((record, index) => (
-
-
-

-
-
- {new Date(record.value.createdAt).toLocaleString()}
-
-
-
- {/* Show delete button only for current user's comments */}
- {user && record.value.author?.did === user.did && (
-
- )}
-
-
-
-
-
- {/* JSON Display */}
- {showJsonFor === record.uri && (
-
-
JSON Record:
-
- {JSON.stringify(record, null, 2)}
-
-
- )}
-
-
- {record.value.text?.split('\n').map((line: string, index: number) => (
-
- {line}
- {index < record.value.text.split('\n').length - 1 &&
}
-
- ))}
-
-
- ))
- )}
-
- )}
-
- {/* AI Chat History List */}
- {activeTab === 'ai-chat' && (
-
- {aiChatHistory.length === 0 ? (
-
No AI conversations yet. Start chatting with Ask AI!
- ) : (
- aiChatHistory.map((record, index) =>
- renderAIContent(record, index, 'comment-item')
- )
- )}
-
- )}
-
- {/* Lang: EN List */}
- {activeTab === 'lang-en' && (
-
- {langEnRecords.length === 0 ? (
-
No EN translations yet
- ) : (
- langEnRecords.map((record, index) =>
- renderAIContent(record, index, 'lang-item')
- )
- )}
-
- )}
-
- {/* AI Comment List */}
- {activeTab === 'ai-comment' && (
-
- {aiCommentRecords.length === 0 ? (
-
No AI comments yet
- ) : (
- aiCommentRecords.map((record, index) =>
- renderAIContent(record, index, 'comment-item')
- )
- )}
-
- )}
-
- {/* Comment Form - Only show on post pages when Comments tab is active */}
- {user && appConfig.rkey && activeTab === 'comments' && (
-
-
- )}
-
-
-