Porównaj commity

...

1904 Commity

Autor SHA1 Wiadomość Data
Lim Chee Aun ee5ec501c5 Upgrade deps
Use getTextInfo()
2025-10-04 07:25:58 +08:00
Lim Chee Aun 2644f57680 Upgrade vite again 2025-10-03 21:29:43 +08:00
Lim Chee Aun ef7402ef0c Only show quote settings in Settings if supported 2025-10-03 21:28:36 +08:00
Lim Chee Aun 3379016f02 Upgrade deps 2025-10-03 09:02:44 +08:00
Lim Chee Aun 6fb9723e1a Less effects 2025-10-02 23:38:13 +08:00
Chee Aun dc7b524bf8
i18n updates (pl-PL) (#1301) 2025-10-02 09:29:38 +00:00
Chee Aun 4684a2b094
i18n updates (ru-RU) (#1300)
* New translations (Russian)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-10-02 07:03:10 +00:00
Lim Chee Aun cce4a39ef4 Fix other account not loaded after logging out from one account 2025-10-02 10:14:49 +08:00
Lim Chee Aun 5ac14be5cd Allow view quotes for others 2025-10-02 08:02:10 +08:00
Lim Chee Aun 439c023092 Fix file hash regex 2025-10-01 18:28:30 +08:00
Lim Chee Aun c868b46702 Fix formatting
I enabled ignore whitespace change so didn't even see this lol
2025-10-01 18:08:39 +08:00
Lim Chee Aun 120b3f3992 Utilise ExpirationPlugin's timestamps 2025-10-01 18:01:30 +08:00
Lim Chee Aun 81868bb6c0 Hide menu items when not logged-in 2025-10-01 16:40:52 +08:00
Lim Chee Aun 28f9116470 Cache DTF locale 2025-10-01 13:44:26 +08:00
Lim Chee Aun a3952ca974 Try custom AssetHashPlugin 2025-10-01 10:23:42 +08:00
Lim Chee Aun 4b04f31fd6 Perf optimizations 2025-10-01 10:23:42 +08:00
Chee Aun 9d2972c43d
i18n updates (fi-FI) (#1297) 2025-09-30 17:11:40 +00:00
Lim Chee Aun 3e3028594c Fix missing IconSpriteProvider 2025-09-30 22:22:13 +08:00
Lim Chee Aun a51606bcec Make violet red more pale in dark mode 2025-09-30 21:23:40 +08:00
Lim Chee Aun 7068551eeb Persistent cache for localeMatch 2025-09-30 18:32:02 +08:00
Lim Chee Aun 274559cfb6 Run htmlContentLength once 2025-09-30 18:32:02 +08:00
Lim Chee Aun be5607190a Test allow poll and media when quote posting 2025-09-30 18:32:02 +08:00
Chee Aun c0fb70c323
Merge pull request #1296 from cheeaun/alert-autofix-38
Potential fix for code scanning alert no. 38: Workflow does not contain permissions
2025-09-30 15:10:18 +08:00
Chee Aun 6dd45d78b1
Potential fix for code scanning alert no. 38: Workflow does not contain permissions
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2025-09-30 15:00:06 +08:00
Lim Chee Aun bbf5c956c3 Test add this custom-build workflow 2025-09-30 14:40:55 +08:00
Lim Chee Aun b6c3b5384a Test invert the color-scheme priority 2025-09-30 14:40:38 +08:00
Lim Chee Aun 36ff2ce9a0 Better spring 2025-09-30 13:54:24 +08:00
Lim Chee Aun 0c5028bea1 Fix formatting 2025-09-30 09:29:18 +08:00
Lim Chee Aun 1dc75ef46b More quote tweaks for Catch-up 2025-09-30 09:27:16 +08:00
Lim Chee Aun 3a99c07267 Implement useThrottledResizeObserver
Hopefully can get rid of "ResizeObserver loop completed with undelivered notifications"
2025-09-30 09:15:57 +08:00
Lim Chee Aun ce74d515dd user-scalable=no for PWA 2025-09-29 20:42:33 +08:00
Lim Chee Aun 51e7729b3a Fix text extraction bug 2025-09-29 19:26:52 +08:00
Lim Chee Aun 730d14eb8e Special treatment for role tags 2025-09-29 19:05:40 +08:00
Lim Chee Aun 3a4abc893f More bottom spacing for recent searches 2025-09-29 18:17:52 +08:00
Lim Chee Aun b945bf637a Try show/hide custom emojis 2025-09-29 18:15:08 +08:00
Lim Chee Aun 27ba588121 Try to fix SW assets cache grows too large 2025-09-28 21:49:10 +08:00
Chee Aun 91ccee139e
i18n updates (ar-SA,ca-ES,cs-CZ,de-DE,eo-UY,es-ES,eu-ES,fa-IR,fi-FI,fr-FR,gl-ES,he-IL,it-IT,ja-JP,kab,ko-KR,lt-LT,nb-NO,nl-NL,oc-FR,pl-PL,pt-BR,pt-PT,ru-RU,th-TH,tok,tr-TR,uk-UA,zh-CN,zh-TW) (#1295)
* New translations (Catalan)

* New translations (Polish)

* New translations (French)

* New translations (Spanish)

* New translations (Arabic)

* New translations (Czech)

* New translations (German)

* New translations (Basque)

* New translations (Finnish)

* New translations (Hebrew)

* New translations (Italian)

* New translations (Japanese)

* New translations (Korean)

* New translations (Lithuanian)

* New translations (Dutch)

* New translations (Portuguese)

* New translations (Russian)

* New translations (Turkish)

* New translations (Ukrainian)

* New translations (Chinese Simplified)

* New translations (Chinese Traditional)

* New translations (Galician)

* New translations (Portuguese, Brazilian)

* New translations (Persian)

* New translations (Thai)

* New translations (Esperanto)

* New translations (Norwegian Bokmal)

* New translations (Occitan)

* New translations (Kabyle)

* New translations (Toki Pona)
2025-09-28 10:35:29 +00:00
Lim Chee Aun 53d33ead0d Style quotes like replies 2025-09-28 18:16:34 +08:00
Lim Chee Aun 056d86947b Revert "Basic grouping for quote notifications"
This reverts commit c2bd325b26.

# Conflicts:
#	src/locales/en.po
2025-09-28 18:16:34 +08:00
Lim Chee Aun c7b0614676 More debug logs for LanguageDetector 2025-09-28 18:16:34 +08:00
Lim Chee Aun 03e33093fc More quotes support in Catch-up 2025-09-28 18:16:34 +08:00
github-actions[bot] 3d9d1137c3 Update README.md 2025-09-28 00:02:41 +00:00
Lim Chee Aun 808ae3b6b1 Time to make these icons re-<use>-able 2025-09-27 20:07:22 +08:00
Lim Chee Aun 27d5945c18 Tiny perf works 2025-09-27 14:06:51 +08:00
Lim Chee Aun 0d947b20d5 Fix edit with QP 2025-09-27 07:45:45 +08:00
Lim Chee Aun 27bc6bd2c8 Fix possible error 2025-09-27 07:45:45 +08:00
Chee Aun d1966cbe7c
i18n updates (pl-PL) (#1292)
* New translations (Polish)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-09-26 11:35:28 +00:00
Chee Aun 51afacd162
i18n updates (fi-FI,gl-ES) (#1291)
* New translations (Finnish)

* New translations (Galician)
2025-09-26 05:57:56 +00:00
Lim Chee Aun 7c5a92ab6e Prevent truncate links for Copy post text 2025-09-26 12:41:15 +08:00
Lim Chee Aun 0e30c53219 Add Quotes filter to Catch-up 2025-09-26 12:41:15 +08:00
Chee Aun 6a7c4de58a
i18n updates (ar-SA,ca-ES,cs-CZ,de-DE,eo-UY,es-ES,eu-ES,fa-IR,fi-FI,fr-FR,gl-ES,he-IL,it-IT,ja-JP,kab,ko-KR,lt-LT,nb-NO,nl-NL,oc-FR,pl-PL,pt-BR,pt-PT,ru-RU,th-TH,tok,tr-TR,uk-UA,zh-CN,zh-TW) (#1290)
* New translations (Catalan)

* New translations (Polish)

* New translations (French)

* New translations (Spanish)

* New translations (Arabic)

* New translations (Czech)

* New translations (German)

* New translations (Basque)

* New translations (Finnish)

* New translations (Hebrew)

* New translations (Italian)

* New translations (Japanese)

* New translations (Korean)

* New translations (Lithuanian)

* New translations (Dutch)

* New translations (Portuguese)

* New translations (Russian)

* New translations (Turkish)

* New translations (Ukrainian)

* New translations (Chinese Simplified)

* New translations (Chinese Traditional)

* New translations (Galician)

* New translations (Portuguese, Brazilian)

* New translations (Persian)

* New translations (Thai)

* New translations (Esperanto)

* New translations (Norwegian Bokmal)

* New translations (Occitan)

* New translations (Kabyle)

* New translations (Toki Pona)
2025-09-25 14:06:50 +00:00
Lim Chee Aun a6cfd32136 Remember custom emoji zoom 2025-09-25 20:38:37 +08:00
Lim Chee Aun c2bd325b26 Basic grouping for quote notifications 2025-09-25 20:38:37 +08:00
Chee Aun 528ae55c5f
i18n updates (es-ES,fr-FR,zh-CN) (#1289)
* New translations (French)

* New translations (Spanish)

* New translations (Chinese Simplified)
2025-09-25 10:22:23 +00:00
Lim Chee Aun d2955f2044 Everything has to check for support first
Even for the other native quotes.
2025-09-25 17:35:46 +08:00
Lim Chee Aun 1c081ed09d Include the other native quote too 2025-09-25 17:33:20 +08:00
Chee Aun 0e759ce908
i18n updates (ar-SA,ca-ES,cs-CZ,de-DE,eo-UY,es-ES,eu-ES,fa-IR,fi-FI,fr-FR,gl-ES,he-IL,it-IT,ja-JP,kab,ko-KR,lt-LT,nb-NO,nl-NL,oc-FR,pl-PL,pt-BR,pt-PT,ru-RU,th-TH,tok,tr-TR,uk-UA,zh-CN,zh-TW) (#1288)
* New translations (Catalan)

* New translations (Polish)

* New translations (French)

* New translations (Spanish)

* New translations (Arabic)

* New translations (Czech)

* New translations (German)

* New translations (Basque)

* New translations (Finnish)

* New translations (Hebrew)

* New translations (Italian)

* New translations (Japanese)

* New translations (Korean)

* New translations (Lithuanian)

* New translations (Dutch)

* New translations (Portuguese)

* New translations (Russian)

* New translations (Turkish)

* New translations (Ukrainian)

* New translations (Chinese Simplified)

* New translations (Chinese Traditional)

* New translations (Galician)

* New translations (Portuguese, Brazilian)

* New translations (Persian)

* New translations (Thai)

* New translations (Esperanto)

* New translations (Norwegian Bokmal)

* New translations (Occitan)

* New translations (Kabyle)

* New translations (Toki Pona)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-09-25 07:49:06 +00:00
Lim Chee Aun 2b092f588f Use local $schema for Biome 2025-09-25 15:40:10 +08:00
Lim Chee Aun 463d32ce13 Show Quotes in posting stats
Also new color identity for quotes
2025-09-25 15:40:10 +08:00
Chee Aun 04c32e6c15
i18n updates (ar-SA,ca-ES,cs-CZ,de-DE,eo-UY,es-ES,eu-ES,fa-IR,fi-FI,fr-FR,gl-ES,he-IL,it-IT,ja-JP,kab,ko-KR,lt-LT,nb-NO,nl-NL,oc-FR,pl-PL,pt-BR,pt-PT,ru-RU,th-TH,tok,tr-TR,uk-UA,zh-CN,zh-TW) (#1287)
* New translations (Catalan)

* New translations (Polish)

* New translations (French)

* New translations (Spanish)

* New translations (Arabic)

* New translations (Czech)

* New translations (German)

* New translations (Basque)

* New translations (Finnish)

* New translations (Hebrew)

* New translations (Italian)

* New translations (Japanese)

* New translations (Korean)

* New translations (Lithuanian)

* New translations (Dutch)

* New translations (Portuguese)

* New translations (Russian)

* New translations (Turkish)

* New translations (Ukrainian)

* New translations (Chinese Simplified)

* New translations (Chinese Traditional)

* New translations (Galician)

* New translations (Portuguese, Brazilian)

* New translations (Persian)

* New translations (Thai)

* New translations (Esperanto)

* New translations (Norwegian Bokmal)

* New translations (Occitan)

* New translations (Kabyle)

* New translations (Toki Pona)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-09-25 04:13:41 +00:00
Lim Chee Aun 8068c1bb10 Add Read more for the stack of QPs 2025-09-25 12:11:02 +08:00
Lim Chee Aun a7be67792a Upgrade deps
- Fix js→jsx file naming
- Upgrade biome scheme and re-run check
2025-09-25 12:11:02 +08:00
Lim Chee Aun 99f49e4357 Intelligently re-map unsupported MIME type 2025-09-25 12:11:02 +08:00
Lim Chee Aun 62e8930fcb Hide inline quote RE when translating
Also cover other use-case like copying post text and TTS
2025-09-25 12:11:02 +08:00
Lim Chee Aun a029554264 Show hints that Boost button can also quote if can quote 2025-09-25 12:11:02 +08:00
Lim Chee Aun d3269ae089 Better variable names 2025-09-25 12:11:02 +08:00
Chee Aun 240b8b1c46
i18n updates (fr-FR) (#1286)
* New translations (French)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-09-24 14:37:53 +00:00
Chee Aun 26626b1dcf
i18n updates (es-ES,fi-FI,gl-ES,zh-CN) (#1284)
* New translations (Spanish)

* Update catalogs.json

* New translations (Chinese Simplified)

* New translations (Galician)

* Update catalogs.json

* New translations (Spanish)

* New translations (Finnish)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-09-24 12:47:01 +00:00
Lim Chee Aun af0f3fa504 Fix un-punycoded domain
Also, add proxyURL and proxyDomain. Not sure what to do with them yet.
2025-09-24 10:27:00 +08:00
Chee Aun c6a9fca915
i18n updates (ar-SA,ca-ES,cs-CZ,de-DE,eo-UY,es-ES,eu-ES,fa-IR,fi-FI,fr-FR,gl-ES,he-IL,it-IT,ja-JP,kab,ko-KR,lt-LT,nb-NO,nl-NL,oc-FR,pl-PL,pt-BR,pt-PT,ru-RU,th-TH,tok,tr-TR,uk-UA,zh-CN,zh-TW) (#1283)
* New translations (Catalan)

* New translations (Polish)

* New translations (French)

* New translations (Spanish)

* New translations (Arabic)

* New translations (Czech)

* New translations (German)

* New translations (Basque)

* New translations (Finnish)

* New translations (Hebrew)

* New translations (Italian)

* New translations (Japanese)

* New translations (Korean)

* New translations (Lithuanian)

* New translations (Dutch)

* New translations (Portuguese)

* New translations (Russian)

* New translations (Turkish)

* New translations (Ukrainian)

* New translations (Chinese Simplified)

* New translations (Chinese Traditional)

* New translations (Galician)

* New translations (Portuguese, Brazilian)

* New translations (Persian)

* New translations (Thai)

* New translations (Esperanto)

* New translations (Norwegian Bokmal)

* New translations (Occitan)

* New translations (Kabyle)

* New translations (Toki Pona)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-09-23 10:26:58 +00:00
Lim Chee Aun 9647fcd70f Handle QP link paste
Also fix draft
2025-09-23 18:05:20 +08:00
Lim Chee Aun 435cc07634 Plus also need to be small 2025-09-23 18:05:20 +08:00
Lim Chee Aun b68d811f7a Fix streaming not working 2025-09-23 18:05:20 +08:00
Lim Chee Aun bfaf41596b 'q' keyboard shortcut for Quote 2025-09-23 18:05:20 +08:00
Chee Aun 5392cc20e0
i18n updates (es-ES,fi-FI,gl-ES) (#1281)
* New translations (Spanish)

* Update catalogs.json

* New translations (Galician)

* New translations (Finnish)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-09-22 16:21:03 +00:00
Chee Aun 480adfef21
i18n updates (ar-SA,ca-ES,cs-CZ,de-DE,eo-UY,es-ES,eu-ES,fa-IR,fi-FI,fr-FR,gl-ES,he-IL,it-IT,ja-JP,kab,ko-KR,lt-LT,nb-NO,nl-NL,oc-FR,pl-PL,pt-BR,pt-PT,ru-RU,th-TH,tok,tr-TR,uk-UA,zh-CN,zh-TW) (#1280)
* New translations (Catalan)

* New translations (Polish)

* New translations (French)

* New translations (Spanish)

* New translations (Arabic)

* New translations (Czech)

* New translations (German)

* New translations (Basque)

* New translations (Finnish)

* New translations (Hebrew)

* New translations (Italian)

* New translations (Japanese)

* New translations (Korean)

* New translations (Lithuanian)

* New translations (Dutch)

* New translations (Portuguese)

* New translations (Russian)

* New translations (Turkish)

* New translations (Ukrainian)

* New translations (Chinese Simplified)

* New translations (Chinese Traditional)

* New translations (Galician)

* New translations (Portuguese, Brazilian)

* New translations (Persian)

* New translations (Thai)

* New translations (Esperanto)

* New translations (Norwegian Bokmal)

* New translations (Occitan)

* New translations (Kabyle)

* New translations (Toki Pona)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-09-21 11:59:14 +00:00
Lim Chee Aun 3f44651502 View Quotes modal
And also fix the count to work with quote count if boost count is zero
2025-09-21 19:41:37 +08:00
Chee Aun d0b1906a91
i18n updates (de-DE,gl-ES,kab) (#1278)
* New translations (Galician)

* Update catalogs.json

* New translations (German)

* New translations (Kabyle)

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-09-21 10:32:43 +00:00
Chee Aun 917e9303ba
i18n updates (ar-SA,ca-ES,cs-CZ,de-DE,eo-UY,es-ES,eu-ES,fa-IR,fi-FI,fr-FR,gl-ES,he-IL,it-IT,ja-JP,kab,ko-KR,lt-LT,nb-NO,nl-NL,oc-FR,pl-PL,pt-BR,pt-PT,ru-RU,th-TH,tok,tr-TR,uk-UA,zh-CN,zh-TW) (#1277)
* New translations (Catalan)

* New translations (Polish)

* New translations (French)

* New translations (Spanish)

* New translations (Arabic)

* New translations (Czech)

* New translations (German)

* New translations (Basque)

* New translations (Finnish)

* New translations (Hebrew)

* New translations (Italian)

* New translations (Japanese)

* New translations (Korean)

* New translations (Lithuanian)

* New translations (Dutch)

* New translations (Portuguese)

* New translations (Russian)

* New translations (Turkish)

* New translations (Ukrainian)

* New translations (Chinese Simplified)

* New translations (Chinese Traditional)

* New translations (Galician)

* New translations (Portuguese, Brazilian)

* New translations (Persian)

* New translations (Thai)

* New translations (Esperanto)

* New translations (Norwegian Bokmal)

* New translations (Occitan)

* New translations (Kabyle)

* New translations (Toki Pona)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-09-21 05:38:12 +00:00
Lim Chee Aun 93d3b45240 Remove own QP from other people's post 2025-09-21 13:14:46 +08:00
Lim Chee Aun 5e9f5928b4 Extend cloaking capabilities 2025-09-21 13:14:46 +08:00
Lim Chee Aun 3578b0a32e Fix wrong logic for showing "Quote settings" menu 2025-09-21 13:14:46 +08:00
Lim Chee Aun 6820e0d5ff Change QP policy after posted 2025-09-21 13:14:46 +08:00
Chee Aun ce2b40f1c6
i18n updates (eo-UY,es-ES) (#1276)
* New translations (Spanish)

* New translations (Spanish)

* New translations (Esperanto)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-09-20 18:07:44 +00:00
Chee Aun c5c3e01500
i18n updates (gl-ES,zh-CN) (#1275)
* New translations (Chinese Simplified)

* New translations (Galician)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-09-20 15:18:10 +00:00
Chee Aun 37354c58af
i18n updates (ar-SA,es-ES,fr-FR) (#1274)
* New translations (French)

* New translations (Spanish)

* New translations (Arabic)
2025-09-20 14:03:12 +00:00
Lim Chee Aun 0a1503515b Fix edit post to allow change quote settings
Also hide Quote Settings if native quote post not supported
2025-09-20 21:48:02 +08:00
Chee Aun 6278fba62d
i18n updates (ar-SA,ca-ES,cs-CZ,de-DE,eo-UY,es-ES,eu-ES,fa-IR,fi-FI,fr-FR,gl-ES,he-IL,it-IT,ja-JP,kab,ko-KR,lt-LT,nb-NO,nl-NL,oc-FR,pl-PL,pt-BR,pt-PT,ru-RU,th-TH,tok,tr-TR,uk-UA,zh-CN,zh-TW) (#1273)
* New translations (Catalan)

* New translations (Polish)

* New translations (French)

* New translations (Spanish)

* New translations (Arabic)

* New translations (Czech)

* New translations (German)

* New translations (Basque)

* New translations (Finnish)

* New translations (Hebrew)

* New translations (Italian)

* New translations (Japanese)

* New translations (Korean)

* New translations (Lithuanian)

* New translations (Dutch)

* New translations (Portuguese)

* New translations (Russian)

* New translations (Turkish)

* New translations (Ukrainian)

* New translations (Chinese Simplified)

* New translations (Chinese Traditional)

* New translations (Galician)

* New translations (Portuguese, Brazilian)

* New translations (Persian)

* New translations (Thai)

* New translations (Esperanto)

* New translations (Norwegian Bokmal)

* New translations (Occitan)

* New translations (Kabyle)

* New translations (Toki Pona)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-09-20 12:51:43 +00:00
Lim Chee Aun 29f24d8b43 QP composing & default settings
Things may BREAK, not well-tested at all!
2025-09-20 20:38:47 +08:00
Lim Chee Aun 2f808de957 Purple for quotes too 2025-09-20 20:34:12 +08:00
Lim Chee Aun b2fadf9b01 Handle QP notifications 2025-09-19 18:19:16 +08:00
Lim Chee Aun fd19a40a83 Display quote count, for now. 2025-09-19 18:19:16 +08:00
Lim Chee Aun 823a2d6c01 Fix spacing issues with QPs 2025-09-19 18:19:16 +08:00
Lim Chee Aun b7490a8906 Fix native quotes not working in boosts 2025-09-19 18:19:16 +08:00
Lim Chee Aun eef9bd9717 Hint for links that's currently quoted 2025-09-19 18:19:16 +08:00
Lim Chee Aun c876f3c2b6 Hide roles if is self for NameText
Also a quick refactor
2025-09-19 18:19:16 +08:00
Lim Chee Aun cb7a8e1d7d Fix .card-image border in .card-post 2025-09-19 18:19:16 +08:00
Chee Aun fccd3dc47b
i18n updates (ca-ES,pl-PL) (#1272)
* New translations (Catalan)

* New translations (Polish)
2025-09-18 21:31:06 +00:00
Chee Aun 7f46aff966
i18n updates (es-ES,kab) (#1270)
* New translations (Spanish)

* New translations (Kabyle)
2025-09-17 15:56:46 +00:00
Lim Chee Aun cb9270a706 Forgot the emojis 2025-09-17 21:58:11 +08:00
Lim Chee Aun 39d0feb30e Update changelog 2025-09-17 21:48:32 +08:00
Lim Chee Aun 2314fca408 Fix QP shouldn't be truncated when not in the timeline 2025-09-17 21:48:05 +08:00
Lim Chee Aun 822d56a8f6 Don't need max-width for QPs 2025-09-17 20:00:49 +08:00
Lim Chee Aun 591c1ff290 Fix .hiding quote-inline not working 2025-09-17 20:00:49 +08:00
Chee Aun 0cbcb44753
i18n updates (es-ES,fi-FI,gl-ES,pl-PL,ru-RU,zh-CN) (#1267)
* New translations (Spanish)

* New translations (Galician)

* New translations (Chinese Simplified)

* New translations (Finnish)

* New translations (Polish)

* New translations (Russian)
2025-09-17 10:40:59 +00:00
Lim Chee Aun 3bcacd8bed Move QP below media
Also truncate lengthy or multiple QPs
2025-09-17 16:53:42 +08:00
Chee Aun 1fb3c86354
i18n updates (ar-SA,ca-ES,cs-CZ,de-DE,en,eo-UY,es-ES,eu-ES,fa-IR,fi-FI,fr-FR,gl-ES,he-IL,it-IT,ja-JP,kab,ko-KR,lt-LT,nb-NO,nl-NL,oc-FR,pl-PL,pt-BR,pt-PT,ru-RU,th-TH,tok,tr-TR,uk-UA,zh-CN,zh-TW) (#1266)
* New translations (French)

* New translations (Spanish)

* New translations (Arabic)

* New translations (Catalan)

* New translations (Czech)

* New translations (German)

* New translations (Basque)

* New translations (Finnish)

* New translations (Hebrew)

* New translations (Italian)

* New translations (Japanese)

* New translations (Korean)

* New translations (Lithuanian)

* New translations (Dutch)

* New translations (Polish)

* New translations (Portuguese)

* New translations (Russian)

* New translations (Turkish)

* New translations (Ukrainian)

* New translations (Chinese Simplified)

* New translations (Chinese Traditional)

* New translations (Galician)

* New translations (Portuguese, Brazilian)

* New translations (Persian)

* New translations (Thai)

* New translations (Esperanto)

* New translations (Norwegian Bokmal)

* New translations (Occitan)

* New translations (Kabyle)

* New translations (Toki Pona)
2025-09-15 11:24:37 +00:00
Lim Chee Aun 4433036e8d Fix cursor position in open link sheet 2025-09-15 19:18:00 +08:00
Lim Chee Aun 9703291cd4 Update QP revoked copy based on Mastodon's latest copy 2025-09-15 18:46:22 +08:00
Lim Chee Aun 306d6d3b83 Subtle hint for larger-than-rendered custom emojis 2025-09-15 17:15:21 +08:00
Lim Chee Aun c84f36d764 Experiment: show domain for non-native QPs 2025-09-13 12:12:08 +08:00
Lim Chee Aun 2ca5db143c Might as well make Open link dialog look fun 2025-09-12 21:56:42 +08:00
Lim Chee Aun 79b6c7d1dc Make add button mobile-first 2025-09-12 21:52:29 +08:00
Chee Aun e49448fe77
i18n updates (ca-ES,es-ES,fi-FI,gl-ES,pl-PL) (#1264)
* New translations (Spanish)

* New translations (Polish)

* New translations (Galician)

* New translations (Catalan)

* New translations (Catalan)

* Update catalogs.json

* New translations (Catalan)

* New translations (Finnish)

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-09-11 18:35:29 +00:00
Lim Chee Aun a5f8dd4c06 Larger zoom buttons 2025-09-11 12:28:23 +08:00
Lim Chee Aun 691955f65f Fix regression bug: maxCreatedAt not working in Catchup 2025-09-11 08:34:16 +08:00
Chee Aun 52255b77fa
i18n updates (eo-UY,es-ES,eu-ES) (#1263)
* New translations (Spanish)

* New translations (Esperanto)

* Update catalogs.json

* New translations (Basque)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-09-09 14:42:44 +00:00
Lim Chee Aun 0d00ae3d64 These .quote-inline's are getting pretty annoying 2025-09-09 20:13:48 +08:00
Lim Chee Aun 8212e860d4 Continue my war against HDR images blinding my eyes 2025-09-09 19:12:17 +08:00
Lim Chee Aun 3475c30a0e Add missing default values
Re-sort them too
2025-09-09 18:32:33 +08:00
Lim Chee Aun 3e4f7a8d2c Clean up with examples 2025-09-09 18:20:07 +08:00
Chee Aun 084c599599
i18n updates (ar-SA,ca-ES,cs-CZ,de-DE,es-ES,eu-ES,fi-FI,fr-FR,gl-ES,he-IL,it-IT,ja-JP,ko-KR,lt-LT,nl-NL) (#1262)
* New translations (Galician)

* Update catalogs.json

* New translations (Spanish)

* New translations (French)

* New translations (Arabic)

* New translations (Catalan)

* New translations (Czech)

* New translations (German)

* New translations (Basque)

* New translations (Finnish)

* New translations (Hebrew)

* New translations (Italian)

* New translations (Japanese)

* New translations (Korean)

* New translations (Lithuanian)

* New translations (Dutch)

* New translations (Polish)

* New translations (Portuguese)

* New translations (Russian)

* New translations (Turkish)

* New translations (Ukrainian)

* New translations (Chinese Simplified)

* New translations (Chinese Traditional)

* New translations (Galician)

* New translations (Portuguese, Brazilian)

* New translations (Persian)

* New translations (Thai)

* New translations (Esperanto)

* New translations (Norwegian Bokmal)

* New translations (Occitan)

* New translations (Kabyle)

* New translations (Toki Pona)

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-09-09 10:08:38 +00:00
Lim Chee Aun 24120af5fa Fix formatting 2025-09-09 17:46:36 +08:00
Lim Chee Aun 23ebc030fc Test add JSON schema for env vars
Not really sure if this'll be useful
2025-09-09 17:44:44 +08:00
Lim Chee Aun 30540387e5 Add zoom buttons for custom emojis modal 2025-09-09 11:28:23 +08:00
Chee Aun 226fd66494
i18n updates (eo-UY,es-ES,fi-FI,pl-PL,zh-CN) (#1261)
* New translations (Spanish)

* New translations (Chinese Simplified)

* New translations (Esperanto)

* Update catalogs.json

* New translations (Finnish)

* Update catalogs.json

* New translations (Polish)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-09-09 00:32:41 +00:00
Chee Aun 923451ad60
i18n updates (ar-SA,ca-ES,cs-CZ,de-DE,eo-UY,es-ES,eu-ES,fa-IR,fi-FI,fr-FR,gl-ES,he-IL,it-IT,ja-JP,kab,ko-KR,lt-LT,nb-NO,nl-NL,oc-FR,pl-PL,pt-BR,pt-PT,ru-RU,th-TH,tok,tr-TR,uk-UA,zh-CN,zh-TW) (#1260)
* New translations (Spanish)

* New translations (French)

* New translations (Arabic)

* New translations (Catalan)

* New translations (Czech)

* New translations (German)

* New translations (Basque)

* New translations (Finnish)

* New translations (Hebrew)

* New translations (Italian)

* New translations (Japanese)

* New translations (Korean)

* New translations (Lithuanian)

* New translations (Dutch)

* New translations (Polish)

* New translations (Portuguese)

* New translations (Russian)

* New translations (Turkish)

* New translations (Ukrainian)

* New translations (Chinese Simplified)

* New translations (Chinese Traditional)

* New translations (Galician)

* New translations (Portuguese, Brazilian)

* New translations (Persian)

* New translations (Thai)

* New translations (Esperanto)

* New translations (Norwegian Bokmal)

* New translations (Occitan)

* New translations (Kabyle)

* New translations (Toki Pona)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-09-08 15:58:11 +00:00
Lim Chee Aun 80cba2d89d Experiment preview custom emoji image in media modal 2025-09-08 22:35:53 +08:00
Lim Chee Aun 1047667d57 Add bottom spacing for recent searches 2025-09-08 22:35:53 +08:00
Lim Chee Aun 7ee5a44e29 Add modal to open links 2025-09-08 22:35:53 +08:00
Lim Chee Aun 34827960b5 New experiment: Edit History Snapshots 2025-09-08 22:35:53 +08:00
Lim Chee Aun 887a5f4179 Test increase clamp limit for .card-post 2025-09-08 22:35:53 +08:00
Lim Chee Aun b614116589 Try fix br hiding in .quote-inline 2025-09-08 22:35:53 +08:00
Lim Chee Aun 870ae4f28f Add reset scroll direction
When showing back the header on-demand, it got confused by current scroll direction
2025-09-08 22:35:53 +08:00
Chee Aun f7a3fc747a
i18n updates (es-ES) (#1259) 2025-09-07 23:11:20 +00:00
Chee Aun a8f858aff3
i18n updates (ru-RU) (#1258)
* New translations (Russian)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-09-05 05:51:05 +00:00
Lim Chee Aun fce09e5348 Quick fix CW not working 2025-09-04 17:16:12 +08:00
Lim Chee Aun 3d37d631e9 Upgrade deps except vite 2025-09-04 16:58:07 +08:00
Lim Chee Aun 117ac3892a Clean up styles for textarea 2025-09-04 16:56:24 +08:00
Lim Chee Aun 23e2f59033 Experiment showing more text in cards 2025-09-04 16:47:52 +08:00
Lim Chee Aun b1ec5abe6c Revert "Experiment showing small title when nav/tab bars collapsed"
This reverts commit 26c9fb5aee.
2025-09-03 16:39:15 +08:00
Lim Chee Aun 5f2c07695d Revert "Mobile Safari PWA is being annoying"
This reverts commit 41a9f828fd.
2025-09-03 16:39:08 +08:00
Lim Chee Aun 41a9f828fd Mobile Safari PWA is being annoying 2025-09-03 15:07:36 +08:00
Lim Chee Aun 26c9fb5aee Experiment showing small title when nav/tab bars collapsed 2025-09-03 14:15:53 +08:00
Lim Chee Aun 1cb0d7da52 Fix title not working on Bookmarks page 2025-09-03 14:15:06 +08:00
Lim Chee Aun 4462227139 Focus on textarea when maximize from composer button 2025-09-03 14:15:06 +08:00
Chee Aun fe8ae64816
i18n updates (eo-UY,es-ES,fi-FI,gl-ES) (#1256)
* New translations (Spanish)

* New translations (Galician)

* New translations (Esperanto)

* Update catalogs.json

* New translations (Finnish)

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-09-03 04:04:30 +00:00
Lim Chee Aun 4b06c67917 Only focus on last focused element if there's nothing in focus 2025-09-03 09:05:25 +08:00
Lim Chee Aun 76676fff53 Better fix 2025-09-03 09:00:35 +08:00
Lim Chee Aun f11edf3cd1 Revert "Try fix form getting squashed on Mobile Safari"
This reverts commit ad4125a964.
2025-09-03 09:00:11 +08:00
Lim Chee Aun ad4125a964 Try fix form getting squashed on Mobile Safari 2025-09-03 07:52:42 +08:00
Chee Aun e3f645dda5
i18n updates (ar-SA,ca-ES,cs-CZ,de-DE,es-ES,eu-ES,fi-FI,fr-FR,gl-ES,he-IL,it-IT,kab) (#1255)
* New translations (Spanish)

* New translations (Spanish)

* New translations (Arabic)

* New translations (Catalan)

* New translations (Czech)

* New translations (German)

* New translations (Basque)

* New translations (Galician)

* New translations (Finnish)

* New translations (Kabyle)

* New translations (French)

* New translations (Hebrew)

* New translations (Italian)

* New translations (Japanese)

* New translations (Korean)

* New translations (Lithuanian)

* New translations (Dutch)

* New translations (Polish)

* New translations (Portuguese)

* New translations (Russian)

* New translations (Turkish)

* New translations (Ukrainian)

* New translations (Chinese Simplified)

* New translations (Chinese Traditional)

* New translations (Portuguese, Brazilian)

* New translations (Persian)

* New translations (Thai)

* New translations (Esperanto)

* New translations (Norwegian Bokmal)

* New translations (Occitan)

* New translations (Toki Pona)
2025-09-02 12:48:16 +00:00
Lim Chee Aun fdc722f707 Initial composer relayout 2025-09-02 20:33:17 +08:00
Chee Aun dbca3c5f39
i18n updates (fi-FI,gl-ES,kab) (#1254)
* Update catalogs.json

* New translations (Galician)

* New translations (Finnish)

* New translations (Kabyle)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-09-01 11:05:57 +00:00
Chee Aun dca66433fe
i18n updates (ar-SA,ca-ES,cs-CZ,de-DE,es-ES,fi-FI,fr-FR,he-IL,ja-JP,ko-KR,lt-LT,nl-NL,pt-PT,tr-TR,uk-UA,zh-CN) (#1253)
* New translations (Catalan)

* Update catalogs.json

* New translations (Catalan)

* New translations (French)

* New translations (Spanish)

* New translations (Arabic)

* New translations (Catalan)

* New translations (Czech)

* New translations (German)

* New translations (Finnish)

* New translations (Hebrew)

* New translations (Japanese)

* New translations (Korean)

* New translations (Lithuanian)

* New translations (Dutch)

* New translations (Portuguese)

* New translations (Turkish)

* New translations (Ukrainian)

* New translations (Chinese Simplified)

* New translations (Chinese Traditional)

* New translations (Galician)

* New translations (Portuguese, Brazilian)

* New translations (Persian)

* New translations (Thai)

* New translations (Esperanto)

* New translations (Norwegian Bokmal)

* New translations (Occitan)

* New translations (Kabyle)

* New translations (Toki Pona)

* New translations (Basque)

* New translations (Italian)

* New translations (Polish)

* New translations (Russian)

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-09-01 01:35:26 +00:00
Lim Chee Aun e84a0a28ce Fix missing menus due to last refactor 2025-09-01 09:34:02 +08:00
Lim Chee Aun eab0d85842 Fix undefined current.style 2025-08-30 23:12:26 +08:00
Chee Aun a7aba451bc
i18n updates (ar-SA,ca-ES,cs-CZ,de-DE,eo-UY,es-ES,eu-ES,fa-IR,fi-FI,fr-FR,gl-ES,he-IL,it-IT,ja-JP,kab,ko-KR,lt-LT,nb-NO,nl-NL,oc-FR,pl-PL,pt-BR,pt-PT,ru-RU,th-TH,tok,tr-TR,uk-UA,zh-CN,zh-TW) (#1251)
* New translations (French)

* New translations (Spanish)

* New translations (Arabic)

* New translations (Catalan)

* New translations (Czech)

* New translations (German)

* New translations (Finnish)

* New translations (Hebrew)

* New translations (Japanese)

* New translations (Korean)

* New translations (Lithuanian)

* New translations (Dutch)

* New translations (Portuguese)

* New translations (Turkish)

* New translations (Ukrainian)

* New translations (Chinese Simplified)

* New translations (Chinese Traditional)

* New translations (Galician)

* New translations (Portuguese, Brazilian)

* New translations (Persian)

* New translations (Thai)

* New translations (Esperanto)

* New translations (Norwegian Bokmal)

* New translations (Occitan)

* New translations (Kabyle)

* New translations (Toki Pona)

* New translations (Basque)

* New translations (Italian)

* New translations (Polish)

* New translations (Russian)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-08-30 00:12:24 +00:00
Lim Chee Aun 6e6b2ecfdb Make text-expander work for CW & poll fields 2025-08-29 15:50:52 +08:00
Lim Chee Aun 967567659d Make custom emoji picker work for CW field 2025-08-28 16:14:39 +08:00
Lim Chee Aun 0128524970 Make custom emoji picker work for poll fields 2025-08-27 17:38:59 +08:00
Lim Chee Aun a7bb3e49f7 Update instances list 2025-08-27 10:07:58 +08:00
Lim Chee Aun f9a813eb44 Refactor components from account-info 2025-08-27 09:37:24 +08:00
Lim Chee Aun 1336b23e4c Refactor components from compose 2025-08-27 09:37:24 +08:00
Lim Chee Aun 1a25b32cdc Refactor components from status 2025-08-27 09:37:24 +08:00
Lim Chee Aun 9ccbe244af Fix cache key for DIFFERENT_LANG_CHECK
Delay further the setTimeout
2025-08-27 09:37:24 +08:00
Lim Chee Aun f8e215ac4e Don't need to show role as account-block is showing it 2025-08-27 09:37:24 +08:00
Lim Chee Aun 2cd3f7a579 Refactor RelativeTimeFormat 2025-08-27 09:37:24 +08:00
Lim Chee Aun 1318424c77 Use more Date.parse and Date.now 2025-08-27 09:37:23 +08:00
Chee Aun e862c0e138
i18n updates (gl-ES) (#1250)
* New translations (Galician)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-08-26 03:12:05 +00:00
Lim Chee Aun 363f07b7d9 Upgrade deps except vite 2025-08-25 01:00:39 +08:00
Lim Chee Aun b2515fd283 Try fix "Uncompiled message detected" warnings from Lingui 2025-08-24 17:29:47 +08:00
Lim Chee Aun a53aa522d9 Make SVG icons more accessible? 2025-08-24 17:29:47 +08:00
Chee Aun e161dea664
i18n updates (eo-UY,es-ES) (#1249)
* New translations (Spanish)

* New translations (Esperanto)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-08-23 16:35:14 +00:00
Chee Aun 7a1e51870a
i18n updates (fi-FI,ru-RU) (#1248)
* New translations (Finnish)

* New translations (Russian)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-08-23 15:26:40 +00:00
Chee Aun 7c1d463699
i18n updates (es-ES,fr-FR) (#1247)
* New translations (French)

* New translations (Spanish)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-08-23 12:16:10 +00:00
Lim Chee Aun f918094971 Don't show endorsements inside account sheet 2025-08-23 19:45:05 +08:00
Chee Aun a1b3e7035a
i18n updates (ar-SA,ca-ES,cs-CZ,de-DE,es-ES,fi-FI,fr-FR,he-IL,ja-JP,ko-KR,lt-LT,nl-NL,pt-PT,zh-CN) (#1246)
* New translations (Finnish)

* New translations (Chinese Simplified)

* Update catalogs.json

* New translations (Spanish)

* New translations (French)

* New translations (Spanish)

* New translations (Arabic)

* New translations (Catalan)

* New translations (Czech)

* New translations (German)

* New translations (Finnish)

* New translations (Hebrew)

* New translations (Japanese)

* New translations (Korean)

* New translations (Lithuanian)

* New translations (Dutch)

* New translations (Portuguese)

* New translations (Turkish)

* New translations (Ukrainian)

* New translations (Chinese Simplified)

* New translations (Chinese Traditional)

* New translations (Galician)

* New translations (Portuguese, Brazilian)

* New translations (Persian)

* New translations (Thai)

* New translations (Esperanto)

* New translations (Norwegian Bokmal)

* New translations (Occitan)

* New translations (Kabyle)

* New translations (Toki Pona)

* New translations (Basque)

* New translations (Italian)

* New translations (Polish)

* New translations (Russian)

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-08-23 11:16:41 +00:00
Lim Chee Aun 56a239e89f Limit threads count total to 100 2025-08-23 19:07:19 +08:00
Lim Chee Aun 57ee92cf76 Experiment showing X months/years later 2025-08-23 19:07:19 +08:00
Lim Chee Aun 75b8f0cf02 Prioritize Intl's locale instead of navigator.languages 2025-08-23 19:07:19 +08:00
Chee Aun 55745f5b51
i18n updates (ar-SA,ca-ES,cs-CZ,de-DE,eo-UY,fa-IR,fi-FI,gl-ES,he-IL,ja-JP,kab,ko-KR,lt-LT,nb-NO,nl-NL,oc-FR,pt-BR,pt-PT,th-TH,tok,tr-TR,uk-UA,zh-CN,zh-TW) (#1245)
* New translations (Arabic)

* New translations (Catalan)

* New translations (Czech)

* New translations (German)

* New translations (Finnish)

* New translations (Hebrew)

* New translations (Japanese)

* New translations (Korean)

* New translations (Lithuanian)

* New translations (Dutch)

* New translations (Portuguese)

* New translations (Turkish)

* New translations (Ukrainian)

* New translations (Chinese Simplified)

* New translations (Chinese Traditional)

* New translations (Galician)

* New translations (Portuguese, Brazilian)

* New translations (Persian)

* New translations (Thai)

* New translations (Esperanto)

* New translations (Norwegian Bokmal)

* New translations (Occitan)

* New translations (Kabyle)

* New translations (Toki Pona)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-08-22 06:00:36 +00:00
Chee Aun 20d97b2ecb
i18n updates (eu-ES,fr-FR,it-IT,pl-PL,ru-RU) (#1244)
* New translations (Russian)

* Update catalogs.json

* New translations (Polish)

* New translations (Basque)

* New translations (Italian)

* New translations (Russian)

* New translations (French)

* New translations (Spanish)

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-08-22 04:31:47 +00:00
Lim Chee Aun a106a16026 Reduce diff noise for .po changes 2025-08-22 12:25:10 +08:00
Lim Chee Aun 8a8b81404e Refactor thread badge
Use more of it
2025-08-22 12:22:26 +08:00
Chee Aun a9d4ade8a1
i18n updates (eu-ES,it-IT,pl-PL,ru-RU) (#1239)
* New translations (Basque)

* Update catalogs.json

* New translations (Italian)

* Update catalogs.json

* New translations (Polish)

* New translations (Polish)

* New translations (Russian)

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-08-21 07:54:05 +00:00
Lim Chee Aun 5bf47bccd7 Fix date-time-format test 2025-08-20 22:44:43 +08:00
Lim Chee Aun d7f1807ceb Upgrade vite-plugin-pwa 2025-08-20 17:10:24 +08:00
Lim Chee Aun ac3d670030 Upgrade preact & valtio 2025-08-20 17:06:41 +08:00
Lim Chee Aun e768965dba Prevent long blocking task and checkDifferentLanguage running twice 2025-08-20 17:01:52 +08:00
Lim Chee Aun 2cde572c7a DRY the gradients 2025-08-20 17:00:44 +08:00
Lim Chee Aun 9bd77a713a Expose function for debugging 2025-08-20 16:59:52 +08:00
Lim Chee Aun ccec126036 Don't need to update locales on runtime 2025-08-20 16:59:37 +08:00
Lim Chee Aun f97c69c2bc Rewrite niceDateTime, extract DateTimeFormat 2025-08-20 16:59:12 +08:00
Lim Chee Aun 29ce925e87 Fix alignment in recent searches 2025-08-20 16:54:05 +08:00
Lim Chee Aun 336dd897e4 Upgrade deps 2025-08-15 20:06:18 +08:00
Lim Chee Aun a25b0ecdf7 Test more localized date time format 2025-08-15 19:43:55 +08:00
Lim Chee Aun 40ceff36aa Downgrade Vite to v7.0.6
Newer versions 7.1.x causes "Unknown word" errors from postcss
2025-08-15 19:43:18 +08:00
Lim Chee Aun ae0172e076 Upgrade deps 2025-08-12 09:33:09 +08:00
github-actions[bot] fe1070dbdc Update README.md 2025-08-10 00:02:48 +00:00
Chee Aun 551e1059ba
Merge pull request #1234 from cheeaun/l10n_main
New Crowdin updates
2025-08-07 21:02:52 +08:00
Lim Chee Aun 49c752499a Okay still need this 2025-08-07 13:02:48 +08:00
Lim Chee Aun b0a42ac583 Who shrank the stats? 2025-08-07 12:41:54 +08:00
Chee Aun 7f9dfa2997
Merge pull request #1236 from VirtualWolf/main
Changed CWs on replies to be kept if content is sensitive OR if there is spoiler text
2025-08-06 18:06:37 +08:00
VirtualWolf dd34cf1251 Changed the Content Warning field to be shown based solely on whether there is already a content warning on the toot being replied to. 2025-08-06 18:14:22 +10:00
Chee Aun a9fc59e2b1 New translations (Finnish) 2025-08-05 23:43:57 +08:00
Chee Aun f065b64bf2 New translations (Spanish) 2025-08-05 21:53:39 +08:00
VirtualWolf 8e49152f77 Changed CWs on replies to be kept if content is sensitive OR if there is spoiler text, rather than being only sensitive content and explicitly without spoiler text. Fixes #1110. 2025-08-05 18:54:58 +10:00
Chee Aun c7386aaca2 New translations (Ukrainian) 2025-08-05 16:18:06 +08:00
Chee Aun 17b973c233 New translations (Galician) 2025-08-05 14:39:44 +08:00
Chee Aun 738c20ecea
i18n updates (ar-SA,ca-ES,cs-CZ,de-DE,eo-UY,es-ES,eu-ES,fa-IR,fi-FI,fr-FR,gl-ES,he-IL,it-IT,ja-JP,kab,ko-KR,lt-LT,nb-NO,nl-NL,oc-FR,pl-PL,pt-BR,pt-PT,ru-RU,th-TH,tok,tr-TR,uk-UA,zh-CN,zh-TW) (#1233)
* New translations (Polish)

* New translations (Hebrew)

* New translations (Ukrainian)

* New translations (Esperanto)

* New translations (French)

* New translations (Spanish)

* New translations (Arabic)

* New translations (Catalan)

* New translations (Czech)

* New translations (German)

* New translations (Basque)

* New translations (Finnish)

* New translations (Italian)

* New translations (Japanese)

* New translations (Korean)

* New translations (Lithuanian)

* New translations (Dutch)

* New translations (Portuguese)

* New translations (Russian)

* New translations (Turkish)

* New translations (Chinese Simplified)

* New translations (Chinese Traditional)

* New translations (Galician)

* New translations (Portuguese, Brazilian)

* New translations (Persian)

* New translations (Thai)

* New translations (Norwegian Bokmal)

* New translations (Occitan)

* New translations (Kabyle)

* New translations (Toki Pona)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-08-05 04:13:27 +00:00
Lim Chee Aun 354d7d023c Finally proper pluralize this
In the end, I didn't change the design for this. No point prepping for future redesign.
2025-08-05 11:52:29 +08:00
Lim Chee Aun 01db13bc92 Upgrade deps 2025-08-04 13:02:48 +08:00
Chee Aun 994fcc3430
i18n updates (eu-ES,pl-PL) (#1231)
* New translations (Polish)

* Update catalogs.json

* New translations (Basque)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-08-03 15:27:36 +00:00
Lim Chee Aun bb6da7fb19 Prevent undefined from showing up 2025-08-03 18:31:33 +08:00
Lim Chee Aun d56cf4c12d Add config to disallow robots 2025-08-03 13:05:06 +08:00
Lim Chee Aun e31c78024b Don't need upload-artifact 2025-08-01 21:24:28 +08:00
Lim Chee Aun 5d77a666a6 Unit test for locale-match
Tests are copied from original sources
2025-08-01 21:11:48 +08:00
Lim Chee Aun 20cbc05a12 Set reporters for playwright 2025-08-01 21:11:48 +08:00
Chee Aun a5ed98ec77
i18n updates (es-ES,fi-FI,gl-ES,pt-BR,pt-PT,zh-CN) (#1228)
* New translations (Finnish)

* New translations (Chinese Simplified)

* Update catalogs.json

* New translations (Portuguese)

* New translations (Portuguese, Brazilian)

* New translations (Spanish)

* New translations (Galician)

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-08-01 04:15:19 +00:00
Lim Chee Aun 2ef398239c Upgrade deps 2025-08-01 06:59:30 +08:00
Lim Chee Aun c72ed90043 Test only change button colors when has hover 2025-08-01 06:54:04 +08:00
Chee Aun a3d1fcdaa7
i18n updates (ar-SA,ca-ES,cs-CZ,de-DE,eo-UY,es-ES,eu-ES,fi-FI,fr-FR,gl-ES,he-IL,it-IT,ja-JP,ko-KR,lt-LT,nl-NL,pl-PL,uk-UA) (#1225)
* New translations (Galician)

* New translations (Finnish)

* Update catalogs.json

* New translations (Finnish)

* New translations (Polish)

* New translations (Hebrew)

* New translations (Ukrainian)

* New translations (Esperanto)

* New translations (French)

* New translations (Spanish)

* New translations (Arabic)

* New translations (Catalan)

* New translations (Czech)

* New translations (German)

* New translations (Basque)

* New translations (Finnish)

* New translations (Italian)

* New translations (Japanese)

* New translations (Korean)

* New translations (Lithuanian)

* New translations (Dutch)

* New translations (Portuguese)

* New translations (Russian)

* New translations (Turkish)

* New translations (Chinese Simplified)

* New translations (Chinese Traditional)

* New translations (Galician)

* New translations (Portuguese, Brazilian)

* New translations (Persian)

* New translations (Thai)

* New translations (Norwegian Bokmal)

* New translations (Occitan)

* New translations (Kabyle)

* New translations (Toki Pona)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-07-31 11:20:34 +00:00
Lim Chee Aun fcab0269c4 Update copies for quote posts 2025-07-31 19:06:06 +08:00
Lim Chee Aun 6493bb736f Prevent replying to self when start compose 2025-07-31 17:00:01 +08:00
Lim Chee Aun a881d5dfb2 Make emoji's static for all name text 2025-07-31 17:00:01 +08:00
Chee Aun 755a2268ea
i18n updates (es-ES,it-IT,pt-BR,pt-PT,ru-RU) (#1224)
* New translations (Italian)

* Update catalogs.json

* New translations (Spanish)

* New translations (Portuguese)

* New translations (Portuguese, Brazilian)

* New translations (Russian)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-07-29 17:33:00 +00:00
Chee Aun ccdd87343c
i18n updates (ar-SA,ca-ES,cs-CZ,de-DE,eo-UY,es-ES,eu-ES,fi-FI,fr-FR,gl-ES,he-IL,it-IT,ja-JP,ko-KR,lt-LT,nl-NL,pl-PL,pt-PT,ru-RU,tr-TR,uk-UA,zh-CN,zh-TW) (#1222)
* New translations (Spanish)

* New translations (Polish)

* New translations (Hebrew)

* New translations (Ukrainian)

* New translations (French)

* New translations (Spanish)

* New translations (Arabic)

* New translations (Catalan)

* New translations (Czech)

* New translations (German)

* New translations (Basque)

* New translations (Finnish)

* New translations (Italian)

* New translations (Japanese)

* New translations (Korean)

* New translations (Lithuanian)

* New translations (Dutch)

* New translations (Portuguese)

* New translations (Russian)

* New translations (Turkish)

* New translations (Chinese Simplified)

* New translations (Esperanto)

* New translations (Chinese Traditional)

* New translations (Galician)

* New translations (Portuguese, Brazilian)

* New translations (Persian)

* New translations (Thai)

* New translations (Norwegian Bokmal)

* New translations (Occitan)

* New translations (Kabyle)

* New translations (Toki Pona)
2025-07-29 05:51:41 +00:00
Lim Chee Aun a1481f6cb5 Show roles more prominently 2025-07-29 12:49:07 +08:00
Lim Chee Aun 55c378b160 Add 'Recent searches' 2025-07-29 12:49:07 +08:00
Lim Chee Aun dba7c45451 Kinda fix Chrome Android not showing camera when tapping on camera button
Seems like when both image and video mime type is passed into accept, it won't
trigger open camera. It can only do one type at a time.
2025-07-29 12:49:07 +08:00
Chee Aun 4ee0928939
i18n updates (lt-LT) (#1220) 2025-07-27 02:52:15 +00:00
Chee Aun 2ebc36219b
i18n updates (eu-ES) (#1219)
* New translations (Basque)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-07-25 15:53:25 +00:00
Lim Chee Aun ecece9e806 Update changelog 2025-07-19 07:31:40 +08:00
Lim Chee Aun b74005d307 Upgrade deps 2025-07-18 19:11:24 +08:00
Chee Aun 8b735c4e9c
i18n updates (ar-SA,ca-ES,cs-CZ,de-DE,eo-UY,es-ES,eu-ES,fa-IR,fi-FI,fr-FR,gl-ES,he-IL,it-IT,ja-JP,kab,ko-KR,lt-LT,nb-NO,nl-NL,oc-FR,pl-PL,pt-BR,pt-PT,ru-RU,th-TH,tok,tr-TR,uk-UA,zh-CN,zh-TW) (#1211)
* New translations (Polish)

* New translations (Basque)

* Update catalogs.json

* New translations (Hebrew)

* Update catalogs.json

* New translations (Hebrew)

* Update catalogs.json

* New translations (Ukrainian)

* Update catalogs.json

* New translations (Hebrew)

* New translations (Hebrew)

* New translations (Polish)

* New translations (Polish)

* New translations (Polish)

* New translations (Esperanto)

* New translations (Polish)

* New translations (Hebrew)

* New translations (Ukrainian)

* New translations (Esperanto)

* New translations (French)

* New translations (Spanish)

* New translations (Arabic)

* New translations (Catalan)

* New translations (Czech)

* New translations (German)

* New translations (Basque)

* New translations (Finnish)

* New translations (Italian)

* New translations (Japanese)

* New translations (Korean)

* New translations (Lithuanian)

* New translations (Dutch)

* New translations (Portuguese)

* New translations (Russian)

* New translations (Turkish)

* New translations (Chinese Simplified)

* New translations (Chinese Traditional)

* New translations (Galician)

* New translations (Portuguese, Brazilian)

* New translations (Persian)

* New translations (Thai)

* New translations (Norwegian Bokmal)

* New translations (Occitan)

* New translations (Kabyle)

* New translations (Toki Pona)

* New translations (Finnish)

* New translations (Spanish)

* New translations (Esperanto)

* New translations (Galician)

* New translations (Portuguese)

* New translations (Portuguese, Brazilian)

* New translations (Italian)

* New translations (Polish)

* New translations (Hebrew)

* New translations (Ukrainian)

* New translations (Esperanto)

* New translations (French)

* New translations (Spanish)

* New translations (Arabic)

* New translations (Catalan)

* New translations (Czech)

* New translations (German)

* New translations (Basque)

* New translations (Finnish)

* New translations (Italian)

* New translations (Japanese)

* New translations (Korean)

* New translations (Lithuanian)

* New translations (Dutch)

* New translations (Portuguese)

* New translations (Russian)

* New translations (Turkish)

* New translations (Chinese Simplified)

* New translations (Chinese Traditional)

* New translations (Galician)

* New translations (Portuguese, Brazilian)

* New translations (Persian)

* New translations (Thai)

* New translations (Norwegian Bokmal)

* New translations (Occitan)

* New translations (Kabyle)

* New translations (Toki Pona)

* New translations (Portuguese)

* New translations (Portuguese, Brazilian)

* Update catalogs.json

* New translations (Spanish)

* New translations (Galician)

* Update catalogs.json

* New translations (Italian)

* Update catalogs.json

* New translations (Catalan)

* New translations (Catalan)

* Update catalogs.json

* New translations (Spanish)

* New translations (Italian)

* Update catalogs.json

* New translations (Polish)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-07-18 01:36:06 +00:00
Lim Chee Aun 75e53bc8d9 Stop propagation 2025-07-17 19:48:08 +08:00
Lim Chee Aun 08dbc35fe9 View transition only after first open
Due to intermittent unknown crashes in browsers,
limit view transition to only trigger after the 1st media click open

If the page crash, there's no way to know how or why it happens unless
I spend time to dig in really deep into the problem
2025-07-16 23:58:53 +08:00
Lim Chee Aun ca9490dde3 Add comments for translators 2025-07-16 19:34:29 +08:00
Lim Chee Aun 6079cbff64 More fixes for math 2025-07-16 18:16:42 +08:00
Lim Chee Aun a5b0754110 Add annotation too 2025-07-15 21:52:11 +08:00
Lim Chee Aun a2f52c9732 Upgrade deps 2025-07-15 16:46:52 +08:00
Lim Chee Aun 6f42fd254d On-demand math formatting 2025-07-15 16:45:57 +08:00
Lim Chee Aun 11b05c20d0 Disable manualChunks 2025-07-15 16:43:43 +08:00
Lim Chee Aun f2368c94e3 Fix vendor includes even the async import ones 2025-07-13 18:04:05 +08:00
Lim Chee Aun 47125476d1 Try possible crash fix 2025-07-13 18:02:12 +08:00
Lim Chee Aun e416b853c9 Add initial check before throwing error below 2025-07-13 12:10:18 +08:00
Lim Chee Aun d561e67534 Upgrade deps
Reimplement splitVendorChunkPlugin
2025-07-13 12:10:18 +08:00
github-actions[bot] 6223420cdb Update README.md 2025-07-13 00:02:42 +00:00
Lim Chee Aun d5763442c5 Hide .quote-inline if there's native quote 2025-07-11 21:07:17 +08:00
Lim Chee Aun 20ad87338a Handle hidden-filter first then quote states 2025-07-11 11:55:56 +08:00
Lim Chee Aun 821060c238 Unhide hidden-filtered quote posts 2025-07-10 18:33:24 +08:00
Lim Chee Aun da9a5e3dae Use npm scripts instead of framework-specific commands 2025-07-10 11:36:37 +08:00
Lim Chee Aun 1c6deb46ae Add script for biome check 2025-07-10 11:36:08 +08:00
Lim Chee Aun c02d35135b Fix biome acting up 2025-07-09 20:06:50 +08:00
Lim Chee Aun 5714294d3f Add scripts for playwright tests 2025-07-09 18:53:23 +08:00
Lim Chee Aun 740abdea5d Upgrade deps except vite 2025-07-09 18:53:13 +08:00
Lim Chee Aun 1843d1d07e Extra check on the creds
Not really sure why this is happening or needed
2025-07-09 18:40:32 +08:00
Lim Chee Aun 2ce0423991 Use translated rules for report post modal 2025-07-09 18:39:32 +08:00
Lim Chee Aun 9e16633eb8 Biome format 2025-07-09 18:39:32 +08:00
Lim Chee Aun db87bd7e3e Just warn 2025-07-09 18:39:32 +08:00
github-actions[bot] 0c26fa4a0b Update README.md 2025-07-06 00:02:47 +00:00
Lim Chee Aun a564ceadcf Possible fix for weird view-transition-related page crash 2025-07-04 20:41:35 +08:00
Chee Aun 67f87a2dbf
Merge pull request #1212 from Yukaii/bugfix/handle-composition-event
Fix: Prevent list auto-creation during IME composition
2025-07-01 15:13:35 +08:00
Yukai Huang 4ac52e549e
Fix: Prevent list auto-creation during IME composition 2025-07-01 10:35:14 +08:00
Chee Aun 8d43f525a2
i18n updates (gl-ES) (#1210) 2025-06-24 04:10:59 +00:00
Chee Aun 33b8a539b7
i18n updates (pl-PL) (#1209) 2025-06-22 21:32:02 +00:00
Lim Chee Aun a47082260f Need node 20 2025-06-22 12:42:00 +08:00
github-actions[bot] 71971e4356 Update README.md 2025-06-22 00:02:38 +00:00
Lim Chee Aun f6e2462e0b Migrate from prettier to biome 2025-06-20 16:34:04 +08:00
Lim Chee Aun bcfa437be3 Uh, sometimes there's no votersCount? 2025-06-20 16:34:04 +08:00
Lim Chee Aun c3cba4fd04 Only run these on this repo 2025-06-20 16:34:04 +08:00
Lim Chee Aun cded263b06 Make compose path relative 2025-06-20 16:34:04 +08:00
Chee Aun 2744c89e02
i18n updates (ar-SA,ca-ES,cs-CZ,de-DE,es-ES,eu-ES,fi-FI,fr-FR,he-IL,it-IT,ja-JP,ko-KR,lt-LT,nl-NL,pl-PL,pt-PT,ru-RU,tr-TR,uk-UA) (#1204)
* New translations (Polish)

* New translations (Polish)

* New translations (French)

* New translations (Spanish)

* New translations (Arabic)

* New translations (Catalan)

* New translations (Czech)

* New translations (German)

* New translations (Basque)

* New translations (Finnish)

* New translations (Hebrew)

* New translations (Italian)

* New translations (Japanese)

* New translations (Korean)

* New translations (Lithuanian)

* New translations (Dutch)

* New translations (Portuguese)

* New translations (Russian)

* New translations (Turkish)

* New translations (Ukrainian)

* New translations (Chinese Simplified)

* New translations (Chinese Traditional)

* New translations (Galician)

* New translations (Portuguese, Brazilian)

* New translations (Persian)

* New translations (Thai)

* New translations (Esperanto)

* New translations (Norwegian Bokmal)

* New translations (Occitan)

* New translations (Kabyle)

* New translations (Toki Pona)
2025-06-20 01:14:24 +00:00
Lim Chee Aun 4b0faeb7e3 First step in migrating to Workers 2025-06-18 11:05:29 +08:00
Lim Chee Aun 8c4d4917e2 Don't need @mastodon/grouped-notifications 2025-06-18 10:03:26 +08:00
Lim Chee Aun 1276927735 Upgrade deps 2025-06-16 18:42:39 +08:00
Lim Chee Aun 3237598252 My math not mathing 2025-06-14 08:18:55 +08:00
Lim Chee Aun f7dec138f3 Just a bit more math 2025-06-14 08:08:42 +08:00
Lim Chee Aun 5b5a6ab3c7 How did this get in here 2025-06-14 08:08:34 +08:00
Lim Chee Aun 9e8261cbbf More math 2025-06-14 07:51:33 +08:00
Chee Aun b1f9f25dfa
i18n updates (fi-FI,pl-PL,zh-CN) (#1202)
* New translations (Chinese Simplified)

* Update catalogs.json

* New translations (Finnish)

* New translations (Chinese Simplified)

* New translations (Polish)

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-06-13 16:20:28 +00:00
Lim Chee Aun 961cf89860 Fix media click trigger with normal link click 2025-06-13 20:07:53 +08:00
Lim Chee Aun d9f6973112 Much math, such CSS 2025-06-13 19:25:38 +08:00
Lim Chee Aun 55032aa734 Push the limits of safe area 2025-06-13 16:08:13 +08:00
Lim Chee Aun da3fa34b47 Need zero padding 2025-06-13 15:42:28 +08:00
Lim Chee Aun 1f3b16d3cb Locale changes 2025-06-13 15:35:21 +08:00
Lim Chee Aun 6726b5a619 Add experimental tab bar v2 2025-06-13 15:35:12 +08:00
Lim Chee Aun b429eaefd7 Fix pinned posts not appearing 2025-06-13 15:34:31 +08:00
Lim Chee Aun 96c02ce2e4 Autoscroll to active tab on load 2025-06-13 10:12:29 +08:00
Lim Chee Aun 1de58999de Design file changes 2025-06-13 10:12:28 +08:00
Chee Aun 7a42e92947
i18n updates (it-IT,ru-RU) (#1201)
* New translations (Italian)

* New translations (Russian)
2025-06-12 20:14:06 +00:00
Chee Aun 70242f960b
i18n updates (it-IT) (#1200)
* New translations (Italian)

* New translations (Italian)
2025-06-12 09:42:25 +00:00
Lim Chee Aun 9b4b827feb Fix resolving accounts when not logged in 2025-06-11 23:28:31 +08:00
Lim Chee Aun d5e0735233 Disable post with hashtags if there's hashtag column 2025-06-11 23:27:36 +08:00
Chee Aun 5dad5340be
i18n updates (gl-ES,pl-PL,pt-BR) (#1196)
* New translations (Portuguese, Brazilian)

* New translations (Galician)

* Update catalogs.json

* New translations (Polish)

* New translations (Polish)

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-06-11 08:22:55 +00:00
Chee Aun 2ec51e816a
i18n updates (ca-ES,es-ES,it-IT,pt-BR,pt-PT) (#1194)
* New translations (Catalan)

* New translations (Italian)

* Update catalogs.json

* New translations (Spanish)

* New translations (Portuguese)

* New translations (Portuguese, Brazilian)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-06-10 16:19:08 +00:00
Chee Aun 860fadba6c
i18n updates (ar-SA,ca-ES,es-ES,fr-FR,it-IT,pl-PL) (#1193)
* New translations (Polish)

* New translations (Italian)

* New translations (Polish)

* New translations (French)

* New translations (Spanish)

* New translations (Arabic)

* New translations (Catalan)

* New translations (Czech)

* New translations (German)

* New translations (Basque)

* New translations (Finnish)

* New translations (Hebrew)

* New translations (Italian)

* New translations (Japanese)

* New translations (Korean)

* New translations (Lithuanian)

* New translations (Dutch)

* New translations (Portuguese)

* New translations (Russian)

* New translations (Turkish)

* New translations (Ukrainian)

* New translations (Chinese Simplified)

* New translations (Chinese Traditional)

* New translations (Galician)

* New translations (Portuguese, Brazilian)

* New translations (Persian)

* New translations (Thai)

* New translations (Esperanto)

* New translations (Norwegian Bokmal)

* New translations (Occitan)

* New translations (Kabyle)
2025-06-10 14:01:03 +00:00
Lim Chee Aun 59bc26ba6a Preliminary work for native quote posts
This is untested and might be buggy
2025-06-10 21:57:19 +08:00
Lim Chee Aun 2279594cf8 Fix wrong count 2025-06-10 21:57:19 +08:00
Lim Chee Aun 4873cd5eb7 Better regex for account URLs 2025-06-10 21:57:19 +08:00
Chee Aun 8573dcfeec
i18n updates (fi-FI,it-IT,pl-PL,pt-BR,pt-PT) (#1191)
* New translations (Polish)

* New translations (Finnish)

* New translations (Italian)

* New translations (Portuguese)

* New translations (Portuguese, Brazilian)
2025-06-10 10:59:27 +00:00
Chee Aun 5e2d206549
i18n updates (it-IT) (#1190) 2025-06-10 09:41:11 +00:00
Chee Aun c9cdd827d9
i18n updates (ar-SA,ca-ES,cs-CZ,de-DE,eo-UY,es-ES,eu-ES,fa-IR,fi-FI,fr-FR,gl-ES,he-IL,it-IT,ja-JP,kab,ko-KR,lt-LT,nb-NO,nl-NL,oc-FR,pl-PL,pt-BR,pt-PT,ru-RU,th-TH,tr-TR,uk-UA,zh-CN,zh-TW) (#1189)
* New translations (Polish)

* New translations (French)

* New translations (Spanish)

* New translations (Arabic)

* New translations (Catalan)

* New translations (Czech)

* New translations (German)

* New translations (Basque)

* New translations (Finnish)

* New translations (Hebrew)

* New translations (Italian)

* New translations (Japanese)

* New translations (Korean)

* New translations (Lithuanian)

* New translations (Dutch)

* New translations (Portuguese)

* New translations (Russian)

* New translations (Turkish)

* New translations (Ukrainian)

* New translations (Chinese Simplified)

* New translations (Chinese Traditional)

* New translations (Galician)

* New translations (Portuguese, Brazilian)

* New translations (Persian)

* New translations (Thai)

* New translations (Esperanto)

* New translations (Norwegian Bokmal)

* New translations (Occitan)

* New translations (Kabyle)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-06-10 08:27:17 +00:00
Lim Chee Aun e0dfa766e4 Disable HDR 2025-06-10 15:08:57 +08:00
Lim Chee Aun a25c50d280 Add link to changelog 2025-06-10 15:08:57 +08:00
Chee Aun df8c62dcf0
i18n updates (pl-PL) (#1186) 2025-06-10 06:26:01 +00:00
Lim Chee Aun af99ae5100 Add AbortSignal.any polyfill 2025-06-09 02:10:11 +08:00
Lim Chee Aun 940a94cd4a Update changelog 2025-06-09 02:09:56 +08:00
Lim Chee Aun d64e984ddd Test newer modern shazam 2025-06-08 12:20:52 +08:00
Lim Chee Aun 0463a37915 Try this instead 2025-06-07 16:54:55 +08:00
Lim Chee Aun 2be27bcebd Try this 2025-06-07 15:46:01 +08:00
Lim Chee Aun cc0219305c Try differentiate native QPs 2025-06-07 08:58:13 +08:00
Lim Chee Aun 70224b1b4e Preliminary support for native quotes 2025-06-06 18:32:42 +08:00
Lim Chee Aun 704017e3a1 Hide non-column elements 2025-06-06 18:06:07 +08:00
Lim Chee Aun c9390319f0 Try macos-latest 2025-06-06 15:06:49 +08:00
Chee Aun d1fc3da1bd
Potential fix for code scanning alert no. 32: Workflow does not contain permissions
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2025-06-06 14:05:50 +08:00
Lim Chee Aun d8319464b9 Should be webkit 2025-06-06 12:25:15 +08:00
Lim Chee Aun bcc6c828b8 Optimize the browser install part 2025-06-06 12:19:32 +08:00
Lim Chee Aun 070af4273f RTL for endorsement icon 2025-06-06 11:09:34 +08:00
Lim Chee Aun 75cd276b10 Remove dup month icon 2025-06-06 11:09:25 +08:00
Lim Chee Aun bc65bfc3dd Simple e2e tests for logged-out cases 2025-06-06 10:59:34 +08:00
Lim Chee Aun f79afb93f0 Don't replace all zero-width spaces 2025-06-06 09:38:30 +08:00
Lim Chee Aun 322265f8ad Turns out the space is not needed 2025-06-06 09:38:03 +08:00
Lim Chee Aun 6858881e7c View transitions for media 2025-06-05 21:09:01 +08:00
Lim Chee Aun 0d2e40ea19 Use svh instead 2025-06-05 21:09:01 +08:00
Lim Chee Aun 22a2777797 Only apply for minimal tags 2025-06-05 21:09:01 +08:00
Chee Aun 184ab190ba
i18n updates (eu-ES) (#1183) 2025-06-04 08:40:33 +00:00
Chee Aun 14f71259ee
i18n updates (gl-ES,pl-PL) (#1181)
* New translations (Polish)

* New translations (Polish)

* New translations (Galician)
2025-06-04 03:53:49 +00:00
Lim Chee Aun 2bcc50fd28 Fix setting lastAccessedAt on undefined 2025-06-02 08:11:02 +08:00
Lim Chee Aun 3fb94e001e Upgrade deps 2025-06-01 09:27:36 +08:00
github-actions[bot] 1e241c7f55 Update README.md 2025-06-01 00:02:52 +00:00
Lim Chee Aun fd7d646d98 Test allow inline translate on post with media 2025-05-31 18:05:38 +08:00
Chee Aun 7857ce386d
i18n updates (ca-ES) (#1180) 2025-05-30 15:41:45 +00:00
Lim Chee Aun fdb90b6099 One more thing 2025-05-30 22:58:16 +08:00
Chee Aun c10df52960
i18n updates (it-IT) (#1179) 2025-05-30 09:02:47 +00:00
Lim Chee Aun 08affd0298 Add changelog.md 2025-05-30 12:42:34 +08:00
Lim Chee Aun a58c01adbe Auto-refresh notifications in notifications menu 2025-05-30 09:31:45 +08:00
Chee Aun 2de7b9384e
i18n updates (pt-BR,pt-PT) (#1178)
* New translations (Portuguese)

* New translations (Portuguese, Brazilian)
2025-05-29 22:30:26 +00:00
Chee Aun abb1a86cf2
i18n updates (fi-FI) (#1177) 2025-05-29 18:35:09 +00:00
Chee Aun 194cdf1d98
i18n updates (pl-PL) (#1176) 2025-05-29 13:28:04 +00:00
Lim Chee Aun 77339c2d49 Context-aware compose button 2025-05-29 20:01:46 +08:00
Lim Chee Aun 9234211542 Slight adjustments to how UI is hidden on media carousel 2025-05-29 20:01:46 +08:00
Chee Aun e2fc0525b9
i18n updates (es-ES,lt-LT) (#1175)
* New translations (Lithuanian)

* Update catalogs.json

* New translations (Spanish)

* New translations (Lithuanian)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-05-29 11:39:57 +00:00
Chee Aun eb85c355e7
i18n updates (ar-SA,ca-ES,cs-CZ,de-DE,eo-UY,es-ES,eu-ES,fi-FI,fr-FR,he-IL,it-IT,ja-JP,ko-KR,lt-LT,pl-PL) (#1173)
* New translations (Polish)

* New translations (Polish)

* New translations (Esperanto)

* New translations (French)

* New translations (Spanish)

* New translations (Arabic)

* New translations (Catalan)

* New translations (Czech)

* New translations (German)

* New translations (Basque)

* New translations (Finnish)

* New translations (Hebrew)

* New translations (Italian)

* New translations (Japanese)

* New translations (Korean)

* New translations (Lithuanian)

* New translations (Dutch)

* New translations (Polish)

* New translations (Portuguese)

* New translations (Russian)

* New translations (Turkish)

* New translations (Ukrainian)

* New translations (Chinese Simplified)

* New translations (Chinese Traditional)

* New translations (Galician)

* New translations (Portuguese, Brazilian)

* New translations (Persian)

* New translations (Thai)

* New translations (Norwegian Bokmal)

* New translations (Occitan)

* New translations (Kabyle)
2025-05-29 09:18:10 +00:00
Lim Chee Aun 6432e761b4 For numbers, use e.key 2025-05-29 16:20:43 +08:00
Lim Chee Aun d8525cc9b5 Hide compose button on specific pages 2025-05-29 15:07:54 +08:00
Lim Chee Aun d7b9dae09b Fix check for updates failing 2025-05-29 10:17:21 +08:00
Lim Chee Aun 2d409a1209 Fix compose button not working when clicked 2025-05-29 09:41:25 +08:00
Lim Chee Aun c18b3e741e Store last accessed 2025-05-29 09:41:12 +08:00
Lim Chee Aun 492dc93c9a Test allow longer caption if large size 2025-05-28 17:54:07 +08:00
Lim Chee Aun 93fd434617 Fix RTF not following locale 2025-05-28 08:40:18 +08:00
Lim Chee Aun 63a6206c35 Refactor get/set accounts 2025-05-28 08:20:21 +08:00
Lim Chee Aun e1c61ad09e Remove 'Move to top'
On second thought, this is not that important
2025-05-28 08:05:33 +08:00
Lim Chee Aun b718a29921 Allow arrange accounts 2025-05-27 19:07:34 +08:00
Lim Chee Aun 3ba97ad414 Set force_login if already has account from same instance 2025-05-27 19:07:34 +08:00
Lim Chee Aun cbf65628a3 Locale changes 2025-05-27 19:07:34 +08:00
Lim Chee Aun e7ffccf9d1 Allow revoke access token
- Also means storing client credentials
- A bit of cleaning up for vapid key as it's everywhere now
2025-05-27 19:07:34 +08:00
Lim Chee Aun 35af0a0e84 Add 'createdAt' to account
Show when it was last connected
2025-05-27 19:07:34 +08:00
Lim Chee Aun ba5d0521ee Bump up assets maxEntries 2025-05-27 19:07:34 +08:00
Lim Chee Aun 7aae4a5de6 Make langDetector detection separate 2025-05-27 19:07:34 +08:00
Lim Chee Aun cfb18e465b Fix this avatar being animated and not squircle if bot 2025-05-27 19:07:34 +08:00
Lim Chee Aun 450f11332f Upgrade deps 2025-05-27 19:07:34 +08:00
Lim Chee Aun 1adc64a7ab Going all in on preventing mod keys
Hopefully this will fix things
2025-05-27 19:07:34 +08:00
Lim Chee Aun a3e4972f13 Return null later because effects need to unregister 2025-05-27 19:07:34 +08:00
Lim Chee Aun 7e9053f765 Prevent shadows in menus 2025-05-27 19:07:34 +08:00
Chee Aun 3b4fe0a652
i18n updates (gl-ES) (#1172) 2025-05-27 03:30:44 +00:00
github-actions[bot] aabda75710 Update README.md 2025-05-25 00:02:42 +00:00
Chee Aun 695e005990
i18n updates (ru-RU) (#1171) 2025-05-24 19:02:19 +00:00
Chee Aun 56f85e8f6d
i18n updates (pl-PL) (#1170) 2025-05-24 16:52:21 +00:00
Chee Aun 696974df68
i18n updates (es-ES,pt-BR,pt-PT) (#1168)
* New translations (Spanish)

* New translations (Portuguese)

* New translations (Portuguese, Brazilian)
2025-05-22 17:38:40 +00:00
Chee Aun 39f708c204
i18n updates (fi-FI,it-IT,zh-CN) (#1167)
* New translations (Chinese Simplified)

* Update catalogs.json

* New translations (Italian)

* New translations (Finnish)

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-05-22 16:14:24 +00:00
Lim Chee Aun 5ba501f939 Also mask URLs for translations
Reduce char count, faster calls
2025-05-22 23:37:37 +08:00
Lim Chee Aun a42a84cc23 Auto-translate alt text if short 2025-05-22 19:23:36 +08:00
Chee Aun faf7ee4011
i18n updates (ar-SA,ca-ES,cs-CZ,de-DE,eo-UY,es-ES,eu-ES,fa-IR,fi-FI,fr-FR,gl-ES,he-IL,it-IT,ja-JP,kab,ko-KR,lt-LT,nb-NO,nl-NL,oc-FR,pl-PL,pt-BR,pt-PT,ru-RU,th-TH,tr-TR,uk-UA,zh-CN,zh-TW) (#1165)
* New translations (Polish)

* New translations (Esperanto)

* New translations (French)

* New translations (Spanish)

* New translations (Arabic)

* New translations (Catalan)

* New translations (Czech)

* New translations (German)

* New translations (Basque)

* New translations (Finnish)

* New translations (Hebrew)

* New translations (Italian)

* New translations (Japanese)

* New translations (Korean)

* New translations (Lithuanian)

* New translations (Dutch)

* New translations (Polish)

* New translations (Portuguese)

* New translations (Russian)

* New translations (Turkish)

* New translations (Ukrainian)

* New translations (Chinese Simplified)

* New translations (Chinese Traditional)

* New translations (Galician)

* New translations (Portuguese, Brazilian)

* New translations (Persian)

* New translations (Thai)

* New translations (Norwegian Bokmal)

* New translations (Occitan)

* New translations (Kabyle)
2025-05-22 05:59:51 +00:00
Lim Chee Aun fe63f9feb4 Add icon badge to indicate exclusive list 2025-05-22 13:49:20 +08:00
Lim Chee Aun 215d8b230d Use latest Translator and LanguageDetector API
- No more ai namespace
- throttle it to prevent console.groupCollapse from getting nested.
2025-05-21 12:26:35 +08:00
Lim Chee Aun e0cb731093 Updated locales 2025-05-21 08:27:30 +08:00
Lim Chee Aun d01f4823fa Fix NaN 2025-05-21 08:27:19 +08:00
Lim Chee Aun 79fd5109b2 Show static accounts first then the fetched accounts 2025-05-21 08:27:09 +08:00
Lim Chee Aun 4aa077223a Remove extra tilde 2025-05-20 23:00:33 +08:00
Lim Chee Aun 6cb337d7b1 Fix numbers inconsistency with grouped notifications
Some grouped grouped notifications will be ungrouped
2025-05-20 19:18:27 +08:00
Lim Chee Aun 20bb451bb3 Ooops 2025-05-20 19:18:27 +08:00
Lim Chee Aun 14f37ef22b useKey for number shortcuts 2025-05-20 19:18:27 +08:00
Chee Aun fe46beb7f4
Merge pull request #1164 from SadmL/patch-1
Add Masto-FE fork from GtS devs and pl-fe alt clients
2025-05-20 07:57:46 +08:00
Chee Aun 371be93c04
i18n updates (pt-BR) (#1163)
* New translations (Portuguese, Brazilian)

* New translations (Portuguese, Brazilian)
2025-05-19 19:33:41 +00:00
Link [Связной] b97c35e9c3
add pl-fe 2025-05-19 21:21:38 +03:00
Link [Связной] 5933897463
Added Masto-FE fork from GtS devs 2025-05-19 21:16:56 +03:00
Chee Aun 620f7fbe91
i18n updates (ca-ES,es-ES,fi-FI,gl-ES,it-IT,pt-BR,pt-PT,ru-RU,zh-CN) (#1159)
* New translations (Portuguese)

* New translations (Russian)

* New translations (Chinese Simplified)

* New translations (Portuguese, Brazilian)

* New translations (Spanish)

* New translations (Catalan)

* New translations (Finnish)

* New translations (Galician)

* New translations (Italian)
2025-05-19 11:32:05 +00:00
Lim Chee Aun f254f31f1b Upgrade rollbar + more privacy stuff 2025-05-19 15:08:08 +08:00
Lim Chee Aun d3247cb047 Switch to <b>
Losing the anchor for now
2025-05-19 11:02:09 +08:00
Chee Aun 099636e3d5
i18n updates (ar-SA,ca-ES,cs-CZ,de-DE,eo-UY,es-ES,eu-ES,fa-IR,fi-FI,fr-FR,gl-ES,he-IL,it-IT,ja-JP,kab,ko-KR,lt-LT,nb-NO,nl-NL,oc-FR,pl-PL,pt-BR,pt-PT,ru-RU,th-TH,tr-TR,uk-UA,zh-CN,zh-TW) (#1158)
* New translations (Esperanto)

* New translations (French)

* New translations (Spanish)

* New translations (Arabic)

* New translations (Catalan)

* New translations (Czech)

* New translations (German)

* New translations (Basque)

* New translations (Finnish)

* New translations (Hebrew)

* New translations (Italian)

* New translations (Japanese)

* New translations (Korean)

* New translations (Lithuanian)

* New translations (Dutch)

* New translations (Polish)

* New translations (Portuguese)

* New translations (Russian)

* New translations (Turkish)

* New translations (Ukrainian)

* New translations (Chinese Simplified)

* New translations (Chinese Traditional)

* New translations (Galician)

* New translations (Portuguese, Brazilian)

* New translations (Persian)

* New translations (Thai)

* New translations (Norwegian Bokmal)

* New translations (Occitan)

* New translations (Kabyle)
2025-05-18 15:00:51 +00:00
Lim Chee Aun 01bfb8084f Add missing translations 2025-05-18 22:42:31 +08:00
Lim Chee Aun 7bf5fe6e96 Add note for elk.fedified.com 2025-05-18 21:56:59 +08:00
Lim Chee Aun bf198a9770 Update alt clients list 2025-05-18 21:43:14 +08:00
Lim Chee Aun 1186f00c44 Condense the UI implementations part 2025-05-18 21:43:14 +08:00
Lim Chee Aun f624d00121 Add important note about external translation service 2025-05-18 21:43:14 +08:00
Lim Chee Aun e19671ff57 Disable CSS-based hashtag-stuffing collapse 2025-05-18 21:43:14 +08:00
Lim Chee Aun eb708725be Add languages chart 2025-05-18 21:43:14 +08:00
Chee Aun 9476e28c3b
i18n updates (eo-UY) (#1157) 2025-05-18 11:52:22 +00:00
github-actions[bot] 4f57ba8c2a Update README.md 2025-05-18 00:02:51 +00:00
Chee Aun 77bc5ce476
i18n updates (pt-BR,pt-PT) (#1156)
* New translations (Portuguese, Brazilian)

* New translations (Portuguese)
2025-05-17 23:21:24 +00:00
Chee Aun 230fc95854
i18n updates (pt-BR) (#1155)
* New translations (Portuguese, Brazilian)

* New translations (Portuguese, Brazilian)

* New translations (Portuguese, Brazilian)

* New translations (Portuguese, Brazilian)
2025-05-17 21:32:09 +00:00
Lim Chee Aun 45c75ad0e3 External links open new windows 2025-05-17 17:56:53 +08:00
Lim Chee Aun 2aba7350fb Use uid instead of random string 2025-05-17 17:48:19 +08:00
Lim Chee Aun 18d2f0bdf6 Exclude sandbox from prod 2025-05-17 17:18:38 +08:00
Lim Chee Aun 493a68d5b6 Disable sonda open 2025-05-17 17:17:07 +08:00
Lim Chee Aun 2c43c21449 More adjustments 2025-05-17 14:56:06 +08:00
Lim Chee Aun f82bfa9dbb Add display style toggle 2025-05-17 14:53:53 +08:00
Lim Chee Aun de5ec32434 Remove i because postcss generates lots of them 2025-05-17 14:53:40 +08:00
Lim Chee Aun 0bf75c4823 Centered checkered background 2025-05-17 12:25:27 +08:00
Lim Chee Aun 609c66d1e4 Condense the toggles 2025-05-17 12:25:13 +08:00
Lim Chee Aun 67e8f566ae Add reset button to Sandbox 2025-05-17 11:11:07 +08:00
Lim Chee Aun ecd346fa9c Fix 'User preferences for sensitive content' not re-rendering Status 2025-05-17 11:11:07 +08:00
Lim Chee Aun 8df2b2bfa7 Add footnotes 2025-05-17 11:11:07 +08:00
Chee Aun 7dc3b5d7bf
i18n updates (pt-BR) (#1154) 2025-05-16 18:16:45 +00:00
Lim Chee Aun 73c615d5b1 Set Sandbox page title 2025-05-16 22:11:07 +08:00
Lim Chee Aun 1096d3e359 s/index/mediaIndex 2025-05-16 22:08:30 +08:00
Lim Chee Aun a633948bd5 Add link to sandbox 2025-05-16 20:08:19 +08:00
Lim Chee Aun 7819780f6b Prevent clicks on sandbox 2025-05-16 19:13:58 +08:00
Lim Chee Aun 144aa9b506 Add "context" toggles 2025-05-16 11:51:35 +08:00
Chee Aun 9d1a938971
i18n updates (pl-PL) (#1152)
* New translations (Polish)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-05-15 18:09:48 +00:00
Chee Aun d6bc6c8210
i18n updates (eu-ES,pl-PL) (#1150)
* New translations (Basque)

* Update catalogs.json

* New translations (Polish)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-05-15 16:17:55 +00:00
Lim Chee Aun 264d11eea4 Add toggle for post visibility 2025-05-15 17:59:56 +08:00
Lim Chee Aun 57ff44c10b Add toggle for quote posts 2025-05-15 15:24:17 +08:00
Lim Chee Aun 526ae44291 Add toggle for preview card 2025-05-14 22:51:03 +08:00
Lim Chee Aun dbfbe15475 Allow multiple media types in sandbox 2025-05-14 21:09:31 +08:00
Lim Chee Aun b720d36d6d Refactor endorsements
Don't show empty endorsements after following
2025-05-14 17:47:14 +08:00
Chee Aun 7ee6c1146b
i18n updates (eu-ES) (#1149)
* New translations (Basque)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-05-13 12:51:54 +00:00
Chee Aun fbe10d0243
i18n updates (ca-ES,fi-FI) (#1147)
* New translations (Finnish)

* New translations (Catalan)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-05-12 16:55:24 +00:00
Lim Chee Aun f7006d71b3 Initial work on the sandbox
Rough but works
2025-05-12 19:56:44 +08:00
Lim Chee Aun 0f3a556e9e Refactor get/set preferences 2025-05-12 19:39:19 +08:00
Lim Chee Aun b14b14f4bf Return nothing if no content 2025-05-12 19:38:00 +08:00
Chee Aun 73391603d7
i18n updates (es-ES,it-IT,pt-BR,pt-PT,ru-RU) (#1146)
* New translations (Russian)

* Update catalogs.json

* New translations (Italian)

* New translations (Portuguese)

* New translations (Portuguese, Brazilian)

* Update catalogs.json

* New translations (Spanish)

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-05-11 12:46:29 +00:00
Chee Aun e5729d7fe0
i18n updates (ar-SA,ca-ES,cs-CZ,de-DE,eo-UY,es-ES,eu-ES,fa-IR,fi-FI,fr-FR,gl-ES,he-IL,it-IT,ja-JP,kab,ko-KR,lt-LT,nb-NO,nl-NL,oc-FR,pl-PL,pt-BR,pt-PT,ru-RU,th-TH,tr-TR,uk-UA,zh-CN,zh-TW) (#1143)
* New translations (Esperanto)

* New translations (Italian)

* Update catalogs.json

* New translations (Galician)

* Update catalogs.json

* New translations (Polish)

* New translations (French)

* New translations (Spanish)

* New translations (Arabic)

* New translations (Catalan)

* New translations (Czech)

* New translations (German)

* New translations (Basque)

* New translations (Finnish)

* New translations (Hebrew)

* New translations (Italian)

* New translations (Japanese)

* New translations (Korean)

* New translations (Lithuanian)

* New translations (Dutch)

* New translations (Portuguese)

* New translations (Russian)

* New translations (Turkish)

* New translations (Ukrainian)

* New translations (Chinese Simplified)

* New translations (Chinese Traditional)

* New translations (Galician)

* New translations (Portuguese, Brazilian)

* New translations (Persian)

* New translations (Thai)

* New translations (Esperanto)

* New translations (Norwegian Bokmal)

* New translations (Occitan)

* New translations (Kabyle)

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-05-11 02:16:31 +00:00
Lim Chee Aun 687db56942 Further raise global timeout 2025-05-11 09:55:13 +08:00
Lim Chee Aun c3d0c74dc0 Handle loading and empty states for endorsements
Not handling error state for now, assuming it's just empty
2025-05-11 09:55:13 +08:00
Lim Chee Aun ec76328372 Collapse more line breaks for post peeks 2025-05-11 09:55:13 +08:00
Chee Aun 22cdab5918
Merge pull request #1145 from BumbleSusan/patch-1
Update README.md
2025-05-10 17:40:00 +08:00
Bumble 6a58c15e2c
Update README.md
added phanpy.app to list of Community deployments and removed social.qrk.one as no longer operational
2025-05-10 11:26:00 +02:00
Lim Chee Aun 452b03692b Fix wrong logic, need to revisit this for Pixelfed 2025-05-10 16:25:26 +08:00
Lim Chee Aun 231a824a03 Upgrade to masto.js v7 2025-05-10 15:02:57 +08:00
Lim Chee Aun b9cb365ec3 Better styles for endorsements 2025-05-10 15:02:17 +08:00
Chee Aun 0aff3e9421
i18n updates (es-ES,fi-FI,ru-RU,zh-CN) (#1141)
* New translations (Chinese Simplified)

* Update catalogs.json

* New translations (Russian)

* Update catalogs.json

* New translations (Spanish)

* Update catalogs.json

* New translations (Finnish)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-05-09 18:39:48 +00:00
Chee Aun 5327bac7c6
i18n updates (ar-SA,ca-ES,cs-CZ,de-DE,eo-UY,es-ES,eu-ES,fa-IR,fi-FI,fr-FR,gl-ES,he-IL,it-IT,ja-JP,kab,ko-KR,lt-LT,nb-NO,nl-NL,oc-FR,pl-PL,pt-BR,pt-PT,ru-RU,th-TH,tr-TR,uk-UA,zh-CN,zh-TW) (#1140)
* New translations (Polish)

* New translations (French)

* New translations (Spanish)

* New translations (Arabic)

* New translations (Catalan)

* New translations (Czech)

* New translations (German)

* New translations (Basque)

* New translations (Finnish)

* New translations (Hebrew)

* New translations (Italian)

* New translations (Japanese)

* New translations (Korean)

* New translations (Lithuanian)

* New translations (Dutch)

* New translations (Portuguese)

* New translations (Russian)

* New translations (Turkish)

* New translations (Ukrainian)

* New translations (Chinese Simplified)

* New translations (Chinese Traditional)

* New translations (Galician)

* New translations (Portuguese, Brazilian)

* New translations (Persian)

* New translations (Thai)

* New translations (Esperanto)

* New translations (Norwegian Bokmal)

* New translations (Occitan)

* New translations (Kabyle)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-05-09 09:08:14 +00:00
Lim Chee Aun 40ba0afaa4 New featured profiles UI 2025-05-09 16:54:51 +08:00
Chee Aun 6af6a097c9
i18n updates (pl-PL) (#1138)
* New translations (Polish)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-05-09 01:39:45 +00:00
Chee Aun f854700c94
i18n updates (pl-PL) (#1137) 2025-05-09 00:31:04 +00:00
Lim Chee Aun 310d028cf9 Fix ruby tag not cloaked on Safari 2025-05-07 16:48:58 +08:00
Lim Chee Aun 3ca44f9c8c Respect server's media desc limit 2025-05-07 16:48:58 +08:00
Chee Aun 7bbbf9c4f0
i18n updates (pl-PL) (#1136)
* New translations (Polish)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-05-06 22:56:37 +00:00
Lim Chee Aun 2a35cb1fb3 Upgrade some deps 2025-05-04 18:26:40 +08:00
Chee Aun eadf8044ee
Merge pull request #1135 from ultramookie/main
Update README.md with update contact
2025-05-04 15:21:17 +08:00
Lim Chee Aun fa8a3b6c88 More card post domains 2025-05-04 11:43:39 +08:00
steve mookie kong e57a1e3b13
Update README.md 2025-05-03 11:17:16 -07:00
Lim Chee Aun 17c2390a5c Apply more useKey: true 2025-05-03 09:36:00 +08:00
Lim Chee Aun c619a7c6b3 Prevent theme_color from being applied 2025-04-28 17:26:07 +08:00
Lim Chee Aun 86df927fef Locale changes 2025-04-27 13:10:26 +08:00
Lim Chee Aun e64c0286c2 Hide "View profile header" if there's no header 2025-04-27 13:10:26 +08:00
Lim Chee Aun c99bba1918 Use <picture> for avatar 2025-04-27 13:10:26 +08:00
Lim Chee Aun 77c4bf1f70 Fix wrong logic for sensitive media blur 2025-04-27 13:10:26 +08:00
github-actions[bot] 649a726062 Update README.md 2025-04-27 00:02:32 +00:00
Chee Aun c75a2bf5ae
Merge pull request #1127 from cheeaun/l10n_main
New Crowdin updates
2025-04-26 17:43:34 +08:00
Lim Chee Aun 995190b218 More doc changes for Lingva/TransLang 2025-04-25 16:02:40 +08:00
Lim Chee Aun b01a3b27d2 Upgrade deps 2025-04-25 15:52:35 +08:00
Lim Chee Aun ae05968546 Fix target languages bug 2025-04-25 15:46:20 +08:00
Chee Aun 295bb9b008 New translations (Italian) 2025-04-25 01:52:55 +08:00
Chee Aun 6ccd0044c9 New translations (Catalan) 2025-04-25 01:52:53 +08:00
Chee Aun eec5830989 New translations (Catalan) 2025-04-25 00:53:16 +08:00
Chee Aun ef4d43aeb5 New translations (Russian) 2025-04-22 20:11:49 +08:00
Chee Aun 76cf8d416f New translations (Catalan) 2025-04-22 20:11:47 +08:00
Chee Aun d1b3341773
i18n updates (ar-SA,ca-ES,cs-CZ,de-DE,eo-UY,es-ES,eu-ES,fa-IR,fi-FI,fr-FR,gl-ES,he-IL,it-IT,ja-JP,kab,ko-KR,lt-LT,nb-NO,nl-NL,oc-FR,pl-PL,pt-BR,pt-PT,ru-RU,th-TH,tr-TR,uk-UA,zh-CN,zh-TW) (#1126)
* New translations (Portuguese)

* New translations (Portuguese, Brazilian)

* New translations (Italian)

* New translations (Spanish)

* New translations (Esperanto)

* Update catalogs.json

* New translations (Polish)

* New translations (Arabic)

* New translations (French)

* New translations (Spanish)

* New translations (Catalan)

* New translations (Czech)

* New translations (German)

* New translations (Basque)

* New translations (Finnish)

* New translations (Hebrew)

* New translations (Italian)

* New translations (Japanese)

* New translations (Korean)

* New translations (Lithuanian)

* New translations (Dutch)

* New translations (Portuguese)

* New translations (Russian)

* New translations (Turkish)

* New translations (Ukrainian)

* New translations (Chinese Simplified)

* New translations (Chinese Traditional)

* New translations (Galician)

* New translations (Portuguese, Brazilian)

* New translations (Persian)

* New translations (Thai)

* New translations (Esperanto)

* New translations (Norwegian Bokmal)

* New translations (Occitan)

* New translations (Kabyle)

* Update catalogs.json

* New translations (Chinese Simplified)

* New translations (Galician)

* New translations (Portuguese)

* New translations (Portuguese, Brazilian)

* New translations (Finnish)

* New translations (Spanish)

* New translations (Esperanto)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-04-22 10:17:11 +00:00
Lim Chee Aun 0c2d1255e1 Add SECURITY.md 2025-04-21 17:49:08 +08:00
Lim Chee Aun e586b77a3e Time to migrate away from Lingva 2025-04-21 13:14:10 +08:00
Lim Chee Aun de83092259 Move percentage threshold to build time
Once listed, always listed
2025-04-20 09:10:07 +08:00
Lim Chee Aun 75556b37cc Move percentage threshold to build time
Once listed, always listed
2025-04-20 08:16:44 +08:00
Lim Chee Aun 61edf3de45 Update supported languages 2025-04-20 08:11:13 +08:00
Chee Aun bcfd1eeebc
i18n updates (fi-FI,fr-FR,ru-RU,zh-CN) (#1125)
* New translations (French)

* Update catalogs.json

* New translations (Finnish)

* New translations (Chinese Simplified)

* New translations (Russian)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-04-19 06:57:40 +00:00
Chee Aun 5d70a8b6e2
i18n updates (fr-FR) (#1124)
* New translations (French)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-04-19 02:21:14 +00:00
Chee Aun e5f8baaae0
i18n updates (ar-SA,ca-ES,cs-CZ,de-DE,es-ES,eu-ES,fi-FI,fr-FR,he-IL,it-IT,ja-JP,ko-KR,pl-PL) (#1123)
* New translations (Finnish)

* New translations (Polish)

* New translations (Arabic)

* New translations (French)

* New translations (Spanish)

* New translations (Catalan)

* New translations (Czech)

* New translations (German)

* New translations (Basque)

* New translations (Finnish)

* New translations (Hebrew)

* New translations (Italian)

* New translations (Japanese)

* New translations (Korean)

* New translations (Lithuanian)

* New translations (Dutch)

* New translations (Portuguese)

* New translations (Russian)

* New translations (Turkish)

* New translations (Ukrainian)

* New translations (Chinese Simplified)

* New translations (Chinese Traditional)

* New translations (Galician)

* New translations (Portuguese, Brazilian)

* New translations (Persian)

* New translations (Thai)

* New translations (Esperanto)

* New translations (Norwegian Bokmal)

* New translations (Occitan)

* New translations (Kabyle)
2025-04-19 01:11:54 +00:00
Lim Chee Aun e87f7777c6 It's time for keyboard-layout-dependant shortcuts
Let's hope this works!
2025-04-19 09:00:17 +08:00
Lim Chee Aun 4719e2c6a4 Forgot to add this 2025-04-19 09:00:17 +08:00
Lim Chee Aun e45b4a84c6 Add "Copy post text" menu 2025-04-19 09:00:17 +08:00
Lim Chee Aun b9fcd4d054 DRY this part 2025-04-19 09:00:17 +08:00
Chee Aun c4149930d3
i18n updates (eo-UY,es-ES,zh-TW) (#1122)
* New translations (Spanish)

* New translations (Esperanto)

* Update catalogs.json

* New translations (Chinese Traditional)

* Update catalogs.json

* New translations (Chinese Traditional)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-04-18 03:42:54 +00:00
Chee Aun ea2829dafc
Merge pull request #1064 from VirtualWolf/main
Show the emoji shortcode in statuses when hovering, like Mastodon's native's frontend does
2025-04-17 14:55:21 +08:00
VirtualWolf 0c9bf1730c
Merge branch 'cheeaun:main' into main 2025-04-17 15:57:13 +10:00
Lim Chee Aun 71e8d42ae1 Fix unapplied styles 2025-04-16 12:02:37 +08:00
Lim Chee Aun 80bddf11da Forgot prettier 2025-04-16 12:02:25 +08:00
Lim Chee Aun 9bec44b02a Upgrade react-hotkeys-hooks
Not using useKey yet, let's see if this works first
2025-04-16 11:56:17 +08:00
Lim Chee Aun c96bf470d9 Better scroll paddings 2025-04-16 11:55:36 +08:00
Lim Chee Aun 97384b517f Handle case when previewUrl is a video instead of thumbnail image 2025-04-16 08:41:28 +08:00
Chee Aun c1498974cd
i18n updates (ca-ES,gl-ES,it-IT,pt-BR,pt-PT,zh-CN) (#1120)
* New translations (Italian)

* New translations (Chinese Simplified)

* Update catalogs.json

* New translations (Portuguese)

* New translations (Portuguese, Brazilian)

* New translations (Galician)

* New translations (Catalan)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-04-15 05:10:25 +00:00
Chee Aun ec4607ad14
i18n updates (ar-SA,ca-ES,cs-CZ,de-DE,es-ES,eu-ES,fi-FI,fr-FR,he-IL,pl-PL) (#1119)
* New translations (Basque)

* Update catalogs.json

* New translations (Polish)

* New translations (Arabic)

* New translations (French)

* New translations (Spanish)

* New translations (Catalan)

* New translations (Czech)

* New translations (German)

* New translations (Basque)

* New translations (Finnish)

* New translations (Hebrew)

* New translations (Italian)

* New translations (Japanese)

* New translations (Korean)

* New translations (Lithuanian)

* New translations (Dutch)

* New translations (Portuguese)

* New translations (Russian)

* New translations (Turkish)

* New translations (Ukrainian)

* New translations (Chinese Simplified)

* New translations (Chinese Traditional)

* New translations (Galician)

* New translations (Portuguese, Brazilian)

* New translations (Persian)

* New translations (Thai)

* New translations (Esperanto)

* New translations (Norwegian Bokmal)

* New translations (Occitan)

* New translations (Kabyle)

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-04-14 00:05:18 +00:00
Lim Chee Aun 9a706fd5e6 Unfurl wafrn links 2025-04-14 07:49:35 +08:00
Lim Chee Aun db0ff83927 Unfilter 'warn'-filtered posts
'warn' only affects media
2025-04-13 08:47:27 +08:00
Lim Chee Aun 68bb3f21dc Fix conflict between "always show media" vs blur filter
blur filter > show_all
2025-04-13 08:47:27 +08:00
Lim Chee Aun 937165ef57 Locale changes 2025-04-13 08:47:27 +08:00
Lim Chee Aun 2bce5d480f Handle more filter context for notifications 2025-04-13 08:47:27 +08:00
Lim Chee Aun ed41d4c22e Initial work on 'blur' filter for posts 2025-04-13 08:47:27 +08:00
Lim Chee Aun 75a35b7e27 Initial support for API Versions 2025-04-13 08:47:27 +08:00
Chee Aun cf27553a25
i18n updates (kab,pl-PL,zh-CN) (#1116)
* New translations (Kabyle)

* New translations (Chinese Simplified)

* New translations (Polish)
2025-04-10 00:53:04 +00:00
Chee Aun 51260b6e19
i18n updates (it-IT,ru-RU) (#1115)
* New translations (Russian)

* New translations (Italian)

* New translations (Italian)
2025-04-09 11:58:00 +00:00
Chee Aun 3032ac39da
i18n updates (es-ES,pt-BR,pt-PT) (#1114)
* New translations (Spanish)

* New translations (Portuguese)

* New translations (Portuguese, Brazilian)
2025-04-08 17:09:22 +00:00
Chee Aun dfab372899
i18n updates (fi-FI,gl-ES) (#1112)
* New translations (Finnish)

* New translations (Galician)
2025-04-08 08:44:43 +00:00
Chee Aun 19e39129d6
i18n updates (ar-SA,ca-ES,cs-CZ,de-DE,es-ES,eu-ES,fr-FR,pl-PL) (#1109)
* New translations (Polish)

* Update catalogs.json

* New translations (Polish)

* New translations (Arabic)

* New translations (French)

* New translations (Spanish)

* New translations (Catalan)

* New translations (Czech)

* New translations (German)

* New translations (Basque)

* New translations (Finnish)

* New translations (Hebrew)

* New translations (Italian)

* New translations (Japanese)

* New translations (Korean)

* New translations (Lithuanian)

* New translations (Dutch)

* New translations (Portuguese)

* New translations (Russian)

* New translations (Turkish)

* New translations (Ukrainian)

* New translations (Chinese Simplified)

* New translations (Chinese Traditional)

* New translations (Galician)

* New translations (Portuguese, Brazilian)

* New translations (Persian)

* New translations (Thai)

* New translations (Esperanto)

* New translations (Norwegian Bokmal)

* New translations (Occitan)

* New translations (Kabyle)

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-04-08 04:49:44 +00:00
Lim Chee Aun da89b8c659 Upgrade deps
Somehow the indices changed in Lingui?
2025-04-08 12:21:18 +08:00
github-actions[bot] eb9f45ce7d Update README.md 2025-04-06 00:02:23 +00:00
Chee Aun 7d8689b915
i18n updates (ar-SA,pl-PL) (#1103)
* New translations (Polish)

* Update catalogs.json

* New translations (Arabic)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-04-02 18:02:06 +00:00
Chee Aun d608ee0a75
i18n updates (pl-PL) (#1102) 2025-03-26 13:51:16 +00:00
Chee Aun e8de5406fa
i18n updates (kab) (#1101) 2025-03-24 19:14:10 +00:00
Lim Chee Aun a3dd8bab46 Handle all URL.parse cases with invalid URLs 2025-03-21 18:23:13 +08:00
Lim Chee Aun ffcfc29d8c Quick fix invalid url 2025-03-20 15:40:42 +08:00
Chee Aun 82903087a4
i18n updates (lt-LT) (#1098) 2025-03-19 15:55:04 +00:00
Lim Chee Aun d158fa3e4b Make 'Edit profile' more discoverable 2025-03-19 18:36:08 +08:00
Chee Aun 6ac064fa37
i18n updates (pt-BR,pt-PT,zh-CN) (#1095)
* New translations (Chinese Simplified)

* Update catalogs.json

* New translations (Portuguese)

* New translations (Portuguese, Brazilian)

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-03-16 15:44:48 +00:00
github-actions[bot] 937c1d7927 Update README.md 2025-03-16 00:02:30 +00:00
Lim Chee Aun 6ae31fca6c Linkify account string if it's a URL 2025-03-15 18:37:06 +08:00
Chee Aun 7f923358b0
i18n updates (zh-CN) (#1094)
* New translations (Chinese Simplified)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-03-15 03:29:15 +00:00
Lim Chee Aun fbf510cb0d Fix compose context menu not working on other pages 2025-03-13 22:05:54 +08:00
Chee Aun 03a778d17d
i18n updates (gl-ES) (#1092) 2025-03-13 05:32:16 +00:00
Chee Aun 5c2cfc822c
i18n updates (ca-ES,pl-PL) (#1091)
* New translations (Polish)

* Update catalogs.json

* New translations (Catalan)

* New translations (Polish)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-03-12 16:14:17 +00:00
Chee Aun 0759e6431f
Merge pull request #1090 from cheeaun/l10n_main
New Crowdin updates
2025-03-12 20:37:47 +08:00
Chee Aun 06930088eb New translations (Esperanto) 2025-03-12 20:04:40 +08:00
Chee Aun bd45025911 New translations (Polish) 2025-03-12 12:12:01 +08:00
Chee Aun 89ea85c474
i18n updates (eo-UY,pl-PL) (#1089)
* New translations (Esperanto)

* New translations (Polish)
2025-03-12 02:26:26 +00:00
Chee Aun c229e66671
i18n updates (ca-ES,lt-LT) (#1088)
* New translations (Catalan)

* Update catalogs.json

* New translations (Catalan)

* New translations (Catalan)

* Update catalogs.json

* New translations (Lithuanian)

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-03-11 16:32:20 +00:00
Chee Aun c9818df37b
Merge pull request #1081 from Drakulix/nodeinfo-fix
Fix nodeinfo query on split-domain instances
2025-03-11 22:00:38 +08:00
Victoria Brekenfeld 90dff99608 Fix nodeinfo query just using the first entry 2025-03-11 11:10:26 +01:00
Lim Chee Aun ce77872c96 Allow compose button to be clickable when right-clicking 2025-03-10 19:57:18 +08:00
Lim Chee Aun 128c8e6fc0 scope not needed for /oauth/token 2025-03-10 19:57:18 +08:00
Chee Aun 895c6086f3
i18n updates (ca-ES) (#1087) 2025-03-10 05:31:32 +00:00
Chee Aun 5fa2f28508
i18n updates (it-IT) (#1086) 2025-03-09 16:12:32 +00:00
Chee Aun 5683868242
i18n updates (eo-UY,es-ES) (#1084)
* New translations (Spanish)

* New translations (Esperanto)
2025-03-08 19:04:58 +00:00
Chee Aun a081843009
i18n updates (eu-ES,fi-FI,gl-ES,ru-RU) (#1083)
* New translations (Galician)

* New translations (Russian)

* New translations (Finnish)

* New translations (Basque)
2025-03-08 17:53:45 +00:00
Lim Chee Aun d974e16c72 Attempt to fix posts with invalid dates 2025-03-08 18:56:10 +08:00
Lim Chee Aun 5c925283d7 Attempt to fix posts with invalid dates 2025-03-08 18:50:34 +08:00
Chee Aun 649de8ca0f
i18n updates (ar-SA,ca-ES,cs-CZ,de-DE,eo-UY,es-ES,eu-ES,fa-IR,fi-FI,fr-FR,gl-ES,he-IL,it-IT,ja-JP,kab,ko-KR,lt-LT,nb-NO,nl-NL,oc-FR,pl-PL,pt-BR,pt-PT,ru-RU,th-TH,tr-TR,uk-UA,zh-CN,zh-TW) (#1082)
* New translations (Catalan)

* New translations (Finnish)

* New translations (Japanese)

* New translations (Polish)

* New translations (Norwegian Bokmal)

* New translations (Kabyle)

* New translations (French)

* New translations (Spanish)

* New translations (Arabic)

* New translations (Czech)

* New translations (German)

* New translations (Basque)

* New translations (Hebrew)

* New translations (Italian)

* New translations (Korean)

* New translations (Lithuanian)

* New translations (Dutch)

* New translations (Portuguese)

* New translations (Russian)

* New translations (Turkish)

* New translations (Ukrainian)

* New translations (Chinese Simplified)

* New translations (Chinese Traditional)

* New translations (Galician)

* New translations (Portuguese, Brazilian)

* New translations (Persian)

* New translations (Thai)

* New translations (Esperanto)

* New translations (Occitan)
2025-03-08 01:55:26 +00:00
Lim Chee Aun eae8bccae7 Allow locale 2025-03-08 09:32:03 +08:00
Victoria Brekenfeld d6cd60fe6e Fix nodeinfo query on split-domain instances 2025-03-07 15:53:38 +01:00
Lim Chee Aun 3bd0a1d6fe Test camera button 2025-03-07 21:38:57 +08:00
Lim Chee Aun 4e8745e410 Support snac2 links 2025-03-07 12:13:23 +08:00
Lim Chee Aun 7a4ebd0930 Fix modal closing in composer 2025-03-07 12:13:13 +08:00
Lim Chee Aun 457cf8c620 More fixes for the compose button context menu 2025-03-06 21:44:45 +08:00
Chee Aun 14a9230242
i18n updates (ca-ES,eu-ES,fi-FI,gl-ES,ja-JP,kab,nb-NO,pl-PL) (#1079)
* New translations (Basque)

* New translations (Galician)

* Update catalogs.json

* New translations (Galician)

* New translations (Catalan)

* New translations (Finnish)

* New translations (Japanese)

* New translations (Polish)

* New translations (Norwegian Bokmal)

* New translations (Kabyle)

* New translations (French)

* New translations (Spanish)

* New translations (Arabic)

* New translations (Czech)

* New translations (German)

* New translations (Basque)

* New translations (Hebrew)

* New translations (Italian)

* New translations (Korean)

* New translations (Lithuanian)

* New translations (Dutch)

* New translations (Portuguese)

* New translations (Russian)

* New translations (Turkish)

* New translations (Ukrainian)

* New translations (Chinese Simplified)

* New translations (Chinese Traditional)

* New translations (Galician)

* New translations (Portuguese, Brazilian)

* New translations (Persian)

* New translations (Thai)

* New translations (Esperanto)

* New translations (Occitan)

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-03-06 06:22:13 +00:00
Lim Chee Aun 27f2d0eca5 Small fixes for 'Add to Thread' submenu 2025-03-06 13:47:23 +08:00
Chee Aun fc10f787c5
i18n updates (eo-UY,es-ES,fi-FI,it-IT,lt-LT,pt-BR,pt-PT,ru-RU) (#1078)
* New translations (Lithuanian)

* Update catalogs.json

* New translations (Spanish)

* New translations (Esperanto)

* New translations (Finnish)

* New translations (Spanish)

* New translations (Russian)

* New translations (Italian)

* New translations (Portuguese)

* New translations (Portuguese, Brazilian)

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-03-05 18:10:37 +00:00
Chee Aun e35b27b87d
i18n updates (ca-ES,eu-ES,fi-FI,fr-FR,ja-JP,kab,nb-NO,pl-PL) (#1077)
* New translations (Basque)

* Update catalogs.json

* New translations (Catalan)

* New translations (Finnish)

* New translations (Japanese)

* New translations (Polish)

* New translations (Norwegian Bokmal)

* New translations (Kabyle)

* New translations (French)

* New translations (Spanish)

* New translations (Arabic)

* New translations (Czech)

* New translations (German)

* New translations (Basque)

* New translations (Hebrew)

* New translations (Italian)

* New translations (Korean)

* New translations (Lithuanian)

* New translations (Dutch)

* New translations (Portuguese)

* New translations (Russian)

* New translations (Turkish)

* New translations (Ukrainian)

* New translations (Chinese Simplified)

* New translations (Chinese Traditional)

* New translations (Galician)

* New translations (Portuguese, Brazilian)

* New translations (Persian)

* New translations (Thai)

* New translations (Esperanto)

* New translations (Occitan)

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-03-05 07:47:01 +00:00
Lim Chee Aun 119cff3825 Experimental 'Add to thread' 2025-03-05 15:25:09 +08:00
Lim Chee Aun 8ada3cebf8 Experimental right-click/long-press on compose button 2025-03-05 15:25:09 +08:00
Chee Aun fb2c7d5ef7
i18n updates (eu-ES) (#1076)
* New translations (Basque)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-03-04 22:10:08 +00:00
Lim Chee Aun 333142aa67 Combine both useLingui 2025-03-03 11:55:03 +08:00
Lim Chee Aun 0b29b3dabd Fix top-level await 2025-03-03 11:00:15 +08:00
Lim Chee Aun d605f4caca New look for inline translation 2025-03-02 19:53:33 +08:00
Lim Chee Aun b565083495 Higher contrast for inline translations 2025-03-02 08:46:16 +08:00
Lim Chee Aun 945d2ac206 Experiment using browser's built in translation API
Spec: https://webmachinelearning.github.io/translation-api/

API may change in the future
2025-03-02 08:44:38 +08:00
Chee Aun 23e9d034e9
i18n updates (it-IT) (#1072)
* New translations (Italian)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-02-28 16:07:03 +00:00
Lim Chee Aun 4273174e57 Downgrade preact.
Weird bugs happening
2025-02-28 11:57:21 +08:00
Lim Chee Aun 6b368987b4 Fix future posts messing up Catch-up 2025-02-28 11:26:11 +08:00
Lim Chee Aun 44bfbd35d9 Fix wrong logic again 2025-02-27 20:08:36 +08:00
Lim Chee Aun bc7b6de3a9 Upgrade preact 2025-02-27 19:44:24 +08:00
Lim Chee Aun ccba1e6b12 Fix weird Preact bug 2025-02-27 19:34:18 +08:00
Lim Chee Aun d755f81bc0 Upgrade dependencies 2025-02-27 19:17:43 +08:00
Lim Chee Aun 8efb92aae1 Remove console.logs 2025-02-27 19:17:43 +08:00
Lim Chee Aun 618156bcac Fix different language detection not working properly 2025-02-27 19:17:43 +08:00
Chee Aun 251a8665b7
Merge pull request #1037 from alexkrolick/patch-1
Increase global masto api timeout
2025-02-27 19:17:27 +08:00
Chee Aun a061ac17f7
i18n updates (gl-ES,ru-RU) (#1069)
* New translations (Galician)

* Update catalogs.json

* New translations (Galician)

* Update catalogs.json

* New translations (Russian)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-02-26 15:52:20 +00:00
Chee Aun 0a7450ed52
i18n updates (es-ES,pt-BR,pt-PT) (#1068)
* New translations (Spanish)

* New translations (Portuguese)

* New translations (Portuguese, Brazilian)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-02-25 22:02:52 +00:00
Chee Aun 7c3f3ffe75
i18n updates (eo-UY,es-ES,fi-FI,lt-LT) (#1066)
* New translations (Lithuanian)

* New translations (Finnish)

* New translations (Spanish)

* New translations (Lithuanian)

* New translations (Esperanto)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-02-25 17:09:57 +00:00
Chee Aun 0fa08fb549
i18n updates (ar-SA,ca-ES,cs-CZ,de-DE,eo-UY,es-ES,eu-ES,fa-IR,fi-FI,fr-FR,gl-ES,he-IL,it-IT,ja-JP,kab,ko-KR,lt-LT,nb-NO,nl-NL,oc-FR,pl-PL,pt-BR,pt-PT,ru-RU,th-TH,tr-TR,uk-UA,zh-CN,zh-TW) (#1065)
* New translations (Catalan)

* New translations (Finnish)

* New translations (Japanese)

* New translations (Polish)

* New translations (Norwegian Bokmal)

* New translations (Kabyle)

* New translations (French)

* New translations (Spanish)

* New translations (Arabic)

* New translations (Czech)

* New translations (German)

* New translations (Basque)

* New translations (Hebrew)

* New translations (Italian)

* New translations (Korean)

* New translations (Lithuanian)

* New translations (Dutch)

* New translations (Portuguese)

* New translations (Russian)

* New translations (Turkish)

* New translations (Ukrainian)

* New translations (Chinese Simplified)

* New translations (Chinese Traditional)

* New translations (Galician)

* New translations (Portuguese, Brazilian)

* New translations (Persian)

* New translations (Thai)

* New translations (Esperanto)

* New translations (Occitan)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-02-25 13:58:31 +00:00
Lim Chee Aun 7b1d6741dd MVP Scheduled Posts implementation
Somehow the CSS got formatted differently
2025-02-25 21:56:02 +08:00
VirtualWolf b56d3fa126 Show the emoji shortcode in statuses when hovering, like Mastodon's native frontend does. 2025-02-25 18:24:02 +11:00
github-actions[bot] 66ab13e63f Update README.md 2025-02-23 00:02:20 +00:00
Chee Aun da03e6be01
i18n updates (kab,ru-RU) (#1061)
* New translations (Russian)

* New translations (Kabyle)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-02-22 18:50:49 +00:00
Chee Aun edcd21630c
i18n updates (eo-UY,es-ES,eu-ES,fi-FI,gl-ES,it-IT,pt-BR,pt-PT) (#1060)
* Update catalogs.json

* New translations (Finnish)

* New translations (Italian)

* New translations (Portuguese)

* New translations (Portuguese, Brazilian)

* New translations (Spanish)

* New translations (Esperanto)

* New translations (Basque)

* New translations (Galician)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-02-22 05:23:56 +00:00
Chee Aun 97d089141b
i18n updates (ar-SA,ca-ES,es-ES,fi-FI,fr-FR,ja-JP,kab,nb-NO,pl-PL) (#1059)
* New translations (Kabyle)

* Update catalogs.json

* New translations (Catalan)

* New translations (Finnish)

* New translations (Japanese)

* New translations (Polish)

* New translations (Norwegian Bokmal)

* New translations (Kabyle)

* New translations (French)

* New translations (Spanish)

* New translations (Arabic)

* New translations (Czech)

* New translations (German)

* New translations (Basque)

* New translations (Hebrew)

* New translations (Italian)

* New translations (Korean)

* New translations (Lithuanian)

* New translations (Dutch)

* New translations (Portuguese)

* New translations (Russian)

* New translations (Turkish)

* New translations (Ukrainian)

* New translations (Chinese Simplified)

* New translations (Chinese Traditional)

* New translations (Galician)

* New translations (Portuguese, Brazilian)

* New translations (Persian)

* New translations (Thai)

* New translations (Esperanto)

* New translations (Occitan)

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-02-20 04:12:40 +00:00
Lim Chee Aun e9d68a00c8 Allow changing header + profile pictures 2025-02-20 11:51:32 +08:00
Lim Chee Aun 87ea4372b1 Time to make use of media modal 2025-02-20 11:51:32 +08:00
Chee Aun 29ce176e0a
i18n updates (pl-PL) (#1058)
* New translations (Polish)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-02-17 15:06:24 +00:00
Chee Aun 0fae2197e9
i18n updates (pl-PL) (#1057)
* New translations (Polish)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-02-17 13:31:57 +00:00
Chee Aun cb517d45ad
i18n updates (pl-PL) (#1056)
* New translations (Polish)

* New translations (Polish)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-02-17 10:04:11 +00:00
github-actions[bot] 251b995a13 Update README.md 2025-02-16 00:02:25 +00:00
Chee Aun 6ba6602b51
i18n updates (fi-FI,nb-NO) (#1052)
* New translations (Norwegian Bokmal)

* Update catalogs.json

* New translations (Finnish)

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-02-14 14:02:57 +00:00
Chee Aun 8fb6d47c9f
i18n updates (eo-UY,es-ES,eu-ES,fi-FI,gl-ES,it-IT,ja-JP,lt-LT,nb-NO,pt-BR,pt-PT,ru-RU,zh-CN) (#1046)
* New translations (Finnish)

* New translations (Russian)

* New translations (Lithuanian)

* New translations (Portuguese)

* New translations (Chinese Simplified)

* New translations (Portuguese, Brazilian)

* New translations (Galician)

* Update catalogs.json

* New translations (Spanish)

* New translations (Esperanto)

* New translations (Italian)

* New translations (Basque)

* New translations (Japanese)

* New translations (Norwegian Bokmal)

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-02-12 12:13:57 +00:00
Lim Chee Aun ccf9924507 Upgrade dependencies 2025-02-11 12:24:00 +08:00
Lim Chee Aun 398cbbefac Allow more chars in hashtag regex
Still best-effort for now
2025-02-08 12:25:17 +08:00
Chee Aun fe0efe8310
i18n updates (ar-SA,ca-ES,cs-CZ,de-DE,eo-UY,es-ES,eu-ES,fa-IR,fi-FI,fr-FR,gl-ES,he-IL,it-IT,ja-JP,kab,ko-KR,lt-LT,nb-NO,nl-NL,oc-FR,pl-PL,pt-BR,pt-PT,ru-RU,th-TH,tr-TR,uk-UA,zh-CN,zh-TW) (#1045)
* New translations (Basque)

* New translations (German)

* New translations (Catalan)

* New translations (French)

* New translations (Spanish)

* New translations (Arabic)

* New translations (Czech)

* New translations (Finnish)

* New translations (Hebrew)

* New translations (Italian)

* New translations (Japanese)

* New translations (Korean)

* New translations (Lithuanian)

* New translations (Dutch)

* New translations (Polish)

* New translations (Portuguese)

* New translations (Russian)

* New translations (Turkish)

* New translations (Ukrainian)

* New translations (Chinese Simplified)

* New translations (Chinese Traditional)

* New translations (Galician)

* New translations (Portuguese, Brazilian)

* New translations (Persian)

* New translations (Thai)

* New translations (Esperanto)

* New translations (Norwegian Bokmal)

* New translations (Occitan)

* New translations (Kabyle)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-02-04 16:55:20 +00:00
Lim Chee Aun 4ed92e7c84 Experimental untested solution to unknown files 2025-02-05 00:43:53 +08:00
Lim Chee Aun a3fc396738 Unfurl castopod links 2025-02-04 17:22:05 +08:00
Lim Chee Aun 4b0f523667 Fix unfurl bridgy bsky link 2025-02-04 08:43:19 +08:00
Lim Chee Aun 79641b47a5 Don't wrap in span if there's nothing 2025-02-03 21:39:53 +08:00
Lim Chee Aun e8dae8f8da Forgot linkParams here 2025-02-03 21:39:35 +08:00
Lim Chee Aun 59d4e8a8e2 Let's make it start 2025-02-02 20:10:36 +08:00
Lim Chee Aun 7064579dbd Try this new favicon with transparent bg 2025-02-02 19:30:02 +08:00
Lim Chee Aun 2f39e8ff27 Fix wrong account rendered on Account page 2025-02-02 19:30:02 +08:00
github-actions[bot] 8ba431b001 Update README.md 2025-02-02 00:02:30 +00:00
Chee Aun f4890a4f21
i18n updates (ca-ES) (#1041) 2025-01-31 15:16:13 +00:00
Chee Aun 857d73f2e0
i18n updates (de-DE) (#1039)
* New translations (German)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-01-29 09:13:30 +00:00
Alex Krolick a3cbe21104
increase global masto api timeout 2025-01-27 12:38:43 -09:00
Lim Chee Aun ffbd07b5d8 Attempt to fix potential XSS 2025-01-26 18:59:50 +08:00
Lim Chee Aun de0da11cc0 Fix j/k not skipping over display:none items
Hide-filtered posts are display:none-d
2025-01-25 21:19:43 +08:00
Lim Chee Aun b1cad570ad Allow keyboard shortcuts help appear when modals are opened
Except Catch-up because it has its own Help.
2025-01-25 09:45:45 +08:00
Lim Chee Aun d0862cecb6 Somehow prettier prettified this 2025-01-25 00:10:15 +08:00
Lim Chee Aun 7e3314849f Upgrade dependencies 2025-01-25 00:09:51 +08:00
Lim Chee Aun 6e68e95240 Fix menu footer positioned too low 2025-01-25 00:09:37 +08:00
Lim Chee Aun 719f7f8f1b Fix "old post" prompt not appearing 2025-01-24 09:17:45 +08:00
Lim Chee Aun 7aa677e6e2 Allow configure referrer policy 2025-01-23 21:17:58 +08:00
Lim Chee Aun 2b05784a37 Need to read the values too for PN alerts
Reference: #1032
2025-01-23 09:47:11 +08:00
Chee Aun 0586194dcc
i18n updates (eu-ES) (#1031) 2025-01-22 09:58:28 +00:00
github-actions[bot] 5c7e67e91c Update README.md 2025-01-19 00:02:24 +00:00
Lim Chee Aun ef4c7d8fb2 Upgrade dependencies 2025-01-17 16:56:48 +08:00
Chee Aun 2c95db3b82
i18n updates (pt-BR,pt-PT) (#1027)
* New translations (Portuguese)

* New translations (Portuguese)

* New translations (Portuguese, Brazilian)
2025-01-15 16:01:26 +00:00
Chee Aun 9e8ae6c6e4
i18n updates (pt-PT) (#1026) 2025-01-15 12:00:19 +00:00
Lim Chee Aun 61485413b6 Unfurl BotKit/Fedify links 2025-01-15 18:02:30 +08:00
Chee Aun 4324139e9c
i18n updates (ca-ES,pt-PT) (#1023)
* New translations (Catalan)

* New translations (Portuguese)
2025-01-14 20:32:01 +00:00
Lim Chee Aun e6a8caa64e Upgrade dependencies 2025-01-14 12:54:20 +08:00
Lim Chee Aun 49a8b45438 Fix Log in title not working and not localised 2025-01-14 12:52:50 +08:00
github-actions[bot] f432d2c897 Update README.md 2025-01-12 00:02:30 +00:00
Lim Chee Aun 913fbd992a Not sure if this works, try trigger when PRs are merged into main 2025-01-08 14:47:28 +08:00
Lim Chee Aun 6828b642ee Sonda should've bump major version 2025-01-08 14:39:01 +08:00
Lim Chee Aun 007343ec17 Upgrade dependencies 2025-01-08 14:11:06 +08:00
Chee Aun 3df20a5eb2
i18n updates (ca-ES,cs-CZ) (#1017)
* New translations (Catalan)

* New translations (Czech)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-01-06 21:34:11 +00:00
Chee Aun b5ea5ea881
i18n updates (cs-CZ) (#1016)
* New translations (Czech)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-01-05 15:28:43 +00:00
Chee Aun 8de0423de4
i18n updates (cs-CZ) (#1014)
* New translations (Czech)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-01-05 13:30:40 +00:00
Lim Chee Aun 1653bc1e50 Bump up Node 20 due to Lingui v5 2025-01-02 10:49:51 +08:00
github-actions[bot] 7ef2930131 Update README.md 2024-12-29 00:02:18 +00:00
Chee Aun 6b4c73bc05
i18n updates (ca-ES) (#1006)
* New translations (Catalan)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-12-27 18:00:35 +00:00
Chee Aun de2df7a126
Merge pull request #1003 from kizu/fix-text-expander
Fix text expander not working correctly in lists
2024-12-27 17:15:01 +08:00
Chee Aun aa2f5a4d5a
i18n updates (tr-TR) (#1005)
* New translations (Turkish)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-12-26 20:45:38 +00:00
Chee Aun 8d2308704c
i18n updates (eo-UY,tr-TR) (#1001)
* New translations (Esperanto)

* Update catalogs.json

* New translations (Turkish)

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-12-26 12:34:21 +00:00
Roman Komarov b4ecff6e46 Fix text expander not working correctly in lists 2024-12-26 11:58:42 +01:00
Lim Chee Aun 0f6e2b0946 Fix video not hidden under CW for large post 2024-12-22 19:22:44 +08:00
Chee Aun ab5a6b1ec2
i18n updates (gl-ES) (#1000)
* New translations (Galician)

* Update catalogs.json

* New translations (Galician)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-12-22 05:45:07 +00:00
Lim Chee Aun 27e7eef04b Fix .find is not available from QSA 2024-12-22 09:26:05 +08:00
Chee Aun 1bb8c0de3e
i18n updates (eo-UY,pt-BR,pt-PT) (#999)
* New translations (Esperanto)

* Update catalogs.json

* New translations (Portuguese)

* New translations (Portuguese, Brazilian)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-12-22 00:31:09 +00:00
github-actions[bot] 8c8a27d462 Update README.md 2024-12-22 00:02:20 +00:00
Chee Aun d878f99460
i18n updates (eo-UY,es-ES) (#998)
* New translations (Spanish)

* New translations (Esperanto)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-12-21 17:09:04 +00:00
Chee Aun c8c579d42e
i18n updates (es-ES,lt-LT) (#997)
* New translations (Lithuanian)

* New translations (Spanish)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-12-21 16:10:10 +00:00
Chee Aun 73cfdb6f98
i18n updates (ru-RU) (#996)
* New translations (Russian)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-12-21 15:11:10 +00:00
Chee Aun e71cb802e9
i18n updates (eu-ES,fi-FI,it-IT,zh-CN) (#995)
* New translations (Italian)

* New translations (Chinese Simplified)

* New translations (Basque)

* New translations (Finnish)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-12-21 14:15:29 +00:00
Chee Aun e309a6d1c8
i18n updates (ar-SA,ca-ES,cs-CZ,de-DE,eo-UY,es-ES,eu-ES,fa-IR,fi-FI,fr-FR,gl-ES,he-IL,it-IT,ja-JP,kab,ko-KR,lt-LT,nb-NO,nl-NL,oc-FR,pl-PL,pt-BR,pt-PT,ru-RU,th-TH,uk-UA,zh-CN,zh-TW) (#994)
* New translations (Lithuanian)

* New translations (Italian)

* New translations (French)

* New translations (Galician)

* New translations (Chinese Simplified)

* New translations (Spanish)

* New translations (Arabic)

* New translations (Catalan)

* New translations (Czech)

* New translations (German)

* New translations (Basque)

* New translations (Finnish)

* New translations (Hebrew)

* New translations (Japanese)

* New translations (Korean)

* New translations (Dutch)

* New translations (Polish)

* New translations (Portuguese)

* New translations (Russian)

* New translations (Ukrainian)

* New translations (Chinese Traditional)

* New translations (Portuguese, Brazilian)

* New translations (Persian)

* New translations (Thai)

* New translations (Esperanto)

* New translations (Norwegian Bokmal)

* New translations (Occitan)

* New translations (Kabyle)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-12-21 12:47:42 +00:00
Lim Chee Aun 02238d85c1 Fix missing lingui stuff 2024-12-21 20:35:44 +08:00
Chee Aun d160e35f87
i18n updates (fi-FI,pt-BR,pt-PT,ru-RU) (#993)
* New translations (Finnish)

* Update catalogs.json

* New translations (Finnish)

* New translations (Portuguese)

* New translations (Russian)

* New translations (Portuguese, Brazilian)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-12-21 10:38:14 +00:00
Chee Aun 78f1226803
i18n updates (lt-LT,zh-CN) (#992)
* New translations (Lithuanian)

* New translations (Chinese Simplified)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-12-21 08:44:33 +00:00
Lim Chee Aun e8f1710c27 Fix build not working 2024-12-21 16:27:46 +08:00
Chee Aun 5a34daf8ba
i18n updates (ar-SA,ca-ES,cs-CZ,de-DE,eo-UY,es-ES,eu-ES,fa-IR,fi-FI,fr-FR,gl-ES,he-IL,it-IT,ja-JP,kab,ko-KR,lt-LT,nb-NO,nl-NL,oc-FR,pl-PL,pt-BR,pt-PT,ru-RU,th-TH,uk-UA,zh-CN,zh-TW) (#991)
* New translations (Lithuanian)

* New translations (Italian)

* New translations (French)

* New translations (Galician)

* New translations (Chinese Simplified)

* New translations (Spanish)

* New translations (Arabic)

* New translations (Catalan)

* New translations (Czech)

* New translations (German)

* New translations (Basque)

* New translations (Finnish)

* New translations (Hebrew)

* New translations (Japanese)

* New translations (Korean)

* New translations (Dutch)

* New translations (Polish)

* New translations (Portuguese)

* New translations (Russian)

* New translations (Ukrainian)

* New translations (Chinese Traditional)

* New translations (Portuguese, Brazilian)

* New translations (Persian)

* New translations (Thai)

* New translations (Esperanto)

* New translations (Norwegian Bokmal)

* New translations (Occitan)

* New translations (Kabyle)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-12-21 07:31:18 +00:00
Lim Chee Aun acb7084d18 All the updates for Lingui v5
Possibly might break if I accidentally miss something
2024-12-21 15:26:28 +08:00
Lim Chee Aun dcf22b53cd Upgrade dependencies
Major upgrade to Vite v6 and Lingui v5
2024-12-21 15:26:28 +08:00
Chee Aun 03cbc25e97
i18n updates (fr-FR,zh-CN) (#987)
* New translations (French)

* Update catalogs.json

* New translations (Chinese Simplified)

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-12-19 06:35:04 +00:00
github-actions[bot] 0b094f9f66 Update README.md 2024-12-15 00:02:40 +00:00
Chee Aun 2785a2330b
i18n updates (fr-FR) (#986)
* New translations (French)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-12-13 16:53:44 +00:00
Chee Aun 5787b22083
i18n updates (gl-ES) (#985) 2024-12-11 06:54:31 +00:00
Chee Aun e1be513f51
i18n updates (it-IT) (#984) 2024-12-11 00:34:26 +00:00
Chee Aun 119f6d2593
i18n updates (lt-LT) (#983) 2024-12-10 16:13:30 +00:00
Chee Aun 7f947a0de5
Merge pull request #970 from dhrm1k/main
Added phanpy.linuxusers.in to community deployments
2024-12-07 13:08:19 +08:00
Chee Aun a534005722
i18n updates (es-ES) (#972) 2024-12-06 22:30:57 +00:00
Dharmik Parmar 25219b65f1
Added phanpy.linuxusers.in to community deployments
added [phanpy.linuxusers.in](https://phanpy.linuxusers.in) to community deployments.
2024-12-06 19:30:02 +05:30
Chee Aun b0908fdde8
i18n updates (eo-UY) (#969) 2024-12-06 12:01:38 +00:00
Lim Chee Aun 2304b05c08 More formatting for annual report 2024-12-06 14:01:19 +08:00
Lim Chee Aun 4e1572f89c Show annual report notification sticky to top
Might as well go all in
2024-12-06 14:01:19 +08:00
Chee Aun 507999cc5f
i18n updates (ca-ES,es-ES) (#968)
* New translations (Spanish)

* New translations (Catalan)
2024-12-05 21:45:18 +00:00
Chee Aun 265df62817
i18n updates (gl-ES,ru-RU) (#967)
* New translations (Galician)

* Update catalogs.json

* New translations (Russian)

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-12-04 16:49:01 +00:00
Lim Chee Aun e652ce8d9b Include Prettier & format everything properly
My bad for not including prettier
2024-12-04 15:15:56 +08:00
Chee Aun 4c0bfc332c
i18n updates (eo-UY,es-ES,eu-ES,fi-FI,lt-LT,pt-BR,pt-PT) (#964)
* New translations (Lithuanian)

* Update catalogs.json

* New translations (Spanish)

* New translations (Esperanto)

* New translations (Portuguese)

* New translations (Portuguese, Brazilian)

* New translations (Basque)

* New translations (Finnish)

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-12-03 22:01:18 +00:00
Chee Aun fcc0c7166f
i18n updates (ca-ES,es-ES,fa-IR,lt-LT,pt-BR,pt-PT,th-TH,uk-UA) (#961)
* New translations (Persian)

* Update catalogs.json

* New translations (Lithuanian)

* Update catalogs.json

* New translations (Catalan)

* New translations (Spanish)

* New translations (Lithuanian)

* New translations (Catalan)

* New translations (Portuguese)

* New translations (Ukrainian)

* New translations (Portuguese, Brazilian)

* New translations (Thai)

* New translations (Chinese Simplified)

* New translations (Norwegian Bokmal)

* New translations (Italian)

* New translations (French)

* New translations (Galician)

* New translations (Arabic)

* New translations (Czech)

* New translations (German)

* New translations (Basque)

* New translations (Finnish)

* New translations (Hebrew)

* New translations (Japanese)

* New translations (Korean)

* New translations (Dutch)

* New translations (Polish)

* New translations (Russian)

* New translations (Chinese Traditional)

* New translations (Persian)

* New translations (Esperanto)

* New translations (Occitan)

* New translations (Kabyle)

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-12-03 18:15:49 +00:00
Lim Chee Aun 4270304a28 Super MVP-ish annual report page 2024-12-04 01:55:25 +08:00
github-actions[bot] ab6a977aeb Update README.md 2024-12-01 00:02:47 +00:00
Chee Aun 9b0378b736
i18n updates (eo-UY,es-ES,fi-FI,gl-ES,lt-LT,pt-BR,pt-PT,ru-RU,zh-CN) (#958)
* New translations (Lithuanian)

* New translations (Portuguese)

* New translations (Portuguese, Brazilian)

* New translations (Chinese Simplified)

* New translations (Galician)

* Update catalogs.json

* New translations (Finnish)

* New translations (Spanish)

* New translations (Esperanto)

* New translations (Russian)

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-11-28 20:15:13 +00:00
Lim Chee Aun 264ca66dd1 Make sure the language text not truncated too much 2024-11-28 00:35:05 +08:00
Chee Aun 09080a37e0
i18n updates (ar-SA,ca-ES,cs-CZ,de-DE,eo-UY,es-ES,eu-ES,fa-IR,fi-FI,fr-FR,gl-ES,he-IL,it-IT,ja-JP,kab,ko-KR,lt-LT,nb-NO,nl-NL,oc-FR,pl-PL,pt-BR,pt-PT,ru-RU,th-TH,uk-UA,zh-CN,zh-TW) (#957)
* New translations (Spanish)

* New translations (Lithuanian)

* New translations (Catalan)

* New translations (Portuguese)

* New translations (Ukrainian)

* New translations (Portuguese, Brazilian)

* New translations (Thai)

* New translations (Chinese Simplified)

* New translations (Norwegian Bokmal)

* New translations (Italian)

* New translations (French)

* New translations (Galician)

* New translations (Arabic)

* New translations (Czech)

* New translations (German)

* New translations (Basque)

* New translations (Finnish)

* New translations (Hebrew)

* New translations (Japanese)

* New translations (Korean)

* New translations (Dutch)

* New translations (Polish)

* New translations (Russian)

* New translations (Chinese Traditional)

* New translations (Persian)

* New translations (Esperanto)

* New translations (Occitan)

* New translations (Kabyle)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-11-27 14:37:56 +00:00
Lim Chee Aun 8e12d899ce Maybe need type="button" lol 2024-11-27 22:30:38 +08:00
Lim Chee Aun bbf30c64bb Locale changes 2024-11-27 22:22:18 +08:00
Lim Chee Aun 28bdd9a0fa Adjustments to composer footer buttons
- Make it one-liner
- Make the add-action buttons scrollable
- Introduce 'Add' button that shows a menu of the actions to allow more actions in the future
2024-11-27 22:22:09 +08:00
Lim Chee Aun b6d1522480 Fix clicking outside button also trigger the menu 2024-11-27 22:16:28 +08:00
Lim Chee Aun 84163621c2 Fix disconnected lines 2024-11-27 20:59:12 +08:00
Chee Aun b51a3b557e
i18n updates (gl-ES) (#955)
* New translations (Galician)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-11-27 05:00:45 +00:00
Chee Aun 1c87e6445c
i18n updates (fr-FR) (#952) 2024-11-24 16:15:14 +00:00
Chee Aun ba4c41ca8b
i18n updates (es-ES) (#951) 2024-11-24 11:40:34 +00:00
github-actions[bot] d148449e5f Update README.md 2024-11-24 00:02:36 +00:00
Chee Aun 817795c4bc
i18n updates (it-IT) (#950)
* New translations (Italian)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-11-22 19:10:02 +00:00
Lim Chee Aun dcc73d0d28 Further extend theme-color coloring 2024-11-21 21:46:50 +08:00
Chee Aun 5360951c03
i18n updates (nb-NO) (#948)
* New translations (Norwegian Bokmal)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-11-21 12:35:19 +00:00
Lim Chee Aun 6c3c158f79 Need QSA to be forgiving 2024-11-20 23:51:10 +08:00
Lim Chee Aun deaddcec00 Fix dangling lonely dividers in menu with CSS
The if conditions are too maddening at this point
2024-11-20 23:51:10 +08:00
Lim Chee Aun 8b806d55f3 Upgrade dependencies 2024-11-20 23:51:10 +08:00
Lim Chee Aun 2930d9c40b Try focus on search input again 2024-11-20 23:51:10 +08:00
Chee Aun 6ebf5bd1c9
i18n updates (th-TH) (#947)
* New translations (Thai)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-11-20 15:36:39 +00:00
Chee Aun 838fc11eb8
i18n updates (pt-BR,pt-PT) (#945)
* New translations (Portuguese)

* New translations (Portuguese, Brazilian)
2024-11-20 11:31:53 +00:00
Chee Aun 10cc9ce274
i18n updates (zh-CN) (#943) 2024-11-20 09:34:29 +00:00
Chee Aun b47345ff33
i18n updates (es-ES) (#942) 2024-11-19 20:20:22 +00:00
Chee Aun 03ca4f44dd
i18n updates (lt-LT) (#940) 2024-11-19 14:44:35 +00:00
Chee Aun 2561d82fa3
i18n updates (ca-ES) (#939) 2024-11-19 12:15:45 +00:00
Chee Aun 2e83df6f25
Merge pull request #938 from sorin-davidoi/lang-respect-fallbacks
fix(lang): respect fallback languages
2024-11-19 09:21:20 +08:00
Sorin Davidoi 46b5faab31
fix(lang): respect fallback languages
If `navigator.languages` returns `['da', 'en-US', 'en']`, and the Danish
language is not available, the user interface should be in English.

Currently it is shown in Norwegian, because only `'da'` is taken into
account when deciding on the preferred language (and `match` selects
`nb-NO` using the default `'best fit'` algorithm).

While the Norwegian and Danish languages are similar, I would argue that
this is a bug, as `navigator.languages` cleary states that the fallback
language should be English.

Another potential solution would be to pass `{ algorithm: 'lookup' }` to
the `match` function. However, this might break some cases when a
`'best fit'` approach would be appropriate (e.g. Swiss German falling
back to German).

See https://helvede.net/@jwcph/113497955274343365.
2024-11-19 00:59:40 +02:00
Lim Chee Aun 06b56a8c67 Upgrade dependencies + autoPause for lite-youtube 2024-11-18 17:51:40 +08:00
Lim Chee Aun 6502a1f4b9 Stick both edges of columns 2024-11-18 17:46:25 +08:00
Lim Chee Aun 121d11e20f Fix infinite loading due to search API not supporting offset 2024-11-18 17:46:25 +08:00
Lim Chee Aun fac1209153 Reveal punycodes 2024-11-18 17:46:25 +08:00
Lim Chee Aun a73d613dce Refactor List menu from nav menu 2024-11-18 17:46:25 +08:00
Chee Aun 2d9cffc091
i18n updates (es-ES) (#936) 2024-11-17 13:41:42 +00:00
github-actions[bot] 2d5b3a676d Update README.md 2024-11-17 00:02:36 +00:00
Chee Aun b790d845fa
i18n updates (pt-BR,pt-PT,th-TH) (#935)
* New translations (Thai)

* New translations (Portuguese)

* New translations (Portuguese, Brazilian)
2024-11-16 13:58:51 +00:00
Chee Aun f3cf09d07c
i18n updates (th-TH) (#934)
* New translations (Thai)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-11-16 07:28:26 +00:00
Lim Chee Aun 109ad9e8ec Fix media borked bug 2024-11-15 09:43:57 +08:00
Lim Chee Aun 75ceff12c0 Add "30 days" for profile mute 2024-11-15 09:43:56 +08:00
Chee Aun dc2d441119
i18n updates (ca-ES) (#931) 2024-11-14 23:11:43 +00:00
Lim Chee Aun 6a4e14267a Attempt to fix column focus bug 2024-11-14 19:22:35 +08:00
Chee Aun c9295ba48e
i18n updates (lt-LT,uk-UA) (#928)
* New translations (Lithuanian)

* New translations (Ukrainian)
2024-11-13 15:17:11 +00:00
Chee Aun 4166625e2e
i18n updates (th-TH,uk-UA) (#926)
* New translations (Thai)

* Update catalogs.json

* New translations (Ukrainian)

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-11-13 12:56:14 +00:00
Lim Chee Aun c3991dad08 Upgrade valtio
Separately because it used to cause issues
2024-11-13 01:15:45 +08:00
Lim Chee Aun b7108303f9 Upgrade dependencies 2024-11-13 01:14:53 +08:00
Lim Chee Aun c1a10dfae3 Add Patreon link
I know this looks weird, but let's leave it like this for now.
2024-11-12 19:22:33 +08:00
Lim Chee Aun 7b683c3259 Updated package lock 2024-11-12 18:59:09 +08:00
Lim Chee Aun cc591237f5 Embrace chroma.js and okLCH 2024-11-12 18:58:56 +08:00
Lim Chee Aun c6e562c62e Use sonda for JS/CSS bundle analyzer 2024-11-12 17:44:20 +08:00
Chee Aun b70e31a517
Merge pull request #817 from graue/feature-detect
Support exclusive lists with GoToSocial 0.17
2024-11-12 12:35:38 +08:00
Scott Feeney 7b926f73fb Merge branch 'main' into feature-detect 2024-11-11 15:36:06 -08:00
Chee Aun 62dc2ca27e
i18n updates (th-TH) (#925) 2024-11-10 08:09:47 +00:00
Lim Chee Aun efc3fe5de4 Try debug cache sizing on Safari 2024-11-08 12:58:28 +08:00
Lim Chee Aun a1a4b01ace Allowlist groupable notifications 2024-11-07 16:15:07 +08:00
Chee Aun 35fa94b2e0
i18n updates (ko-KR) (#923) 2024-11-07 06:51:03 +00:00
Lim Chee Aun 37afe9d4ee Line number changes 2024-11-06 20:30:23 +08:00
Lim Chee Aun 3219cae516 Better coloring for media backgrounds
Still experimental
2024-11-06 20:30:23 +08:00
Lim Chee Aun 4e56faa7c8 Don't fix theme-color if media modal is showing 2024-11-06 20:30:23 +08:00
Lim Chee Aun 451fc1bf52 Debugging cache size 2024-11-06 20:30:23 +08:00
Chee Aun 5838ab6720
i18n updates (ca-ES,pt-BR,pt-PT) (#921)
* New translations (Catalan)

* New translations (Portuguese)

* New translations (Portuguese, Brazilian)
2024-11-05 20:32:24 +00:00
Lim Chee Aun 5394584647 Experimental theme-color change when viewing media 2024-11-04 18:44:33 +08:00
Lim Chee Aun 7135ec905f Fix stretched button when text got very long 2024-11-04 17:34:16 +08:00
Chee Aun bc3f8e140c
i18n updates (eo-UY,es-ES,eu-ES,fi-FI,lt-LT,pt-BR,pt-PT,ru-RU,zh-CN) (#920)
* New translations (Russian)

* New translations (Chinese Simplified)

* Update catalogs.json

* New translations (Chinese Simplified)

* New translations (Portuguese)

* New translations (Portuguese, Brazilian)

* New translations (Finnish)

* New translations (Spanish)

* New translations (Esperanto)

* New translations (Basque)

* New translations (Lithuanian)

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-11-04 09:07:49 +00:00
Lim Chee Aun b8281fb593 Hide byline too 2024-11-03 17:18:39 +08:00
Chee Aun 9bd5f7e637
i18n updates (ar-SA,ca-ES,cs-CZ,de-DE,eo-UY,es-ES,eu-ES,fa-IR,fi-FI,fr-FR,gl-ES,he-IL,it-IT,ja-JP,kab,ko-KR,lt-LT,nb-NO,nl-NL,oc-FR,pl-PL,pt-BR,pt-PT,ru-RU,th-TH,uk-UA,zh-CN,zh-TW) (#919)
* New translations (Spanish)

* New translations (Basque)

* New translations (Esperanto)

* New translations (Lithuanian)

* New translations (Polish)

* New translations (Italian)

* New translations (Persian)

* New translations (Catalan)

* New translations (Norwegian Bokmal)

* New translations (French)

* New translations (Arabic)

* New translations (Czech)

* New translations (German)

* New translations (Finnish)

* New translations (Hebrew)

* New translations (Japanese)

* New translations (Korean)

* New translations (Dutch)

* New translations (Portuguese)

* New translations (Russian)

* New translations (Ukrainian)

* New translations (Chinese Simplified)

* New translations (Chinese Traditional)

* New translations (Galician)

* New translations (Portuguese, Brazilian)

* New translations (Thai)

* New translations (Occitan)

* New translations (Kabyle)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-11-03 07:11:58 +00:00
Lim Chee Aun 79a890cdc0 Separate context for "Group" 2024-11-03 14:52:40 +08:00
github-actions[bot] 762a4a825e Update README.md 2024-11-03 00:02:31 +00:00
Chee Aun 03f99f6267
i18n updates (uk-UA) (#918)
* New translations (Ukrainian)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-11-02 21:05:08 +00:00
Chee Aun 1ac7c92444
i18n updates (uk-UA) (#917)
* New translations (Ukrainian)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-11-02 16:12:37 +00:00
Chee Aun cb02f7d06a
i18n updates (uk-UA) (#916)
* New translations (Ukrainian)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-11-02 14:44:17 +00:00
Chee Aun 35ada8ac9c
i18n updates (eu-ES,uk-UA) (#915)
* New translations (Basque)

* New translations (Ukrainian)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-11-02 13:22:48 +00:00
Chee Aun 38685b175c
i18n updates (uk-UA) (#914)
* New translations (Ukrainian)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-11-02 12:17:24 +00:00
Chee Aun 9352504948
i18n updates (uk-UA) (#913)
* New translations (Ukrainian)

* Update catalogs.json

* New translations (Ukrainian)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-11-02 11:16:49 +00:00
Chee Aun eebbae157d
i18n updates (uk-UA) (#912)
* New translations (Ukrainian)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-11-02 00:22:47 +00:00
Chee Aun b967b94019
i18n updates (eo-UY,es-ES,pt-PT) (#911)
* New translations (Spanish)

* New translations (Esperanto)

* New translations (Portuguese)
2024-11-01 16:15:53 +00:00
Chee Aun 32e8df4dbc
i18n updates (fi-FI) (#910) 2024-11-01 15:13:47 +00:00
Chee Aun 59454f4d70
i18n updates (zh-CN) (#909) 2024-11-01 13:44:33 +00:00
Chee Aun a07c5d95e9
i18n updates (es-ES,fr-FR,pt-BR,pt-PT,uk-UA) (#907)
* New translations (Spanish)

* New translations (French)

* New translations (Portuguese)

* New translations (Ukrainian)

* New translations (Portuguese, Brazilian)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-11-01 11:27:40 +00:00
Lim Chee Aun cec8cbff0a Fix sort
Embarassing mistake, i know
2024-11-01 18:15:06 +08:00
Chee Aun 6e898fd704
i18n updates (ar-SA,ca-ES,cs-CZ,de-DE,eo-UY,es-ES,eu-ES,fa-IR,fi-FI,fr-FR,gl-ES,he-IL,it-IT,ja-JP,kab,ko-KR,lt-LT,nb-NO,nl-NL,oc-FR,pl-PL,pt-BR,pt-PT,ru-RU,th-TH,uk-UA,zh-CN,zh-TW) (#906)
* New translations (Spanish)

* New translations (French)

* New translations (Basque)

* New translations (Esperanto)

* New translations (Lithuanian)

* New translations (Polish)

* New translations (Italian)

* New translations (Persian)

* New translations (Catalan)

* New translations (Norwegian Bokmal)

* New translations (Arabic)

* New translations (Czech)

* New translations (German)

* New translations (Finnish)

* New translations (Hebrew)

* New translations (Japanese)

* New translations (Korean)

* New translations (Dutch)

* New translations (Portuguese)

* New translations (Russian)

* New translations (Ukrainian)

* New translations (Chinese Simplified)

* New translations (Chinese Traditional)

* New translations (Galician)

* New translations (Portuguese, Brazilian)

* New translations (Thai)

* New translations (Occitan)

* New translations (Kabyle)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-11-01 10:03:30 +00:00
Lim Chee Aun 39111831e3 Reduce padding for notifications column 2024-11-01 17:42:43 +08:00
Lim Chee Aun 50136fb8c8 Add [ and ] to focus columns 2024-11-01 17:42:25 +08:00
Lim Chee Aun d7732cbf47 Disable sticky date headers in Notifications when in multi-column mode 2024-11-01 17:31:53 +08:00
Lim Chee Aun 7d922550d0 Make search page keyboard-navigable
Still experimental
2024-11-01 17:31:06 +08:00
Lim Chee Aun f0773dc6f3 Fix keyboard shortcuts leaked to multi-column mode 2024-11-01 17:30:33 +08:00
Chee Aun f236ec5ab9
i18n updates (uk-UA) (#905)
* New translations (Ukrainian)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-10-31 20:01:44 +00:00
Chee Aun 08226d8638
i18n updates (uk-UA) (#904)
* New translations (Ukrainian)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-10-31 18:53:08 +00:00
Lim Chee Aun 41c1ceeeff Fix wrong sort
Why is this so complicated
2024-10-31 22:31:15 +08:00
Lim Chee Aun 163c98df01 Add one more bug fix 2024-10-31 19:39:49 +08:00
Lim Chee Aun 2f53fd332f Improve comments rendering
- Don't render summary/details if not needed
- Delay-render collapsed summary/details
2024-10-31 18:48:13 +08:00
Lim Chee Aun cbfd4ef333 Rewrite line indent style logic
I know, it's still messy
2024-10-31 18:47:07 +08:00
Lim Chee Aun c1f1fb965c Smoother curves 2024-10-29 13:30:33 +08:00
Lim Chee Aun 4805262c4b Quick fix comment lines
Might still be buggy
2024-10-29 08:32:21 +08:00
Chee Aun 4e63decfc7
i18n updates (ca-ES,pl-PL) (#903)
* New translations (Polish)

* Update catalogs.json

* New translations (Catalan)

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-10-28 21:50:34 +00:00
Lim Chee Aun 8c2065c1e8 Whole bunch of line changes 2024-10-28 18:50:30 +08:00
Lim Chee Aun c3e5ccd08b Small adjustments to vertical alignment 2024-10-28 18:50:30 +08:00
Lim Chee Aun f10d5457ae Show relative time on large post too 2024-10-28 18:50:30 +08:00
Lim Chee Aun 058cf05805 Experimental comment threads making use of more space 2024-10-28 18:50:30 +08:00
Lim Chee Aun b8f8271645 Pre-calc levels instead of increment on-demand 2024-10-28 18:50:30 +08:00
Lim Chee Aun dd3b064aec Sort the ancestors and descendants 2024-10-28 18:50:30 +08:00
Lim Chee Aun 8f3077b06b Need .status-menu-open too 2024-10-28 18:50:30 +08:00
Lim Chee Aun d246e45be6 Fix carousel bug: focus first then scroll 2024-10-28 18:50:30 +08:00
Lim Chee Aun 5be052dd4d Need focus-within too 2024-10-28 18:50:30 +08:00
Lim Chee Aun e19dcf7558 Skip check aspect ratio if > 1 media 2024-10-28 18:50:30 +08:00
Lim Chee Aun 25b98d477f Fix nested threads bug 2024-10-28 18:50:30 +08:00
Lim Chee Aun 49ce9ba48d Upgrade dependencies 2024-10-28 18:50:30 +08:00
Lim Chee Aun 363862f000 Upgrade dependencies 2024-10-28 18:50:30 +08:00
github-actions[bot] c05e9d4f0b Update README.md 2024-10-27 00:02:26 +00:00
Chee Aun fc9f46db52
i18n updates (lt-LT,pl-PL) (#902)
* New translations (Lithuanian)

* New translations (Polish)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-10-26 15:15:27 +00:00
Chee Aun c633ee49d5
Merge pull request #901 from benharri-forks/add-my-community-instance
Add my instance and sort list
2024-10-26 08:33:11 +08:00
Ben Harris 6e6a275075
Add my instance and sort list 2024-10-25 15:00:10 -04:00
Chee Aun 6500588b58
i18n updates (ca-ES,eu-ES,lt-LT) (#900)
* New translations (Catalan)

* New translations (Basque)

* New translations (Lithuanian)
2024-10-24 08:34:39 +00:00
Chee Aun 36ce4c568a
i18n updates (zh-TW) (#897)
* New translations (Chinese Traditional)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-10-22 16:00:54 +00:00
Chee Aun 4e8b405d0f
i18n updates (eo-UY,es-ES,fi-FI,gl-ES,pt-BR,pt-PT,zh-CN,zh-TW) (#896)
* New translations (Finnish)

* New translations (Galician)

* Update catalogs.json

* New translations (Chinese Simplified)

* New translations (Portuguese)

* New translations (Portuguese, Brazilian)

* New translations (Spanish)

* New translations (Esperanto)

* New translations (Esperanto)

* New translations (Chinese Traditional)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-10-22 14:42:02 +00:00
Chee Aun 8eabdd524d
i18n updates (ar-SA,ca-ES,cs-CZ,de-DE,eo-UY,es-ES,eu-ES,fa-IR,fi-FI,fr-FR,gl-ES,he-IL,it-IT,ja-JP,kab,ko-KR,lt-LT,nb-NO,nl-NL,oc-FR,pl-PL,pt-BR,pt-PT,ru-RU,th-TH,uk-UA,zh-CN,zh-TW) (#895)
* New translations (Spanish)

* New translations (Basque)

* New translations (Esperanto)

* New translations (Lithuanian)

* New translations (Polish)

* New translations (Italian)

* New translations (Persian)

* New translations (Catalan)

* New translations (Norwegian Bokmal)

* New translations (French)

* New translations (Arabic)

* New translations (Czech)

* New translations (German)

* New translations (Finnish)

* New translations (Hebrew)

* New translations (Japanese)

* New translations (Korean)

* New translations (Dutch)

* New translations (Portuguese)

* New translations (Russian)

* New translations (Ukrainian)

* New translations (Chinese Simplified)

* New translations (Chinese Traditional)

* New translations (Galician)

* New translations (Portuguese, Brazilian)

* New translations (Thai)

* New translations (Occitan)

* New translations (Kabyle)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-10-22 02:21:48 +00:00
Lim Chee Aun b13ac8a608 Fix clash of t's
And… due to the clash, the strings were not added for i18n
2024-10-22 10:19:16 +08:00
Lim Chee Aun 71e721eda0 Use main-width 2024-10-21 18:42:34 +08:00
Lim Chee Aun d097697aef Fix stupid mistake: title not showing acct 2024-10-21 17:30:36 +08:00
github-actions[bot] bb9ed041a5 Update README.md 2024-10-20 00:02:25 +00:00
Chee Aun 16479767d9
i18n updates (eu-ES,zh-CN) (#890)
* New translations (Basque)

* New translations (Chinese Simplified)
2024-10-18 15:23:02 +00:00
Lim Chee Aun e1784b9c00 Try inert on spoiler content 2024-10-18 18:35:09 +08:00
Lim Chee Aun 8d98ccff83 Fix cloak mode issues on Safari 2024-10-18 18:35:09 +08:00
Lim Chee Aun 014e694a4a Downgrade valtio, re-render bugs 2024-10-18 18:35:09 +08:00
Lim Chee Aun 89559056bd Upgrade valtio 2024-10-18 18:35:09 +08:00
Lim Chee Aun 350aafaadd A little fix + refactoring with translation stuff 2024-10-18 18:35:09 +08:00
Lim Chee Aun a3474094bd Align the icon to top for author byline 2024-10-18 18:35:09 +08:00
Lim Chee Aun b083468df4 Fix menu header wrong margin 2024-10-18 18:35:09 +08:00
Chee Aun 0c8f670e0a
Merge pull request #891 from ruudschilders/patch-1
Update README.md: Added mastodon.world local install
2024-10-18 18:33:08 +08:00
ruudschilders 10ec6e4eeb
Update README.md: Added mastodon.world local install 2024-10-18 09:14:47 +02:00
Chee Aun 7c42eda98a
i18n updates (nb-NO) (#889)
* New translations (Norwegian Bokmal)

* Update catalogs.json

* New translations (Norwegian Bokmal)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-10-17 12:57:22 +00:00
Chee Aun 81c8b11c12
i18n updates (eu-ES,fi-FI,nb-NO,ru-RU) (#887)
* New translations (Russian)

* New translations (Finnish)

* New translations (Basque)

* New translations (Basque)

* New translations (Norwegian Bokmal)

* Update catalogs.json

* New translations (Norwegian Bokmal)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-10-17 08:44:56 +00:00
Chee Aun 0862d2de45
i18n updates (ca-ES,es-ES,fa-IR,fi-FI,ru-RU,zh-CN) (#881)
* New translations (Spanish)

* New translations (Finnish)

* New translations (Russian)

* Update catalogs.json

* New translations (Catalan)

* New translations (Spanish)

* New translations (Chinese Simplified)

* New translations (Chinese Simplified)

* New translations (Persian)

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-10-16 12:36:12 +00:00
Lim Chee Aun e8cc93bde6 Upgrade dependencies 2024-10-15 18:12:31 +08:00
Chee Aun af6cf2715c
i18n updates (ca-ES,eo-UY,es-ES,eu-ES,fa-IR,it-IT,lt-LT,pl-PL) (#880)
* New translations (Catalan)

* New translations (Spanish)

* New translations (Basque)

* New translations (Esperanto)

* New translations (Lithuanian)

* New translations (Polish)

* New translations (Italian)

* New translations (Persian)

* New translations (Catalan)

* New translations (Norwegian Bokmal)

* New translations (French)

* New translations (Arabic)

* New translations (Czech)

* New translations (German)

* New translations (Finnish)

* New translations (Hebrew)

* New translations (Japanese)

* New translations (Korean)

* New translations (Dutch)

* New translations (Portuguese)

* New translations (Russian)

* New translations (Ukrainian)

* New translations (Chinese Simplified)

* New translations (Chinese Traditional)

* New translations (Galician)

* New translations (Portuguese, Brazilian)

* New translations (Thai)

* New translations (Occitan)

* New translations (Kabyle)
2024-10-14 15:38:51 +00:00
Lim Chee Aun bcd7507603 3 contexts of "Following" 2024-10-14 22:56:05 +08:00
Chee Aun 9d5494e1c7
i18n updates (ar-SA,ca-ES,cs-CZ,de-DE,eo-UY,es-ES,eu-ES,fa-IR,fi-FI,fr-FR,gl-ES,he-IL,it-IT,ja-JP,kab,ko-KR,lt-LT,nb-NO,nl-NL,oc-FR,pl-PL,pt-BR,pt-PT,ru-RU,th-TH,uk-UA,zh-CN,zh-TW) (#879)
* New translations (Spanish)

* New translations (Basque)

* New translations (Esperanto)

* New translations (Lithuanian)

* New translations (Polish)

* New translations (Italian)

* New translations (Persian)

* New translations (Catalan)

* New translations (Norwegian Bokmal)

* New translations (French)

* New translations (Arabic)

* New translations (Czech)

* New translations (German)

* New translations (Finnish)

* New translations (Hebrew)

* New translations (Japanese)

* New translations (Korean)

* New translations (Dutch)

* New translations (Portuguese)

* New translations (Russian)

* New translations (Ukrainian)

* New translations (Chinese Simplified)

* New translations (Chinese Traditional)

* New translations (Galician)

* New translations (Portuguese, Brazilian)

* New translations (Thai)

* New translations (Occitan)

* New translations (Kabyle)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-10-14 13:08:22 +00:00
Lim Chee Aun 30486ed389 Explicit ID to force separate keys
`context` will make Lingui aware of different contexts and generate different IDs
but it's not shown on Crowdin's side. Crowdin seems only care about msgid and
ignores msgctxt, so it won't generate another unique ID for different contexts
2024-10-14 19:56:50 +08:00
Chee Aun c6fee139b5
i18n updates (ca-ES,eo-UY,es-ES,eu-ES,fa-IR,it-IT,lt-LT,nb-NO,pl-PL) (#878)
* New translations (Lithuanian)

* New translations (Spanish)

* New translations (Basque)

* New translations (Esperanto)

* New translations (Lithuanian)

* New translations (Polish)

* New translations (Italian)

* New translations (Persian)

* New translations (Catalan)

* New translations (Norwegian Bokmal)

* New translations (French)

* New translations (Arabic)

* New translations (Czech)

* New translations (German)

* New translations (Finnish)

* New translations (Hebrew)

* New translations (Japanese)

* New translations (Korean)

* New translations (Dutch)

* New translations (Portuguese)

* New translations (Russian)

* New translations (Ukrainian)

* New translations (Chinese Simplified)

* New translations (Chinese Traditional)

* New translations (Galician)

* New translations (Portuguese, Brazilian)

* New translations (Thai)

* New translations (Occitan)

* New translations (Kabyle)
2024-10-14 11:48:49 +00:00
Lim Chee Aun e092e469d1 Prettier-ify 2024-10-14 19:38:09 +08:00
Lim Chee Aun 5e4300f71d Try fix same words with different contexts 2024-10-14 19:20:46 +08:00
Chee Aun 8b3ea707f6
i18n updates (ar-SA,ca-ES,cs-CZ,de-DE,eo-UY,es-ES,eu-ES,fa-IR,fi-FI,fr-FR,gl-ES,he-IL,it-IT,ja-JP,kab,ko-KR,lt-LT,nb-NO,nl-NL,oc-FR,pl-PL,pt-BR,pt-PT,ru-RU,th-TH,uk-UA,zh-CN,zh-TW) (#877)
* New translations (Spanish)

* New translations (Basque)

* New translations (Esperanto)

* New translations (Lithuanian)

* New translations (Polish)

* New translations (Italian)

* New translations (Persian)

* New translations (Catalan)

* New translations (Norwegian Bokmal)

* New translations (French)

* New translations (Arabic)

* New translations (Czech)

* New translations (German)

* New translations (Finnish)

* New translations (Hebrew)

* New translations (Japanese)

* New translations (Korean)

* New translations (Dutch)

* New translations (Portuguese)

* New translations (Russian)

* New translations (Ukrainian)

* New translations (Chinese Simplified)

* New translations (Chinese Traditional)

* New translations (Galician)

* New translations (Portuguese, Brazilian)

* New translations (Thai)

* New translations (Occitan)

* New translations (Kabyle)
2024-10-14 09:36:50 +00:00
Lim Chee Aun 71a694b74e Missed this "Post" 2024-10-14 16:22:22 +08:00
Chee Aun 29822cbf2d
Merge pull request #735 from Steffo99/feature/paste-attach
Allow pasting attachments on Akkoma / Pleroma instances
2024-10-14 15:45:41 +08:00
Chee Aun 4aecb301f4
i18n updates (nb-NO) (#876)
* New translations (Norwegian Bokmal)

* Update catalogs.json

* New translations (Norwegian Bokmal)

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-10-14 07:30:51 +00:00
Chee Aun d185eff95c
i18n updates (nb-NO) (#875)
* New translations (Norwegian Bokmal)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-10-13 20:11:53 +00:00
Chee Aun e7c9628d92
i18n updates (es-ES,fa-IR) (#869)
* New translations (Persian)

* New translations (Spanish)
2024-10-13 17:25:59 +00:00
Lim Chee Aun f85cf22558 Cache another regex 2024-10-13 11:32:52 +08:00
Lim Chee Aun 66e8bfe18c Move emojis check condition to top 2024-10-13 11:30:05 +08:00
Lim Chee Aun 82163c0b88 Fix text nodes extraction fails on template element 2024-10-13 11:30:05 +08:00
Chee Aun 4d03f8fba4
Merge pull request #872 from Steffo99/feature/twitter-crash-fix
Fix crash if a `@username@twitter.com` pseudo-mention is encountered
2024-10-13 08:36:27 +08:00
github-actions[bot] f669c39a30 Update README.md 2024-10-13 00:02:30 +00:00
Stefano Pigozzi 54fcaf80b0
Use a global regex for replaceAll 2024-10-12 22:39:40 +02:00
Chee Aun 56faec702c
i18n updates (ca-ES) (#868) 2024-10-11 08:57:47 +00:00
Chee Aun 947ab3077b
Merge pull request #867 from Steffo99/feature/issue-template
Replace the current issue templates with the newer format, "Issue Forms"
2024-10-11 14:47:36 +08:00
Stefano Pigozzi 6ff127c8b3
Allow bypassing issue forms 2024-10-11 07:04:37 +02:00
Stefano Pigozzi 47a8a174e6
Convert feature request to issue form 2024-10-11 07:02:35 +02:00
Stefano Pigozzi 665b6dd7e7
Describe the bug → Bug description 2024-10-11 07:01:26 +02:00
Stefano Pigozzi 2878881e10
Convert bug report to issue form 2024-10-11 06:59:18 +02:00
Scott Feeney 59d5c73359 Run prettier 2024-10-10 17:38:06 -07:00
Scott Feeney 22f0703162 Store nodeInfo separately + other feedback 2024-10-10 17:31:16 -07:00
Stefano Pigozzi f49074abfd
Merge .po file 2024-10-11 02:03:53 +02:00
Stefano Pigozzi 6bd3ad0143
Merge remote-tracking branch 'cheeaun/main' into feature/paste-attach
# Conflicts:
#	src/locales/en.po
2024-10-11 02:03:27 +02:00
Scott Feeney ad0ab0c845 Shrink the size of the feature detection change 2024-10-10 16:59:37 -07:00
Scott Feeney 839023cefc Use NodeInfo to detect features if available
For Mastodon <=4.3 (all current stable releases of Mastodon), the
NodeInfo request will always fail due to mastodon/mastodon#23135 and
fall back to the existing behavior. For other server software, this will
allow for more accurate checking of feature availability.

Fixes #808: adds support for exclusive lists with GoToSocial 0.17+.
2024-10-10 16:59:37 -07:00
Chee Aun 4a09740ae9
i18n updates (fa-IR,it-IT) (#862)
* New translations (Italian)

* New translations (Persian)
2024-10-10 20:18:12 +00:00
Lim Chee Aun 48537742a2 Time to try fetchPriority=low 2024-10-11 02:11:08 +08:00
Lim Chee Aun edd34a5cfe Line changes 2024-10-10 15:14:21 +08:00
Lim Chee Aun d5e985d6d4 Preliminary filter work on notifications 2024-10-10 15:14:08 +08:00
Lim Chee Aun a25bcba8a6 Make 'Delete' post look dangereous
Thanks to https://github.com/cheeaun/phanpy/pull/841
2024-10-10 09:16:49 +08:00
Chee Aun e2e9e3cdb0
Merge pull request #856 from Steffo99/feature/login-default-instance
Use the same logic as the main login button for the login tooltip in posts
2024-10-10 08:38:18 +08:00
Chee Aun 0eaa4b0cec
Merge pull request #855 from Steffo99/feature/hashtag-fix
Do not save state between regex executions
2024-10-10 08:30:19 +08:00
Stefano Pigozzi 8ae6846827
Merge branch 'main' into feature/hashtag-fix 2024-10-10 00:58:12 +02:00
Lim Chee Aun e2086a1156 Stupid g is cached between calls
https://stackoverflow.com/q/1520800/20838
2024-10-10 00:57:27 +08:00
Lim Chee Aun 46f5d7917c Fix dup keys 2024-10-10 00:56:00 +08:00
Lim Chee Aun 9d06c88289 Fix text size change affect settings popover width 2024-10-09 17:14:45 +08:00
Lim Chee Aun eea5b027c0 Prevent this action from running in forks 2024-10-09 12:30:00 +08:00
Lim Chee Aun 3051a59753 Add some designs that's still not used for now 2024-10-08 21:03:02 +08:00
Lim Chee Aun 9958d9512b Upgrade dependencies 2024-10-08 21:02:42 +08:00
Chee Aun 731ff8a0c5
i18n updates (eo-UY,es-ES,eu-ES) (#859)
* New translations (Spanish)

* New translations (Esperanto)

* New translations (Spanish)

* New translations (Basque)
2024-10-06 15:21:19 +00:00
github-actions[bot] 1a84c18d38 Update README.md 2024-10-06 00:02:28 +00:00
Chee Aun 3ff2253116
i18n updates (it-IT,pl-PL) (#854)
* New translations (Polish)

* New translations (Italian)
2024-10-04 13:48:48 +00:00
Stefano Pigozzi 59e3e4a37f
Prettify 2024-10-04 14:51:51 +02:00
Stefano Pigozzi 02dfa81407
Use the same logic as the main login button for the login tooltip in posts 2024-10-04 14:03:25 +02:00
Stefano Pigozzi e94b8edacc
Do not save state between regex executions
Fixes #843.

See https://stackoverflow.com/questions/2630418/javascript-regex-returning-true-then-false-then-true-etc for more information!
2024-10-04 13:19:09 +02:00
Chee Aun cbcf5c9b43
i18n updates (es-ES,pl-PL) (#851)
* New translations (Spanish)

* New translations (Polish)
2024-10-03 16:52:22 +00:00
Chee Aun 31e784821b
i18n updates (lt-LT) (#848)
* New translations (Lithuanian)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-10-01 12:50:15 +00:00
Chee Aun 6675d00218
i18n updates (eo-UY,es-ES,lt-LT) (#845)
* New translations (Spanish)

* New translations (Spanish)

* New translations (Esperanto)

* New translations (Lithuanian)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-10-01 10:34:36 +00:00
Lim Chee Aun 334362487a Fix accounts loading error for non-server-side notifs grouping 2024-10-01 16:54:42 +08:00
Chee Aun da532032a8
i18n updates (es-ES) (#844) 2024-09-29 13:31:55 +00:00
Chee Aun 492528ea6f
i18n updates (lt-LT,nb-NO) (#840)
* New translations (Norwegian Bokmal)

* Update catalogs.json

* New translations (Lithuanian)

* New translations (Norwegian Bokmal)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-09-27 15:16:07 +00:00
Chee Aun f521249dea
i18n updates (eo-UY,lt-LT) (#838)
* New translations (Lithuanian)

* Update catalogs.json

* New translations (Esperanto)

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-09-26 19:21:11 +00:00
Chee Aun bb4bd3cc45
i18n updates (lt-LT) (#837)
* New translations (Lithuanian)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-09-26 16:48:45 +00:00
Chee Aun 166aab3f3a
i18n updates (lt-LT) (#836)
* New translations (Lithuanian)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-09-26 15:01:26 +00:00
Chee Aun 0a2414043c
i18n updates (nb-NO) (#835)
* New translations (Norwegian Bokmal)

* Update catalogs.json

* New translations (Norwegian Bokmal)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-09-26 11:46:50 +00:00
Chee Aun 74e22ed8dd
i18n updates (nb-NO) (#834)
* New translations (Norwegian Bokmal)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-09-26 09:22:42 +00:00
Lim Chee Aun a19beffd20 Move diff language check to separate Task 2024-09-26 11:21:57 +08:00
Chee Aun b76d2308eb
i18n updates (eu-ES) (#833) 2024-09-25 19:00:31 +00:00
Chee Aun 3da21c713e
i18n updates (lt-LT) (#832) 2024-09-25 16:52:28 +00:00
Chee Aun 17fcf7f86e
i18n updates (nb-NO) (#831)
* New translations (Norwegian Bokmal)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-09-25 10:38:00 +00:00
Lim Chee Aun c0abfb203e Possibly need useLayoutEffect 2024-09-25 18:27:40 +08:00
Lim Chee Aun 65bd6fb1ef It's micro-optimization week
Includes experimental replacing dangerouslySetInnerHTML with setting actual DOM
2024-09-25 17:18:30 +08:00
Lim Chee Aun 4d35c9d2c3 Try fix that hard-to-reproduce avatar flicker 2024-09-25 17:18:30 +08:00
Lim Chee Aun 1485f9e5d9 Better feature detection for Scroll-driven animations
Ref: https://www.bram.us/2024/09/24/feature-detecting-scroll-driven-animations-you-want-to-check-for-animation-range-too/
2024-09-25 17:18:30 +08:00
Chee Aun f1f1fa6402
i18n updates (fa-IR) (#830)
* New translations (Persian)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-09-25 08:07:25 +00:00
Chee Aun 84cbd995e2
i18n updates (es-ES,nb-NO) (#829)
* New translations (Spanish)

* New translations (Spanish)

* New translations (Norwegian Bokmal)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-09-25 06:32:58 +00:00
Chee Aun 41738cc857
i18n updates (ca-ES,es-ES) (#828)
* New translations (Spanish)

* New translations (Spanish)

* New translations (Catalan)
2024-09-23 21:04:54 +00:00
Chee Aun 786f47c6c7
i18n updates (eo-UY,es-ES) (#827)
* New translations (Spanish)

* New translations (Esperanto)

* New translations (Spanish)
2024-09-23 14:57:50 +00:00
Lim Chee Aun 931af3c193 Add data-source to embed code
Ref: https://github.com/stefanbohacek/fediverse-embeds-wordpress-plugin/issues/29
2024-09-23 20:42:48 +08:00
Lim Chee Aun 5d31116354 Another attempt on PR prettier 2024-09-23 13:04:53 +08:00
Lim Chee Aun 80d4a45a65 s/jsx/js extension
Somehow vscode refactor "Move to a new file" preserves the jsx extension
2024-09-23 12:43:55 +08:00
Stefano Pigozzi 58144a50ec
Update po files 2024-09-23 04:19:32 +02:00
Stefano Pigozzi aa332743d4
Merge branch 'main' into feature/paste-attach
# Conflicts:
#	src/locales/en.po
2024-09-23 04:18:43 +02:00
Stefano Pigozzi 78dcff423e
Update po files 2024-09-23 04:18:20 +02:00
Stefano Pigozzi 88c52e41f0
Make explicit the undefined check to disable the attachment button 2024-09-23 04:18:09 +02:00
Stefano Pigozzi 906d6017e4
Fix brace not being in the same line as else 2024-09-23 04:12:27 +02:00
Lim Chee Aun 1a73e32211 Fix missing Only mentions checkbox in Notifications 2024-09-23 09:51:14 +08:00
Chee Aun 8ab209e236
i18n updates (eo-UY) (#826) 2024-09-22 19:30:12 +00:00
Chee Aun aae1600df0
i18n updates (eo-UY,es-ES) (#823)
* New translations (Esperanto)

* New translations (Spanish)

* New translations (Spanish)
2024-09-22 12:13:14 +00:00
Lim Chee Aun aae047e3b9 Fix failed prettier action 2024-09-22 18:53:45 +08:00
Lim Chee Aun 99e9ecd10e Small adjustment 2024-09-22 18:41:20 +08:00
Lim Chee Aun 2b988c5669 Fix error when server-side grouping not enabled 2024-09-22 14:09:41 +08:00
Lim Chee Aun 4c08c3a668 Whole bunch of line changes 2024-09-22 13:55:55 +08:00
Lim Chee Aun c8abb95e8e Improve grouping for server-side grouping
Migrate from v2_alpha to v2
2024-09-22 13:55:37 +08:00
Lim Chee Aun 4cc6a6a12c Forgot to commit this 2024-09-22 13:54:43 +08:00
Lim Chee Aun fd5e574e70 Don't show byline if card posted by author themselves 2024-09-22 13:53:18 +08:00
Lim Chee Aun bbe276e18c Add weekday & better stickiness 2024-09-22 13:52:36 +08:00
Lim Chee Aun ed5cb54eb4 Upgrade dependencies 2024-09-22 13:51:12 +08:00
Lim Chee Aun 333c434343 Fix some content-visibility: auto weirdness 2024-09-22 13:46:32 +08:00
Lim Chee Aun 07242eb4d2 Remove one space 2024-09-22 10:03:16 +08:00
github-actions[bot] 0de7a6126f Update README.md 2024-09-22 00:02:28 +00:00
Lim Chee Aun 02a8a9034a Content-visiblit:auto for custom emojis list
With better sticky headers
2024-09-21 12:09:50 +08:00
Lim Chee Aun f2cc0f5bec Bring back content-visibility: auto for replies
With a fix
2024-09-21 12:09:50 +08:00
Chee Aun 9345f8b44c
i18n updates (kab) (#821)
* New translations (Kabyle)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-09-20 06:38:39 +00:00
Lim Chee Aun ebec0883aa Hopefully fix missing account from emoji reaction notification 2024-09-20 09:09:22 +08:00
Chee Aun bd029a5e4e
i18n updates (es-ES,pt-BR,pt-PT) (#820)
* New translations (Spanish)

* New translations (Portuguese)

* New translations (Portuguese, Brazilian)
2024-09-19 21:23:56 +00:00
Chee Aun eac7e8b03c
i18n updates (gl-ES,nb-NO) (#819)
* New translations (Galician)

* New translations (Norwegian Bokmal)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-09-19 18:33:23 +00:00
Chee Aun ba1fe3d2d2
i18n updates (ja-JP) (#818)
* New translations (Japanese)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-09-19 09:02:27 +00:00
Chee Aun 0cb6c438c6
i18n updates (eo-UY,es-ES,ja-JP) (#816)
* New translations (Spanish)

* New translations (Esperanto)

* Update catalogs.json

* New translations (Esperanto)

* New translations (Japanese)

* Update catalogs.json

* New translations (Japanese)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-09-19 08:06:18 +00:00
Chee Aun 30ce4a9c5c
i18n updates (eo-UY,nb-NO) (#815)
* New translations (Esperanto)

* Update catalogs.json

* New translations (Esperanto)

* New translations (Norwegian Bokmal)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-09-18 13:27:30 +00:00
Chee Aun 8f5039ae16
i18n updates (eo-UY,pt-PT,zh-CN) (#814)
* New translations (Portuguese)

* New translations (Esperanto)

* New translations (Chinese Simplified)
2024-09-18 05:39:14 +00:00
Lim Chee Aun 905295a045 Fix wrong "once" logic 🤦‍♂️ 2024-09-18 13:20:08 +08:00
Lim Chee Aun 0e3cc864db Make sure cleanup runs at least once 2024-09-18 13:09:03 +08:00
Lim Chee Aun 73a4326b55 Double-down on reducing cache size 2024-09-18 12:19:50 +08:00
Lim Chee Aun 15732dc466 Move iconsRoute up
Should intercept first before 'assets'
2024-09-18 12:19:01 +08:00
Chee Aun 128a3bacd7
i18n updates (es-ES,lt-LT) (#813)
* New translations (Spanish)

* New translations (Lithuanian)
2024-09-17 18:14:22 +00:00
Chee Aun 34e39a8883
i18n updates (eo-UY,lt-LT) (#812)
* New translations (Esperanto)

* New translations (Lithuanian)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-09-17 15:59:41 +00:00
Chee Aun 798658cbc4
i18n updates (eo-UY,eu-ES,it-IT,nb-NO) (#811)
* New translations (Basque)

* New translations (Italian)

* New translations (Esperanto)

* New translations (Norwegian Bokmal)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-09-17 14:49:38 +00:00
Chee Aun 65b6318765
i18n updates (eo-UY,it-IT) (#810)
* New translations (Italian)

* New translations (Esperanto)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-09-17 13:44:57 +00:00
Chee Aun c59df8a575
i18n updates (eo-UY,pl-PL) (#809)
* New translations (Esperanto)

* New translations (Polish)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-09-17 12:01:23 +00:00
Lim Chee Aun 1d949a1ab2 Try this solution to clean up excess SW cache 2024-09-17 19:04:10 +08:00
Lim Chee Aun f3345ad9f8 Fixes for SW caching 2024-09-17 17:35:01 +08:00
Lim Chee Aun efb42ca911 Investigate SW cache keys 2024-09-17 17:18:03 +08:00
Lim Chee Aun f59058efa1 Add more purges and don't cache too long 2024-09-17 17:18:03 +08:00
Chee Aun f1e4ea2cfc
i18n updates (pt-BR,pt-PT,zh-CN) (#807)
* New translations (Portuguese)

* New translations (Portuguese, Brazilian)

* New translations (Chinese Simplified)
2024-09-17 07:00:17 +00:00
Lim Chee Aun 3e752c110f Enable navigation preload 2024-09-17 09:26:15 +08:00
Chee Aun 2a80f876be
i18n updates (es-ES,fi-FI,lt-LT,pt-BR,pt-PT) (#806)
* New translations (Lithuanian)

* New translations (Spanish)

* New translations (Finnish)

* New translations (Portuguese)

* New translations (Lithuanian)

* New translations (Portuguese, Brazilian)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-09-16 18:17:22 +00:00
Lim Chee Aun ac9b43cacc Test remove /instance and /preferences from SW cache 2024-09-17 00:45:58 +08:00
Chee Aun 51ac7611d4
i18n updates (lt-LT,ru-RU) (#805)
* New translations (Lithuanian)

* New translations (Russian)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-09-16 15:08:20 +00:00
Chee Aun 1db1535319
i18n updates (eo-UY,es-ES,gl-ES,lt-LT) (#804)
* New translations (Spanish)

* New translations (Galician)

* New translations (Esperanto)

* New translations (Lithuanian)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-09-16 14:05:24 +00:00
Lim Chee Aun 8f6b4c6420 Try non-blocking init 2024-09-16 19:11:45 +08:00
Chee Aun 142e211196
i18n updates (es-ES,fr-FR,pt-BR,pt-PT) (#802)
* New translations (French)

* New translations (Spanish)

* New translations (Portuguese)

* New translations (Portuguese, Brazilian)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-09-16 09:49:41 +00:00
Lim Chee Aun 4ae1c38269 Battle against slow startup time
Seems like Intl and tinyld could be the cause
2024-09-16 17:39:06 +08:00
Lim Chee Aun 572358f0f4 Another attempt 2024-09-16 16:13:00 +08:00
Lim Chee Aun 942dac4be0 Let's benchmark deeper 2024-09-16 15:32:42 +08:00
Chee Aun c65bed2c17
i18n updates (ar-SA,ca-ES,de-DE,eo-UY,es-ES,eu-ES,fr-FR) (#801)
* New translations (Spanish)

* New translations (Esperanto)

* New translations (French)

* New translations (Spanish)

* New translations (Arabic)

* New translations (Catalan)

* New translations (German)

* New translations (Basque)

* New translations (Finnish)

* New translations (Italian)

* New translations (Japanese)

* New translations (Korean)

* New translations (Dutch)

* New translations (Chinese Simplified)

* New translations (Chinese Traditional)

* New translations (Galician)

* New translations (Occitan)

* New translations (Kabyle)

* New translations (Hebrew)

* New translations (Portuguese)

* New translations (Persian)

* New translations (Esperanto)

* New translations (Czech)

* New translations (Lithuanian)

* New translations (Russian)

* New translations (Thai)

* New translations (Polish)

* New translations (Portuguese, Brazilian)

* New translations (Ukrainian)
2024-09-16 07:24:29 +00:00
Lim Chee Aun 9031da2768 Parallelize the inits 2024-09-16 15:17:57 +08:00
Lim Chee Aun e4474d2d4d More accurate app-init benchmark 2024-09-16 14:16:17 +08:00
Lim Chee Aun a6daf19b80 Test disable content-visibility:auto on carousels
Safari seems to jump scrolls inside the carousel
2024-09-16 13:33:00 +08:00
Lim Chee Aun c5d46f8d7b Upgrade dependencies 2024-09-16 13:33:00 +08:00
Lim Chee Aun e5d766a076 Test escalate the loading state 2024-09-16 13:33:00 +08:00
Lim Chee Aun 3ebf7af4c3 Show author bylines 2024-09-16 13:33:00 +08:00
Lim Chee Aun 3392c169c9 Embrace more scroll-driven styles 2024-09-16 13:33:00 +08:00
Lim Chee Aun 7d5d8814b9 Fix grouped author in replies not deduped 2024-09-16 13:33:00 +08:00
Chee Aun 1ae6e42e94
i18n updates (es-ES,lt-LT) (#800)
* New translations (Spanish)

* New translations (Lithuanian)
2024-09-15 19:04:09 +00:00
Chee Aun 767caf764a
i18n updates (eo-UY,lt-LT) (#799)
* New translations (Esperanto)

* New translations (Lithuanian)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-09-15 18:07:06 +00:00
Chee Aun 5a2f4c9c1d
i18n updates (lt-LT) (#798)
* New translations (Lithuanian)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-09-15 17:09:55 +00:00
Lim Chee Aun b1d7592673 Fix hotkeys firing for multiple elements
This is due to react-hotkeys-hook v4.5.1 upgrade
2024-09-15 23:41:34 +08:00
Lim Chee Aun 894bfcc891 Small adjustments to notifications 2024-09-15 23:41:34 +08:00
Chee Aun d476dd8ffc
i18n updates (eo-UY,es-ES) (#797)
* New translations (Spanish)

* New translations (Esperanto)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-09-15 15:04:23 +00:00
Chee Aun 68392f3977
i18n updates (eo-UY) (#796) 2024-09-15 14:07:21 +00:00
Chee Aun c20e670070
Merge pull request #788 from graue/graue/edit-image-desc
Fix editing image descriptions
2024-09-15 18:42:52 +08:00
Chee Aun c5f676bb17
i18n updates (eo-UY,es-ES,lt-LT) (#794)
* New translations (Lithuanian)

* New translations (Lithuanian)

* Update catalogs.json

* New translations (Esperanto)

* Update catalogs.json

* New translations (Spanish)

* New translations (Esperanto)

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-09-15 00:47:25 +00:00
github-actions[bot] 4b7b0a2e95 Update README.md 2024-09-15 00:02:22 +00:00
Chee Aun 3f553954b2
i18n updates (eo-UY,es-ES,lt-LT) (#793)
* New translations (Lithuanian)

* New translations (Spanish)

* New translations (Esperanto)

* New translations (Lithuanian)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-09-14 17:17:52 +00:00
Chee Aun f66ce05e48
i18n updates (lt-LT) (#792)
* New translations (Lithuanian)

* Update catalogs.json

* New translations (Lithuanian)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-09-14 15:12:05 +00:00
Chee Aun c043725c3c
i18n updates (lt-LT) (#791)
* New translations (Lithuanian)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-09-14 12:46:51 +00:00
Chee Aun 2edf263b7e
i18n updates (lt-LT) (#790)
* New translations (Lithuanian)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-09-14 11:46:00 +00:00
Lim Chee Aun 3fafdbce5b Remove the ref 2024-09-14 18:42:56 +08:00
Chee Aun 7a4e038f90
i18n updates (it-IT,lt-LT,pt-PT) (#789)
* New translations (Lithuanian)

* Update catalogs.json

* New translations (Italian)

* New translations (Portuguese)

* New translations (Lithuanian)

* New translations (Portuguese, Brazilian)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-09-14 10:26:21 +00:00
Scott Feeney 788ea1ad85 Fix editing image descriptions 2024-09-14 02:13:21 -07:00
Lim Chee Aun ab310d2f1c Try fix prettier action 2024-09-14 13:16:26 +08:00
Lim Chee Aun 6a8d5717b4 Fix cropped avatar 2024-09-14 12:57:05 +08:00
Lim Chee Aun a2e9bce798 Test prettier action 2024-09-14 12:57:05 +08:00
Chee Aun d1b2daa9ba
i18n updates (lt-LT,pt-PT) (#787)
* New translations (Lithuanian)

* Update catalogs.json

* New translations (Portuguese)

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-09-13 21:50:32 +00:00
Chee Aun a95dbe7827
i18n updates (lt-LT) (#786)
* New translations (Lithuanian)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-09-13 17:21:31 +00:00
Chee Aun 848cb02131
i18n updates (fa-IR,lt-LT,zh-CN) (#785)
* New translations (Chinese Simplified)

* New translations (Persian)

* New translations (Lithuanian)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-09-13 16:06:18 +00:00
Chee Aun ad36bc5c84
i18n updates (fa-IR,lt-LT,zh-CN) (#783)
* New translations (Chinese Simplified)

* New translations (Lithuanian)

* Update catalogs.json

* New translations (Persian)

* New translations (Lithuanian)

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-09-13 14:57:25 +00:00
Lim Chee Aun 1664aa3cf4 Got to solve this mystery 2024-09-13 22:01:26 +08:00
Lim Chee Aun f22bdf568d Try this 2024-09-13 20:09:13 +08:00
Lim Chee Aun 7ca71efc4c Move the end parts 2024-09-13 18:48:50 +08:00
Lim Chee Aun 182a2366ec Get rid of vulnerabilities warnings 2024-09-13 17:48:20 +08:00
Lim Chee Aun 942c8ae910 Further benchmarking 2024-09-13 17:45:28 +08:00
Chee Aun 466b2bd7d0
i18n updates (lt-LT) (#782) 2024-09-12 19:08:17 +00:00
Chee Aun 4ae6877429
i18n updates (zh-CN) (#781) 2024-09-12 16:15:07 +00:00
Chee Aun e3fef97f9b
i18n updates (cs-CZ) (#780)
* New translations (Czech)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-09-12 14:00:23 +00:00
Chee Aun 1c0fb61808
i18n updates (gl-ES) (#779) 2024-09-12 03:14:02 +00:00
Chee Aun 3e78609e14
i18n updates (es-ES) (#776) 2024-09-11 18:17:12 +00:00
Chee Aun 80caccb8b9
i18n updates (eo-UY,pt-PT) (#775)
* New translations (Portuguese)

* New translations (Esperanto)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-09-11 15:54:20 +00:00
Chee Aun 2d7fbb3104
i18n updates (pt-PT) (#774) 2024-09-11 14:42:13 +00:00
Chee Aun b1ba3dd3aa
i18n updates (eo-UY,pt-PT) (#773)
* New translations (Portuguese)

* New translations (Esperanto)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-09-11 13:19:17 +00:00
Chee Aun 83ffac755f
i18n updates (pl-PL,pt-BR) (#772)
* New translations (Polish)

* New translations (Portuguese, Brazilian)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-09-11 12:03:49 +00:00
Lim Chee Aun ba4d16a701 Make block look dangerous 2024-09-11 13:21:28 +08:00
Lim Chee Aun a376a9bd13 Add comment for this string 2024-09-11 13:10:36 +08:00
Lim Chee Aun 9d927a3d24 Fix wrong postsCount 2024-09-11 13:02:33 +08:00
Chee Aun 71008b91c3
i18n updates (eo-UY) (#771)
* New translations (Esperanto)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-09-10 19:54:27 +00:00
Chee Aun 9f821e425e
i18n updates (eo-UY,es-ES) (#770)
* New translations (Spanish)

* New translations (Esperanto)
2024-09-10 18:13:03 +00:00
Stefano Pigozzi e1e3081052
Update po files 2024-09-10 16:57:12 +02:00
Stefano Pigozzi 2fbef61934
Merge remote-tracking branch 'upstream/main' into feature/paste-attach
# Conflicts:
#	src/locales/en.po
2024-09-10 16:54:08 +02:00
Stefano Pigozzi f82e721c80
Make "multiple" condition more readable 2024-09-10 16:53:04 +02:00
Chee Aun 6fd1de22f6
i18n updates (eo-UY) (#769)
* New translations (Esperanto)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-09-10 14:52:34 +00:00
Stefano Pigozzi 1abbe33b76
Remove `unattachableFiles` 2024-09-10 16:46:16 +02:00
Chee Aun 2b4dbdfed5
Merge pull request #767 from Steffo99/feature/akkoma-vote-counts
Fix invalid vote counts on single choice polls on certain MastoAPI implementations
2024-09-10 17:21:52 +08:00
Stefano Pigozzi 50787df1d0
Fix invalid vote counts on single choice polls on certain MastoAPI implementations 2024-09-10 07:37:30 +02:00
Lim Chee Aun 0453cde6ac Give up on size-limit
Also, ridiculous amount of dependencies for such simple checker tho'
2024-09-10 12:45:41 +08:00
Lim Chee Aun 805c9c82aa Add back fetch-depth: 0 2024-09-10 12:40:41 +08:00
Lim Chee Aun 806f2d0fef Try remove checkout options 2024-09-10 12:38:47 +08:00
Lim Chee Aun 07e72be5bb Try delay run localeTargetLanguages 2024-09-10 12:33:05 +08:00
Chee Aun 162d344be1
i18n updates (eo-UY) (#765)
* New translations (Esperanto)

* Update catalogs.json

* New translations (Esperanto)

* Update catalogs.json

* New translations (Esperanto)

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-09-09 23:40:01 +00:00
Lim Chee Aun aa6d00a80d size-limit dep is needed 🤦‍♂️ 2024-09-09 23:55:34 +08:00
Chee Aun b732a35776
i18n updates (eo-UY) (#764)
* New translations (Esperanto)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-09-09 15:53:13 +00:00
Lim Chee Aun 4d81551cdd Use PR's ref 2024-09-09 23:48:04 +08:00
Lim Chee Aun f113bbf20d Try fetch-depth instead 2024-09-09 23:40:54 +08:00
Lim Chee Aun 78cd8da4d6 Try this ref 2024-09-09 23:34:40 +08:00
Lim Chee Aun 147372bd10 Try point to production again 2024-09-09 23:25:45 +08:00
Chee Aun ba081421f6
i18n updates (eo-UY,fa-IR,it-IT,nl-NL) (#763)
* New translations (Italian)

* New translations (Dutch)

* New translations (Persian)

* New translations (Esperanto)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-09-09 13:56:03 +00:00
Lim Chee Aun 9f35d7ba73 Maybe this is not needed 2024-09-09 20:57:26 +08:00
Lim Chee Aun 7330370413 Add size-limit 2024-09-09 20:54:55 +08:00
Lim Chee Aun 8618deec29 Test cross-file benchmark 2024-09-09 20:16:17 +08:00
Chee Aun 8839e89d2b
i18n updates (it-IT) (#762)
* New translations (Italian)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-09-09 11:58:39 +00:00
Chee Aun 57efa460a6
i18n updates (it-IT) (#761) 2024-09-09 11:01:00 +00:00
Lim Chee Aun 487e574765 More benchmarks 2024-09-09 16:36:42 +08:00
Chee Aun ec4916ab5c
i18n updates (eo-UY,zh-CN) (#759)
* New translations (Esperanto)

* Update catalogs.json

* New translations (Chinese Simplified)

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-09-09 07:13:59 +00:00
Lim Chee Aun 55f3d7d128 MVP-ish button to filter by author if clicked on link card 2024-09-09 09:45:04 +08:00
Lim Chee Aun 06bb1815bb No content-visibility: auto for post page 2024-09-09 09:43:47 +08:00
Chee Aun 5c99ef6508
i18n updates (eo-UY,fa-IR) (#758)
* New translations (Persian)

* New translations (Esperanto)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-09-08 17:15:54 +00:00
Lim Chee Aun e6c03a8ae0 Run benchmark independent of the component lifecycle 2024-09-08 23:13:11 +08:00
Lim Chee Aun 19212ced62 Forgot this part 2024-09-08 21:37:34 +08:00
Chee Aun bfd959f45e
i18n updates (nl-NL,pt-BR) (#756)
* New translations (Dutch)

* Update catalogs.json

* New translations (Dutch)

* New translations (Portuguese, Brazilian)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-09-08 11:26:14 +00:00
Lim Chee Aun 946215c80b Debug on Phanpy Dev too 2024-09-08 19:06:42 +08:00
Lim Chee Aun d49c855a15 Add hidden debugging info 2024-09-08 19:06:42 +08:00
Lim Chee Aun 155abaa389 Experiment with content-visibility: auto again 2024-09-08 19:06:42 +08:00
Chee Aun cc10ccf466
i18n updates (gl-ES) (#755) 2024-09-08 06:31:49 +00:00
Stefano Pigozzi 774605d1ee
Fix basic math and logic error, possibly 2024-09-08 02:55:27 +02:00
Chee Aun 7f5a68ce8a
i18n updates (nl-NL) (#754)
* New translations (Dutch)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-09-08 00:05:36 +00:00
github-actions[bot] 7b03a40811 Update README.md 2024-09-08 00:02:23 +00:00
Chee Aun 091817010e
i18n updates (fa-IR,nl-NL,pt-BR,pt-PT) (#753)
* New translations (Dutch)

* New translations (Portuguese)

* New translations (Persian)

* New translations (Portuguese, Brazilian)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-09-07 22:38:46 +00:00
Stefano Pigozzi 475fe228af
Improve error messages 2024-09-08 00:06:18 +02:00
Stefano Pigozzi e77219cff3
Move unattachable files outside of the loop 2024-09-07 23:15:20 +02:00
Chee Aun 4cb2f6ffc4
i18n updates (nl-NL) (#752)
* New translations (Dutch)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-09-07 21:08:04 +00:00
Chee Aun 9761a37f54
i18n updates (es-ES,fr-FR,nl-NL) (#750)
* New translations (Spanish)

* New translations (French)

* New translations (Dutch)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-09-07 20:10:33 +00:00
Stefano Pigozzi 28f87e2c8a
Remove "by your instance" part of the error message 2024-09-07 21:18:39 +02:00
Stefano Pigozzi e472bc2e27
Contract comment to not mention Akkoma instances 2024-09-07 21:17:37 +02:00
Chee Aun 4326b2bf55
i18n updates (eo-UY,es-ES,pt-BR,pt-PT) (#749)
* New translations (Portuguese)

* New translations (Portuguese, Brazilian)

* New translations (Spanish)

* New translations (Esperanto)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-09-07 12:12:22 +00:00
Chee Aun 1f75bfa1d4
i18n updates (pt-BR,pt-PT) (#748)
* New translations (Portuguese)

* New translations (Portuguese, Brazilian)
2024-09-07 09:59:26 +00:00
Lim Chee Aun 49c7ccb0cb Handle WEB_DOMAIN for login
Turns out .well-known routes are CORS-enabled
2024-09-07 17:08:30 +08:00
Lim Chee Aun 463ec48a8d Fix "overload resolution failed"
convertToBlob returns promise 🫣
2024-09-07 15:27:09 +08:00
Chee Aun 036d3c8d83
i18n updates (ca-ES,es-ES,pt-BR,pt-PT,ru-RU) (#747)
* New translations (Catalan)

* New translations (Spanish)

* New translations (Portuguese)

* New translations (Russian)

* New translations (Portuguese, Brazilian)
2024-09-07 05:12:07 +00:00
Chee Aun b28008880e
Merge pull request #657 from Steffo99/feature/akkoma-local-only
Add support for local instance posts
2024-09-07 12:41:54 +08:00
Chee Aun 11d8758a9a
Merge pull request #746 from Steffo99/feature/hide-po-from-prs
Configure linguist overrides for this repository
2024-09-07 12:39:30 +08:00
Stefano Pigozzi dec6bbc60c
Mark anything in `readme-assets` as documentation 2024-09-07 03:53:24 +02:00
Stefano Pigozzi efde4d29aa
Collapse `*.po` files by default in pull requests 2024-09-07 03:51:20 +02:00
Stefano Pigozzi e2d97916af
Remove log 2024-09-07 03:27:57 +02:00
Stefano Pigozzi 4ade99ced9
Update .po file 2024-09-07 03:16:47 +02:00
Stefano Pigozzi 9513e5e3b0
Merge remote-tracking branch 'upstream/main' into feature/akkoma-local-only
# Conflicts:
#	src/locales/en.po
2024-09-07 03:16:31 +02:00
Stefano Pigozzi 33d6edda38
Split `local-visibility-post` feature into `@pleroma` and `@akkoma` variants
Co-authored-by: Lim Chee Aun <cheeaun@gmail.com>
2024-09-07 03:14:50 +02:00
Stefano Pigozzi 1aff56a6bd
Rename "Local instance" to "Local"
Co-authored-by: Lim Chee Aun <cheeaun@gmail.com>
2024-09-07 03:12:16 +02:00
Stefano Pigozzi 9a72975aaf
Move local between Public and Unlisted 2024-09-07 03:11:05 +02:00
Lim Chee Aun 44c8b64b66 Missed this string
I need eagle eyes
2024-09-07 08:41:53 +08:00
Chee Aun 4caa304ea1
i18n updates (eo-UY,es-ES) (#744)
* New translations (Spanish)

* New translations (Esperanto)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-09-06 18:54:52 +00:00
Chee Aun 6b6c650472
i18n updates (eu-ES,fi-FI,fr-FR,kab,pt-BR,pt-PT,ru-RU,zh-CN) (#742)
* New translations (Russian)

* Update catalogs.json

* New translations (Chinese Simplified)

* New translations (Finnish)

* New translations (Portuguese)

* New translations (Portuguese, Brazilian)

* New translations (Basque)

* New translations (French)

* New translations (Kabyle)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-09-06 14:23:06 +00:00
Lim Chee Aun bd6c5138eb Add PR number in the merge subject 2024-09-06 19:23:04 +08:00
Lim Chee Aun 56912faf9a Upgrade dependencies 2024-09-06 19:21:13 +08:00
Chee Aun f5785cfe3e
i18n updates (ar-SA,es-ES,fr-FR,pt-BR,pt-PT)
* New translations (Portuguese)

* New translations (Portuguese, Brazilian)

* New translations (Portuguese)

* New translations (Portuguese, Brazilian)

* New translations (French)

* New translations (Spanish)

* New translations (Arabic)

* New translations (Catalan)

* New translations (German)

* New translations (Basque)

* New translations (Finnish)

* New translations (Italian)

* New translations (Japanese)

* New translations (Korean)

* New translations (Dutch)

* New translations (Chinese Simplified)

* New translations (Chinese Traditional)

* New translations (Galician)

* New translations (Occitan)

* New translations (Kabyle)

* New translations (Hebrew)

* New translations (Portuguese)

* New translations (Persian)

* New translations (Esperanto)

* New translations (Czech)

* New translations (Lithuanian)

* New translations (Russian)

* New translations (Thai)

* New translations (Polish)

* New translations (Portuguese, Brazilian)

* New translations (Ukrainian)
2024-09-06 02:32:29 +00:00
Lim Chee Aun 4f07a7f55f Oops, missed this one 2024-09-06 09:20:21 +08:00
Chee Aun 7a5bf25ed6
i18n updates (eo-UY,es-ES)
* New translations (Spanish)

* New translations (Spanish)

* New translations (Esperanto)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-09-05 19:06:21 +00:00
Chee Aun cdef8a46c4
i18n updates (eo-UY,es-ES,eu-ES,fr-FR,it-IT,ko-KR,nl-NL,pl-PL,pt-BR,pt-PT,zh-TW)
* New translations (Portuguese)

* New translations (Basque)

* New translations (Portuguese)

* New translations (Portuguese)

* New translations (Portuguese)

* New translations (Portuguese, Brazilian)

* New translations (Polish)

* Update catalogs.json

* New translations (Korean)

* Update catalogs.json

* New translations (Korean)

* Update catalogs.json

* New translations (Portuguese)

* New translations (Portuguese, Brazilian)

* New translations (Basque)

* New translations (Portuguese)

* New translations (Portuguese)

* New translations (Portuguese, Brazilian)

* New translations (Portuguese)

* New translations (Portuguese, Brazilian)

* New translations (Portuguese)

* New translations (Dutch)

* Update catalogs.json

* New translations (Italian)

* Update catalogs.json

* New translations (French)

* New translations (Italian)

* Update catalogs.json

* New translations (French)

* New translations (Italian)

* Update catalogs.json

* New translations (Portuguese)

* New translations (Portuguese)

* New translations (Esperanto)

* Update catalogs.json

* New translations (Chinese Traditional)

* Update catalogs.json

* New translations (Spanish)

* New translations (Esperanto)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-09-05 14:22:50 +00:00
Stefano Pigozzi 109a519d14
Update .po file 2024-09-05 15:50:25 +02:00
Stefano Pigozzi 7f06187d75
Merge remote-tracking branch 'origin/main' into feature/akkoma-local-only
# Conflicts:
#	src/locales/en.po
2024-09-05 15:46:56 +02:00
Stefano Pigozzi ab5865ccf9
Line changed in `.po` file 2024-09-05 15:09:15 +02:00
Stefano Pigozzi 3fa9796941
Shorten expressions using the always-false property of undefined comparisons 2024-09-05 14:58:11 +02:00
Lim Chee Aun 95332d11f5 Fix "GraphQL: Invalid email address (mergePullRequest)"
Remove author email for now
2024-09-05 20:53:51 +08:00
Stefano Pigozzi c4a2dde20b
Rename `@pleroma/local-only` to `@pleroma/local-visibility-post`... again 2024-09-05 12:14:05 +02:00
Stefano Pigozzi 61946a8e67
Handle `maxMediaAttachments` being undefined while creating the gif picker button 2024-09-05 10:58:52 +02:00
Stefano Pigozzi 143b38979b
Handle `maxMediaAttachments` being undefined while creating the file input button 2024-09-05 10:58:24 +02:00
Stefano Pigozzi f7d783314e
Handle `maxMediaAttachments` being undefined during file cutoff 2024-09-05 10:52:48 +02:00
Stefano Pigozzi c277cbca8f
Move unsupported files alert to outside the loop
Co-authored-by: Lim Chee Aun <cheeaun@gmail.com>
2024-09-05 10:50:18 +02:00
Stefano Pigozzi 53f7c39c77
Remove unused pleroma variable 2024-09-05 10:42:44 +02:00
Stefano Pigozzi 9a60078b40
Remove pleroma maxMediaAttachments override
Co-authored-by: Lim Chee Aun <cheeaun@gmail.com>
2024-09-05 10:42:27 +02:00
Stefano Pigozzi 8df2f55f5b
Apply suggested changes to alert strings
Co-authored-by: Scott Feeney <scott@oceanbase.org>
Co-authored-by: Lim Chee Aun <cheeaun@gmail.com>
2024-09-05 10:41:09 +02:00
Stefano Pigozzi 78036d08a5
Autogenerated change to the .po file 2024-09-05 10:38:19 +02:00
Stefano Pigozzi 392aa6b460
Exclude change to the `it-IT.po` file 2024-09-05 10:20:29 +02:00
Stefano Pigozzi 72d735916e
Rename `@pleroma/local-only` to `@pleroma/local-visibility-post` 2024-09-05 10:19:53 +02:00
Stefano Pigozzi bf792c77f4
Remove unused `notContainAnyOma` regex 2024-09-05 10:19:01 +02:00
Lim Chee Aun 0f6f20629e Fix unknown author flag 🤦‍♂️ 2024-09-05 13:04:26 +08:00
Stefano Pigozzi 9e600ce31c
Merge branch 'cheeaun:main' into feature/paste-attach 2024-09-05 01:19:43 +02:00
Stefano Pigozzi 5479f91a6e
Set maxMediaAttachments to 1000 if Pleroma extensions are detected 2024-09-05 01:08:19 +02:00
Stefano Pigozzi 35ef1b58cf
Accept any file if supportedMediaTypes is undefined 2024-09-05 01:05:29 +02:00
Stefano Pigozzi bf693ab979
Show error if attachment is rejected for having invalid mime type 2024-09-05 00:53:08 +02:00
Lim Chee Aun 74c6bf66a9 Upgrade dependencies 2024-09-04 18:49:20 +08:00
Lim Chee Aun ba6738e1f5 Use PHANPY_WEBSITE as redirect_uri 2024-09-04 17:52:53 +08:00
Lim Chee Aun b8bece4ba8 Try exclude i18n PRs from release notes 2024-09-03 10:35:22 +08:00
Lim Chee Aun 9905547d5d Change the author for PR merge
I'm not the one merging these PRs.
2024-09-03 10:29:52 +08:00
Chee Aun af079003dd
i18n updates (eo-UY)
* New translations (Esperanto)

* Update catalogs.json

* New translations (Esperanto)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-09-02 19:27:44 +00:00
Chee Aun 9c16177521
i18n updates (pt-BR) 2024-09-02 16:36:07 +00:00
Chee Aun b794590d1f
i18n updates (fa-IR,pt-BR)
* New translations (Portuguese, Brazilian)

* New translations (Persian)

* New translations (Portuguese, Brazilian)
2024-09-02 15:26:52 +00:00
Lim Chee Aun 925319b8bb Fix Threads url regex 2024-09-02 21:01:43 +08:00
Chee Aun bcdb288da5
i18n updates (pt-BR)
* New translations (Portuguese, Brazilian)

* Update catalogs.json

* New translations (Portuguese, Brazilian)

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-09-02 11:39:13 +00:00
Lim Chee Aun 8806c7ea50 Show list of i18n volunteers in readme 2024-09-02 18:57:07 +08:00
Chee Aun 2a2155bf8e
i18n updates (fa-IR,kab,pt-BR)
* New translations (Persian)

* New translations (Portuguese, Brazilian)

* New translations (Kabyle)
2024-09-02 07:57:04 +00:00
Lim Chee Aun 169e75fabf Maybe better merge subject
And hopefully don't delete branch
2024-09-02 14:00:33 +08:00
Chee Aun d44e12e91c
New Crowdin updates (#727)
* New translations (Spanish)

* New translations (Portuguese)

* New translations (Persian)

* New translations (Portuguese, Brazilian)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-09-01 21:02:49 +00:00
Chee Aun 14d19f3900
New Crowdin updates (#726)
* New translations (Persian)

* New translations (Esperanto)

* Update catalogs.json

* New translations (Spanish)

* New translations (Portuguese, Brazilian)

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-09-01 19:54:10 +00:00
Chee Aun 838dbc22a3
New Crowdin updates (#725)
* New translations (Esperanto)

* New translations (Ukrainian)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-09-01 17:35:55 +00:00
Chee Aun 9b21e25b9f
New Crowdin updates (#724)
* New translations (Portuguese)

* New translations (Portuguese, Brazilian)

* New translations (Ukrainian)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-09-01 16:33:38 +00:00
Chee Aun ddc9feba39
New Crowdin updates (#723)
* New translations (Ukrainian)

* New translations (Portuguese)

* New translations (Portuguese, Brazilian)

* New translations (Ukrainian)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-09-01 15:33:55 +00:00
Chee Aun 52f0d83153
New Crowdin updates (#722)
* New translations (Korean)

* New translations (Chinese Traditional)

* New translations (Ukrainian)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-09-01 12:50:06 +00:00
Chee Aun 2262e91fd3
New Crowdin updates (#718)
* New translations (Korean)

* New translations (Chinese Simplified)

* Update catalogs.json

* New translations (Korean)

* New translations (Catalan)

* New translations (Portuguese)

* New translations (Portuguese, Brazilian)

* New translations (Portuguese)

* New translations (Portuguese, Brazilian)

* New translations (Finnish)

* New translations (Korean)

* New translations (Portuguese)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-09-01 11:51:03 +00:00
Chee Aun f9e95a947f
New Crowdin updates (#717)
* New translations (French)

* New translations (Portuguese)

* New translations (Portuguese, Brazilian)

* Update catalogs.json

* New translations (Korean)

* New translations (Chinese Simplified)

* New translations (Ukrainian)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-09-01 01:07:08 +00:00
Chee Aun 7dcf79e4ee
New Crowdin updates (#716)
* New translations (Portuguese, Brazilian)

* New translations (Hebrew)

* New translations (Portuguese)

* New translations (Esperanto)

* New translations (Portuguese, Brazilian)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-08-31 22:48:43 +00:00
Chee Aun f490317308
New Crowdin updates (#715)
* New translations (Galician)

* New translations (Russian)

* Update catalogs.json

* New translations (Spanish)

* New translations (Catalan)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-08-31 19:00:49 +00:00
Chee Aun 7c0bfb70a2
New Crowdin updates (#714)
* New translations (Basque)

* New translations (Portuguese)

* New translations (Lithuanian)

* New translations (Portuguese, Brazilian)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-08-31 16:30:16 +00:00
Lim Chee Aun 32df452e13 Fix top menu paddings 2024-08-31 23:43:48 +08:00
Chee Aun 00cffb5773
New Crowdin updates (#713)
* New translations (French)

* New translations (Spanish)

* New translations (Arabic)

* New translations (Catalan)

* New translations (German)

* New translations (Basque)

* New translations (Finnish)

* New translations (Italian)

* New translations (Japanese)

* New translations (Korean)

* New translations (Dutch)

* New translations (Chinese Simplified)

* New translations (Chinese Traditional)

* New translations (Galician)

* New translations (Occitan)

* New translations (Kabyle)

* New translations (Hebrew)

* New translations (Portuguese)

* New translations (Persian)

* New translations (Esperanto)

* New translations (Czech)

* New translations (Lithuanian)

* New translations (Russian)

* New translations (Thai)

* New translations (Polish)

* New translations (Portuguese, Brazilian)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-08-31 15:34:36 +00:00
Lim Chee Aun 9fd17ad5e6 Check code_challenge_methods_supported too 2024-08-31 23:10:38 +08:00
Lim Chee Aun 0e961e87a4 Fill in forgotten strings 2024-08-31 23:02:06 +08:00
Chee Aun 289010073a
New translations (Lithuanian) (#711) 2024-08-31 14:17:41 +00:00
Chee Aun a18e0cd7ed
New Crowdin updates (#710)
* New translations (French)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-08-31 13:09:19 +00:00
Lim Chee Aun be4ef56ce0 Update en 2024-08-31 20:13:23 +08:00
Lim Chee Aun bff32b2d68 Fix toDataURL is not a function 2024-08-31 20:13:23 +08:00
Lim Chee Aun 550d1beb13 Fix missing showToast 2024-08-31 20:13:23 +08:00
Chee Aun 4353a64b98
New translations (Spanish) (#709) 2024-08-31 12:08:29 +00:00
Lim Chee Aun ffab068cb2 Show region for pt-BR 2024-08-31 18:31:41 +08:00
Lim Chee Aun b013b436c1 Fix missing backgrounds for nav menu items 2024-08-31 17:59:34 +08:00
Chee Aun 7c067a2f82
New translations (Galician) (#708) 2024-08-31 07:40:25 +00:00
Lim Chee Aun e910ac0de6 Better contrast in dark mode 2024-08-31 13:47:57 +08:00
Lim Chee Aun c6beb793f3 Upgrade Valtio, things might break 2024-08-31 09:54:13 +08:00
Lim Chee Aun 34b49f40f5 Upgrade vite-plugin-pwa 2024-08-31 09:54:13 +08:00
Chee Aun 32475dccf1
New Crowdin updates (#707)
* New translations (Portuguese)

* New translations (Portuguese, Brazilian)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-08-31 00:57:11 +00:00
Chee Aun 471534f829
New Crowdin updates (#706)
* New translations (Portuguese)

* New translations (Portuguese, Brazilian)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-08-30 23:10:11 +00:00
Chee Aun 6faf3808a2
New Crowdin updates (#705)
* New translations (Portuguese, Brazilian)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-08-30 22:03:21 +00:00
Chee Aun b4755f4d18
New Crowdin updates (#704)
* New translations (Russian)

* New translations (Portuguese, Brazilian)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-08-30 16:41:03 +00:00
Chee Aun 8dcb8f78d6
New Crowdin updates (#703)
* New translations (Portuguese, Brazilian)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-08-30 15:40:04 +00:00
Chee Aun 231a97373b
New Crowdin updates (#702)
* New translations (Portuguese)

* New translations (Portuguese, Brazilian)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-08-30 09:51:23 +00:00
Lim Chee Aun c34ee3a7ff Fix filter badge text cropped off 2024-08-30 17:26:40 +08:00
Chee Aun c920030cd6
New translations (Korean) (#701) 2024-08-30 06:45:07 +00:00
Chee Aun c5553bcc2a
New Crowdin updates (#700)
* New translations (Portuguese)

* New translations (Portuguese, Brazilian)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-08-30 01:16:11 +00:00
Chee Aun 9cff1d09d6
New Crowdin updates (#699)
* New translations (Portuguese, Brazilian)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-08-29 23:55:31 +00:00
Chee Aun 5646853ab6
New Crowdin updates (#698)
* New translations (Italian)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-08-29 14:15:51 +00:00
Lim Chee Aun 534e090333 Subtle facelift for menus 2024-08-29 16:51:19 +08:00
Lim Chee Aun 7ff241187b Update en 2024-08-29 16:50:27 +08:00
Lim Chee Aun a75e816e6c Try handle Threads' link 2024-08-29 16:50:07 +08:00
Lim Chee Aun f3895d09e3 Fix radio inputs intercept arrow keys 2024-08-29 16:50:07 +08:00
Lim Chee Aun 41af07c440 Test show error toast if first load + no items 2024-08-29 16:50:07 +08:00
Lim Chee Aun 50a2fe1743 Trying out new hover style for top nav bar 2024-08-29 16:50:07 +08:00
Chee Aun 2e2ba243ca
New Crowdin updates (#697)
* New translations (Portuguese)

* New translations (Russian)

* New translations (Korean)

* Update catalogs.json

* New translations (Galician)

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-08-29 07:18:55 +00:00
Chee Aun a88aaac8f7
New Crowdin updates (#695)
* New translations (Kabyle)

* New translations (Basque)

* New translations (Polish)

* New translations (Spanish)

* New translations (Chinese Simplified)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-08-28 15:29:59 +00:00
Stefano Pigozzi 8f6d1da008
Add support for Pleroma instances 2024-08-28 13:17:46 +02:00
Chee Aun 3b0ca94ea4
New Crowdin updates (#694)
* New translations (Basque)

* Update catalogs.json

* New translations (Catalan)

* New translations (Portuguese)

* New translations (Finnish)

* New translations (Russian)

* New translations (Portuguese)

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-08-27 21:27:30 +00:00
Lim Chee Aun 6930ce9a7c Debounce page visibility to prevent streaming/polling noise 2024-08-28 00:20:44 +08:00
Chee Aun ef0d9cd810
New Crowdin updates (#693)
* New translations (Portuguese)

* New translations (French)

* New translations (Spanish)

* New translations (Arabic)

* New translations (Catalan)

* New translations (German)

* New translations (Basque)

* New translations (Finnish)

* New translations (Italian)

* New translations (Japanese)

* New translations (Korean)

* New translations (Dutch)

* New translations (Chinese Simplified)

* New translations (Chinese Traditional)

* New translations (Galician)

* New translations (Occitan)

* New translations (Kabyle)

* New translations (Hebrew)

* New translations (Portuguese)

* New translations (Persian)

* New translations (Esperanto)

* New translations (Czech)

* New translations (Lithuanian)

* New translations (Russian)

* New translations (Thai)

* New translations (Polish)
2024-08-27 06:17:10 +00:00
Lim Chee Aun 7c56b64e8a OAuth PKCE is in.
Reference PR: https://github.com/mastodon/mastodon/pull/31129
2024-08-27 13:50:03 +08:00
Lim Chee Aun 2e6074d794 Disable this for now 2024-08-27 13:47:21 +08:00
Lim Chee Aun 1d69a1da71 Get vapid key to instance config 2024-08-27 11:46:29 +08:00
Chee Aun 51e3341e82
New Crowdin updates (#692)
* New translations (Portuguese)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-08-26 22:37:41 +00:00
Chee Aun af29315664
New Crowdin updates (#691)
* New translations (Galician)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-08-26 20:33:31 +00:00
Chee Aun 2bf1130ede
New Crowdin updates (#690)
* New translations (Portuguese)

* Update catalogs.json

* New translations (Portuguese)

* Update catalogs.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-08-26 17:33:33 +00:00
Chee Aun df8c64f8a6
New Crowdin updates (#689)
* New translations (Spanish)

* New translations (Kabyle)

* New translations (Italian)
2024-08-26 15:21:55 +00:00
Chee Aun ef550fc109
New Crowdin updates (#688)
* New translations (Catalan)

* Update catalogs.json

* New translations (Korean)

* Update catalogs.json

* New translations (Polish)

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-08-26 11:22:17 +00:00
Lim Chee Aun 572d778b4b Try to "debounce" this automerge workflow 2024-08-26 09:56:56 +08:00
Chee Aun 1bc1e57348
New translations (Portuguese) (#687) 2024-08-25 20:25:47 +00:00
Chee Aun 3c10b790d2
New translations (Portuguese) (#686) 2024-08-25 19:11:25 +00:00
Chee Aun f7a97c6407
New Crowdin updates (#685)
* New translations (French)

* Update catalogs.json

* New translations (Spanish)

* New translations (Esperanto)

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-08-25 17:44:00 +00:00
Lim Chee Aun 1ea903efeb Make it fail silently 2024-08-25 23:33:22 +08:00
Chee Aun 8be26d97ac
New translations (Portuguese) (#684) 2024-08-25 15:24:51 +00:00
Lim Chee Aun 46f03c476a Try update catalogs workflow again 2024-08-25 23:18:28 +08:00
Chee Aun 7b22b32038
New Crowdin updates (#682)
* New translations (Basque)

* New translations (Portuguese)
2024-08-25 14:19:11 +00:00
Chee Aun 44b17c2981
New Crowdin updates (#681)
* New translations (Basque)

* New translations (Portuguese)
2024-08-25 11:18:06 +00:00
Lim Chee Aun 6263c01bd8 Update catalogs 2024-08-25 18:00:01 +08:00
Lim Chee Aun 6f7e761977 Update en 2024-08-25 17:59:38 +08:00
Lim Chee Aun fe5ec917da Use store 2024-08-25 17:59:38 +08:00
Lim Chee Aun c3eb33e230 Only show Switch menu items when more than 1 account 2024-08-25 17:59:38 +08:00
Chee Aun 75853cd8e4
New Crowdin updates (#680)
* New translations (Czech)

* New translations (Persian)

* New translations (Kabyle)

* New translations (Persian)
2024-08-25 09:41:47 +00:00
Lim Chee Aun 58ccdf84fa Try fix the menu width again 2024-08-25 16:39:57 +08:00
Lim Chee Aun e2eeffde63 Update catalogs 2024-08-25 16:35:45 +08:00
Lim Chee Aun 5d2f8ffddc Use secure same-site session cookie instead of sessionStorage 2024-08-25 16:35:07 +08:00
Chee Aun 0bbb631221
New translations (Portuguese) (#679) 2024-08-24 22:15:30 +00:00
Chee Aun 1e23b09252
New Crowdin updates (#678)
* New translations (Catalan)

* New translations (Portuguese)
2024-08-24 20:11:02 +00:00
Chee Aun 1b93325794
New Crowdin updates (#677)
* New translations (French)

* New translations (Portuguese)

* New translations (Russian)

* New translations (French)

* New translations (French)
2024-08-24 18:50:44 +00:00
Chee Aun 26bf5462d2
New Crowdin updates (#676)
* New translations (Kabyle)

* New translations (Finnish)

* New translations (Portuguese)
2024-08-24 15:21:05 +00:00
Chee Aun a29c17a9fb
New Crowdin updates (#675)
* New translations (French)

* New translations (Spanish)

* New translations (Arabic)

* New translations (Catalan)

* New translations (German)

* New translations (Basque)

* New translations (Finnish)

* New translations (Italian)

* New translations (Japanese)

* New translations (Korean)

* New translations (Dutch)

* New translations (Chinese Simplified)

* New translations (Chinese Traditional)

* New translations (Galician)

* New translations (Occitan)

* New translations (Kabyle)

* New translations (Hebrew)

* New translations (Portuguese)

* New translations (Persian)

* New translations (Esperanto)

* New translations (Czech)

* New translations (Lithuanian)

* New translations (Russian)

* New translations (Thai)

* New translations (Polish)
2024-08-24 10:26:00 +00:00
Lim Chee Aun f9f573a8cb Update catalogs 2024-08-24 18:22:49 +08:00
Lim Chee Aun bb75f42f1b Sort deterministically for less-noisy diffs 2024-08-24 18:22:29 +08:00
Lim Chee Aun 2fa40e810e Update en 2024-08-24 18:22:29 +08:00
Lim Chee Aun afa47da694 Check log-in state for Composer page 2024-08-24 18:22:29 +08:00
Lim Chee Aun 714fcb4b17 Add switch menus for Accounts
Increase awareness that users can open multiple tabs for different accounts
2024-08-24 18:22:29 +08:00
Lim Chee Aun ea53d8ad9d Attempt to make menus wider 2024-08-24 18:22:29 +08:00
Lim Chee Aun b2fa32d134 Generate alternate link tags for all languages 2024-08-24 18:22:29 +08:00
Lim Chee Aun 1bfe3f5034 Fix text flowed out of card 2024-08-24 18:22:29 +08:00
Chee Aun 8ac14d1ea6
New Crowdin updates (#673)
* New translations (Korean)

* New translations (Czech)
2024-08-24 08:51:33 +00:00
Chee Aun e2bf235f96
New Crowdin updates (#672)
* New translations (Finnish)

* New translations (Polish)

* New translations (French)

* New translations (Russian)

* New translations (Kabyle)

* New translations (Basque)

* New translations (Basque)

* New translations (Catalan)

* New translations (Korean)
2024-08-24 07:50:11 +00:00
Chee Aun 65281226c5
New Crowdin updates (#671)
* New translations (French)

* New translations (Spanish)

* New translations (Arabic)

* New translations (Catalan)

* New translations (German)

* New translations (Basque)

* New translations (Finnish)

* New translations (Italian)

* New translations (Japanese)

* New translations (Korean)

* New translations (Dutch)

* New translations (Chinese Simplified)

* New translations (Chinese Traditional)

* New translations (Galician)

* New translations (Occitan)

* New translations (Kabyle)

* New translations (Hebrew)

* New translations (Portuguese)

* New translations (Persian)

* New translations (Esperanto)

* New translations (Czech)

* New translations (Lithuanian)

* New translations (Russian)

* New translations (Thai)

* New translations (Polish)
2024-08-23 10:19:51 +00:00
Lim Chee Aun fcb2899084 Update catalogs 2024-08-23 18:00:22 +08:00
Lim Chee Aun 67bbbfb2f8 Update en.po 2024-08-23 18:00:15 +08:00
Lim Chee Aun 482d8c3f2e Better locale matching 2024-08-23 18:00:04 +08:00
Lim Chee Aun e5f674cf38 Add link to Crowdin 2024-08-23 17:59:45 +08:00
Lim Chee Aun 54d1fdcba2 Remove console.log 2024-08-23 17:59:03 +08:00
Chee Aun 6067602901
New Crowdin updates (#670)
* New translations (Russian)

* New translations (Catalan)

* New translations (Arabic)

* New translations (Arabic)

* New translations (Arabic)

* New translations (Arabic)

* New translations (Russian)
2024-08-23 09:10:54 +00:00
Chee Aun 9995503006
New Crowdin updates (#669)
* New translations (Lithuanian)

* New translations (Basque)

* New translations (Korean)

* New translations (Catalan)

* New translations (Finnish)
2024-08-22 17:03:51 +00:00
Chee Aun 93ccf47521
New translations (Italian) (#668) 2024-08-22 13:52:38 +00:00
Lim Chee Aun b5f6e60e93 Upgrade dependencies 2024-08-22 20:37:25 +08:00
Chee Aun 2ea2bf6c34
New Crowdin updates (#666)
* New translations (Catalan)

* New translations (Catalan)

* New translations (Russian)

* New translations (Russian)

* New translations (Russian)

* New translations (Spanish)
2024-08-22 20:37:02 +08:00
Lim Chee Aun 9b2c01fb02 Fix locale matching 2024-08-22 19:24:45 +08:00
Lim Chee Aun 36f0e7a0c5 Increase line height for menu items 2024-08-22 13:37:06 +08:00
Lim Chee Aun d54cb61872 Update catalogs 2024-08-22 09:27:35 +08:00
Chee Aun 8c1e1d94af
New Crowdin updates (#665)
* New translations (Russian)

* New translations (Kabyle)
2024-08-21 21:06:39 +00:00
Chee Aun 708738d71b
New Crowdin updates (#664)
* New translations (Arabic)

* New translations (Kabyle)

* New translations (Russian)
2024-08-21 18:35:17 +00:00
Chee Aun c7ad441781
New Crowdin updates (#663)
* New translations (Lithuanian)

* New translations (Russian)
2024-08-21 16:44:53 +00:00
Lim Chee Aun 25d73c4b46 Show all locales, <50% complete will be called devLocales
Dev locales show on dev or based on env var PHANPY_SHOW_DEV_LOCALES
2024-08-22 00:12:47 +08:00
Lim Chee Aun cea06f32fc Make sure nice-date-time also match the more local locale 2024-08-22 00:10:48 +08:00
Lim Chee Aun c54228627c Move this to run locally instead of Actions
Seems like it can't run based on PR closed by another workflow, which make sense.
2024-08-21 23:48:08 +08:00
Lim Chee Aun ca536723e9 Update catalogs 2024-08-21 23:47:02 +08:00
Chee Aun e0737568c4
New Crowdin updates (#662)
* New translations (Italian)

* New translations (Kabyle)

* New translations (Persian)

* New translations (Lithuanian)

* New translations (Russian)
2024-08-21 15:00:14 +00:00
github-actions[bot] ae47183ece Update catalogs.json 2024-08-21 14:58:46 +00:00
Chee Aun 0ec5afcd93
New Crowdin updates (#660)
* New translations (Catalan)

* New translations (Czech)

* New translations (French)

* New translations (Spanish)

* New translations (Arabic)

* New translations (Catalan)

* New translations (German)

* New translations (Basque)

* New translations (Finnish)

* New translations (Italian)

* New translations (Japanese)

* New translations (Korean)

* New translations (Dutch)

* New translations (Chinese Simplified)

* New translations (Chinese Traditional)

* New translations (Galician)

* New translations (Occitan)

* New translations (Kabyle)

* New translations (Hebrew)

* New translations (Portuguese)

* New translations (Persian)

* New translations (Esperanto)

* New translations (Czech)

* New translations (Lithuanian)

* New translations (Russian)

* New translations (Thai)

* New translations (Polish)

* New translations (Catalan)

* New translations (Basque)

* New translations (Korean)

* New translations (Kabyle)

* New translations (Korean)

* New translations (Kabyle)

* New translations (Russian)

* New translations (Kabyle)

* New translations (Czech)

* New translations (Finnish)

* New translations (Kabyle)

* New translations (Czech)

* New translations (Chinese Simplified)

* New translations (Kabyle)

* New translations (Czech)

* New translations (Kabyle)

* New translations (Russian)
2024-08-21 22:58:01 +08:00
Lim Chee Aun 241f7f841b lol this srsly doesn't run
The docs ain't easy to read here
2024-08-21 22:27:29 +08:00
Lim Chee Aun d9c12aa62b Try add sourceLocale 2024-08-21 17:33:42 +08:00
Lim Chee Aun 056e22aaf9 Split context for two "Post" strings 2024-08-21 14:37:34 +08:00
Lim Chee Aun 2b1fa6ada7 Limit this to l10n_main branch
Hopefully this works
2024-08-21 11:48:29 +08:00
Lim Chee Aun dbddd90304 Revert back to previous event setting 2024-08-21 11:28:02 +08:00
Chee Aun 2ec5bf07f6
New Crowdin updates (#659)
* New translations (Basque)

* New translations (Kabyle)

* New translations (Persian)

* New translations (Kabyle)
2024-08-20 22:38:22 +00:00
Chee Aun 32e1974e30
New Crowdin updates (#658)
* New translations (Kabyle)

* New translations (Polish)
2024-08-20 17:33:16 +00:00
Stefano Pigozzi 67cce5b9cc
Add italian translation 2024-08-20 19:03:20 +02:00
Stefano Pigozzi a2ce79a2a7
Update english localization file 2024-08-20 19:03:04 +02:00
Stefano Pigozzi 1e1d6e40bc
Add support for local instance posts
A new platform feature is defined, `@akkoma/local-only`, which is marked as present only if the string `akkoma` is found in the instance version string.

If this feature is supported, a new post visibility option is added to the post compose visibility selector, "Local instance", which sets the visibility to `"local"`.

The post viewer is also updated accordingly; while local-only posts could already be seen previously, they didn't have anything written in the `.extra-meta` section, and didn't display a visibility icon.

The `building` icon has been selected as the symbol for "Local instance" posts, as it's already used in the main menu to denote the Local timeline.
2024-08-20 19:00:10 +02:00
Chee Aun 4e5cb133d0
New Crowdin updates (#655)
* New translations (Catalan)

* New translations (Kabyle)

* New translations (Lithuanian)

* New translations (Czech)
2024-08-20 16:32:30 +00:00
Lim Chee Aun a246c89755 Why this ain't running 2024-08-20 23:55:42 +08:00
Lim Chee Aun f56943a90d Try exit silently 2024-08-20 23:55:42 +08:00
Lim Chee Aun 883e3237bf Try pull_request_target instead 2024-08-20 23:55:42 +08:00
Lim Chee Aun 79d4330d89 Set max width for the filter badge 2024-08-20 23:55:42 +08:00
Chee Aun ce50b7a08c
New Crowdin updates (#654)
* New translations (Catalan)

* New translations (Kabyle)

* New translations (Persian)

* New translations (Lithuanian)
2024-08-20 14:16:29 +00:00
Chee Aun 01d6bdaf6d
New Crowdin updates (#653)
* New translations (Czech)

* New translations (Lithuanian)

* New translations (Spanish)

* New translations (Chinese Simplified)

* New translations (Czech)

* New translations (Lithuanian)

* New translations (Catalan)

* New translations (Basque)

* New translations (Finnish)

* New translations (Kabyle)

* New translations (Lithuanian)
2024-08-20 13:14:11 +00:00
Lim Chee Aun 0dbc76c40a Fix my dumb code 2024-08-20 20:34:42 +08:00
Lim Chee Aun bcf8a9c6c7 Remove cancel-in-progress, it's too noisy 2024-08-20 20:18:32 +08:00
Lim Chee Aun 3b15768538 Handle kab-KAB → kab rename 2024-08-20 20:18:16 +08:00
Lim Chee Aun 0e539ba2cb Require additional info if report account 2024-08-20 20:17:43 +08:00
Lim Chee Aun 3902db5c0b Handle kab issue temporarily 2024-08-20 20:08:09 +08:00
Lim Chee Aun 2db909d7af Try/catch all intl stuff 2024-08-20 20:08:09 +08:00
Chee Aun 5bf81b2269
New translations (Kabyle) (#652) 2024-08-20 09:41:59 +00:00
Chee Aun 0404c6edf6
New translations (Kabyle) (#651) 2024-08-20 09:23:58 +00:00
Chee Aun a4347e9939
New Crowdin updates (#650)
* New translations (Kabyle)

* New translations (Kabyle)
2024-08-20 08:26:39 +00:00
Chee Aun 7c8c0ceab2
New Crowdin updates (#649)
* New translations (French)

* New translations (Spanish)

* New translations (Arabic)

* New translations (Catalan)

* New translations (German)

* New translations (Basque)

* New translations (Finnish)

* New translations (Italian)

* New translations (Japanese)

* New translations (Korean)

* New translations (Dutch)

* New translations (Chinese Simplified)

* New translations (Chinese Traditional)

* New translations (Galician)

* New translations (Occitan)

* New translations (Kabyle)

* New translations (Hebrew)

* New translations (Portuguese)

* New translations (Persian)

* New translations (Esperanto)

* New translations (Czech)

* New translations (Lithuanian)

* New translations (Russian)

* New translations (Thai)
2024-08-20 05:45:44 +00:00
Lim Chee Aun fd7c9248bd Make workflow run more specifically 2024-08-20 13:43:31 +08:00
github-actions[bot] b5fe61a2fe Update catalogs.json 2024-08-20 05:40:42 +00:00
Chee Aun e612fc1083
New translations (Finnish) (#648) 2024-08-20 13:40:18 +08:00
Lim Chee Aun 0bc7b6202b Revise the sentence to be clearer 2024-08-20 12:53:13 +08:00
Lim Chee Aun cc8dbeb32c Try these again 2024-08-20 11:01:27 +08:00
Chee Aun b9a56c4764
New Crowdin updates (#647)
* New translations (Catalan)

* New translations (Catalan)

* New translations (Finnish)
2024-08-20 01:40:12 +00:00
Lim Chee Aun 98febe551d Try fix workflow event not working 2024-08-20 09:21:23 +08:00
Chee Aun 09637823e2
New Crowdin updates (#646)
* New translations (Czech)

* New translations (French)

* New translations (Kabyle)

* New translations (Spanish)

* New translations (Kabyle)
2024-08-19 22:15:23 +00:00
Chee Aun ff06b9281d
New Crowdin updates (#645)
* New translations (French)

* New translations (Kabyle)

* New translations (Czech)
2024-08-19 17:15:51 +00:00
Chee Aun a583332bed
New Crowdin updates (#644)
* New translations (Spanish)

* New translations (Catalan)

* New translations (Kabyle)

* New translations (Persian)
2024-08-19 16:04:24 +00:00
Lim Chee Aun 42788267d8 Probably need this event to trigger 2024-08-19 22:53:00 +08:00
github-actions[bot] 38933306a8 Update catalogs.json 2024-08-19 14:49:12 +00:00
Chee Aun f3f18e7305
New Crowdin updates (#643)
* New translations (Spanish)

* New translations (Kabyle)

* New translations (Persian)

* New translations (Czech)
2024-08-19 14:41:18 +00:00
Lim Chee Aun 876480f87e Split the workflows
Too many commands are hard to debug
2024-08-19 22:39:18 +08:00
Lim Chee Aun f291d33ab0 Fix push error hopefully 2024-08-19 20:43:20 +08:00
Lim Chee Aun 8a2150d854 All handles need bidi isolate 2024-08-19 19:06:24 +08:00
Lim Chee Aun 6fe922d1cf Revert "Fix PHANPY_DEFAULT_LANG not working"
This reverts commit b286511f44.
2024-08-19 18:57:25 +08:00
Lim Chee Aun 6f8ed8411b This needs identity 2024-08-19 18:00:13 +08:00
Lim Chee Aun e736617a19 Fix bidi for handle in header 2024-08-19 17:21:03 +08:00
Lim Chee Aun 666d9b7ca6 This needs node 2024-08-19 16:09:24 +08:00
Lim Chee Aun 86bfde01e8 Less noisy action 2024-08-19 14:47:31 +08:00
Lim Chee Aun 6e59faada4 Test update catalogs.json while auto-merging i18n PRs 2024-08-19 10:53:21 +08:00
Lim Chee Aun 8c02d336be Auto-generate list of catalogs from PO files
Then auto-list them based on percentage threshold
2024-08-19 10:52:56 +08:00
Lim Chee Aun b286511f44 Fix PHANPY_DEFAULT_LANG not working
It needs to be used before navigator.language
2024-08-19 10:19:52 +08:00
Chee Aun 96e4a3dc7a
New translations (Catalan) (#641) 2024-08-19 01:01:29 +00:00
Chee Aun a12006b4df
New Crowdin updates (#640)
* New translations (Catalan)

* New translations (Catalan)
2024-08-18 23:47:29 +00:00
Chee Aun 7cc44e550f
New Crowdin updates (#639)
* New translations (Finnish)

* New translations (Catalan)
2024-08-18 21:30:22 +00:00
Chee Aun a4cc0fb76d
New Crowdin updates (#638)
* New translations (French)

* New translations (Finnish)

* New translations (Italian)

* New translations (Russian)
2024-08-18 18:57:34 +00:00
Chee Aun 031d021f5d
New Crowdin updates (#636)
* New translations (Finnish)

* New translations (Thai)
2024-08-18 17:41:27 +00:00
Chee Aun 82bb7e1081
New Crowdin updates (#635)
* New translations (French)

* New translations (Finnish)

* New translations (Persian)
2024-08-18 16:43:12 +00:00
Lim Chee Aun 6aed6373d6 Prevent concurrent runs 2024-08-19 00:05:47 +08:00
Lim Chee Aun ab54e985ff Change to 50 2024-08-19 00:05:47 +08:00
Chee Aun f83b97bbae
New Crowdin updates (#634)
* New translations (French)

* New translations (Persian)

* New translations (Esperanto)
2024-08-18 15:27:40 +00:00
Chee Aun 1cb8fdb969
New Crowdin updates (#633)
* New translations (French)

* New translations (Spanish)

* New translations (Basque)

* New translations (Persian)

* New translations (Esperanto)
2024-08-18 14:19:15 +00:00
Chee Aun ebf400b91b
New Crowdin updates (#632)
* New translations (French)

* New translations (Catalan)

* New translations (Basque)

* New translations (Czech)

* New translations (French)

* New translations (Spanish)
2024-08-18 12:31:57 +00:00
Lim Chee Aun cf623d428b Try again 2024-08-18 19:55:23 +08:00
Lim Chee Aun 773aa9d9fa Oops, need to handle more cases and debug 2024-08-18 18:25:14 +08:00
Chee Aun d09eb1322e
New Crowdin updates (#631)
* New translations (Korean)

* New translations (Czech)

* New translations (Galician)

* New translations (Czech)

* New translations (Lithuanian)

* New translations (French)

* New translations (Galician)

* New translations (Lithuanian)

* New translations (French)

* New translations (Galician)

* New translations (Lithuanian)

* New translations (Italian)

* New translations (Lithuanian)

* New translations (French)

* New translations (Catalan)

* New translations (Basque)

* New translations (Korean)

* New translations (Czech)
2024-08-18 10:17:42 +00:00
Lim Chee Aun d8e634273f Allow manual dispatch 2024-08-18 17:49:28 +08:00
Lim Chee Aun 320746144a Test i18n PR automation 2024-08-18 17:40:24 +08:00
Lim Chee Aun 480e1aa733 Should use localeCompare 2024-08-18 12:46:45 +08:00
Lim Chee Aun 0f41d46c52 Add new languages: Catalan, French, Korean 2024-08-18 11:11:36 +08:00
Lim Chee Aun 1fde4c6730 Less-noisy language selector with perhaps better sort 2024-08-18 11:11:03 +08:00
Lim Chee Aun 15e4012dd2 Fix carousel not scrolling 2024-08-18 11:06:58 +08:00
Lim Chee Aun 5e2d084854 Fix lang selector not centered on Welcome page 2024-08-18 11:06:58 +08:00
Chee Aun 96cab91911
New Crowdin updates (#630)
* New translations (Czech)

* New translations (Czech)

* New translations (Czech)

* New translations (Korean)

* New translations (Czech)

* New translations (French)

* New translations (Basque)

* New translations (Czech)

* New translations (French)

* New translations (Catalan)

* New translations (Basque)

* New translations (Chinese Simplified)

* New translations (Czech)

* New translations (Russian)

* New translations (French)

* New translations (Catalan)

* New translations (German)

* New translations (Russian)

* New translations (French)

* New translations (Catalan)

* New translations (French)

* New translations (Catalan)

* New translations (Persian)

* New translations (Czech)

* New translations (Catalan)

* New translations (Czech)

* New translations (French)

* New translations (Catalan)

* New translations (French)

* New translations (Spanish)

* New translations (Catalan)

* New translations (Catalan)

* New translations (Catalan)

* New translations (Catalan)
2024-08-18 11:05:19 +08:00
Lim Chee Aun 88c14e9ccb Fix nav menu messed up in German 2024-08-17 17:30:15 +08:00
Lim Chee Aun d38e3e7569 Update instances list 2024-08-17 13:04:12 +08:00
Lim Chee Aun 568c4a2f8b fetch-instances doesn't need .env.local 2024-08-17 13:04:01 +08:00
Lim Chee Aun 139bcfee43 Only extract en
This assumes that all other locales will never be the source
2024-08-17 12:55:07 +08:00
Lim Chee Aun 70aef6879a Prevent language select from breaking in Settings 2024-08-17 12:52:18 +08:00
Lim Chee Aun dd772c10bf Handle the list here 2024-08-17 11:48:09 +08:00
Chee Aun 8bd56489e9
Merge pull request #628 from cheeaun/l10n_main
New Crowdin updates
2024-08-17 11:46:49 +08:00
Chee Aun fbfe321860 New translations (Thai) 2024-08-17 11:31:59 +08:00
Chee Aun 720603bd31 New translations (Russian) 2024-08-17 11:31:58 +08:00
Chee Aun fdc303f9cf New translations (Lithuanian) 2024-08-17 11:31:57 +08:00
Chee Aun 81e956ac5d New translations (Czech) 2024-08-17 11:31:56 +08:00
Chee Aun ab1babf688 New translations (Esperanto) 2024-08-17 11:31:55 +08:00
Chee Aun 6b9a9e73b5 New translations (Persian) 2024-08-17 11:31:53 +08:00
Chee Aun 72d90171e9 New translations (Portuguese) 2024-08-17 11:31:52 +08:00
Chee Aun 915c8f56c4 New translations (Hebrew) 2024-08-17 11:31:51 +08:00
Chee Aun 3236aac117 New translations (Kabyle) 2024-08-17 11:31:50 +08:00
Chee Aun eff438129e New translations (Occitan) 2024-08-17 11:31:49 +08:00
Chee Aun 8919aee046 New translations (Galician) 2024-08-17 11:31:48 +08:00
Chee Aun ea12b8f1f4 New translations (Chinese Traditional) 2024-08-17 11:31:47 +08:00
Chee Aun 760588c91c New translations (Dutch) 2024-08-17 11:31:46 +08:00
Chee Aun a7f2cd52e6 New translations (Korean) 2024-08-17 11:31:44 +08:00
Chee Aun f05fc55a88 New translations (Japanese) 2024-08-17 11:31:43 +08:00
Chee Aun 4e9a0d6de8 New translations (Italian) 2024-08-17 11:31:42 +08:00
Chee Aun 913e9cea6a New translations (Finnish) 2024-08-17 11:31:41 +08:00
Chee Aun dfa6c2ee18 New translations (Basque) 2024-08-17 11:31:40 +08:00
Chee Aun c19e423605 New translations (German) 2024-08-17 11:31:39 +08:00
Chee Aun a1885d15a7 New translations (Catalan) 2024-08-17 11:31:38 +08:00
Chee Aun 8da8c55248 New translations (Arabic) 2024-08-17 11:31:37 +08:00
Chee Aun ebcd7d119e New translations (French) 2024-08-17 11:31:35 +08:00
Lim Chee Aun 57f245d018 Remove export_languages
Better handle the list from the code instead of the PR
2024-08-17 11:29:28 +08:00
Lim Chee Aun 07c4be545d Add another language
Somehow the i18n PR is not updating, weird
2024-08-17 09:34:52 +08:00
Chee Aun eb24b9af72 New translations (Spanish) 2024-08-17 02:01:55 +08:00
Chee Aun 0c92774741 New translations (Chinese Simplified) 2024-08-17 00:00:52 +08:00
Chee Aun 38c00ef15f New translations (Chinese Simplified) 2024-08-16 20:04:36 +08:00
Chee Aun 6b27fe6db7 New translations (Spanish) 2024-08-16 20:04:35 +08:00
Lim Chee Aun 9d5953075e Let in the first 5 most-translated languages for testing 2024-08-16 19:27:25 +08:00
Lim Chee Aun 18b3ee8c92 Standardize display of common + native languages list 2024-08-16 19:17:57 +08:00
Lim Chee Aun 6d68232e45 Make lang selector fixed-width 2024-08-16 19:17:18 +08:00
Chee Aun c96ff42597 New translations (Chinese Simplified) 2024-08-16 17:22:46 +08:00
Chee Aun baed9ddc02 New translations (Chinese Simplified) 2024-08-16 16:22:17 +08:00
Lim Chee Aun 8ec951d1fc These menus need spans 2024-08-16 13:46:17 +08:00
Chee Aun 0d990b6191 New translations (Chinese Simplified) 2024-08-16 12:56:34 +08:00
Lim Chee Aun 05f488ce40 Replace npm-run-all2 with vite-plugin-run
- Upgrade dependencies
- remove dayjs
2024-08-16 11:25:59 +08:00
Lim Chee Aun c914cf58aa Don't even need dayjs anymore 2024-08-16 11:16:19 +08:00
Lim Chee Aun 6c0f0a4127 More fallbacks for Intl.DisplayNames 2024-08-16 11:14:16 +08:00
Lim Chee Aun bdb1dff278 Fix this unneeded Plural 2024-08-16 11:12:00 +08:00
Lim Chee Aun 89a2e7de43 Fix wrong feature detection for trending link posts
Ooops!
2024-08-15 17:34:54 +08:00
Lim Chee Aun b351060fa7 Make lang selector smaller 2024-08-15 17:34:24 +08:00
Chee Aun 503d0a9867 New translations (Chinese Simplified) 2024-08-15 16:44:04 +08:00
Lim Chee Aun 1a3751ff16 Forgot to set lang attr on html 2024-08-15 15:33:15 +08:00
Lim Chee Aun acba051ca2 Another attempt for Crowdin 2024-08-15 15:26:49 +08:00
Lim Chee Aun ad0cb12e83 Try this crowdin setting to skip untranslated files/strings 2024-08-15 13:50:30 +08:00
Lim Chee Aun 377ad11c1a Fix relative time ago exceeding 24 hours 2024-08-15 09:09:57 +08:00
Lim Chee Aun ac94303d0c Fix horizontal menu control group placement bug
react-menu changed it to role="none"
2024-08-14 22:22:43 +08:00
Lim Chee Aun f9b676856e Prevent text blocks from wrapping 2024-08-14 22:03:53 +08:00
Lim Chee Aun b16907dc24 Forgot to localise these keyboard shortcuts 2024-08-14 21:58:22 +08:00
Lim Chee Aun 6cc96b8a71 Default to extract + clean + watch
Without clean, the code diff is really ugly and hard to track
2024-08-14 20:15:02 +08:00
Lim Chee Aun 59f8f44776 Use v2 notifications policy API and new UI
Reference: https://github.com/mastodon/mastodon/pull/31342

Very MVP, not a lot of explanations. Maybe revisit later.
2024-08-14 20:12:39 +08:00
Lim Chee Aun b1a8f1aa8f Build locales into separate folder 2024-08-14 17:17:34 +08:00
Lim Chee Aun f359d36e9b Sync the list of locales between config & app code 2024-08-14 17:16:56 +08:00
Lim Chee Aun fcb85d1172 lol %locale% doesn't work for this 2024-08-14 15:40:52 +08:00
Lim Chee Aun 6d15dfbf8f Upgrade dependencies
Dangerous move, but oh well.
2024-08-14 15:03:45 +08:00
Lim Chee Aun e5815686a9 Add try/catch fallback if file fails to load
Could be the file is not there or something wrong with the connection. Still good to include this try/catch
2024-08-14 15:02:45 +08:00
Lim Chee Aun d9bc18f557 Oops, accidentally add this locale when it's not ready yet 2024-08-14 15:00:15 +08:00
Lim Chee Aun 3048bd1eea Switch the common/native text
Prevents the lang selector from being jumpy
2024-08-14 11:48:14 +08:00
Lim Chee Aun 868e613089 Use msg here because the memo'ed Home doesn't re-render
And see the line numbers change again in translation files
2024-08-14 11:47:45 +08:00
Lim Chee Aun 921943245f Try limit export language
Not everything is fully translated yet, so it's weird to see all of them in PR
2024-08-14 11:46:12 +08:00
Lim Chee Aun d1887afed8 The lines have changed
Hmm, this diff change is kinda noisy but useful to jump straight to the line
2024-08-14 10:48:37 +08:00
Lim Chee Aun 30a2a6a968 Add Crowdin PR label and custom commit message 2024-08-14 09:42:45 +08:00
Lim Chee Aun 2ab921d6db Load `en` by default, activate it later 2024-08-14 09:42:12 +08:00
Lim Chee Aun b28fdcb0fa Fix wrong passing of locale values in Intl.DisplayNames 2024-08-14 09:41:31 +08:00
Lim Chee Aun c31162220e Seems like 'es' is not needed now, weird 2024-08-14 09:41:07 +08:00
Lim Chee Aun 2c050c650b Fix wrong pluralization usage
Instead of one, should use _1 because string for "one" has to be shown regardless of plural forms

When 1, "{account} followed you" must show instead of "1 people followed you".
Some languages don't have plural rule for "one" so it might not show up. _1 forces it to show.
2024-08-14 09:40:39 +08:00
Lim Chee Aun 4918027c90 Use real ellipsis
And see if these strings can sync up
2024-08-13 18:17:00 +08:00
Chee Aun e58f592470 Update Crowdin configuration file 2024-08-13 15:50:32 +08:00
Lim Chee Aun c2e6d732c4 Initial i18n dev
Expecting bugs!
2024-08-13 15:26:23 +08:00
Lim Chee Aun 3f23fe6eb6 New post languages 2024-08-10 10:04:44 +08:00
Lim Chee Aun c27275a9af Disable columns scroll snap for wider viewports 2024-08-10 10:04:44 +08:00
Lim Chee Aun ff29e93b4f Fix RTL observer not working 2024-08-10 10:04:44 +08:00
Lim Chee Aun 78ca5bbc0b Fix prefs bug
- Some prefs returned can be uppercased, so make them lowercase
- `postingDefaultLanguage` probably doesn't work anymore every since masto.js upgrade. Sorry!
- Add additional checks to make sure prefs from server are not in unexpected forms
2024-08-10 10:04:44 +08:00
Lim Chee Aun 3be53f1ff9 Also set sort order when filter by Boosts in Catch-up 2024-08-10 10:04:44 +08:00
Chee Aun 9bf50615cb
Merge pull request #615 from verymilan/phanpy.social.tchncs.de
add phanpy.social.tchncs.de deployment to readme
2024-08-07 09:51:17 +08:00
Chee Aun dfa1123ac3
Merge pull request #616 from Fastidious/patch-2
Update README.md
2024-08-07 09:50:39 +08:00
Fastidious a0f2eb7305
Update README.md
Moved servers. This updates to the new one.
2024-08-06 10:47:13 -04:00
Milan 1bd9ceb4fc
add phanpy.social.tchncs.de deployment to readme 2024-08-06 12:39:12 +02:00
Chee Aun 082409a09f
Merge pull request #613 from illfygli/main
Filter out languages that aren't RFC5646-shaped
2024-08-06 08:58:16 +08:00
owl 225eaf4a2d
Pass `undefined` to `Intl.DisplayNames`, so `'*'` doesn't break it 2024-08-05 14:14:03 +02:00
Lim Chee Aun 60289cdb29 Upgrade dependencies 2024-08-04 19:09:46 +08:00
Lim Chee Aun a1c419b675 Try fix select field bug on Windows again
Previously: b47c043699
2024-08-04 19:01:21 +08:00
Lim Chee Aun 89e8bdf77b Use pinned instead of _pinned 2024-08-04 18:06:26 +08:00
Lim Chee Aun b3681a93ee Workbox expiration plugin not working as expected 2024-08-04 18:05:03 +08:00
Lim Chee Aun ad7193d067 Fix notifications popover not close-able on iPad 2024-08-04 13:53:06 +08:00
Lim Chee Aun f05e3012e3 Preliminary step for RTL 2024-08-04 13:32:46 +08:00
Lim Chee Aun 2aff1dc1fd Try switch to 20s interval 2024-08-04 13:32:46 +08:00
Lim Chee Aun 99ee6c3979 Don't reuse var for both timeout and interval 2024-08-04 13:32:46 +08:00
Lim Chee Aun 4ebfb544aa This caching seems still buggy
Revert to SWR with 1-min expiry
2024-08-04 13:32:46 +08:00
Lim Chee Aun cf2461add5 Better checks 2024-08-04 13:32:46 +08:00
Chee Aun 4937c5f77e
Merge pull request #610 from fhemberger/patch-1
fix(shortcuts-settings): `settingsJSON` must be defined if note doesn't exist
2024-08-04 10:11:42 +08:00
Frederic Hemberger 0febcacb93
fix(shortcuts-settings): `settingsJSON` must be defined if note doesn't exist 2024-08-03 13:30:22 +02:00
Lim Chee Aun 818f58b460 Fix profile URLs not working for http route 2024-08-01 20:18:44 +08:00
Lim Chee Aun 57db8778a4 Adapt to new changes in group notifications API
Reference: https://github.com/mastodon/mastodon/pull/31214
2024-08-01 20:18:10 +08:00
Chee Aun 9806d8ae9d
Merge pull request #607 from kizu/fix-overflow
Fix overflow for the columns wrapper
2024-08-01 09:56:05 +08:00
Roman Komarov 522a324b0d
Fix overflow for the columns wrapper 2024-07-31 13:59:35 +02:00
Lim Chee Aun 5be30e0c80 Upgrade dependencies 2024-07-29 20:05:03 +08:00
Lim Chee Aun 379ef7cc11 Random unused IntersectionView
Keeping this for future use
2024-07-28 16:09:44 +08:00
Lim Chee Aun 2d23b15c8d Assume title is the author for .card-post 2024-07-28 16:09:03 +08:00
Lim Chee Aun fa3a0e23cc Unhide some text for posts inside Edit History
Every char matters when looking at post edit history
2024-07-28 16:08:18 +08:00
Lim Chee Aun 631730f2f2 Replace SWR with CacheFirst
This SWR strategy is sometimes too stale, possibly a bug with Workbox
2024-07-28 16:07:22 +08:00
Lim Chee Aun f1822d54af Fix poll radio button position on Safari
Plus a color
2024-07-25 18:39:14 +08:00
Lim Chee Aun 4c0bc62ad0 Group filtered carousel items 2024-07-22 14:31:52 +08:00
Lim Chee Aun 84b3106f50 Undo font size inherit for card posts 2024-07-22 14:19:25 +08:00
Lim Chee Aun a2b88f1cdd Distinct both implementation of grouped notifications 2024-07-21 20:31:10 +08:00
Lim Chee Aun b88376569e Test this out for bridgy fed links 2024-07-21 19:06:38 +08:00
Lim Chee Aun 00e2ba0b34 Fix notification markers not working
Also the ids are getting confusing, so need to clean this up.
2024-07-21 18:59:38 +08:00
Lim Chee Aun a0d75e7e83 Upgrade dependencies 2024-07-20 17:45:43 +08:00
Lim Chee Aun 4b2ec14dcd Try set default sort and group when choosing Boosts 2024-07-19 20:00:10 +08:00
Chee Aun 808c6262d8
Merge pull request #597 from graue/graue/copy-handle-with-instance
Include domain when copying local user's handle
2024-07-18 17:08:51 +08:00
Scott Feeney 44d440649f Include domain when copying local user's handle
Fixes #596
2024-07-13 01:15:01 -07:00
Lim Chee Aun a2f7638257 Experimental opt-in server-side grouped notifications 2024-07-12 18:57:48 +08:00
Lim Chee Aun 57d6889826 Test memoize Media 2024-07-12 13:35:43 +08:00
Lim Chee Aun 2a91c005a1 Test fix self-recursive quote posts 2024-07-12 13:34:57 +08:00
Lim Chee Aun 418895e1c3 Another attempt: upgrade dependencies 2024-07-08 17:40:16 +08:00
Lim Chee Aun 180a23f116 Fix wrong exceeded chars highlighting 2024-07-07 22:56:24 +08:00
Lim Chee Aun 9ea7a1f4db Use onClose for this 2024-07-06 09:47:42 +08:00
Lim Chee Aun f26dbeb79a Fix more cloaking business 2024-07-06 09:47:28 +08:00
Lim Chee Aun f0872e79fb Revert "Upgrade dependencies"
This reverts commit cb9848fe8c.
2024-07-05 18:56:52 +08:00
Lim Chee Aun a72400febf Test support Hollo 2024-07-05 16:19:04 +08:00
Lim Chee Aun cb9848fe8c Upgrade dependencies 2024-07-03 20:02:47 +08:00
Lim Chee Aun c950a6552c Experiment: unhide header when clicking on timeline items 2024-07-03 20:01:11 +08:00
Lim Chee Aun 95bf9e183e Replace trivago/ with ianvs/prettier-plugin-sort-imports 2024-07-01 17:41:21 +08:00
Lim Chee Aun e6e884f1cb Refactor + make card post work for no-image cards 2024-06-28 07:49:30 +08:00
Lim Chee Aun b6a25f5939 MVP-ish add/remove featured tags 2024-06-27 22:05:16 +08:00
Lim Chee Aun 71823fbad2 Fix typo 2024-06-27 22:05:16 +08:00
Lim Chee Aun 046d3d323a Enable unfurling when fetching reply hints 2024-06-27 22:05:16 +08:00
Lim Chee Aun f7024f7723 Only allow trending link posts for current instance, not remote instance
For this to work on remote instance, will need to fetch its version and check first
2024-06-27 22:05:16 +08:00
Lim Chee Aun 1b3938f3d2 Add bundle-visualizer 2024-06-27 22:05:16 +08:00
Lim Chee Aun 5ab0ea1b59 Remove usehooks dep
In the end, only used one hook out of so many hooks
2024-06-27 22:05:16 +08:00
Lim Chee Aun 09745e3078 Don't show account if notification = severed_relationships 2024-06-27 22:05:16 +08:00
Chee Aun 87be0cad16
Merge pull request #584 from coxde/patch-1
fix: enable/disable boosts button logic
2024-06-27 22:00:01 +08:00
COxDE 04588874c7
fix: enable/disable boosts button logic 2024-06-27 13:38:55 +01:00
Lim Chee Aun 5d6a43e5d2 Bump up to 600 2024-06-23 15:41:00 +08:00
Lim Chee Aun 7f5f01b118 Further extend quote post dimensions 2024-06-22 17:48:14 +08:00
Lim Chee Aun f4a4913889 Don't animate for small-dimension images 2024-06-22 17:47:56 +08:00
Lim Chee Aun 7fb4aad089 Upgrade vite 2024-06-22 12:42:43 +08:00
Lim Chee Aun f8e72d1808 Prevent miscalculated width in large media container 2024-06-22 12:42:23 +08:00
Lim Chee Aun 527a1551cf The math here is quite forgiving 2024-06-19 23:34:19 +08:00
Lim Chee Aun a6e6a7d741 Simplify natural aspect ratio math 2024-06-19 18:29:20 +08:00
Lim Chee Aun 21bdb6afc1 Posts timeline for trending links
Timeline logic changed slightly, so might be buggy.
2024-06-19 12:22:17 +08:00
Lim Chee Aun 4be88da1d6 Test slight fade out 2024-06-19 12:19:48 +08:00
Lim Chee Aun 93bb1da7c9 Fix undefined in account link when ctrl-clicking 2024-06-18 20:14:56 +08:00
Lim Chee Aun 497ede1a3d Use state to set natural aspect ratio instead
And fix all other data attributes
2024-06-15 10:25:10 +08:00
Lim Chee Aun 8a1fda5a85 Prevent flash of post page 2024-06-15 10:24:33 +08:00
Lim Chee Aun 83164c321f Apply anim-duration for card image too
And also media images in Catch-up
2024-06-15 08:36:12 +08:00
Lim Chee Aun 15ebf628f8 Give status cards same treatment as media attachments 2024-06-14 18:13:59 +08:00
Lim Chee Aun fbe540ca7f Upgrade dependencies 2024-06-14 08:36:23 +08:00
Lim Chee Aun 1f8a8f8928 Use URL.parse with polyfill 2024-06-14 08:34:50 +08:00
Lim Chee Aun febd04dd54 Try use dangerouslySetInnerHTML again
And… fix the loop attribute value
2024-06-11 23:43:55 +08:00
Lim Chee Aun 983dd6623f Try autoPlay instead of autoplay
Fixing Mobile Safari bug
2024-06-11 18:17:19 +08:00
Lim Chee Aun a79d0613ec One more experimental magic 2024-06-11 14:53:12 +08:00
Lim Chee Aun c0c7fdd6e1 Handle tiny images & fix layout
Honestly there's just too many possibilities
2024-06-11 14:46:29 +08:00
Lim Chee Aun 17a3939061 Use data attr instead
The JSX className modification classes with this DOM-based modification
2024-06-10 20:50:21 +08:00
Lim Chee Aun 8a10a81fec Experiment immersive media render on large-size post 2024-06-10 20:42:38 +08:00
Lim Chee Aun 17230fc690 Experiment reduce radius for uncropped images 2024-06-10 20:41:43 +08:00
Lim Chee Aun 88e36183c6 Experiment different card preview style 2024-06-10 20:40:35 +08:00
Lim Chee Aun d0bb0c04db Small style adjustments to composer 2024-06-10 20:39:03 +08:00
Lim Chee Aun 42d761e747 Chunk tinyld out 2024-06-10 20:38:41 +08:00
Lim Chee Aun 901725793b Try resolve threads' links if they work one day 2024-06-08 21:36:09 +08:00
Lim Chee Aun 3fbecb2f0d Fix NameText not showing username when short 2024-06-08 21:35:14 +08:00
Lim Chee Aun ef1abbc25c Wait I need a slash here? 2024-06-08 21:34:50 +08:00
Lim Chee Aun 2f75dfd9e4 Prefs need to be awaited 2024-06-07 18:41:04 +08:00
Lim Chee Aun 8d91bfb0a3 Throttle account fetches 2024-06-07 18:38:26 +08:00
Lim Chee Aun 04e1d60e54 Check vapidKey 2024-06-06 17:47:44 +08:00
Lim Chee Aun 1c01e1b0f4 Fix federated feed only showing remote posts
There's a mismatch parameter between Mastodon's and Pixelfed's APIs
2024-06-06 17:47:44 +08:00
Chee Aun dea3507053
Merge pull request #561 from zkreml/add-my-instance
Added phanpy.cz to self-hosted instances
2024-06-05 09:02:29 +08:00
archos 9b35119f99 Added phanpy.cz to self-hosted instances 2024-06-04 20:04:04 +02:00
Chee Aun 6d7eddc568
Merge pull request #557 from kevquirk/patch-1
Added social.qrk.one to self-hosted instances
2024-06-03 22:37:31 +08:00
Kev Quirk dac2af4334
Added social.qrk.one to self-hosted instances 2024-06-03 14:54:09 +01:00
Lim Chee Aun 2099953b68 Remove spaces between buttons 2024-06-03 18:01:49 +08:00
Lim Chee Aun 5931ebb8fc Reduce visual clutter for grouped notification
30 instead of 50 as limit. No more tiny avatars as they don't help much.
2024-06-02 22:52:47 +08:00
Lim Chee Aun adcb87679b Upgrade dependencies
Try bump text-expander too as it might have fixed its bugs
2024-06-01 16:33:13 +08:00
Lim Chee Aun 5ead17a093 Disable GIF button if exceed max media limit or has poll 2024-06-01 11:51:58 +08:00
Lim Chee Aun 224cad4d7f Utilise the new batch fetch on Mastodon v4.3 2024-05-31 17:11:40 +08:00
Lim Chee Aun e08817d611 Attempt to rewrite this part 2024-05-31 16:56:13 +08:00
Lim Chee Aun 1ffc1c257a Use setTimeout instead 2024-05-29 18:46:42 +08:00
Lim Chee Aun 098014a109 Fix possible error 2024-05-29 18:46:14 +08:00
Lim Chee Aun 7546b42c7c Further improve lang detection perf 2024-05-29 15:26:58 +08:00
Lim Chee Aun f9a73777e7 Perf over function 2024-05-29 10:23:46 +08:00
Lim Chee Aun d5584f8dd4 Delay preload 2024-05-29 08:58:17 +08:00
Lim Chee Aun 563b06e680 Break the tasks 2024-05-28 22:22:14 +08:00
Lim Chee Aun b6a64b66c7 Fix wrong logic for highlighting Languages select 2024-05-28 21:03:05 +08:00
Lim Chee Aun 0a4aae51b7 It's time for MVP-ish language auto-detection 2024-05-28 17:59:17 +08:00
Lim Chee Aun d16221e296 Test fix Pixelfed home timeline not showing reblogs 2024-05-28 13:44:24 +08:00
Lim Chee Aun ed712d15f1 Test fix notification toast appearing after loaded 2024-05-28 13:44:02 +08:00
Lim Chee Aun bd8817e61b Show warning if exceed file size or matrix limit 2024-05-27 19:19:34 +08:00
Lim Chee Aun ef712c62a9 Add one more username ≈ display name logic 2024-05-27 19:02:19 +08:00
Lim Chee Aun 9aa2bac685 Try fix toast width again 2024-05-27 19:01:41 +08:00
Lim Chee Aun 34077e8467 Don't show 'More…' for hashtag autosuggest 2024-05-26 18:15:37 +08:00
Lim Chee Aun b473061845 Show compose button above post modal when minimized 2024-05-26 00:13:20 +08:00
Lim Chee Aun 64c7b5b4f0 Rewrite polyfill suspense for Composer with preload
Hopefully this works
2024-05-25 20:43:15 +08:00
Lim Chee Aun c11bbbb2b3 Handle modifiers when clicking on account links 2024-05-25 13:52:25 +08:00
Lim Chee Aun 2c1a6c8cb5 Restyle the composer controls UI 2024-05-25 13:39:11 +08:00
Lim Chee Aun 67a85e1eef Forgot Mobile Safari always need 16px for input fields 2024-05-25 13:16:22 +08:00
Lim Chee Aun 2e0ef6494b Extend at-mentions with dedicated UI 2024-05-25 11:06:58 +08:00
Lim Chee Aun 012b86d7ce Try not hide compose button if loading 2024-05-25 11:06:03 +08:00
Lim Chee Aun 0c45f515f0 Don't add space if empty string 2024-05-25 09:16:03 +08:00
Lim Chee Aun 9cc590be1b Extra check if the composer is publishing 2024-05-25 09:15:43 +08:00
Lim Chee Aun 7589ec8803 Downgrade text-expander
Possibly might fix autosuggest position bug on Mobile Safari
2024-05-25 09:15:13 +08:00
Lim Chee Aun cd17ca0b42 Experiment: allow minimize composer 2024-05-24 12:30:20 +08:00
Lim Chee Aun 8aab997900 Upgrade dependencies 2024-05-23 20:25:14 +08:00
Lim Chee Aun 96c44ed485 Fix composer not overwritten by restored composer window 2024-05-23 14:14:23 +08:00
Lim Chee Aun 7053fcc96a Experimental 'More…' for custom emojis suggestions
Also includes small fixes and improvements
2024-05-22 19:12:13 +08:00
Lim Chee Aun ad7cb46547 Experiment auto-expand spoiler in hero status 2024-05-19 18:46:27 +08:00
Lim Chee Aun 1b1af67064 Experiment non-English description generation 2024-05-19 16:27:59 +08:00
Lim Chee Aun bdd238de0e Test using inert to control text searchability 2024-05-19 16:26:15 +08:00
Lim Chee Aun ced4dc86aa Forgot passing blankCopy 2024-05-19 16:24:29 +08:00
Lim Chee Aun 7be1e589ab Support Pleroma's /notice unfurl 2024-05-19 16:23:12 +08:00
Lim Chee Aun 7da1745cca Respect expand spoiler setting in Catchup 2024-05-19 16:22:18 +08:00
Lim Chee Aun 025a5429cc Set limit to 80 for notifications 2024-05-17 18:32:12 +08:00
Lim Chee Aun 62f843b4dc Fix crash when media url doesn't have http prefix 2024-05-17 17:10:54 +08:00
Lim Chee Aun b0a53b7fa1 Handle hideCollections 2024-05-16 21:11:51 +08:00
Lim Chee Aun 9934daeb4d Handle filtered quote posts 2024-05-16 13:00:23 +08:00
Lim Chee Aun d4a0a080b5 Bump up max entries for icons 2024-05-15 19:38:28 +08:00
Lim Chee Aun bc4e3b0f72 Fix red too faint in dark mode 2024-05-14 23:39:48 +08:00
Lim Chee Aun ac760265da Fix post preview internals becoming clickable 2024-05-11 13:09:08 +08:00
Lim Chee Aun 98b0ccf032 Default to floor rounding mode 2024-05-10 12:11:57 +08:00
Lim Chee Aun 90f06c511a Test allow linking to post from generic accounts modal 2024-05-08 10:29:00 +08:00
Lim Chee Aun e7aad03279 Preliminary implementation of moderation_warning notifications 2024-05-08 10:28:34 +08:00
Lim Chee Aun 1c6b0aa0d7 Upgrade dependencies 2024-05-06 12:48:55 +08:00
Lim Chee Aun 3e1b9ff53d Apply filter context in compact status too 2024-05-02 23:29:01 +08:00
Lim Chee Aun 5c9a47c31e Might as well re-use it for instances search 2024-05-02 00:14:48 +08:00
Lim Chee Aun 65a4c3441c Add search for custom emojis 2024-05-02 00:14:25 +08:00
Lim Chee Aun 77bc06545c Handle inline images 2024-05-01 15:05:29 +08:00
Lim Chee Aun 11e64a2cc4 Fix filter expiry wrongly set if there's no expiry 2024-04-28 08:30:52 +08:00
Lim Chee Aun 5433e4e119 initStates needed for standalone compose page 2024-04-28 08:30:52 +08:00
Lim Chee Aun c8dc32b884 Test caching shazam states 2024-04-28 08:30:52 +08:00
Lim Chee Aun 1f29aee26e Upgrade dependencies 2024-04-28 08:30:52 +08:00
Lim Chee Aun daae055f4d List out forks 2024-04-28 08:30:52 +08:00
Chee Aun 044f754d7e
Merge pull request #522 from mickaobrien/timeline-enter-keyboard-shortcut-fix
Fix `enter` keyboard shortcut on timeline
2024-04-28 08:29:47 +08:00
Mick O'Brien 5ae2058c07 Fix `enter` keyboard shortcut on timeline
Currently pressing `enter` opens the active status if the status or any
focusable child of the status is focused e.g. the avatar or a link.

I think it should only open the post details when the post itself is
focused.
2024-04-26 12:23:53 +01:00
Lim Chee Aun 7376cb1e99 Fix muted="false" means still muted 🤦‍♂️🤦‍♂️🤦‍♂️ 2024-04-19 08:46:10 +08:00
Lim Chee Aun ffbae70178 Remove newline from regex for shortcode 2024-04-19 08:41:16 +08:00
Lim Chee Aun 9235d2c800 Hide poll button if maxOptions <= 1
It's not a poll if there's only 1 option
2024-04-18 23:12:29 +08:00
Lim Chee Aun 6ccefaebe1 Handle invalid date
Ugly solution for now, but it's already ugly
2024-04-18 23:11:18 +08:00
Lim Chee Aun 5a448c8049 Fix infinite reloading
Comment these out because this used to fix an old bug with instances not loaded properly
2024-04-18 23:10:26 +08:00
Lim Chee Aun 9bf77fa97a Mentions also need fixNotifications
It's also from notifications API
2024-04-18 17:15:51 +08:00
Lim Chee Aun b9058c6e3d Debounced auto-submit for GIF search field 2024-04-17 08:26:35 +08:00
Lim Chee Aun 55ad6500bc Fix margins 2024-04-16 23:21:46 +08:00
Lim Chee Aun f4b95d254c Maybe this helps? 2024-04-16 20:18:18 +08:00
Lim Chee Aun effbe189e1 Revert "Test upgrade react-hotkeys-hook for the keys fix"
This reverts commit 9285a0ba9a.
2024-04-16 00:09:53 +08:00
Lim Chee Aun 44e910b8c9 Fix wrong carousel math 2024-04-15 23:34:58 +08:00
Lim Chee Aun a68dccd7cf Fix rerender bug with followed hashtag parent
And… somehow memoize it?
2024-04-15 21:37:03 +08:00
Lim Chee Aun 9a6364a674 Obviously got to flex my scroll-driven animation CSSkillz 2024-04-15 19:59:57 +08:00
Lim Chee Aun e2f39596f0 Might as well add more supports 2024-04-15 19:58:59 +08:00
Lim Chee Aun 701b9e99b3 More media-first styling changes 2024-04-15 17:07:34 +08:00
Lim Chee Aun 294ab2bf00 Just put in this commented test notification
Good for reference in the future
2024-04-15 17:07:20 +08:00
Lim Chee Aun 304ce5a3e8 Experiment dynamic change of parent
This might prevent double renders
2024-04-15 17:06:44 +08:00
Lim Chee Aun 57390a291b No need background if there's pre-meta before it 2024-04-15 10:10:49 +08:00
Lim Chee Aun cd5920114f Undo back to -45deg, not everything need 135deg 2024-04-15 07:26:45 +08:00
Lim Chee Aun 06c6360cae More support for Pixelfed 2024-04-14 17:20:18 +08:00
Lim Chee Aun afdfdb86da Media-first style adjustments 2024-04-14 17:18:52 +08:00
Lim Chee Aun 6f8f3e4fd0 Change -35deg to 145deg prevents stripes animation
When dynamically changing dimension (height), repeating linear gradient seems to animate. This prevents it.
https://stackoverflow.com/a/76285775/20838
2024-04-14 14:08:50 +08:00
Lim Chee Aun 342ff20986 Document `PHANPY_IMG_ALT_API_URL` 2024-04-14 08:14:34 +08:00
Lim Chee Aun 94996d098e Fix width issue 2024-04-13 23:08:25 +08:00
Lim Chee Aun c286562ee8 Media-first style adjustments 2024-04-13 19:21:48 +08:00
Lim Chee Aun 5babdc9d63 Fix width/height not set 2024-04-13 19:21:20 +08:00
Lim Chee Aun 260bb8746d More media-first adjustments 2024-04-13 17:10:13 +08:00
Lim Chee Aun 7be620808f Fix notifications for Pixelfed 2024-04-13 17:09:56 +08:00
Lim Chee Aun df3aca70fa Open media + post view for wider viewports 2024-04-13 17:09:00 +08:00
Lim Chee Aun ec65163c89 More breathing space 2024-04-13 17:08:39 +08:00
Lim Chee Aun 6f22ec3842 Fix missing idempotency key 2024-04-13 17:07:28 +08:00
Lim Chee Aun 2faf9b4c20 Pixelfed needs remote which is opposite of local lol 2024-04-13 00:11:00 +08:00
Lim Chee Aun 501e43207b Don't set onlyMedia if not set
This defaults to false for Mastodon, but true for Pixelfed
2024-04-13 00:11:00 +08:00
Lim Chee Aun e782cc0dde Refactor set/get current account ID
And add fallback for standalone mode where session storage is not enough
2024-04-13 00:11:00 +08:00
Lim Chee Aun aefda31c2a Temporary quick fix, remove dash from hashtag regex 2024-04-13 00:11:00 +08:00
Lim Chee Aun 9285a0ba9a Test upgrade react-hotkeys-hook for the keys fix 2024-04-13 00:11:00 +08:00
Chee Aun 7fb56d9f6c
Merge pull request #493 from ultramookie/ultramookie-patch-1
Adding new self-hosted instance of Phanpy
2024-04-12 17:41:55 +08:00
steve mookie kong f7c69e56e9
Adding new self-hosted instance of Phanpy
Added new self-hosted instance of Phanpy, halo.mookiesplace.com
2024-04-11 21:28:38 -07:00
Lim Chee Aun c3bcf3d595 Try make Safari show video preview 2024-04-11 18:24:51 +08:00
Lim Chee Aun 0efa39b825 Sometimes it returns a preview image without dimenions 2024-04-11 17:45:19 +08:00
Lim Chee Aun a0d2037007 Early implementation of media-first UI experience 2024-04-11 17:18:17 +08:00
Lim Chee Aun 6e73728e2b Only show data-read-more when it's available 2024-04-11 17:16:04 +08:00
Lim Chee Aun 60920966d6 Special fallback handling when media object doesn't have enough info 2024-04-11 17:15:16 +08:00
Lim Chee Aun 5083463942 Show empty copy when no notifications at all 2024-04-11 17:13:34 +08:00
Lim Chee Aun 8b5fee3dfd Just sub it once 2024-04-10 17:31:26 +08:00
Lim Chee Aun c9124bf150 Change double-tap zoom to match mobile expectations 2024-04-10 15:03:02 +08:00
Lim Chee Aun b85174155c Make notifications settings icon less significant 2024-04-10 14:21:05 +08:00
Lim Chee Aun 5c9f6bae3c Fix followers list failing if familiar followers fail 2024-04-10 14:19:35 +08:00
Lim Chee Aun 4e5940900e Pixelfed-related fixes 2024-04-09 23:35:17 +08:00
Lim Chee Aun 7fa0b4f076 Upgrade dependencies 2024-04-05 17:13:29 +08:00
Lim Chee Aun ecfcc68f15 Add TheDesk 2024-04-05 17:13:13 +08:00
Lim Chee Aun 015ed5e7eb Further expand usage of SubMenu2 2024-04-04 17:03:30 +08:00
Lim Chee Aun 2ad9706304 Further utilize lazy shazam 2024-04-04 14:34:28 +08:00
Lim Chee Aun 30382d088b Possible fix for menus again 2024-04-04 14:34:04 +08:00
Lim Chee Aun 80196f83ca Revert "Test if this fixes submenu not opening"
This reverts commit 49fa48bd28.
2024-04-04 14:29:46 +08:00
Lim Chee Aun 419ad34250 Revert "Test another fix for submenus not opening"
This reverts commit a7cc0785f9.
2024-04-04 14:29:35 +08:00
Lim Chee Aun ed0d714cf2 Just a little spacing fix 2024-04-03 22:51:29 +08:00
Lim Chee Aun 708976a9e9 Anything Intl always need to extract out
and memoized
2024-04-03 19:48:18 +08:00
Lim Chee Aun d77ba19308 Handle another kind of emojiReaction response
Can't everyone just standardize the responses?
2024-04-03 17:58:37 +08:00
Lim Chee Aun b10e22a9a2 Better fallbacks 2024-04-03 17:57:15 +08:00
Lim Chee Aun 36d8b62e1e Height adjustments when switching between poll form and results 2024-04-03 16:14:59 +08:00
Lim Chee Aun 989e788d8e Slight delay is needed 2024-04-03 16:06:37 +08:00
Lim Chee Aun ebd9f05f69 Preload IntlSegmenter polyfill if needed 2024-04-03 14:33:53 +08:00
Lim Chee Aun 5246af4ae9 Undo lazy component experiment
Doesn't make much difference
2024-04-03 14:33:19 +08:00
Lim Chee Aun e6ba72f4c8 'Remove follower' menu item 2024-04-03 11:54:46 +08:00
Lim Chee Aun 960dff8b9e Make lazy shazam ignore top sticky header 2024-04-03 11:53:03 +08:00
Lim Chee Aun e3c25d25ee Add menus to view profile image and header 2024-04-03 09:29:23 +08:00
Lim Chee Aun 090320150a Select text too when pressing / 2024-04-03 09:28:59 +08:00
Lim Chee Aun 7100937e79 Higher gif picker sheet 2024-04-02 19:44:22 +08:00
Lim Chee Aun c18efef7b6 GIF picker 2024-04-02 17:51:48 +08:00
Lim Chee Aun ff336628f8 Fix media description not recognized if programmatically entered 2024-04-02 17:45:14 +08:00
Lim Chee Aun 28882d98d9 Add different UI state than default for start 2024-04-02 17:42:51 +08:00
Lim Chee Aun f6ad22e58f Fix bug: media attachments not updated when edited 2024-04-02 13:12:52 +08:00
Lim Chee Aun aa664e15f6 Convert all the punycodes
Surprising that this is still not built into browsers
2024-04-02 09:03:13 +08:00
Chee Aun f2f203c9d8
Merge pull request #478 from snail-coupe/doc/fix_build_example
Update README.md
2024-04-02 07:49:11 +08:00
snail-coupe ae0e4a0792
Update README.md
Build examples: PHANPY_APP_TITLE -> PHANPY_CLIENT_NAME
2024-04-01 23:26:15 +01:00
Lim Chee Aun 4def6eef5a Refactor this out for no particular reason 2024-03-31 20:53:08 +08:00
Lim Chee Aun 1004a5f176 Revert back to 88px 2024-03-31 20:47:43 +08:00
Lim Chee Aun 2b6beee875 More logic to prevent recursive/wrong quote posts 2024-03-31 20:35:24 +08:00
Lim Chee Aun e35e02593a If beyond 12 hours, allow last catch up's end timing 2024-03-31 20:34:01 +08:00
Lim Chee Aun 5e56ba9fb9 Bring back auto-updating relative time
This time, more optimized re-render
2024-03-30 17:21:31 +08:00
Lim Chee Aun a7cc0785f9 Test another fix for submenus not opening 2024-03-30 14:44:48 +08:00
Lim Chee Aun bb5d34c94c Still need to request relationship for moved accounts
Instead hide specific elements if moved.
2024-03-29 21:27:46 +08:00
Lim Chee Aun 671d2c9bb1 Less wider submenu 2024-03-28 18:22:29 +08:00
Lim Chee Aun 49fa48bd28 Test if this fixes submenu not opening 2024-03-28 18:22:03 +08:00
Lim Chee Aun 32fb406629 Better shift, but not dynamic 2024-03-28 12:18:25 +08:00
Lim Chee Aun 6950698935 Color space works differently in different browsers 2024-03-28 12:13:38 +08:00
Lim Chee Aun fd9d8059bc Handle info with menu dropdown for profile page 2024-03-28 00:25:10 +08:00
Lim Chee Aun 3b975e899b Try use smaller dimension for fine pointers 2024-03-28 00:23:31 +08:00
Lim Chee Aun b1950046d4 Better alignment for poll radios/checkboxes 2024-03-27 22:08:56 +08:00
Lim Chee Aun d2af509eaf Hacky way to show on-screen keyboard
Doesn't work some of the time.
2024-03-27 21:22:47 +08:00
Lim Chee Aun 311160983f Experiment hide some visibility icons 2024-03-27 19:09:01 +08:00
Lim Chee Aun 9d7d5df7f2 Fix sudden Chrome CSS bug with text-shadow affecting underlines 2024-03-27 16:17:09 +08:00
Lim Chee Aun 927430853a Fix CW-ed images from QPs not cloaked 2024-03-27 16:03:15 +08:00
Lim Chee Aun 1692637e22 Possibly fix weird race conditions
No idea how this happen at all
2024-03-27 14:58:32 +08:00
Lim Chee Aun 2bc24cc495 Pass in postID for Boosted/Liked sheet here too 2024-03-27 10:19:01 +08:00
Lim Chee Aun 66e58c74ef Shazam the filtered notifications 2024-03-27 10:18:34 +08:00
Lim Chee Aun e3591514a1 Use acct instead of username 2024-03-27 10:18:12 +08:00
Lim Chee Aun 4abb1aeaed Fix poll got false value 2024-03-27 09:46:37 +08:00
Lim Chee Aun 7cac17a043 Need Loader fallbacks 2024-03-27 08:09:24 +08:00
Lim Chee Aun 7049166b40 Finally facing the consequences of hacky code
By fixing it with more hacky code
2024-03-26 23:45:22 +08:00
Lim Chee Aun 0a695410d9 Cloak the buttons in filtered notifications 2024-03-26 23:44:18 +08:00
Lim Chee Aun d671178c02 Update copies for severed relationships
Ref: https://github.com/mastodon/mastodon/pull/29731
2024-03-26 19:47:03 +08:00
Lim Chee Aun 67a05450cf Test this lazy shazam 2024-03-26 16:35:02 +08:00
Lim Chee Aun 438b520970 Fix sudden weird underline bug 2024-03-26 13:49:14 +08:00
Lim Chee Aun c8c96f08ac Another attempt to conditional load Intl.Segmenter polyfill 2024-03-25 19:31:25 +08:00
Lim Chee Aun c9bbca9e11 Might as well go further into custom emoji reactions
But still MVP-ish. Misskey emoji shortcodes ain't going to work tho'
2024-03-25 17:58:56 +08:00
Lim Chee Aun 39800e771c Add Mangane 2024-03-25 12:06:03 +08:00
Lim Chee Aun b1c81f7d71 Preliminary support for emoji reaction notifications
Note: pleroma:emoji_reaction is not tested.
2024-03-25 12:05:49 +08:00
Lim Chee Aun 53e9aac14f Show chevron to hint dropdown 2024-03-25 10:26:37 +08:00
Lim Chee Aun cc268019a0 Upgrade dependencies 2024-03-25 10:13:42 +08:00
Lim Chee Aun 9d16c6c12a Fix policy change not working for push notifications
1. Turns out `policy` needs to be inside `data` hash
2. namedItem(policy) → namedItem('policy')

Super embarrassed that these bugs exist for 7 months since push notifications release.
2024-03-25 09:20:51 +08:00
Lim Chee Aun 27a7bc7627 Edit profile now includes extra fields 2024-03-24 23:39:45 +08:00
Lim Chee Aun 1a2914362f Very, very simple Edit Profile sheet. 2024-03-24 20:49:02 +08:00
Lim Chee Aun 9c8aff6d32 Show post preview inside Boosted/Liked by modal
And show the menu in more places
2024-03-24 17:24:47 +08:00
Lim Chee Aun 6816a4b64a Port the tooltip stuff to other link cards 2024-03-24 16:53:33 +08:00
Lim Chee Aun 13f5621488 Fix char counter not showing properly on Firefox 2024-03-24 16:37:58 +08:00
Lim Chee Aun fd59a39021 Preliminary support for severed relationships notifications
Reference: https://github.com/mastodon/mastodon/pull/27511

This is done purely based on the above codebase without real testing.
2024-03-24 14:13:58 +08:00
Lim Chee Aun c19096ab1b Try no split CSS 2024-03-24 10:13:51 +08:00
Lim Chee Aun 0fbc566454 Fix this somehow-partially implemented dot shortcut 2024-03-24 00:21:41 +08:00
Lim Chee Aun f6a9f7807e Allow Lists to be in Shortcuts (except columns)
…and all various Lists-related improvements
2024-03-23 23:52:05 +08:00
Lim Chee Aun 8378d6fc1d Upgrade dependencies 2024-03-23 15:00:13 +08:00
Lim Chee Aun 5ccf8b6842 Show published dates for cards 2024-03-23 12:26:50 +08:00
Lim Chee Aun d6b65d0413 Better red color for danger menus 2024-03-23 12:26:22 +08:00
Lim Chee Aun 8eb67f469c Add Enable/Disable notifications/boosts for accounts 2024-03-23 12:26:01 +08:00
Lim Chee Aun 717633e422 Filters, finally. 2024-03-23 01:07:24 +08:00
Lim Chee Aun f6c2097a89 Fix beyond to date range formatting 2024-03-22 09:33:32 +08:00
Lim Chee Aun 5695b3ca1e Fix alignment issues with the checkboxes 2024-03-21 08:59:07 +08:00
Lim Chee Aun 15c113ecb1 Reduce brightness
iOS seems to HDR-ify it and it's so annoyingly brighter
2024-03-20 14:30:07 +08:00
Lim Chee Aun 4a75d6f172 Fix flex issues 2024-03-20 11:18:56 +08:00
Lim Chee Aun 8f43099840 More conditional menu dividers
Srsly need better way to render these dividers
2024-03-20 11:04:38 +08:00
Lim Chee Aun a2743f9940 This got prettier-ed 2024-03-20 11:04:38 +08:00
Lim Chee Aun 4c2210c68b MVP-ish filtered notifications UI 2024-03-20 11:04:38 +08:00
Lim Chee Aun da909e4084 Fix wrong filtered counts due to grouped boosts 2024-03-20 11:04:38 +08:00
Lim Chee Aun 552ad249e5 Clean up the usernames 2024-03-20 11:04:38 +08:00
Chee Aun 9a5704ee95
Merge pull request #464 from snail-coupe/phanpy-crmbl-uk
Update README.md - adding another instance
2024-03-18 09:02:03 +08:00
snail-coupe c7f68c8971
Update README.md - adding another instance 2024-03-17 21:31:26 +00:00
Lim Chee Aun e8219e458d Try this font settings out.
Depends on system font's capabilities, so may not work.
2024-03-16 20:02:20 +08:00
Lim Chee Aun 6157ee105c Fix "hide"-filtered post bug again 2024-03-16 18:45:59 +08:00
Lim Chee Aun 4718ef36b0 Need one more detail: site version 2024-03-16 17:49:41 +08:00
Lim Chee Aun 2723ef4593 Attempt to fix wrong boosts count 2024-03-16 13:36:23 +08:00
Chee Aun d1965a84b5
Merge pull request #461 from Vinnl/ellipsis-tooltip
Add tooltip for truncated preview text
2024-03-16 13:33:28 +08:00
Lim Chee Aun c7762cc56f Upgrade dependencies 2024-03-16 10:12:34 +08:00
Vincent cf05568e0c
Add tooltip for truncated preview text
Expose the full content of preview text that might get truncated in
their tooltips.
2024-03-15 18:06:56 +01:00
Lim Chee Aun 69c47489e3 Fix some at-mentions not handled 2024-03-15 18:20:45 +08:00
Lim Chee Aun 861ad83423 More keyboard shortcuts for Catch-up 2024-03-15 18:06:52 +08:00
Lim Chee Aun cd3ed64e48 Show relative time if boosting/quoting old post 2024-03-15 16:02:33 +08:00
Lim Chee Aun 2e28c147b9 Scope the keyboard shortcuts in Catch-up 2024-03-15 09:05:05 +08:00
Lim Chee Aun fef033b282 Show relative time if replying to old post
Ref: https://blog.joinmastodon.org/2023/11/improving-the-quality-of-conversations-on-mastodon/
2024-03-13 13:30:58 +08:00
Lim Chee Aun 3dbbba0be2 Fix captioning turned on even when showCaption = false 2024-03-12 08:14:07 +08:00
Lim Chee Aun 0b8cbbef51 Consider the safe areas 2024-03-11 19:04:08 +08:00
Lim Chee Aun f72ec0aba5 Scroll up too if changing author 2024-03-11 12:21:15 +08:00
Lim Chee Aun d63e6c87c4 Potential perf improvements for canvas 2024-03-10 23:25:07 +08:00
Lim Chee Aun f5ea96a093 Merge dup boosts in Catch-up 2024-03-10 23:24:17 +08:00
Lim Chee Aun 0e1be5dbdc MVP-ish initial implementation of Quote
The menuExtras is hacky, I know.
2024-03-09 21:29:44 +08:00
Lim Chee Aun 4843970e1b Custom context menu if link has hash 2024-03-09 17:01:50 +08:00
Lim Chee Aun a0367f4860 Basic j/k/o/enter shortcuts for Notifications page 2024-03-08 16:25:23 +08:00
Lim Chee Aun 687a08b2a4 Forgot to add 'k' lol
Might as well add 'h' and 'l', & fix the selected author focusing issue
2024-03-08 14:53:38 +08:00
Lim Chee Aun ac07479edd Fix wrong account shown for multiple same-username links 2024-03-08 14:52:31 +08:00
Lim Chee Aun 306a96eec3 Need uppercase C,else it'll be true instead of false
🤦‍♂️🤦‍♂️🤦‍♂️🤦‍♂️🤦‍♂️🤦‍♂️🤦‍♂️🤦‍♂️🤦‍♂️🤦‍♂️🤦‍♂️🤦‍♂️🤦‍♂️🤦‍♂️🤦‍♂️🤦‍♂️🤦‍♂️🤦‍♂️🤦‍♂️🤦‍♂️🤦‍♂️
2024-03-07 16:33:56 +08:00
Lim Chee Aun 061d769901 Test fix race-condition for new notifications 2024-03-07 16:06:08 +08:00
Lim Chee Aun cf1c10b338 Show text from poll too 2024-03-07 12:34:38 +08:00
Lim Chee Aun 7f6ef4ff96 Better copy for embed post 2024-03-07 09:05:52 +08:00
Lim Chee Aun ce190cbc50 Lock icon for locked profiles 2024-03-07 09:05:40 +08:00
Lim Chee Aun e7e4f15234 Need extra check on domain 2024-03-06 22:01:13 +08:00
Lim Chee Aun c005745ad0 Fix links layout in embed modal 2024-03-06 19:17:03 +08:00
Lim Chee Aun 0b81b5bfd2 Add menu item to copy handle 2024-03-06 16:51:13 +08:00
Lim Chee Aun b48d32e503 Fix spoiler not working for media 2024-03-06 14:26:01 +08:00
Lim Chee Aun ed309b289f Add categories 2024-03-06 14:25:46 +08:00
Lim Chee Aun ecc5fc5bbe Remove content-visibility, this crops some elements 2024-03-05 23:41:26 +08:00
Lim Chee Aun 7eb77f5d1b Larger separator even for mobile 2024-03-05 23:40:57 +08:00
Lim Chee Aun 3f4832965d Extracting stuff for now 2024-03-05 23:30:12 +08:00
Lim Chee Aun b7ed27ef70 Small catch-up adjustments 2024-03-05 20:56:37 +08:00
Lim Chee Aun c9a48cf482 New .plain6
I honestly need better naming sense
2024-03-05 19:11:50 +08:00
Lim Chee Aun c0ad216227 Merge sort order into sort buttons 2024-03-05 19:11:28 +08:00
Lim Chee Aun 8a9f1a3c25 Fix 2 history icons conflict 2024-03-05 16:23:16 +08:00
Lim Chee Aun 375c4b5d00 Upgrade vite 2024-03-05 16:22:55 +08:00
Lim Chee Aun f522d8e932 Basic j/k keyboard shortcuts for Catch-up 2024-03-05 15:05:26 +08:00
Lim Chee Aun bd46af6166 UI enhancements for Catch-up 2024-03-05 13:32:40 +08:00
Lim Chee Aun 29e9e15d3f Try split it out as another chunk 2024-03-05 00:51:53 +08:00
Lim Chee Aun 42dac0720f Revert "Conditional import polyfill"
This reverts commit 427207ae5a.
2024-03-04 23:41:21 +08:00
Lim Chee Aun d348c458b3 Blurred menu will be opt-in 2024-03-04 21:13:57 +08:00
Lim Chee Aun 427207ae5a Conditional import polyfill 2024-03-04 19:45:57 +08:00
Lim Chee Aun 531147cbc3 It's time for Intl.Segmenter
Remove runes2
2024-03-04 19:38:46 +08:00
Lim Chee Aun e0c2570875 Temporarily disable line to fix sub menu not opening 2024-03-04 17:29:28 +08:00
Lim Chee Aun 2b2f6c28a9 Time to re-organize this main menu
Will need to gather feedback
2024-03-04 16:41:06 +08:00
Lim Chee Aun 4a9cae9cb6 Experiment some Suspense
This splits code, lazy load the other less-critical components
2024-03-04 16:37:34 +08:00
Lim Chee Aun c578b41105 Only show setting if logged-in 2024-03-04 16:36:34 +08:00
Lim Chee Aun cfdbecc608 Better "back" buttons for Catch-up 2024-03-04 14:37:03 +08:00
Lim Chee Aun 7c81548320 Help section for Catch-up 2024-03-04 14:36:47 +08:00
Lim Chee Aun 8cab77415e Only show share and embed if public or unlisted
Also slight refactor
2024-03-04 09:56:38 +08:00
Lim Chee Aun 8b36cef510 Proper passing of props 2024-03-04 09:52:22 +08:00
Lim Chee Aun 4e67edac5e data-id was meant for debugging, removing it 2024-03-03 21:35:44 +08:00
Lim Chee Aun 0bf5ef52ac Only add more gap if there's enough space 2024-03-03 21:35:23 +08:00
Lim Chee Aun 7a7d51f56e Fix the post counts messed up in smaller viewports 2024-03-03 17:44:04 +08:00
Lim Chee Aun 48e1a0753a Make danger menu item more dangerous 2024-03-03 17:41:30 +08:00
Lim Chee Aun 195c2e2960 Turns out this was under the avatar, hmmmm 2024-03-03 17:37:34 +08:00
Lim Chee Aun 60c0d1cca0 Upgrade valtio 2024-03-03 17:31:37 +08:00
Lim Chee Aun 6292557bc9 Default modal to light, add solid class instead 2024-03-03 17:31:06 +08:00
Lim Chee Aun b79ce92aef Use acct instead of username 2024-03-03 17:16:58 +08:00
Lim Chee Aun 6bb6b9c350 Upgrade masto 2024-03-03 17:16:58 +08:00
Chee Aun 0b4c720153
Merge pull request #431 from cvennevik/perf-modal-backdrop-filter
(performance) Remove backdrop-filter blur and saturate effects from modals
2024-03-03 17:16:29 +08:00
Chee Aun 02d1339b29
Merge pull request #430 from cvennevik/perf-notification-icons
(performance) Remove backdrop-filter blur and saturate effect from .account-sub-icons
2024-03-03 17:16:20 +08:00
Lim Chee Aun 93c871353a Fix status actions close when focused 2024-03-03 11:01:11 +08:00
Lim Chee Aun 641d22a7cc Default density sort to desc 2024-03-03 09:48:53 +08:00
Lim Chee Aun 0fd378811f Fix range order 2024-03-02 21:53:03 +08:00
Lim Chee Aun afb1f6d520 Perf fixes + 3d posts viz 2024-03-02 21:25:54 +08:00
Lim Chee Aun fcb0074f49 Experimental Embed post 2024-03-02 18:55:05 +08:00
Lim Chee Aun 8108151fb6 Fix getComputedStyle running on undefined/null element 2024-03-02 18:54:27 +08:00
Lim Chee Aun d8b0adfe97 Prevent embeds from playing inline 2024-03-02 18:53:35 +08:00
Lim Chee Aun cef4e6373e Add 404 page 2024-03-02 13:53:53 +08:00
Lim Chee Aun 4d138f5773 Upgrade dependencies 2024-03-02 11:23:23 +08:00
Lim Chee Aun 0db10bf7d0 More adaptive copy 2024-03-02 10:08:10 +08:00
Lim Chee Aun 7ab6da5e9b Relayout the previous catchups list 2024-03-02 10:01:22 +08:00
Lim Chee Aun beed3ca18c Fix cloak mode showing ghost text 2024-03-02 10:01:04 +08:00
Lim Chee Aun abd5031602 "What is this" section for Catch-up 2024-03-02 10:00:45 +08:00
Lim Chee Aun 346dba9ed7 Sort by density 2024-03-01 16:03:45 +08:00
Lim Chee Aun 0ceb6ffd06 Tooltip for authors showing display name and username 2024-03-01 16:03:07 +08:00
Lim Chee Aun 488aece050 Better z-indices for the media 2024-03-01 16:02:27 +08:00
Lim Chee Aun ecde88d6a1 Fix weird jump when height of list changes 2024-03-01 16:02:08 +08:00
Lim Chee Aun 94dcd1606a Make toast stay longer, due to longer text 2024-03-01 13:20:34 +08:00
Lim Chee Aun b479fa1f35 Don't scroll vertical 2024-03-01 13:20:12 +08:00
Lim Chee Aun ab0472de02 Fix some links not opening browser's context menu 2024-03-01 10:29:38 +08:00
Lim Chee Aun 1bf8616957 Auto-scroll to selected author 2024-02-29 21:01:31 +08:00
Lim Chee Aun 631333ba9e Cache custom emojis 2024-02-29 18:18:40 +08:00
Lim Chee Aun 69d77c368e Experiment longer captions for no-content single-media post 2024-02-29 13:25:30 +08:00
Lim Chee Aun bb3621e424 Make loader abrupt if >= 3 replies 2024-02-29 13:19:41 +08:00
Lim Chee Aun e1447053b3 Upgrade dependencies 2024-02-29 10:12:05 +08:00
Lim Chee Aun aaf64bbc34 More cloak fixes 2024-02-28 15:34:11 +08:00
Lim Chee Aun 52b60fa38b Respect filters for reply hints 2024-02-28 15:04:01 +08:00
Lim Chee Aun 3acfc00ec0 Don't show toast when not on results page 2024-02-28 11:49:07 +08:00
Lim Chee Aun f8b5e9563c Fix trend links not respecting set instance 2024-02-28 11:27:48 +08:00
Lim Chee Aun 6f3f83a620 Catching up with fixes and enhancements 2024-02-28 11:01:09 +08:00
Lim Chee Aun 315ce98511 Fix cloak for catch-up 2024-02-27 23:29:54 +08:00
Lim Chee Aun 3cfc35898b Slight adjustments 2024-02-27 21:53:08 +08:00
Lim Chee Aun ffc216cfed Fix account info not re-rendering correctly when id changed 2024-02-27 21:24:38 +08:00
Lim Chee Aun 35e34c0bc6 Remove space 2024-02-27 21:23:46 +08:00
Lim Chee Aun b023a43fee Fix weird rendering on Safari 2024-02-27 18:02:12 +08:00
Lim Chee Aun 44f6d9cda0 Remove unused code 2024-02-27 18:02:00 +08:00
Lim Chee Aun c466e0c279 Broken image fallbacks 2024-02-27 18:01:47 +08:00
cvennevik fa99debabd (performance) Remove backdrop-filter blur and saturate effects from modals 2024-02-26 19:37:14 +01:00
cvennevik 58778aba45 (perf) Remove backdrop-filter blur effect from .account-sub-icons 2024-02-26 19:14:29 +01:00
Lim Chee Aun b913c8817d Fix wrong icon size 2024-02-26 21:44:45 +08:00
Lim Chee Aun ffb7ce1c63 Quick style adjusts 2024-02-26 21:13:17 +08:00
Lim Chee Aun 707b51a1a0 Don't trigger auto list if meta/ctrl+enter 2024-02-26 14:57:09 +08:00
Lim Chee Aun 201ca6ce4a Catch-up (beta) 2024-02-26 14:02:58 +08:00
Lim Chee Aun a419bb9b61 Fix small typo 2024-02-26 14:02:12 +08:00
Lim Chee Aun a8b5c8cd64 Experimental "cloud" shortcuts settings import/export 2024-02-26 14:00:53 +08:00
Lim Chee Aun a3236ea0f0 Report post/profile 2024-02-26 13:59:26 +08:00
Lim Chee Aun c595b0ee31 Fix toasts showing for unauthenticated interactions 2024-02-26 11:58:22 +08:00
Lim Chee Aun 89f34d7942 Use em, and hide if there's nothing in account "note" 2024-02-26 11:56:18 +08:00
Lim Chee Aun f23e4b0dd9 Just in case, probably not needed 2024-02-25 13:37:50 +08:00
Lim Chee Aun e7d2d088ba Super weird fix for clicks "leaked" to the container 2024-02-25 13:37:29 +08:00
Lim Chee Aun bf609b979e Upgrade masto 2024-02-24 14:00:28 +08:00
Lim Chee Aun 6a6162ec6e Use readOnly, respect CWs for statuses in notifications 2024-02-23 18:07:42 +08:00
Lim Chee Aun 03e5c3ff54 Disable text-rendering: optimizeSpeed
It causes text to jump. It has different kerning when optimized for speed
2024-02-23 18:05:39 +08:00
Lim Chee Aun d8e824b548 Upgrade dependencies 2024-02-23 18:03:26 +08:00
Lim Chee Aun e5d36b82bb Fix search suggestion sort 2024-02-23 18:00:30 +08:00
Lim Chee Aun b6721fc58f Change pin icon color
It gets easily confused with heart icon
2024-02-22 14:21:47 +08:00
Lim Chee Aun 246862e0a4 Upgrade other dependencies 2024-02-21 09:56:55 +08:00
Lim Chee Aun 65e048be17 Downgrade preact due to some weird bugs 2024-02-21 09:56:55 +08:00
Lim Chee Aun cd96ba0c59 Isolate bidi for name text 2024-02-21 09:56:55 +08:00
Lim Chee Aun 9803d18185 Speed up the fade 2024-02-21 09:56:55 +08:00
Chee Aun fefc121b11
Merge pull request #422 from Ganneff/Ganneff-add-fulda.social
Add another phanpy instance url
2024-02-19 17:59:22 +08:00
Joerg Jaspert 3d08349851
Add another phanpy instance url
Adding fulda.social to the list of self-hosted instances.
2024-02-18 21:48:23 +01:00
Lim Chee Aun 1478aca7a5 Need the stripes for PMs 2024-02-18 09:38:54 +08:00
Lim Chee Aun dab0d61ac8 Allow double-click to refresh on Notifications page 2024-02-17 16:50:13 +08:00
Lim Chee Aun 14b92f3f98 Switch to the list from joinmastodon.org/servers 2024-02-17 16:49:50 +08:00
Lim Chee Aun 49cdba2652 Upgrade dependencies again. Last Preact version was causing weird bugs. 2024-02-17 00:27:21 +08:00
Lim Chee Aun 2f94cb34f6 Fix post content not updating when changed 2024-02-16 17:36:46 +08:00
Lim Chee Aun b7a79c8fdd Better memo for Notification 2024-02-15 18:07:17 +08:00
Lim Chee Aun 2f0d04eca4 Update instances list, fix script bug 2024-02-15 17:53:35 +08:00
Lim Chee Aun daabd85273 Upgrade dependencies 2024-02-15 14:59:11 +08:00
Lim Chee Aun c84ad73d0d More memoization 2024-02-14 17:17:15 +08:00
Lim Chee Aun 3295b1ab96 Remove the need for setStates 2024-02-14 17:16:53 +08:00
Chee Aun 5d7b67a410
Merge pull request #417 from Fastidious/patch-1
Update README.md
2024-02-14 01:28:12 +08:00
Fastidious 4e85f92f4b
Update README.md
Changed URL of my self hosted instance.
2024-02-13 10:08:40 -05:00
Lim Chee Aun 9d80647b11 Upgrade dependencies 2024-02-13 22:05:26 +08:00
Lim Chee Aun 24a481b782 Back to end 2024-02-12 18:59:04 +08:00
Lim Chee Aun 97cce8a828 Slightly faster bg transition 2024-02-12 11:54:47 +08:00
Lim Chee Aun 3c31c56306 Fine-tuning status actions styles 2024-02-12 11:53:59 +08:00
Lim Chee Aun 92f4371041 More granular hover/focus state for status actions 2024-02-11 22:46:21 +08:00
Lim Chee Aun a9d0100087 Stripes if PM 2024-02-11 21:04:30 +08:00
Lim Chee Aun 3fbe11295f Don't use dvh for this 2024-02-10 22:22:25 +08:00
Lim Chee Aun 98f018913d Test change to :focus 2024-02-10 20:21:03 +08:00
Lim Chee Aun 60ca577f9b Slight adjustments to status actions 2024-02-10 12:01:51 +08:00
Lim Chee Aun 1d0d02f39b Different alignment for status action menu 2024-02-10 12:00:40 +08:00
Lim Chee Aun fbd448c152 Add one more smaller text size option 2024-02-09 20:07:16 +08:00
Lim Chee Aun 038b2b2e6b Upgrade vite and dependencies 2024-02-09 20:07:06 +08:00
Lim Chee Aun 169aa2d3d3 Fix boost icon color in new status menu 2024-02-08 01:12:02 +08:00
Lim Chee Aun 9a9667d824 Redesign the context menu 2024-02-06 17:34:26 +08:00
Lim Chee Aun afd9d2cf97 Slight style adjustments 2024-02-06 17:32:17 +08:00
Lim Chee Aun b9c287b29e Don't show icon, just show text for visibility.
Icon, in the end, ain't descriptive enough.
2024-02-06 17:30:58 +08:00
Lim Chee Aun 436277c6b4 Prevent re-render dangerouslySetInnerHTML 2024-02-06 17:30:10 +08:00
Lim Chee Aun 4f28d3cc6d Less bolder bold 2024-02-06 17:28:18 +08:00
Lim Chee Aun 46415b87a6 Show lists containing the account in the menu 2024-02-05 10:17:49 +08:00
Lim Chee Aun 913d923877 Make grouped subsequent hashtag pre-meta more seamless 2024-02-04 19:38:22 +08:00
Lim Chee Aun 36f38230c4 Attempt to shorten links if not shortened
This usually comes from non-Mastodon instances
2024-02-03 20:36:25 +08:00
Lim Chee Aun a66a4e238e More subtle style change to reply parent 2024-02-02 13:20:55 +08:00
Lim Chee Aun aa7fb4441f Subtle style change to reply parent 2024-02-02 12:58:35 +08:00
Lim Chee Aun f1dbb9ec42 Further delay filtered status peek, remove tooltip 2024-02-02 00:27:12 +08:00
Lim Chee Aun a59668ea9a Slight adjustment to carousel colors 2024-02-01 22:49:16 +08:00
Lim Chee Aun 6581bc2881 Prevent reply parent hint from being GC-ed 2024-01-31 13:45:34 +08:00
Lim Chee Aun 28bb66f185 Show total at end of list 2024-01-31 09:03:33 +08:00
Lim Chee Aun 46d7cba1ea Show join date if there's nothing to show 2024-01-30 22:46:18 +08:00
Lim Chee Aun ff35c458c3 Don't return 2024-01-30 18:57:28 +08:00
Lim Chee Aun 26d445af7d Fix reply parent hint not appearing
Also respect language
2024-01-30 17:43:44 +08:00
Lim Chee Aun 3470b9adec Fix forgot to opt-in new experiment 2024-01-30 15:22:01 +08:00
Lim Chee Aun f3d77dd04e Experimental reply parent hint 2024-01-30 14:34:54 +08:00
Lim Chee Aun 14f5c37721 Don't show comment hint for timeline item container 2024-01-30 14:28:28 +08:00
Lim Chee Aun 94c59c47d1 Upgrade dependencies 2024-01-29 21:11:19 +08:00
Lim Chee Aun a66307b757 Fixes + improvements to search UI 2024-01-29 21:11:08 +08:00
Lim Chee Aun 9792700f30 Fix wrong CSS
Add more checks
2024-01-29 01:38:53 +08:00
Lim Chee Aun 36e852bebb Fix weird overflow: clip bug on Chrome 2024-01-28 00:49:11 +08:00
Lim Chee Aun 6075542071 Exclude the JS-injected hashtag stuffing class 2024-01-26 16:09:21 +08:00
Lim Chee Aun 0386357688 Fix weird bug with wrong cache of icon 2024-01-26 00:28:03 +08:00
Lim Chee Aun 9cac63c37d Experimental more-harsh hashtag stuffing collapsing 2024-01-25 22:13:38 +08:00
Lim Chee Aun 5cfcfdc98b Squeeze all the micro-perf 2024-01-25 21:28:41 +08:00
Lim Chee Aun a2d995ec07 Support unofficial status.quote 2024-01-25 12:59:53 +08:00
Lim Chee Aun 4ca9a802e3 Remove console.log 2024-01-25 08:00:55 +08:00
Lim Chee Aun 990f2b2e29 Handle unknown audio attachments 2024-01-24 13:08:54 +08:00
Lim Chee Aun 725da37063 Slight adjustments to post actions bar 2024-01-21 13:10:57 +08:00
Lim Chee Aun 1b41d39032 Stretch svg dimensions 2024-01-20 10:26:01 +08:00
Lim Chee Aun 23dd7f5a7a Extract ICONS out 2024-01-20 10:25:47 +08:00
Lim Chee Aun 7d95c50c7a Remove width/height in svg 2024-01-20 01:45:54 +08:00
Lim Chee Aun a352f94c2c Use more beautiful quotes 2024-01-20 01:45:36 +08:00
Lim Chee Aun 38e2b176bc Make embeds larger 2024-01-19 20:31:05 +08:00
Lim Chee Aun 6b4c1c8505 Change menu alignment 2024-01-19 20:29:46 +08:00
Lim Chee Aun 46dfd9aab0 MVP-ish pin/unpin post 2024-01-18 19:05:12 +08:00
Lim Chee Aun 59d0138ca8 If there's selected text, don't show custom context menu 2024-01-17 13:42:46 +08:00
Lim Chee Aun 3fbd5b8622 s/allowNofitications/allowNotifications
Also very embarrassing
2024-01-17 11:32:16 +08:00
Lim Chee Aun b6c4045cb4 Escape HTML chars in composer highlights
This is very embarrassing, I know
2024-01-17 11:31:33 +08:00
Lim Chee Aun 37c784dad2 Make refresh button more prominent 2024-01-16 15:47:10 +08:00
Lim Chee Aun 04d431cf71 Add more conditions 2024-01-15 22:05:18 +08:00
Lim Chee Aun 97458b66eb Update languages list 2024-01-15 20:39:29 +08:00
Lim Chee Aun fadfc6052d Only show for coarse pointer 2024-01-15 00:31:42 +08:00
Lim Chee Aun 0ca92e7509 Fix icon alignment in shortcut settings 2024-01-14 23:04:14 +08:00
Lim Chee Aun b8484eff79 Differentiate menu open from right-click vs actions bar
Kinda hacky for now
2024-01-14 21:34:21 +08:00
Lim Chee Aun 1017d1d270 Style changes for focused more button 2024-01-14 21:33:52 +08:00
Lim Chee Aun 04179340f6 Further enhance actions bar
- Focus color when context menu is open
- Focus color for more button when context menu is open
- Reuse menu instead of creating another menu
- Show like toast when liked/unliked
2024-01-14 19:36:14 +08:00
Lim Chee Aun 9b0889fe23 Test show refresh button after a minute 2024-01-14 18:31:53 +08:00
Lim Chee Aun 79e87b7d89 A little transition when expanding replies 2024-01-14 18:29:11 +08:00
Lim Chee Aun 0ebc0fa64c First step in introducing actions bar 2024-01-14 00:32:08 +08:00
Lim Chee Aun 35974cc89c Show more consistent icon for "comment" 2024-01-14 00:30:12 +08:00
Lim Chee Aun 00675c827f Upgrade react-hotkeys-hook 2024-01-14 00:29:30 +08:00
Lim Chee Aun 2b3f65f28c Fix wrong account shown
Need the hostname to be more accurate
2024-01-12 14:47:59 +08:00
Lim Chee Aun 500f877d4b Fix error when r is undefined 2024-01-11 10:44:37 +08:00
Lim Chee Aun 4b9ff0ca5b Hide "more" icon for posts in notifications 2024-01-11 10:44:24 +08:00
Lim Chee Aun 07f927d4ff Add notice if there's only 1 shortcut 2024-01-10 14:48:29 +08:00
Lim Chee Aun 8c6563a671 More contextual copy 2024-01-10 14:48:08 +08:00
Lim Chee Aun ffabd6188d Truncate URLs 2024-01-10 01:48:20 +08:00
Lim Chee Aun d71b1a7e36 Test add "more" icon near timestamp 2024-01-10 01:47:50 +08:00
Lim Chee Aun c47687e2e4 Fix / and ? key shortcuts suddenly not working 2024-01-10 00:03:36 +08:00
Lim Chee Aun 5b0d6dd58b Upgrade dependencies 2024-01-09 23:47:21 +08:00
Lim Chee Aun ecd5c7b91e . (period) keyboard shortcut = load new posts 2024-01-09 23:47:21 +08:00
Chee Aun 96387c8abb
Merge pull request #392 from JerryLerman/main
Update README.md to add hear-me.social
2024-01-08 13:43:55 +08:00
Jerry Lerman 35958d429d
Update README.md to add hear-me.social
Added phanpy.hear-me.social to the list of deployed sites
2024-01-07 21:53:54 -05:00
Lim Chee Aun 99b0b7c096 Test disable viewScroll=close for hashtag page menu
Possible fix for self-auto-closing when focusing on the
input field to add hashtag and the software keyboard resizes
the page, causing scroll event to fire and close the menu itself
2024-01-07 12:30:51 +08:00
Lim Chee Aun e44ac16396 Fix flash of unscrolled position
Due to statuses being memo-ed, need to speed up the scroll position setup
2024-01-06 19:15:48 +08:00
Lim Chee Aun 147a12cbcb Handle cards with iframe embeds 2024-01-06 16:46:45 +08:00
Lim Chee Aun 16e2ac9bce Test better equal checks 2024-01-06 12:31:25 +08:00
Lim Chee Aun 1574be2b35 Test content-visibility: auto on off-screen columns 2024-01-06 12:23:43 +08:00
Lim Chee Aun 7223baaaad Better error handling for image desc generator
400 doesn't throw error
2024-01-06 12:23:15 +08:00
Lim Chee Aun 9cffd429b0 Potential fix to infinite loop of intersection observer 2024-01-06 03:15:24 +08:00
Lim Chee Aun 9a5d749b8d Better search suggestion styles
Lighter style and fifferentiate between hover and focus
2024-01-06 01:04:14 +08:00
Lim Chee Aun e43f2283dd Resolve account URLs too 2024-01-06 01:03:30 +08:00
Lim Chee Aun be5fcc35ac Comment line extended if there's status pre-meta 2024-01-05 19:18:05 +08:00
Lim Chee Aun 54314de976 Experiment unlinked replies (again)
But still show link to the post's "thread"
2024-01-05 19:15:22 +08:00
Lim Chee Aun bc2886f7e2 Ancestor indicator animates smoother with spring 2024-01-05 19:13:51 +08:00
Lim Chee Aun 2bc1b8387e Fix missing name & short_name inside webmanifest
Need to pass env prefix to loadEnv too
2024-01-05 09:14:09 +08:00
Lim Chee Aun 3989b218d0 Need to encode the query 2024-01-04 22:00:27 +08:00
Lim Chee Aun a8331375ba Double make sure header change doesn't block scrolling 2024-01-04 19:09:30 +08:00
Lim Chee Aun 6919975c6d Remove unneeded .inview 2024-01-04 19:08:51 +08:00
Lim Chee Aun c0987209a8 Only threadify & unfurl non-reblog post object 2024-01-04 18:56:11 +08:00
Lim Chee Aun d25c2df392 Warn if icon not found 2024-01-04 18:55:21 +08:00
Lim Chee Aun 848433365d Don't limit 80px if more than 2 media 2024-01-04 18:55:14 +08:00
Lim Chee Aun 3d4ebb8abe Adjust rootMargin 2024-01-03 10:54:55 +08:00
Lim Chee Aun 72dc4cc81b Test disable menu animation 2024-01-03 09:53:08 +08:00
Lim Chee Aun 92c0a8b4f0 Test memoize svg icon 2024-01-03 09:49:48 +08:00
Lim Chee Aun 1adcca5666 Fix destructure error 2024-01-03 07:27:39 +08:00
Lim Chee Aun b4d4c61128 Experiment delay render items in carousel 2024-01-02 19:56:54 +08:00
Lim Chee Aun 764125e6b9 Test replace scroll-based to inview 2024-01-02 19:26:05 +08:00
Lim Chee Aun 098df0ad2c Test move this out of component mount
It needs to run faster
2024-01-02 17:45:58 +08:00
Lim Chee Aun e41e49884f Less paragraph margins for status cards 2024-01-02 17:45:21 +08:00
Lim Chee Aun 852f7090f6 Status card style changes 2024-01-02 12:27:39 +08:00
Lim Chee Aun d54511aa10 Test a bunch of perf-related style changes 2024-01-02 12:27:22 +08:00
Lim Chee Aun d8ceb03d74 Throttle scroll events 2024-01-02 12:25:25 +08:00
Lim Chee Aun df393ae959 Use InView to replace nearReachStart 2024-01-02 12:25:01 +08:00
Lim Chee Aun 0ebbc5b34e Don't need nearReachEnd, use InView more 2024-01-02 12:24:03 +08:00
Lim Chee Aun cf52e0776e Don't need reachStart from useScroll 2024-01-02 12:20:36 +08:00
Lim Chee Aun b168707c14 Revert "Remove DEV check"
This reverts commit d2fb86036c.
2024-01-01 18:31:59 +08:00
Lim Chee Aun d2fb86036c Remove DEV check
It refers to local dev, not the dev site
2024-01-01 18:29:21 +08:00
322 zmienionych plików z 183429 dodań i 13076 usunięć

3
.env
Wyświetl plik

@ -1,4 +1,5 @@
PHANPY_CLIENT_NAME=Phanpy
PHANPY_WEBSITE=https://phanpy.social
PHANPY_LINGVA_INSTANCES="lingva.phanpy.social lingva.lunar.icu lingva.garudalinux.org translate.plausibility.cloud"
PHANPY_PRIVACY_POLICY_URL="https://github.com/cheeaun/phanpy/blob/main/PRIVACY.MD"
PHANPY_PRIVACY_POLICY_URL="https://github.com/cheeaun/phanpy/blob/main/PRIVACY.MD"
PHANPY_TRANSLANG_INSTANCES="translang.phanpy.social"

5
.gitattributes vendored 100644
Wyświetl plik

@ -0,0 +1,5 @@
*.po linguist-generated
readme-assets/** linguist-documentation
# Diff PO file, ignore line number changes, reduce diff noise
src/locales/en.po diff=po-filter

Wyświetl plik

@ -1,40 +0,0 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''
---
**Describe the bug**
A clear and concise description of what the bug is.
- Which site: [e.g. dev.phanpy.social OR phanpy.social]
- Which instance: [e.g. mastodon.social]
**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
**Expected behavior**
A clear and concise description of what you expected to happen.
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]
**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]
**Additional context**
Add any other context about the problem here.

Wyświetl plik

@ -0,0 +1,81 @@
name: "Bug report"
description: "Create a report to help us improve"
labels:
- "bug"
body:
- type: input
id: "site"
attributes:
label: "Site"
description: |-
What site(s) did you encounter this bug on?
placeholder: |-
phanpy.social
- type: input
id: "version"
attributes:
label: "Version"
description: |-
Which Phanpy version(s) did you encounter this bug on?
You can see and copy your current version by opening the Settings menu and scrolling down to the About section.
placeholder: |-
2024.10.08.0a176e2
- type: input
id: "instance"
attributes:
label: "Instance"
description: |-
Which instance(s) did you encounter this bug on?
placeholder: |-
mastodon.social
- type: textarea
id: "Browser"
attributes:
label: "Browser"
description: |-
Which browser(s) did you encounter this bug on?
placeholder: |-
- Firefox 132.0b5 on Windows 11
- Safari 18 on iOS 18 on iPhone 16 Pro Max
- type: textarea
id: "description"
attributes:
label: "Bug description"
description: |-
A concise description of what the bug is.
If applicable, add screenshots to help explain your problem.
You can paste screenshots here and GitHub will convert them to Markdown for you.
- type: textarea
id: "steps"
attributes:
label: "To reproduce"
description: |-
A list of steps that can be performed to make the bug happen again.
If possible, add screenshots to help demonstrate the steps.
You can paste screenshots here and GitHub will convert them to Markdown for you.
placeholder: |-
1. Go to '...'
2. Click on '...'
3. Scroll down to '...'
4. See error
- type: textarea
id: "behavior"
attributes:
label: "Expected behavior"
description: |-
A concise description of what you expected to happen.
- type: textarea
id: "other"
attributes:
label: "Other"
description: |-
Anything you want to add?

Wyświetl plik

@ -0,0 +1 @@
blank_issues_enabled: true

Wyświetl plik

@ -1,20 +0,0 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: 'enhancement'
assignees: ''
---
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.

Wyświetl plik

@ -0,0 +1,37 @@
name: "Feature request"
description: "Suggest an idea for this project"
labels:
- "enhancement"
body:
- type: textarea
id: "problem"
attributes:
label: "Problem I have"
description: |-
If your request is related to a problem, please provide a clear and concise description of what the problem is.
placeholder: |-
I'm always frustrated when [...]
- type: textarea
id: "solution"
attributes:
label: "Solution I'd like"
description: |-
A clear and concise description of what you want to happen.
- type: textarea
id: "alternatives"
attributes:
label: "Alternatives considered"
description: |-
A clear and concise description of any alternative solutions or features you've considered.
- type: textarea
id: "other"
attributes:
label: "Other"
description: |-
Anything you want to add?

4
.github/release.yml vendored 100644
Wyświetl plik

@ -0,0 +1,4 @@
changelog:
exclude:
labels:
- 'i18n'

Wyświetl plik

@ -0,0 +1,79 @@
name: Custom Build
permissions:
contents: read
on:
repository_dispatch:
types: [custom-build]
workflow_dispatch:
inputs:
config:
description: 'Environment variables (one per line, KEY=VALUE format). See README.md for available variables.'
required: true
type: string
concurrency:
group: custom-build
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: production
fetch-depth: 1
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Prepare build
id: prepare
run: |
if [ "${{ github.event_name }}" = "repository_dispatch" ]; then
CONFIG="${{ github.event.client_payload.config }}"
else
CONFIG="${{ github.event.inputs.config }}"
fi
echo "$CONFIG" > .env.local
echo "✅ Created .env.local"
TIMESTAMP=$(date +%Y%m%d-%H%M%S)
ARTIFACT_NAME="phanpy-dist-${{ github.sha }}-${TIMESTAMP}"
echo "name=$ARTIFACT_NAME" >> $GITHUB_OUTPUT
echo "📦 Artifact name: $ARTIFACT_NAME"
- name: Build project
run: npm run build
- name: Upload build artifacts
id: artifact-upload
uses: actions/upload-artifact@v4
with:
name: ${{ steps.prepare.outputs.name }}
path: dist/
retention-days: 7
- name: Build completed
run: |
echo "✅ Build completed successfully!"
echo "📦 Artifact: ${{ steps.prepare.outputs.name }}"
cat >> $GITHUB_STEP_SUMMARY <<EOF
## ✅ Build Completed
**Artifact:** \`${{ steps.prepare.outputs.name }}\`
**Download:** [${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})
EOF

Wyświetl plik

@ -0,0 +1,16 @@
name: Code formatting check on pull requests
on:
pull_request:
workflow_dispatch:
jobs:
format-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- run: npm ci
- run: npm run formatting-check

Wyświetl plik

@ -0,0 +1,72 @@
name: i18n PR auto-merge
on:
pull_request:
types: [opened, synchronize, reopened, labeled]
branches:
- main
jobs:
run-and-merge:
if: github.repository == 'cheeaun/phanpy' &&
contains(github.event.pull_request.labels.*.name, 'i18n') &&
github.event.pull_request.base.ref == 'main' &&
github.event.pull_request.head.ref == 'l10n_main'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- run: sleep 15
- name: Check if the branch is dirty
run: |
git fetch origin ${{ github.event.pull_request.head.ref }}
if [ $(git rev-parse HEAD) != $(git rev-parse origin/${{ github.event.pull_request.head.ref }}) ]; then
echo "Branch is dirty. Exiting..."
exit 0
fi
- name: Check auto-merge conditions
run: |
BASE_SHA="${{ github.event.pull_request.base.sha }}"
HEAD_SHA="${{ github.event.pull_request.head.sha }}"
# Debug: Show the base and head SHA
echo "Base SHA: $BASE_SHA"
echo "Head SHA: $HEAD_SHA"
# Check if the commits exist
if ! git cat-file -e $BASE_SHA || ! git cat-file -e $HEAD_SHA; then
echo "ERROR: One or both of the commits are not available."
exit 1
fi
# Calculate the total number of lines changed (added, removed, or modified)
LINES_CHANGED=$(git diff --shortstat $BASE_SHA $HEAD_SHA | awk '{print $4 + $6 + $8}')
if [ -z "$LINES_CHANGED" ]; then
LINES_CHANGED=0
fi
echo "Total lines changed: $LINES_CHANGED"
# Check if the number of lines changed is more than 50
if [ "$LINES_CHANGED" -le 50 ]; then
exit 0
else
echo "More than 50 lines have been changed. Merging pull request."
# List of locales changed
LOCALES_CHANGED=$(git diff --name-only $BASE_SHA $HEAD_SHA | grep '\.po$' | awk -F '/' '{print $NF}' | sed 's/\.po$//' | tr '\n' ',' | sed 's/,$//')
# Better subject
# "i18n updates ([LOCALES_CHANGED])"
PR_NUMBER=$(echo ${{ github.event.pull_request.number }})
SUBJECT="i18n updates ($LOCALES_CHANGED) (#$PR_NUMBER)"
gh pr merge $PR_NUMBER --squash --subject "$SUBJECT" || true
fi
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Wyświetl plik

@ -0,0 +1,35 @@
name: Update README with list of i18n volunteers
on:
schedule:
# Every week
- cron: '0 0 * * 0'
workflow_dispatch:
jobs:
update-readme:
if: github.repository == 'cheeaun/phanpy'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- run: npm ci
- run: |
npm run fetch-i18n-volunteers
npm run readme:i18n-volunteers
# Commit & push if there are changes
if git diff --quiet README.md; then
echo "No changes to README.md"
else
echo "Changes to README.md"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
git add README.md
git commit -m "Update README.md"
git push
fi
env:
CROWDIN_ACCESS_TOKEN: ${{ secrets.CROWDIN_ACCESS_TOKEN }}

Wyświetl plik

@ -1,12 +1,17 @@
name: Pull Request to `main` from `production`
name: Pull Request into `production` from `main`
on:
push:
branches:
- main
pull_request:
types: [closed]
branches:
- main
jobs:
auto-pull-request:
if: github.repository == 'cheeaun/phanpy'
runs-on: ubuntu-latest
steps:
- uses: vsoch/pull-request-action@master

Wyświetl plik

@ -0,0 +1,25 @@
name: Playwright Tests
permissions:
contents: read
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
test:
timeout-minutes: 60
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: lts/*
- name: Install dependencies
run: npm ci
- name: Install Playwright Browsers
run: npx playwright install --with-deps webkit --only-shell
- name: Run Playwright tests
run: npm run test

Wyświetl plik

@ -7,6 +7,7 @@ on:
jobs:
tag:
if: github.repository == 'cheeaun/phanpy'
runs-on: ubuntu-latest
permissions:
contents: write
@ -18,7 +19,7 @@ jobs:
# - run: git push --tags
- uses: actions/setup-node@v3
with:
node-version: 18
node-version: 20
- run: npm ci && npm run build
- run: cd dist && zip -r ../phanpy-dist.zip . && tar -czf ../phanpy-dist.tar.gz . && cd ..
- id: tag_name

Wyświetl plik

@ -0,0 +1,33 @@
name: Update Catalogs
on:
push:
branches:
- l10n_main
workflow_dispatch:
jobs:
update-catalogs:
if: github.repository == 'cheeaun/phanpy'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: l10n_main
- uses: actions/setup-node@v4
with:
node-version: 20
- run: npm ci
- name: Update catalogs.json
run: |
node scripts/catalogs.js
if git diff --quiet src/data/catalogs.json; then
echo "No changes to catalogs.json"
else
echo "Changes to catalogs.json"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
git add src/data/catalogs.json
git commit -m "Update catalogs.json"
git push origin HEAD:l10n_main || true
fi

14
.gitignore vendored
Wyświetl plik

@ -25,6 +25,16 @@ dist-ssr
# Custom
.env.dev
src/data/instances-full.json
phanpy-dist.zip
phanpy-dist.tar.gz
phanpy-dist.tar.gz
sonda-report.html
.sonda
# Compiled locale files
src/locales/*.js
# Playwright
/test-results/
/playwright-report/
/blob-report/
/playwright/.cache/

Wyświetl plik

@ -1,19 +0,0 @@
{
"tabWidth": 2,
"useTabs": false,
"singleQuote": true,
"trailingComma": "all",
"importOrder": [
"^[^.].*.css$",
"index.css$",
".css$",
"<THIRD_PARTY_MODULES>",
"/assets/",
"^../",
"^[./]"
],
"importOrderSeparation": true,
"importOrderSortSpecifiers": true,
"importOrderGroupNamespaceSpecifiers": true,
"importOrderCaseInsensitive": true
}

373
CHANGELOG.md 100644
Wyświetl plik

@ -0,0 +1,373 @@
# Changelog
- Dates are in Singapore time zone (UTC+8)
- Doesn't include small & quick fixes
## December 15, 2022
📢 https://mastodon.social/@cheeaun/109515757404630583
- Initial launch
## December 16, 2022
📢 https://mastodon.social/@cheeaun/109540685870427959
- 📖 "Read more" for long-form posts
- 🤘 Profile metadata in Account sheet
- 💬 "Only mentions" filter in Notifications
- 🛗 Nested comments + pagination + collapsible comments
## December 24, 2022
📢 https://mastodon.social/@cheeaun/109569389041297558
- 🍰 :shortcode: expander in Compose field
- ⏲️ character count indicator same as Mastodon's front-end (including twitter-text's URL regex)
- 🙈 "Invisible Ink" effect for spoilers
## December 28, 2022
📢 https://mastodon.social/@cheeaun/109591442248622453
- 🔠 Language selector in Compose field
- 🐛 Bug fixes
## January 1, 2023
📢 https://mastodon.social/@cheeaun/109613657018189874
- ⌨️ Small list of keyboard shortcuts (j, k, o, meta+enter, esc)
- 🐛 Bug fixes
## January 6, 2023
📢 https://mastodon.social/@cheeaun/109642981521972938
- 🙈 Auto-hide header
- 💅 Small UI changes
- 🐛 Bug fixes
## January 17, 2023
📢 https://mastodon.social/users/cheeaun/statuses/109704010841850370
- 🔢 Thread count indicator
- 🔐 Handle accept/reject follow requests for locked accounts
- 📬 Unsent draft recovery
- 🎠 Boosts Carousel™
- 🐛 Bug fixes
## February 1, 2023
📢 https://mastodon.social/@cheeaun/109785026971372208
- 🔰 ALT badge inside media modals
- 👀 "Show all sensitive content" menu option for threads
- 🧵 Improved Threads UI; smarter collapsing, expand/collapse button with avatars, nesting up to level 4
- 🪟 Media modal appears beside the Detail page for large screens
- 🐛 Bug fixes
## February 19, 2023
📢 https://mastodon.social/@cheeaun/109892084130563955
- 🍰 New menu + pages: Lists, Followed Hashtags, Bookmarks, Favourites, Search, Local, Federated
- 📝 Support edit media description for posted statuses (Mastodon v4.1.0)
- ⚡ Shortcuts™ (beta) — quick jumping between configured shortcuts
- 🏛️ Experimental multi-column mode, derived from Shortcuts™
- 🐛 Bug fixes
## March 2, 2023
📢 https://mastodon.social/@cheeaun/109954214422731984
- 🔗 Handle mastodon post links
- #️⃣ Multi-hashtag timeline (5 max)
- 🥞 Context menu for posts in timeline (tap on timestamp)
- 📑 New tab/menu-bar UI for Shortcuts™
- 🐛 Bug fixes
## March 15, 2023
📢 https://mastodon.social/@cheeaun/110027507724432132
- 👥 Grouped favourites AND boosts notifications
- 🔤 Configurable text size
- 💱 Translation
- Works for spoiler/CW text, post content, poll text AND image description.
- Changeable "source" language selector for intricate cases like multilingual sentences.
- ✨ Beautiful profile sheets and pages
- 🚸 Additional prompt when posting or boosting statuses with media that has no description.
- 🐛 Bug fixes
## March 31, 2023
📢 https://mastodon.social/@cheeaun/110118589616753266
- ❌ Delete post
- 🙅 Mention, Mute, Block account
- 🪣 (Partial) Filtered posts UI
- 👥 Posts context grouping in timelines
- 👥 Boosts deduplication (beta)
- 😉 Custom emoji picker
- 🤏 Pinch-zoom for images. Ctrl/Cmd+scroll for pointers.
- 🙈 Setting to hide "Translate" button for specific languages
- 💱 Translate bio, including profile metadata
- 🎚️ Comments thread UI now nest to ∞ levels
- 🐛 Bug fixes
## April 7, 2023
📢 https://mastodon.social/@cheeaun/110157897526115895
- 🪣 Filter bar for profile page statuses with these filters:
- Include replies
- Exclude boosts
- Media only
- Featured hashtags
- 🛒 Lists CRUD and Add/Remove accounts in Lists
- 📑 Sort Followed hashtags
- 📈 New "Trending" timeline page
- New "Mentions" page
- ✉️ Show "Private mention" badge
- ⚛️ Boosted/favourited by… accounts list
- 🐛 Bug fixes
## April 25, 2023
📢 https://mastodon.social/@cheeaun/110260144082803624
- #️⃣ Allow hashtag timeline from other instances
- ✏️ Edit Shortcuts
- 🔇 Mute conversation
- 👀 "Full" & "Side peek" views for Status page
- 📶 Slight redesign for multi-column UI
- 🔗 Handle quick post URLs e.g. phanpy.social/#/https://[POST_URL] - a feature from #Elk
- 🧸 Experimental hashtag stuffing collapsing
- 🚀 Quote posts rendering
- 🪄 Experimental cloak mode
- 🐛 Bug fixes
New matrix chat room: https://matrix.to/#/%23phanpy:matrix.org
## May 11, 2023
📢 https://mastodon.social/@cheeaun/110350569225129255
- 🔔 Notification popover, for larger viewports
- ✨ New experiment: auto-refresh timeline posts
- 🔐 "Private" tab, for Private Mentions, in Mentions page
- 🫴 "Follow requests" section in Notifications page
- 📢 "Announcements" section in Notifications page
- 🐛 Bug fixes
## October 2, 2023
📢 https://mastodon.social/@cheeaun/111166122069800214
- 🔔 Web Push notifications (still beta! feedback welcomed 🙏)
- ⌨️ More keyboard shortcuts
- 👀 Profile followers and following list
- 📊 Profile posting stats, shown for accounts that you're not following
- 💁‍♂️ Alt badge — but will conditionally show as inline captions
- 👤 Handle memorial and moved accounts
- 📜 Muted and blocked users list
- 🐛 Bug fixes
## October 26, 2023
📢 https://mastodon.social/@cheeaun/111301339529679119
- 🗓️ Experimental month filter for posts on profile page
- 🗞️ Trending news carousel
- 🫰 Replace "Favourite" with "Like"
- 🐛 Bug fixes
## November 6, 2023
📢 https://mastodon.social/@cheeaun/111363831401633676
- 🏟️ Media gallery layout for hashtag page and profile page (media-only filter)
- 🫰 Small UI touches
- 🐛 Bug fixes
## December 22, 2023
📢 https://mastodon.social/@cheeaun/111624848853096639
- #️⃣ Followed hashtag indicators for non-following posts
- ↔️ Following/followed-by/mutual states in accounts list
- 🔙 Adopt `CloseWatcher` for handling back gesture/button on Chrome Android v120+ https://chromestatus.com/feature/4722261258928128
- 🗣️ "Speak" menu item for supported browsers
- 🔎 Allow add "Search" in Shortcuts/Columns
- 🛰️ Community deployments https://github.com/cheeaun/phanpy?tab=readme-ov-file#community-deployments
- 🐛 Bug fixes
## February 25, 2024
📢 https://mastodon.social/@cheeaun/111992491212397964
- 👀 Show lists containing account in the menu
- 🍽️ Redesigned context menu
- 🐛 Bug fixes
## March 6, 2024
📢 https://mastodon.social/@cheeaun/112048317932964165
- ⏱️ Catch-up (beta) ✨🆕✨
- 🚩 Report post/account
- ⛏️ Static HTML embed code for posts
- 🐛 Bug fixes
## March 26, 2024
📢 https://mastodon.social/@cheeaun/112162530547628273
- 🌪️ Keyword filters UI
- 📝 Allow 'Lists' in Shortcuts (except multi-column view)
- 🖋️ Edit Profile (only name, bio & extra fields)
- 🐛 Bug fixes
For upcoming Mastodon v4.3+:
- 🪣 Filtered notifications https://github.com/mastodon/mastodon/pull/29433
- 💔 Handle "severed relationships" notifications https://github.com/mastodon/mastodon/pull/27511 + https://github.com/mastodon/mastodon/pull/29706
For non-Mastodon servers:
- 😉 Best-effort render emoji reactions and notifications (not the reacting part)
## April 17, 2024
📢 https://mastodon.social/@cheeaun/112286757479031305
- 📸 Media-first UI experience
- Only for @Pixelfed accounts, for now.
- Still buggy, so need more feedback.
- 🎁 GIF picker (disabled by default)
- 🐛 Bug fixes
## May 6, 2024
📢 https://mastodon.social/@cheeaun/112394549895936563
- 👾 Custom emoji search. Hoverable & keyboard-accessible tooltips of shortcodes, with fuzzy search.
- 🐛 Bug fixes
## June 3, 2024
📢 https://mastodon.social/@cheeaun/112552481684496462
- ⬇️ Allow minimize composer https://mastodon.social/@cheeaun/112502500959822353
- ⚠️ Subtle warning if media file size or dimensions are too large https://mastodon.social/@cheeaun/112512838876542558
- 🗣️ Experimental client-side language detection for unspecified-language posts and composer. 80 to ~95% accuracy, 24 languages, trained dataset from Tatoeba & UDHR, 34KB gzip, powered by TinyLD (light) https://github.com/komodojp/tinyld
- 🐛 Bug fixes
## June 23, 2024
📢 https://mastodon.social/@cheeaun/112665474700277373
- 🏞️ Non-grid layout for media on post pages https://mastodon.social/@cheeaun/112592781655285124
- 🔗 Posts timeline for trending link (upcoming Mastodon v4.3) https://mastodon.social/@cheeaun/112621183860142350
- 🐛 Bug fixes
## July 22, 2024
📢 https://mastodon.social/@cheeaun/112830006096769732
- 🔔 Experimental opt-in server-side grouped notifications (for upcoming Mastodon v4.3, announced here https://oisaur.com/@renchap/112812306472121018) — it's a bit of a "downgrade" but worth testing. Described as "Potentially improved grouping window but basic grouping logic".
- 🪣 Grouped filtered posts inside boosts carousel
- 🐛 Bug fixes
## August 31, 2024
📢 https://mastodon.social/@cheeaun/113056969576068031
- 💬 Internationalization https://mastodon.social/@cheeaun/112932794480750449
- 15 languages with >50% translated: Basque, Catalan, Chinese (Simplified), Czech, Finnish, French, Galician, German, Kabyle, Korean, Persian, Portuguese, Portuguese (Brazil), Russian, Spanish
- Volunteer translations: https://crowdin.com/project/phanpy
- 🔔 V2 Notifications policy API https://mastodon.social/@cheeaun/112960426880369332
- 🔐 Initial OAuth PKCE implementation https://mastodon.social/@cheeaun/113032467744616699
- 🐛 Bug fixes
## October 9, 2024
📢 https://mastodon.social/@cheeaun/113272683452140213
- 💬 5 new languages: Dutch, Esperanto, Galician, Italian, Japanese
- 🐛 Bug fixes
Recap: Mastodon v4.3 features (https://github.com/mastodon/mastodon/releases/tag/v4.3.0) already supported on Phanpy:
- Server-side notification grouping (opt-in)
- Filtered notifications
- Severed relationships notifications
- Timeline of public posts about a trending link
- Author highlight for news articles
## November 13, 2024
📢 https://mastodon.social/@cheeaun/113475224009500738
- 💬 3 new languages: Lithuanian, Norwegian Bokmål, Ukrainian
- 🐛 Bug fixes
## March 12, 2025
📢 https://mastodon.social/@cheeaun/114149642985452634
- 🎏 Change profile header and avatar
- 🗓️ Scheduled posts
- 🗣️ Experimental implementation of Translator & Language Detector APIs (only Chrome 131 - 137) https://webmachinelearning.github.io/translation-api/
- The code: https://github.com/cheeaun/phanpy/blob/0759e6431f4572a1d0f10b8eeda0b46b9f14bc0b/src/utils/browser-translator.js
- 🧵 'Add to thread' menu when right-clicking/long-pressing compose button
- 📸 Camera button on composer, if supported (Mobile Safari opens camera, Chrome Android requires one extra step)
- 🐛 Bug fixes
## April 26, 2025
📢 https://mastodon.social/@cheeaun/114404023673367245
- 🗣️ Migrated to a new API for translations.
- Improved support from 133 to 249 languages
- ⌨️ Keyboard-layout-dependent shortcuts
- 🙈 Handle Mastodon's upcoming `blur` filter https://mastodon.social/@cheeaun/114301571477875063
- 🐛 Bug fixes
## June 8, 2025
📢 https://mastodon.social/@cheeaun/114647753143423772
- 🌟 Featured profiles (for upcoming Mastodon v4.4)
- 🔑 Revoke access token when logging out
- 📸 Respect server's media description character limit
- 🪣 Add indicator for exclusive lists
- 🧪 Sandbox https://mastodon.social/@cheeaun/114494995294330803
- 🐛 Bug fixes
## July 18, 2025
📢 https://mastodon.social/@cheeaun/114874317126202331
- 💬 Better display support for Mastodon v4.4's native quote posts
- 🧮 Math formatting for LaTeX
- 🐛 Bug fixes
## September 17, 2025
- 📝 Composer relayout
- 🔍 Recent searches
- 🏛️ Edit History Snapshots
- 🔰 Show role badges with profile usernames
- ⌛ "X months/years later" hint between list of threads or comments
- 🔗 "Open link?" prompt when clicking links that don't show domain
- 🔬 Larger-than-rendered custom emojis opens up in media modal when clicked.
- 🔭 Zoom in/out buttons in Custom Emojis picker
- 🐛 Bug fixes
<!--
## Next
- 🐛 Bug fixes
-->

Wyświetl plik

@ -8,7 +8,7 @@ Phanpy is hosted on [Cloudflare Pages](https://pages.cloudflare.com/) as a stati
## Translations
Phanpy uses [Lingva API](https://github.com/cheeaun/lingva-api) and [Lingva Translate](https://github.com/thedaviddelta/lingva-translate) as fallbacks for translating post content, profile bio and media description.
Phanpy uses [TransLang API](https://github.com/cheeaun/translang-api) for translating post content, profile bio and media description. Read more about [TransLang API's privacy policy](https://github.com/cheeaun/translang-api/blob/main/PRIVACY.md).
## Error logging

257
README.md
Wyświetl plik

@ -49,15 +49,21 @@ Everything is designed and engineered following my taste and vision. This is a p
## Subtle UI implementations
### User name display
<details>
<summary>
<b>User name display</b>
</summary>
![User name display](readme-assets/user-name-display.jpg)
- On the timeline, the user name is displayed as `[NAME] @[username]`.
- For the `@[username]`, always exclude the instance domain name.
- If the `[NAME]` *looks the same* as the `@[username]`, then the `@[username]` is excluded as well.
### Boosts Carousel
</details>
<details>
<summary>
<b>Boosts Carousel</b>
</summary>
![Boosts Carousel](readme-assets/boosts-carousel.jpg)
@ -65,7 +71,12 @@ Everything is designed and engineered following my taste and vision. This is a p
- If number of boosts are more than 3 quarters of total posts, boosts carousel UI will be slotted at the end of total posts fetched (per "page").
- Else, boosts carousel UI will be slotted in between the posts.
### Thread number badge (e.g. Thread 1/X)
</details>
<details>
<summary>
<b>Thread number badge (e.g. Thread 1/X)</b>
</summary>
![Thread number badge](readme-assets/thread-number-badge.jpg)
@ -73,8 +84,12 @@ Everything is designed and engineered following my taste and vision. This is a p
- If root post is found, badge will show the index number of the post in the thread.
- Limit up to 3 API requests as the root post may be very old or the thread is super long.
- If index number couldn't be found, badge will fallback to showing `Thread` without the number.
</details>
### Hashtag stuffing collapsing
<details>
<summary>
<b>Hashtag stuffing collapsing</b>
</summary>
![Hashtag stuffing collapsing](readme-assets/hashtag-stuffing-collapsing.jpg)
@ -85,8 +100,12 @@ Everything is designed and engineered following my taste and vision. This is a p
- Collapsed hashtags will be appended with `...` at the end.
- They are also slightly faded out to reduce visual noise.
- Opening the post view will reveal the hashtags uncollapsed.
</details>
### Filtered posts
<details>
<summary>
<b>Filtered posts</b>
</summary>
- "Hide completely"-filtered posts will be hidden, with no UI to reveal it.
- "Hide with a warning"-filtered posts will be partially hidden, showing the filter name and author name.
@ -94,18 +113,20 @@ Everything is designed and engineered following my taste and vision. This is a p
- Clicking it will open the Post page.
- Long-pressing or right-clicking it will "peek" the post with a bottom sheet UI.
- On boosts carousel, they are sorted to the end of the carousel.
</details>
## Development
Prerequisites: Node.js 18+
Prerequisites: Node.js 20+
- `npm install` - Install dependencies
- `npm run dev` - Start development server
- `npm run dev` - Start development server and `messages:extract` (`clean` + `watch`) in parallel
- `npm run build` - Build for production
- `npm run preview` - Preview the production build
- `npm run fetch-instances` - Fetch instances list from [instances.social](https://instances.social/), save it to `src/data/instances.json`
- requires `.env.dev` file with `INSTANCES_SOCIAL_SECRET_TOKEN` variable set
- `npm run fetch-instances` - Fetch instances list from [joinmastodon.org/servers](https://joinmastodon.org/servers), save it to `src/data/instances.json`
- `npm run sourcemap` - Run `source-map-explorer` on the production build
- `npm run messages:extract` - Extract messages from source files and update the locale message catalogs
- `npm run git:po-filter` - Configure `git` to use `po-filter` for diffing `.po` files
## Tech stack
@ -116,10 +137,67 @@ Prerequisites: Node.js 18+
- [masto.js](https://github.com/neet/masto.js/) - Mastodon API client
- [Iconify](https://iconify.design/) - Icon library
- [MingCute icons](https://www.mingcute.com/)
- [Lingui](https://lingui.dev/) - Internationalization
- Vanilla CSS - _Yes, I'm old school._
Some of these may change in the future. The front-end world is ever-changing.
## Internationalization
All translations are available as [gettext](https://en.wikipedia.org/wiki/Gettext) `.po` files in the `src/locales` folder. The default language is English (`en`). [CLDR Plural Rules](https://cldr.unicode.org/index/cldr-spec/plural-rules) are used for pluralization. RTL (right-to-left) languages are also supported with proper text direction, icon rendering and layout.
On page load, default language is detected via these methods, in order (first match is used):
1. URL parameter `lang` e.g. `/?lang=zh-Hant`
2. `localStorage` key `lang`
3. Browser's `navigator.language`
Users can change the language in the settings, which sets the `localStorage` key `lang`.
### Guide for translators
*Inspired by [Translate WordPress Handbook](https://make.wordpress.org/polyglots/handbook/):
- [Dont translate literally, translate organically](https://make.wordpress.org/polyglots/handbook/translating/expectations/#dont-translate-literally-translate-organically).
- [Try to keep the same level of formality (or informality)](https://make.wordpress.org/polyglots/handbook/translating/expectations/#try-to-keep-the-same-level-of-formality-or-informality)
- [Dont use slang or audience-specific terms](https://make.wordpress.org/polyglots/handbook/translating/expectations/#try-to-keep-the-same-level-of-formality-or-informality)
- Be attentive to placeholders for variables. Many strings have placesholders e.g. `{account}` (variable), `<0>{name}</0>` (tag with variable) and `#` (number placeholder).
- [Ellipsis](https://en.wikipedia.org/wiki/Ellipsis) (…) is intentional. Don't remove it.
- Nielsen Norman Group: ["Include Ellipses in Command Text to Indicate When More Information Is Required"](https://www.nngroup.com/articles/ui-copy/)
- Apple Human Interface Guidelines: ["Append an ellipsis to a menu items label when the action requires more information before it can complete. The ellipsis character (…) signals that people need to input information or make additional choices, typically within another view."](https://developer.apple.com/design/human-interface-guidelines/menus)
- Windows App Development: ["Ellipses mean incompleteness."](https://learn.microsoft.com/en-us/windows/win32/uxguide/text-ui)
- Date timestamps, date ranges, numbers, language names and text segmentation are handled by the [ECMAScript Internationalization API](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl).
- [`Intl.DateTimeFormat`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat) - e.g. "8 Aug", "08/08/2024"
- [`Intl.RelativeTimeFormat`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat) - e.g. "2 days ago", "in 2 days"
- [`Intl.NumberFormat`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat) - e.g. "1,000", "10K"
- [`Intl.DisplayNames`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames) - e.g. "English" (`en`) in Traditional Chinese (`zh-Hant`) is "英文"
- [`Intl.Locale`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale) (with polyfill for older browsers)
- [`Intl.Segmenter`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter) (with polyfill for older browsers)
### Technical notes
- IDs for strings are auto-generated instead of explicitly defined. Some of the [benefits](https://lingui.dev/tutorials/explicit-vs-generated-ids#benefits-of-generated-ids) are avoiding the "naming things" problem and avoiding duplicates.
- Explicit IDs might be introduced in the future when requirements and priorities change. The library (Lingui) allows both.
- Please report issues if certain strings are translated differently based on context, culture or region.
- There are no strings for push notifications. The language is set on the instance server.
- Native HTML date pickers, e.g. `<input type="month">` will always follow the system's locale and not the user's set locale.
- "ALT" in ALT badge is not translated. It serves as a a recognizable standard across languages.
- Custom emoji names are not localized, therefore searches don't work for non-English languages.
- GIPHY API supports [a list of languages for searches](https://developers.giphy.com/docs/optional-settings/#language-support).
- Unicode Right-to-left mark (RLM) (`U+200F`, `&rlm;`) may need to be used for mixed RTL/LTR text, especially for [`<title>` element](https://www.w3.org/International/questions/qa-html-dir.en.html#title_element) (`document.title`).
- On development, there's an additional `pseudo-LOCALE` locale, used for [pseudolocalization](https://en.wikipedia.org/wiki/Pseudolocalization). It's for testing and won't show up on production.
- When building for production, English (`en`) catalog messages are not bundled separatedly. Other locales are bundled as separate files and loaded on demand. This ensures that `en` is always available as fallback.
### Volunteer translations
[![Crowdin](https://badges.crowdin.net/phanpy/localized.svg)](https://crowdin.com/project/phanpy)
[![Languages chart](https://badges.awesome-crowdin.com/translation-14836566-703337.png)](https://crowdin.com/project/phanpy)
Translations are managed on [Crowdin](https://crowdin.com/project/phanpy). You can help by volunteering translations.
Read the [intro documentation](https://support.crowdin.com/for-volunteer-translators/) to get started.
## Self-hosting
This is a **pure static web app**. You can host it anywhere you want.
@ -130,16 +208,22 @@ Two ways (choose one):
Go to [Releases](https://github.com/cheeaun/phanpy/releases) and download the latest `phanpy-dist.zip` or `phanpy-dist.tar.gz`. It's pre-built so don't need to run any install/build commands. Extract it. Serve the folder of extracted files.
> [!IMPORTANT]
> Text translations connect to an **external service** (`translang.phanpy.social`).
### Custom-build way
Requires [Node.js](https://nodejs.org/).
Download or `git clone` this repository. Use `production` branch for *stable* releases, `main` for *latest*. Build it by running `npm run build` (after `npm install`). Serve the `dist` folder.
> [!IMPORTANT]
> Text translations connect to an **external service** (`translang.phanpy.social`). This can be configured with environment variables if you want to [self-host your own instance](#translang-api-hosting).
Customization can be done by passing environment variables to the build command. Examples:
```bash
PHANPY_APP_TITLE="Phanpy Dev" \
PHANPY_CLIENT_NAME="Phanpy Dev" \
PHANPY_WEBSITE="https://dev.phanpy.social" \
npm run build
```
@ -175,11 +259,32 @@ Available variables:
- `PHANPY_PRIVACY_POLICY_URL` (optional, default to official instance's privacy policy):
- URL of the privacy policy page
- May specify the instance's own privacy policy
- `PHANPY_LINGVA_INSTANCES` (optional, space-separated list, default: `lingva.phanpy.social [...hard-coded list of fallback instances]`):
- `PHANPY_DEFAULT_LANG` (optional):
- Default language is English (`en`) if not specified.
- Fallback language after multiple detection methods (`lang` query parameter, `lang` key in `localStorage` and `navigator.language`)
- `PHANPY_REFERRER_POLICY` (optional, default: `origin`):
- Referrer policy for the site. See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referrer-Policy).
- This is applied with the `<meta>` tag on the client-side.
- The policy can also be set with `Referrer-Policy` header configured on the server-side (not this variable).
- Note that since Phanpy uses hash-based URLs, the referrer does not include the hash part.
- `PHANPY_LINGVA_INSTANCES` (**DEPRECATED**, optional, space-separated list, default: `lingva.phanpy.social [...hard-coded list of fallback instances]`):
- Specify a space-separated list of instances. First will be used as default before falling back to the subsequent instances. If there's only 1 instance, means no fallback.
- May specify a self-hosted Lingva instance, powered by either [lingva-translate](https://github.com/thedaviddelta/lingva-translate) or [lingva-api](https://github.com/cheeaun/lingva-api)
- List of fallback instances hard-coded in `/.env`
- [↗️ List of lingva-translate instances](https://github.com/thedaviddelta/lingva-translate?tab=readme-ov-file#instances)
- `PHANPY_TRANSLANG_INSTANCES` (optional, space-separated list, default: `translang.phanpy.social`):
- Specify a space-separated list of instances. First will be used as default before falling back to the subsequent instances. If there's only 1 instance, means no fallback.
- May specify a self-hosted Translating instance, powered by [translang-api](https://github.com/cheeaun/translang-api).
- List of instances hard-coded in `/.env`
- `PHANPY_IMG_ALT_API_URL` (optional, no defaults):
- API endpoint for self-hosted instance of [img-alt-api](https://github.com/cheeaun/img-alt-api).
- If provided, a setting will appear for users to enable the image description generator in the composer. Disabled by default.
- `PHANPY_GIPHY_API_KEY` (optional, no defaults):
- API key for [GIPHY](https://developers.giphy.com/). See [API docs](https://developers.giphy.com/docs/api/).
- If provided, a setting will appear for users to enable the GIF picker in the composer. Disabled by default.
- This is not self-hosted.
- `PHANPY_DISALLOW_ROBOTS` (optional, default: not set):
- Set to any value (`true`, `1`, etc) to override the robots.txt file and disallow all web crawlers from indexing the site
### Static site hosting
@ -187,18 +292,32 @@ Try online search for "how to self-host static sites" as there are many ways to
#### Lingva-translate or lingva-api hosting
See documentation for [lingva-translate](https://github.com/thedaviddelta/lingva-translate) or [lingva-api](https://github.com/cheeaun/lingva-api).
⚠️ **DEPRECATED**. See documentation for [lingva-translate](https://github.com/thedaviddelta/lingva-translate) or [lingva-api](https://github.com/cheeaun/lingva-api).
#### Translang API hosting
See documentation for [translang-api](https://github.com/cheeaun/translang-api).
## Community deployments
These are self-hosted by other wonderful folks.
- [ferengi.one](https://ferengi.one/) by [@david@collantes.social](https://collantes.social/@david)
- [phanpy.blaede.family](https://phanpy.blaede.family/) by [@cassidy@blaede.family](https://mastodon.blaede.family/@cassidy)
- [phanpy.mstdn.mx](https://phanpy.mstdn.mx/) by [@maop@mstdn.mx](https://mstdn.mx/@maop)
- [phanpy.vmst.io](https://phanpy.vmst.io/) by [@vmstan@vmst.io](https://vmst.io/@vmstan)
- [phanpy.gotosocial.social](https://phanpy.gotosocial.social/) by [@admin@gotosocial.social](https://gotosocial.social/@admin)
- [ferengi.one](https://m.ferengi.one/) by [@david@weaknotes.com](https://weaknotes.com/@david)
- [halo.mookiesplace.com](https://halo.mookiesplace.com) by [@mookie@suigow.xyz](https://suigow.xyz/@mookie)
- [phanpy.app](https://phanpy.app) by [@bumble@ibe.social](https://ibe.social/@bumble)
- [phanpy.bauxite.tech](https://phanpy.bauxite.tech) by [@b4ux1t3@hachyderm.io](https://hachyderm.io/@b4ux1t3)
- [phanpy.blaede.family](https://phanpy.blaede.family/) by [@cassidy@blaede.family](https://mastodon.blaede.family/@cassidy)
- [phanpy.crmbl.uk](https://phanpy.crmbl.uk) by [@snail@crmbl.uk](https://mstdn.crmbl.uk/@snail)
- [phanpy.cz](https://phanpy.cz) by [@zdendys@mamutovo.cz](https://mamutovo.cz/@zdendys)
- [phanpy.fulda.social](https://phanpy.fulda.social) by [@Ganneff@fulda.social](https://fulda.social/@Ganneff)
- [phanpy.gotosocial.social](https://phanpy.gotosocial.social/) by [@admin@gotosocial.social](https://gotosocial.social/@admin)
- [phanpy.hear-me.social](https://phanpy.hear-me.social) by [@admin@hear-me.social](https://hear-me.social/@admin)
- [phanpy.mastodon.world](https://phanpy.mastodon.world) by [@ruud@mastodon.world](https://mastodon.world/@ruud)
- [phanpy.mstdn.mx](https://phanpy.mstdn.mx/) by [@maop@mstdn.mx](https://mstdn.mx/@maop)
- [phanpy.social.tchncs.de](https://phanpy.social.tchncs.de) by [@milan@social.tchncs.de](https://social.tchncs.de/@milan)
- [phanpy.tilde.zone](https://phanpy.tilde.zone) by [@ben@tilde.zone](https://tilde.zone/@ben)
- [phanpy.vmst.io](https://phanpy.vmst.io/) by [@vmstan@vmst.io](https://vmst.io/@vmstan)
- [phanpy.linuxusers.in](https://phanpy.linuxusers.in) by [@dharmik@linuxusers.in](https://linuxusers.in/dharmik)
> Note: Add yours by creating a pull request.
@ -220,6 +339,90 @@ Costs involved in running and developing this web app:
[![Contributors](https://contrib.rocks/image?repo=cheeaun/phanpy)](https://github.com/cheeaun/phanpy/graphs/contributors)
### Translation volunteers
<!-- i18n volunteers start -->
- <img src="https://crowdin-static.cf-downloads.crowdin.com/avatar/16945821/medium/3da66a1dde4951ad34c33ca23241b864_default.png" alt="" width="16" height="16" /> A.Mason (Polish)
- <img src="https://crowdin-static.cf-downloads.crowdin.com/avatar/12571163/medium/9f3ea938f4243f5ffe2a43f814ddc9e8_default.png" alt="" width="16" height="16" /> alidsds11 (Arabic)
- <img src="https://crowdin-static.cf-downloads.crowdin.com/avatar/16180744/medium/5b04ae975b23895635130d7a176515cb_default.png" alt="" width="16" height="16" /> alternative (Korean)
- <img src="https://crowdin-static.cf-downloads.crowdin.com/avatar/16848873/medium/d8773fdb621f4c9c1b08d2c641fa519a.jpeg" alt="" width="16" height="16" /> AmaseCocoa (Japanese)
- <img src="https://crowdin-static.cf-downloads.crowdin.com/avatar/13170041/medium/603136896af17fc005fd592ce3f48717_default.png" alt="" width="16" height="16" /> BoFFire (Arabic, French, Kabyle)
- <img src="https://crowdin-static.cf-downloads.crowdin.com/avatar/12898464/medium/d3758a76b894bade4bf271c9b32ea69b.png" alt="" width="16" height="16" /> Brawaru (Russian)
- <img src="https://crowdin-static.cf-downloads.crowdin.com/avatar/15460040/medium/1cfcfe5f5511b783b5d9f2b968bad819.png" alt="" width="16" height="16" /> cbasje (Dutch)
- <img src="https://crowdin-static.cf-downloads.crowdin.com/avatar/15525631/medium/51293156034d0236f1a1020c10f7d539_default.png" alt="" width="16" height="16" /> cbo92 (French)
- <img src="https://crowdin-static.cf-downloads.crowdin.com/avatar/15910131/medium/67fab7eeab5551853450e76e2ef19e59.jpeg" alt="" width="16" height="16" /> CDN (Chinese Simplified)
- <img src="https://crowdin-static.cf-downloads.crowdin.com/avatar/12513809/medium/b56324e44ae26da6db7793bc467a70e2.png" alt="" width="16" height="16" /> codl (French)
- <img src="https://crowdin-static.cf-downloads.crowdin.com/avatar/16556801/medium/ed5e501ca1f3cc6525d2da28db646346.jpeg" alt="" width="16" height="16" /> dannypsnl (Chinese Traditional)
- <img src="https://crowdin-static.cf-downloads.crowdin.com/avatar/3711/medium/c97239bb54623a50eb43cc6b801bb156.jpg" alt="" width="16" height="16" /> databio (Catalan)
- <img src="https://crowdin-static.cf-downloads.crowdin.com/avatar/16533843/medium/ac7af8776858a992d992cf6702d1aaae.jpg" alt="" width="16" height="16" /> Dizro (Italian)
- <img src="https://crowdin-static.cf-downloads.crowdin.com/avatar/16574625/medium/f2ac3a4f32f104a3a6d4085d4bcb3924_default.png" alt="" width="16" height="16" /> Drift6944 (Czech)
- <img src="https://crowdin-static.cf-downloads.crowdin.com/avatar/12618120/medium/ccb11bd042bbf4c7189033f7af2dbd32_default.png" alt="" width="16" height="16" /> drydenwu (Chinese Traditional)
- <img src="https://crowdin-static.cf-downloads.crowdin.com/avatar/13557465/medium/8feebf3677fa80c01e8c54c4fbe097e0_default.png" alt="" width="16" height="16" /> elissarc (French)
- <img src="https://crowdin-static.cf-downloads.crowdin.com/avatar/16528627/medium/9036f6eced0257f4e1ea4c5bd499de2d_default.png" alt="" width="16" height="16" /> ElPamplina (Spanish)
- <img src="https://crowdin-static.cf-downloads.crowdin.com/avatar/15592209/medium/28f10212dce24e74c25e27ea6d0e9126.png" alt="" width="16" height="16" /> filipesmedeiros (Portuguese)
- <img src="https://crowdin-static.cf-downloads.crowdin.com/avatar/14277386/medium/29b30d2c73a214000e3941c9978f49e4_default.png" alt="" width="16" height="16" /> Fitik (Esperanto, Hebrew)
- <img src="https://crowdin-static.cf-downloads.crowdin.com/avatar/14444512/medium/99d0e7a3076deccbdfe0aa0b0612308c.jpeg" alt="" width="16" height="16" /> Freeesia (Japanese)
- <img src="https://crowdin-static.cf-downloads.crowdin.com/avatar/15777621/medium/9e3409aac9c20973984440aa1542b260_default.png" alt="" width="16" height="16" /> gflorian (German)
- <img src="https://crowdin-static.cf-downloads.crowdin.com/avatar/12617257/medium/7a0122f352a94d95be10780bb83f63ef.jpg" alt="" width="16" height="16" /> ghose (Galician)
- <img src="https://crowdin-static.cf-downloads.crowdin.com/avatar/15248754/medium/0dac6334ea0f4e8d4194a605c0a5594a.jpeg" alt="" width="16" height="16" /> hongminhee (Korean)
- <img src="https://crowdin-static.cf-downloads.crowdin.com/avatar/16529833/medium/2122d0c5d61c00786ab6d5e5672d4098.png" alt="" width="16" height="16" /> Hugoglyph (Esperanto, Spanish)
- <img src="https://crowdin-static.cf-downloads.crowdin.com/avatar/13454728/medium/1f78b7124b3c962bc4ae55e8d701fc91_default.png" alt="" width="16" height="16" /> isard (Catalan)
- <img src="https://crowdin-static.cf-downloads.crowdin.com/avatar/16646485/medium/5d76c44212a4048a815ab437fb170856_default.png" alt="" width="16" height="16" /> kaliuwu (Polish)
- <img src="https://crowdin-static.cf-downloads.crowdin.com/avatar/16532403/medium/4cefb19623bcc44d7cdb9e25aebf5250.jpeg" alt="" width="16" height="16" /> karlafej (Czech)
- <img src="https://crowdin-static.cf-downloads.crowdin.com/avatar/15791971/medium/1790a2101ceb13f61816b8fe6fbe6d90.jpeg" alt="" width="16" height="16" /> katullo11 (Italian)
- <img src="https://crowdin-static.cf-downloads.crowdin.com/avatar/14677260/medium/e9f17e62ab69ed6212a16c94d779e7f3.png" alt="" width="16" height="16" /> Kytta (German)
- <img src="https://crowdin-static.cf-downloads.crowdin.com/avatar/16529521/medium/ae6add93a901b0fefa2d9b1077920d73.png" alt="" width="16" height="16" /> llun (Thai)
- <img src="https://crowdin-static.cf-downloads.crowdin.com/avatar/16291756/medium/a662122faa4f9a71b259b0e561f923b4.png" alt="" width="16" height="16" /> lucsdev24 (Occitan, Portuguese, Portuguese, Brazilian)
- <img src="https://crowdin-static.cf-downloads.crowdin.com/avatar/16640089/medium/4b7d8d275d7a7bff564adde51e09b473_default.png" alt="" width="16" height="16" /> LukeHong (Chinese Traditional)
- <img src="https://crowdin-static.cf-downloads.crowdin.com/avatar/17345822/medium/3013b04d3a49336637e51dba33ab1a3d.jpeg" alt="" width="16" height="16" /> mahefa.randimbisoa (French)
- <img src="https://crowdin-static.cf-downloads.crowdin.com/avatar/12822971/medium/4ecbe6d1248536084902925beb0b63e4.png" alt="" width="16" height="16" /> Mannivu (Italian)
- <img src="https://crowdin-static.cf-downloads.crowdin.com/avatar/13990351/medium/86942d51f67a5f5366c5d6385ea59b77_default.png" alt="" width="16" height="16" /> manuelviens (French)
- <img src="https://crowdin-static.cf-downloads.crowdin.com/avatar/16537713/medium/825f0bf1a14fc545a76891a52839d86e_default.png" alt="" width="16" height="16" /> marcin.kozinski (Polish)
- <img src="https://crowdin-static.cf-downloads.crowdin.com/avatar/16812323/medium/72bffbdf4a331845f23400eafa0b3d48.jpeg" alt="" width="16" height="16" /> martinmodrak (Czech)
- <img src="https://crowdin-static.cf-downloads.crowdin.com/avatar/13044/medium/bfa55b9a0569a9e382fd694c91d3db1b_default.png" alt="" width="16" height="16" /> misk (Polish)
- <img src="https://crowdin-static.cf-downloads.crowdin.com/avatar/13521465/medium/76cb9aa6b753ce900a70478bff7fcea0.png" alt="" width="16" height="16" /> mkljczkk (Polish)
- <img src="https://crowdin-static.cf-downloads.crowdin.com/avatar/12882812/medium/77744d8db46e9a3e09030e1a02b7a572.jpeg" alt="" width="16" height="16" /> mojosoeun (Korean)
- <img src="https://crowdin-static.cf-downloads.crowdin.com/avatar/13613969/medium/c7834ddc0ada84a79671697a944bb274.png" alt="" width="16" height="16" /> moreal (Korean)
- <img src="https://crowdin-static.cf-downloads.crowdin.com/avatar/14158861/medium/ba1ff31dc5743b067ea6685f735229a5_default.png" alt="" width="16" height="16" /> MrWillCom (Chinese Simplified)
- <img src="https://crowdin-static.cf-downloads.crowdin.com/avatar/15652333/medium/7f36f289f9e2fe41d89ad534a1047f0e.png" alt="" width="16" height="16" /> nclm (French)
- <img src="https://crowdin-static.cf-downloads.crowdin.com/avatar/15000639/medium/ebbf0bb7d5027a1903d11b7f5f34f65b.jpeg" alt="" width="16" height="16" /> nycterent (Lithuanian)
- <img src="https://crowdin-static.cf-downloads.crowdin.com/avatar/16539461/medium/2f41b9f0b802c1d200a6ab62167a7229_default.png" alt="" width="16" height="16" /> pazpi (Italian)
- <img src="https://crowdin-static.cf-downloads.crowdin.com/avatar/13954917/medium/56a2cba267eb1b5d122bf62ddc0dd732_default.png" alt="" width="16" height="16" /> PPNplus (Thai)
- <img src="https://crowdin-static.cf-downloads.crowdin.com/avatar/15106977/medium/54bf93b19af8bbfdee579ea51685bafa.jpeg" alt="" width="16" height="16" /> punkrockgirl (Basque)
- <img src="https://crowdin-static.cf-downloads.crowdin.com/avatar/16536247/medium/f010c8e718a36229733a8b58f6bad2a4_default.png" alt="" width="16" height="16" /> radecos (French)
- <img src="https://crowdin-static.cf-downloads.crowdin.com/avatar/16538917/medium/092ec03f56f9dd1cbce94379fa4d4d38.png" alt="" width="16" height="16" /> Razem (Czech)
- <img src="https://crowdin-static.cf-downloads.crowdin.com/avatar/14345134/medium/89a299239890c79a1d791d08ec3951dc.png" alt="" width="16" height="16" /> realpixelcode (German)
- <img src="https://crowdin-static.cf-downloads.crowdin.com/avatar/16527325/medium/37ebb27e7a50f7f85ae93beafc7028a2.jpg" alt="" width="16" height="16" /> rezahosseinzadeh (Persian)
- <img src="https://crowdin-static.cf-downloads.crowdin.com/avatar/13422319/medium/66632a98d73d48e36753d94ebcec9d4f.png" alt="" width="16" height="16" /> rwmpelstilzchen (Esperanto, Hebrew)
- <img src="https://crowdin-static.cf-downloads.crowdin.com/avatar/16538605/medium/bcdb6e3286b7d6237923f3a9383eed29.png" alt="" width="16" height="16" /> SadmL (Russian)
- <img src="https://crowdin-static.cf-downloads.crowdin.com/avatar/16539171/medium/0ce95ef6b3b0566136191fbedc1563d0.png" alt="" width="16" height="16" /> SadmL_AI (Russian)
- <img src="https://crowdin-static.cf-downloads.crowdin.com/avatar/16121928/medium/b1dd34dc3e93b64b93b94aedca0c5b7d.jpg" alt="" width="16" height="16" /> Schishka71 (Russian)
- <img src="https://crowdin-static.cf-downloads.crowdin.com/avatar/17206524/medium/1b0a8f9eafe7326be6968c6aed14c872.png" alt="" width="16" height="16" /> seizeheures (Esperanto)
- <img src="https://crowdin-static.cf-downloads.crowdin.com/avatar/12381015/medium/35e3557fd61d85f9a5b84545d9e3feb4.png" alt="" width="16" height="16" /> shuuji3 (Japanese)
- <img src="https://crowdin-static.cf-downloads.crowdin.com/avatar/14565190/medium/79100599131b7776e9803e4b696915a3_default.png" alt="" width="16" height="16" /> Sky_NiniKo (French)
- <img src="https://crowdin-static.cf-downloads.crowdin.com/avatar/17237304/medium/7954dfd36547e9d1f13266a52e9aa1b5_default.png" alt="" width="16" height="16" /> StasZin4 (Ukrainian)
- <img src="https://crowdin-static.cf-downloads.crowdin.com/avatar/13143526/medium/30871da23d51d7e41bb02f3c92d7f104.png" alt="" width="16" height="16" /> Steffo99 (Italian)
- <img src="https://crowdin-static.cf-downloads.crowdin.com/avatar/16532441/medium/1a47e8d80c95636e02d2260f6e233ca5.png" alt="" width="16" height="16" /> Su5hicz (Czech)
- <img src="https://crowdin-static.cf-downloads.crowdin.com/avatar/12579488/medium/699394d1acfe986a31532007534c7656.jpg" alt="" width="16" height="16" /> svetlemodry (Czech)
- <img src="https://crowdin-static.cf-downloads.crowdin.com/avatar/16530049/medium/683f3581620c6b4a5c753b416ed695a7.jpeg" alt="" width="16" height="16" /> tferrermo (Spanish)
- <img src="https://crowdin-static.cf-downloads.crowdin.com/avatar/15752199/medium/7e9efd828c4691368d063b19d19eb894.png" alt="" width="16" height="16" /> tkbremnes (Norwegian Bokmal)
- <img src="https://crowdin-static.cf-downloads.crowdin.com/avatar/16527851/medium/649e5a9a8a8cc61ced670d89e9cca082.png" alt="" width="16" height="16" /> tux93 (German)
- <img src="https://crowdin-static.cf-downloads.crowdin.com/avatar/16236470/medium/315b1ebbd38e0f7e41d44bee752afa33.jpg" alt="" width="16" height="16" /> Usia (Ukrainian)
- <img src="https://crowdin-static.cf-downloads.crowdin.com/avatar/16791511/medium/321c72613cd27efc3005e7c3bf383578.jpeg" alt="" width="16" height="16" /> uzaylul (Turkish)
- <img src="https://crowdin-static.cf-downloads.crowdin.com/avatar/14427566/medium/ab733b5044c21867fc5a9d1b22cd2c03.png" alt="" width="16" height="16" /> Vac31. (Lithuanian)
- <img src="https://crowdin-static.cf-downloads.crowdin.com/avatar/16026914/medium/4f2a96210b76cbc330584cfdd01fabc4_default.png" alt="" width="16" height="16" /> valtlai (Finnish)
- <img src="https://crowdin-static.cf-downloads.crowdin.com/avatar/16608515/medium/85506c21dce8df07843ca11908ee3951.jpeg" alt="" width="16" height="16" /> vasiriri (Polish)
- <img src="https://crowdin-static.cf-downloads.crowdin.com/avatar/16355626/medium/a10a29f0016c6beb94e8219d50e8b8d7.jpeg" alt="" width="16" height="16" /> voitech (Polish)
- <img src="https://crowdin-static.cf-downloads.crowdin.com/avatar/16563757/medium/af4556c13862d1fd593b51084a159b75_default.png" alt="" width="16" height="16" /> voyagercy (Chinese Traditional)
- <img src="https://crowdin-static.cf-downloads.crowdin.com/avatar/15982109/medium/9c03062bdc1d3c6d384dbfead97c26ba.jpeg" alt="" width="16" height="16" /> xabi_itzultzaile (Basque)
- <img src="https://crowdin-static.cf-downloads.crowdin.com/avatar/16556017/medium/216e0f7a0c35b079920366939a3aaca7_default.png" alt="" width="16" height="16" /> xen4n (Ukrainian)
- <img src="https://crowdin-static.cf-downloads.crowdin.com/avatar/16532657/medium/f309f319266e1ff95f3070eab0c9a9d9_default.png" alt="" width="16" height="16" /> xqueralt (Catalan)
- <img src="https://crowdin-static.cf-downloads.crowdin.com/avatar/15583431/medium/14973556de7721e642701bf74d6fb053.png" alt="" width="16" height="16" /> Yukaii (Chinese Traditional)
- <img src="https://crowdin-static.cf-downloads.crowdin.com/avatar/14360216/medium/7e48473691456fce95e1be687045377c.jpeg" alt="" width="16" height="16" /> Zet24 (Arabic)
- <img src="https://crowdin-static.cf-downloads.crowdin.com/avatar/14041603/medium/6ab77a0467b06aeb49927c6d9c409f89.jpg" alt="" width="16" height="16" /> ZiriSut (Kabyle)
- <img src="https://crowdin-static.cf-downloads.crowdin.com/avatar/16530601/medium/e1b6d5c24953b6405405c1ab33c0fa46.jpeg" alt="" width="16" height="16" /> zkreml (Czech)
<!-- i18n volunteers end -->
## Backstory
I am one of the earliest users of Twitter. Twitter was launched on [15 July 2006](https://en.wikipedia.org/wiki/Twitter). I joined on December 2006 and my [first tweet](https://twitter.com/cheeaun/status/1298723) was posted on 18 December 2006.
@ -234,21 +437,29 @@ And here I am. Building a Mastodon web client.
## Alternative web clients
- Phanpy forks ↓
- [Agora](https://agorasocial.app/)
- [Pinafore](https://pinafore.social/) ([retired](https://nolanlawson.com/2023/01/09/retiring-pinafore/)) - forks ↓
- [Semaphore](https://semaphore.social/)
- [Semaphore](https://semaphore.social/) ([archived](https://github.com/NickColley/semaphore))
- [Enafore](https://enafore.social/)
- [Cuckoo+](https://www.cuckoo.social/)
- [Cuckoo+](https://www.cuckoo.social/) (down)
- [Sengi](https://nicolasconstant.github.io/sengi/)
- [Soapbox](https://fe.soapbox.pub/)
- [Elk](https://elk.zone/) - forks ↓
- [elk.fedified.com](https://elk.fedified.com/)
- [elk.fedified.com](https://elk.fedified.com/) (gone, redirects to elk.zone)
- [crab](https://github.com/maybeanerd/crab)
- [Glowrea](https://github.com/s414june/glowrea)
- [Mastodeck](https://mastodeck.com/)
- [Trunks](https://trunks.social/)
- [Tooty](https://github.com/n1k0/tooty)
- [Litterbox](https://litterbox.koyu.space/)
- [Statuzer](https://statuzer.com/)
- [Tusked](https://tusked.app/)
- [Mastodon Glitch Edition (standalone frontend)](https://iceshrimp.dev/iceshrimp/masto-fe-standalone)
- [Tusked](https://tusked.app/) ([archived](https://github.com/raikasdev/tusked))
- [Mastodon Glitch Edition (standalone frontend)](https://iceshrimp.dev/iceshrimp/masto-fe-standalone) - forks ↓
- [Masto-FE (🦥 flavour)](https://masto-fe.superseriousbusiness.org)
- [pl-fe](https://pl.mkljczk.pl)
- [Mangane](https://github.com/BDX-town/Mangane)
- [TheDesk](https://github.com/cutls/TheDesk) (archived)
- [More...](https://github.com/hueyy/awesome-mastodon/#clients)
## 💁‍♂️ Notice to all other social media client developers

40
SECURITY.md 100644
Wyświetl plik

@ -0,0 +1,40 @@
# Security Policy
## Supported Versions
Only the **latest production release** of Phanpy receives security updates. Always update to the newest production version for the best protection.
## Reporting a Vulnerability
**Please dont discuss security issues in public GitHub issues.** Instead:
1. **GitHub Private Reporting** (preferred):
- Click ["Report a vulnerability"](https://github.com/cheeaun/phanpy/security/advisories/new) under the **Security** tab.
2. **Email**:
- Reach out to me directly at cheeaun@gmail.com
**Include**:
- Steps to reproduce the issue
- Which parts of Phanpy are affected
- How severe you think the impact could be
## Disclosure Policy
**Heads up:** Im a solo maintainer working on Phanpy in my free time. While I take security seriously, I cant promise enterprise-grade response times. Heres how Ill handle reports:
1. **Confirmation**: Ill acknowledge reports when possible, but this might take weeks due to limited availability.
2. **Fixing**: Critical bugs will be prioritized, but fixes may take significant time. If its urgent, feel free to follow up.
3. **Public Disclosure**: Patched vulnerabilities will be disclosed once the fix is confirmed stable and most users have updated.
## Security Practices
### For Users
- Use Phanpy with a Mastodon instance that enforces **HTTPS**.
- Treat OAuth tokens like passwords – dont share them!
### For Developers
- **Dependencies**: GitHub Dependabot alerts are enabled for vulnerability monitoring.
- **Code**:
- Basic input sanitization to prevent XSS.
- *Planned*: Improvements to client-side storage security (contributions welcome!).

59
biome.json 100644
Wyświetl plik

@ -0,0 +1,59 @@
{
"$schema": "./node_modules/@biomejs/biome/configuration_schema.json",
"vcs": {
"enabled": true,
"clientKind": "git",
"useIgnoreFile": true
},
"files": {
"includes": [
"src/**/*.{js,jsx,ts,tsx,css}",
"*.{js,jsx,ts,tsx,json,jsonc}",
"scripts/**/*.js",
"!wrangler.jsonc",
"!i18n-volunteers.json"
]
},
"formatter": {
"indentStyle": "space"
},
"linter": {
"enabled": false
},
"javascript": {
"formatter": {
"quoteStyle": "single"
}
},
"css": {
"formatter": {
"quoteStyle": "single"
}
},
"assist": {
"actions": {
"source": {
"organizeImports": {
"level": "on",
"options": {
"groups": [
"**/*.css",
":BLANK_LINE:",
"./polyfills",
":BLANK_LINE:",
[":NODE:", ":BUN:"],
":BLANK_LINE:",
[":PACKAGE:", ":PACKAGE_WITH_PROTOCOL:"],
":BLANK_LINE:",
"**/assets/**",
":BLANK_LINE:",
"../**",
":BLANK_LINE:",
["./**", "./"]
]
}
}
}
}
}
}

Wyświetl plik

@ -5,7 +5,7 @@
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Compose / %PHANPY_CLIENT_NAME%</title>
<meta name="color-scheme" content="dark light" />
<meta name="color-scheme" content="light dark" />
<meta name="google" content="notranslate" />
</head>
<body>

7
crowdin.yml 100644
Wyświetl plik

@ -0,0 +1,7 @@
pull_request_labels:
- i18n
commit_message: New translations (%language%)
append_commit_message: false
files:
- source: /src/locales/en.po
translation: /src/locales/%locale%.po

Plik binarny nie jest wyświetlany.

Po

Szerokość:  |  Wysokość:  |  Rozmiar: 17 KiB

Wyświetl plik

@ -0,0 +1,12 @@
<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" fill-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="2" clip-rule="evenodd" viewBox="0 0 64 64">
<path fill="none" d="M0 0h63.99v63.99H0z"/>
<clipPath id="a">
<path d="M0 0h63.99v63.99H0z"/>
</clipPath>
<g clip-path="url(#a)">
<path d="M0 0h64.25v63.99H0z"/>
<path fill="#fff" d="M37.77 11.47c14.64 3.75 19.04 16.56 15.9 31.3a12.55 12.55 0 0 1-6.36 8.7c-3.2 1.71-8.07 2.53-15.34.55l-9.64-2.4c-10.68-2.63-13.95-10.89-12.3-17.8 3.62-15.2 15.54-23.48 27.74-20.35Z"/>
<path d="M36.76 15.43c12.29 3.15 15.55 14.11 12.9 26.5-.94 4.43-4.93 9.36-16.66 6.13l-9.68-2.41c-7.85-1.93-10.53-7.8-9.32-12.88 3.02-12.64 12.61-19.94 22.76-17.34Z"/>
<path fill="#fff" d="M27.47 25c-1.46-.7-7.23 3.2-7.66 8.92-.18 2.39 4.55 3.23 5.07-.17.72-4.74 3.71-8.22 2.6-8.76Zm10.75 2c-2.09.32-.39 5.9-.6 10.72-.12 2.8 4.39 3.47 4.7 2.01 1.1-5.07-2.06-13.05-4.1-12.73Z"/>
</g>
</svg>

Po

Szerokość:  |  Wysokość:  |  Rozmiar: 954 B

Plik binarny nie jest wyświetlany.

Po

Szerokość:  |  Wysokość:  |  Rozmiar: 17 KiB

Wyświetl plik

@ -0,0 +1,12 @@
<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" fill-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="2" clip-rule="evenodd" viewBox="0 0 64 64">
<path fill="none" d="M0 0h63.99v63.99H0z"/>
<clipPath id="a">
<path d="M0 0h63.99v63.99H0z"/>
</clipPath>
<g clip-path="url(#a)">
<path fill="#fff" d="M0 0h64.25v63.99H0z"/>
<path d="M37.77 11.47c14.64 3.75 19.04 16.56 15.9 31.3a12.55 12.55 0 0 1-6.36 8.7c-3.2 1.71-8.07 2.53-15.34.55l-9.64-2.4c-10.68-2.63-13.95-10.89-12.3-17.8 3.62-15.2 15.54-23.48 27.74-20.35Z"/>
<path fill="#fff" d="M36.76 15.43c12.29 3.15 15.55 14.11 12.9 26.5-.94 4.43-4.93 9.36-16.66 6.13l-9.68-2.41c-7.85-1.93-10.53-7.8-9.32-12.88 3.02-12.64 12.61-19.94 22.76-17.34Z"/>
<path d="M27.47 25c-1.46-.7-7.23 3.2-7.66 8.92-.18 2.39 4.55 3.23 5.07-.17.72-4.74 3.71-8.22 2.6-8.76Zm10.75 2c-2.09.32-.39 5.9-.6 10.72-.12 2.8 4.39 3.47 4.7 2.01 1.1-5.07-2.06-13.05-4.1-12.73Z"/>
</g>
</svg>

Po

Szerokość:  |  Wysokość:  |  Rozmiar: 954 B

Plik binarny nie jest wyświetlany.

89
env.schema.json 100644
Wyświetl plik

@ -0,0 +1,89 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"required": ["PHANPY_WEBSITE", "PHANPY_CLIENT_NAME"],
"properties": {
"PHANPY_CLIENT_NAME": {
"type": "string",
"default": "Phanpy",
"minLength": 1,
"maxLength": 100,
"examples": ["Phanpy Dev", "Donphan"],
"description": "Client name that affects web page title, app title, OpenGraph card title, and client name for authentication"
},
"PHANPY_WEBSITE": {
"type": "string",
"default": "https://phanpy.social",
"format": "uri",
"description": "Canonical URL of the website, affects OpenGraph card URL and client URL for authentication"
},
"PHANPY_PRIVACY_POLICY_URL": {
"type": "string",
"default": "https://github.com/cheeaun/phanpy/blob/main/PRIVACY.MD",
"format": "uri",
"examples": ["https://mastodon.social/privacy-policy"],
"description": "URL of the privacy policy page"
},
"PHANPY_TRANSLANG_INSTANCES": {
"type": "string",
"separator": " ",
"default": "translang.phanpy.social",
"description": "Space-separated list of Translang instances for translation"
},
"PHANPY_DEFAULT_LANG": {
"type": "string",
"default": "en",
"examples": ["en-US", "zh-CN"],
"description": "Default language fallback after multiple detection methods"
},
"PHANPY_DEFAULT_INSTANCE": {
"type": "string",
"pattern": "^(?!https?://).*$",
"format": "hostname",
"examples": ["mastodon.social", "hachyderm.io"],
"description": "Default instance for log-in (Exclude https://)"
},
"PHANPY_DEFAULT_INSTANCE_REGISTRATION_URL": {
"type": "string",
"format": "uri",
"examples": ["https://mastodon.social/auth/sign_up"],
"description": "URL of the instance registration page"
},
"PHANPY_REFERRER_POLICY": {
"type": "string",
"default": "origin",
"enum": [
"no-referrer",
"no-referrer-when-downgrade",
"origin",
"origin-when-cross-origin",
"same-origin",
"strict-origin",
"strict-origin-when-cross-origin",
"unsafe-url"
],
"description": "Referrer policy for the site, applied with meta tag on client-side"
},
"PHANPY_IMG_ALT_API_URL": {
"type": "string",
"format": "uri",
"description": "API endpoint for self-hosted img-alt-api instance"
},
"PHANPY_GIPHY_API_KEY": {
"type": "string",
"description": "API key for GIPHY integration"
},
"PHANPY_DISALLOW_ROBOTS": {
"type": ["string", "boolean"],
"examples": ["true", "1"],
"description": "Set to any value to disallow all web crawlers from indexing the site"
},
"PHANPY_LINGVA_INSTANCES": {
"type": "string",
"separator": " ",
"deprecated": true,
"description": "DEPRECATED: Space-separated list of Lingva instances for translation"
}
},
"additionalProperties": false
}

Wyświetl plik

@ -0,0 +1,345 @@
[
{
"avatarUrl": "https://crowdin-static.downloads.crowdin.com/avatar/12571163/medium/9f3ea938f4243f5ffe2a43f814ddc9e8_default.png",
"username": "alidsds11",
"languages": [
"Arabic"
]
},
{
"avatarUrl": "https://crowdin-static.downloads.crowdin.com/avatar/13170041/medium/603136896af17fc005fd592ce3f48717_default.png",
"username": "BoFFire",
"languages": [
"Arabic",
"French",
"Kabyle"
]
},
{
"avatarUrl": "https://crowdin-static.downloads.crowdin.com/avatar/12898464/medium/d3758a76b894bade4bf271c9b32ea69b.png",
"username": "Brawaru",
"languages": [
"Russian"
]
},
{
"avatarUrl": "https://crowdin-static.downloads.crowdin.com/avatar/15460040/medium/1cfcfe5f5511b783b5d9f2b968bad819.png",
"username": "cbasje",
"languages": [
"Dutch"
]
},
{
"avatarUrl": "https://crowdin-static.downloads.crowdin.com/avatar/15525631/medium/51293156034d0236f1a1020c10f7d539_default.png",
"username": "cbo92",
"languages": [
"French"
]
},
{
"avatarUrl": "https://crowdin-static.downloads.crowdin.com/avatar/15910131/medium/67fab7eeab5551853450e76e2ef19e59.jpeg",
"username": "CDN",
"languages": [
"Chinese Simplified"
]
},
{
"avatarUrl": "https://crowdin-static.downloads.crowdin.com/avatar/16556801/medium/ed5e501ca1f3cc6525d2da28db646346.jpeg",
"username": "dannypsnl",
"languages": [
"Chinese Traditional"
]
},
{
"avatarUrl": "https://crowdin-static.downloads.crowdin.com/avatar/3711/medium/d95ddd44e8dcb3a039f8a3463aed781d_default.png",
"username": "databio",
"languages": [
"Catalan"
]
},
{
"avatarUrl": "https://crowdin-static.downloads.crowdin.com/avatar/12618120/medium/ccb11bd042bbf4c7189033f7af2dbd32_default.png",
"username": "drydenwu",
"languages": [
"Chinese Traditional"
]
},
{
"avatarUrl": "https://crowdin-static.downloads.crowdin.com/avatar/13557465/medium/8feebf3677fa80c01e8c54c4fbe097e0_default.png",
"username": "elissarc",
"languages": [
"French"
]
},
{
"avatarUrl": "https://crowdin-static.downloads.crowdin.com/avatar/16528627/medium/9036f6eced0257f4e1ea4c5bd499de2d_default.png",
"username": "ElPamplina",
"languages": [
"Spanish"
]
},
{
"avatarUrl": "https://crowdin-static.downloads.crowdin.com/avatar/14277386/medium/29b30d2c73a214000e3941c9978f49e4_default.png",
"username": "Fitik",
"languages": [
"Esperanto",
"Hebrew"
]
},
{
"avatarUrl": "https://crowdin-static.downloads.crowdin.com/avatar/14444512/medium/99d0e7a3076deccbdfe0aa0b0612308c.jpeg",
"username": "Freeesia",
"languages": [
"Japanese"
]
},
{
"avatarUrl": "https://crowdin-static.downloads.crowdin.com/avatar/12617257/medium/a201650da44fed28890b0e0d8477a663.jpg",
"username": "ghose",
"languages": [
"Galician"
]
},
{
"avatarUrl": "https://crowdin-static.downloads.crowdin.com/avatar/15248754/medium/0dac6334ea0f4e8d4194a605c0a5594a.jpeg",
"username": "hongminhee",
"languages": [
"Korean"
]
},
{
"avatarUrl": "https://crowdin-static.downloads.crowdin.com/avatar/13454728/medium/1f78b7124b3c962bc4ae55e8d701fc91_default.png",
"username": "isard",
"languages": [
"Catalan"
]
},
{
"avatarUrl": "https://crowdin-static.downloads.crowdin.com/avatar/16532403/medium/4cefb19623bcc44d7cdb9e25aebf5250.jpeg",
"username": "karlafej",
"languages": [
"Czech"
]
},
{
"avatarUrl": "https://crowdin-static.downloads.crowdin.com/avatar/15791971/medium/88bdda3090339f16f6083390d32bb434_default.png",
"username": "katullo11",
"languages": [
"Italian"
]
},
{
"avatarUrl": "https://crowdin-static.downloads.crowdin.com/avatar/14677260/medium/e53420d200961f48602324e18c091bdc.png",
"username": "Kytta",
"languages": [
"German"
]
},
{
"avatarUrl": "https://crowdin-static.downloads.crowdin.com/avatar/16529521/medium/ae6add93a901b0fefa2d9b1077920d73.png",
"username": "llun",
"languages": [
"Thai"
]
},
{
"avatarUrl": "https://crowdin-static.downloads.crowdin.com/avatar/16291756/medium/e1c4210f15537394cc764b8bc2dffe37.jpg",
"username": "lucasofchirst",
"languages": [
"Occitan",
"Portuguese",
"Portuguese, Brazilian"
]
},
{
"avatarUrl": "https://crowdin-static.downloads.crowdin.com/avatar/16537713/medium/825f0bf1a14fc545a76891a52839d86e_default.png",
"username": "marcin.kozinski",
"languages": [
"Polish"
]
},
{
"avatarUrl": "https://crowdin-static.downloads.crowdin.com/avatar/12882812/medium/77744d8db46e9a3e09030e1a02b7a572.jpeg",
"username": "mojosoeun",
"languages": [
"Korean"
]
},
{
"avatarUrl": "https://crowdin-static.downloads.crowdin.com/avatar/13613969/medium/c7834ddc0ada84a79671697a944bb274.png",
"username": "moreal",
"languages": [
"Korean"
]
},
{
"avatarUrl": "https://crowdin-static.downloads.crowdin.com/avatar/14158861/medium/ba1ff31dc5743b067ea6685f735229a5_default.png",
"username": "MrWillCom",
"languages": [
"Chinese Simplified"
]
},
{
"avatarUrl": "https://crowdin-static.downloads.crowdin.com/avatar/15652333/medium/7f36f289f9e2fe41d89ad534a1047f0e.png",
"username": "nclm",
"languages": [
"French"
]
},
{
"avatarUrl": "https://crowdin-static.downloads.crowdin.com/avatar/16539461/medium/2f41b9f0b802c1d200a6ab62167a7229_default.png",
"username": "pazpi",
"languages": [
"Italian"
]
},
{
"avatarUrl": "https://crowdin-static.downloads.crowdin.com/avatar/15106977/medium/54bf93b19af8bbfdee579ea51685bafa.jpeg",
"username": "punkrockgirl",
"languages": [
"Basque"
]
},
{
"avatarUrl": "https://crowdin-static.downloads.crowdin.com/avatar/16536247/medium/f010c8e718a36229733a8b58f6bad2a4_default.png",
"username": "radecos",
"languages": [
"French"
]
},
{
"avatarUrl": "https://crowdin-static.downloads.crowdin.com/avatar/16538917/medium/092ec03f56f9dd1cbce94379fa4d4d38.png",
"username": "Razem",
"languages": [
"Czech"
]
},
{
"avatarUrl": "https://crowdin-static.downloads.crowdin.com/avatar/14345134/medium/89a299239890c79a1d791d08ec3951dc.png",
"username": "realpixelcode",
"languages": [
"German"
]
},
{
"avatarUrl": "https://crowdin-static.downloads.crowdin.com/avatar/16527325/medium/37ebb27e7a50f7f85ae93beafc7028a2.jpg",
"username": "rezahosseinzadeh",
"languages": [
"Persian"
]
},
{
"avatarUrl": "https://crowdin-static.downloads.crowdin.com/avatar/13422319/medium/66632a98d73d48e36753d94ebcec9d4f.png",
"username": "rwmpelstilzchen",
"languages": [
"Esperanto",
"Hebrew"
]
},
{
"avatarUrl": "https://crowdin-static.downloads.crowdin.com/avatar/16538605/medium/bcdb6e3286b7d6237923f3a9383eed29.png",
"username": "SadmL",
"languages": [
"Russian"
]
},
{
"avatarUrl": "https://crowdin-static.downloads.crowdin.com/avatar/14565190/medium/79100599131b7776e9803e4b696915a3_default.png",
"username": "Sky_NiniKo",
"languages": [
"French"
]
},
{
"avatarUrl": "https://crowdin-static.downloads.crowdin.com/avatar/16532441/medium/1a47e8d80c95636e02d2260f6e233ca5.png",
"username": "Su5hicz",
"languages": [
"Czech"
]
},
{
"avatarUrl": "https://crowdin-static.downloads.crowdin.com/avatar/16533843/medium/7314c15492ef90118c33a80a427e6c87_default.png",
"username": "Talos00",
"languages": [
"Italian"
]
},
{
"avatarUrl": "https://crowdin-static.downloads.crowdin.com/avatar/16530049/medium/683f3581620c6b4a5c753b416ed695a7.jpeg",
"username": "tferrermo",
"languages": [
"Spanish"
]
},
{
"avatarUrl": "https://crowdin-static.downloads.crowdin.com/avatar/16527851/medium/649e5a9a8a8cc61ced670d89e9cca082.png",
"username": "tux93",
"languages": [
"German"
]
},
{
"avatarUrl": "https://crowdin-static.downloads.crowdin.com/avatar/16529833/medium/2991a65722acd721849656223014cd49.png",
"username": "Urbestro",
"languages": [
"Esperanto",
"Spanish"
]
},
{
"avatarUrl": "https://crowdin-static.downloads.crowdin.com/avatar/16539171/medium/db6fb87481026c72b895adfb94e17d2c_default.png",
"username": "UsualUsername",
"languages": [
"Russian"
]
},
{
"avatarUrl": "https://crowdin-static.downloads.crowdin.com/avatar/14427566/medium/ab733b5044c21867fc5a9d1b22cd2c03.png",
"username": "Vac31.",
"languages": [
"Lithuanian"
]
},
{
"avatarUrl": "https://crowdin-static.downloads.crowdin.com/avatar/16026914/medium/e3ca187f354a298ef0c9d02a0ed17be7.jpg",
"username": "valtlai",
"languages": [
"Finnish"
]
},
{
"avatarUrl": "https://crowdin-static.downloads.crowdin.com/avatar/15982109/medium/9c03062bdc1d3c6d384dbfead97c26ba.jpeg",
"username": "xabi_itzultzaile",
"languages": [
"Basque"
]
},
{
"avatarUrl": "https://crowdin-static.downloads.crowdin.com/avatar/16556017/medium/216e0f7a0c35b079920366939a3aaca7_default.png",
"username": "xen4n",
"languages": [
"Ukrainian"
]
},
{
"avatarUrl": "https://crowdin-static.downloads.crowdin.com/avatar/16532657/medium/f309f319266e1ff95f3070eab0c9a9d9_default.png",
"username": "xqueralt",
"languages": [
"Catalan"
]
},
{
"avatarUrl": "https://crowdin-static.downloads.crowdin.com/avatar/14041603/medium/6ab77a0467b06aeb49927c6d9c409f89.jpg",
"username": "ZiriSut",
"languages": [
"Kabyle"
]
},
{
"avatarUrl": "https://crowdin-static.downloads.crowdin.com/avatar/16530601/medium/e1b6d5c24953b6405405c1ab33c0fa46.jpeg",
"username": "zkreml",
"languages": [
"Czech"
]
}
]

Wyświetl plik

@ -11,7 +11,7 @@
name="description"
content="Minimalistic opinionated Mastodon web client"
/>
<meta name="color-scheme" content="dark light" />
<meta name="color-scheme" content="light dark" />
<link rel="icon" type="image/x-icon" href="/favicon.ico" />
<link rel="apple-touch-icon" href="/apple-touch-icon.png" />
<meta name="apple-mobile-web-app-title" content="%PHANPY_CLIENT_NAME%" />

20
lingui.config.js 100644
Wyświetl plik

@ -0,0 +1,20 @@
import { ALL_LOCALES } from './src/locales';
const config = {
locales: ALL_LOCALES,
sourceLocale: 'en',
pseudoLocale: 'pseudo-LOCALE',
fallbackLocales: {
default: 'en',
},
catalogs: [
{
path: '<rootDir>/src/locales/{locale}',
include: ['src'],
},
],
// compileNamespace: 'es',
orderBy: 'origin',
};
export default config;

8485
package-lock.json wygenerowano

Plik diff jest za duży Load Diff

Wyświetl plik

@ -6,60 +6,87 @@
"dev": "vite",
"build": "vite build",
"preview": "vite preview",
"fetch-instances": "env $(cat .env.dev | grep -v \"#\" | xargs) node scripts/fetch-instances-list.js",
"sourcemap": "npx source-map-explorer dist/assets/*.js"
"fetch-instances": "node scripts/fetch-instances-list.js",
"sourcemap": "npx source-map-explorer dist/assets/*.js",
"bundle-visualizer": "npx vite-bundle-visualizer",
"messages:extract": "lingui extract",
"messages:extract:clean": "lingui extract --locale en --clean",
"messages:compile": "lingui compile",
"fetch-i18n-volunteers": "env $(cat .env.local | grep -v \"#\" | xargs) node scripts/fetch-i18n-volunteers.js",
"readme:i18n-volunteers": "node scripts/update-i18n-volunteers-readme.js",
"test": "playwright test",
"test:ui": "playwright test --ui",
"test:headed": "playwright test --headed",
"formatting-check": "npx biome check",
"git:po-filter": "git config --local diff.po-filter.textconv \"sed 's/:[0-9]*$//'\""
},
"dependencies": {
"@formatjs/intl-localematcher": "~0.5.2",
"@formkit/auto-animate": "~0.8.1",
"@github/text-expander-element": "~2.6.1",
"@formatjs/intl-localematcher": "~0.6.2",
"@formatjs/intl-segmenter": "~11.7.11",
"@formkit/auto-animate": "~0.9.0",
"@github/text-expander-element": "~2.9.2",
"@iconify-icons/mingcute": "~1.2.9",
"@justinribeiro/lite-youtube": "~1.5.0",
"@szhsin/react-menu": "~4.1.0",
"@uidotdev/usehooks": "~2.4.1",
"compare-versions": "~6.1.0",
"dayjs": "~1.11.10",
"dayjs-twitter": "~0.5.0",
"fast-blurhash": "~1.1.2",
"fast-deep-equal": "~3.1.3",
"idb-keyval": "~6.2.1",
"@justinribeiro/lite-youtube": "~1.8.2",
"@lingui/detect-locale": "~5.5.0",
"@lingui/macro": "~5.5.0",
"@lingui/react": "~5.5.0",
"@szhsin/react-menu": "~4.5.0",
"chroma-js": "~3.1.2",
"compare-versions": "~6.1.1",
"fast-blurhash": "~1.1.4",
"fast-equals": "~5.3.2",
"fuse.js": "~7.1.0",
"html-prettify": "~1.0.7",
"idb-keyval": "~6.2.2",
"intl-locale-textinfo-polyfill": "~3.0.0",
"js-cookie": "~3.0.5",
"just-debounce-it": "~3.2.0",
"lz-string": "~1.5.0",
"masto": "~6.5.1",
"masto": "~7.2.0",
"moize": "~6.1.6",
"p-retry": "~6.2.0",
"p-throttle": "~6.1.0",
"preact": "~10.19.3",
"react-hotkeys-hook": "~4.4.1",
"react-intersection-observer": "~9.5.3",
"p-retry": "~7.0.0",
"p-throttle": "~8.0.0",
"preact": "10.27.2",
"punycode": "~2.3.1",
"react-hotkeys-hook": "~5.1.0",
"react-intersection-observer": "~9.16.0",
"react-quick-pinch-zoom": "~5.1.0",
"react-router-dom": "6.6.2",
"runes2": "~1.1.3",
"string-length": "5.0.1",
"swiped-events": "~1.1.9",
"string-length": "6.0.0",
"swiped-events": "~1.2.0",
"temml": "~0.11.11",
"tinyld": "~1.3.4",
"toastify-js": "~1.12.0",
"uid": "~2.0.2",
"use-debounce": "~10.0.0",
"use-long-press": "~3.2.0",
"use-debounce": "~10.0.6",
"use-long-press": "~3.3.0",
"use-resize-observer": "~9.1.0",
"valtio": "1.9.0"
"valtio": "2.1.8"
},
"devDependencies": {
"@preact/preset-vite": "~2.7.0",
"@trivago/prettier-plugin-sort-imports": "~4.3.0",
"postcss": "~8.4.32",
"postcss-dark-theme-class": "~1.1.0",
"postcss-preset-env": "~9.3.0",
"@biomejs/biome": "2.2.5",
"@lingui/babel-plugin-lingui-macro": "~5.5.0",
"@lingui/cli": "~5.5.0",
"@lingui/vite-plugin": "~5.5.0",
"@playwright/test": "~1.55.1",
"@preact/preset-vite": "~2.10.2",
"@types/node": "~24.6.2",
"postcss": "~8.5.6",
"postcss-dark-theme-class": "~2.0.0",
"postcss-preset-env": "~10.4.0",
"sonda": "~0.9.0",
"twitter-text": "~3.1.0",
"vite": "~5.0.10",
"vite-plugin-generate-file": "~0.1.1",
"vite-plugin-html-config": "~1.0.11",
"vite-plugin-pwa": "~0.17.4",
"vite": "~7.1.9",
"vite-plugin-generate-file": "~0.3.1",
"vite-plugin-html-config": "~2.0.2",
"vite-plugin-pwa": "~1.0.3",
"vite-plugin-remove-console": "~2.2.0",
"workbox-cacheable-response": "~7.0.0",
"workbox-expiration": "~7.0.0",
"workbox-routing": "~7.0.0",
"workbox-strategies": "~7.0.0"
"vite-plugin-run": "~0.6.1",
"workbox-cacheable-response": "~7.3.0",
"workbox-expiration": "~7.3.0",
"workbox-navigation-preload": "~7.3.0",
"workbox-routing": "~7.3.0",
"workbox-strategies": "~7.3.0"
},
"postcss": {
"plugins": {
@ -71,11 +98,6 @@
}
}
},
"overrides": {
"vite": {
"rollup": ">=4.5.1"
}
},
"browserslist": [
"defaults",
"android >= 4"

Wyświetl plik

@ -0,0 +1,50 @@
// @ts-check
import { defineConfig, devices } from '@playwright/test';
/**
* Read environment variables from file.
* https://github.com/motdotla/dotenv
*/
// import dotenv from 'dotenv';
// import path from 'path';
// dotenv.config({ path: path.resolve(__dirname, '.env') });
/**
* @see https://playwright.dev/docs/test-configuration
*/
export default defineConfig({
testDir: './tests',
/* Run tests in files in parallel */
fullyParallel: true,
/* Fail the build on CI if you accidentally left test.only in the source code. */
forbidOnly: !!process.env.CI,
/* Retry on CI only */
retries: process.env.CI ? 2 : 0,
/* Opt out of parallel tests on CI. */
workers: process.env.CI ? 1 : undefined,
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
reporter: process.env.CI ? 'github' : 'list',
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
use: {
/* Base URL to use in actions like `await page.goto('/')`. */
baseURL: 'http://localhost:5173',
/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
trace: 'on-first-retry',
},
/* Configure projects for major browsers */
projects: [
{
name: 'Mobile Safari',
use: { ...devices['iPhone 13 Mini'] },
},
],
/* Run your local dev server before starting the tests */
webServer: {
command: 'npm run dev',
url: 'http://localhost:5173',
reuseExistingServer: !process.env.CI,
},
});

32
public/404.html 100644
Wyświetl plik

@ -0,0 +1,32 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta
name="viewport"
content="width=device-width, initial-scale=1, viewport-fit=cover"
/>
<title>Page not found</title>
<meta name="color-scheme" content="light dark" />
<style>
body {
text-align: center;
font-family: ui-rounded, -apple-system, BlinkMacSystemFont, Segoe UI,
Roboto, Ubuntu, Cantarell, Noto Sans, sans-serif;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
min-height: 100vh;
}
h1 {
margin: 0;
padding: 0;
}
</style>
</head>
<body>
<h1>Page not found</h1>
<p><a href="/">Go home</a></p>
</body>
</html>

Plik binarny nie jest wyświetlany.

Przed

Szerokość:  |  Wysokość:  |  Rozmiar: 15 KiB

Po

Szerokość:  |  Wysokość:  |  Rozmiar: 2.8 KiB

Wyświetl plik

@ -1,5 +1,6 @@
import { CacheableResponsePlugin } from 'workbox-cacheable-response';
import { ExpirationPlugin } from 'workbox-expiration';
import * as navigationPreload from 'workbox-navigation-preload';
import { RegExpRoute, registerRoute, Route } from 'workbox-routing';
import {
CacheFirst,
@ -7,19 +8,181 @@ import {
StaleWhileRevalidate,
} from 'workbox-strategies';
navigationPreload.enable();
self.__WB_DISABLE_DEV_LOGS = true;
// Custom plugin to manage hashed assets
class AssetHashPlugin {
constructor(options = {}) {
this.maxHashes = options.maxHashes || 2;
this.dbName = 'workbox-expiration';
this.storeName = 'cache-entries';
}
// Extract base filename from a hashed URL
// e.g., "main-abc123.js" -> "main"
_getBaseName(url) {
const urlObj = new URL(url);
const pathname = urlObj.pathname;
const filename = pathname.split('/').pop();
// Match pattern: basename-hash.extension
// Hash uses URL-safe base64 characters (A-Za-z0-9_-), typically 8+ chars
const match = filename.match(/^(.+?)-[A-Za-z0-9_-]{8,}\.(js|css)$/);
return match ? match[1] : null;
}
// Get timestamps for multiple URLs from Workbox's ExpirationPlugin IndexedDB
async _getTimestampsFromDB(cacheName, urls) {
try {
const db = await new Promise((resolve, reject) => {
const request = indexedDB.open(this.dbName);
request.onsuccess = () => resolve(request.result);
request.onerror = () => reject(request.error);
});
const tx = db.transaction(this.storeName, 'readonly');
const store = tx.objectStore(this.storeName);
// Batch read all timestamps in a single transaction
const timestamps = await Promise.all(
urls.map((url) => {
// Workbox stores entries with key format: `${cacheName}|${url}`
const key = `${cacheName}|${url}`;
return new Promise((resolve) => {
const request = store.get(key);
request.onsuccess = () =>
resolve(request.result?.timestamp || Date.now());
request.onerror = () => resolve(Date.now());
});
}),
);
db.close();
return timestamps;
} catch (error) {
console.warn(
`[AssetHashPlugin] Error reading timestamps from IndexedDB:`,
error,
);
// Return current time for all URLs as fallback
return urls.map(() => Date.now());
}
}
cacheDidUpdate({ cacheName, request }) {
// Run cleanup asynchronously without blocking the cache operation
this._cleanupOldHashes(cacheName, request.url);
}
async _cleanupOldHashes(cacheName, requestUrl) {
try {
const baseName = this._getBaseName(requestUrl);
if (!baseName) return;
const cache = await caches.open(cacheName);
// Find all cached entries with the same base name
const cachedRequests = await cache.keys();
const matchingRequests = [];
for (const cachedRequest of cachedRequests) {
const cachedBaseName = this._getBaseName(cachedRequest.url);
if (cachedBaseName === baseName) {
const response = await cache.match(cachedRequest);
if (response) {
matchingRequests.push(cachedRequest);
}
}
}
if (matchingRequests.length <= this.maxHashes) return;
// Batch read all timestamps in a single database transaction
const urls = matchingRequests.map((req) => req.url);
const timestamps = await this._getTimestampsFromDB(cacheName, urls);
// Build matching entries with timestamps
const matchingEntries = matchingRequests.map((req, index) => ({
request: req,
url: req.url,
timestamp: timestamps[index],
}));
// Sort by timestamp (newest first)
matchingEntries.sort((a, b) => b.timestamp - a.timestamp);
// Keep only the maxHashes most recent, delete the rest
const toDelete = matchingEntries.slice(this.maxHashes);
for (const entry of toDelete) {
await cache.delete(entry.request);
console.log(`[AssetHashPlugin] Deleted old hash: ${entry.url}`);
}
} catch (error) {
console.warn(`[AssetHashPlugin] Error during cleanup:`, error);
}
}
}
const expirationPluginOptions = {
purgeOnQuotaError: true,
// "CacheFirst image maxEntries not working" https://github.com/GoogleChrome/workbox/issues/2768#issuecomment-793109906
matchOptions: {
// https://developer.mozilla.org/en-US/docs/Web/API/Cache/delete#Parameters
ignoreVary: true,
},
};
const iconsRoute = new Route(
({ request, sameOrigin }) => {
const isIcon = request.url.includes('/icons/');
return sameOrigin && isIcon;
},
new CacheFirst({
cacheName: 'icons',
plugins: [
new ExpirationPlugin({
// Weirdly high maxEntries number, due to some old icons suddenly disappearing and not rendering
// NOTE: Temporary fix
maxEntries: 300,
maxAgeSeconds: 3 * 24 * 60 * 60, // 3 days
...expirationPluginOptions,
}),
new CacheableResponsePlugin({
statuses: [0, 200],
}),
],
}),
);
registerRoute(iconsRoute);
const assetsRoute = new Route(
({ request, sameOrigin }) => {
const isAsset =
request.destination === 'style' || request.destination === 'script';
const hasHash = /-[0-9a-f]{4,}\./i.test(request.url);
const hasHash = /-[0-9a-z-]{4,}\./i.test(request.url);
return sameOrigin && isAsset && hasHash;
},
new NetworkFirst({
cacheName: 'assets',
networkTimeoutSeconds: 5,
plugins: [
// Only enable AssetHashPlugin in production
...(import.meta.env.PROD
? [
new AssetHashPlugin({
maxHashes: 2, // Keep only 2 most recent hashes of each file
}),
]
: []),
new ExpirationPlugin({
maxEntries: 40,
...expirationPluginOptions,
}),
new CacheableResponsePlugin({
statuses: [0, 200],
}),
@ -33,16 +196,16 @@ const imageRoute = new Route(
const isRemote = !sameOrigin;
const isImage = request.destination === 'image';
const isAvatar = request.url.includes('/avatars/');
const isCustomEmoji = request.url.includes('/custom/_emojis');
const isEmoji = request.url.includes('/emoji/');
return isRemote && isImage && (isAvatar || isEmoji);
return isRemote && isImage && (isAvatar || isCustomEmoji || isEmoji);
},
new CacheFirst({
cacheName: 'remote-images',
plugins: [
new ExpirationPlugin({
maxEntries: 50,
maxAgeSeconds: 3 * 24 * 60 * 60, // 3 days
purgeOnQuotaError: true,
maxEntries: 30,
...expirationPluginOptions,
}),
new CacheableResponsePlugin({
statuses: [0, 200],
@ -52,40 +215,18 @@ const imageRoute = new Route(
);
registerRoute(imageRoute);
const iconsRoute = new Route(
({ request, sameOrigin }) => {
const isIcon = request.url.includes('/icons/');
return sameOrigin && isIcon;
},
new CacheFirst({
cacheName: 'icons',
plugins: [
new ExpirationPlugin({
maxEntries: 50,
maxAgeSeconds: 3 * 24 * 60 * 60, // 3 days
purgeOnQuotaError: true,
}),
new CacheableResponsePlugin({
statuses: [0, 200],
}),
],
}),
);
registerRoute(iconsRoute);
// 1-day cache for
// - /api/v1/instance
// - /api/v1/custom_emojis
// - /api/v1/preferences
// - /api/v1/lists/:id
// - /api/v1/announcements
const apiExtendedRoute = new RegExpRoute(
/^https?:\/\/[^\/]+\/api\/v\d+\/(instance|custom_emojis|preferences|lists\/\d+|announcements)$/,
/^https?:\/\/[^\/]+\/api\/v\d+\/(custom_emojis|lists\/\d+|announcements)$/,
new StaleWhileRevalidate({
cacheName: 'api-extended',
plugins: [
new ExpirationPlugin({
maxAgeSeconds: 24 * 60 * 60, // 1 day
maxAgeSeconds: 12 * 60 * 60, // 12 hours
...expirationPluginOptions,
}),
new CacheableResponsePlugin({
statuses: [0, 200],
@ -95,6 +236,28 @@ const apiExtendedRoute = new RegExpRoute(
);
registerRoute(apiExtendedRoute);
// Note: expiration is not working as expected
// https://github.com/GoogleChrome/workbox/issues/3316
//
// const apiIntermediateRoute = new RegExpRoute(
// // Matches:
// // - trends/*
// // - timelines/link
// /^https?:\/\/[^\/]+\/api\/v\d+\/(trends|timelines\/link)/,
// new StaleWhileRevalidate({
// cacheName: 'api-intermediate',
// plugins: [
// new ExpirationPlugin({
// maxAgeSeconds: 1 * 60, // 1min
// }),
// new CacheableResponsePlugin({
// statuses: [0, 200],
// }),
// ],
// }),
// );
// registerRoute(apiIntermediateRoute);
const apiRoute = new RegExpRoute(
// Matches:
// - statuses/:id/context - some contexts are really huge
@ -104,7 +267,9 @@ const apiRoute = new RegExpRoute(
networkTimeoutSeconds: 5,
plugins: [
new ExpirationPlugin({
maxEntries: 30,
maxAgeSeconds: 5 * 60, // 5 minutes
...expirationPluginOptions,
}),
new CacheableResponsePlugin({
statuses: [0, 200],

Wyświetl plik

@ -8,6 +8,8 @@ var _rollbarConfig = {
payload: {
environment: isDev ? 'development' : 'production',
},
captureIp: false,
scrubTelemetryInputs: true,
};
// Rollbar Snippet
@ -72,7 +74,7 @@ var _rollbarConfig = {
(_rollbarConfig = _rollbarConfig || {}),
(_rollbarConfig.rollbarJsUrl =
_rollbarConfig.rollbarJsUrl ||
'https://cdn.rollbar.com/rollbarjs/refs/tags/v2.26.0/rollbar.min.js'),
'https://cdn.rollbar.com/rollbarjs/refs/tags/v2.26.4/rollbar.min.js'),
(_rollbarConfig.async =
void 0 === _rollbarConfig.async || _rollbarConfig.async);
var a = n.setupShim(window, _rollbarConfig),
@ -328,7 +330,6 @@ var _rollbarConfig = {
for (
var a = e.removeEventListener;
a._rollbarOldRemove && a.belongsToShim;
)
a = a._rollbarOldRemove;
var l = function (r, e, o) {
@ -405,7 +406,6 @@ var _rollbarConfig = {
},
i = 0;
(o = window._rollbarShims[i++]);
)
n || (n = o.handler),
o.handler._swapAndProcessMessages(l, o.messages);

129
scripts/catalogs.js 100644
Wyświetl plik

@ -0,0 +1,129 @@
import fs from 'node:fs';
// Dependency from Lingui, not listed in package.json
import PO from 'pofile';
let listedLocales = [];
try {
listedLocales = JSON.parse(
fs.readFileSync('src/data/listed-locales.json', 'utf8'),
);
} catch (e) {}
const DEFAULT_LANG = 'en';
const IGNORE_LANGS = [DEFAULT_LANG, 'pseudo-LOCALE'];
const files = fs.readdirSync('src/locales');
const catalogs = {};
const enCatalog = files.find((file) => file.endsWith('en.po'));
const enContent = fs.readFileSync(`src/locales/${enCatalog}`, 'utf8');
const enPo = PO.parse(enContent);
const total = enPo.items.length;
console.log('Total strings:', total);
const codeMaps = {
'kab-KAB': 'kab',
};
files.forEach((file) => {
if (file.endsWith('.po')) {
const code = file.replace(/\.po$/, '');
if (IGNORE_LANGS.includes(code)) return;
const content = fs.readFileSync(`src/locales/${file}`, 'utf8');
const po = PO.parse(content);
const { items } = po;
// Percentage of translated strings
const translated = items.filter(
(item) => item.msgstr !== '' && item.msgstr[0] !== '',
).length;
const percentage = Math.round((translated / total) * 100);
po.percentage = percentage;
if (percentage > 0) {
// Ignore empty catalogs
catalogs[codeMaps[code] || code] = percentage;
}
}
});
const regionMaps = {
'zh-CN': 'zh-Hans',
'zh-TW': 'zh-Hant',
};
function IDN(inputCode, outputCode) {
let result;
const regionlessInputCode =
regionMaps[inputCode] || inputCode.replace(/-[a-z]+$/i, '');
const regionlessOutputCode =
regionMaps[outputCode] || outputCode.replace(/-[a-z]+$/i, '');
const inputCodes =
regionlessInputCode !== inputCode
? [inputCode, regionlessInputCode]
: [inputCode];
const outputCodes =
regionlessOutputCode !== outputCode
? [regionlessOutputCode, outputCode]
: [outputCode];
for (const inputCode of inputCodes) {
for (const outputCode of outputCodes) {
try {
result = new Intl.DisplayNames([inputCode], {
type: 'language',
}).of(outputCode);
break;
} catch (e) {}
}
if (result) break;
}
return result;
}
const fullCatalogs = Object.entries(catalogs)
// sort by key
.sort((a, b) => a[0].localeCompare(b[0]))
.map(([code, completion]) => {
const nativeName = IDN(code, code);
const name = IDN('en', code);
return { code, nativeName, name, completion };
});
// Set listed: true if completion > PERCENTAGE_THRESHOLD
const PERCENTAGE_THRESHOLD = 50;
const listedCatalogs = fullCatalogs.map((catalog) => ({
...catalog,
// Once listed, always listed
// A locale may exceed percentage threshold today, but not tomorrow
// So it should't suddenly become unlisted
listed:
listedLocales.includes(catalog.code) ||
catalog.completion >= PERCENTAGE_THRESHOLD,
}));
// Sort by completion
const sortedCatalogs = [...listedCatalogs].sort(
(a, b) => b.completion - a.completion,
);
console.table(sortedCatalogs);
console.log(
`Total listed/unlisted: ${listedCatalogs.filter((c) => c.listed).length}/${
listedCatalogs.filter((c) => !c.listed).length
}`,
);
const path = 'src/data/catalogs.json';
fs.writeFileSync(path, JSON.stringify(listedCatalogs, null, 2));
console.log('File written:', path);
const path2 = 'src/data/listed-locales.json';
const codes = listedCatalogs.filter((c) => c.listed).map((c) => c.code);
if (codes.length >= listedLocales.length) {
fs.writeFileSync(path2, JSON.stringify(codes, null, 2));
console.log('File written:', path2);
} else {
console.error(
`Number of listed locales reduced from ${listedLocales.length} to ${codes.length}.`,
);
}

Wyświetl plik

@ -1,4 +1,5 @@
import fs from 'fs';
import regexSupplant from 'twitter-text/dist/lib/regexSupplant.js';
import validDomain from 'twitter-text/dist/regexp/validDomain.js';
import validPortNumber from 'twitter-text/dist/regexp/validPortNumber.js';

Wyświetl plik

@ -0,0 +1,131 @@
import fs from 'fs';
const { CROWDIN_ACCESS_TOKEN } = process.env;
const PROJECT_ID = '703337';
if (!CROWDIN_ACCESS_TOKEN) {
throw new Error('CROWDIN_ACCESS_TOKEN is not set');
}
// Generate Report
let REPORT_ID = null;
{
const response = await fetch(
`https://api.crowdin.com/api/v2/projects/${PROJECT_ID}/reports`,
{
headers: {
Authorization: `Bearer ${CROWDIN_ACCESS_TOKEN}`,
'Content-Type': 'application/json',
},
method: 'POST',
body: JSON.stringify({
name: 'top-members',
schema: {
format: 'json',
},
}),
},
);
const json = await response.json();
console.log(`Report ID: ${json?.data?.identifier}`);
REPORT_ID = json?.data?.identifier;
}
if (!REPORT_ID) {
throw new Error('Report ID is not found');
}
// Check Report Generation Status
let finished = false;
{
let maxPolls = 10;
do {
maxPolls--;
if (maxPolls < 0) break;
// Wait for 1 second
await new Promise((resolve) => setTimeout(resolve, 1000));
const status = await fetch(
`https://api.crowdin.com/api/v2/projects/${PROJECT_ID}/reports/${REPORT_ID}`,
{
headers: {
Authorization: `Bearer ${CROWDIN_ACCESS_TOKEN}`,
'Content-Type': 'application/json',
},
},
);
const json = await status.json();
const progress = json?.data?.progress;
console.log(`Progress: ${progress}% (${maxPolls} retries left)`);
finished = json?.data?.status === 'finished';
} while (!finished);
}
if (!finished) {
throw new Error('Failed to generate report');
}
// Download Report
let reportURL = null;
{
const response = await fetch(
`https://api.crowdin.com/api/v2/projects/${PROJECT_ID}/reports/${REPORT_ID}/download`,
{
headers: {
Authorization: `Bearer ${CROWDIN_ACCESS_TOKEN}`,
'Content-Type': 'application/json',
},
},
);
const json = await response.json();
reportURL = json?.data?.url;
console.log(`Report URL: ${reportURL}`);
}
if (!reportURL) {
throw new Error('Report URL is not found');
}
// Actually download the report
let members = null;
{
const response = await fetch(reportURL);
const json = await response.json();
const { data } = json;
if (!data?.length) {
throw new Error('No data found');
}
// Sort by 'user.fullName'
data.sort((a, b) => a.user.username.localeCompare(b.user.username));
members = data
.filter((item) => {
const isMyself = item.user.username === 'cheeaun';
const translatedMoreThanZero = item.translated > 0;
return !isMyself && translatedMoreThanZero;
})
.map((item) => ({
avatarUrl: item.user.avatarUrl,
username: item.user.username,
languages: item.languages.map((lang) => lang.name),
}));
console.log(members);
if (members?.length) {
fs.writeFileSync(
'i18n-volunteers.json',
JSON.stringify(members, null, '\t'),
);
}
}
if (!members?.length) {
throw new Error('No members found');
}

Wyświetl plik

@ -1,34 +1,12 @@
import fs from 'fs';
const { INSTANCES_SOCIAL_SECRET_TOKEN } = process.env;
const params = new URLSearchParams({
count: 0,
min_users: 500,
sort_by: 'active_users',
sort_order: 'desc',
});
const url = `https://instances.social/api/1.0/instances/list?${params.toString()}`;
const results = await fetch(url, {
headers: {
Authorization: `Bearer ${INSTANCES_SOCIAL_SECRET_TOKEN}`,
},
});
const url = 'https://api.joinmastodon.org/servers';
const results = await fetch(url);
const json = await results.json();
// Filters
json.instances = json.instances.filter(
(instance) => Number(instance.connections) > 20,
);
const names = json.instances.map((instance) => instance.name);
const domains = json.map((instance) => instance.domain);
// Write to file
const path = './src/data/instances.json';
fs.writeFileSync(path, JSON.stringify(names, null, '\t'), 'utf8');
// Write everything to file, for debugging
const path2 = './src/data/instances-full.json';
fs.writeFileSync(path2, JSON.stringify(json, null, '\t'), 'utf8');
fs.writeFileSync(path, JSON.stringify(domains, null, '\t'), 'utf8');

Wyświetl plik

@ -0,0 +1,9 @@
import fs from 'fs';
fetch('https://translang.phanpy.social/api/v1/languages')
.then((response) => response.json())
.then((json) => {
const file = './src/data/translang-languages.json';
console.log(`Writing ${file}...`);
fs.writeFileSync(file, JSON.stringify(json, null, '\t'), 'utf8');
});

Wyświetl plik

@ -0,0 +1,27 @@
// Find for <!-- i18n volunteers start --><!-- i18n volunteers end --> and inject list of i18n volunteers in between
import fs from 'fs';
const i18nVolunteers = JSON.parse(fs.readFileSync('i18n-volunteers.json'));
const readme = fs.readFileSync('README.md', 'utf8');
const i18nVolunteersStart = '<!-- i18n volunteers start -->';
const i18nVolunteersEnd = '<!-- i18n volunteers end -->';
const i18nVolunteersList = i18nVolunteers
.map((member) => {
return `- <img src="${member.avatarUrl}" alt="" width="16" height="16" /> ${
member.username
} (${member.languages.join(', ')})`;
})
.join('\n');
const readmeUpdated = readme.replace(
new RegExp(`${i18nVolunteersStart}.*${i18nVolunteersEnd}`, 's'),
`${i18nVolunteersStart}\n${i18nVolunteersList}\n${i18nVolunteersEnd}`,
);
fs.writeFileSync('README.md', readmeUpdated);
console.log('Updated README.md');

Plik diff jest za duży Load Diff

Wyświetl plik

@ -1,6 +1,8 @@
import './app.css';
import { useLingui } from '@lingui/react';
import debounce from 'just-debounce-it';
import { lazy, memo, Suspense } from 'preact/compat';
import {
useEffect,
useLayoutEffect,
@ -9,12 +11,14 @@ import {
useState,
} from 'preact/hooks';
import { matchPath, Route, Routes, useLocation } from 'react-router-dom';
import 'swiped-events';
import { subscribe } from 'valtio';
import BackgroundService from './components/background-service';
import ComposeButton from './components/compose-button';
import { ICONS } from './components/icon';
import { ICONS } from './components/ICONS';
import KeyboardShortcutsHelp from './components/keyboard-shortcuts-help';
import Loader from './components/loader';
import Modals from './components/modals';
@ -23,8 +27,11 @@ import SearchCommand from './components/search-command';
import Shortcuts from './components/shortcuts';
import NotFound from './pages/404';
import AccountStatuses from './pages/account-statuses';
import AnnualReport from './pages/annual-report';
import Bookmarks from './pages/bookmarks';
import Catchup from './pages/catchup';
import Favourites from './pages/favourites';
import Filters from './pages/filters';
import FollowedHashtags from './pages/followed-hashtags';
import Following from './pages/following';
import Hashtag from './pages/hashtag';
@ -36,12 +43,15 @@ import Login from './pages/login';
import Mentions from './pages/mentions';
import Notifications from './pages/notifications';
import Public from './pages/public';
import ScheduledPosts from './pages/scheduled-posts';
import Search from './pages/search';
import StatusRoute from './pages/status-route';
import Trending from './pages/trending';
import Welcome from './pages/welcome';
import {
api,
hasInstance,
hasPreferences,
initAccount,
initClient,
initInstance,
@ -51,9 +61,22 @@ import { getAccessToken } from './utils/auth';
import focusDeck from './utils/focus-deck';
import states, { initStates, statusKey } from './utils/states';
import store from './utils/store';
import { getCurrentAccount } from './utils/store-utils';
import {
getAccount,
getCredentialApplication,
getCurrentAccount,
getVapidKey,
setCurrentAccountID,
} from './utils/store-utils';
import './utils/toast-alert';
// Lazy load Sandbox component only in development
const Sandbox =
import.meta.env.DEV || import.meta.env.PHANPY_DEV
? lazy(() => import('./pages/sandbox'))
: () => null;
window.__STATES__ = states;
window.__STATES_STATS__ = () => {
const keys = [
@ -85,52 +108,57 @@ window.__STATES_STATS__ = () => {
// Experimental "garbage collection" for states
// Every 15 minutes
// Only posts for now
setInterval(() => {
if (!window.__IDLE__) return;
const { statuses, unfurledLinks, notifications } = states;
let keysCount = 0;
const { instance } = api();
for (const key in statuses) {
if (!window.__IDLE__) break;
try {
const $post = document.querySelector(
`[data-state-post-id~="${key}"], [data-state-post-ids~="${key}"]`,
);
const postInNotifications = notifications.some(
(n) => key === statusKey(n.status?.id, instance),
);
if (!$post && !postInNotifications) {
delete states.statuses[key];
delete states.statusQuotes[key];
for (const link in unfurledLinks) {
const unfurled = unfurledLinks[link];
const sKey = statusKey(unfurled.id, unfurled.instance);
if (sKey === key) {
delete states.unfurledLinks[link];
break;
setInterval(
() => {
if (!window.__IDLE__) return;
const { statuses, unfurledLinks, notifications } = states;
let keysCount = 0;
const { instance } = api();
for (const key in statuses) {
if (!window.__IDLE__) break;
try {
const $post = document.querySelector(
`[data-state-post-id~="${key}"], [data-state-post-ids~="${key}"]`,
);
const postInNotifications = notifications.some(
(n) => key === statusKey(n.status?.id, instance),
);
if (!$post && !postInNotifications) {
delete states.statuses[key];
delete states.statusQuotes[key];
for (const link in unfurledLinks) {
const unfurled = unfurledLinks[link];
const sKey = statusKey(unfurled.id, unfurled.instance);
if (sKey === key) {
delete states.unfurledLinks[link];
break;
}
}
keysCount++;
}
keysCount++;
}
} catch (e) {}
}
if (keysCount) {
console.info(`GC: Removed ${keysCount} keys`);
}
}, 15 * 60 * 1000);
} catch (e) {}
}
if (keysCount) {
console.info(`GC: Removed ${keysCount} keys`);
}
},
15 * 60 * 1000,
);
// Preload icons
// There's probably a better way to do this
// Related: https://github.com/vitejs/vite/issues/10600
setTimeout(() => {
for (const icon in ICONS) {
queueMicrotask(() => {
setTimeout(() => {
if (Array.isArray(ICONS[icon])) {
ICONS[icon][0]?.();
} else if (typeof ICONS[icon] === 'object') {
ICONS[icon].module?.();
} else {
ICONS[icon]?.();
}
});
}, 1);
}
}, 5000);
@ -195,6 +223,12 @@ const isIOS = /iPad|iPhone|iPod/.test(navigator.userAgent);
if (isIOS) {
document.addEventListener('visibilitychange', () => {
if (document.visibilityState === 'visible') {
// Don't reset theme color if media modal is showing
// Media modal will set its own theme color based on the media's color
const showingMediaModal =
document.getElementsByClassName('media-modal-container').length > 0;
if (showingMediaModal) return;
const theme = store.local.get('theme');
let $meta;
if (theme) {
@ -244,7 +278,7 @@ if (isIOS) {
document.documentElement.classList.add(`is-${theme}`);
document
.querySelector('meta[name="color-scheme"]')
.setAttribute('content', theme || 'dark light');
.setAttribute('content', theme || 'light dark');
// Enable manual theme <meta>
const $manualMeta = document.querySelector(
@ -289,9 +323,59 @@ subscribe(states, (changes) => {
}
});
const BENCHES = new Map();
window.__BENCH_RESULTS = new Map();
window.__BENCHMARK = {
start(name) {
if (!import.meta.env.DEV && !import.meta.env.PHANPY_DEV) return;
// If already started, ignore
if (BENCHES.has(name)) return;
const start = performance.now();
BENCHES.set(name, start);
},
end(name) {
if (!import.meta.env.DEV && !import.meta.env.PHANPY_DEV) return;
const start = BENCHES.get(name);
if (start) {
const end = performance.now();
const duration = end - start;
__BENCH_RESULTS.set(name, duration);
BENCHES.delete(name);
}
},
};
if (import.meta.env.DEV) {
// If press shift down, set --time-scale to 10 in root
document.addEventListener('keydown', (e) => {
if (e.key === 'Shift') {
document.documentElement.classList.add('slow-mo');
}
});
document.addEventListener('keyup', (e) => {
if (e.key === 'Shift') {
document.documentElement.classList.remove('slow-mo');
}
});
}
{
// Temporary Experiments
// May be removed in the future
document.body.classList.toggle(
'exp-tab-bar-v2',
store.local.get('experiments-tabBarV2') ?? false,
);
}
function App() {
const [isLoggedIn, setIsLoggedIn] = useState(false);
const [uiState, setUIState] = useState('loading');
__BENCHMARK.start('app-init');
__BENCHMARK.start('time-to-following');
__BENCHMARK.start('time-to-home');
__BENCHMARK.start('time-to-isLoggedIn');
useLingui();
useEffect(() => {
const instanceURL = store.local.get('instanceURL');
@ -308,9 +392,13 @@ function App() {
window.location.pathname || '/',
);
const clientID = store.session.get('clientID');
const clientSecret = store.session.get('clientSecret');
const vapidKey = store.session.get('vapidKey');
const {
client_id: clientID,
client_secret: clientSecret,
vapid_key,
} = getCredentialApplication(instanceURL) || {};
const vapidKey = getVapidKey(instanceURL) || vapid_key;
const verifier = store.sessionCookie.get('codeVerifier');
(async () => {
setUIState('loading');
@ -319,43 +407,83 @@ function App() {
client_id: clientID,
client_secret: clientSecret,
code,
code_verifier: verifier || undefined,
});
const client = initClient({ instance: instanceURL, accessToken });
await Promise.allSettled([
initInstance(client, instanceURL),
initAccount(client, instanceURL, accessToken, vapidKey),
]);
initStates();
initPreferences(client);
if (accessToken) {
const client = initClient({ instance: instanceURL, accessToken });
await Promise.allSettled([
initPreferences(client),
initInstance(client, instanceURL),
initAccount(client, instanceURL, accessToken, vapidKey),
]);
initStates();
window.__IGNORE_GET_ACCOUNT_ERROR__ = true;
setIsLoggedIn(true);
setUIState('default');
setIsLoggedIn(true);
setUIState('default');
} else {
setUIState('error');
}
__BENCHMARK.end('app-init');
})();
} else {
window.__IGNORE_GET_ACCOUNT_ERROR__ = true;
const account = getCurrentAccount();
const searchAccount = decodeURIComponent(
(window.location.search.match(/account=([^&]+)/) || [, ''])[1],
);
let account;
if (searchAccount) {
account = getAccount(searchAccount);
console.log('searchAccount', searchAccount, account);
if (account) {
setCurrentAccountID(account.info.id);
window.history.replaceState(
{},
document.title,
window.location.pathname || '/',
);
}
}
if (!account) {
account = getCurrentAccount();
}
if (account) {
store.session.set('currentAccount', account.info.id);
setCurrentAccountID(account.info.id);
const { client } = api({ account });
const { instance } = client;
// console.log('masto', masto);
initStates();
initPreferences(client);
setUIState('loading');
(async () => {
try {
await initInstance(client, instance);
if (hasPreferences() && hasInstance(instance)) {
// Non-blocking
initPreferences(client);
initInstance(client, instance);
} else {
await Promise.allSettled([
initPreferences(client),
initInstance(client, instance),
]);
}
} catch (e) {
} finally {
setIsLoggedIn(true);
setUIState('default');
__BENCHMARK.end('app-init');
}
})();
} else {
setUIState('default');
__BENCHMARK.end('app-init');
}
}
// Cleanup
store.sessionCookie.del('clientID');
store.sessionCookie.del('clientSecret');
store.sessionCookie.del('codeVerifier');
}, []);
let location = useLocation();
@ -370,52 +498,60 @@ function App() {
return <HttpRoute />;
}
if (uiState === 'loading') {
return <Loader id="loader-root" />;
}
return (
<>
<PrimaryRoutes isLoggedIn={isLoggedIn} loading={uiState === 'loading'} />
<PrimaryRoutes isLoggedIn={isLoggedIn} />
<SecondaryRoutes isLoggedIn={isLoggedIn} />
{uiState === 'default' && (
<Routes>
<Route path="/:instance?/s/:id" element={<StatusRoute />} />
</Routes>
)}
<Routes>
<Route path="/:instance?/s/:id" element={<StatusRoute />} />
</Routes>
{isLoggedIn && <ComposeButton />}
{isLoggedIn && <Shortcuts />}
<Modals />
{isLoggedIn && <NotificationService />}
<BackgroundService isLoggedIn={isLoggedIn} />
{uiState !== 'loading' && <SearchCommand onClose={focusDeck} />}
<SearchCommand onClose={focusDeck} />
<KeyboardShortcutsHelp />
</>
);
}
function PrimaryRoutes({ isLoggedIn, loading }) {
function Root({ isLoggedIn }) {
if (isLoggedIn) {
__BENCHMARK.end('time-to-isLoggedIn');
}
return isLoggedIn ? <Home /> : <Welcome />;
}
const PrimaryRoutes = memo(({ isLoggedIn }) => {
const location = useLocation();
const nonRootLocation = useMemo(() => {
const { pathname } = location;
return !/^\/(login|welcome)/.test(pathname);
return !/^\/(login|welcome|_sandbox)/i.test(pathname);
}, [location]);
return (
<Routes location={nonRootLocation || location}>
<Route
path="/"
element={
isLoggedIn ? (
<Home />
) : loading ? (
<Loader id="loader-root" />
) : (
<Welcome />
)
}
/>
<Route path="/" element={<Root isLoggedIn={isLoggedIn} />} />
<Route path="/login" element={<Login />} />
<Route path="/welcome" element={<Welcome />} />
{(import.meta.env.DEV || import.meta.env.PHANPY_DEV) && (
<Route
path="/_sandbox"
element={
<Suspense fallback={<Loader id="loader-sandbox" />}>
<Sandbox />
</Suspense>
}
/>
)}
</Routes>
);
}
});
function getPrevLocation() {
return states.prevLocation || null;
@ -456,7 +592,11 @@ function SecondaryRoutes({ isLoggedIn }) {
<Route index element={<Lists />} />
<Route path=":id" element={<List />} />
</Route>
<Route path="/ft" element={<FollowedHashtags />} />
<Route path="/fh" element={<FollowedHashtags />} />
<Route path="/sp" element={<ScheduledPosts />} />
<Route path="/ft" element={<Filters />} />
<Route path="/catchup" element={<Catchup />} />
<Route path="/annual_report/:year" element={<AnnualReport />} />
</>
)}
<Route path="/:instance?/t/:hashtag" element={<Hashtag />} />

Plik binarny nie jest wyświetlany.

Po

Szerokość:  |  Wysokość:  |  Rozmiar: 25 KiB

Wyświetl plik

@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" version="1.0" viewBox="0 0 641 223">
<path fill="#aaa" d="M86 214c-9-1-17-4-24-8l-6-3-5-5-5-4-4-6-4-6-3-8-2-8v-27l2-9 3-9 4-6 4-6 5-5 5-5 7-3 6-4 7-2 7-2 12-1h12l7 1 8 2 7 4 7 3 5 5 5 4-10 10-10 9-4-3-10-5-5-1H88l-5 2-6 3-3 4-4 4-2 5-2 6v6l-1 7 1 7 2 7 3 5 2 4 4 3 4 3 5 2 6 2h9l10-1 5-2 6-3v-16H91v-27h59v54l-1 3-2 3-5 4-4 4-5 3-5 2-8 2-8 2-10 1H92l-6-1zm266-62V91h34v46h44V91h34v121h-34v-46h-44v46h-34v-61zm-182-1V90h34v121h-34v-60zm59-1V90h35l36 1 5 2c3 0 8 2 10 4l5 2 4 5 5 4 3 7 3 7 1 13v13l-4 6-3 7-4 4-5 5-5 2-5 3-6 2-5 1-18 1h-18v32h-34v-61zm67-2 3-2 2-4 2-5v-5l-2-4-2-4-3-2-3-3h-30v31h30l3-2zm226 39v-24l-8-12-18-28a1751 1751 0 0 0-20-31v-2h39l7 12 12 21 6 9 13-21 13-21h38v2l-41 61-7 10v48h-34v-24zM109 66l-4-1-5-5-5-4-1-5-3-9v-5l1-5c2-7 3-10 8-15l4-4 7-2 7-2h7l6 1 5 2 5 2 3 4 4 3 2 6 2 5v13l-2 5-2 6-4 4-3 3-5 2-4 2-9 1h-9l-5-2zm22-11 4-2 3-4 2-5V34l-2-4-2-4-3-2-4-3-5-1h-6l-4 2-5 2-2 4-3 5-1 3v4l1 5 2 5 2 2 5 3 4 2h10l4-2zM37 39V11h33l3 1 3 2 4 3 3 3 1 5 1 4v5l-1 4-3 4-3 5-4 1-3 2-11 1H49v16H37V39zm31 0 3-2 1-2 1-2v-4l-1-3-3-2-2-2H49v18h15l4-1zm107 25a512 512 0 0 0-19-53h14l4 14 6 19 1 4 1-1 7-19 5-17h9l6 19 7 18v-1l2-6 5-17 4-13h14v1l-4 12-16 41v2h-5l-5-1-6-15-6-15-1 1-3 7-6 15-2 8h-11l-1-3zm74-25V11h42v11h-29v2l-1 5v4h29v11h-28v11h2l15 1h13v11h-43V39zm55 0V11h33l5 3 5 2 2 4 2 5v10l-2 3-1 4-5 3-5 3 5 5 8 10 3 4h-14l-7-9-8-10h-9v19h-12V39zm33-3 2-3v-6l-3-3-2-3h-18v16h1v1h17l2-2zm26 3V11h42v11h-29l-1 6v5h29v11h-28v5l-1 5 1 1v1h30v11h-43V39zm54 0V11h17l18 1 4 2 5 3 2 4 3 4 2 6 1 6v5c-1 6-3 12-6 15l-3 4-5 3-5 2-17 1h-16V39zm33 14 5-5 2-3v-6l-1-6-1-3-1-3-4-3-3-2h-5l-6-1-3 1h-3v34h9l8-1 3-2zm50-14V11h34l5 2 4 2 2 3 2 3v9l-2 2-3 4-1 1 3 3 3 4 1 3 1 4-1 4-1 4-3 3-3 3-5 1-5 1h-31V39zm34 15 2-1v-6l-2-2-2-2h-20v13h20l2-2zm-3-22 4-2v-6l-2-1-2-2h-19v12h16l4-1zm42 24V45l-6-9-11-17-5-8h15l4 8 7 11 2 3 7-11 7-11h14l-11 16-11 17v23h-12V56z"/>
</svg>

Po

Szerokość:  |  Wysokość:  |  Rozmiar: 1.9 KiB

Plik binarny nie jest wyświetlany.

Plik binarny nie jest wyświetlany.

Po

Szerokość:  |  Wysokość:  |  Rozmiar: 62 KiB

Plik binarny nie jest wyświetlany.

Plik binarny nie jest wyświetlany.

Wyświetl plik

@ -8,27 +8,38 @@ body.cloak,
.name-text *,
.status .content-container,
.status .content-container *,
.status .content-compact,
.status .content-compact > *,
.account-container .actions small,
.account-container :is(header, main > *:not(.actions)),
.account-container :is(header, main > *:not(.actions)) *,
.header-double-lines,
.account-block {
.header-double-lines *,
.account-block,
.catchup-filters .filter-author *,
.post-peek-html *,
.post-peek-content > *,
.request-notifications-account *,
.status.compact-thread *,
.status .content-compact,
.bidi-isolate,
.should-cloak {
text-decoration-thickness: 1.1em;
text-decoration-line: line-through;
text-rendering: optimizeSpeed;
/* text-rendering: optimizeSpeed; */
filter: opacity(0.5);
}
.name-text *,
.status .content-container *,
.account-container :is(header, main > *:not(.actions)) * {
.account-container :is(header, main > *:not(.actions)) *,
.post-peek-content > * {
filter: none;
}
.status :is(img, video, audio),
.media-post .media,
.avatar,
.avatar *,
.emoji,
.header-banner {
.header-banner,
.post-peek-media {
filter: contrast(0) !important;
background-color: #000 !important;
}
@ -37,7 +48,26 @@ body.cloak,
/* SPECIAL CASES */
@supports (display: -webkit-box) {
body.cloak .card :is(.title, .meta) {
background-color: var(--text-color) !important;
:is(body.cloak, .cloak) .card :is(.title, .meta) {
background-color: currentColor !important;
}
}
body.cloak,
.cloak {
.header-double-lines *,
.account-container .profile-metadata b,
.account-container .actions small,
.account-container .stats *,
.media-container figcaption,
.media-container figcaption > *,
.catchup-filters .filter-author *,
.request-notifications-account * {
color: var(--text-color) !important;
}
.account-container .actions small,
.status .content-compact {
background-color: currentColor !important;
}
}

Wyświetl plik

@ -0,0 +1,195 @@
export const ICONS = {
x: () => import('@iconify-icons/mingcute/close-line'),
heart: () => import('@iconify-icons/mingcute/heart-line'),
bookmark: () => import('@iconify-icons/mingcute/bookmark-line'),
'check-circle': () => import('@iconify-icons/mingcute/check-circle-line'),
'x-circle': () => import('@iconify-icons/mingcute/close-circle-line'),
transfer: () => import('@iconify-icons/mingcute/transfer-4-line'),
rocket: () => import('@iconify-icons/mingcute/rocket-line'),
'arrow-left': {
module: () => import('@iconify-icons/mingcute/arrow-left-line'),
rtl: true,
},
'arrow-right': {
module: () => import('@iconify-icons/mingcute/arrow-right-line'),
rtl: true,
},
'arrow-up': () => import('@iconify-icons/mingcute/arrow-up-line'),
'arrow-down': () => import('@iconify-icons/mingcute/arrow-down-line'),
earth: () => import('@iconify-icons/mingcute/world-2-line'),
lock: () => import('@iconify-icons/mingcute/lock-line'),
unlock: () => import('@iconify-icons/mingcute/unlock-line'),
'eye-close': () => import('@iconify-icons/mingcute/eye-close-line'),
'eye-open': () => import('@iconify-icons/mingcute/eye-2-line'),
message: () => import('@iconify-icons/mingcute/mail-line'),
comment: {
module: () => import('@iconify-icons/mingcute/chat-3-line'),
rtl: true,
},
comment2: {
module: () => import('@iconify-icons/mingcute/comment-2-line'),
rtl: true,
},
home: () => import('@iconify-icons/mingcute/home-3-line'),
notification: () => import('@iconify-icons/mingcute/notification-line'),
follow: () => import('@iconify-icons/mingcute/user-follow-line'),
'follow-add': () => import('@iconify-icons/mingcute/user-add-line'),
poll: [() => import('@iconify-icons/mingcute/chart-bar-line'), '90deg'],
pencil: () => import('@iconify-icons/mingcute/pencil-line'),
quill: () => import('@iconify-icons/mingcute/quill-pen-line'),
at: () => import('@iconify-icons/mingcute/at-line'),
attachment: () => import('@iconify-icons/mingcute/attachment-line'),
upload: () => import('@iconify-icons/mingcute/upload-3-line'),
gear: () => import('@iconify-icons/mingcute/settings-3-line'),
more: () => import('@iconify-icons/mingcute/more-3-line'),
more2: () => import('@iconify-icons/mingcute/more-1-fill'),
external: {
module: () => import('@iconify-icons/mingcute/external-link-line'),
rtl: true,
},
popout: {
module: () => import('@iconify-icons/mingcute/external-link-line'),
rtl: true,
},
popin: {
module: () => import('@iconify-icons/mingcute/external-link-line'),
rotate: '180deg',
rtl: true,
},
plus: () => import('@iconify-icons/mingcute/add-circle-line'),
'chevron-left': {
module: () => import('@iconify-icons/mingcute/left-line'),
rtl: true,
},
'chevron-right': {
module: () => import('@iconify-icons/mingcute/right-line'),
rtl: true,
},
'chevron-down': () => import('@iconify-icons/mingcute/down-line'),
reply: {
module: () => import('@iconify-icons/mingcute/share-forward-line'),
rotate: '180deg',
flip: 'horizontal',
rtl: true,
},
thread: () => import('@iconify-icons/mingcute/route-line'),
group: {
module: () => import('@iconify-icons/mingcute/group-line'),
rtl: true,
},
bot: () => import('@iconify-icons/mingcute/android-2-line'),
menu: () => import('@iconify-icons/mingcute/rows-4-line'),
list: {
module: () => import('@iconify-icons/mingcute/list-check-line'),
rtl: true,
},
search: () => import('@iconify-icons/mingcute/search-2-line'),
hashtag: () => import('@iconify-icons/mingcute/hashtag-line'),
info: () => import('@iconify-icons/mingcute/information-line'),
shortcut: () => import('@iconify-icons/mingcute/lightning-line'),
user: () => import('@iconify-icons/mingcute/user-4-line'),
following: () => import('@iconify-icons/mingcute/walk-line'),
pin: () => import('@iconify-icons/mingcute/pin-line'),
unpin: [() => import('@iconify-icons/mingcute/pin-line'), '180deg'],
bus: () => import('@iconify-icons/mingcute/bus-2-line'),
link: () => import('@iconify-icons/mingcute/link-2-line'),
history: () => import('@iconify-icons/mingcute/history-line'),
share: () => import('@iconify-icons/mingcute/share-2-line'),
sparkles: () => import('@iconify-icons/mingcute/sparkles-line'),
sparkles2: () => import('@iconify-icons/mingcute/sparkles-2-line'),
exit: {
module: () => import('@iconify-icons/mingcute/exit-line'),
rtl: true,
},
translate: () => import('@iconify-icons/mingcute/translate-line'),
play: () => import('@iconify-icons/mingcute/play-fill'),
trash: () => import('@iconify-icons/mingcute/delete-2-line'),
mute: {
module: () => import('@iconify-icons/mingcute/volume-mute-line'),
rtl: true,
},
unmute: {
module: () => import('@iconify-icons/mingcute/volume-line'),
rtl: true,
},
block: () => import('@iconify-icons/mingcute/forbid-circle-line'),
unblock: [
() => import('@iconify-icons/mingcute/forbid-circle-line'),
'180deg',
],
flag: () => import('@iconify-icons/mingcute/flag-1-line'),
time: () => import('@iconify-icons/mingcute/time-line'),
refresh: () => import('@iconify-icons/mingcute/refresh-2-line'),
emoji2: () => import('@iconify-icons/mingcute/emoji-2-line'),
filter: () => import('@iconify-icons/mingcute/filter-2-line'),
filters: () => import('@iconify-icons/mingcute/filter-line'),
chart: () => import('@iconify-icons/mingcute/chart-line-line'),
react: () => import('@iconify-icons/mingcute/react-line'),
layout4: {
module: () => import('@iconify-icons/mingcute/layout-4-line'),
rtl: true,
},
layout5: () => import('@iconify-icons/mingcute/layout-5-line'),
announce: {
module: () => import('@iconify-icons/mingcute/announcement-line'),
rtl: true,
},
alert: () => import('@iconify-icons/mingcute/alert-line'),
round: () => import('@iconify-icons/mingcute/round-fill'),
'arrow-up-circle': () =>
import('@iconify-icons/mingcute/arrow-up-circle-line'),
'arrow-down-circle': () =>
import('@iconify-icons/mingcute/arrow-down-circle-line'),
clipboard: {
module: () => import('@iconify-icons/mingcute/clipboard-line'),
rtl: true,
},
'account-edit': () => import('@iconify-icons/mingcute/user-edit-line'),
'account-warning': () => import('@iconify-icons/mingcute/user-warning-line'),
'account-add': () => import('@iconify-icons/mingcute/user-add-2-line'),
keyboard: () => import('@iconify-icons/mingcute/keyboard-line'),
cloud: () => import('@iconify-icons/mingcute/cloud-line'),
month: {
module: () => import('@iconify-icons/mingcute/calendar-month-line'),
rtl: true,
},
media: () => import('@iconify-icons/mingcute/photo-album-line'),
speak: () => import('@iconify-icons/mingcute/radar-line'),
building: () => import('@iconify-icons/mingcute/building-5-line'),
history2: {
module: () => import('@iconify-icons/mingcute/history-2-line'),
rtl: true,
},
document: () => import('@iconify-icons/mingcute/document-line'),
'arrows-right': {
module: () => import('@iconify-icons/mingcute/arrows-right-line'),
rtl: true,
},
code: () => import('@iconify-icons/mingcute/code-line'),
copy: () => import('@iconify-icons/mingcute/copy-2-line'),
quote: {
module: () => import('@iconify-icons/mingcute/quote-left-line'),
rtl: true,
},
quote2: {
module: () => import('@iconify-icons/mingcute/blockquote-line'),
rtl: true,
},
settings: () => import('@iconify-icons/mingcute/settings-6-line'),
'heart-break': () => import('@iconify-icons/mingcute/heart-crack-line'),
'user-x': () => import('@iconify-icons/mingcute/user-x-line'),
minimize: () => import('@iconify-icons/mingcute/down-line'),
celebrate: () => import('@iconify-icons/mingcute/celebrate-line'),
schedule: () => import('@iconify-icons/mingcute/calendar-time-add-line'),
day: () => import('@iconify-icons/mingcute/calendar-day-line'),
camera: () => import('@iconify-icons/mingcute/camera-line'),
endorsement: {
module: () => import('@iconify-icons/mingcute/user-star-line'),
rtl: true,
},
formula: () => import('@iconify-icons/mingcute/formula-line'),
edit: () => import('@iconify-icons/mingcute/edit-4-line'),
'zoom-in': () => import('@iconify-icons/mingcute/zoom-in-line'),
'zoom-out': () => import('@iconify-icons/mingcute/zoom-out-line'),
'cursor-hand': () => import('@iconify-icons/mingcute/hand-finger-2-line'),
};

Wyświetl plik

@ -0,0 +1,73 @@
import { useEffect, useState } from 'preact/hooks';
export const MIN_SCHEDULED_AT = 6 * 60 * 1000; // 6 mins
const MAX_SCHEDULED_AT = 90 * 24 * 60 * 60 * 1000; // 90 days
export default function ScheduledAtField({ scheduledAt, setScheduledAt }) {
if (!scheduledAt || !(scheduledAt instanceof Date)) {
console.warn('scheduledAt is not a Date:', scheduledAt);
return;
}
const [minStr, setMinStr] = useState();
const [maxStr, setMaxStr] = useState();
const timezoneOffset = scheduledAt.getTimezoneOffset();
useEffect(() => {
function updateMinStr() {
const min = new Date(Date.now() + MIN_SCHEDULED_AT);
const str = new Date(min.getTime() - timezoneOffset * 60000)
.toISOString()
.slice(0, 16);
setMinStr(str);
}
updateMinStr();
function updateMaxStr() {
const max = new Date(Date.now() + MAX_SCHEDULED_AT);
const str = new Date(max.getTime() - timezoneOffset * 60000)
.toISOString()
.slice(0, 16);
setMaxStr(str);
}
updateMaxStr();
// Update every 10s
const intervalId = setInterval(() => {
updateMinStr();
updateMaxStr();
}, 1000 * 10);
return () => clearInterval(intervalId);
}, []);
const defaultValue = scheduledAt
? new Date(scheduledAt.getTime() - scheduledAt.getTimezoneOffset() * 60000)
.toISOString()
.slice(0, 16)
: null;
return (
<input
type="datetime-local"
name="scheduledAt"
defaultValue={defaultValue}
min={minStr}
max={maxStr}
required
onChange={(e) => {
setScheduledAt(new Date(e.target.value));
}}
/>
);
}
export function getLocalTimezoneName() {
const date = new Date();
const formatter = new Intl.DateTimeFormat(undefined, {
timeZoneName: 'long',
});
const parts = formatter.formatToParts(date);
const timezoneName = parts.find(
(part) => part.type === 'timeZoneName',
)?.value;
return timezoneName;
}

Wyświetl plik

@ -29,6 +29,8 @@
line-clamp: 1;
text-overflow: ellipsis;
overflow: hidden;
unicode-bidi: isolate;
direction: initial;
}
a {

Wyświetl plik

@ -1,5 +1,7 @@
import './account-block.css';
import { Plural, Trans, useLingui } from '@lingui/react/macro';
// import { useNavigate } from 'react-router-dom';
import enhanceContent from '../utils/enhance-content';
import niceDateTime from '../utils/nice-date-time';
@ -9,6 +11,7 @@ import states from '../utils/states';
import Avatar from './avatar';
import EmojiText from './emoji-text';
import Icon from './icon';
import RolesTags from './roles-tags';
function AccountBlock({
skeleton,
@ -26,6 +29,7 @@ function AccountBlock({
relationship = {},
excludeRelationshipAttrs = [],
}) {
const { t } = useLingui();
if (skeleton) {
return (
<div class="account-block skeleton">
@ -33,7 +37,7 @@ function AccountBlock({
<span>
<b></b>
<br />
<span class="account-block-acct">@</span>
<span class="account-block-acct"></span>
</span>
</div>
);
@ -61,6 +65,9 @@ function AccountBlock({
note,
group,
followersCount,
createdAt,
locked,
roles,
} = account;
let [_, acct1, acct2] = acct.match(/([^@]+)(@.+)/i) || [, acct];
if (accountInstance) {
@ -85,7 +92,7 @@ function AccountBlock({
class="account-block"
href={url}
target={external ? '_blank' : null}
title={`@${acct}`}
title={acct2 ? acct : `@${acct}`}
onClick={(e) => {
if (external) return;
e.preventDefault();
@ -101,11 +108,14 @@ function AccountBlock({
}
}}
>
<Avatar
url={useAvatarStatic ? avatarStatic : avatar || avatarStatic}
size={avatarSize}
squircle={bot}
/>
<div class="avatar-container">
<Avatar
url={useAvatarStatic ? avatarStatic : avatar || avatarStatic}
staticUrl={useAvatarStatic ? undefined : avatarStatic}
size={avatarSize}
squircle={bot}
/>
</div>
<span class="account-block-content">
{!hideDisplayName && (
<>
@ -118,41 +128,49 @@ function AccountBlock({
)}
</>
)}{' '}
<span class="account-block-acct">
@{acct1}
<span class="account-block-acct bidi-isolate">
{acct2 ? '' : '@'}
{acct1}
<wbr />
{acct2}
{locked && (
<>
{' '}
<Icon icon="lock" size="s" alt={t`Locked`} />
</>
)}
</span>
<RolesTags roles={roles} accountUrl={url} />
{showActivity && (
<>
<br />
<small class="last-status-at insignificant">
Posts: {statusesCount}
{!!lastStatusAt && (
<>
{' '}
&middot; Last posted:{' '}
<div class="account-block-stats">
<Trans>Posts: {shortenNumber(statusesCount)}</Trans>
{!!lastStatusAt && (
<>
{' '}
&middot;{' '}
<Trans>
Last posted:{' '}
{niceDateTime(lastStatusAt, {
hideTime: true,
})}
</>
)}
</small>
</>
</Trans>
</>
)}
</div>
)}
{showStats && (
<div class="account-block-stats">
{bot && (
<>
<span class="tag collapsed">
<Icon icon="bot" /> Automated
<Icon icon="bot" /> <Trans>Automated</Trans>
</span>
</>
)}
{!!group && (
<>
<span class="tag collapsed">
<Icon icon="group" /> Group
<Icon icon="group" /> <Trans>Group</Trans>
</span>
</>
)}
@ -161,26 +179,37 @@ function AccountBlock({
<div class="shazam-container-inner">
{excludedRelationship.following &&
excludedRelationship.followedBy ? (
<span class="tag minimal">Mutual</span>
<span class="tag minimal">
<Trans>Mutual</Trans>
</span>
) : excludedRelationship.requested ? (
<span class="tag minimal">Requested</span>
<span class="tag minimal">
<Trans>Requested</Trans>
</span>
) : excludedRelationship.following ? (
<span class="tag minimal">Following</span>
<span class="tag minimal">
<Trans>Following</Trans>
</span>
) : excludedRelationship.followedBy ? (
<span class="tag minimal">Follows you</span>
<span class="tag minimal">
<Trans>Follows you</Trans>
</span>
) : null}
</div>
</div>
)}
{!!followersCount && (
<span class="ib">
{shortenNumber(followersCount)}{' '}
{followersCount === 1 ? 'follower' : 'followers'}
<Plural
value={followersCount}
one="# follower"
other="# followers"
/>
</span>
)}
{!!verifiedField && (
<span class="verified-field">
<Icon icon="check-circle" size="s" />{' '}
<Icon icon="check-circle" size="s" alt={t`Verified`} />{' '}
<span
dangerouslySetInnerHTML={{
__html: enhanceContent(verifiedField.value, { emojis }),
@ -188,6 +217,23 @@ function AccountBlock({
/>
</span>
)}
{!bot &&
!group &&
!hasRelationship &&
!followersCount &&
!verifiedField &&
!!createdAt && (
<span class="created-at">
<Trans>
Joined{' '}
<time datetime={createdAt}>
{niceDateTime(createdAt, {
hideTime: true,
})}
</time>
</Trans>
</span>
)}
</div>
)}
</span>

Wyświetl plik

@ -0,0 +1,29 @@
import { Trans } from '@lingui/react/macro';
import punycode from 'punycode/';
function AccountHandleInfo({ acct, instance }) {
// acct = username or username@server
let [username, server] = acct.split('@');
if (!server) server = instance;
const encodedAcct = punycode.toASCII(acct);
return (
<div class="handle-info">
<span class="handle-handle" title={encodedAcct}>
<b class="handle-username">{username}</b>
<span class="handle-at">@</span>
<b class="handle-server">{server}</b>
</span>
<div class="handle-legend">
<span class="ib">
<span class="handle-legend-icon username" /> <Trans>username</Trans>
</span>{' '}
<span class="ib">
<span class="handle-legend-icon server" />{' '}
<Trans>server domain name</Trans>
</span>
</div>
</div>
);
}
export default AccountHandleInfo;

Wyświetl plik

@ -9,11 +9,15 @@
--original-color: var(--link-color);
.note {
font-size: 95%;
font-size: 0.95em;
line-height: 1.4;
text-wrap: pretty;
margin-bottom: 16px;
&:empty {
display: none;
}
> *:first-child {
margin-top: 0;
padding-top: 0;
@ -47,13 +51,14 @@
border-radius: var(--posting-stats-size);
overflow: hidden;
margin: 8px 0;
box-shadow: inset 0 0 0 1px var(--outline-color),
box-shadow:
inset 0 0 0 1px var(--outline-color),
inset 0 0 0 1.5px var(--bg-blur-color);
background-color: var(--bg-color);
background-repeat: no-repeat;
animation: swoosh-bg-image 0.3s ease-in-out 0.3s both;
background-image: linear-gradient(
to right,
var(--to-forward),
var(--original-color) 0%,
var(--original-color) calc(var(--originals-percentage) - var(--gap)),
var(--gap-color) calc(var(--originals-percentage) - var(--gap)),
@ -62,7 +67,11 @@
var(--reply-to-color) calc(var(--replies-percentage) - var(--gap)),
var(--gap-color) calc(var(--replies-percentage) - var(--gap)),
var(--gap-color) calc(var(--replies-percentage) + var(--gap)),
var(--reblog-color) calc(var(--replies-percentage) + var(--gap)),
var(--quote-color) calc(var(--replies-percentage) + var(--gap)),
var(--quote-color) calc(var(--quotes-percentage, 0%) - var(--gap)),
var(--gap-color) calc(var(--quotes-percentage, 0%) - var(--gap)),
var(--gap-color) calc(var(--quotes-percentage, 0%) + var(--gap)),
var(--reblog-color) calc(var(--quotes-percentage, 0%) + var(--gap)),
var(--reblog-color) 100%
);
}
@ -81,7 +90,8 @@
vertical-align: middle;
margin: 0 4px 2px;
/* border: 1px solid var(--outline-color); */
box-shadow: inset 0 0 0 1px var(--outline-color),
box-shadow:
inset 0 0 0 1px var(--outline-color),
inset 0 0 0 1.5px var(--bg-blur-color);
&.posting-stats-legend-item-originals {
@ -90,6 +100,9 @@
&.posting-stats-legend-item-replies {
background-color: var(--reply-to-color);
}
&.posting-stats-legend-item-quotes {
background-color: var(--quote-color);
}
&.posting-stats-legend-item-boosts {
background-color: var(--reblog-color);
}
@ -177,8 +190,8 @@
opacity: 1;
}
.sheet .account-container .header-banner {
border-top-left-radius: 16px;
border-top-right-radius: 16px;
border-start-start-radius: 16px;
border-start-end-radius: 16px;
}
.account-container .header-banner.header-is-avatar {
mask-image: linear-gradient(
@ -213,13 +226,13 @@
background-image: none;
}
& + header .avatar + * {
& + header .avatar-container + * {
transition: opacity 0.3s ease-in-out;
opacity: 0 !important;
}
&,
& + header .avatar {
& + header .avatar-container {
transition: filter 0.3s ease-in-out;
filter: none !important;
}
@ -242,20 +255,27 @@
display: flex;
align-items: center;
gap: 8px;
text-shadow: -8px 0 12px -6px var(--bg-color), 8px 0 12px -6px var(--bg-color),
text-shadow:
-8px 0 12px -6px var(--bg-color),
8px 0 12px -6px var(--bg-color),
-8px 0 24px var(--header-color-3, --bg-color),
8px 0 24px var(--header-color-4, --bg-color);
animation: fade-in 0.3s both ease-in-out 0.1s;
}
.account-container header .avatar {
/* box-shadow: -8px 0 24px var(--header-color-3, --bg-color),
.avatar-container {
filter: drop-shadow(-2px 0 4px var(--header-color-3, --bg-color))
drop-shadow(2px 0 4px var(--header-color-4, --bg-color));
}
.avatar {
/* box-shadow: -8px 0 24px var(--header-color-3, --bg-color),
8px 0 24px var(--header-color-4, --bg-color); */
overflow: initial;
filter: drop-shadow(-2px 0 4px var(--header-color-3, --bg-color))
drop-shadow(2px 0 4px var(--header-color-4, --bg-color));
}
.account-container header .avatar:not(.has-alpha) img {
border-radius: inherit;
/* overflow: initial; */
&:not(.has-alpha) img {
border-radius: inherit;
}
}
}
.account-container main > *:first-child {
@ -284,10 +304,17 @@
align-self: center !important;
/* clip a dog ear on top right */
clip-path: polygon(0 0, calc(100% - 4px) 0, 100% 4px, 100% 100%, 0 100%);
&:dir(rtl) {
/* top left */
clip-path: polygon(4px 0, 100% 0, 100% 100%, 0 100%, 0 4px);
}
/* 4x4px square on top right */
background-size: 4px 4px;
background-repeat: no-repeat;
background-position: top right;
&:dir(rtl) {
background-position: top left;
}
background-image: linear-gradient(
to bottom,
var(--private-note-border-color),
@ -307,7 +334,7 @@
box-orient: vertical;
-webkit-line-clamp: 2;
line-clamp: 2;
text-align: left;
text-align: start;
}
&:hover:not(:active) {
@ -366,7 +393,8 @@
animation: appear 1s both ease-in-out;
> *:not(:first-child) {
margin: 0 0 0 -4px;
margin: 0;
margin-inline-start: -4px;
}
}
}
@ -374,7 +402,6 @@
flex-wrap: wrap;
}
.account-container .stats > * {
/* text-align: center; */
flex-shrink: 0;
display: flex;
gap: 0.5em;
@ -418,15 +445,15 @@
}
&:has(+ .account-metadata-box) {
border-bottom-left-radius: 4px;
border-bottom-right-radius: 4px;
border-end-start-radius: 4px;
border-end-end-radius: 4px;
}
+ .account-metadata-box {
border-top-left-radius: 4px;
border-top-right-radius: 4px;
border-bottom-left-radius: 16px;
border-bottom-right-radius: 16px;
border-start-start-radius: 4px;
border-start-end-radius: 4px;
border-end-start-radius: 16px;
border-end-end-radius: 16px;
}
}
@ -573,7 +600,7 @@
margin-top: calc(-1 * var(--banner-overlap));
}
@supports (animation-timeline: scroll()) {
@supports ((animation-timeline: scroll()) and (animation-range: 0% 100%)) {
.header-banner:not(.header-is-avatar):not(:hover):not(:active) {
animation: bye-banner 1s linear both;
animation-timeline: view();
@ -726,11 +753,11 @@
--shadow-offset: 16px;
--shadow-blur: 32px;
--shadow-spread: calc(var(--shadow-blur) * -0.75);
box-shadow: calc(var(--shadow-offset) * -1) var(--shadow-offset)
var(--shadow-blur) var(--shadow-spread)
var(--header-color-1, var(--drop-shadow-color)),
box-shadow:
calc(var(--shadow-offset) * -1) var(--shadow-offset) var(--shadow-blur)
var(--shadow-spread) var(--header-color-1, var(--drop-shadow-color)),
var(--shadow-offset) var(--shadow-offset) var(--shadow-blur)
var(--shadow-spread) var(--header-color-2, var(--drop-shadow-color));
var(--shadow-spread) var(--header-color-2, var(--drop-shadow-color));
}
/* .timeline-start .account-container .header-banner {
margin-bottom: -77px;
@ -742,12 +769,16 @@
letter-spacing: -0.5px;
mix-blend-mode: multiply;
gap: 12px;
}
.timeline-start .account-container header .account-block .avatar {
width: 112px !important;
height: 112px !important;
filter: drop-shadow(-8px 0 8px var(--header-color-3, --bg-color))
drop-shadow(8px 0 8px var(--header-color-4, --bg-color));
.avatar-container {
filter: drop-shadow(-8px 0 8px var(--header-color-3, --bg-color))
drop-shadow(8px 0 8px var(--header-color-4, --bg-color));
}
.avatar {
width: 112px !important;
height: 112px !important;
}
}
}
@ -777,3 +808,282 @@
}
}
}
#edit-profile-container {
p {
margin-block: 8px;
}
label {
input:not([type='file']),
textarea {
display: block;
width: 100%;
}
textarea {
resize: vertical;
min-height: 5em;
max-height: 50vh;
}
}
.edit-profile-media-container {
margin-block: 8px;
}
.edit-profile-media-field {
display: grid;
grid-template-columns: 80px 2em 80px;
gap: 8px;
margin-top: 8px;
align-items: center;
justify-items: center;
.icon {
opacity: 0.75;
}
.edit-media {
width: 80px;
height: 80px;
border-radius: 4px;
overflow: hidden;
border: 1px solid var(--outline-color);
/* checkerboard background */
background-image:
linear-gradient(45deg, var(--img-bg-color) 25%, transparent 25%),
linear-gradient(-45deg, var(--img-bg-color) 25%, transparent 25%),
linear-gradient(45deg, transparent 75%, var(--img-bg-color) 75%),
linear-gradient(-45deg, transparent 75%, var(--img-bg-color) 75%);
background-size: 10px 10px;
background-position:
0 0,
0 5px,
5px -5px,
-5px 0px;
&:hover {
box-shadow: 0 0 0 2px var(--link-light-color);
cursor: pointer;
}
img {
object-fit: contain;
width: 100%;
height: 100%;
vertical-align: top;
}
}
}
table {
width: 100%;
th {
text-align: start;
color: var(--text-insignificant-color);
font-weight: normal;
font-size: 0.8em;
text-transform: uppercase;
}
tbody tr td:first-child {
width: 40%;
}
input {
width: 100%;
}
}
footer {
display: flex;
justify-content: space-between;
padding: 8px 0;
* {
vertical-align: middle;
}
}
}
.handle-info {
.handle-handle {
display: inline-block;
margin-block: 5px;
b {
font-weight: 600;
padding: 2px 4px;
border-radius: 4px;
display: inline-block;
box-shadow: 0 0 0 5px var(--bg-blur-color);
&.handle-username {
color: var(--orange-fg-color);
background-color: var(--orange-bg-color);
}
&.handle-server {
color: var(--purple-fg-color);
background-color: var(--purple-bg-color);
}
}
}
.handle-at {
display: inline-block;
margin-inline: -3px;
position: relative;
z-index: 1;
}
.handle-legend {
margin-top: 0.25em;
}
.handle-legend-icon {
overflow: hidden;
display: inline-block;
width: 14px;
height: 14px;
border: 4px solid transparent;
border-radius: 8px;
background-clip: padding-box;
&.username {
background-color: var(--orange-fg-color);
border-color: var(--orange-bg-color);
}
&.server {
background-color: var(--purple-fg-color);
border-color: var(--purple-bg-color);
}
}
}
.endorsements-container {
padding: 16px;
overflow-x: auto;
overflow-y: hidden;
/* background-image: linear-gradient(
to bottom,
var(--bg-faded-color),
var(--bg-color) calc(16px + 1em)
); */
background-image: radial-gradient(
ellipse at top center,
var(--bg-faded-color),
var(--bg-color)
);
background-size: 100% 32px;
background-repeat: no-repeat;
mask-image: linear-gradient(
var(--to-forward),
transparent,
black 16px calc(100% - 16px),
transparent
);
h3 {
margin: 0;
padding: 0 0 8px;
font-weight: normal;
color: var(--text-insignificant-color);
font-size: 85%;
position: sticky;
left: 0;
text-transform: uppercase;
font-weight: 600;
> * {
vertical-align: text-bottom;
}
}
.endorsements {
margin: 0;
padding: 0;
list-style: none;
/* grid: 2 rows, infinite columns, no wrap */
display: grid;
grid-auto-flow: column;
grid-template-rows: repeat(2, auto);
grid-template-columns: repeat(9999, clamp(160px, 90%, 320px));
white-space: nowrap;
gap: 8px;
&.expanded {
grid-template-rows: repeat(3, auto);
}
> li {
display: flex;
}
.account-block {
overflow: hidden;
flex-grow: 1;
padding: 8px 16px;
background-color: var(--bg-faded-color);
background-image: linear-gradient(
15deg,
var(--link-bg-color),
var(--bg-faded-color) 8px calc(100% - 16px),
var(--bg-color)
);
&:dir(rtl) {
background-image: linear-gradient(
-15deg,
var(--link-bg-color),
var(--bg-faded-color) 16px calc(100% - 16px),
var(--bg-color)
);
}
/* box-shadow: inset 0 0 0 2px var(--bg-color); */
border-radius: 8px;
transition: all 0.15s ease-out;
.avatar {
transition: transform 0.15s ease-out;
}
.account-block-content {
min-width: 0;
mask-image: linear-gradient(
var(--to-backward),
transparent,
black 16px
);
}
.account-block-stats {
flex-wrap: nowrap;
> * {
flex-shrink: 0;
}
}
&:is(:hover, :focus-visible) {
background-color: var(--link-bg-hover-color);
box-shadow: inset 0 0 0 2px var(--link-light-color);
.avatar {
transform: rotate(15deg);
}
}
&:active {
transition-duration: 0s;
filter: brightness(0.8);
}
.tag.minimal {
background-color: var(--bg-color);
}
}
}
}

Wyświetl plik

@ -1,3 +1,4 @@
import { useLingui } from '@lingui/react/macro';
import { useEffect } from 'preact/hooks';
import { api } from '../utils/api';
@ -8,6 +9,7 @@ import AccountInfo from './account-info';
import Icon from './icon';
function AccountSheet({ account, instance: propInstance, onClose }) {
const { t } = useLingui();
const { masto, instance, authenticated } = api({ instance: propInstance });
const isString = typeof account === 'string';
@ -33,7 +35,7 @@ function AccountSheet({ account, instance: propInstance, onClose }) {
>
{!!onClose && (
<button type="button" class="sheet-close outer" onClick={onClose}>
<Icon icon="x" />
<Icon icon="x" alt={t`Close`} />
</button>
)}
<AccountInfo
@ -49,25 +51,37 @@ function AccountSheet({ account, instance: propInstance, onClose }) {
});
return info;
} catch (e) {
const result = await masto.v2.search.fetch({
const result = await masto.v2.search.list({
q: account,
type: 'accounts',
limit: 1,
limit: authenticated ? 1 : 11, // Magic number
resolve: authenticated,
});
if (result.accounts.length) {
return result.accounts[0];
} else if (/https?:\/\/[^/]+\/@/.test(account)) {
const accountURL = new URL(account);
const acct = accountURL.pathname.replace(/^\//, '');
const result = await masto.v2.search.fetch({
q: acct,
type: 'accounts',
limit: 1,
resolve: authenticated,
});
if (result.accounts.length) {
return result.accounts[0];
const accountWithSameString = result.accounts.find(
(a) => a.url === account || account.startsWith(a.url),
);
if (accountWithSameString) {
return accountWithSameString;
}
}
if (/^https?:\/\/[^/]+\/@[^/]+$/.test(account)) {
const accountURL = URL.parse(account);
if (accountURL) {
const { hostname, pathname } = accountURL;
const acct =
pathname.replace(/^\//, '').replace(/\/$/, '') +
'@' +
hostname;
const result = await masto.v2.search.list({
q: acct,
type: 'accounts',
limit: 1,
resolve: authenticated,
});
if (result.accounts.length) {
return result.accounts[0];
}
}
}
}

Wyświetl plik

@ -0,0 +1,152 @@
import { Trans, useLingui } from '@lingui/react/macro';
import { useEffect, useReducer, useState } from 'preact/hooks';
import { api } from '../utils/api';
import { getLists } from '../utils/lists';
import Icon from './icon';
import ListAddEdit from './list-add-edit';
import Loader from './loader';
import Modal from './modal';
function AddRemoveListsSheet({ accountID, onClose }) {
const { t } = useLingui();
const { masto } = api();
const [uiState, setUIState] = useState('default');
const [lists, setLists] = useState([]);
const [listsContainingAccount, setListsContainingAccount] = useState([]);
const [reloadCount, reload] = useReducer((c) => c + 1, 0);
useEffect(() => {
setUIState('loading');
(async () => {
try {
const lists = await getLists();
setLists(lists);
const listsContainingAccount = await masto.v1.accounts
.$select(accountID)
.lists.list();
console.log({ lists, listsContainingAccount });
setListsContainingAccount(listsContainingAccount);
setUIState('default');
} catch (e) {
console.error(e);
setUIState('error');
}
})();
}, [reloadCount]);
const [showListAddEditModal, setShowListAddEditModal] = useState(false);
return (
<div class="sheet" id="list-add-remove-container">
{!!onClose && (
<button type="button" class="sheet-close" onClick={onClose}>
<Icon icon="x" alt={t`Close`} />
</button>
)}
<header>
<h2>
<Trans>Add/Remove from Lists</Trans>
</h2>
</header>
<main>
{lists.length > 0 ? (
<ul class="list-add-remove">
{lists.map((list) => {
const inList = listsContainingAccount.some(
(l) => l.id === list.id,
);
return (
<li>
<button
type="button"
class={`light ${inList ? 'checked' : ''}`}
disabled={uiState === 'loading'}
onClick={() => {
setUIState('loading');
(async () => {
try {
if (inList) {
await masto.v1.lists
.$select(list.id)
.accounts.remove({
accountIds: [accountID],
});
} else {
await masto.v1.lists
.$select(list.id)
.accounts.create({
accountIds: [accountID],
});
}
// setUIState('default');
reload();
} catch (e) {
console.error(e);
setUIState('error');
alert(
inList
? t`Unable to remove from list.`
: t`Unable to add to list.`,
);
}
})();
}}
>
<Icon icon="check-circle" alt="☑️" />
<span>{list.title}</span>
</button>
</li>
);
})}
</ul>
) : uiState === 'loading' ? (
<p class="ui-state">
<Loader abrupt />
</p>
) : uiState === 'error' ? (
<p class="ui-state">
<Trans>Unable to load lists.</Trans>
</p>
) : (
<p class="ui-state">
<Trans>No lists.</Trans>
</p>
)}
<button
type="button"
class="plain2"
onClick={() => setShowListAddEditModal(true)}
disabled={uiState !== 'default'}
>
<Icon icon="plus" size="l" />{' '}
<span>
<Trans>New list</Trans>
</span>
</button>
</main>
{showListAddEditModal && (
<Modal
onClick={(e) => {
if (e.target === e.currentTarget) {
setShowListAddEditModal(false);
}
}}
>
<ListAddEdit
list={showListAddEditModal?.list}
onClose={(result) => {
if (result.state === 'success') {
reload();
}
setShowListAddEditModal(false);
}}
/>
</Modal>
)}
</div>
);
}
export default AddRemoveListsSheet;

Wyświetl plik

@ -1,13 +1,14 @@
.avatar {
display: inline-block;
line-height: 0;
aspect-ratio: 1/1;
aspect-ratio: 1 / 1;
border-radius: 50%;
overflow: hidden;
background-color: var(--bg-faded-color);
box-shadow: 0 0 0 1px var(--bg-blur-color);
flex-shrink: 0;
vertical-align: middle;
dynamic-range-limit: standard; /* Disable HDR */
&.has-alpha {
border-radius: 0;

Wyświetl plik

@ -21,13 +21,16 @@ const canvas = window.OffscreenCanvas
const ctx = canvas.getContext('2d', {
willReadFrequently: true,
});
ctx.imageSmoothingEnabled = false;
function Avatar({ url, size, alt = '', squircle, ...props }) {
const MISSING_IMAGE_PATH_REGEX = /missing\.png$/;
function Avatar({ url, staticUrl, size, alt = '', squircle, ...props }) {
size = SIZES[size] || size || SIZES.m;
const avatarRef = useRef();
const isMissing = /missing\.png$/.test(url);
const isMissing = MISSING_IMAGE_PATH_REGEX.test(url);
return (
<span
<picture
ref={avatarRef}
class={`avatar ${squircle ? 'squircle' : ''} ${
alphaCache[url] ? 'has-alpha' : ''
@ -39,6 +42,9 @@ function Avatar({ url, size, alt = '', squircle, ...props }) {
title={alt}
{...props}
>
{!!staticUrl && (
<source srcset={staticUrl} media="(prefers-reduced-motion: reduce)" />
)}
{!!url && (
<img
src={url}
@ -47,6 +53,7 @@ function Avatar({ url, size, alt = '', squircle, ...props }) {
alt={alt}
loading="lazy"
decoding="async"
fetchPriority="low"
crossOrigin={
alphaCache[url] === undefined && !isMissing
? 'anonymous'
@ -62,7 +69,7 @@ function Avatar({ url, size, alt = '', squircle, ...props }) {
if (avatarRef.current) avatarRef.current.dataset.loaded = true;
if (alphaCache[url] !== undefined) return;
if (isMissing) return;
queueMicrotask(() => {
setTimeout(() => {
try {
// Check if image has alpha channel
const { width, height } = e.target;
@ -87,11 +94,11 @@ function Avatar({ url, size, alt = '', squircle, ...props }) {
// Silent fail
alphaCache[url] = false;
}
});
}, 1);
}}
/>
)}
</span>
</picture>
);
}

Wyświetl plik

@ -1,3 +1,4 @@
import { useLingui } from '@lingui/react/macro';
import { memo } from 'preact/compat';
import { useEffect, useRef, useState } from 'preact/hooks';
import { useHotkeys } from 'react-hotkeys-hook';
@ -9,19 +10,34 @@ import useInterval from '../utils/useInterval';
import usePageVisibility from '../utils/usePageVisibility';
const STREAMING_TIMEOUT = 1000 * 3; // 3 seconds
const POLL_INTERVAL = 15_000; // 15 seconds
const POLL_INTERVAL = 20_000; // 20 seconds
export default memo(function BackgroundService({ isLoggedIn }) {
const { t } = useLingui();
// Notifications service
// - WebSocket to receive notifications when page is visible
const [visible, setVisible] = useState(true);
usePageVisibility(setVisible);
const visibleTimeout = useRef();
usePageVisibility((visible) => {
clearTimeout(visibleTimeout.current);
if (visible) {
setVisible(true);
} else {
visibleTimeout.current = setTimeout(() => {
setVisible(false);
}, POLL_INTERVAL);
}
});
const checkLatestNotification = async (masto, instance, skipCheckMarkers) => {
if (states.notificationsLast) {
const notificationsIterator = masto.v1.notifications.list({
limit: 1,
sinceId: states.notificationsLast.id,
});
const notificationsIterator = masto.v1.notifications
.list({
limit: 1,
sinceId: states.notificationsLast.id,
})
.values();
const { value: notifications } = await notificationsIterator.next();
if (notifications?.length) {
if (skipCheckMarkers) {
@ -46,6 +62,7 @@ export default memo(function BackgroundService({ isLoggedIn }) {
useEffect(() => {
let sub;
let streamTimeout;
let pollNotifications;
if (isLoggedIn && visible) {
const { masto, streaming, instance } = api();
@ -56,7 +73,7 @@ export default memo(function BackgroundService({ isLoggedIn }) {
let hasStreaming = false;
// 2. Start streaming
if (streaming) {
pollNotifications = setTimeout(() => {
streamTimeout = setTimeout(() => {
(async () => {
try {
hasStreaming = true;
@ -94,7 +111,7 @@ export default memo(function BackgroundService({ isLoggedIn }) {
return () => {
sub?.unsubscribe?.();
sub = null;
clearTimeout(pollNotifications);
clearTimeout(streamTimeout);
clearInterval(pollNotifications);
};
}, [visible, isLoggedIn]);
@ -129,13 +146,23 @@ export default memo(function BackgroundService({ isLoggedIn }) {
});
// Global keyboard shortcuts "service"
useHotkeys('shift+alt+k', () => {
const currentCloakMode = states.settings.cloakMode;
states.settings.cloakMode = !currentCloakMode;
showToast({
text: `Cloak mode ${currentCloakMode ? 'disabled' : 'enabled'}`,
});
});
useHotkeys(
'shift+alt+k',
(e) => {
// Need modifers check due to useKey: true
if (!e.shiftKey || !e.altKey) return;
const currentCloakMode = states.settings.cloakMode;
states.settings.cloakMode = !currentCloakMode;
showToast({
text: currentCloakMode ? t`Cloak mode disabled` : t`Cloak mode enabled`,
});
},
{
useKey: true,
ignoreEventWhen: (e) => e.metaKey || e.ctrlKey,
},
);
return null;
});

Wyświetl plik

@ -0,0 +1,26 @@
import { Trans } from '@lingui/react/macro';
import Icon from './icon';
import NameText from './name-text';
function Byline({ authors, hidden, children }) {
if (hidden) return children;
if (!authors?.[0]?.account?.id) return children;
const author = authors[0].account;
return (
<div class="card-byline">
{children}
<div class="card-byline-author">
<Icon icon="link" size="s" />{' '}
<small>
<Trans comment="More from [Author]">
More from <NameText account={author} showAvatar />
</Trans>
</small>
</div>
</div>
);
}
export default Byline;

Wyświetl plik

@ -0,0 +1,52 @@
const isMobileSafari =
/iPad|iPhone|iPod/.test(navigator.userAgent) &&
/^((?!chrome|android).)*safari/i.test(navigator.userAgent);
function CameraCaptureInput({
hidden,
disabled = false,
supportedMimeTypes,
setMediaAttachments,
}) {
// If not Mobile Safari, only apply image/*
// Chrome Android doesn't show the camera if image and video combined
// It also can't switch between photo and video mode like iOS/Safari
const filteredSupportedMimeTypes = isMobileSafari
? supportedMimeTypes
: supportedMimeTypes?.filter((mimeType) => !/^image\//i.test(mimeType));
return (
<input
type="file"
hidden={hidden}
accept={filteredSupportedMimeTypes?.join(',')}
capture="environment"
disabled={disabled}
onChange={(e) => {
const files = e.target.files;
if (!files) return;
const mediaFile = Array.from(files)[0];
if (!mediaFile) return;
setMediaAttachments((attachments) => [
...attachments,
{
file: mediaFile,
type: mediaFile.type,
size: mediaFile.size,
url: URL.createObjectURL(mediaFile),
id: null, // indicate uploaded state
description: null,
},
]);
e.target.value = null;
}}
/>
);
}
export const supportsCameraCapture = (() => {
const input = document.createElement('input');
return 'capture' in input;
})();
export default CameraCaptureInput;

Wyświetl plik

@ -0,0 +1,38 @@
import { useSnapshot } from 'valtio';
import states from '../utils/states';
function CharCountMeter({ maxCharacters = 500, hidden }) {
const snapStates = useSnapshot(states);
const charCount = snapStates.composerCharacterCount;
const leftChars = maxCharacters - charCount;
if (hidden) {
return <span class="char-counter" hidden />;
}
return (
<span
class="char-counter"
title={`${leftChars}/${maxCharacters}`}
style={{
'--percentage': (charCount / maxCharacters) * 100,
}}
>
<meter
class={`${
leftChars <= -10
? 'explode'
: leftChars <= 0
? 'danger'
: leftChars <= 20
? 'warning'
: ''
}`}
value={charCount}
max={maxCharacters}
/>
<span class="counter">{leftChars}</span>
</span>
);
}
export default CharCountMeter;

Wyświetl plik

@ -1,3 +1,4 @@
import { useLingui } from '@lingui/react/macro';
import { useHotkeys } from 'react-hotkeys-hook';
import { useSnapshot } from 'valtio';
@ -11,11 +12,19 @@ import Notifications from '../pages/notifications';
import Public from '../pages/public';
import Search from '../pages/search';
import Trending from '../pages/trending';
import isRTL from '../utils/is-rtl';
import states from '../utils/states';
import useTitle from '../utils/useTitle';
const scrollIntoViewOptions = {
block: 'nearest',
inline: 'nearest',
behavior: 'smooth',
};
function Columns() {
useTitle('Home', '/');
const { t } = useLingui();
useTitle(t`Home`, '/');
const snapStates = useSnapshot(states);
const { shortcuts } = snapStates;
@ -39,19 +48,66 @@ function Columns() {
if (!Component) return null;
// Don't show Search column with no query, for now
if (type === 'search' && !params.query) return null;
// Don't show List column with no list, for now
if (type === 'list' && !params.id) return null;
return (
<Component key={type + JSON.stringify(params)} {...params} columnMode />
);
});
useHotkeys(['1', '2', '3', '4', '5', '6', '7', '8', '9'], (e, handler) => {
try {
const index = parseInt(handler.keys[0], 10) - 1;
document.querySelectorAll('#columns > *')[index].focus();
} catch (e) {
console.error(e);
}
});
useHotkeys(
['1', '2', '3', '4', '5', '6', '7', '8', '9'],
(e) => {
try {
const index = parseInt(e.key, 10) - 1;
const $column = document.querySelectorAll('#columns > *')[index];
if ($column) {
$column.focus();
$column.scrollIntoView(scrollIntoViewOptions);
}
} catch (e) {
console.error(e);
}
},
{
useKey: true,
ignoreEventWhen: (e) => e.metaKey || e.ctrlKey || e.altKey || e.shiftKey,
},
);
useHotkeys(
['[', ']'],
(e, handler) => {
const key = handler.keys[0];
const currentFocusedColumn =
document.activeElement.closest('#columns > *');
const rtl = isRTL();
const prevColKey = rtl ? ']' : '[';
const nextColKey = rtl ? '[' : ']';
let $column;
if (key === prevColKey) {
// If [, focus on left of focused column, else first column
$column = currentFocusedColumn
? currentFocusedColumn.previousElementSibling
: document.querySelectorAll('#columns > *')[0];
} else if (key === nextColKey) {
// If ], focus on right of focused column, else 2nd column
$column = currentFocusedColumn
? currentFocusedColumn.nextElementSibling
: document.querySelectorAll('#columns > *')[1];
}
if ($column) {
$column.focus();
$column.scrollIntoView(scrollIntoViewOptions);
}
},
{
useKey: true,
ignoreEventWhen: (e) => e.metaKey || e.ctrlKey || e.altKey || e.shiftKey,
},
);
return (
<div
@ -67,6 +123,18 @@ function Columns() {
states.showShortcutsSettings = true;
}
}}
onFocus={() => {
// Get current focused column
const currentFocusedColumn =
document.activeElement.closest('#columns > *');
if (currentFocusedColumn) {
// Remove focus classes from all columns
// Add focus class to current focused column
document.querySelectorAll('#columns > *').forEach((column) => {
column.classList.toggle('focus', column === currentFocusedColumn);
});
}
}}
>
{components}
</div>

Wyświetl plik

@ -1,33 +1,229 @@
import { Trans, useLingui } from '@lingui/react/macro';
import { ControlledMenu, MenuDivider, MenuItem } from '@szhsin/react-menu';
import { useCallback, useEffect, useRef, useState } from 'preact/hooks';
import { useHotkeys } from 'react-hotkeys-hook';
import { useLongPress } from 'use-long-press';
import { useSnapshot } from 'valtio';
import { api } from '../utils/api';
import niceDateTime from '../utils/nice-date-time';
import openCompose from '../utils/open-compose';
import openOSK from '../utils/open-osk';
import pmem from '../utils/pmem';
import safeBoundingBoxPadding from '../utils/safe-bounding-box-padding';
import showCompose from '../utils/show-compose';
import states from '../utils/states';
import statusPeek from '../utils/status-peek';
import { getCurrentAccountID } from '../utils/store-utils';
import Icon from './icon';
import Loader from './loader';
import MenuLink from './menu-link';
import RelativeTime from './relative-time';
import SubMenu2 from './submenu2';
// Function to fetch the latest posts from the current user
// Use pmem to memoize fetch results for 1 minute
const fetchLatestPostsMemoized = pmem(
async (masto, currentAccountID) => {
const statusesIterator = masto.v1.accounts
.$select(currentAccountID)
.statuses.list({
limit: 3,
exclude_replies: true,
exclude_reblogs: true,
})
.values();
const { value } = await statusesIterator.next();
return value || [];
},
{ maxAge: 60000 },
); // 1 minute cache
export default function ComposeButton() {
const { t } = useLingui();
const snapStates = useSnapshot(states);
const { masto } = api();
// Context menu state
const [menuOpen, setMenuOpen] = useState(false);
const [latestPosts, setLatestPosts] = useState([]);
const [loadingPosts, setLoadingPosts] = useState(false);
const buttonRef = useRef(null);
const menuRef = useRef(null);
const columnMode = snapStates.settings.shortcutsViewMode === 'multi-column';
function handleButton(e) {
// useKey will even listen to Shift
// e.g. press Shift (without c) will trigger this 😱
if (e.key && e.key.toLowerCase() !== 'c') return;
if (snapStates.composerState.minimized) {
states.composerState.minimized = false;
openOSK();
return;
}
const composeDataElements = document.querySelectorAll('data.compose-data');
// If there's a lot of them, ignore
const opts =
!columnMode && composeDataElements.length === 1
? JSON.parse(composeDataElements[0].value)
: undefined;
if (e.shiftKey) {
const newWin = openCompose();
const newWin = openCompose(opts);
if (!newWin) {
states.showCompose = true;
states.showCompose = opts || true;
}
} else {
states.showCompose = true;
openOSK();
states.showCompose = opts || true;
}
}
useHotkeys('c, shift+c', handleButton, {
useKey: true,
ignoreEventWhen: (e) => {
const hasModal = !!document.querySelector('#modal-container > *');
return hasModal;
return hasModal || e.metaKey || e.ctrlKey || e.altKey;
},
});
// Setup longpress handler to open context menu
const bindLongPress = useLongPress(
() => {
setMenuOpen(true);
},
{
threshold: 600,
},
);
const fetchLatestPosts = useCallback(async () => {
try {
setLoadingPosts(true);
const currentAccountID = getCurrentAccountID();
if (!currentAccountID) {
return;
}
const posts = await fetchLatestPostsMemoized(masto, currentAccountID);
setLatestPosts(posts);
} catch (error) {
} finally {
setLoadingPosts(false);
}
}, [masto]);
// Function to handle opening the compose window to reply to a post
const handleReplyToPost = useCallback((post) => {
showCompose({
replyToStatus: post,
});
setMenuOpen(false);
}, []);
useEffect(() => {
if (menuOpen) {
fetchLatestPosts();
}
}, [fetchLatestPosts, menuOpen]);
return (
<button type="button" id="compose-button" onClick={handleButton}>
<Icon icon="quill" size="xl" alt="Compose" />
</button>
<>
<button
ref={buttonRef}
type="button"
id="compose-button"
onClick={handleButton}
onContextMenu={(e) => {
e.preventDefault();
setMenuOpen(true);
}}
{...bindLongPress()}
class={`${snapStates.composerState.minimized ? 'min' : ''} ${
snapStates.composerState.publishing ? 'loading' : ''
} ${snapStates.composerState.publishingError ? 'error' : ''}`}
>
<Icon icon="quill" size="xl" alt={t`Compose`} />
</button>
<ControlledMenu
ref={menuRef}
state={menuOpen ? 'open' : undefined}
anchorRef={buttonRef}
onClose={() => setMenuOpen(false)}
direction="top"
gap={8} // Add gap between menu and button
unmountOnClose
portal={{
target: document.body,
}}
boundingBoxPadding={safeBoundingBoxPadding()}
containerProps={{
style: {
zIndex: 19,
},
onClick: () => {
menuRef.current?.closeMenu?.();
},
}}
submenuOpenDelay={600}
>
<MenuLink to="/sp">
<Icon icon="schedule" />{' '}
<span>
<Trans>Scheduled Posts</Trans>
</span>
</MenuLink>
<MenuDivider />
<SubMenu2
align="end"
direction="top"
shift={-8}
disabled={loadingPosts || latestPosts.length === 0}
label={
<>
<Icon icon="comment" />{' '}
<span className="menu-grow">
<Trans>Add to thread</Trans>
</span>
{loadingPosts ? '…' : <Icon icon="chevron-right" />}
</>
}
>
{latestPosts.length > 0 &&
latestPosts.map((post) => {
const createdDate = new Date(post.createdAt);
const isWithinDay = Date.now() - createdDate.getTime() < 86400000;
return (
<MenuItem key={post.id} onClick={() => handleReplyToPost(post)}>
<small>
<div class="menu-post-text">{statusPeek(post)}</div>
<span className="more-insignificant">
{/* Show relative time if within a day */}
{isWithinDay && (
<>
<RelativeTime datetime={createdDate} format="micro" />{' '}
{' '}
</>
)}
<time
className="created"
dateTime={createdDate.toISOString()}
title={createdDate.toLocaleString()}
>
{niceDateTime(post.createdAt)}
</time>
</span>
</small>
</MenuItem>
);
})}
</SubMenu2>
</ControlledMenu>
</>
);
}

Wyświetl plik

@ -0,0 +1,137 @@
import { Trans, useLingui } from '@lingui/react/macro';
import i18nDuration from '../utils/i18n-duration';
import Icon from './icon';
import TextExpander from './text-expander';
export const expiryOptions = {
300: i18nDuration(5, 'minute'),
1_800: i18nDuration(30, 'minute'),
3_600: i18nDuration(1, 'hour'),
21_600: i18nDuration(6, 'hour'),
86_400: i18nDuration(1, 'day'),
259_200: i18nDuration(3, 'day'),
604_800: i18nDuration(1, 'week'),
};
function ComposePoll({
lang,
poll,
disabled,
onInput = () => {},
maxOptions,
maxExpiration,
minExpiration,
maxCharactersPerOption,
}) {
const { t } = useLingui();
const { options, expiresIn, multiple } = poll;
return (
<div class={`poll ${multiple ? 'multiple' : ''}`}>
<div class="poll-choices">
{options.map((option, i) => (
<div class="poll-choice" key={i}>
<TextExpander keys=":" class="poll-field-container">
<input
required
type="text"
value={option}
disabled={disabled}
maxlength={maxCharactersPerOption}
placeholder={t`Choice ${i + 1}`}
lang={lang}
spellCheck="true"
autocomplete="off"
dir="auto"
data-allow-custom-emoji="true"
onInput={(e) => {
const { value } = e.target;
options[i] = value;
onInput(poll);
}}
/>
</TextExpander>
<button
type="button"
class="plain4 poll-button"
disabled={disabled || options.length <= 1}
onClick={() => {
options.splice(i, 1);
onInput(poll);
}}
title={t`Remove`}
>
</button>
</div>
))}
</div>
<div class="poll-toolbar">
<button
type="button"
class="plain2 poll-button"
disabled={disabled || options.length >= maxOptions}
onClick={() => {
options.push('');
onInput(poll);
}}
title={t`Add`}
>
+
</button>{' '}
<div class="poll-config">
<label class="multiple-choices">
<input
type="checkbox"
checked={multiple}
disabled={disabled}
onChange={(e) => {
const { checked } = e.target;
poll.multiple = checked;
onInput(poll);
}}
/>{' '}
<Trans>Multiple choice</Trans>
</label>
<label class="expires-in">
<Trans>Duration</Trans>{' '}
<select
value={expiresIn}
disabled={disabled}
onChange={(e) => {
const { value } = e.target;
poll.expiresIn = value;
onInput(poll);
}}
>
{Object.entries(expiryOptions)
.filter(([value]) => {
return value >= minExpiration && value <= maxExpiration;
})
.map(([value, label]) => (
<option value={value} key={value}>
{label()}
</option>
))}
</select>
</label>
<div class="spacer" />
<button
type="button"
class="light danger small"
disabled={disabled}
onClick={() => {
onInput(null);
}}
>
<Trans>Remove poll</Trans>
</button>
</div>
</div>
</div>
);
}
export default ComposePoll;

Wyświetl plik

@ -0,0 +1,48 @@
import { shouldPolyfill } from '@formatjs/intl-segmenter/should-polyfill';
import { useEffect, useState } from 'preact/hooks';
import Loader from './loader';
const supportsIntlSegmenter = !shouldPolyfill();
function importIntlSegmenter() {
if (!supportsIntlSegmenter) {
return import('@formatjs/intl-segmenter/polyfill-force').catch(() => {});
}
}
function importCompose() {
return import('./compose');
}
export async function preload() {
try {
await importIntlSegmenter();
importCompose();
} catch (e) {
console.error(e);
}
}
export default function ComposeSuspense(props) {
const [Compose, setCompose] = useState(null);
useEffect(() => {
(async () => {
try {
if (supportsIntlSegmenter) {
const component = await importCompose();
setCompose(component);
} else {
await importIntlSegmenter();
const component = await importCompose();
setCompose(component);
}
} catch (e) {
console.error(e);
}
})();
}, []);
return Compose?.default ? <Compose.default {...props} /> : <Loader />;
}

Wyświetl plik

@ -0,0 +1,268 @@
import { forwardRef } from 'preact/compat';
import { useEffect, useRef, useState } from 'preact/hooks';
import { useDebouncedCallback, useThrottledCallback } from 'use-debounce';
import { langDetector } from '../utils/browser-translator';
import escapeHTML from '../utils/escape-html';
import states from '../utils/states';
import urlRegexObj from '../utils/url-regex';
import useThrottledResizeObserver from '../utils/useThrottledResizeObserver';
import TextExpander from './text-expander';
// https://github.com/mastodon/mastodon/blob/c03bd2a238741a012aa4b98dc4902d6cf948ab63/app/models/account.rb#L69
const USERNAME_RE = /[a-z0-9_]+([a-z0-9_.-]+[a-z0-9_]+)?/i;
const MENTION_RE = new RegExp(
`(^|[^=\\/\\w])(@${USERNAME_RE.source}(?:@[\\p{L}\\w.-]+[\\w]+)?)`,
'uig',
);
// AI-generated, all other regexes are too complicated
const HASHTAG_RE = new RegExp(
`(^|[^=\\/\\w])(#[\\p{L}\\p{N}_]+([\\p{L}\\p{N}_.]+[\\p{L}\\p{N}_]+)?)(?![\\/\\w])`,
'iug',
);
// https://github.com/mastodon/mastodon/blob/23e32a4b3031d1da8b911e0145d61b4dd47c4f96/app/models/custom_emoji.rb#L31
const SHORTCODE_RE_FRAGMENT = '[a-zA-Z0-9_]{2,}';
const SCAN_RE = new RegExp(
`(^|[^=\\/\\w])(:${SHORTCODE_RE_FRAGMENT}:)(?=[^A-Za-z0-9_:]|$)`,
'g',
);
const segmenter = new Intl.Segmenter();
function highlightText(text, { maxCharacters = Infinity }) {
// Exceeded characters limit
const { composerCharacterCount } = states;
if (composerCharacterCount > maxCharacters) {
// Highlight exceeded characters
let withinLimitHTML = '',
exceedLimitHTML = '';
const htmlSegments = segmenter.segment(text);
for (const { segment, index } of htmlSegments) {
if (index < maxCharacters) {
withinLimitHTML += segment;
} else {
exceedLimitHTML += segment;
}
}
if (exceedLimitHTML) {
exceedLimitHTML =
'<mark class="compose-highlight-exceeded">' +
escapeHTML(exceedLimitHTML) +
'</mark>';
}
return escapeHTML(withinLimitHTML) + exceedLimitHTML;
}
return escapeHTML(text)
.replace(urlRegexObj, '$2<mark class="compose-highlight-url">$3</mark>') // URLs
.replace(MENTION_RE, '$1<mark class="compose-highlight-mention">$2</mark>') // Mentions
.replace(HASHTAG_RE, '$1<mark class="compose-highlight-hashtag">$2</mark>') // Hashtags
.replace(
SCAN_RE,
'$1<mark class="compose-highlight-emoji-shortcode">$2</mark>',
); // Emoji shortcodes
}
function autoResizeTextarea(textarea) {
if (!textarea) return;
const { value, offsetHeight, scrollHeight, clientHeight } = textarea;
if (offsetHeight < window.innerHeight) {
// NOTE: This check is needed because the offsetHeight return 50000 (really large number) on first render
// No idea why it does that, will re-investigate in far future
const offset = offsetHeight - clientHeight;
const height = value ? scrollHeight + offset + 'px' : null;
textarea.style.height = height;
}
}
const detectLangs = async (text) => {
if (langDetector) {
const langs = await langDetector.detect(text);
if (langs?.length) {
return langs.slice(0, 2).map((lang) => lang.detectedLanguage);
}
}
const { detectAll } = await import('tinyld/light');
const langs = detectAll(text);
if (langs?.length) {
// return max 2
return langs.slice(0, 2).map((lang) => lang.lang);
}
return null;
};
const Textarea = forwardRef((props, ref) => {
const [text, setText] = useState(ref.current?.value || '');
const { maxCharacters, onTrigger = null, ...textareaProps } = props;
const textExpanderRef = useRef();
useThrottledResizeObserver({
ref,
onResize: () => {
// Get height of textarea, set height to textExpander
if (textExpanderRef.current && ref.current) {
const { height } = ref.current.getBoundingClientRect();
if (height) {
textExpanderRef.current.setStyle({ minHeight: height + 'px' });
}
}
},
});
const slowHighlightPerf = useRef(0); // increment if slow
const composeHighlightRef = useRef();
const throttleHighlightText = useThrottledCallback((text) => {
if (!composeHighlightRef.current) return;
if (slowHighlightPerf.current > 3) {
// After 3 times of lag, disable highlighting
composeHighlightRef.current.innerHTML = '';
composeHighlightRef.current = null; // Destroy the whole thing
throttleHighlightText?.cancel?.();
return;
}
let start;
let end;
if (slowHighlightPerf.current <= 3) start = Date.now();
composeHighlightRef.current.innerHTML =
highlightText(text, {
maxCharacters,
}) + '\n';
if (slowHighlightPerf.current <= 3) end = Date.now();
console.debug('HIGHLIGHT PERF', { start, end, diff: end - start });
if (start && end && end - start > 50) {
// if slow, increment
slowHighlightPerf.current++;
}
// Newline to prevent multiple line breaks at the end from being collapsed, no idea why
}, 500);
const debouncedAutoDetectLanguage = useDebouncedCallback(() => {
// Make use of the highlightRef to get the DOM
// Clone the dom
const dom = composeHighlightRef.current?.cloneNode(true);
if (!dom) return;
// Remove mark
dom.querySelectorAll('mark').forEach((mark) => {
mark.remove();
});
const text = dom.innerText?.trim();
if (!text) return;
(async () => {
const langs = await detectLangs(text);
if (langs?.length) {
onTrigger?.({
name: 'auto-detect-language',
languages: langs,
});
}
})();
}, 2000);
return (
<TextExpander
ref={textExpanderRef}
keys="@ # :"
class="compose-field-container"
onTrigger={onTrigger}
>
<textarea
class="compose-field"
autoCapitalize="sentences"
autoComplete="on"
autoCorrect="on"
spellCheck="true"
dir="auto"
rows="6"
cols="50"
{...textareaProps}
ref={ref}
name="status"
value={text}
onKeyDown={(e) => {
// Get line before cursor position after pressing 'Enter'
const { key, target } = e;
const hasTextExpander = textExpanderRef.current?.activated();
if (
key === 'Enter' &&
!(e.ctrlKey || e.metaKey || hasTextExpander) &&
!e.isComposing
) {
try {
const { value, selectionStart } = target;
const textBeforeCursor = value.slice(0, selectionStart);
const lastLine = textBeforeCursor.split('\n').slice(-1)[0];
if (lastLine) {
// If line starts with "- " or "12. "
if (/^\s*(-|\d+\.)\s/.test(lastLine)) {
// insert "- " at cursor position
const [_, preSpaces, bullet, postSpaces, anything] =
lastLine.match(/^(\s*)(-|\d+\.)(\s+)(.+)?/) || [];
if (anything) {
e.preventDefault();
const [number] = bullet.match(/\d+/) || [];
const newBullet = number ? `${+number + 1}.` : '-';
const text = `\n${preSpaces}${newBullet}${postSpaces}`;
target.setRangeText(text, selectionStart, selectionStart);
const pos = selectionStart + text.length;
target.setSelectionRange(pos, pos);
} else {
// trim the line before the cursor, then insert new line
const pos = selectionStart - lastLine.length;
target.setRangeText('', pos, selectionStart);
}
autoResizeTextarea(target);
target.dispatchEvent(new Event('input'));
}
}
} catch (e) {
// silent fail
console.error(e);
}
}
if (composeHighlightRef.current) {
composeHighlightRef.current.scrollTop = target.scrollTop;
}
}}
onInput={(e) => {
const { target } = e;
const text = target.value;
setText(text);
autoResizeTextarea(target);
props.onInput?.(e);
throttleHighlightText(text);
debouncedAutoDetectLanguage();
}}
onScroll={(e) => {
if (composeHighlightRef.current) {
const { scrollTop } = e.target;
composeHighlightRef.current.scrollTop = scrollTop;
}
}}
onPaste={(e) => {
try {
const pastedText = e.clipboardData.getData('text').trim();
if (pastedText) {
onTrigger?.({
name: 'pasted-link',
url: pastedText,
});
}
} catch (error) {
console.error(error);
}
}}
/>
<div
ref={composeHighlightRef}
class="compose-highlight"
aria-hidden="true"
/>
</TextExpander>
);
});
export default Textarea;

Plik diff jest za duży Load Diff

Wyświetl plik

@ -0,0 +1,27 @@
export default function CustomEmoji({ staticUrl, alt, url }) {
return (
<picture>
{staticUrl && (
<source srcset={staticUrl} media="(prefers-reduced-motion: reduce)" />
)}
<img
key={alt || url}
src={url}
alt={alt}
class="shortcode-emoji emoji"
width="16"
height="16"
loading="lazy"
decoding="async"
fetchPriority="low"
onLoad={(e) => {
try {
e.target.dataset.isLarger =
e.target.naturalWidth > e.target.width * 2 ||
e.target.naturalHeight > e.target.height * 2;
} catch (e) {}
}}
/>
</picture>
);
}

Wyświetl plik

@ -0,0 +1,153 @@
#custom-emojis-sheet {
--custom-emoji-size: 1;
--size-bump: 210px;
height: min(
95vh,
calc(50vh + ((var(--custom-emoji-size) - 1) * var(--size-bump)))
);
max-width: calc(
var(--main-width) +
((var(--custom-emoji-size) - 1) * var(--size-bump)) -
50px -
16px
);
header {
.loader-container {
margin: 0;
}
form {
margin-top: 8px;
input {
width: 100%;
min-width: 0;
}
}
}
main {
mask-image: none;
/* padding-bottom: 88px; */
}
.size-range {
float: var(--forward);
position: sticky;
bottom: 0;
gap: 8px;
background-color: var(--bg-color);
border: 1px solid var(--outline-color);
box-shadow: 0 8px 16px -8px var(--drop-shadow-color);
border-radius: 9999px;
}
.custom-emojis-matches {
margin: 0;
padding: 0;
list-style: none;
display: flex;
flex-wrap: wrap;
}
.custom-emojis-list {
.section-container {
position: relative;
content-visibility: auto;
content-intrinsic-size: auto 88px;
padding-block: calc(16px * (var(--custom-emoji-size) - 1));
}
.section-header {
font-size: 80%;
text-transform: uppercase;
color: var(--text-insignificant-color);
padding: 8px 0 4px;
position: sticky;
top: 0;
background-color: var(--bg-color);
z-index: 1;
display: inline-block;
padding-inline-end: 8px;
pointer-events: none;
border-end-end-radius: 8px;
}
section {
display: flex;
flex-wrap: wrap;
}
button {
color: var(--text-color);
border-radius: 8px;
background-image: radial-gradient(
closest-side,
var(--img-bg-color),
transparent
);
text-shadow: 0 1px 0 var(--bg-color);
position: relative;
min-width: 44px;
min-height: 44px;
font-variant-numeric: slashed-zero;
font-feature-settings: 'ss01';
&[data-title]:after {
max-width: 50vw;
pointer-events: none;
position: absolute;
content: attr(data-title);
left: 50%;
top: 0;
background-color: var(--bg-color);
padding: 2px 4px;
border-radius: 4px;
font-size: 12px;
border: 1px solid var(--text-color);
transform: translate(-50%, calc(-110% * var(--custom-emoji-size)));
opacity: 0;
transition: opacity 0.1s ease-out 0.1s;
font-family: var(--monospace-font);
line-height: 1;
}
&.edge-left[data-title]:after {
left: 0;
transform: translate(0, calc(-110% * var(--custom-emoji-size)));
}
&.edge-right[data-title]:after {
left: 100%;
transform: translate(-100%, calc(-110% * var(--custom-emoji-size)));
}
&:is(:hover, :focus) {
z-index: 1;
filter: none;
background-color: var(--bg-faded-color);
&[data-title]:after {
opacity: 1;
}
}
img {
transition: transform 0.1s ease-out;
width: calc(1.2em * var(--custom-emoji-size, 1));
height: calc(1.2em * var(--custom-emoji-size, 1));
}
&:is(:hover, :focus) img {
transform: scale(2);
image-rendering: pixelated;
}
&.edge-left img {
transform-origin: left center;
}
&.edge-right img {
transform-origin: right center;
}
code {
font-size: 0.8em;
}
}
}
}

Wyświetl plik

@ -0,0 +1,374 @@
import './custom-emojis-modal.css';
import { Trans, useLingui } from '@lingui/react/macro';
import { memo } from 'preact/compat';
import {
useCallback,
useEffect,
useMemo,
useRef,
useState,
} from 'preact/hooks';
import getCustomEmojis from '../utils/custom-emojis';
import store from '../utils/store';
import Icon from './icon';
import Loader from './loader';
const CUSTOM_EMOJIS_COUNT = 100;
const EMOJI_SIZE_MIN = 1;
const EMOJI_SIZE_MAX = 2;
const EMOJI_SIZE_STEP = 0.5;
const CustomEmojiButton = memo(({ emoji, onClick, showCode }) => {
const addEdges = (e) => {
// Add edge-left or edge-right class based on self position relative to scrollable parent
// If near left edge, add edge-left, if near right edge, add edge-right
const buffer = 88;
const parent = e.currentTarget.closest('main');
if (parent) {
const rect = parent.getBoundingClientRect();
const selfRect = e.currentTarget.getBoundingClientRect();
const targetClassList = e.currentTarget.classList;
if (selfRect.left < rect.left + buffer) {
targetClassList.add('edge-left');
targetClassList.remove('edge-right');
} else if (selfRect.right > rect.right - buffer) {
targetClassList.add('edge-right');
targetClassList.remove('edge-left');
} else {
targetClassList.remove('edge-left', 'edge-right');
}
}
};
return (
<button
type="button"
className="plain4"
onClick={onClick}
data-title={showCode ? undefined : emoji.shortcode}
onPointerEnter={addEdges}
onFocus={addEdges}
>
<picture>
{!!emoji.staticUrl && (
<source
srcSet={emoji.staticUrl}
media="(prefers-reduced-motion: reduce)"
/>
)}
<img
className="shortcode-emoji"
src={emoji.url || emoji.staticUrl}
alt={emoji.shortcode}
width="24"
height="24"
loading="lazy"
decoding="async"
/>
</picture>
{showCode && (
<>
{' '}
<code>{emoji.shortcode}</code>
</>
)}
</button>
);
});
const CustomEmojisList = memo(({ emojis, onSelect }) => {
const { i18n } = useLingui();
const [max, setMax] = useState(CUSTOM_EMOJIS_COUNT);
const showMore = emojis.length > max;
return (
<section>
{emojis.slice(0, max).map((emoji) => (
<CustomEmojiButton
key={emoji.shortcode}
emoji={emoji}
onClick={() => {
onSelect(`:${emoji.shortcode}:`);
}}
/>
))}
{showMore && (
<button
type="button"
class="plain small"
onClick={() => setMax(max + CUSTOM_EMOJIS_COUNT)}
>
<Trans>{i18n.number(emojis.length - max)} more</Trans>
</button>
)}
</section>
);
});
const CUSTOM_EMOJI_SIZE = 'composer-customEmojiSize';
function CustomEmojisModal({
masto,
instance,
onClose = () => {},
onSelect = () => {},
defaultSearchTerm,
}) {
const { t } = useLingui();
const [uiState, setUIState] = useState('default');
const customEmojisList = useRef([]);
const [customEmojis, setCustomEmojis] = useState([]);
const recentlyUsedCustomEmojis = useMemo(
() => store.account.get('recentlyUsedCustomEmojis') || [],
);
const searcherRef = useRef();
useEffect(() => {
setUIState('loading');
(async () => {
try {
const [emojis, searcher] = await getCustomEmojis(instance, masto);
console.log('emojis', emojis);
searcherRef.current = searcher;
setCustomEmojis(emojis);
setUIState('default');
} catch (e) {
setUIState('error');
console.error(e);
}
})();
}, []);
const customEmojisCatList = useMemo(() => {
// Group emojis by category
const emojisCat = {
'--recent--': recentlyUsedCustomEmojis.filter((emoji) =>
customEmojis.find((e) => e.shortcode === emoji.shortcode),
),
};
const othersCat = [];
customEmojis.forEach((emoji) => {
customEmojisList.current?.push?.(emoji);
if (!emoji.category) {
othersCat.push(emoji);
return;
}
if (!emojisCat[emoji.category]) {
emojisCat[emoji.category] = [];
}
emojisCat[emoji.category].push(emoji);
});
if (othersCat.length) {
emojisCat['--others--'] = othersCat;
}
return emojisCat;
}, [customEmojis]);
const scrollableRef = useRef();
const [matches, setMatches] = useState(null);
const [emojiSize, setEmojiSize] = useState(
store.local.get(CUSTOM_EMOJI_SIZE) || EMOJI_SIZE_MIN,
);
const onEmojiSizeDecrease = useCallback(() => {
const newSize = Math.max(EMOJI_SIZE_MIN, emojiSize - EMOJI_SIZE_STEP);
setEmojiSize(newSize);
if (newSize === EMOJI_SIZE_MIN) {
store.local.del(CUSTOM_EMOJI_SIZE);
} else {
store.local.set(CUSTOM_EMOJI_SIZE, newSize);
}
}, [emojiSize]);
const onEmojiSizeIncrease = useCallback(() => {
const newSize = Math.min(EMOJI_SIZE_MAX, emojiSize + EMOJI_SIZE_STEP);
setEmojiSize(newSize);
if (newSize === EMOJI_SIZE_MIN) {
store.local.del(CUSTOM_EMOJI_SIZE);
} else {
store.local.set(CUSTOM_EMOJI_SIZE, newSize);
}
}, [emojiSize]);
const onFind = useCallback(
(e) => {
const { value } = e.target;
if (value) {
const results = searcherRef.current?.search(value, {
limit: CUSTOM_EMOJIS_COUNT,
});
setMatches(results.map((r) => r.item));
scrollableRef.current?.scrollTo?.(0, 0);
} else {
setMatches(null);
}
},
[customEmojis],
);
useEffect(() => {
if (defaultSearchTerm && customEmojis?.length) {
onFind({ target: { value: defaultSearchTerm } });
}
}, [defaultSearchTerm, onFind, customEmojis]);
const onSelectEmoji = useCallback(
(emoji) => {
onSelect?.(emoji);
onClose?.();
queueMicrotask(() => {
let recentlyUsedCustomEmojis =
store.account.get('recentlyUsedCustomEmojis') || [];
const recentlyUsedEmojiIndex = recentlyUsedCustomEmojis.findIndex(
(e) => e.shortcode === emoji.shortcode,
);
if (recentlyUsedEmojiIndex !== -1) {
// Move emoji to index 0
recentlyUsedCustomEmojis.splice(recentlyUsedEmojiIndex, 1);
recentlyUsedCustomEmojis.unshift(emoji);
} else {
recentlyUsedCustomEmojis.unshift(emoji);
// Remove unavailable ones
recentlyUsedCustomEmojis = recentlyUsedCustomEmojis.filter((e) =>
customEmojisList.current?.find?.(
(emoji) => emoji.shortcode === e.shortcode,
),
);
// Limit to 10
recentlyUsedCustomEmojis = recentlyUsedCustomEmojis.slice(0, 10);
}
// Store back
store.account.set('recentlyUsedCustomEmojis', recentlyUsedCustomEmojis);
});
},
[onSelect],
);
const inputRef = useRef();
useEffect(() => {
if (inputRef.current) {
inputRef.current.focus();
// Put cursor at the end
if (inputRef.current.value) {
inputRef.current.selectionStart = inputRef.current.value.length;
inputRef.current.selectionEnd = inputRef.current.value.length;
}
}
}, []);
return (
<div
id="custom-emojis-sheet"
class="sheet"
style={{
'--custom-emoji-size': emojiSize,
}}
>
{!!onClose && (
<button type="button" class="sheet-close" onClick={onClose}>
<Icon icon="x" alt={t`Close`} />
</button>
)}
<header>
<div>
<b>
<Trans>Custom emojis</Trans>
</b>{' '}
{uiState === 'loading' ? (
<Loader />
) : (
<small class="insignificant"> {instance}</small>
)}
</div>
<form
onSubmit={(e) => {
e.preventDefault();
const emoji = matches[0];
if (emoji) {
onSelectEmoji(`:${emoji.shortcode}:`);
}
}}
>
<input
ref={inputRef}
type="search"
placeholder={t`Search emoji`}
onInput={onFind}
autocomplete="off"
autocorrect="off"
autocapitalize="off"
spellCheck="false"
dir="auto"
defaultValue={defaultSearchTerm || ''}
/>
</form>
</header>
<main ref={scrollableRef}>
{matches !== null ? (
<ul class="custom-emojis-matches custom-emojis-list">
{matches.map((emoji) => (
<li key={emoji.shortcode} class="custom-emojis-match">
<CustomEmojiButton
emoji={emoji}
onClick={() => {
onSelectEmoji(`:${emoji.shortcode}:`);
}}
showCode
/>
</li>
))}
</ul>
) : (
<div class="custom-emojis-list">
{uiState === 'error' && (
<div class="ui-state">
<p>
<Trans>Error loading custom emojis</Trans>
</p>
</div>
)}
{uiState === 'default' &&
Object.entries(customEmojisCatList).map(
([category, emojis]) =>
!!emojis?.length && (
<div class="section-container">
<div class="section-header">
{{
'--recent--': t`Recently used`,
'--others--': t`Others`,
}[category] || category}
</div>
<CustomEmojisList
emojis={emojis}
onSelect={onSelectEmoji}
/>
</div>
),
)}
</div>
)}
<div class="size-range">
<button
type="button"
class="plain4"
onClick={onEmojiSizeDecrease}
disabled={emojiSize <= EMOJI_SIZE_MIN}
>
<Icon icon="zoom-out" size="l" alt={t`Zoom out`} />
</button>
<button
type="button"
class="plain4"
onClick={onEmojiSizeIncrease}
disabled={emojiSize >= EMOJI_SIZE_MAX}
>
<Icon icon="zoom-in" size="l" alt={t`Zoom in`} />
</button>
</div>
</main>
</div>
);
}
export default CustomEmojisModal;

Wyświetl plik

@ -27,7 +27,7 @@ button.draft-item {
background-color: var(--bg-color);
color: var(--text-color);
border: 1px solid var(--link-faded-color);
text-align: left;
text-align: start;
padding: 0;
}
button.draft-item:is(:hover, :focus) {

Wyświetl plik

@ -1,5 +1,6 @@
import './drafts.css';
import { Trans, useLingui } from '@lingui/react/macro';
import { useEffect, useMemo, useReducer, useState } from 'react';
import { api } from '../utils/api';
@ -13,6 +14,7 @@ import Loader from './loader';
import MenuConfirm from './menu-confirm';
function Drafts({ onClose }) {
const { t } = useLingui();
const { masto } = api();
const [uiState, setUIState] = useState('default');
const [drafts, setDrafts] = useState([]);
@ -29,9 +31,7 @@ function Drafts({ onClose }) {
if (ownKeys.length) {
const drafts = await db.drafts.getMany(ownKeys);
drafts.sort(
(a, b) =>
new Date(b.updatedAt).getTime() -
new Date(a.updatedAt).getTime(),
(a, b) => Date.parse(b.updatedAt) - Date.parse(a.updatedAt),
);
setDrafts(drafts);
} else {
@ -54,17 +54,20 @@ function Drafts({ onClose }) {
<div class="sheet">
{!!onClose && (
<button type="button" class="sheet-close" onClick={onClose}>
<Icon icon="x" />
<Icon icon="x" alt={t`Close`} />
</button>
)}
<header>
<h2>
Unsent drafts <Loader abrupt hidden={uiState !== 'loading'} />
<Trans>Unsent drafts</Trans>{' '}
<Loader abrupt hidden={uiState !== 'loading'} />
</h2>
{hasDrafts && (
<div class="insignificant">
Looks like you have unsent drafts. Let's continue where you left
off.
<Trans>
Looks like you have unsent drafts. Let's continue where you left
off.
</Trans>
</div>
)}
</header>
@ -73,7 +76,7 @@ function Drafts({ onClose }) {
<>
<ul class="drafts-list">
{drafts.map((draft) => {
const { updatedAt, key, draftStatus, replyTo } = draft;
const { updatedAt, key, draftStatus, replyTo, quote } = draft;
const updatedAtDate = new Date(updatedAt);
return (
<li key={updatedAt}>
@ -83,7 +86,9 @@ function Drafts({ onClose }) {
<time>
{!!replyTo && (
<>
@{replyTo.account.acct}
<span class="bidi-isolate">
@{replyTo.account.acct}
</span>
<br />
</>
)}
@ -91,7 +96,11 @@ function Drafts({ onClose }) {
</time>
</b>
<MenuConfirm
confirmLabel={<span>Delete this draft?</span>}
confirmLabel={
<span>
<Trans>Delete this draft?</Trans>
</span>
}
menuItemClassName="danger"
align="end"
disabled={uiState === 'loading'}
@ -104,7 +113,7 @@ function Drafts({ onClose }) {
reload();
// }
} catch (e) {
alert('Error deleting draft! Please try again.');
alert(t`Error deleting draft! Please try again.`);
}
})();
}}
@ -114,7 +123,7 @@ function Drafts({ onClose }) {
class="small light"
disabled={uiState === 'loading'}
>
Delete&hellip;
<Trans>Delete</Trans>
</button>
</MenuConfirm>
</div>
@ -125,23 +134,40 @@ function Drafts({ onClose }) {
onClick={async () => {
// console.log({ draftStatus });
let replyToStatus;
if (replyTo) {
let quoteStatus;
if (replyTo?.id || quote?.id) {
setUIState('loading');
try {
replyToStatus = await masto.v1.statuses
.$select(replyTo.id)
.fetch();
} catch (e) {
console.error(e);
alert('Error fetching reply-to status!');
setUIState('default');
return;
if (replyTo) {
try {
replyToStatus = await masto.v1.statuses
.$select(replyTo.id)
.fetch();
} catch (e) {
console.error(e);
alert(t`Error fetching reply-to status!`);
setUIState('default');
return;
}
}
if (quote) {
try {
quoteStatus = await masto.v1.statuses
.$select(quote.id)
.fetch();
} catch (e) {
console.error(e);
alert(t`Error fetching quoted status!`);
setUIState('default');
// Don't return. Fail and still allow draft without quote
// return;
}
}
setUIState('default');
}
window.__COMPOSE__ = {
draftStatus,
replyToStatus,
quoteStatus,
};
states.showCompose = true;
states.showDrafts = false;
@ -156,7 +182,11 @@ function Drafts({ onClose }) {
{drafts.length > 1 && (
<p>
<MenuConfirm
confirmLabel={<span>Delete all drafts?</span>}
confirmLabel={
<span>
<Trans>Delete all drafts?</Trans>
</span>
}
menuItemClassName="danger"
disabled={uiState === 'loading'}
onClick={() => {
@ -172,7 +202,7 @@ function Drafts({ onClose }) {
reload();
} catch (e) {
console.error(e);
alert('Error deleting drafts! Please try again.');
alert(t`Error deleting drafts! Please try again.`);
setUIState('error');
}
// }
@ -184,14 +214,16 @@ function Drafts({ onClose }) {
class="light danger"
disabled={uiState === 'loading'}
>
Delete all&hellip;
<Trans>Delete all</Trans>
</button>
</MenuConfirm>
</p>
)}
</>
) : (
<p>No drafts found.</p>
<p>
<Trans>No drafts found.</Trans>
</p>
)}
</main>
</div>
@ -199,11 +231,13 @@ function Drafts({ onClose }) {
}
function MiniDraft({ draft }) {
const { draftStatus, replyTo } = draft;
const { t } = useLingui();
const { draftStatus, replyTo, quote } = draft;
const { status, spoilerText, poll, mediaAttachments } = draftStatus;
const hasPoll = poll?.options?.length > 0;
const hasMedia = mediaAttachments?.length > 0;
const hasPollOrMedia = hasPoll || hasMedia;
const hasQuote = !!quote?.id;
const hasPollOrMedia = hasPoll || hasMedia || hasQuote;
const firstImageMedia = useMemo(() => {
if (!hasMedia) return;
const image = mediaAttachments.find((media) => /image/.test(media.type));
@ -226,13 +260,14 @@ function MiniDraft({ draft }) {
: {}
}
>
{hasPoll && <Icon icon="poll" />}
{hasPoll && <Icon icon="poll" alt={t`Poll`} />}
{hasMedia && (
<span>
<Icon icon="attachment" />{' '}
<Icon icon="attachment" alt={t`Media`} />{' '}
<small>{mediaAttachments?.length}</small>
</span>
)}
{hasQuote && <Icon icon="quote" alt={t`Quote`} />}
</div>
)}
<div class="mini-draft-main">

Wyświetl plik

@ -0,0 +1,61 @@
import { useLingui } from '@lingui/react/macro';
import { useEditHistory } from '../utils/edit-history-context';
import Icon from './icon';
export default function EditHistoryControls() {
const { t } = useLingui();
const {
prevEditedAt,
nextEditedAt,
editedAtIndex,
editHistoryMode,
editHistoryRef,
exitEditHistory,
} = useEditHistory();
if (!editHistoryMode) return null;
return (
<div class="edit-history-controls">
<Icon icon="edit" />
<b class="edit-history-heading">{t`Edit History Snapshots`}</b>
<span class="spacer" />
<span class="edit-history-pagination">
<button
type="button"
class="plain4"
onClick={() => {
prevEditedAt();
}}
disabled={
!editHistoryMode ||
editedAtIndex + 1 >= editHistoryRef.current.length
}
>
<Icon icon="chevron-left" alt={t`Previous`} />
</button>{' '}
{editHistoryRef.current.length - editedAtIndex} /{' '}
{editHistoryRef.current.length}{' '}
<button
type="button"
class="plain4"
onClick={() => {
nextEditedAt();
}}
disabled={!editHistoryMode || editedAtIndex <= 0}
>
<Icon icon="chevron-right" alt={t`Next`} />
</button>
</span>
<button
type="button"
class="plain3"
onClick={() => {
exitEditHistory();
}}
>
<Icon icon="exit" alt={t`Exit`} />
</button>
</div>
);
}

Wyświetl plik

@ -0,0 +1,336 @@
import { Trans, useLingui } from '@lingui/react/macro';
import { useEffect, useRef, useState } from 'preact/hooks';
import { api } from '../utils/api';
import states from '../utils/states';
import Icon from './icon';
import Loader from './loader';
const SUPPORTED_IMAGE_FORMATS = [
'image/jpeg',
'image/png',
'image/gif',
'image/webp',
];
const SUPPORTED_IMAGE_FORMATS_STR = SUPPORTED_IMAGE_FORMATS.join(',');
function FieldsAttributesRow({ name, value, disabled, index: i }) {
const [hasValue, setHasValue] = useState(!!value);
return (
<tr>
<td>
<input
type="text"
name={`fields_attributes[${i}][name]`}
defaultValue={name}
disabled={disabled}
maxLength={255}
required={hasValue}
dir="auto"
/>
</td>
<td>
<input
type="text"
name={`fields_attributes[${i}][value]`}
defaultValue={value}
disabled={disabled}
maxLength={255}
onChange={(e) => setHasValue(!!e.currentTarget.value)}
dir="auto"
/>
</td>
</tr>
);
}
function EditProfileSheet({ onClose = () => {} }) {
const { t } = useLingui();
const { masto } = api();
const [uiState, setUIState] = useState('loading');
const [account, setAccount] = useState(null);
const [headerPreview, setHeaderPreview] = useState(null);
const [avatarPreview, setAvatarPreview] = useState(null);
useEffect(() => {
(async () => {
try {
const acc = await masto.v1.accounts.verifyCredentials();
setAccount(acc);
setUIState('default');
} catch (e) {
console.error(e);
setUIState('error');
}
})();
}, []);
console.log('EditProfileSheet', account);
const { displayName, source, avatar, header } = account || {};
const { note, fields } = source || {};
const fieldsAttributesRef = useRef(null);
const avatarMediaAttachments = [
...(avatar ? [{ type: 'image', url: avatar }] : []),
...(avatarPreview ? [{ type: 'image', url: avatarPreview }] : []),
];
const headerMediaAttachments = [
...(header ? [{ type: 'image', url: header }] : []),
...(headerPreview ? [{ type: 'image', url: headerPreview }] : []),
];
return (
<div class="sheet" id="edit-profile-container">
{!!onClose && (
<button type="button" class="sheet-close" onClick={onClose}>
<Icon icon="x" alt={t`Close`} />
</button>
)}
<header>
<b>
<Trans>Edit profile</Trans>
</b>
</header>
<main>
{uiState === 'loading' ? (
<p class="ui-state">
<Loader abrupt />
</p>
) : (
<form
onSubmit={(e) => {
e.preventDefault();
const formData = new FormData(e.target);
const header = formData.get('header');
const avatar = formData.get('avatar');
const displayName = formData.get('display_name');
const note = formData.get('note');
const fieldsAttributesFields =
fieldsAttributesRef.current.querySelectorAll(
'input[name^="fields_attributes"]',
);
const fieldsAttributes = [];
fieldsAttributesFields.forEach((field) => {
const name = field.name;
const [_, index, key] =
name.match(/fields_attributes\[(\d+)\]\[(.+)\]/) || [];
const value = field.value ? field.value.trim() : '';
if (index && key && value) {
if (!fieldsAttributes[index]) fieldsAttributes[index] = {};
fieldsAttributes[index][key] = value;
}
});
// Fill in the blanks
fieldsAttributes.forEach((field) => {
if (field.name && !field.value) {
field.value = '';
}
});
(async () => {
try {
const newAccount = await masto.v1.accounts.updateCredentials({
header,
avatar,
displayName,
note,
fieldsAttributes,
});
console.log('updated account', newAccount);
onClose?.({
state: 'success',
account: newAccount,
});
} catch (e) {
console.error(e);
alert(e?.message || t`Unable to update profile.`);
}
})();
}}
>
<div class="edit-profile-media-container">
<label>
<Trans>Header picture</Trans>{' '}
<input
type="file"
name="header"
accept={SUPPORTED_IMAGE_FORMATS_STR}
onChange={(e) => {
const file = e.target.files[0];
if (file) {
const blob = URL.createObjectURL(file);
setHeaderPreview(blob);
}
}}
/>
</label>
<div class="edit-profile-media-field">
{header ? (
<div
class="edit-media"
tabIndex="0"
onClick={() => {
states.showMediaModal = {
mediaAttachments: headerMediaAttachments,
mediaIndex: 0,
};
}}
>
<img src={header} alt="" />
</div>
) : (
<div class="edit-media"></div>
)}
{headerPreview && (
<>
<Icon icon="arrow-right" />
<div
class="edit-media"
tabIndex="0"
onClick={() => {
states.showMediaModal = {
mediaAttachments: headerMediaAttachments,
mediaIndex: 1,
};
}}
>
<img src={headerPreview} alt="" />
</div>
</>
)}
</div>
</div>
<div class="edit-profile-media-container">
<label>
<Trans>Profile picture</Trans>{' '}
<input
type="file"
name="avatar"
accept={SUPPORTED_IMAGE_FORMATS_STR}
onChange={(e) => {
const file = e.target.files[0];
if (file) {
const blob = URL.createObjectURL(file);
setAvatarPreview(blob);
}
}}
/>
</label>
<div class="edit-profile-media-field">
{avatar ? (
<div
class="edit-media"
tabIndex="0"
onClick={() => {
states.showMediaModal = {
mediaAttachments: avatarMediaAttachments,
mediaIndex: 0,
};
}}
>
<img src={avatar} alt="" />
</div>
) : (
<div class="edit-media"></div>
)}
{avatarPreview && (
<>
<Icon icon="arrow-right" />
<div
class="edit-media"
tabIndex="0"
onClick={() => {
states.showMediaModal = {
mediaAttachments: avatarMediaAttachments,
mediaIndex: 1,
};
}}
>
<img src={avatarPreview} alt="" />
</div>
</>
)}
</div>
</div>
<p>
<label>
<Trans>Name</Trans>{' '}
<input
type="text"
name="display_name"
defaultValue={displayName}
maxLength={30}
disabled={uiState === 'loading'}
dir="auto"
/>
</label>
</p>
<p>
<label>
<Trans>Bio</Trans>
<textarea
defaultValue={note}
name="note"
maxLength={500}
rows="5"
disabled={uiState === 'loading'}
dir="auto"
/>
</label>
</p>
{/* Table for fields; name and values are in fields, min 4 rows */}
<p>
<Trans>Extra fields</Trans>
</p>
<table ref={fieldsAttributesRef}>
<thead>
<tr>
<th>
<Trans>Label</Trans>
</th>
<th>
<Trans>Content</Trans>
</th>
</tr>
</thead>
<tbody>
{Array.from({ length: Math.max(4, fields.length) }).map(
(_, i) => {
const { name = '', value = '' } = fields[i] || {};
return (
<FieldsAttributesRow
key={i}
name={name}
value={value}
index={i}
disabled={uiState === 'loading'}
/>
);
},
)}
</tbody>
</table>
<footer>
<button
type="button"
class="light"
disabled={uiState === 'loading'}
onClick={() => {
onClose?.();
}}
>
<Trans>Cancel</Trans>
</button>
<button type="submit" disabled={uiState === 'loading'}>
<Trans>Save</Trans>
</button>
</footer>
</form>
)}
</main>
</div>
);
}
export default EditProfileSheet;

Wyświetl plik

@ -0,0 +1,31 @@
.embed-modal-container {
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
pointer-events: none;
.top-controls {
padding: 16px;
display: flex;
gap: 8px;
justify-content: space-between;
pointer-events: auto;
}
.embed-content {
flex-grow: 1;
display: flex;
align-items: center;
justify-content: center;
iframe {
pointer-events: auto;
max-width: 100%;
max-height: 100%;
width: max(var(--width), var(--main-width));
height: auto;
aspect-ratio: var(--aspect-ratio);
}
}
}

Wyświetl plik

@ -0,0 +1,37 @@
import './embed-modal.css';
import { Trans, useLingui } from '@lingui/react/macro';
import Icon from './icon';
function EmbedModal({ html, url, width, height, onClose = () => {} }) {
const { t } = useLingui();
return (
<div class="embed-modal-container">
<div class="top-controls">
<button type="button" class="light" onClick={() => onClose()}>
<Icon icon="x" alt={t`Close`} />
</button>
{url && (
<a href={url} target="_blank" rel="noopener" class="button plain">
<span>
<Trans>Open in new window</Trans>
</span>{' '}
<Icon icon="external" />
</a>
)}
</div>
<div
class="embed-content"
dangerouslySetInnerHTML={{ __html: html }}
style={{
'--width': width + 'px',
'--height': height + 'px',
'--aspect-ratio': `${width}/${height}`,
}}
/>
</div>
);
}
export default EmbedModal;

Wyświetl plik

@ -1,29 +1,33 @@
function EmojiText({ text, emojis }) {
import { memo } from 'preact/compat';
import mem from '../utils/mem';
import CustomEmoji from './custom-emoji';
const shortcodesRegexp = mem((shortcodes) => {
return new RegExp(`:(${shortcodes.join('|')}):`, 'g');
});
function EmojiText({ text, emojis, staticEmoji }) {
if (!text) return '';
if (!emojis?.length) return text;
if (text.indexOf(':') === -1) return text;
const regex = new RegExp(
`:(${emojis.map((e) => e.shortcode).join('|')}):`,
'g',
);
const elements = text.split(regex).map((word) => {
// const regex = new RegExp(
// `:(${emojis.map((e) => e.shortcode).join('|')}):`,
// 'g',
// );
const regex = shortcodesRegexp(emojis.map((e) => e.shortcode));
const elements = text.split(regex).map((word, i) => {
const emoji = emojis.find((e) => e.shortcode === word);
if (emoji) {
const { url, staticUrl } = emoji;
return (
<picture>
<source srcset={staticUrl} media="(prefers-reduced-motion: reduce)" />
<img
key={word}
src={url}
alt={word}
class="shortcode-emoji emoji"
width="16"
height="16"
loading="lazy"
decoding="async"
/>
</picture>
<CustomEmoji
staticUrl={staticEmoji ? undefined : staticUrl}
alt={word}
url={staticEmoji ? staticUrl || url : url}
key={word + '-' + i} // Handle >= 2 same shortcodes
/>
);
}
return word;
@ -31,4 +35,11 @@ function EmojiText({ text, emojis }) {
return elements;
}
export default EmojiText;
export default mem(EmojiText);
// export default memo(
// EmojiText,
// (oldProps, newProps) =>
// oldProps.text === newProps.text &&
// oldProps.emojis?.length === newProps.emojis?.length,
// );

Wyświetl plik

@ -0,0 +1,107 @@
import { Trans } from '@lingui/react/macro';
import { useEffect, useRef, useState } from 'preact/hooks';
import { api } from '../utils/api';
import { fetchRelationships } from '../utils/relationships';
import supports from '../utils/supports';
import AccountBlock from './account-block';
import Loader from './loader';
const ENDORSEMENTS_LIMIT = 80;
function Endorsements({
accountID: id,
info,
open = false,
onlyOpenIfHasEndorsements = false,
}) {
const { masto } = api();
const endorsementsContainer = useRef();
const [endorsementsUIState, setEndorsementsUIState] = useState('default');
const [endorsements, setEndorsements] = useState([]);
const [relationshipsMap, setRelationshipsMap] = useState({});
useEffect(() => {
if (!supports('@mastodon/endorsements')) return;
if (!open) return;
(async () => {
setEndorsementsUIState('loading');
try {
const accounts = await masto.v1.accounts.$select(id).endorsements.list({
limit: ENDORSEMENTS_LIMIT,
});
console.log({ endorsements: accounts });
if (!accounts.length) {
setEndorsementsUIState('default');
return;
}
setEndorsements(accounts);
setEndorsementsUIState('default');
setTimeout(() => {
endorsementsContainer.current.scrollIntoView({
behavior: 'smooth',
block: 'nearest',
});
}, 300);
const relationships = await fetchRelationships(
accounts,
relationshipsMap,
);
if (relationships) {
setRelationshipsMap(relationships);
}
} catch (e) {
console.error(e);
setEndorsementsUIState('error');
}
})();
}, [open, id]);
const reallyOpen = onlyOpenIfHasEndorsements
? open && endorsements.length > 0
: open;
if (!reallyOpen) return null;
return (
<div class="shazam-container">
<div class="shazam-container-inner">
<div class="endorsements-container" ref={endorsementsContainer}>
<h3>
<Trans>Profiles featured by @{info.username}</Trans>
</h3>
{endorsementsUIState === 'loading' ? (
<p class="ui-state">
<Loader abrupt />
</p>
) : endorsements.length > 0 ? (
<ul
class={`endorsements ${
endorsements.length > 10 ? 'expanded' : ''
}`}
>
{endorsements.map((account) => (
<li>
<AccountBlock
key={account.id}
account={account}
showStats
avatarSize="xxl"
relationship={relationshipsMap[account.id]}
/>
</li>
))}
</ul>
) : (
<p class="ui-state insignificant">
<Trans>No featured profiles.</Trans>
</p>
)}
</div>
</div>
</div>
);
}
export default Endorsements;

Wyświetl plik

@ -0,0 +1,55 @@
import { plural } from '@lingui/core/macro';
function FilePickerInput({
hidden,
supportedMimeTypes,
maxMediaAttachments,
mediaAttachments,
disabled = false,
setMediaAttachments,
}) {
return (
<input
type="file"
hidden={hidden}
accept={supportedMimeTypes?.join(',')}
multiple={
maxMediaAttachments === undefined ||
maxMediaAttachments - mediaAttachments >= 2
}
disabled={disabled}
onChange={(e) => {
const files = e.target.files;
if (!files) return;
const mediaFiles = Array.from(files).map((file) => ({
file,
type: file.type,
size: file.size,
url: URL.createObjectURL(file),
id: null, // indicate uploaded state
description: null,
}));
console.log('MEDIA ATTACHMENTS', files, mediaFiles);
// Validate max media attachments
if (mediaAttachments.length + mediaFiles.length > maxMediaAttachments) {
alert(
plural(maxMediaAttachments, {
one: 'You can only attach up to 1 file.',
other: 'You can only attach up to # files.',
}),
);
} else {
setMediaAttachments((attachments) => {
return attachments.concat(mediaFiles);
});
}
// Reset
e.target.value = '';
}}
/>
);
}
export default FilePickerInput;

Wyświetl plik

@ -1,3 +1,4 @@
import { Trans, useLingui } from '@lingui/react/macro';
import { useState } from 'preact/hooks';
import { api } from '../utils/api';
@ -6,6 +7,7 @@ import Icon from './icon';
import Loader from './loader';
function FollowRequestButtons({ accountID, onChange }) {
const { t } = useLingui();
const { masto } = api();
const [uiState, setUIState] = useState('default');
const [requestState, setRequestState] = useState(null); // accept, reject
@ -38,7 +40,7 @@ function FollowRequestButtons({ accountID, onChange }) {
})();
}}
>
Accept
<Trans>Accept</Trans>
</button>{' '}
<button
type="button"
@ -64,14 +66,18 @@ function FollowRequestButtons({ accountID, onChange }) {
})();
}}
>
Reject
<Trans>Reject</Trans>
</button>
<span class="follow-request-states">
{hasRelationship && requestState ? (
requestState === 'accept' ? (
<Icon icon="check-circle" alt="Accepted" class="follow-accepted" />
<Icon
icon="check-circle"
alt={t`Accepted`}
class="follow-accepted"
/>
) : (
<Icon icon="x-circle" alt="Rejected" class="follow-rejected" />
<Icon icon="x-circle" alt={t`Rejected`} class="follow-rejected" />
)
) : (
<Loader hidden={uiState !== 'loading'} />

Wyświetl plik

@ -1,4 +1,39 @@
#generic-accounts-container {
.post-preview {
--max-height: 120px;
max-height: var(--max-height);
overflow: hidden;
margin-block: 8px;
border: 1px solid var(--outline-color);
border-radius: 8px;
pointer-events: none;
.status {
font-size: calc(var(--text-size) * 0.9);
mask-image: linear-gradient(
to bottom,
black calc(var(--max-height) / 2),
transparent calc(var(--max-height) - 8px)
);
filter: saturate(0.5);
}
&:is(a) {
pointer-events: auto;
display: block;
text-decoration: none;
color: inherit;
&:hover {
border-color: var(--outline-hover-color);
}
> * {
pointer-events: none;
}
}
}
.accounts-list {
--list-gap: 16px;
list-style: none;
@ -27,13 +62,13 @@
border-top: var(--hairline-width) solid var(--divider-color);
position: absolute;
bottom: calc(-1 * var(--list-gap) / 2);
left: 40px;
right: 0;
inset-inline-start: 40px;
inset-inline-end: 0;
}
&:has(.reactions-block):before {
/* avatar + reactions + gap */
left: calc(40px + 16px + 8px);
inset-inline-start: calc(40px + 16px + 8px);
}
}

Wyświetl plik

@ -1,5 +1,6 @@
import './generic-accounts.css';
import { Trans, useLingui } from '@lingui/react/macro';
import { useEffect, useRef, useState } from 'preact/hooks';
import { InView } from 'react-intersection-observer';
import { useSnapshot } from 'valtio';
@ -11,19 +12,23 @@ import useLocationChange from '../utils/useLocationChange';
import AccountBlock from './account-block';
import Icon from './icon';
import Link from './link';
import Loader from './loader';
import Status from './status';
export default function GenericAccounts({
instance,
excludeRelationshipAttrs = [],
postID,
onClose = () => {},
blankCopy,
}) {
const { t } = useLingui();
const { masto, instance: currentInstance } = api();
const isCurrentInstance = instance ? instance === currentInstance : true;
const snapStates = useSnapshot(states);
``;
const [uiState, setUIState] = useState('default');
const [accounts, setAccounts] = useState([]);
const [showMore, setShowMore] = useState(false);
useLocationChange(onClose);
@ -40,6 +45,10 @@ export default function GenericAccounts({
showReactions,
} = snapStates.showGenericAccounts;
const [accounts, setAccounts] = useState(
staticAccounts?.length ? staticAccounts : [],
);
const [relationshipsMap, setRelationshipsMap] = useState({});
const loadRelationships = async (accounts) => {
@ -56,7 +65,7 @@ export default function GenericAccounts({
const loadAccounts = (firstLoad) => {
if (!fetchAccounts) return;
if (firstLoad) setAccounts([]);
if (firstLoad && !accounts?.length) setAccounts([]);
setUIState('loading');
(async () => {
try {
@ -111,14 +120,19 @@ export default function GenericAccounts({
const firstLoad = useRef(true);
useEffect(() => {
if (staticAccounts?.length > 0) {
setAccounts(staticAccounts);
loadRelationships(staticAccounts);
if (accounts?.length > 0) {
// setAccounts(staticAccounts);
if (fetchAccounts) {
loadAccounts(true);
firstLoad.current = false;
} else {
loadRelationships(accounts);
}
} else {
loadAccounts(true);
firstLoad.current = false;
}
}, [staticAccounts, fetchAccounts]);
}, [fetchAccounts]);
useEffect(() => {
if (firstLoad.current) return;
@ -129,15 +143,25 @@ export default function GenericAccounts({
}
}, [snapStates.reloadGenericAccounts.counter]);
const post = states.statuses[postID];
return (
<div id="generic-accounts-container" class="sheet" tabindex="-1">
<button type="button" class="sheet-close" onClick={onClose}>
<Icon icon="x" />
<Icon icon="x" alt={t`Close`} />
</button>
<header>
<h2>{heading || 'Accounts'}</h2>
<h2>{heading || t`Accounts`}</h2>
</header>
<main>
{post && (
<Link
to={`/${instance || currentInstance}/s/${post.id}`}
class="post-preview"
>
<Status status={post} size="s" readOnly />
</Link>
)}
{accounts.length > 0 ? (
<>
<ul class="accounts-list">
@ -187,11 +211,13 @@ export default function GenericAccounts({
class="plain block"
onClick={() => loadAccounts()}
>
Show more&hellip;
<Trans>Show more</Trans>
</button>
</InView>
) : (
<p class="ui-state insignificant">The end.</p>
<p class="ui-state insignificant">
<Trans>The end.</Trans>
</p>
)
) : (
uiState === 'loading' && (
@ -206,9 +232,13 @@ export default function GenericAccounts({
<Loader abrupt />
</p>
) : uiState === 'error' ? (
<p class="ui-state">Error loading accounts</p>
<p class="ui-state">
<Trans>Error loading accounts</Trans>
</p>
) : (
<p class="ui-state insignificant">Nothing to show</p>
<p class="ui-state insignificant">
{blankCopy || t`Nothing to show`}
</p>
)}
</main>
</div>

Wyświetl plik

@ -0,0 +1,251 @@
import { Trans, useLingui } from '@lingui/react/macro';
import { useEffect, useRef, useState } from 'preact/hooks';
import { useDebouncedCallback } from 'use-debounce';
import poweredByGiphyURL from '../assets/powered-by-giphy.svg';
import Icon from './icon';
import Loader from './loader';
const { PHANPY_GIPHY_API_KEY: GIPHY_API_KEY } = import.meta.env;
const GIFS_PER_PAGE = 20;
function GIFPickerModal({ onClose = () => {}, onSelect = () => {} }) {
const { i18n, t } = useLingui();
const [uiState, setUIState] = useState('default');
const [results, setResults] = useState([]);
const formRef = useRef(null);
const qRef = useRef(null);
const currentOffset = useRef(0);
const scrollableRef = useRef(null);
function fetchGIFs({ offset }) {
console.log('fetchGIFs', { offset });
if (!qRef.current?.value) return;
setUIState('loading');
scrollableRef.current?.scrollTo?.({
top: 0,
left: 0,
behavior: 'smooth',
});
(async () => {
try {
const query = {
api_key: GIPHY_API_KEY,
q: qRef.current.value,
rating: 'g',
limit: GIFS_PER_PAGE,
bundle: 'messaging_non_clips',
offset,
lang: i18n.locale || 'en',
};
const response = await fetch(
'https://api.giphy.com/v1/gifs/search?' + new URLSearchParams(query),
{
referrerPolicy: 'no-referrer',
},
).then((r) => r.json());
currentOffset.current = response.pagination?.offset || 0;
setResults(response);
setUIState('results');
} catch (e) {
setUIState('error');
console.error(e);
}
})();
}
useEffect(() => {
qRef.current?.focus();
}, []);
const debouncedOnInput = useDebouncedCallback(() => {
fetchGIFs({ offset: 0 });
}, 1000);
return (
<div id="gif-picker-sheet" class="sheet">
{!!onClose && (
<button type="button" class="sheet-close" onClick={onClose}>
<Icon icon="x" alt={t`Close`} />
</button>
)}
<header>
<form
ref={formRef}
onSubmit={(e) => {
e.preventDefault();
fetchGIFs({ offset: 0 });
}}
>
<input
ref={qRef}
type="search"
name="q"
placeholder={t`Search GIFs`}
required
autocomplete="off"
autocorrect="off"
autocapitalize="off"
spellCheck="false"
dir="auto"
onInput={debouncedOnInput}
/>
<input
type="image"
class="powered-button"
src={poweredByGiphyURL}
width="86"
height="30"
alt={t`Powered by GIPHY`}
/>
</form>
</header>
<main ref={scrollableRef} class={uiState === 'loading' ? 'loading' : ''}>
{uiState === 'default' && (
<div class="ui-state">
<p class="insignificant">
<Trans>Type to search GIFs</Trans>
</p>
</div>
)}
{uiState === 'loading' && !results?.data?.length && (
<div class="ui-state">
<Loader abrupt />
</div>
)}
{results?.data?.length > 0 ? (
<>
<ul>
{results.data.map((gif) => {
const { id, images, title, alt_text } = gif;
const {
fixed_height_small,
fixed_height_downsampled,
fixed_height,
original,
} = images;
const theImage = fixed_height_small?.url
? fixed_height_small
: fixed_height_downsampled?.url
? fixed_height_downsampled
: fixed_height;
let { url, webp, width, height } = theImage;
if (+height > 100) {
width = (width / height) * 100;
height = 100;
}
const urlObj = URL.parse(url);
const strippedURL = urlObj.origin + urlObj.pathname;
let strippedWebP;
if (webp) {
const webpObj = URL.parse(webp);
strippedWebP = webpObj.origin + webpObj.pathname;
}
return (
<li key={id}>
<button
type="button"
onClick={() => {
const { mp4, url } = original;
const theURL = mp4 || url;
const urlObj = URL.parse(theURL);
const strippedURL = urlObj.origin + urlObj.pathname;
onClose();
onSelect({
url: strippedURL,
type: mp4 ? 'video/mp4' : 'image/gif',
alt_text: alt_text || title,
});
}}
>
<figure
style={{
'--figure-width': width + 'px',
// width: width + 'px'
}}
>
<picture>
{strippedWebP && (
<source srcset={strippedWebP} type="image/webp" />
)}
<img
src={strippedURL}
width={width}
height={height}
loading="lazy"
decoding="async"
alt={alt_text}
referrerpolicy="no-referrer"
onLoad={(e) => {
e.target.style.backgroundColor = 'transparent';
}}
/>
</picture>
<figcaption>{alt_text || title}</figcaption>
</figure>
</button>
</li>
);
})}
</ul>
<p class="pagination">
{results.pagination?.offset > 0 && (
<button
type="button"
class="light small"
disabled={uiState === 'loading'}
onClick={() => {
fetchGIFs({
offset: results.pagination?.offset - GIFS_PER_PAGE,
});
}}
>
<Icon icon="chevron-left" />
<span>
<Trans>Previous</Trans>
</span>
</button>
)}
<span />
{results.pagination?.offset + results.pagination?.count <
results.pagination?.total_count && (
<button
type="button"
class="light small"
disabled={uiState === 'loading'}
onClick={() => {
fetchGIFs({
offset: results.pagination?.offset + GIFS_PER_PAGE,
});
}}
>
<span>
<Trans>Next</Trans>
</span>{' '}
<Icon icon="chevron-right" />
</button>
)}
</p>
</>
) : (
uiState === 'results' && (
<div class="ui-state">
<p>No results</p>
</div>
)
)}
{uiState === 'error' && (
<div class="ui-state">
<p>
<Trans>Error loading GIFs</Trans>
</p>
</div>
)}
</main>
</div>
);
}
export default GIFPickerModal;

Wyświetl plik

@ -0,0 +1,110 @@
import { createContext } from 'preact';
import { memo } from 'preact/compat';
import { useCallback, useContext, useState } from 'preact/hooks';
const IconSpriteContext = createContext();
export const ICON_NAMESPACE = 'sprite-icon';
export function IconSpriteProvider({ children }) {
const [loadedIcons, setLoadedIcons] = useState(new Set());
const [iconData, setIconData] = useState({});
const loadIcon = useCallback(
async (iconName) => {
if (loadedIcons.has(iconName)) {
return;
}
try {
const { ICONS } = await import('./ICONS');
const iconBlock = ICONS[iconName];
if (!iconBlock) {
console.warn(`Icon ${iconName} not found`);
return;
}
let iconModule;
if (Array.isArray(iconBlock)) {
iconModule = iconBlock[0];
} else if (typeof iconBlock === 'object') {
iconModule = iconBlock.module;
} else {
iconModule = iconBlock;
}
const iconResult = await iconModule();
const iconDataResult = iconResult.default;
setIconData((prev) => ({ ...prev, [iconName]: iconDataResult }));
setLoadedIcons((prev) => new Set([...prev, iconName]));
} catch (error) {
console.warn(`Failed to load icon ${iconName}:`, error);
}
},
[loadedIcons],
);
const isIconLoaded = useCallback(
(iconName) => loadedIcons.has(iconName),
[loadedIcons],
);
const contextValue = {
loadIcon,
isIconLoaded,
loadedIcons,
iconData,
};
return (
<IconSpriteContext.Provider value={contextValue}>
{children}
<IconSprite />
</IconSpriteContext.Provider>
);
}
function IconSprite() {
const { loadedIcons, iconData } = useIconSprite();
if (loadedIcons.size === 0) {
return null;
}
return (
<svg style={{ display: 'none' }} aria-hidden="true">
<defs>
{Array.from(loadedIcons).map((iconName) => {
const data = iconData[iconName];
if (!data) return null;
return <Symbol key={iconName} iconName={iconName} data={data} />;
})}
</defs>
</svg>
);
}
const Symbol = memo(
function ({ iconName, data }) {
return (
<symbol
id={`${ICON_NAMESPACE}-${iconName}`}
viewBox={`0 0 ${data.width} ${data.height}`}
dangerouslySetInnerHTML={{ __html: data.body }}
/>
);
},
(prevProps, nextProps) => {
return prevProps.iconName === nextProps.iconName;
},
);
export function useIconSprite() {
const context = useContext(IconSpriteContext);
if (!context) {
throw new Error('useIconSprite must be used within IconSpriteProvider');
}
return context;
}

Wyświetl plik

@ -1,6 +1,11 @@
import { useEffect, useRef, useState } from 'preact/hooks';
import { memo } from 'preact/compat';
import { useEffect } from 'preact/hooks';
import { ICONS } from './ICONS';
import { ICON_NAMESPACE, useIconSprite } from './icon-sprite-manager';
const SIZES = {
xs: 8,
s: 12,
m: 16,
l: 20,
@ -8,107 +13,7 @@ const SIZES = {
xxl: 32,
};
export const ICONS = {
x: () => import('@iconify-icons/mingcute/close-line'),
heart: () => import('@iconify-icons/mingcute/heart-line'),
bookmark: () => import('@iconify-icons/mingcute/bookmark-line'),
'check-circle': () => import('@iconify-icons/mingcute/check-circle-line'),
'x-circle': () => import('@iconify-icons/mingcute/close-circle-line'),
transfer: () => import('@iconify-icons/mingcute/transfer-4-line'),
rocket: () => import('@iconify-icons/mingcute/rocket-line'),
'arrow-left': () => import('@iconify-icons/mingcute/arrow-left-line'),
'arrow-right': () => import('@iconify-icons/mingcute/arrow-right-line'),
'arrow-up': () => import('@iconify-icons/mingcute/arrow-up-line'),
'arrow-down': () => import('@iconify-icons/mingcute/arrow-down-line'),
earth: () => import('@iconify-icons/mingcute/earth-line'),
lock: () => import('@iconify-icons/mingcute/lock-line'),
unlock: () => import('@iconify-icons/mingcute/unlock-line'),
'eye-close': () => import('@iconify-icons/mingcute/eye-close-line'),
'eye-open': () => import('@iconify-icons/mingcute/eye-2-line'),
message: () => import('@iconify-icons/mingcute/mail-line'),
comment: () => import('@iconify-icons/mingcute/chat-3-line'),
comment2: () => import('@iconify-icons/mingcute/comment-2-line'),
home: () => import('@iconify-icons/mingcute/home-3-line'),
notification: () => import('@iconify-icons/mingcute/notification-line'),
follow: () => import('@iconify-icons/mingcute/user-follow-line'),
'follow-add': () => import('@iconify-icons/mingcute/user-add-line'),
poll: [() => import('@iconify-icons/mingcute/chart-bar-line'), '90deg'],
pencil: () => import('@iconify-icons/mingcute/pencil-line'),
quill: () => import('@iconify-icons/mingcute/quill-pen-line'),
at: () => import('@iconify-icons/mingcute/at-line'),
attachment: () => import('@iconify-icons/mingcute/attachment-line'),
upload: () => import('@iconify-icons/mingcute/upload-3-line'),
gear: () => import('@iconify-icons/mingcute/settings-3-line'),
more: () => import('@iconify-icons/mingcute/more-3-line'),
external: () => import('@iconify-icons/mingcute/external-link-line'),
popout: () => import('@iconify-icons/mingcute/external-link-line'),
popin: [() => import('@iconify-icons/mingcute/external-link-line'), '180deg'],
plus: () => import('@iconify-icons/mingcute/add-circle-line'),
'chevron-left': () => import('@iconify-icons/mingcute/left-line'),
'chevron-right': () => import('@iconify-icons/mingcute/right-line'),
'chevron-down': () => import('@iconify-icons/mingcute/down-line'),
reply: [
() => import('@iconify-icons/mingcute/share-forward-line'),
'180deg',
'horizontal',
],
thread: () => import('@iconify-icons/mingcute/route-line'),
group: () => import('@iconify-icons/mingcute/group-line'),
bot: () => import('@iconify-icons/mingcute/android-2-line'),
menu: () => import('@iconify-icons/mingcute/rows-4-line'),
list: () => import('@iconify-icons/mingcute/list-check-line'),
search: () => import('@iconify-icons/mingcute/search-2-line'),
hashtag: () => import('@iconify-icons/mingcute/hashtag-line'),
info: () => import('@iconify-icons/mingcute/information-line'),
shortcut: () => import('@iconify-icons/mingcute/lightning-line'),
user: () => import('@iconify-icons/mingcute/user-4-line'),
following: () => import('@iconify-icons/mingcute/walk-line'),
pin: () => import('@iconify-icons/mingcute/pin-line'),
bus: () => import('@iconify-icons/mingcute/bus-2-line'),
link: () => import('@iconify-icons/mingcute/link-2-line'),
history: () => import('@iconify-icons/mingcute/history-line'),
share: () => import('@iconify-icons/mingcute/share-2-line'),
sparkles: () => import('@iconify-icons/mingcute/sparkles-line'),
sparkles2: () => import('@iconify-icons/mingcute/sparkles-2-line'),
exit: () => import('@iconify-icons/mingcute/exit-line'),
translate: () => import('@iconify-icons/mingcute/translate-line'),
play: () => import('@iconify-icons/mingcute/play-fill'),
trash: () => import('@iconify-icons/mingcute/delete-2-line'),
mute: () => import('@iconify-icons/mingcute/volume-mute-line'),
unmute: () => import('@iconify-icons/mingcute/volume-line'),
block: () => import('@iconify-icons/mingcute/forbid-circle-line'),
unblock: [
() => import('@iconify-icons/mingcute/forbid-circle-line'),
'180deg',
],
flag: () => import('@iconify-icons/mingcute/flag-4-line'),
time: () => import('@iconify-icons/mingcute/time-line'),
refresh: () => import('@iconify-icons/mingcute/refresh-2-line'),
emoji2: () => import('@iconify-icons/mingcute/emoji-2-line'),
filter: () => import('@iconify-icons/mingcute/filter-2-line'),
chart: () => import('@iconify-icons/mingcute/chart-line-line'),
react: () => import('@iconify-icons/mingcute/react-line'),
layout4: () => import('@iconify-icons/mingcute/layout-4-line'),
layout5: () => import('@iconify-icons/mingcute/layout-5-line'),
announce: () => import('@iconify-icons/mingcute/announcement-line'),
alert: () => import('@iconify-icons/mingcute/alert-line'),
round: () => import('@iconify-icons/mingcute/round-fill'),
'arrow-up-circle': () =>
import('@iconify-icons/mingcute/arrow-up-circle-line'),
'arrow-down-circle': () =>
import('@iconify-icons/mingcute/arrow-down-circle-line'),
clipboard: () => import('@iconify-icons/mingcute/clipboard-line'),
'account-edit': () => import('@iconify-icons/mingcute/user-edit-line'),
'account-warning': () => import('@iconify-icons/mingcute/user-warning-line'),
keyboard: () => import('@iconify-icons/mingcute/keyboard-line'),
cloud: () => import('@iconify-icons/mingcute/cloud-line'),
month: () => import('@iconify-icons/mingcute/calendar-month-line'),
media: () => import('@iconify-icons/mingcute/photo-album-line'),
speak: () => import('@iconify-icons/mingcute/radar-line'),
building: () => import('@iconify-icons/mingcute/building-5-line'),
};
const ICONDATA = {};
const INVALID_ID_CHARS_REGEX = /[^a-zA-Z0-9]/g;
function Icon({
icon,
@ -118,52 +23,74 @@ function Icon({
class: className = '',
style = {},
}) {
title = title || alt;
const { loadIcon, isIconLoaded } = useIconSprite();
if (!icon) return null;
const iconSize = SIZES[size];
let iconBlock = ICONS[icon];
let rotate, flip;
if (Array.isArray(iconBlock)) {
[iconBlock, rotate, flip] = iconBlock;
if (!iconBlock) {
console.warn(`Icon ${icon} not found`);
return null;
}
const [iconData, setIconData] = useState(ICONDATA[icon]);
const currentIcon = useRef(icon);
let rotate,
flip,
rtl = false;
if (Array.isArray(iconBlock)) {
[iconBlock, rotate, flip] = iconBlock;
} else if (typeof iconBlock === 'object') {
({ rotate, flip, rtl } = iconBlock);
iconBlock = iconBlock.module;
}
const sanitizedTitle = title?.replace(INVALID_ID_CHARS_REGEX, '-');
const titleID = `${ICON_NAMESPACE}-title-${icon}-${sanitizedTitle}`;
useEffect(() => {
if (iconData && currentIcon.current === icon) return;
(async () => {
const iconB = await iconBlock();
setIconData(iconB.default);
ICONDATA[icon] = iconB.default;
})();
currentIcon.current = icon;
if (!isIconLoaded(icon)) {
loadIcon(icon);
}
}, [icon]);
const loaded = isIconLoaded(icon);
return (
<span
class={`icon ${className}`}
title={title || alt}
class={`icon ${className} ${rtl ? 'rtl-flip' : ''}`}
style={{
width: `${iconSize}px`,
height: `${iconSize}px`,
...style,
}}
data-icon={icon}
title={loaded ? undefined : title || undefined}
>
{iconData && (
{loaded && (
<svg
width={iconSize}
height={iconSize}
viewBox={`0 0 ${iconData.width} ${iconData.height}`}
dangerouslySetInnerHTML={{ __html: iconData.body }}
role={title ? 'img' : 'presentation'}
aria-labelledby={titleID}
style={{
transform: `${rotate ? `rotate(${rotate})` : ''} ${
flip ? `scaleX(-1)` : ''
}`,
}}
/>
>
{title ? <title id={titleID}>{title}</title> : null}
<use href={`#${ICON_NAMESPACE}-${icon}`} />
</svg>
)}
</span>
);
}
export default Icon;
export default memo(Icon, (prevProps, nextProps) => {
return (
prevProps.icon === nextProps.icon &&
prevProps.title === nextProps.title &&
prevProps.alt === nextProps.alt
);
});

Wyświetl plik

@ -0,0 +1,29 @@
import { useLayoutEffect, useRef, useState } from 'preact/hooks';
const IntersectionView = ({ children, root = null, fallback = null }) => {
const ref = useRef();
const [show, setShow] = useState(false);
useLayoutEffect(() => {
const observer = new IntersectionObserver(
(entries) => {
const entry = entries[0];
if (entry.isIntersecting) {
setShow(true);
observer.unobserve(ref.current);
}
},
{
root,
rootMargin: `${screen.height}px`,
},
);
if (ref.current) observer.observe(ref.current);
return () => {
if (ref.current) observer.unobserve(ref.current);
};
}, []);
return show ? children : <div ref={ref}>{fallback}</div>;
};
export default IntersectionView;

Wyświetl plik

@ -0,0 +1,36 @@
import { shouldPolyfill } from '@formatjs/intl-segmenter/should-polyfill';
import { Suspense } from 'preact/compat';
import { useEffect, useState } from 'preact/hooks';
import Loader from './loader';
const supportsIntlSegmenter = !shouldPolyfill();
// Preload IntlSegmenter
setTimeout(() => {
queueMicrotask(() => {
if (!supportsIntlSegmenter) {
import('@formatjs/intl-segmenter/polyfill-force').catch(() => {});
}
});
}, 1000);
export default function IntlSegmenterSuspense({ children }) {
if (supportsIntlSegmenter) {
return <Suspense fallback={<Loader />}>{children}</Suspense>;
}
const [polyfillLoaded, setPolyfillLoaded] = useState(false);
useEffect(() => {
(async () => {
await import('@formatjs/intl-segmenter/polyfill-force');
setPolyfillLoaded(true);
})();
}, []);
return polyfillLoaded ? (
<Suspense fallback={<Loader />}>{children}</Suspense>
) : (
<Loader />
);
}

Wyświetl plik

@ -30,12 +30,15 @@
transparent
);
text-shadow: 0 1px var(--bg-color);
box-shadow: 0 1px var(--drop-shadow-color),
0 1px 1px var(--drop-shadow-color), 0 1px 8px var(--drop-shadow-color),
box-shadow:
0 1px var(--drop-shadow-color),
0 1px 1px var(--drop-shadow-color),
0 1px 8px var(--drop-shadow-color),
inset 0 1px var(--bg-blur-color);
&:active {
box-shadow: 0 1px 4px var(--drop-shadow-color),
box-shadow:
0 1px 4px var(--drop-shadow-color),
inset 0 1px var(--bg-blur-color);
transform: translateY(1px);
filter: brightness(0.95);

Wyświetl plik

@ -1,5 +1,6 @@
import './keyboard-shortcuts-help.css';
import { Trans, useLingui } from '@lingui/react/macro';
import { memo } from 'preact/compat';
import { useHotkeys } from 'react-hotkeys-hook';
import { useSnapshot } from 'valtio';
@ -10,6 +11,7 @@ import Icon from './icon';
import Modal from './modal';
export default memo(function KeyboardShortcutsHelp() {
const { t } = useLingui();
const snapStates = useSnapshot(states);
function onClose() {
@ -17,167 +19,190 @@ export default memo(function KeyboardShortcutsHelp() {
}
useHotkeys(
'?, shift+?',
(e) => {
'?',
() => {
console.log('help');
states.showKeyboardShortcutsHelp = true;
},
{
useKey: true,
ignoreEventWhen: (e) => {
const hasModal = !!document.querySelector('#modal-container > *');
return hasModal;
const isCatchUpPage = /\/catchup/i.test(location.hash);
return isCatchUpPage || e.metaKey || e.ctrlKey || e.altKey;
// const hasModal = !!document.querySelector('#modal-container > *');
// return hasModal;
},
},
);
return (
!!snapStates.showKeyboardShortcutsHelp && (
<Modal class="light" onClose={onClose}>
<Modal onClose={onClose}>
<div id="keyboard-shortcuts-help-container" class="sheet" tabindex="-1">
<button type="button" class="sheet-close" onClick={onClose}>
<Icon icon="x" />
<Icon icon="x" alt={t`Close`} />
</button>
<header>
<h2>Keyboard shortcuts</h2>
<h2>
<Trans>Keyboard shortcuts</Trans>
</h2>
</header>
<main>
<table>
{[
{
action: 'Keyboard shortcuts help',
keys: <kbd>?</kbd>,
},
{
action: 'Next post',
keys: <kbd>j</kbd>,
},
{
action: 'Previous post',
keys: <kbd>k</kbd>,
},
{
action: 'Skip carousel to next post',
keys: (
<>
<kbd>Shift</kbd> + <kbd>j</kbd>
</>
),
},
{
action: 'Skip carousel to previous post',
keys: (
<>
<kbd>Shift</kbd> + <kbd>k</kbd>
</>
),
},
{
action: 'Open post details',
keys: (
<>
<kbd>Enter</kbd> or <kbd>o</kbd>
</>
),
},
{
action: (
<>
Expand content warning or
<br />
toggle expanded/collapsed thread
</>
),
keys: <kbd>x</kbd>,
},
{
action: 'Close post or dialogs',
keys: (
<>
<kbd>Esc</kbd> or <kbd>Backspace</kbd>
</>
),
},
{
action: 'Focus column in multi-column mode',
keys: (
<>
<kbd>1</kbd> to <kbd>9</kbd>
</>
),
},
{
action: 'Compose new post',
keys: <kbd>c</kbd>,
},
{
action: 'Compose new post (new window)',
className: 'insignificant',
keys: (
<>
<kbd>Shift</kbd> + <kbd>c</kbd>
</>
),
},
{
action: 'Send post',
keys: (
<>
<kbd>Ctrl</kbd> + <kbd>Enter</kbd> or <kbd></kbd> +{' '}
<kbd>Enter</kbd>
</>
),
},
{
action: 'Search',
keys: <kbd>/</kbd>,
},
{
action: 'Reply',
keys: <kbd>r</kbd>,
},
{
action: 'Reply (new window)',
className: 'insignificant',
keys: (
<>
<kbd>Shift</kbd> + <kbd>r</kbd>
</>
),
},
{
action: 'Like (favourite)',
keys: (
<>
<kbd>l</kbd> or <kbd>f</kbd>
</>
),
},
{
action: 'Boost',
keys: (
<>
<kbd>Shift</kbd> + <kbd>b</kbd>
</>
),
},
{
action: 'Bookmark',
keys: <kbd>d</kbd>,
},
{
action: 'Toggle Cloak mode',
keys: (
<>
<kbd>Shift</kbd> + <kbd>Alt</kbd> + <kbd>k</kbd>
</>
),
},
].map(({ action, className, keys }) => (
<tr key={action}>
<th class={className}>{action}</th>
<td>{keys}</td>
</tr>
))}
<tbody>
{[
{
action: t`Keyboard shortcuts help`,
keys: <kbd>?</kbd>,
},
{
action: t`Next post`,
keys: <kbd>j</kbd>,
},
{
action: t`Previous post`,
keys: <kbd>k</kbd>,
},
{
action: t`Skip carousel to next post`,
keys: (
<Trans>
<kbd>Shift</kbd> + <kbd>j</kbd>
</Trans>
),
},
{
action: t`Skip carousel to previous post`,
keys: (
<Trans>
<kbd>Shift</kbd> + <kbd>k</kbd>
</Trans>
),
},
{
action: t`Load new posts`,
keys: <kbd>.</kbd>,
},
{
action: t`Open post details`,
keys: (
<Trans>
<kbd>Enter</kbd> or <kbd>o</kbd>
</Trans>
),
},
{
action: (
<Trans>
Expand content warning or
<br />
toggle expanded/collapsed thread
</Trans>
),
keys: <kbd>x</kbd>,
},
{
action: t`Close post or dialogs`,
keys: (
<Trans>
<kbd>Esc</kbd> or <kbd>Backspace</kbd>
</Trans>
),
},
{
action: t`Focus column in multi-column mode`,
keys: (
<Trans>
<kbd>1</kbd> to <kbd>9</kbd>
</Trans>
),
},
{
action: t`Focus next column in multi-column mode`,
keys: <kbd>]</kbd>,
},
{
action: t`Focus previous column in multi-column mode`,
keys: <kbd>[</kbd>,
},
{
action: t`Compose new post`,
keys: <kbd>c</kbd>,
},
{
action: t`Compose new post (new window)`,
className: 'insignificant',
keys: (
<Trans>
<kbd>Shift</kbd> + <kbd>c</kbd>
</Trans>
),
},
{
action: t`Send post`,
keys: (
<Trans>
<kbd>Ctrl</kbd> + <kbd>Enter</kbd> or <kbd></kbd> +{' '}
<kbd>Enter</kbd>
</Trans>
),
},
{
action: t`Search`,
keys: <kbd>/</kbd>,
},
{
action: t`Reply`,
keys: <kbd>r</kbd>,
},
{
action: t`Reply (new window)`,
className: 'insignificant',
keys: (
<Trans>
<kbd>Shift</kbd> + <kbd>r</kbd>
</Trans>
),
},
{
action: t`Like (favourite)`,
keys: (
<Trans>
<kbd>l</kbd> or <kbd>f</kbd>
</Trans>
),
},
{
action: t`Boost`,
keys: (
<Trans>
<kbd>Shift</kbd> + <kbd>b</kbd>
</Trans>
),
},
{
action: t`Quote`,
keys: <kbd>q</kbd>,
},
{
action: t`Bookmark`,
keys: <kbd>d</kbd>,
},
{
action: t`Toggle Cloak mode`,
keys: (
<Trans>
<kbd>Shift</kbd> + <kbd>Alt</kbd> + <kbd>k</kbd>
</Trans>
),
},
].map(({ action, className, keys }) => (
<tr key={action}>
<th class={className}>{action}</th>
<td>{keys}</td>
</tr>
))}
</tbody>
</table>
</main>
</div>

Some files were not shown because too many files have changed in this diff Show More