diff --git a/.github/README.md b/.github/README.md index 1f227cd6..3db871d5 100644 --- a/.github/README.md +++ b/.github/README.md @@ -1,144 +1,27 @@ - - - Photon light theme cozy - +# Kelp - - - - +Kelp is the web frontend for [Coves](https://coves.social), a forum-like social platform built on the AT Protocol. -# Photon +Originally forked from [Photon](https://github.com/Xyphyn/photon) by Xylight (AGPL-3.0). -Photon is a web app for the fediverse with helpful features and a nice UX. +## Development -Jump to: - -- [Self-hosting](#self-hosting) -- [Public Instances](#public-instances) - -## Features - -- Modern, intuitive and useful interface with thoughtful UX -- Multi-account switching -- Supports Lemmy & Piefed -- Infinite scroll -- Multiple languages thanks to [the community](https://weblate.xylight.dev) -- Customizable -- Supports almost all available Lemmy features -- Svelte-based, for responsiveness -- 2.8x smaller JavaScript payload compared to lemmy-ui -- Optimized image loading where possible to save bandwidth - -## Self-hosting - -You self-host a Photon frontend server for your Lemmy instance, or independently for any instance. - -### Running from Docker image - -The images are at `ghcr.io/xyphyn/photon`. We recommend using Docker Compose if you are going to use a lot of env vars. - -> [!NOTE] -> If you encounter strange issues running the default images (using a Bun server), you can use the alternative Node server by appending `-node` to the image version. -> For example: `ghcr.io/xyphyn/photon:v2.0.0-node` - -To run an unconfigured Photon instance on port `8080`: - -```sh -docker run -p 8080:3000 ghcr.io/xyphyn/photon:latest -``` - -### Running natively - -Clone the repo: - -```sh -git clone https://github.com/xyphyn/photon && cd photon -``` - -Then to build and run: - -##### Bun server (faster) - -```sh -bun install -ADAPTER=bun bun run build - -# run the built server -bun build/index.js -``` - -##### Node server (slower but better support) - -```sh -npm install -ADAPTER=node npm run build - -node build/index.js +```bash +pnpm install +pnpm dev # Start dev server +pnpm build # Production build +pnpm check # TypeScript + Svelte type checking +pnpm lint # ESLint +pnpm test # Vitest ``` -### Configuration - -Photon lets you configure the default client settings and more. - -##### Common - -> [!NOTE] -> Configuration environment variables are prefixed with PUBLIC to allow clients to use them. No sensitive data can be leaked. - -If you're hosting Photon for a Lemmy instance, you'll almost definitely want to set these: - -- `PUBLIC_INSTANCE_URL` `string`: The domain which **the browser** will send API requests to. - - Example: `PUBLIC_INSTANCE_URL=fedi.phtn.app` - -- `PUBLIC_INSTANCE_TYPE` `lemmyv3 | piefedalpha` (default: `lemmyv3`): If your instance is running PieFed, you must set this option to `piefedalpha`. Otherwise, you don't need to do anything. - -- `PUBLIC_SSR_ENABLED` `boolean`: When enabled, will **make page requests be rendered server side first**, which allows search engine indexing, and basic non-js usage. - -- `PUBLIC_INTERNAL_INSTANCE` `string`: Only relevant if `PUBLIC_SSR_ENABLED=true`. This is the domain that the **server will make API requests to.** - -- `PUBLIC_MIGRATE_COOKIE` `boolean`: Useful if moving from lemmy-ui. This will automatically migrate the logins for the users, making them not have to login again. - -- `PUBLIC_THEME` `JSON`: If you'd like, you can export a theme from Photon and paste it here, which will become the default theme for users. - -##### Default Photon options - -Photon has extensive user configuration options, and you can set the defaults for them with the environment variables found at `src/lib/settings.ts`, by looking at the `defaultSettings` object. - -## Additional tips - -> [!TIP] -> It's recommended to set up some script to pull the latest Docker image version or update some other way. -> Photon is constantly updated with fixes and improvements, and using heavily outdated versions can tarnish the reputation! So please keep it mostly up to date :) - -> [!TIP] -> If you'd like to let users pick any instance they want, set the environment variable `PUBLIC_LOCK_TO_INSTANCE=false`. - -> [!TIP] -> Photon supports nearly everything lemmy-ui does, so you can use it as a drop-in replacement as the primary frontend. -> However, the instance must have already been set up. - -## FAQ - -- **Q**: I'm getting errors about header buffer size in NGINX! -- **A**. You can apply the fix in [this comment](https://github.com/Xyphyn/photon/issues/253#issuecomment-1960734537). You can also try using the Node server instead of the Bun server (instructions above) - -## Public Instances - -Want your instance added here? Make a GitHub issue or make a PR. (this is for general purpose Photon instances.) If your instance stays out of date for a while, it will be removed. - -[phtn.app](https://phtn.app) is the official instance and will get updates instantly. - -| Instance | Location | Contact | -| ------------------------------------------------------ | ------------ | --------------------------------------------------------- | -| [phtn.app (Official)](https://phtn.app) | 🇺🇸 US West | [photon@xylight.dev](mailto:photon@xylight.dev) | -| [ph.opnxng.com](https://ph.opnxng.com) | 🇸🇬 Singapore | [about.opnxng.com](https://about.opnxng.com) | -| [p.darrennathanael.com](https://p.darrennathanael.com) | 🇮🇩 ID West | [noc@darrennathanael.com](mailto:noc@darrennathanael.com) | -| [p.lemmy.ohaa.xyz](https://p.lemmy.ohaa.xyz) | 🇦🇹 Austria | (???) | -| [phtn.ngn.tf](https://phtn.ngn.tf) | 🇹🇷 Turkey | [ngn@ngn.tf](mailto:ngn@ngn.tf) | +## Configuration -## Donate +- `PUBLIC_INSTANCE_URL` `string`: The domain which the browser will send API requests to. +- `PUBLIC_SSR_ENABLED` `boolean`: Enable server-side rendering for SEO and non-JS usage. +- `PUBLIC_INTERNAL_INSTANCE` `string`: The domain the server uses for API requests (only relevant with SSR). +- `PUBLIC_THEME` `JSON`: A default theme for users, exported from the theme settings. -I've put my best effort into developing and maintaining this open source app. If you'd like to support ongoing development, you can donate, or just recommend this client to others! [Buy me a Coffee](https://buymeacoffee.com/xylight) +## License - +AGPL-3.0-only diff --git a/package.json b/package.json index b13dc66e..06db1687 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "photon-lemmy", + "name": "kelp-coves", "version": "2.2.2", "license": "AGPL-3.0-only", "devDependencies": { diff --git a/src/lib/api/coves/client.ts b/src/lib/api/coves/client.ts index 397dbd6b..5a8f10a5 100644 --- a/src/lib/api/coves/client.ts +++ b/src/lib/api/coves/client.ts @@ -42,7 +42,7 @@ export const NSID = { deleteComment: 'social.coves.community.comment.delete', createVote: 'social.coves.feed.vote.create', deleteVote: 'social.coves.feed.vote.delete', - getProfile: 'social.coves.actor.getprofile', + getProfile: 'social.coves.actor.getProfile', getActorPosts: 'social.coves.actor.getPosts', getActorComments: 'social.coves.actor.getComments', blockUser: 'social.coves.actor.blockUser', diff --git a/src/lib/app/i18n/ca.json b/src/lib/app/i18n/ca.json index 4eef88b1..32541afa 100644 --- a/src/lib/app/i18n/ca.json +++ b/src/lib/app/i18n/ca.json @@ -63,7 +63,7 @@ "moveDown": "Mou avall", "login": "Inicia sessió", "changeinstance": "Canvia d'instància", - "versionGate": "Aquesta versió de Photon suporta instàncies que funcionin amb {{version}} o superior." + "versionGate": "Aquesta versió de Kelp suporta instàncies que funcionin amb {{version}} o superior." }, "filter": { "location": { diff --git a/src/lib/app/i18n/de.json b/src/lib/app/i18n/de.json index 443a4bd5..b7c20ace 100644 --- a/src/lib/app/i18n/de.json +++ b/src/lib/app/i18n/de.json @@ -62,7 +62,7 @@ "moveDown": "Nach unten", "guest": "Gast", "addGuest": "Gast hinzufügen", - "versionGate": "Diese Version von Photon unterstützt Instanzen mit {{version}} oder höher." + "versionGate": "Diese Version von Kelp unterstützt Instanzen mit {{version}} oder höher." }, "filter": { "location": { @@ -688,7 +688,7 @@ "title": "Layout Breite begrenzen" }, "lang": { - "description": "Die verwendete Sprache für Photons UI.", + "description": "Die verwendete Sprache für Kelps UI.", "note": "Sprachen außer Englisch und Hebräisch wurden von der Community übersetzt und könnten unvollständig sein.", "de": "Deutsch", "fi": "Finnisch", @@ -704,7 +704,7 @@ }, "view": { "title": "Beitragsstil", - "legacy": "Der alte Photon-Look." + "legacy": "Der alte Kelp-Look." }, "sort": { "title": "Standard-Sortierung" @@ -717,9 +717,9 @@ "left": "Links", "right": "Rechts" }, - "title": "Photon", + "title": "Kelp", "theming": { - "description": "Photons Farben anpassen.", + "description": "Kelps Farben anpassen.", "link": "Gehe zu Themen" }, "displayName": { @@ -736,7 +736,7 @@ }, "font": { "title": "Schriftart", - "description": "Welche Schriftart Photon in der UI verwendet." + "description": "Welche Schriftart Kelp in der UI verwendet." }, "infiniteScroll": { "title": "Unendliches Scrollen" diff --git a/src/lib/app/i18n/en.json b/src/lib/app/i18n/en.json index 6a58d061..ce4b020a 100644 --- a/src/lib/app/i18n/en.json +++ b/src/lib/app/i18n/en.json @@ -575,7 +575,7 @@ "share.from": "Share from", "share.global": "Origin server", "share.local": "Your server", - "share.photon": "Photon link", + "share.photon": "Kelp link", "crosspost": "Crosspost", "delete": "Delete", "restore": "Restore" @@ -757,7 +757,7 @@ "settingsImport": "Successfully imported settings", "settingsImportWarning": "The imported settings don't seem valid. Are you sure you want to import this?", "userLoading": "Still loading your user data...", - "lemmyDonate": "Your account's server runs Lemmy, and the developers are requesting donations. They are able to develop Lemmy as an open source platform, free of tracking and ads, thanks to the generosity of its users.\n\nAnnually, they ask you to consider donating to support their work, and allow them to continue maintaining and improving Lemmy.\n\n[Donate](https://join-lemmy.org/donate)\n\n*Note: this is a donation to Lemmy, not Photon.*", + "lemmyDonate": "Your account's server runs Lemmy, and the developers are requesting donations. They are able to develop Lemmy as an open source platform, free of tracking and ads, thanks to the generosity of its users.\n\nAnnually, they ask you to consider donating to support their work, and allow them to continue maintaining and improving Lemmy.\n\n[Donate](https://join-lemmy.org/donate)\n\n*Note: this is a donation to Lemmy, not Kelp.*", "sessionExpired": "Your session has expired. Please log in again." }, "settings": { @@ -936,7 +936,7 @@ "title": "Account" }, "donate": { - "description": "Photon will always be free and open-source, and is continously developed and designed to be helpful. If you like Photon and want to finanically support its development, you can donate here." + "description": "Kelp will always be free and open-source, and is continuously developed and designed to be helpful. If you like Kelp and want to financially support its development, you can donate here." } }, "error": { @@ -969,7 +969,7 @@ "couldnt_find_community": "That community doesn't exist.", "not_an_admin": "You are not an admin of this server.", "rate_limit_error": "You are performing that action too fast.", - "unimplemented": "That function of your account's server software is not yet supported by Photon.", + "unimplemented": "That function of your account's server software is not yet supported by Kelp.", "unsupported": "That function is not supported by your account's server software.", "not_live_supported": "That server is not running supported software, or is offline.", "token_not_found": "That email verification link expired, or never existed.", diff --git a/src/lib/app/i18n/es.json b/src/lib/app/i18n/es.json index fcd99be6..15daf66a 100644 --- a/src/lib/app/i18n/es.json +++ b/src/lib/app/i18n/es.json @@ -59,7 +59,7 @@ "moveUp": "Mover hacia arriba", "moveDown": "Mover hacia abajo", "guest": "Invitado", - "versionGate": "Esta versión de Photon soporta instancias ejecutando {{version}} o posterior.", + "versionGate": "Esta versión de Kelp soporta instancias ejecutando {{version}} o posterior.", "addGuest": "Agregar invitado" }, "filter": { @@ -629,7 +629,7 @@ "app": { "theming": { "title": "Tema", - "description": "Personalizar los colores de Photon.", + "description": "Personalizar los colores de Kelp.", "link": "Ir a temas" }, "colorscheme": { @@ -655,14 +655,14 @@ "title": "Usar disposición de derecha a izquierda", "description": "Usar disposición de derecha a izquierda para los idiomas que se leen de derecha a izquierda." }, - "description": "El idioma utilizado por la interfaz Photon.", + "description": "El idioma utilizado por la interfaz Kelp.", "note": "Los textos de los idiomas (aparte del inglés y el hebreo) son traducidos por la comunidad, y pueden estar incompletos." }, "view": { "title": "Estilo de las publicaciones", "cozy": "Mostrar las publicaciones con imágenes grandes, contenido embebido y área de contenido más extensa.", "compact": "Mostrar las pubicaciones en una lista, sin su contenido y espaciado más ajustado.", - "legacy": "La vieja apariencia de Photon.", + "legacy": "La vieja apariencia de Kelp.", "list": "Muestra las publicaciones en una lista, con su contenido y multimedia en tamaño compacto." }, "sort": { @@ -705,7 +705,7 @@ }, "font": { "title": "Fuente tipográfica", - "description": "La fuente tipográfica que Photon utiliza para su interfaz." + "description": "La fuente tipográfica que Kelp utiliza para su interfaz." }, "translation": { "title": "Traducción", diff --git a/src/lib/app/i18n/et.json b/src/lib/app/i18n/et.json index 028cc9be..18a780ed 100644 --- a/src/lib/app/i18n/et.json +++ b/src/lib/app/i18n/et.json @@ -55,7 +55,7 @@ "resetColor": "Restarti värv", "moveUp": "Liigu ülesse", "moveDown": "Liigu alla", - "versionGate": "See versioon Photonist Toetab servereid millel on {{version}} Või üles.", + "versionGate": "See versioon Kelpist Toetab servereid millel on {{version}} Või üles.", "guest": "Külaline", "addGuest": "Pane külalise kontot" }, diff --git a/src/lib/app/i18n/fi.json b/src/lib/app/i18n/fi.json index 1c4ed3a0..96103a96 100644 --- a/src/lib/app/i18n/fi.json +++ b/src/lib/app/i18n/fi.json @@ -436,7 +436,7 @@ "moveUp": "Siirrä ylös", "moveDown": "Siirrä alas", "guest": "Vieras", - "versionGate": "Tämä Photon-versio tukee instansseja versiosta {{version}} eteenpäin." + "versionGate": "Tämä Kelp-versio tukee instansseja versiosta {{version}} eteenpäin." }, "filter": { "sort": { @@ -723,7 +723,7 @@ "settingsImport": "Asetusten tuonti onnistui.", "settingsImportWarning": "Tuodut asetukset eivät vaikuta kelvollisilta. Haluatko yrittää siitä huolimatta?", "userLoading": "Ladataan käyttäjätietoja...", - "lemmyDonate": "Instanssisi käyttää avoimen lähdekoodin Lemmy-ohjelmistoa. Lemmyn kehittäjät ottavat vastaan lahjoituksia. Kiitos käyttäjien tuen, Lemmy on vapaa mainoksista ja jäljityksestä.\n\nVuosittain he pyytävät harkitsemaan lahjoitusta, jotta Lemmyn ylläpito ja parantaminen jatkuisi.\n\n[Lahjoita](https://join-lemmy.org/donate)\n\n*Huomaa: tämä on lahjoitus Lemmylle, ei Photonille.*" + "lemmyDonate": "Instanssisi käyttää avoimen lähdekoodin Lemmy-ohjelmistoa. Lemmyn kehittäjät ottavat vastaan lahjoituksia. Kiitos käyttäjien tuen, Lemmy on vapaa mainoksista ja jäljityksestä.\n\nVuosittain he pyytävät harkitsemaan lahjoitusta, jotta Lemmyn ylläpito ja parantaminen jatkuisi.\n\n[Lahjoita](https://join-lemmy.org/donate)\n\n*Huomaa: tämä on lahjoitus Lemmylle, ei Kelpille.*" }, "settings": { "app": { @@ -733,7 +733,7 @@ }, "view": { "title": "Näkymän tyyli", - "legacy": "Photonin vanha ulkoasu.", + "legacy": "Kelpin vanha ulkoasu.", "cozy": "Näytä kuvat, sisältö ja upotukset suurina.", "compact": "Näytä julkaisut tiiviinä listana, ilman sisältöä.", "list": "Näytä julkaisut listana, lyhennetyn sisällön kanssa." diff --git a/src/lib/app/i18n/fr.json b/src/lib/app/i18n/fr.json index a330d4a6..d7575e7b 100644 --- a/src/lib/app/i18n/fr.json +++ b/src/lib/app/i18n/fr.json @@ -60,7 +60,7 @@ "moveUp": "Monter", "moveDown": "Descendre", "guest": "invité", - "versionGate": "Cette version de Photon prend en charge des instances en version {{version}} ou supérieure.", + "versionGate": "Cette version de Kelp prend en charge des instances en version {{version}} ou supérieure.", "resetColor": "Réinitialiser les couleurs" }, "filter": { @@ -503,7 +503,7 @@ }, "view": { "cozy": "Afficher les publications avec de grandes images, des embeds riches, et des corps de publication plus longues.", - "legacy": "Le vieux look de Photon, similaire en aspect au theme \"confortable\".", + "legacy": "Le vieux look de Kelp, similaire en aspect au theme \"confortable\".", "title": "Style de publication", "list": "Afficher les publications dans une liste, avec le corps des publications et les medias compact.", "compact": "Afficher les publications dans une liste, sans corps de publications et moins d'espacement." @@ -512,7 +512,7 @@ "description": "Le tri a utiliser par defaut pour la page d'acceuil.", "title": "Tri par défaut" }, - "title": "Photon", + "title": "Kelp", "colorscheme": { "title": "Couleurs", "description": "La palette de couleurs à utiliser." @@ -541,7 +541,7 @@ }, "font": { "title": "Police de caractères", - "description": "Police de caractère utilisée par Photon dans l'interface." + "description": "Police de caractère utilisée par Kelp dans l'interface." }, "translation": { "title": "Traduction", diff --git a/src/lib/app/i18n/he.json b/src/lib/app/i18n/he.json index 90756cbd..baab0a28 100644 --- a/src/lib/app/i18n/he.json +++ b/src/lib/app/i18n/he.json @@ -465,7 +465,7 @@ "moveUp": "הזזה למעלה", "moveDown": "הזזה למטה", "guest": "אורח", - "versionGate": "הגרסה הזו של Photon תומכת בשרתים המריצים {{version}} או גרסה עדכנית יותר." + "versionGate": "הגרסה הזו של Kelp תומכת בשרתים המריצים {{version}} או גרסה עדכנית יותר." }, "cards": { "site": { diff --git a/src/lib/app/i18n/hu.json b/src/lib/app/i18n/hu.json index 17bb431e..4ad1a6a1 100644 --- a/src/lib/app/i18n/hu.json +++ b/src/lib/app/i18n/hu.json @@ -473,7 +473,7 @@ "lang": { "note": "Az angol és héber nyelveken kívüli nyelveket a közösség fordította, és hiányosak lehetnek.", "title": "Nyelv", - "description": "A Photon felhasználói felületének nyelve.", + "description": "A Kelp felhasználói felületének nyelve.", "en-US": "Angol", "zh-Hans": "Kínai (egyszerűsített)", "zh-Hant": "Kínai (hagyományos)", @@ -489,7 +489,7 @@ "zh": "Kínai" }, "theming": { - "description": "A Photon színeinek személyreszabása.", + "description": "A Kelp színeinek személyreszabása.", "link": "Ugrás a témákhoz", "title": "Témák" }, @@ -497,7 +497,7 @@ "title": "Színséma", "description": "A használandó színséma." }, - "title": "Photon", + "title": "Kelp", "view": { "title": "Bejegyzések stílusa", "cozy": "Nagyméretű képek, bő beágyazások, és hosszabb poszttestek.", diff --git a/src/lib/app/i18n/ja.json b/src/lib/app/i18n/ja.json index c47f06f6..eb647558 100644 --- a/src/lib/app/i18n/ja.json +++ b/src/lib/app/i18n/ja.json @@ -29,7 +29,7 @@ "title": "右横読みレイアウトを使う(RTL)" }, "title": "言語", - "description": "PhotonのUIが使う言語。", + "description": "KelpのUIが使う言語。", "en": "英語", "en-US": "英語(US)", "he": "ヘブライ語", @@ -53,16 +53,16 @@ "title": "投稿スタイル", "list": "投稿を本文と縮小したメディアにリストで表示する。", "cozy": "投稿を拡大イメージ、エンベッド文字、長い本文を表示する。", - "legacy": "Photonの昔の雰囲気。" + "legacy": "Kelpの昔の雰囲気。" }, "limitLayoutWidth": { "description": "読みやすいように主要内容の幅を制限する。", "title": "レイアウトの幅を制限する" }, - "title": "Photon", + "title": "Kelp", "theming": { "title": "テーマ設定", - "description": "Photonの色合いを変える。", + "description": "Kelpの色合いを変える。", "link": "テーマに行く" }, "colorscheme": { @@ -101,7 +101,7 @@ }, "font": { "title": "フォント", - "description": "PhotonのUIが使用する書体。" + "description": "KelpのUIが使用する書体。" }, "translation": { "title": "翻訳", @@ -355,7 +355,7 @@ "guest": "ゲスト", "addGuest": "ゲストを作成", "changeinstance": "インスタンスを変える", - "versionGate": "このPhotonバージョンは{{version}}以上のインスタンスバージョンに対応しています。" + "versionGate": "このKelpバージョンは{{version}}以上のインスタンスバージョンに対応しています。" }, "filter": { "location": { diff --git a/src/lib/app/i18n/nl.json b/src/lib/app/i18n/nl.json index c3615ea1..a23b1092 100644 --- a/src/lib/app/i18n/nl.json +++ b/src/lib/app/i18n/nl.json @@ -419,10 +419,10 @@ "import": "Importeren", "reset": "Resetten", "app": { - "title": "Photon", + "title": "Kelp", "theming": { "title": "Thema's", - "description": "Pas de kleuren van Photon aan.", + "description": "Pas de kleuren van Kelp aan.", "link": "Ga naar thema's" }, "colorscheme": { @@ -431,7 +431,7 @@ }, "lang": { "title": "Taal", - "description": "De taal die wordt gebruikt voor de gebruikersinterface van Photon.", + "description": "De taal die wordt gebruikt voor de gebruikersinterface van Kelp.", "note": "Talen anders dan Engels en Hebreeuws zijn door de gemeenschap vertaald en kunnen incompleet zijn.", "en": "Engels", "en-US": "Engels", @@ -456,7 +456,7 @@ "list": "Toon berichten in een lijst, met berichtinhoud en compacte media.", "cozy": "Toon berichten met grote afbeeldingen, rijke embeds en langere berichtinhoud.", "compact": "Toon berichten in een lijst, zonder berichtinhoud en met strakkere spacing.", - "legacy": "De oude look van Photon." + "legacy": "De oude look van Kelp." }, "sort": { "title": "Standaard sortering", @@ -498,7 +498,7 @@ }, "font": { "title": "Lettertype", - "description": "Welk lettertype Photon gebruikt in de gebruikersinterface." + "description": "Welk lettertype Kelp gebruikt in de gebruikersinterface." }, "translation": { "title": "Vertaling", @@ -605,7 +605,7 @@ "moveUp": "Omhoog verplaatsen", "moveDown": "Omlaag verplaatsen", "guest": "Gast", - "versionGate": "Deze versie van Photon ondersteunt instanties die draaien op {{version}} of hoger." + "versionGate": "Deze versie van Kelp ondersteunt instanties die draaien op {{version}} of hoger." }, "filter": { "location": { diff --git a/src/lib/app/i18n/pl.json b/src/lib/app/i18n/pl.json index 2d84272c..0aa49178 100644 --- a/src/lib/app/i18n/pl.json +++ b/src/lib/app/i18n/pl.json @@ -480,7 +480,7 @@ "moveUp": "Przesuń w górę", "moveDown": "Przesuń w dół", "guest": "Gość", - "versionGate": "Ta wersja Photon obsługuje instancje działające na {{version}} lub nowszej." + "versionGate": "Ta wersja Kelp obsługuje instancje działające na {{version}} lub nowszej." }, "filter": { "location": { @@ -732,7 +732,7 @@ "description": "Użyj układu RTL dla języków RTL." } }, - "title": "Photon", + "title": "Kelp", "theming": { "title": "Motywy", "description": "Dostosuj kolory interfejsu.", @@ -747,7 +747,7 @@ "list": "Pokaż posty w liście, z treścią postów i kompaktowymi multimediami.", "cozy": "Pokaż posty z dużymi obrazami, bogatymi osadzonymi treściami i dłuższymi treściami postów.", "compact": "Pokaż posty w liście, bez treści postów i z ciasnym odstępem.", - "legacy": "Stary wygląd Photon." + "legacy": "Stary wygląd Kelp." }, "sort": { "title": "Domyślne sortowanie", diff --git a/src/lib/app/i18n/pt-BR.json b/src/lib/app/i18n/pt-BR.json index 0219a0fd..83c9086a 100644 --- a/src/lib/app/i18n/pt-BR.json +++ b/src/lib/app/i18n/pt-BR.json @@ -62,7 +62,7 @@ "guest": "Convidado", "moveDown": "Mover para baixo", "logout": "Terminar Sessão", - "versionGate": "Esta versão do Photon suporta instâncias rodando a versão {{version}} ou acima." + "versionGate": "Esta versão do Kelp suporta instâncias rodando a versão {{version}} ou acima." }, "filter": { "location": { diff --git a/src/lib/app/i18n/pt.json b/src/lib/app/i18n/pt.json index 2d158bdc..63390356 100644 --- a/src/lib/app/i18n/pt.json +++ b/src/lib/app/i18n/pt.json @@ -50,7 +50,7 @@ "account": { "login": "Iniciar sessão", "moveDown": "Mover para baixo", - "versionGate": "Esta versão do Photon suporta instâncias na versão {{version}} ou superior.", + "versionGate": "Esta versão do Kelp suporta instâncias na versão {{version}} ou superior.", "logout": "Terminar sessão", "signup": "Registar", "accounts": "Contas", @@ -634,7 +634,7 @@ "instance": "Domínio" }, "lang": { - "description": "O idioma a usar na interface do Photon.", + "description": "O idioma a usar na interface do Kelp.", "note": "Os idiomas além do Inglês e do Hebraico são traduzidos pela comunidade, e podem estar incompletos.", "en": "Inglês", "en-US": "Inglês", @@ -664,7 +664,7 @@ "list": "Mostrar publicações numa lista, com texto e imagens compactos.", "cozy": "Mostrar publicações com imagens grandes, pré-visualizações ricas e mais texto.", "compact": "Mostrar publicações numa lista, sem texto e com espaçamento mais apertado.", - "legacy": "O estilo antigo do Photon." + "legacy": "O estilo antigo do Kelp." }, "sort": { "title": "Ordem padrão", @@ -682,10 +682,10 @@ "title": "Limitar largura do conteúdo", "description": "Facilitar leitura limitando a largura do conteúdo principal." }, - "title": "Photon", + "title": "Kelp", "theming": { "title": "Temas", - "description": "Personaliza as cores do Photon.", + "description": "Personaliza as cores do Kelp.", "link": "Ver os temas" }, "duplicateTitles": { @@ -700,7 +700,7 @@ }, "font": { "title": "Tipo de letra", - "description": "Que tipo de letra o Photon usa na sua interface." + "description": "Que tipo de letra o Kelp usa na sua interface." }, "colorscheme": { "title": "Esquema de cores", diff --git a/src/lib/app/i18n/ru.json b/src/lib/app/i18n/ru.json index 8568167c..36a378f4 100644 --- a/src/lib/app/i18n/ru.json +++ b/src/lib/app/i18n/ru.json @@ -62,7 +62,7 @@ "moveUp": "Переместить вверх", "guest": "Гость", "moveDown": "Переместить вниз", - "versionGate": "Эта версия Photon поддерживает инстансы с версией {{version}} или выше." + "versionGate": "Эта версия Kelp поддерживает инстансы с версией {{version}} или выше." }, "filter": { "location": { @@ -673,7 +673,7 @@ "failFindUser": "Пользователь не найден.", "saveSettings": "Настройки пользователя сохранены. Если вы сменили электронную почту, была отправлена ссылка подтверждения.", "settingsImportWarning": "Импортированные настройки не похожи на действительные. Вы действительно хотите их импортировать?", - "lemmyDonate": "На вашем аккаунте запущен Lemmy, и разработчики просят вас о пожертвованиях. Благодаря щедрости пользователей они могут развивать Lemmy как платформу с открытым программным кодом, свободную от отслеживания и рекламы.\n\nЕжегодно они просят вас рассмотреть возможность сделать пожертвование, чтобы поддерживать их работу и позволить им продолжать улучшать Lemmy.\n\n[Пожертвовать](https://join-lemmy.org/donate)\n\n*Примечание: эта ссылка предназначена для поддержки Lemmy, а не Photon.*" + "lemmyDonate": "На вашем аккаунте запущен Lemmy, и разработчики просят вас о пожертвованиях. Благодаря щедрости пользователей они могут развивать Lemmy как платформу с открытым программным кодом, свободную от отслеживания и рекламы.\n\nЕжегодно они просят вас рассмотреть возможность сделать пожертвование, чтобы поддерживать их работу и позволить им продолжать улучшать Lemmy.\n\n[Пожертвовать](https://join-lemmy.org/donate)\n\n*Примечание: эта ссылка предназначена для поддержки Lemmy, а не Kelp.*" }, "error": { "incorrect_login_10": "Подумай. Те бедолаги на админах инстанса поддерживают свой сервер только чтобы ты продолжал делать эти запросы.", @@ -738,7 +738,7 @@ "view": { "cozy": "Показывать посты с большими изображениями, подробными описаниями и содержимым.", "compact": "Показывать посты в списке, с без содержимого и с меньшими отступами.", - "legacy": "Старый взгляд на Photon.", + "legacy": "Старый взгляд на Kelp.", "title": "Стиль постов", "list": "Показывать посты в списке, с содержимым и компактным медиа." }, diff --git a/src/lib/app/i18n/tok.json b/src/lib/app/i18n/tok.json index 8dd87a6b..3705c8a7 100644 --- a/src/lib/app/i18n/tok.json +++ b/src/lib/app/i18n/tok.json @@ -386,7 +386,7 @@ "resetColor": "o weka e kule", "guest": "sijelo ilo sin", "addGuest": "o pali e sijelo ilo sin", - "versionGate": "ilo Photon ken jo e tomo pi nanpa {{version}} anu sewi" + "versionGate": "ilo Kelp ken jo e tomo pi nanpa {{version}} anu sewi" }, "cards": { "site": { @@ -551,6 +551,6 @@ "body": "sina wile toki e seme?" }, "toast": { - "lemmyDonate": "tomo sina kepeken e ilo Lemmy. jan pali ona wile e mani tan jan. jan mute pana la ona ken pali e ilo Lemmy li weka e toki mani jaki tan ni.\n\ntenpo sike ale la ona wile e mani tan sina.\n\n[o pana e mani](https://join-lemmy.org/donate)\n\n*a: sina pana e mani tawa Lemmy. sina ala pana e mani tawa Photon.*" + "lemmyDonate": "tomo sina kepeken e ilo Lemmy. jan pali ona wile e mani tan jan. jan mute pana la ona ken pali e ilo Lemmy li weka e toki mani jaki tan ni.\n\ntenpo sike ale la ona wile e mani tan sina.\n\n[o pana e mani](https://join-lemmy.org/donate)\n\n*a: sina pana e mani tawa Lemmy. sina ala pana e mani tawa Kelp.*" } } diff --git a/src/lib/app/i18n/tr.json b/src/lib/app/i18n/tr.json index 6b9bcfb0..0fc92769 100644 --- a/src/lib/app/i18n/tr.json +++ b/src/lib/app/i18n/tr.json @@ -61,7 +61,7 @@ "moveUp": "Yukarı Taşı", "moveDown": "Aşağı Taşı", "guest": "Misafir", - "versionGate": "Photon'un bu sürümü {{version}} veya daha üstü versiyonda çalışan sunucuları destekler." + "versionGate": "Kelp'un bu sürümü {{version}} veya daha üstü versiyonda çalışan sunucuları destekler." }, "filter": { "location": { @@ -674,14 +674,14 @@ }, "commands": { "title": "Komut paleti", - "description": "Arama yaparak uygulamada gezinmek için eğik çizgiye basın veya Photon logosuna sağ tıklayın." + "description": "Arama yaparak uygulamada gezinmek için eğik çizgiye basın veya Kelp logosuna sağ tıklayın." } }, "app": { - "title": "Photon", + "title": "Kelp", "theming": { "title": "Tema", - "description": "Photon'un renklerini özelleştirin.", + "description": "Kelp'un renklerini özelleştirin.", "link": "Temalara git" }, "colorscheme": { @@ -690,7 +690,7 @@ }, "lang": { "title": "Dil", - "description": "Photon'un kullanıcı arayüzü için kullanılan dil.", + "description": "Kelp'un kullanıcı arayüzü için kullanılan dil.", "note": "İngilizce ve İbranice dışındaki diller topluluk çevirisidir ve eksik olabilir.", "en": "İngilizce", "en-US": "İngilizce", @@ -716,7 +716,7 @@ "list": "Gönderileri, gönderi gövdeleri ve kompakt medyayla birlikte bir listede gösterin.", "cozy": "Büyük görsellere, zengin yerleştirmelere ve daha uzun gönderi gövdelerine sahip gönderileri gösterin.", "compact": "Gönderileri, gönderi gövdeleri olmadan ve daha dar aralıklarla bir listede gösterin.", - "legacy": "Photon'un eski görünümü." + "legacy": "Kelp'un eski görünümü." }, "sort": { "title": "Varsayılan sıralama", @@ -758,7 +758,7 @@ }, "font": { "title": "Yazı tipi", - "description": "Photon'un kullanıcı arayüzünde kullandığı yazı tipi." + "description": "Kelp'un kullanıcı arayüzünde kullandığı yazı tipi." }, "translation": { "title": "Çeviri", diff --git a/src/lib/app/i18n/zh-Hans.json b/src/lib/app/i18n/zh-Hans.json index 22522e58..1cfc2c5e 100644 --- a/src/lib/app/i18n/zh-Hans.json +++ b/src/lib/app/i18n/zh-Hans.json @@ -386,7 +386,7 @@ "moveUp": "上移", "moveDown": "下移", "guest": "游客", - "versionGate": "当前版本的 Photon 支持 {{version}} 或更高版本的实例。" + "versionGate": "当前版本的 Kelp 支持 {{version}} 或更高版本的实例。" }, "filter": { "location": { @@ -578,7 +578,7 @@ "title": "使用RTL布局", "description": "对RTL语言使用RTL布局。" }, - "description": "Photon的用户界面所使用的语言。", + "description": "Kelp的用户界面所使用的语言。", "note": "英语和希伯来语以外的语言均由社区翻译,可能不完整。", "en": "英语", "en-US": "英语(美国)", @@ -599,7 +599,7 @@ "list": "按列表展示帖子,显示帖子内容和紧凑格式的媒体。", "cozy": "显示大图像、富文本嵌入内容与长帖子正文。", "compact": "按列表显示帖子,不显示帖子正文,间隔更紧凑。", - "legacy": "旧版 Photon 外观。", + "legacy": "旧版 Kelp 外观。", "title": "帖子风格" }, "infiniteScroll": { @@ -618,7 +618,7 @@ }, "font": { "title": "字体", - "description": "Photon 在用户界面中使用什么字体。" + "description": "Kelp 在用户界面中使用什么字体。" }, "translation": { "title": "翻译", @@ -633,10 +633,10 @@ "description": "通过限制主要内容的宽度来提高可读性。", "title": "限制布局宽度" }, - "title": "Photon", + "title": "Kelp", "theming": { "title": "主题", - "description": "自定义 Photon 的颜色。", + "description": "自定义 Kelp 的颜色。", "link": "转到主题" }, "colorscheme": { @@ -729,7 +729,7 @@ "title": "导航", "commands": { "title": "指令面板", - "description": "按下斜杠键或右键单击Photon标志,即可通过搜索在应用各部分间跳转。" + "description": "按下斜杠键或右键单击Kelp标志,即可通过搜索在应用各部分间跳转。" } }, "embeds": { diff --git a/src/lib/app/markdown/renderers/MdLink.svelte b/src/lib/app/markdown/renderers/MdLink.svelte index aa6563ff..0247c882 100644 --- a/src/lib/app/markdown/renderers/MdLink.svelte +++ b/src/lib/app/markdown/renderers/MdLink.svelte @@ -1,6 +1,6 @@ diff --git a/src/lib/app/markdown/renderers/plugins.js b/src/lib/app/markdown/renderers/plugins.js index a83bacf7..4dfddab7 100644 --- a/src/lib/app/markdown/renderers/plugins.js +++ b/src/lib/app/markdown/renderers/plugins.js @@ -104,7 +104,7 @@ export { regexes as CONTENT_REGEXES } /** * Convert links to local app links */ -export const photonify = (link) => { +export const localizeLink = (link) => { if (regexes.community.test(link)) { const match = link.match(regexes.community) if (!match) return diff --git a/src/lib/app/markdown/renderers/plugins.test.ts b/src/lib/app/markdown/renderers/plugins.test.ts index 67654f94..ab35b410 100644 --- a/src/lib/app/markdown/renderers/plugins.test.ts +++ b/src/lib/app/markdown/renderers/plugins.test.ts @@ -1,113 +1,113 @@ import { describe, it, expect } from 'vitest' -import { photonify, CONTENT_REGEXES } from './plugins' +import { localizeLink, CONTENT_REGEXES } from './plugins' // --------------------------------------------------------------------------- -// photonify() - user links +// localizeLink() - user links // --------------------------------------------------------------------------- -describe('photonify - user links', () => { +describe('localizeLink - user links', () => { it('rewrites user link with @ to /profile/ path (no instance appended)', () => { - const result = photonify('https://lemmy.world/u/alice@instance.com') + const result = localizeLink('https://lemmy.world/u/alice@instance.com') expect(result).toBe('/profile/alice@instance.com') }) it('rewrites user link without @ to /profile/ path with instance appended', () => { - const result = photonify('https://lemmy.world/u/alice') + const result = localizeLink('https://lemmy.world/u/alice') expect(result).toBe('/profile/alice@lemmy.world') }) it('handles user link with dots in username', () => { - const result = photonify('https://example.com/u/user.name') + const result = localizeLink('https://example.com/u/user.name') expect(result).toBe('/profile/user.name@example.com') }) it('handles user link with underscores in username', () => { - const result = photonify('https://example.com/u/my_user') + const result = localizeLink('https://example.com/u/my_user') expect(result).toBe('/profile/my_user@example.com') }) }) // --------------------------------------------------------------------------- -// photonify() - implicit user links (mailto) +// localizeLink() - implicit user links (mailto) // --------------------------------------------------------------------------- -describe('photonify - implicit user links (mailto)', () => { +describe('localizeLink - implicit user links (mailto)', () => { it('rewrites mailto link to /profile/ path', () => { - const result = photonify('mailto:alice@coves.social') + const result = localizeLink('mailto:alice@coves.social') expect(result).toBe('/profile/alice@coves.social') }) it('rewrites mailto link with subdomain instance', () => { - const result = photonify('mailto:bob@lemmy.world') + const result = localizeLink('mailto:bob@lemmy.world') expect(result).toBe('/profile/bob@lemmy.world') }) it('handles username with dots and hyphens', () => { - const result = photonify('mailto:first.last@example.org') + const result = localizeLink('mailto:first.last@example.org') expect(result).toBe('/profile/first.last@example.org') }) }) // --------------------------------------------------------------------------- -// photonify() - community links +// localizeLink() - community links // --------------------------------------------------------------------------- -describe('photonify - community links', () => { +describe('localizeLink - community links', () => { it('rewrites community link without @ to /c/ path with instance appended', () => { - const result = photonify('https://lemmy.world/c/technology') + const result = localizeLink('https://lemmy.world/c/technology') expect(result).toBe('/c/technology@lemmy.world') }) it('rewrites community link with @ to /c/ path (no instance appended)', () => { - const result = photonify('https://lemmy.world/c/tech@other.instance') + const result = localizeLink('https://lemmy.world/c/tech@other.instance') expect(result).toBe('/c/tech@other.instance') }) }) // --------------------------------------------------------------------------- -// photonify() - post links +// localizeLink() - post links // --------------------------------------------------------------------------- -describe('photonify - post links', () => { +describe('localizeLink - post links', () => { it('rewrites post link to /post/{instance}/{id} path', () => { - const result = photonify('https://lemmy.world/post/12345') + const result = localizeLink('https://lemmy.world/post/12345') expect(result).toBe('/post/lemmy.world/12345') }) }) // --------------------------------------------------------------------------- -// photonify() - comment links +// localizeLink() - comment links // --------------------------------------------------------------------------- -describe('photonify - comment links', () => { +describe('localizeLink - comment links', () => { it('rewrites comment link to /comment/{instance}/{id} path', () => { - const result = photonify('https://lemmy.world/comment/6789') + const result = localizeLink('https://lemmy.world/comment/6789') expect(result).toBe('/comment/lemmy.world/6789') }) }) // --------------------------------------------------------------------------- -// photonify() - non-matching links +// localizeLink() - non-matching links // --------------------------------------------------------------------------- -describe('photonify - non-matching links', () => { +describe('localizeLink - non-matching links', () => { it('returns undefined for a generic URL', () => { - const result = photonify('https://example.com/some/page') + const result = localizeLink('https://example.com/some/page') expect(result).toBeUndefined() }) it('returns undefined for an empty string', () => { - const result = photonify('') + const result = localizeLink('') expect(result).toBeUndefined() }) it('returns undefined for a plain text string', () => { - const result = photonify('not a url') + const result = localizeLink('not a url') expect(result).toBeUndefined() }) it('returns undefined for a URL with unsupported path', () => { - const result = photonify('https://lemmy.world/settings') + const result = localizeLink('https://lemmy.world/settings') expect(result).toBeUndefined() }) }) diff --git a/src/lib/app/theme/presets.ts b/src/lib/app/theme/presets.ts index 74c51e82..b649992c 100644 --- a/src/lib/app/theme/presets.ts +++ b/src/lib/app/theme/presets.ts @@ -1,7 +1,7 @@ import { env } from '$env/dynamic/public' import type { Theme, ThemeColors } from './theme.svelte' -const PHOTON_DEFAULT = { +const KELP_DEFAULT = { slate: { 25: '252 253 254', 50: '248 250 252', @@ -41,7 +41,7 @@ const PHOTON_DEFAULT = { } export function getDefaultColors(): ThemeColors { - return env.PUBLIC_THEME ? JSON.parse(env.PUBLIC_THEME) : PHOTON_DEFAULT + return env.PUBLIC_THEME ? JSON.parse(env.PUBLIC_THEME) : KELP_DEFAULT } export function getDefaultTheme(): Theme { @@ -55,7 +55,7 @@ export function getDefaultTheme(): Theme { export const presets: Theme[] = [ getDefaultTheme(), ...(env.PUBLIC_THEME - ? [{ colors: PHOTON_DEFAULT, id: -10, name: 'Mono' }] + ? [{ colors: KELP_DEFAULT, id: -10, name: 'Mono' }] : []), { colors: { diff --git a/src/lib/feature/user/UserLink.svelte b/src/lib/feature/user/UserLink.svelte index f0593e8b..8cf0b670 100644 --- a/src/lib/feature/user/UserLink.svelte +++ b/src/lib/feature/user/UserLink.svelte @@ -26,15 +26,15 @@ ): | { classes: string - icon: 'photon' | IconSource + icon: 'kelp' | IconSource iconClass?: string } | false => { - if (badges.photon && badges.photon?.includes?.(did)) { + if (badges.kelp && badges.kelp?.includes?.(did)) { return { classes: 'bg-linear-to-r bg-clip-text text-transparent from-pink-500 to-fuchsia-500 dark:from-pink-400 dark:to-purple-400', - icon: 'photon', + icon: 'kelp', } } @@ -119,7 +119,7 @@ {#if badges} {#if envBadge} - {#if envBadge.icon == 'photon'} + {#if envBadge.icon == 'kelp'} {:else} diff --git a/src/lib/ui/sidebar/Sidebar.svelte b/src/lib/ui/sidebar/Sidebar.svelte index f810f183..216c174c 100644 --- a/src/lib/ui/sidebar/Sidebar.svelte +++ b/src/lib/ui/sidebar/Sidebar.svelte @@ -124,7 +124,7 @@ {#if env.PUBLIC_XYLIGHT_MODE?.toLowerCase() == 'true'} {$t('nav.menu.source')} diff --git a/src/routes/go/+page.ts b/src/routes/go/+page.ts index d0439cf9..f2c1e26c 100644 --- a/src/routes/go/+page.ts +++ b/src/routes/go/+page.ts @@ -1,11 +1,11 @@ -import { photonify } from '$lib/app/markdown/renderers/plugins' +import { localizeLink } from '$lib/app/markdown/renderers/plugins' import { redirect } from '@sveltejs/kit' export async function load({ url }) { const link = url.searchParams.get('localize') if (link) { - const localized = photonify(link) + const localized = localizeLink(link) if (localized) redirect(302, localized) else redirect(302, link) } diff --git a/src/routes/util/+layout.svelte b/src/routes/util/+layout.svelte index 509b3763..6d8c3224 100644 --- a/src/routes/util/+layout.svelte +++ b/src/routes/util/+layout.svelte @@ -17,11 +17,11 @@ }, { href: '/util/instance', - name: 'Photon instance', + name: 'Kelp instance', }, { href: '/util/photonify', - name: 'Photonify Links', + name: 'Localize Links', }, { href: '/util/placeholder', diff --git a/src/routes/util/+page.svelte b/src/routes/util/+page.svelte index 782e16d5..bacb2cf8 100644 --- a/src/routes/util/+page.svelte +++ b/src/routes/util/+page.svelte @@ -1,5 +1,5 @@

