Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changeset/add-kofi-link.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@crypt.fyi/web': patch
'@crypt.fyi/core': patch
---

Add Ko-fi support links to the web app header, footer, landing page, About page and post-create screen, with translations for the new copy.
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ko_fi: osbytes
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@
<a href="https://github.com/osbytes/crypt.fyi/tree/main/packages/core/src/i18n/locales" target="_blank">
<img src="https://img.shields.io/badge/i18n-✓-blue?logo=translate" alt="i18n" />
</a>
<a href="https://ko-fi.com/osbytes" target="_blank">
<img src="https://img.shields.io/badge/Ko--fi-Support-FF5E5B?logo=ko-fi&logoColor=white" alt="Support on Ko-fi" />
</a>
</p>

## Features
Expand Down Expand Up @@ -204,3 +207,7 @@ Publishable packages: `@crypt.fyi/core` and `@crypt.fyi/cli` (npm), plus the Chr
## Contributing

Contributions are welcome! Please feel free to submit an [Issue](https://github.com/osbytes/crypt.fyi/issues) or [Pull Request](https://github.com/osbytes/crypt.fyi/pulls) on [GitHub](https://github.com/osbytes/crypt.fyi).

## Support

crypt.fyi is free to use. If it's useful to you, you can help fund hosting and development on [Ko-fi](https://ko-fi.com/osbytes).
6 changes: 6 additions & 0 deletions packages/core/src/i18n/locales/de.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export const de: TranslationKeys = {
theme: { label: 'Design', system: 'System', light: 'Hell', dark: 'Dunkel' },
createSecret: 'Geheimnis erstellen',
starOnGithub: 'Auf GitHub markieren',
supportOnKofi: 'Auf Ko-fi unterstützen',
features: 'Funktionen',
learnMore: 'Mehr erfahren',
loading: 'Lädt...',
Expand Down Expand Up @@ -87,6 +88,7 @@ export const de: TranslationKeys = {
cli: 'CLI',
chromeExtension: 'Chrome-Erweiterung',
github: 'GitHub',
kofi: 'Ko-fi',
},
steps: {
encrypt: {
Expand Down Expand Up @@ -339,6 +341,10 @@ export const de: TranslationKeys = {
description:
'crypt.fyi ist Open Source und prüfbar. Sie können die Implementierung einsehen, selbst hosten oder mitwirken auf',
},
support: {
description:
'crypt.fyi ist kostenlos nutzbar. Wenn es Ihnen nützt, können Sie Hosting und Entwicklung unterstützen auf',
},
technical: {
prompt: 'Mehr technische Details?',
specLink: 'Zur Protokollspezifikation',
Expand Down
6 changes: 6 additions & 0 deletions packages/core/src/i18n/locales/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export const en: TranslationKeys = {
theme: { label: 'Theme', system: 'System', light: 'Light', dark: 'Dark' },
createSecret: 'Create Secret',
starOnGithub: 'Star on GitHub',
supportOnKofi: 'Support on Ko-fi',
features: 'Features',
learnMore: 'Learn More',
loading: 'Loading...',
Expand Down Expand Up @@ -87,6 +88,7 @@ export const en: TranslationKeys = {
cli: 'CLI',
chromeExtension: 'Chrome Extension',
github: 'GitHub',
kofi: 'Ko-fi',
},
steps: {
encrypt: {
Expand Down Expand Up @@ -332,6 +334,10 @@ export const en: TranslationKeys = {
description:
'crypt.fyi is open source and auditable. You can review the implementation, self-host it, or contribute on',
},
support: {
description:
'crypt.fyi is free to use. If it is useful to you, you can help fund hosting and development on',
},
technical: {
prompt: 'Want to get more technical?',
specLink: 'Read the protocol specification',
Expand Down
6 changes: 6 additions & 0 deletions packages/core/src/i18n/locales/es.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export const es: TranslationKeys = {
theme: { label: 'Tema', system: 'Sistema', light: 'Claro', dark: 'Oscuro' },
createSecret: 'Crear Secreto',
starOnGithub: 'Estrella en GitHub',
supportOnKofi: 'Apóyanos en Ko-fi',
features: 'Características',
learnMore: 'Más Información',
loading: 'Cargando...',
Expand Down Expand Up @@ -88,6 +89,7 @@ export const es: TranslationKeys = {
cli: 'CLI',
chromeExtension: 'Extensión de Chrome',
github: 'GitHub',
kofi: 'Ko-fi',
},
steps: {
encrypt: {
Expand Down Expand Up @@ -338,6 +340,10 @@ export const es: TranslationKeys = {
description:
'crypt.fyi es de código abierto y auditable. Puedes revisar la implementación, autoalojarlo o contribuir en',
},
support: {
description:
'crypt.fyi es de uso gratuito. Si te resulta útil, puedes ayudar a financiar el alojamiento y el desarrollo en',
},
technical: {
prompt: '¿Quieres ir más a fondo?',
specLink: 'Lee la especificación del protocolo',
Expand Down
6 changes: 6 additions & 0 deletions packages/core/src/i18n/locales/fr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export const fr: TranslationKeys = {
theme: { label: 'Thème', system: 'Système', light: 'Clair', dark: 'Sombre' },
createSecret: 'Créer un Secret',
starOnGithub: 'Star sur GitHub',
supportOnKofi: 'Soutenir sur Ko-fi',
features: 'Fonctionnalités',
learnMore: 'En savoir plus',
loading: 'Chargement...',
Expand Down Expand Up @@ -88,6 +89,7 @@ export const fr: TranslationKeys = {
cli: 'CLI',
chromeExtension: 'Extension Chrome',
github: 'GitHub',
kofi: 'Ko-fi',
},
steps: {
encrypt: {
Expand Down Expand Up @@ -338,6 +340,10 @@ export const fr: TranslationKeys = {
description:
"crypt.fyi est open source et auditable. Vous pouvez examiner l'implémentation, l'héberger vous-même ou contribuer sur",
},
support: {
description:
"crypt.fyi est gratuit. S'il vous est utile, vous pouvez aider à financer l'hébergement et le développement sur",
},
technical: {
prompt: 'Envie d’aller plus loin techniquement ?',
specLink: 'Lire la spécification du protocole',
Expand Down
5 changes: 5 additions & 0 deletions packages/core/src/i18n/locales/zh.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export const zh: TranslationKeys = {
theme: { label: '主题', system: '跟随系统', light: '浅色', dark: '深色' },
createSecret: '创建密文',
starOnGithub: '在 GitHub 上标星',
supportOnKofi: '在 Ko-fi 上支持我们',
features: '功能特点',
learnMore: '了解更多',
loading: '加载中...',
Expand Down Expand Up @@ -85,6 +86,7 @@ export const zh: TranslationKeys = {
cli: 'CLI',
chromeExtension: 'Chrome 扩展',
github: 'GitHub',
kofi: 'Ko-fi',
},
steps: {
encrypt: {
Expand Down Expand Up @@ -320,6 +322,9 @@ export const zh: TranslationKeys = {
openSource: {
description: 'crypt.fyi 开源且可审计。你可以审查实现、自行托管,或在此贡献:',
},
support: {
description: 'crypt.fyi 可免费使用。如果它对你有帮助,你可以在此资助托管和开发:',
},
technical: {
prompt: '想了解更多技术细节?',
specLink: '阅读协议规范',
Expand Down
5 changes: 5 additions & 0 deletions packages/core/src/i18n/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ export interface TranslationKeys {
theme: { label: string; system: string; light: string; dark: string };
createSecret: string;
starOnGithub: string;
supportOnKofi: string;
features: string;
learnMore: string;
loading: string;
Expand Down Expand Up @@ -79,6 +80,7 @@ export interface TranslationKeys {
cli: string;
chromeExtension: string;
github: string;
kofi: string;
};
steps: {
encrypt: {
Expand Down Expand Up @@ -304,6 +306,9 @@ export interface TranslationKeys {
openSource: {
description: string;
};
support: {
description: string;
};
technical: {
prompt: string;
specLink: string;
Expand Down
26 changes: 25 additions & 1 deletion packages/web/src/components/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { IconApi, IconBrandGithub, IconLanguage, IconPlus } from '@tabler/icons-react';
import { IconApi, IconBrandGithub, IconCoffee, IconLanguage, IconPlus } from '@tabler/icons-react';
import { Button } from './ui/button';
import { Logo } from './Logo';
import { Link, useRouterState } from '@tanstack/react-router';
Expand Down Expand Up @@ -80,6 +80,22 @@ export function Layout({ children }: LayoutProps) {
<IconBrandGithub />
</a>
</Button>
<Button
variant="ghost"
size="icon"
asChild
title={t('common.supportOnKofi')}
className="size-9"
>
<a
href={config.CRYPT_FYI_KOFI_URL}
target="_blank"
rel="noopener noreferrer"
aria-label={t('common.supportOnKofi')}
>
<IconCoffee />
</a>
</Button>
</nav>
<ThemeToggle />
<Select
Expand Down Expand Up @@ -151,6 +167,14 @@ export function Layout({ children }: LayoutProps) {
>
API
</a>
<a
href={config.CRYPT_FYI_KOFI_URL}
target="_blank"
rel="noopener noreferrer"
className={footerLinkClass}
>
Ko-fi
</a>
<a
href="https://www.osbytes.io"
target="_blank"
Expand Down
1 change: 1 addition & 0 deletions packages/web/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export const config = Object.freeze({
'https://railway.com/deploy/Pmkrsc?referralCode=ToZEjF&utm_medium=integration&utm_source=template&utm_campaign=generic',
CRYPT_FYI_DOCKER_DOCS_URL: 'https://github.com/osbytes/crypt.fyi#docker',
CRYPT_FYI_SPEC_URL: 'https://github.com/osbytes/crypt.fyi/blob/main/SPECIFICATION.md',
CRYPT_FYI_KOFI_URL: 'https://ko-fi.com/osbytes',
MAX_IP_RESTRICTIONS: 3,
KEY_LENGTH: 32,
VERSION: __APP_VERSION__,
Expand Down
19 changes: 17 additions & 2 deletions packages/web/src/pages/About.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { config } from '@/config';
import { Link } from '@tanstack/react-router';
import { IconBrandGithub, IconFileDescription } from '@tabler/icons-react';
import { IconBrandGithub, IconCoffee, IconFileDescription } from '@tabler/icons-react';
import { useTranslation } from 'react-i18next';
import { Button } from '@/components/ui/button/button';

Expand Down Expand Up @@ -41,7 +41,7 @@ export function About() {
</section>
</div>

<div className="grid gap-4 md:grid-cols-2">
<div className="grid gap-4 md:grid-cols-2 lg:grid-cols-3">
<section className="space-y-3 rounded-xl border bg-card p-6">
<IconBrandGithub className="size-5 text-muted-foreground" aria-hidden />
<p className="leading-relaxed text-muted-foreground">
Expand Down Expand Up @@ -72,6 +72,21 @@ export function About() {
.
</p>
</section>
<section className="space-y-3 rounded-xl border bg-card p-6">
<IconCoffee className="size-5 text-muted-foreground" aria-hidden />
<p className="leading-relaxed text-muted-foreground">
{t('about.support.description')}{' '}
<a
href={config.CRYPT_FYI_KOFI_URL}
target="_blank"
rel="noopener noreferrer"
className="prose-link"
>
Ko-fi
</a>
.
</p>
</section>
</div>

<Button asChild size="lg">
Expand Down
30 changes: 21 additions & 9 deletions packages/web/src/pages/Create.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ import {
IconNetwork,
IconChevronDown,
IconBrandGithub,
IconCoffee,
IconShare,
IconFile,
IconWebhook,
Expand Down Expand Up @@ -1351,15 +1352,26 @@ export function CreatePage() {
</Button>
</div>

<a
href={config.CRYPT_FYI_GITHUB_URL}
target="_blank"
rel="noopener noreferrer"
className="flex items-center justify-center gap-2 text-sm text-muted-foreground transition-colors hover:text-foreground"
>
<IconBrandGithub className="size-4" aria-hidden />
{t('common.starOnGithub')}
</a>
<div className="flex flex-wrap items-center justify-center gap-x-6 gap-y-2 text-sm">
<a
href={config.CRYPT_FYI_GITHUB_URL}
target="_blank"
rel="noopener noreferrer"
className="flex items-center gap-2 text-muted-foreground transition-colors hover:text-foreground"
>
<IconBrandGithub className="size-4" aria-hidden />
{t('common.starOnGithub')}
</a>
<a
href={config.CRYPT_FYI_KOFI_URL}
target="_blank"
rel="noopener noreferrer"
className="flex items-center gap-2 text-muted-foreground transition-colors hover:text-foreground"
>
<IconCoffee className="size-4" aria-hidden />
{t('common.supportOnKofi')}
</a>
</div>
</motion.div>
)}
</AnimatePresence>
Expand Down
6 changes: 6 additions & 0 deletions packages/web/src/pages/Landing.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
IconShieldCheck,
IconCode,
IconBrandGithub,
IconCoffee,
IconBrandDocker,
IconTerminal2,
IconBrandChrome,
Expand Down Expand Up @@ -213,6 +214,11 @@ export function LandingPage() {
icon: IconBrandGithub,
label: t('landing.ecosystem.github'),
},
{
href: config.CRYPT_FYI_KOFI_URL,
icon: IconCoffee,
label: t('landing.ecosystem.kofi'),
},
].map(({ href, icon: Icon, label }) => (
<a
key={label}
Expand Down
Loading