Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Development #287

Merged
merged 10 commits into from
Mar 6, 2024
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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 .",
Expand Down
11 changes: 0 additions & 11 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,6 @@
Learn how to configure a non-root public URL by running `npm run build`.
-->
<title>seedit</title>
<script>
(function() {
// This checks if the URL does not contain a hash
if (!window.location.hash) {
// Calculate the base URL (protocol + host)
const baseURL = window.location.protocol + '//' + window.location.host + '/';
// Redirect to the base URL with `#/`
window.location.replace(baseURL + '#/');
}
})();
</script>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
Expand Down
3 changes: 2 additions & 1 deletion public/translations/ar/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -286,5 +286,6 @@
"missing_chain_ticker": "ناقص الرمز المتسلسل",
"missing_token_address": "عنوان الرمز المفقود",
"missing_token_id": "معرف الرمز المفقود",
"missing_signature": "التوقيع المفقود"
"missing_signature": "التوقيع المفقود",
"edited_timestamp": "تم التحرير {{timestamp}}"
}
3 changes: 2 additions & 1 deletion public/translations/bn/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -286,5 +286,6 @@
"missing_chain_ticker": "নিখোঁজ শৃঙ্খলা টিকার",
"missing_token_address": "নিখোঁজ টোকেন ঠিকানা",
"missing_token_id": "নিখোঁজ টোকেন আইডি",
"missing_signature": "নিখোঁজ স্বাক্ষর"
"missing_signature": "নিখোঁজ স্বাক্ষর",
"edited_timestamp": "সম্পাদনা করা হয়েছে {{timestamp}}"
}
3 changes: 2 additions & 1 deletion public/translations/cs/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -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}}"
}
3 changes: 2 additions & 1 deletion public/translations/da/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -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}}"
}
3 changes: 2 additions & 1 deletion public/translations/de/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -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}}"
}
3 changes: 2 additions & 1 deletion public/translations/el/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -286,5 +286,6 @@
"missing_chain_ticker": "Ελλειπτικός αλυσιδωτός ticker",
"missing_token_address": "Ελλειπτική διεύθυνση του token",
"missing_token_id": "Ελλειπτικό αναγνωριστικό token",
"missing_signature": "Ελλειπτική υπογραφή"
"missing_signature": "Ελλειπτική υπογραφή",
"edited_timestamp": "Επεξεργάστηκε {{timestamp}}"
}
3 changes: 2 additions & 1 deletion public/translations/en/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -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}}"
}
3 changes: 2 additions & 1 deletion public/translations/es/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -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}}"
}
3 changes: 2 additions & 1 deletion public/translations/fa/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -286,5 +286,6 @@
"missing_chain_ticker": "تیکر زنجیره ای گم شده",
"missing_token_address": "آدرس توکن گم شده",
"missing_token_id": "شناسه توکن گم شده",
"missing_signature": "امضای گم شده"
"missing_signature": "امضای گم شده",
"edited_timestamp": "ویرایش شده {{timestamp}}"
}
3 changes: 2 additions & 1 deletion public/translations/fi/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -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}}"
}
3 changes: 2 additions & 1 deletion public/translations/fil/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -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}}"
}
3 changes: 2 additions & 1 deletion public/translations/fr/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -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}}"
}
3 changes: 2 additions & 1 deletion public/translations/he/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -286,5 +286,6 @@
"missing_chain_ticker": "ציון בלוקצ'יין חסר",
"missing_token_address": "כתובת הטוקן חסרה",
"missing_token_id": "מזהה הטוקן חסר",
"missing_signature": "חתימה חסרה"
"missing_signature": "חתימה חסרה",
"edited_timestamp": "נערך {{timestamp}}"
}
3 changes: 2 additions & 1 deletion public/translations/hi/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -286,5 +286,6 @@
"missing_chain_ticker": "गायब श्रृंखला टिकर",
"missing_token_address": "गायब टोकन पता",
"missing_token_id": "गायब टोकन आईडी",
"missing_signature": "गायब हस्ताक्षर"
"missing_signature": "गायब हस्ताक्षर",
"edited_timestamp": "संपादित {{timestamp}}"
}
3 changes: 2 additions & 1 deletion public/translations/hu/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -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}}"
}
3 changes: 2 additions & 1 deletion public/translations/id/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -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}}"
}
3 changes: 2 additions & 1 deletion public/translations/it/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -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}}"
}
3 changes: 2 additions & 1 deletion public/translations/ja/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -286,5 +286,6 @@
"missing_chain_ticker": "不足しているチェーンティッカー",
"missing_token_address": "不足しているトークンアドレス",
"missing_token_id": "不足しているトークンID",
"missing_signature": "不足している署名"
"missing_signature": "不足している署名",
"edited_timestamp": "編集済み {{timestamp}}"
}
3 changes: 2 additions & 1 deletion public/translations/ko/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -286,5 +286,6 @@
"missing_chain_ticker": "부재중인 블록체인 티커",
"missing_token_address": "부재중인 토큰 주소",
"missing_token_id": "부재중인 토큰 ID",
"missing_signature": "부재중인 서명"
"missing_signature": "부재중인 서명",
"edited_timestamp": "편집됨 {{timestamp}}"
}
3 changes: 2 additions & 1 deletion public/translations/mr/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -286,5 +286,6 @@
"missing_chain_ticker": "गुमलेला श्रृंखला टिकर",
"missing_token_address": "गुमलेला टोकन पत्ता",
"missing_token_id": "गुमलेला टोकन आयडी",
"missing_signature": "गुमलेली स्वाक्षरे"
"missing_signature": "गुमलेली स्वाक्षरे",
"edited_timestamp": "{{timestamp}} संपादित"
}
3 changes: 2 additions & 1 deletion public/translations/nl/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -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}}"
}
3 changes: 2 additions & 1 deletion public/translations/no/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -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}}"
}
3 changes: 2 additions & 1 deletion public/translations/pl/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -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}}"
}
3 changes: 2 additions & 1 deletion public/translations/pt/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -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}}"
}
3 changes: 2 additions & 1 deletion public/translations/ro/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -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}}"
}
3 changes: 2 additions & 1 deletion public/translations/ru/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -286,5 +286,6 @@
"missing_chain_ticker": "Отсутствующий тикер блокчейна",
"missing_token_address": "Отсутствующий адрес токена",
"missing_token_id": "Отсутствующий идентификатор токена",
"missing_signature": "Отсутствующая подпись"
"missing_signature": "Отсутствующая подпись",
"edited_timestamp": "Отредактировано {{timestamp}}"
}
3 changes: 2 additions & 1 deletion public/translations/sq/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -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}}"
}
3 changes: 2 additions & 1 deletion public/translations/sv/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -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}}"
}
3 changes: 2 additions & 1 deletion public/translations/te/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -286,5 +286,6 @@
"missing_chain_ticker": "తప్పిన బ్లాక్ చేన్ టిక్కర్",
"missing_token_address": "తప్పని టోకెన్ చిరునామా",
"missing_token_id": "తప్పని టోకెన్ ఐడి",
"missing_signature": "తప్పని సంతకం"
"missing_signature": "తప్పని సంతకం",
"edited_timestamp": "{{timestamp}} ముందు సవరించబడింది"
}
3 changes: 2 additions & 1 deletion public/translations/th/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -286,5 +286,6 @@
"missing_chain_ticker": "เครื่องหมายเหตุที่หายไป",
"missing_token_address": "เหตุที่หายไปของที่อยู่โทเค็น",
"missing_token_id": "เหตุที่หายไปของรหัสของโทเค็น",
"missing_signature": "เหตุที่หายไปของลายเซ็น"
"missing_signature": "เหตุที่หายไปของลายเซ็น",
"edited_timestamp": "แก้ไขเมื่อ {{timestamp}}"
}
3 changes: 2 additions & 1 deletion public/translations/tr/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
3 changes: 2 additions & 1 deletion public/translations/uk/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -286,5 +286,6 @@
"missing_chain_ticker": "Відсутній тікер блокчейну",
"missing_token_address": "Відсутня адреса токена",
"missing_token_id": "Відсутній ідентифікатор токена",
"missing_signature": "Відсутній підпис"
"missing_signature": "Відсутній підпис",
"edited_timestamp": "Відредаговано {{timestamp}}"
}
3 changes: 2 additions & 1 deletion public/translations/ur/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -286,5 +286,6 @@
"missing_chain_ticker": "گمشدہ بلاک چین ٹکر",
"missing_token_address": "گمشدہ ٹوکن ایڈریس",
"missing_token_id": "گمشدہ ٹوکن شناختی نمبر",
"missing_signature": "گمشدہ دستخط"
"missing_signature": "گمشدہ دستخط",
"edited_timestamp": "{{timestamp}} پہلے ترمیم شدہ"
}
3 changes: 2 additions & 1 deletion public/translations/vi/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -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}}"
}
3 changes: 2 additions & 1 deletion public/translations/zh/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -286,5 +286,6 @@
"missing_chain_ticker": "缺失的区块链标记",
"missing_token_address": "缺失的代币地址",
"missing_token_id": "缺失的代币ID",
"missing_signature": "缺失的签名"
"missing_signature": "缺失的签名",
"edited_timestamp": "编辑于{{timestamp}}"
}
12 changes: 11 additions & 1 deletion src/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 }>();
Expand Down Expand Up @@ -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 (
<div className={`${styles.app} ${theme}`}>
<Routes>
Expand Down Expand Up @@ -105,7 +115,7 @@ const App = () => {
<Route path='/p/all/about' element={<About />} />

<Route path='/p/:subplebbitAddress/c/:commentCid' element={<PostPage />} />
<Route path='/p/:subplebbitAddress/c/:commentCid/context' element={<PostPage />} />
<Route path='/p/:subplebbitAddress/c/:commentCid?context=1' element={<PostPage />} />
<Route path='/p/:subplebbitAddress/c/:commentCid/about' element={<About />} />

<Route path='/p/:subplebbitAddress/submit' element={<Submit />} />
Expand Down
Loading