Utilities

- These are mostly for debugging purposes but you can use them to see how Photon + These are mostly for debugging purposes but you can use them to see how Kelp works on the inside. (if you don't feel like reading the source code)

diff --git a/src/routes/util/instance/+page.svelte b/src/routes/util/instance/+page.svelte index bb6094b1..d2e9e400 100644 --- a/src/routes/util/instance/+page.svelte +++ b/src/routes/util/instance/+page.svelte @@ -7,9 +7,9 @@ import { Header } from '$lib/ui/layout' -
Photon instance
+
Kelp instance
-  photon version: {__VERSION__}
+  kelp version: {__VERSION__}
   
   linked instance: {LINKED_INSTANCE_URL ?? 'none'}
   default instance: {DEFAULT_INSTANCE_URL}
diff --git a/src/routes/util/photonify/+page.svelte b/src/routes/util/photonify/+page.svelte
index de06bd77..076e7701 100644
--- a/src/routes/util/photonify/+page.svelte
+++ b/src/routes/util/photonify/+page.svelte
@@ -1,14 +1,14 @@
 
 
-

Photonify links

-

Convert a link from a Lemmy post to a Photon link.

+

Localize links

+

Convert an external post link to a local Kelp link.

- +
diff --git a/src/routes/util/placeholder/+page.svelte b/src/routes/util/placeholder/+page.svelte index c26c6ee9..cd8d3350 100644 --- a/src/routes/util/placeholder/+page.svelte +++ b/src/routes/util/placeholder/+page.svelte @@ -9,8 +9,8 @@

Placeholders

- Photon randomly generates placeholders for use in text inputs and stuff. If - you have "Random Placeholders" disabled in settings, they will be empty. + Kelp randomly generates placeholders for use in text inputs and stuff. If you + have "Random Placeholders" disabled in settings, they will be empty.

Posts

diff --git a/static/manifest.json b/static/manifest.json index 4bfcc8bd..c9e5fc61 100644 --- a/static/manifest.json +++ b/static/manifest.json @@ -1,6 +1,6 @@ { - "short_name": "Photon", - "name": "Photon", + "short_name": "Kelp", + "name": "Kelp", "start_url": "/", "icons": [ { @@ -20,7 +20,7 @@ "display": "standalone", "scope": "/", "theme_color": "#000000", - "description": "A Svelte based web client for Lemmy.", + "description": "The web frontend for Coves, a forum-like social platform.", "screenshots": [ { "form_factor": "wide",