diff options
Diffstat (limited to 'site')
| -rw-r--r-- | site/public/locales/en/translation.json | 2 | ||||
| -rw-r--r-- | site/public/locales/ja/translation.json | 2 | ||||
| -rw-r--r-- | site/src/components/NewsFeed.tsx | 4 |
3 files changed, 5 insertions, 3 deletions
diff --git a/site/public/locales/en/translation.json b/site/public/locales/en/translation.json index 9221da6..206e887 100644 --- a/site/public/locales/en/translation.json +++ b/site/public/locales/en/translation.json @@ -18,7 +18,7 @@ "ai_summary_note": "The information above is written by AI", "read_more": "READ MORE", "copy_link_to_post": "Copy Link to Post", - "copy_link_notif": "Copied Direct Link to Post (Older news are automatically culled after some time)", + "copy_link_notif": "Copied Perma Link to Post)", "subscribed_to_games_count": "Subscribed to", "games": "game(s)", "gameselector": { diff --git a/site/public/locales/ja/translation.json b/site/public/locales/ja/translation.json index ccf96b0..02c64e2 100644 --- a/site/public/locales/ja/translation.json +++ b/site/public/locales/ja/translation.json @@ -18,7 +18,7 @@ "ai_summary_note": "上記の情報はAIによって生成されました", "read_more": "続きを読む", "copy_link_to_post": "投稿へのリンクをコピー", - "copy_link_notif": "投稿への直接リンクをコピーしました(古いニュースは一定時間後に自動的に削除されます)", + "copy_link_notif": "投稿への直接リンクをコピーしました", "subscribed_to_games_count": "通知購読中", "games": "ゲーム", "gameselector": { diff --git a/site/src/components/NewsFeed.tsx b/site/src/components/NewsFeed.tsx index 2e08b16..ed854a0 100644 --- a/site/src/components/NewsFeed.tsx +++ b/site/src/components/NewsFeed.tsx @@ -18,6 +18,7 @@ export interface NewsData { en_headline: string | null; en_content: string | null; is_ai_summary: boolean | null; + archive_hash: string | null; } interface NewsFeedProps { @@ -108,7 +109,8 @@ export const NewsFeed: React.FC<NewsFeedProps> = ({ newsItems }) => { (hash, char) => (hash << 5) + hash + char.charCodeAt(0), 5381, ) >>> 0; - const newsId = `${news.identifier}-${news.timestamp}-${contentHash.toString(16)}-${headlineHash.toString(16)}`; + const legacyId = `${news.identifier}-${news.timestamp}-${contentHash.toString(16)}-${headlineHash.toString(16)}`; + const newsId = news.archive_hash || legacyId; const isEnglish = showEnglish[newsId]; const hasTranslation = news.en_headline || news.en_content; const displayHeadline = |
