diff --git a/package.json b/package.json
index 01683d5f..c1697935 100644
--- a/package.json
+++ b/package.json
@@ -44,7 +44,7 @@
"scripts": {
"start": "react-scripts start",
"build": "cross-env PUBLIC_URL=./ GENERATE_SOURCEMAP=false react-scripts build",
- "build-netlify": "cross-env PUBLIC_URL=./ GENERATE_SOURCEMAP=true REACT_APP_COMMIT_REF=$COMMIT_REF react-scripts build",
+ "build-netlify": "cross-env PUBLIC_URL=./ GENERATE_SOURCEMAP=true REACT_APP_COMMIT_REF=$COMMIT_REF CI='' react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject",
"electron": "yarn electron:before && electron .",
diff --git a/public/index.html b/public/index.html
index 00a8a3f7..c278a50c 100644
--- a/public/index.html
+++ b/public/index.html
@@ -25,17 +25,6 @@
Learn how to configure a non-root public URL by running `npm run build`.
-->
seedit
-
diff --git a/public/translations/ar/default.json b/public/translations/ar/default.json
index 747ffa84..c0b7084d 100644
--- a/public/translations/ar/default.json
+++ b/public/translations/ar/default.json
@@ -286,5 +286,6 @@
"missing_chain_ticker": "ناقص الرمز المتسلسل",
"missing_token_address": "عنوان الرمز المفقود",
"missing_token_id": "معرف الرمز المفقود",
- "missing_signature": "التوقيع المفقود"
+ "missing_signature": "التوقيع المفقود",
+ "edited_timestamp": "تم التحرير {{timestamp}}"
}
\ No newline at end of file
diff --git a/public/translations/bn/default.json b/public/translations/bn/default.json
index 8da006af..c8959008 100644
--- a/public/translations/bn/default.json
+++ b/public/translations/bn/default.json
@@ -286,5 +286,6 @@
"missing_chain_ticker": "নিখোঁজ শৃঙ্খলা টিকার",
"missing_token_address": "নিখোঁজ টোকেন ঠিকানা",
"missing_token_id": "নিখোঁজ টোকেন আইডি",
- "missing_signature": "নিখোঁজ স্বাক্ষর"
+ "missing_signature": "নিখোঁজ স্বাক্ষর",
+ "edited_timestamp": "সম্পাদনা করা হয়েছে {{timestamp}}"
}
\ No newline at end of file
diff --git a/public/translations/cs/default.json b/public/translations/cs/default.json
index 9dd1fb78..d19c8e03 100644
--- a/public/translations/cs/default.json
+++ b/public/translations/cs/default.json
@@ -286,5 +286,6 @@
"missing_chain_ticker": "Chybějící řetězový ticker",
"missing_token_address": "Chybějící tokenová adresa",
"missing_token_id": "Chybějící ID tokenu",
- "missing_signature": "Chybějící podpis"
+ "missing_signature": "Chybějící podpis",
+ "edited_timestamp": "Upraveno {{timestamp}}"
}
\ No newline at end of file
diff --git a/public/translations/da/default.json b/public/translations/da/default.json
index eabe457d..d01f6b20 100644
--- a/public/translations/da/default.json
+++ b/public/translations/da/default.json
@@ -286,5 +286,6 @@
"missing_chain_ticker": "Manglende kæde ticker",
"missing_token_address": "Manglende tokensadresse",
"missing_token_id": "Manglende token-id",
- "missing_signature": "Manglende signatur"
+ "missing_signature": "Manglende signatur",
+ "edited_timestamp": "Redigeret {{timestamp}}"
}
\ No newline at end of file
diff --git a/public/translations/de/default.json b/public/translations/de/default.json
index 96090476..b2c20df8 100644
--- a/public/translations/de/default.json
+++ b/public/translations/de/default.json
@@ -286,5 +286,6 @@
"missing_chain_ticker": "Fehlender Blockchain-Ticker",
"missing_token_address": "Fehlende Tokenadresse",
"missing_token_id": "Fehlende Token-ID",
- "missing_signature": "Fehlende Signatur"
+ "missing_signature": "Fehlende Signatur",
+ "edited_timestamp": "Bearbeitet {{timestamp}}"
}
\ No newline at end of file
diff --git a/public/translations/el/default.json b/public/translations/el/default.json
index 218b4a4c..54fb4e48 100644
--- a/public/translations/el/default.json
+++ b/public/translations/el/default.json
@@ -286,5 +286,6 @@
"missing_chain_ticker": "Ελλειπτικός αλυσιδωτός ticker",
"missing_token_address": "Ελλειπτική διεύθυνση του token",
"missing_token_id": "Ελλειπτικό αναγνωριστικό token",
- "missing_signature": "Ελλειπτική υπογραφή"
+ "missing_signature": "Ελλειπτική υπογραφή",
+ "edited_timestamp": "Επεξεργάστηκε {{timestamp}}"
}
\ No newline at end of file
diff --git a/public/translations/en/default.json b/public/translations/en/default.json
index 3d8430ae..634136dd 100644
--- a/public/translations/en/default.json
+++ b/public/translations/en/default.json
@@ -286,5 +286,6 @@
"missing_chain_ticker": "Missing chain ticker",
"missing_token_address": "Missing token address",
"missing_token_id": "Missing token ID",
- "missing_signature": "Missing signature"
+ "missing_signature": "Missing signature",
+ "edited_timestamp": "Edited {{timestamp}}"
}
\ No newline at end of file
diff --git a/public/translations/es/default.json b/public/translations/es/default.json
index 520b1542..b4755036 100644
--- a/public/translations/es/default.json
+++ b/public/translations/es/default.json
@@ -286,5 +286,6 @@
"missing_chain_ticker": "Falta de ticker de blockchain",
"missing_token_address": "Falta de dirección de token",
"missing_token_id": "Falta de ID de token",
- "missing_signature": "Falta de firma"
+ "missing_signature": "Falta de firma",
+ "edited_timestamp": "Editado {{timestamp}}"
}
\ No newline at end of file
diff --git a/public/translations/fa/default.json b/public/translations/fa/default.json
index 529fb022..5d1d6fba 100644
--- a/public/translations/fa/default.json
+++ b/public/translations/fa/default.json
@@ -286,5 +286,6 @@
"missing_chain_ticker": "تیکر زنجیره ای گم شده",
"missing_token_address": "آدرس توکن گم شده",
"missing_token_id": "شناسه توکن گم شده",
- "missing_signature": "امضای گم شده"
+ "missing_signature": "امضای گم شده",
+ "edited_timestamp": "ویرایش شده {{timestamp}}"
}
\ No newline at end of file
diff --git a/public/translations/fi/default.json b/public/translations/fi/default.json
index 0a8f3689..c0af8b92 100644
--- a/public/translations/fi/default.json
+++ b/public/translations/fi/default.json
@@ -286,5 +286,6 @@
"missing_chain_ticker": "Puuttuva ketjuticker",
"missing_token_address": "Puuttuva token-osoite",
"missing_token_id": "Puuttuva token-id",
- "missing_signature": "Puuttuva allekirjoitus"
+ "missing_signature": "Puuttuva allekirjoitus",
+ "edited_timestamp": "Muokattu {{timestamp}}"
}
\ No newline at end of file
diff --git a/public/translations/fil/default.json b/public/translations/fil/default.json
index 819a0d7a..c6e1d826 100644
--- a/public/translations/fil/default.json
+++ b/public/translations/fil/default.json
@@ -286,5 +286,6 @@
"missing_chain_ticker": "Kulang na ticker ng chain",
"missing_token_address": "Kulang na address ng token",
"missing_token_id": "Kulang na ID ng token",
- "missing_signature": "Kulang na lagda"
+ "missing_signature": "Kulang na lagda",
+ "edited_timestamp": "Na-edit na ang {{timestamp}}"
}
\ No newline at end of file
diff --git a/public/translations/fr/default.json b/public/translations/fr/default.json
index cea30941..ed16c715 100644
--- a/public/translations/fr/default.json
+++ b/public/translations/fr/default.json
@@ -286,5 +286,6 @@
"missing_chain_ticker": "Ticker de blockchain manquant",
"missing_token_address": "Adresse de token manquante",
"missing_token_id": "ID de token manquant",
- "missing_signature": "Signature manquante"
+ "missing_signature": "Signature manquante",
+ "edited_timestamp": "Édité {{timestamp}}"
}
\ No newline at end of file
diff --git a/public/translations/he/default.json b/public/translations/he/default.json
index 6cde6eda..af942e88 100644
--- a/public/translations/he/default.json
+++ b/public/translations/he/default.json
@@ -286,5 +286,6 @@
"missing_chain_ticker": "ציון בלוקצ'יין חסר",
"missing_token_address": "כתובת הטוקן חסרה",
"missing_token_id": "מזהה הטוקן חסר",
- "missing_signature": "חתימה חסרה"
+ "missing_signature": "חתימה חסרה",
+ "edited_timestamp": "נערך {{timestamp}}"
}
\ No newline at end of file
diff --git a/public/translations/hi/default.json b/public/translations/hi/default.json
index fe1225b6..6ed30be5 100644
--- a/public/translations/hi/default.json
+++ b/public/translations/hi/default.json
@@ -286,5 +286,6 @@
"missing_chain_ticker": "गायब श्रृंखला टिकर",
"missing_token_address": "गायब टोकन पता",
"missing_token_id": "गायब टोकन आईडी",
- "missing_signature": "गायब हस्ताक्षर"
+ "missing_signature": "गायब हस्ताक्षर",
+ "edited_timestamp": "संपादित {{timestamp}}"
}
\ No newline at end of file
diff --git a/public/translations/hu/default.json b/public/translations/hu/default.json
index 9fb16d1a..fa295e3d 100644
--- a/public/translations/hu/default.json
+++ b/public/translations/hu/default.json
@@ -286,5 +286,6 @@
"missing_chain_ticker": "Hiányzó lánc ticker",
"missing_token_address": "Hiányzó token cím",
"missing_token_id": "Hiányzó token azonosító",
- "missing_signature": "Hiányzó aláírás"
+ "missing_signature": "Hiányzó aláírás",
+ "edited_timestamp": "Szerkesztve {{timestamp}}"
}
\ No newline at end of file
diff --git a/public/translations/id/default.json b/public/translations/id/default.json
index 7568d485..a83e1692 100644
--- a/public/translations/id/default.json
+++ b/public/translations/id/default.json
@@ -286,5 +286,6 @@
"missing_chain_ticker": "Ticker blockchain yang hilang",
"missing_token_address": "Alamat token yang hilang",
"missing_token_id": "ID token yang hilang",
- "missing_signature": "Tanda tangan yang hilang"
+ "missing_signature": "Tanda tangan yang hilang",
+ "edited_timestamp": "Diedit {{timestamp}}"
}
\ No newline at end of file
diff --git a/public/translations/it/default.json b/public/translations/it/default.json
index 28484f68..e8d3146d 100644
--- a/public/translations/it/default.json
+++ b/public/translations/it/default.json
@@ -286,5 +286,6 @@
"missing_chain_ticker": "Ticker blockchain mancante",
"missing_token_address": "Indirizzo del token mancante",
"missing_token_id": "ID del token mancante",
- "missing_signature": "Firma mancante"
+ "missing_signature": "Firma mancante",
+ "edited_timestamp": "Modificato {{timestamp}}"
}
\ No newline at end of file
diff --git a/public/translations/ja/default.json b/public/translations/ja/default.json
index b01c0293..17356953 100644
--- a/public/translations/ja/default.json
+++ b/public/translations/ja/default.json
@@ -286,5 +286,6 @@
"missing_chain_ticker": "不足しているチェーンティッカー",
"missing_token_address": "不足しているトークンアドレス",
"missing_token_id": "不足しているトークンID",
- "missing_signature": "不足している署名"
+ "missing_signature": "不足している署名",
+ "edited_timestamp": "編集済み {{timestamp}}"
}
\ No newline at end of file
diff --git a/public/translations/ko/default.json b/public/translations/ko/default.json
index 3f976ab5..bf78366b 100644
--- a/public/translations/ko/default.json
+++ b/public/translations/ko/default.json
@@ -286,5 +286,6 @@
"missing_chain_ticker": "부재중인 블록체인 티커",
"missing_token_address": "부재중인 토큰 주소",
"missing_token_id": "부재중인 토큰 ID",
- "missing_signature": "부재중인 서명"
+ "missing_signature": "부재중인 서명",
+ "edited_timestamp": "편집됨 {{timestamp}}"
}
\ No newline at end of file
diff --git a/public/translations/mr/default.json b/public/translations/mr/default.json
index adcb5f47..f4873e78 100644
--- a/public/translations/mr/default.json
+++ b/public/translations/mr/default.json
@@ -286,5 +286,6 @@
"missing_chain_ticker": "गुमलेला श्रृंखला टिकर",
"missing_token_address": "गुमलेला टोकन पत्ता",
"missing_token_id": "गुमलेला टोकन आयडी",
- "missing_signature": "गुमलेली स्वाक्षरे"
+ "missing_signature": "गुमलेली स्वाक्षरे",
+ "edited_timestamp": "{{timestamp}} संपादित"
}
\ No newline at end of file
diff --git a/public/translations/nl/default.json b/public/translations/nl/default.json
index 1e031052..4509ff7c 100644
--- a/public/translations/nl/default.json
+++ b/public/translations/nl/default.json
@@ -286,5 +286,6 @@
"missing_chain_ticker": "Ontbrekende blockchain ticker",
"missing_token_address": "Ontbrekend tokenadres",
"missing_token_id": "Ontbrekend token-ID",
- "missing_signature": "Ontbrekende handtekening"
+ "missing_signature": "Ontbrekende handtekening",
+ "edited_timestamp": "Bewerkt {{timestamp}}"
}
\ No newline at end of file
diff --git a/public/translations/no/default.json b/public/translations/no/default.json
index 4b2be7a6..de91716d 100644
--- a/public/translations/no/default.json
+++ b/public/translations/no/default.json
@@ -286,5 +286,6 @@
"missing_chain_ticker": "Manglende Blockchain-ticker",
"missing_token_address": "Manglende tokenadresse",
"missing_token_id": "Manglende token-ID",
- "missing_signature": "Manglende signatur"
+ "missing_signature": "Manglende signatur",
+ "edited_timestamp": "Redigert {{timestamp}}"
}
\ No newline at end of file
diff --git a/public/translations/pl/default.json b/public/translations/pl/default.json
index 59c6b4e4..29479df6 100644
--- a/public/translations/pl/default.json
+++ b/public/translations/pl/default.json
@@ -286,5 +286,6 @@
"missing_chain_ticker": "Brakujący ticker blockchain",
"missing_token_address": "Brakujący adres tokena",
"missing_token_id": "Brakujące ID tokenu",
- "missing_signature": "Brakujący podpis"
+ "missing_signature": "Brakujący podpis",
+ "edited_timestamp": "Edytowane {{timestamp}}"
}
\ No newline at end of file
diff --git a/public/translations/pt/default.json b/public/translations/pt/default.json
index 1660bd93..431a66d9 100644
--- a/public/translations/pt/default.json
+++ b/public/translations/pt/default.json
@@ -286,5 +286,6 @@
"missing_chain_ticker": "Faltando ticker de blockchain",
"missing_token_address": "Endereço do token em falta",
"missing_token_id": "ID de token em falta",
- "missing_signature": "Assinatura em falta"
+ "missing_signature": "Assinatura em falta",
+ "edited_timestamp": "Editado {{timestamp}}"
}
\ No newline at end of file
diff --git a/public/translations/ro/default.json b/public/translations/ro/default.json
index 2895f57d..871572cd 100644
--- a/public/translations/ro/default.json
+++ b/public/translations/ro/default.json
@@ -286,5 +286,6 @@
"missing_chain_ticker": "Lipsește ticker blockchain",
"missing_token_address": "Lipsește adresa tokenului",
"missing_token_id": "Lipsește ID-ul tokenului",
- "missing_signature": "Lipsește semnătura"
+ "missing_signature": "Lipsește semnătura",
+ "edited_timestamp": "Editat {{timestamp}}"
}
\ No newline at end of file
diff --git a/public/translations/ru/default.json b/public/translations/ru/default.json
index 4692f786..b01c1b69 100644
--- a/public/translations/ru/default.json
+++ b/public/translations/ru/default.json
@@ -286,5 +286,6 @@
"missing_chain_ticker": "Отсутствующий тикер блокчейна",
"missing_token_address": "Отсутствующий адрес токена",
"missing_token_id": "Отсутствующий идентификатор токена",
- "missing_signature": "Отсутствующая подпись"
+ "missing_signature": "Отсутствующая подпись",
+ "edited_timestamp": "Отредактировано {{timestamp}}"
}
\ No newline at end of file
diff --git a/public/translations/sq/default.json b/public/translations/sq/default.json
index 422479c6..d736ee7b 100644
--- a/public/translations/sq/default.json
+++ b/public/translations/sq/default.json
@@ -286,5 +286,6 @@
"missing_chain_ticker": "Mungon ticker blockchain",
"missing_token_address": "Adresa e munguar e tokenit",
"missing_token_id": "ID e munguar e tokenit",
- "missing_signature": "Nënshkrimi i munguar"
+ "missing_signature": "Nënshkrimi i munguar",
+ "edited_timestamp": "Redaktuar {{timestamp}}"
}
\ No newline at end of file
diff --git a/public/translations/sv/default.json b/public/translations/sv/default.json
index de6471c3..c25cf8a2 100644
--- a/public/translations/sv/default.json
+++ b/public/translations/sv/default.json
@@ -286,5 +286,6 @@
"missing_chain_ticker": "Saknad blockchain ticker",
"missing_token_address": "Saknad tokenadress",
"missing_token_id": "Saknad token-ID",
- "missing_signature": "Saknad signatur"
+ "missing_signature": "Saknad signatur",
+ "edited_timestamp": "Redigerat {{timestamp}}"
}
\ No newline at end of file
diff --git a/public/translations/te/default.json b/public/translations/te/default.json
index fd9eeeb1..789972ef 100644
--- a/public/translations/te/default.json
+++ b/public/translations/te/default.json
@@ -286,5 +286,6 @@
"missing_chain_ticker": "తప్పిన బ్లాక్ చేన్ టిక్కర్",
"missing_token_address": "తప్పని టోకెన్ చిరునామా",
"missing_token_id": "తప్పని టోకెన్ ఐడి",
- "missing_signature": "తప్పని సంతకం"
+ "missing_signature": "తప్పని సంతకం",
+ "edited_timestamp": "{{timestamp}} ముందు సవరించబడింది"
}
\ No newline at end of file
diff --git a/public/translations/th/default.json b/public/translations/th/default.json
index 019c8499..26fb3790 100644
--- a/public/translations/th/default.json
+++ b/public/translations/th/default.json
@@ -286,5 +286,6 @@
"missing_chain_ticker": "เครื่องหมายเหตุที่หายไป",
"missing_token_address": "เหตุที่หายไปของที่อยู่โทเค็น",
"missing_token_id": "เหตุที่หายไปของรหัสของโทเค็น",
- "missing_signature": "เหตุที่หายไปของลายเซ็น"
+ "missing_signature": "เหตุที่หายไปของลายเซ็น",
+ "edited_timestamp": "แก้ไขเมื่อ {{timestamp}}"
}
\ No newline at end of file
diff --git a/public/translations/tr/default.json b/public/translations/tr/default.json
index ba25262e..b0e13344 100644
--- a/public/translations/tr/default.json
+++ b/public/translations/tr/default.json
@@ -286,5 +286,6 @@
"missing_chain_ticker": "Eksik Blockchain ticker",
"missing_token_address": "Eksik token adresi",
"missing_token_id": "Eksik token kimliği",
- "missing_signature": "Eksik imza"
+ "missing_signature": "Eksik imza",
+ "edited_timestamp": "{{timestamp}} önce düzenlendi"
}
\ No newline at end of file
diff --git a/public/translations/uk/default.json b/public/translations/uk/default.json
index c1e3bb9d..735c1a30 100644
--- a/public/translations/uk/default.json
+++ b/public/translations/uk/default.json
@@ -286,5 +286,6 @@
"missing_chain_ticker": "Відсутній тікер блокчейну",
"missing_token_address": "Відсутня адреса токена",
"missing_token_id": "Відсутній ідентифікатор токена",
- "missing_signature": "Відсутній підпис"
+ "missing_signature": "Відсутній підпис",
+ "edited_timestamp": "Відредаговано {{timestamp}}"
}
\ No newline at end of file
diff --git a/public/translations/ur/default.json b/public/translations/ur/default.json
index 92712370..7eb017ad 100644
--- a/public/translations/ur/default.json
+++ b/public/translations/ur/default.json
@@ -286,5 +286,6 @@
"missing_chain_ticker": "گمشدہ بلاک چین ٹکر",
"missing_token_address": "گمشدہ ٹوکن ایڈریس",
"missing_token_id": "گمشدہ ٹوکن شناختی نمبر",
- "missing_signature": "گمشدہ دستخط"
+ "missing_signature": "گمشدہ دستخط",
+ "edited_timestamp": "{{timestamp}} پہلے ترمیم شدہ"
}
\ No newline at end of file
diff --git a/public/translations/vi/default.json b/public/translations/vi/default.json
index b7beae01..7d04ae1b 100644
--- a/public/translations/vi/default.json
+++ b/public/translations/vi/default.json
@@ -286,5 +286,6 @@
"missing_chain_ticker": "Ticker chuỗi khối bị thiếu",
"missing_token_address": "Địa chỉ token bị thiếu",
"missing_token_id": "Thiếu ID của token",
- "missing_signature": "Thiếu chữ ký"
+ "missing_signature": "Thiếu chữ ký",
+ "edited_timestamp": "Đã chỉnh sửa {{timestamp}}"
}
\ No newline at end of file
diff --git a/public/translations/zh/default.json b/public/translations/zh/default.json
index 9d0ae312..3d7047a0 100644
--- a/public/translations/zh/default.json
+++ b/public/translations/zh/default.json
@@ -286,5 +286,6 @@
"missing_chain_ticker": "缺失的区块链标记",
"missing_token_address": "缺失的代币地址",
"missing_token_id": "缺失的代币ID",
- "missing_signature": "缺失的签名"
+ "missing_signature": "缺失的签名",
+ "edited_timestamp": "编辑于{{timestamp}}"
}
\ No newline at end of file
diff --git a/src/app.tsx b/src/app.tsx
index 9c823693..ea37910c 100644
--- a/src/app.tsx
+++ b/src/app.tsx
@@ -24,6 +24,7 @@ import StickyHeader from './components/sticky-header';
import TopBar from './components/topbar';
export const sortTypes = ['hot', 'new', 'active', 'controversialAll', 'topAll'];
+const isElectron = window.isElectron === true;
const CheckRouteParams = () => {
let { sortType, timeFilterName, accountCommentIndex } = useParams<{ sortType?: string; timeFilterName?: string; accountCommentIndex?: string }>();
@@ -71,6 +72,15 @@ const App = () => {
>
);
+ useEffect(() => {
+ if (!window.location.hash && !isElectron) {
+ // Calculate the base URL (protocol + host)
+ const baseURL = window.location.protocol + '//' + window.location.host + '/';
+ // Redirect to the base URL with `#/`
+ window.location.replace(baseURL + '#/');
+ }
+ }, []);
+
return (
@@ -105,7 +115,7 @@ const App = () => {
} />
} />
- } />
+ } />
} />
} />
diff --git a/src/components/post/comment-tools/comment-tools.tsx b/src/components/post/comment-tools/comment-tools.tsx
index bee00185..88486700 100644
--- a/src/components/post/comment-tools/comment-tools.tsx
+++ b/src/components/post/comment-tools/comment-tools.tsx
@@ -4,9 +4,9 @@ import { Author, useAccount, useComment, useSubplebbit } from '@plebbit/plebbit-
import styles from './comment-tools.module.css';
import EditMenu from './edit-menu';
import HideMenu from './hide-menu';
+import Label from '../label';
import ModMenu from './mod-menu';
import ShareMenu from './share-menu';
-import Label from '../label';
import { isInboxView } from '../../../lib/utils/view-utils';
interface CommentToolsProps {
@@ -51,7 +51,19 @@ const ModOrReportButton = ({ cid, isAuthor, isMod }: ModOrReportButtonProps) =>
);
};
-const PostTools = ({ author, cid, hasLabel, index, isAuthor, isMod, subplebbitAddress, replyCount = 0, showCommentEditForm, spoiler = false }: CommentToolsProps) => {
+const PostTools = ({
+ author,
+ cid,
+ failed,
+ hasLabel,
+ index,
+ isAuthor,
+ isMod,
+ subplebbitAddress,
+ replyCount = 0,
+ showCommentEditForm,
+ spoiler = false,
+}: CommentToolsProps) => {
const { t } = useTranslation();
const validReplyCount = isNaN(replyCount) ? 0 : replyCount;
const commentCount = validReplyCount === 0 ? t('post_no_comments') : `${validReplyCount} ${validReplyCount === 1 ? t('post_comment') : t('post_comments')}`;
@@ -67,10 +79,12 @@ const PostTools = ({ author, cid, hasLabel, index, isAuthor, isMod, subplebbitAd
}
};
+ const commentCountButton = failed ? {commentCount} : {commentCount};
+
return (
<>
cid && handlePostClick?.()}>
- {commentCount}
+ {commentCountButton}
{/* TODO: Implement save functionality
@@ -90,14 +104,26 @@ const PostTools = ({ author, cid, hasLabel, index, isAuthor, isMod, subplebbitAd
);
};
-const ReplyTools = ({ author, cid, hasLabel, index, isAuthor, isMod, showReplyForm, subplebbitAddress, showCommentEditForm, spoiler = false }: CommentToolsProps) => {
+const ReplyTools = ({
+ author,
+ cid,
+ failed,
+ hasLabel,
+ index,
+ isAuthor,
+ isMod,
+ showReplyForm,
+ subplebbitAddress,
+ showCommentEditForm,
+ spoiler = false,
+}: CommentToolsProps) => {
const { t } = useTranslation();
+ const permalink = failed ? permalink : permalink;
+
return (
<>
-
- permalink
-
+ {permalink}
{/* TODO: Implement save functionality
@@ -133,25 +159,35 @@ const SingleReplyTools = ({
const hasContext = parentCid !== postCid;
+ const permalinkButton = cid ? permalink : permalink;
+
+ const contextButton = cid ? (
+ {t('context')}
+ ) : (
+ {t('context')}
+ );
+
+ const fullCommentsButton = cid ? (
+
+ {t('full_comments')} ({comment?.replyCount || 0})
+
+ ) : (
+
+ {t('full_comments')} ({comment?.replyCount || 0})
+
+ );
+
return (
<>
-
- permalink
-
+ {permalinkButton}
{/* TODO: Implement save functionality
{t('save')}
*/}
{isAuthor && }
-
- {t('context')}
-
-
-
- {t('full_comments')} ({comment?.replyCount || 0})
-
-
+ {contextButton}
+ {fullCommentsButton}
cid && showReplyForm?.()}>{t('reply_reply')}
@@ -207,21 +243,12 @@ const CommentTools = ({
return (
-
{isReply ? (
isSingleReply ? (
)
) : (
-
+ <>
+
+
+ >
)}
);
diff --git a/src/components/post/comment-tools/edit-menu/edit-menu.tsx b/src/components/post/comment-tools/edit-menu/edit-menu.tsx
index 438d7ad4..6e31f0b7 100644
--- a/src/components/post/comment-tools/edit-menu/edit-menu.tsx
+++ b/src/components/post/comment-tools/edit-menu/edit-menu.tsx
@@ -66,14 +66,14 @@ const EditMenu = ({ cid, showCommentEditForm }: EditMenuProps) => {
{
- showCommentEditForm && showCommentEditForm();
+ showCommentEditForm && cid && showCommentEditForm();
}}
>
{t('edit')}
- {t('delete')}
+ cid && deleteComment()}>{t('delete')}
>
);
diff --git a/src/components/post/comment-tools/hide-menu/hide-menu.tsx b/src/components/post/comment-tools/hide-menu/hide-menu.tsx
index a355e9cc..18bf3932 100644
--- a/src/components/post/comment-tools/hide-menu/hide-menu.tsx
+++ b/src/components/post/comment-tools/hide-menu/hide-menu.tsx
@@ -75,8 +75,8 @@ const HideMenu = ({ author, cid, isMod, subplebbitAddress }: HideMenuProps) => {
return (
<>
-
- setIsHideMenuOpen(!isHideMenuOpen)}>{t('hide')}
+
+ cid && setIsHideMenuOpen(!isHideMenuOpen)}>{t('hide')}
{isHideMenuOpen && (
diff --git a/src/components/post/comment-tools/mod-menu/mod-menu.tsx b/src/components/post/comment-tools/mod-menu/mod-menu.tsx
index 0dfa84d9..1d576a91 100644
--- a/src/components/post/comment-tools/mod-menu/mod-menu.tsx
+++ b/src/components/post/comment-tools/mod-menu/mod-menu.tsx
@@ -72,8 +72,8 @@ const ModMenu = ({ cid }: ModMenuProps) => {
return (
<>
-
- setIsModMenuOpen(!isModMenuOpen)}>{t('moderation')}
+
+ cid && setIsModMenuOpen(!isModMenuOpen)}>{t('moderation')}
{isModMenuOpen && (
@@ -102,7 +102,7 @@ const ModMenu = ({ cid }: ModMenuProps) => {
diff --git a/src/components/post/post.module.css b/src/components/post/post.module.css
index 47cbc1dd..8471dea1 100644
--- a/src/components/post/post.module.css
+++ b/src/components/post/post.module.css
@@ -137,6 +137,11 @@
text-decoration: none;
}
+.timeEdit {
+ text-transform: lowercase;
+ font-style: italic;
+}
+
.subplebbit:hover, .author:hover span {
text-decoration: underline;
}
diff --git a/src/components/post/post.tsx b/src/components/post/post.tsx
index dddf8304..607e3767 100644
--- a/src/components/post/post.tsx
+++ b/src/components/post/post.tsx
@@ -245,8 +245,8 @@ const Post = ({ index, post = {} }: PostProps) => {
/>
)}
- {t('submitted')} {getFormattedTimeAgo(timestamp)} {edit &&
*}{' '}
- {t('post_by')}
+ {t('submitted')} {getFormattedTimeAgo(timestamp)}{' '}
+ {edit &&
{t('last_edited', { timestamp: getFormattedTimeAgo(edit.timestamp) })}} {t('post_by')}
@@ -353,7 +353,7 @@ const Reply = ({ cidOfReplyWithContext, depth = 0, isSingleComment, isSingleRepl
{scoreString}{' '}
{getFormattedTimeAgo(timestamp)}
- {edit && *}
+ {edit && {t('edited_timestamp', { timestamp: getFormattedTimeAgo(edit.timestamp) })}}
{' '}
{pinned && - {t('stickied_comment')}}
{collapsed && ({childrenString})}
@@ -428,6 +428,7 @@ const Reply = ({ cidOfReplyWithContext, depth = 0, isSingleComment, isSingleRepl
{
return params.subplebbitAddress && params.commentCid ? pathname.startsWith(`/p/${params.subplebbitAddress}/c/${params.commentCid}`) : false;
};
-export const isPostContextView = (pathname: string, params: ParamsType): boolean => {
- return params.subplebbitAddress && params.commentCid ? pathname.startsWith(`/p/${params.subplebbitAddress}/c/${params.commentCid}/context`) : false;
+export const isPostContextView = (pathname: string, params: ParamsType, search: string): boolean => {
+ return params.subplebbitAddress && params.commentCid ? `${pathname}${search}` === `/p/${params.subplebbitAddress}/c/${params.commentCid}?context=1` : false;
};
export const isProfileView = (pathname: string): boolean => {
diff --git a/src/views/post-page/post-page.tsx b/src/views/post-page/post-page.tsx
index 2940954a..6fd88a83 100644
--- a/src/views/post-page/post-page.tsx
+++ b/src/views/post-page/post-page.tsx
@@ -41,7 +41,7 @@ const Post = ({ post }: { post: Comment }) => {
return (
<>
- {post?.locked && (
+ {(post?.locked || post?.removed) && (
@@ -97,7 +97,7 @@ const PostWithContext = ({ post }: { post: Comment }) => {
return (
<>
- {post?.locked && (
+ {(post?.locked || post?.removed) && (
@@ -133,7 +133,7 @@ const PostPage = () => {
const location = useLocation();
const isInPendingView = isPendingView(location.pathname, params);
- const isInPostContextView = isPostContextView(location.pathname, params);
+ const isInPostContextView = isPostContextView(location.pathname, params, location.search);
const post = useComment({ commentCid: params?.commentCid });
const { cid, downvoteCount, timestamp, upvoteCount } = post || {};