Skip to content

Private AI meeting notes that stay on your computer. No meeting bot. Free and open source for Mac, Windows and Linux. An alternative to Granola, Otter and Fireflies.

Settings: a row for sharing Yogurt or starring it on GitHub

Eric Brownrout24724fd33415
diff --git a/app/src/main/share.ts b/app/src/main/share.ts
index b473928a..0257bfa6 100644
--- a/app/src/main/share.ts
+++ b/app/src/main/share.ts
@@ -1,10 +1,11 @@
-import { app, clipboard, ClipboardItem, dialog, ipcMain, type BrowserWindow } from 'electron'
+import { app, clipboard, ClipboardItem, dialog, ipcMain, ShareMenu, type BrowserWindow } from 'electron'
import { mkdtemp, rename, rm, writeFile } from 'node:fs/promises'
import { dirname, join } from 'node:path'
import { fileNameFor, toClipboard, toMarkdownFile, transcriptClipboard } from '../shared/exportNotes'
import type { Store } from './store'
import { isFake } from './paths'
import { t } from '../shared/i18n'
+import { projectWebsite } from '../shared/project'
type Side = 'mine' | 'enhanced'
/** the notes on the side shown, falling back to the person's own when the enhanced ones are not there */
@@ -18,6 +19,19 @@ function notesOf(store: Pick<Store, 'notes'>, id: string, side: unknown): string
* and the file goes where the save dialog says, never to a path the window made up.
*/
export function hookShare(d: { store: Pick<Store, 'meeting' | 'notes' | 'segments'>; window: () => BrowserWindow | undefined }) {
+ ipcMain.handle('share:app-link', (event, x: unknown, y: unknown) => {
+ const win = d.window()
+ if (process.platform !== 'darwin' || !win || win.isDestroyed() || win.webContents !== event.sender || event.senderFrame !== event.sender.mainFrame) return false
+ if (typeof x !== 'number' || typeof y !== 'number' || !Number.isFinite(x) || !Number.isFinite(y)) return false
+ const zoom = event.sender.getZoomFactor()
+ const [width, height] = win.getContentSize()
+ new ShareMenu({ urls: [projectWebsite] }).popup({
+ window: win,
+ x: Math.max(0, Math.min(width - 1, Math.round(x * zoom))),
+ y: Math.max(0, Math.min(height - 1, Math.round(y * zoom))),
+ })
+ return true
+ })
ipcMain.handle('share:copy', async (_e, id: unknown, what: unknown, side: unknown): Promise<'copied' | 'nothing' | 'failed'> => {
if (typeof id !== 'string' || (what !== 'notes' && what !== 'transcript')) return 'nothing'
const data = what === 'transcript'
diff --git a/app/src/preload/index.ts b/app/src/preload/index.ts
index ffab7b53..0d4cdcf4 100644
--- a/app/src/preload/index.ts
+++ b/app/src/preload/index.ts
@@ -134,6 +134,7 @@ const api: YogurtApi = {
},
},
share: {
+ appLink: (x, y) => ipcRenderer.invoke('share:app-link', x, y),
copy: (id, what, side) => ipcRenderer.invoke('share:copy', id, what, side),
save: (id, side) => ipcRenderer.invoke('share:save', id, side),
},
diff --git a/app/src/renderer/src/assets/github-black.svg b/app/src/renderer/src/assets/github-black.svg
new file mode 100644
index 00000000..4e37ca06
--- /dev/null
+++ b/app/src/renderer/src/assets/github-black.svg
@@ -0,0 +1,3 @@
+<svg width="128" height="128" viewBox="0 0 128 128" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path d="M56.7937 84.9688C44.4187 83.4688 35.7 74.5625 35.7 63.0313C35.7 58.3438 37.3875 53.2813 40.2 49.9063C38.9812 46.8125 39.1687 40.25 40.575 37.5313C44.325 37.0625 49.3875 39.0313 52.3875 41.75C55.95 40.625 59.7 40.0625 64.2937 40.0625C68.8875 40.0625 72.6375 40.625 76.0125 41.6563C78.9187 39.0313 84.075 37.0625 87.825 37.5313C89.1375 40.0625 89.325 46.625 88.1062 49.8125C91.1062 53.375 92.7 58.1563 92.7 63.0313C92.7 74.5625 83.9812 83.2813 71.4187 84.875C74.6062 86.9375 76.7625 91.4375 76.7625 96.5938L76.7625 106.344C76.7625 109.156 79.1062 110.75 81.9187 109.625C98.8875 103.156 112.2 86.1875 112.2 65.1875C112.2 38.6563 90.6375 17 64.1062 17C37.575 17 16.2 38.6562 16.2 65.1875C16.2 86 29.4187 103.25 47.2312 109.719C49.7625 110.656 52.2 108.969 52.2 106.438L52.2 98.9375C50.8875 99.5 49.2 99.875 47.7 99.875C41.5125 99.875 37.8562 96.5 35.2312 90.2188C34.2 87.6875 33.075 86.1875 30.9187 85.9063C29.7937 85.8125 29.4187 85.3438 29.4187 84.7813C29.4187 83.6563 31.2937 82.8125 33.1687 82.8125C35.8875 82.8125 38.2312 84.5 40.6687 87.9688C42.5437 90.6875 44.5125 91.9063 46.8562 91.9063C49.2 91.9063 50.7 91.0625 52.8562 88.9063C54.45 87.3125 55.6687 85.9063 56.7937 84.9688Z" fill="black"/>
+</svg>
diff --git a/app/src/renderer/src/assets/github-white.svg b/app/src/renderer/src/assets/github-white.svg
new file mode 100644
index 00000000..f5735419
--- /dev/null
+++ b/app/src/renderer/src/assets/github-white.svg
@@ -0,0 +1,3 @@
+<svg width="128" height="128" viewBox="0 0 128 128" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path d="M56.7937 84.9688C44.4187 83.4688 35.7 74.5625 35.7 63.0313C35.7 58.3438 37.3875 53.2813 40.2 49.9063C38.9812 46.8125 39.1687 40.25 40.575 37.5313C44.325 37.0625 49.3875 39.0313 52.3875 41.75C55.95 40.625 59.7 40.0625 64.2937 40.0625C68.8875 40.0625 72.6375 40.625 76.0125 41.6563C78.9187 39.0313 84.075 37.0625 87.825 37.5313C89.1375 40.0625 89.325 46.625 88.1062 49.8125C91.1062 53.375 92.7 58.1563 92.7 63.0313C92.7 74.5625 83.9812 83.2813 71.4187 84.875C74.6062 86.9375 76.7625 91.4375 76.7625 96.5938L76.7625 106.344C76.7625 109.156 79.1062 110.75 81.9187 109.625C98.8875 103.156 112.2 86.1875 112.2 65.1875C112.2 38.6563 90.6375 17 64.1062 17C37.575 17 16.2 38.6562 16.2 65.1875C16.2 86 29.4187 103.25 47.2312 109.719C49.7625 110.656 52.2 108.969 52.2 106.438L52.2 98.9375C50.8875 99.5 49.2 99.875 47.7 99.875C41.5125 99.875 37.8562 96.5 35.2312 90.2188C34.2 87.6875 33.075 86.1875 30.9187 85.9063C29.7937 85.8125 29.4187 85.3438 29.4187 84.7813C29.4187 83.6563 31.2937 82.8125 33.1687 82.8125C35.8875 82.8125 38.2312 84.5 40.6687 87.9688C42.5437 90.6875 44.5125 91.9063 46.8562 91.9063C49.2 91.9063 50.7 91.0625 52.8562 88.9063C54.45 87.3125 55.6687 85.9063 56.7937 84.9688Z" fill="white"/>
+</svg>
diff --git a/app/src/renderer/src/components/AboutYogurt.tsx b/app/src/renderer/src/components/AboutYogurt.tsx
new file mode 100644
index 00000000..fc7c610c
--- /dev/null
+++ b/app/src/renderer/src/components/AboutYogurt.tsx
@@ -0,0 +1,68 @@
+import { useEffect, useRef, useState, type MouseEvent } from 'react'
+import { Check, Share } from 'lucide-react'
+import { t } from '../../../shared/i18n'
+import { projectRepository, projectWebsite } from '../../../shared/project'
+import githubBlack from '../assets/github-black.svg?no-inline'
+import githubWhite from '../assets/github-white.svg?no-inline'
+import { onMac } from '../keys'
+import { Copy } from './Icons'
+import { Swap, SwapText } from './Swap'
+
+export function AboutYogurt() {
+ const [copied, setCopied] = useState(false)
+ const [error, setError] = useState<'copy' | 'share' | null>(null)
+ const attempt = useRef(0)
+ const idle = t('Copy link'), done = t('Copied')
+ useEffect(() => {
+ if (!copied) return
+ const timer = setTimeout(() => setCopied(false), 1800)
+ return () => clearTimeout(timer)
+ }, [copied])
+
+ async function copy() {
+ const current = ++attempt.current
+ try {
+ await navigator.clipboard.writeText(projectWebsite)
+ if (current !== attempt.current) return
+ setError(null)
+ setCopied(true)
+ } catch {
+ if (current !== attempt.current) return
+ setCopied(false)
+ setError('copy')
+ }
+ }
+
+ async function share(event: MouseEvent<HTMLButtonElement>) {
+ const current = ++attempt.current
+ const { left, bottom } = event.currentTarget.getBoundingClientRect()
+ const opened = await window.yogurt.share.appLink(left, bottom).catch(() => false)
+ if (current === attempt.current) setError(opened ? null : 'share')
+ }
+
+ const message = error === 'copy' ? t("Yogurt couldn't copy.") : error === 'share' ? t("Yogurt couldn't open the share menu.") : ''
+ return <section aria-labelledby="about-yogurt">
+ <h2 id="about-yogurt" className="settings-section-heading">{t('About Yogurt')}</h2>
+ <div className="settings-group settings-backup">
+ <p className="settings-label grid">
+ <span className={`col-start-1 row-start-1 ${error ? 'invisible' : ''}`}>{t('Like Yogurt? Sharing it or starring it on GitHub helps us keep building it.')}</span>
+ <span role="status" className={error ? 'col-start-1 row-start-1 text-danger' : 'sr-only'}>{message || (copied ? done : '')}</span>
+ </p>
+ <div className="settings-backup-actions settings-about-actions">
+ <div className="flex flex-wrap items-center gap-2">
+ <button type="button" className="workspace-button" aria-label={copied ? done : idle} onClick={copy}>
+ <Swap show={copied ? 'done' : 'copy'} options={{ copy: <Copy size={13}/>, done: <Check size={13}/> }}/>
+ <SwapText text={copied ? done : idle} widest={copied ? idle : done}/>
+ </button>
+ {onMac() && <button type="button" className="workspace-button" aria-haspopup="menu" onClick={share}>
+ <Share size={14} strokeWidth={1.75} aria-hidden="true"/>{t('Share…')}
+ </button>}
+ </div>
+ <a className="workspace-button" href={projectRepository} target="_blank" rel="noopener noreferrer">
+ <picture className="shrink-0"><source media="(prefers-color-scheme: dark)" srcSet={githubWhite}/>
+ <img src={githubBlack} width={20} height={20} alt=""/></picture>{t('View on GitHub')}
+ </a>
+ </div>
+ </div>
+ </section>
+}
diff --git a/app/src/renderer/src/screens/Settings.tsx b/app/src/renderer/src/screens/Settings.tsx
index 22b556e7..75f87d19 100644
--- a/app/src/renderer/src/screens/Settings.tsx
+++ b/app/src/renderer/src/screens/Settings.tsx
@@ -1,3 +1,4 @@
+import { AboutYogurt } from '../components/AboutYogurt'
import { LoadingContent } from '../components/LoadingContent'
import { useCallback, useEffect, useRef, useState } from 'react'
import { Check, ChevronDown, Copy, Download, ExternalLink, Globe, Lock, Upload, FileText } from 'lucide-react'
@@ -167,6 +168,7 @@ export function Settings({ revision = 0, focus }: { revision?: number; focus?: s
<AiApps />
<Updates />
+ <AboutYogurt />
<h2 className="settings-section-heading">{t('Keyboard shortcuts')}</h2>
<dl data-testid="settings-shortcuts" className="settings-group settings-shortcuts">
diff --git a/app/src/renderer/src/setup.css b/app/src/renderer/src/setup.css
index f0b813e5..2c64f134 100644
--- a/app/src/renderer/src/setup.css
+++ b/app/src/renderer/src/setup.css
@@ -47,6 +47,8 @@
.settings-backup { padding:20px; }
.settings-backup>.settings-description { margin:0; }
.settings-backup-actions { display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-top:14px; }
+.settings-about-actions { justify-content:space-between; }
+.settings-about-actions .workspace-button { font-size:13px; }
.settings-backup-status { display:flex;flex-wrap:wrap;align-items:center;gap:5px 10px;margin-top:12px;font-size:12px;line-height:18px; }
.settings-jargon-field { position:relative;display:flex;flex-wrap:wrap;align-items:center;gap:5px;min-height:34px;margin-top:11px;padding:4px 5px;border:1px solid var(--line);border-radius:6px;background:var(--bg);cursor:text;transition:border-color var(--dur-micro) ease,box-shadow var(--dur-micro) ease; }
.settings-jargon-field:has([data-focus-ring]) { border-color:var(--accent);box-shadow:0 0 0 2px var(--accent-soft); }
diff --git a/app/src/shared/locales/ar.json b/app/src/shared/locales/ar.json
index 105003a3..d0a3c7c4 100644
--- a/app/src/shared/locales/ar.json
+++ b/app/src/shared/locales/ar.json
@@ -1,4 +1,10 @@
{
+ "About Yogurt": "حول Yogurt",
+ "Like Yogurt? Sharing it or starring it on GitHub helps us keep building it.": "هل يعجبك Yogurt؟ مشاركته أو منحه نجمة على GitHub يساعدنا على مواصلة تطويره.",
+ "Copy link": "نسخ الرابط",
+ "Share…": "مشاركة…",
+ "View on GitHub": "عرض على GitHub",
+ "Yogurt couldn't open the share menu.": "تعذّر على Yogurt فتح قائمة المشاركة.",
"Open in transcript": "فتح في النص المفرّغ",
"Open note": "فتح الملاحظة",
"Other people": "أشخاص آخرون",
diff --git a/app/src/shared/locales/bn.json b/app/src/shared/locales/bn.json
index e362162e..2fba5034 100644
--- a/app/src/shared/locales/bn.json
+++ b/app/src/shared/locales/bn.json
@@ -1,4 +1,10 @@
{
+ "About Yogurt": "Yogurt সম্পর্কে",
+ "Like Yogurt? Sharing it or starring it on GitHub helps us keep building it.": "Yogurt ভালো লাগে? এটি শেয়ার করলে বা GitHub-এ স্টার দিলে আমাদের এর উন্নয়ন চালিয়ে যেতে সুবিধা হয়।",
+ "Copy link": "লিংক কপি করুন",
+ "Share…": "শেয়ার করুন…",
+ "View on GitHub": "GitHub-এ দেখুন",
+ "Yogurt couldn't open the share menu.": "Yogurt শেয়ার মেনু খুলতে পারেনি।",
"Open in transcript": "ট্রান্সক্রিপ্টে খুলুন",
"Open note": "নোট খুলুন",
"Other people": "অন্যান্য ব্যক্তি",
diff --git a/app/src/shared/locales/cs.json b/app/src/shared/locales/cs.json
index 535cf63e..6c881ecc 100644
--- a/app/src/shared/locales/cs.json
+++ b/app/src/shared/locales/cs.json
@@ -1,4 +1,10 @@
{
+ "About Yogurt": "O aplikaci Yogurt",
+ "Like Yogurt? Sharing it or starring it on GitHub helps us keep building it.": "Líbí se vám Yogurt? Když ho nasdílíte nebo mu dáte hvězdičku na GitHubu, pomůžete nám ho dál vyvíjet.",
+ "Copy link": "Zkopírovat odkaz",
+ "Share…": "Sdílet…",
+ "View on GitHub": "Zobrazit na GitHubu",
+ "Yogurt couldn't open the share menu.": "Yogurt nemohl otevřít nabídku sdílení.",
"Open in transcript": "Otevřít v přepisu",
"Open note": "Otevřít poznámku",
"Other people": "Ostatní lidé",
diff --git a/app/src/shared/locales/da.json b/app/src/shared/locales/da.json
index 7e7913c7..f88772b8 100644
--- a/app/src/shared/locales/da.json
+++ b/app/src/shared/locales/da.json
@@ -1,4 +1,10 @@
{
+ "About Yogurt": "Om Yogurt",
+ "Like Yogurt? Sharing it or starring it on GitHub helps us keep building it.": "Kan du lide Yogurt? Når du deler det eller giver det en stjerne på GitHub, hjælper du os med at udvikle det videre.",
+ "Copy link": "Kopiér link",
+ "Share…": "Del…",
+ "View on GitHub": "Vis på GitHub",
+ "Yogurt couldn't open the share menu.": "Yogurt kunne ikke åbne delingsmenuen.",
"Open in transcript": "Åbn i transskriptionen",
"Open note": "Åbn note",
"Other people": "Andre personer",
diff --git a/app/src/shared/locales/de.json b/app/src/shared/locales/de.json
index 14fa1a96..187fd700 100644
--- a/app/src/shared/locales/de.json
+++ b/app/src/shared/locales/de.json
@@ -1,4 +1,10 @@
{
+ "About Yogurt": "Über Yogurt",
+ "Like Yogurt? Sharing it or starring it on GitHub helps us keep building it.": "Gefällt dir Yogurt? Wenn du es teilst oder uns auf GitHub einen Stern gibst, hilfst du uns bei der Weiterentwicklung.",
+ "Copy link": "Link kopieren",
+ "Share…": "Teilen…",
+ "View on GitHub": "Auf GitHub ansehen",
+ "Yogurt couldn't open the share menu.": "Yogurt konnte das Teilen-Menü nicht öffnen.",
"Open in transcript": "Im Transkript öffnen",
"Open note": "Notiz öffnen",
"Other people": "Weitere Personen",
diff --git a/app/src/shared/locales/el.json b/app/src/shared/locales/el.json
index e393d1c9..49e3dd1d 100644
--- a/app/src/shared/locales/el.json
+++ b/app/src/shared/locales/el.json
@@ -1,4 +1,10 @@
{
+ "About Yogurt": "Σχετικά με το Yogurt",
+ "Like Yogurt? Sharing it or starring it on GitHub helps us keep building it.": "Σας αρέσει το Yogurt; Αν το μοιραστείτε ή του δώσετε ένα αστέρι στο GitHub, μας βοηθάτε να συνεχίσουμε να το αναπτύσσουμε.",
+ "Copy link": "Αντιγραφή συνδέσμου",
+ "Share…": "Κοινή χρήση…",
+ "View on GitHub": "Προβολή στο GitHub",
+ "Yogurt couldn't open the share menu.": "Το Yogurt δεν μπόρεσε να ανοίξει το μενού κοινής χρήσης.",
"Open in transcript": "Άνοιγμα στην απομαγνητοφώνηση",
"Open note": "Άνοιγμα σημείωσης",
"Other people": "Άλλα άτομα",
diff --git a/app/src/shared/locales/en.json b/app/src/shared/locales/en.json
index 84227d96..f377c453 100644
--- a/app/src/shared/locales/en.json
+++ b/app/src/shared/locales/en.json
@@ -1,4 +1,10 @@
{
+ "About Yogurt": "About Yogurt",
+ "Like Yogurt? Sharing it or starring it on GitHub helps us keep building it.": "Like Yogurt? Sharing it or starring it on GitHub helps us keep building it.",
+ "Copy link": "Copy link",
+ "Share…": "Share…",
+ "View on GitHub": "View on GitHub",
+ "Yogurt couldn't open the share menu.": "Yogurt couldn't open the share menu.",
"Open in transcript": "Open in transcript",
"Open note": "Open note",
"Other people": "Other people",
diff --git a/app/src/shared/locales/es.json b/app/src/shared/locales/es.json
index 6409506f..10a1d7fe 100644
--- a/app/src/shared/locales/es.json
+++ b/app/src/shared/locales/es.json
@@ -1,4 +1,10 @@
{
+ "About Yogurt": "Acerca de Yogurt",
+ "Like Yogurt? Sharing it or starring it on GitHub helps us keep building it.": "¿Te gusta Yogurt? Compartirlo o darle una estrella en GitHub nos ayuda a seguir desarrollándolo.",
+ "Copy link": "Copiar enlace",
+ "Share…": "Compartir…",
+ "View on GitHub": "Ver en GitHub",
+ "Yogurt couldn't open the share menu.": "Yogurt no pudo abrir el menú para compartir.",
"Open in transcript": "Abrir en la transcripción",
"Open note": "Abrir nota",
"Other people": "Otras personas",
diff --git a/app/src/shared/locales/fi.json b/app/src/shared/locales/fi.json
index 6d187007..db5d66f4 100644
--- a/app/src/shared/locales/fi.json
+++ b/app/src/shared/locales/fi.json
@@ -1,4 +1,10 @@
{
+ "About Yogurt": "Tietoja Yogurtista",
+ "Like Yogurt? Sharing it or starring it on GitHub helps us keep building it.": "Pidätkö Yogurtista? Kun jaat sen tai annat sille tähden GitHubissa, autat meitä jatkamaan sen kehittämistä.",
+ "Copy link": "Kopioi linkki",
+ "Share…": "Jaa…",
+ "View on GitHub": "Näytä GitHubissa",
+ "Yogurt couldn't open the share menu.": "Yogurt ei voinut avata jakovalikkoa.",
"Open in transcript": "Avaa litteroinnissa",
"Open note": "Avaa muistiinpano",
"Other people": "Muut henkilöt",
diff --git a/app/src/shared/locales/fil.json b/app/src/shared/locales/fil.json
index 615578a7..76a10086 100644
--- a/app/src/shared/locales/fil.json
+++ b/app/src/shared/locales/fil.json
@@ -1,4 +1,10 @@
{
+ "About Yogurt": "Tungkol sa Yogurt",
+ "Like Yogurt? Sharing it or starring it on GitHub helps us keep building it.": "Gusto mo ang Yogurt? Kapag ibinahagi mo ito o binigyan ng star sa GitHub, natutulungan mo kaming patuloy itong pagandahin.",
+ "Copy link": "Kopyahin ang link",
+ "Share…": "Ibahagi…",
+ "View on GitHub": "Tingnan sa GitHub",
+ "Yogurt couldn't open the share menu.": "Hindi mabuksan ng Yogurt ang menu ng pagbabahagi.",
"Open in transcript": "Buksan sa transcript",
"Open note": "Buksan ang tala",
"Other people": "Iba pang tao",
diff --git a/app/src/shared/locales/fr.json b/app/src/shared/locales/fr.json
index 87981528..f99347d1 100644
--- a/app/src/shared/locales/fr.json
+++ b/app/src/shared/locales/fr.json
@@ -1,4 +1,10 @@
{
+ "About Yogurt": "À propos de Yogurt",
+ "Like Yogurt? Sharing it or starring it on GitHub helps us keep building it.": "Yogurt vous plaît ? Partager l’appli ou lui donner une étoile sur GitHub nous aide à poursuivre son développement.",
+ "Copy link": "Copier le lien",
+ "Share…": "Partager…",
+ "View on GitHub": "Voir sur GitHub",
+ "Yogurt couldn't open the share menu.": "Yogurt n’a pas pu ouvrir le menu de partage.",
"Open in transcript": "Ouvrir dans la transcription",
"Open note": "Ouvrir la note",
"Other people": "Autres personnes",
diff --git a/app/src/shared/locales/he.json b/app/src/shared/locales/he.json
index c070768c..31df3be5 100644
--- a/app/src/shared/locales/he.json
+++ b/app/src/shared/locales/he.json
@@ -1,4 +1,10 @@
{
+ "About Yogurt": "על Yogurt",
+ "Like Yogurt? Sharing it or starring it on GitHub helps us keep building it.": "אהבת את Yogurt? שיתוף האפליקציה או מתן כוכב ב-GitHub עוזרים לנו להמשיך לפתח אותה.",
+ "Copy link": "העתקת קישור",
+ "Share…": "שיתוף…",
+ "View on GitHub": "הצגה ב-GitHub",
+ "Yogurt couldn't open the share menu.": "לא היה באפשרות Yogurt לפתוח את תפריט השיתוף.",
"Open in transcript": "פתיחה בתמלול",
"Open note": "פתיחת ההערה",
"Other people": "אנשים אחרים",
diff --git a/app/src/shared/locales/hi.json b/app/src/shared/locales/hi.json
index 6875845b..56214557 100644
--- a/app/src/shared/locales/hi.json
+++ b/app/src/shared/locales/hi.json
@@ -1,4 +1,10 @@
{
+ "About Yogurt": "Yogurt के बारे में",
+ "Like Yogurt? Sharing it or starring it on GitHub helps us keep building it.": "Yogurt पसंद है? इसे शेयर करने या GitHub पर स्टार देने से हमें इस पर काम जारी रखने में मदद मिलती है।",
+ "Copy link": "लिंक कॉपी करें",
+ "Share…": "शेयर करें…",
+ "View on GitHub": "GitHub पर देखें",
+ "Yogurt couldn't open the share menu.": "Yogurt शेयर मेन्यू नहीं खोल सका।",
"Open in transcript": "ट्रांसक्रिप्ट में खोलें",
"Open note": "नोट खोलें",
"Other people": "अन्य लोग",
diff --git a/app/src/shared/locales/hu.json b/app/src/shared/locales/hu.json
index f613ce89..c753577c 100644
--- a/app/src/shared/locales/hu.json
+++ b/app/src/shared/locales/hu.json
@@ -1,4 +1,10 @@
{
+ "About Yogurt": "A Yogurt névjegye",
+ "Like Yogurt? Sharing it or starring it on GitHub helps us keep building it.": "Tetszik a Yogurt? Ha megosztod, vagy csillagot adsz neki a GitHubon, segítesz nekünk a további fejlesztésben.",
+ "Copy link": "Hivatkozás másolása",
+ "Share…": "Megosztás…",
+ "View on GitHub": "Megtekintés a GitHubon",
+ "Yogurt couldn't open the share menu.": "A Yogurt nem tudta megnyitni a megosztási menüt.",
"Open in transcript": "Megnyitás az átiratban",
"Open note": "Jegyzet megnyitása",
"Other people": "Más résztvevők",
diff --git a/app/src/shared/locales/id.json b/app/src/shared/locales/id.json
index 5dd0e723..873b6375 100644
--- a/app/src/shared/locales/id.json
+++ b/app/src/shared/locales/id.json
@@ -1,4 +1,10 @@
{
+ "About Yogurt": "Tentang Yogurt",
+ "Like Yogurt? Sharing it or starring it on GitHub helps us keep building it.": "Suka Yogurt? Dengan membagikannya atau memberinya bintang di GitHub, Anda membantu kami terus mengembangkannya.",
+ "Copy link": "Salin tautan",
+ "Share…": "Bagikan…",
+ "View on GitHub": "Lihat di GitHub",
+ "Yogurt couldn't open the share menu.": "Yogurt tidak dapat membuka menu berbagi.",
"Open in transcript": "Buka di transkrip",
"Open note": "Buka catatan",
"Other people": "Orang lain",
diff --git a/app/src/shared/locales/it.json b/app/src/shared/locales/it.json
index 323a29e9..47be596b 100644
--- a/app/src/shared/locales/it.json
+++ b/app/src/shared/locales/it.json
@@ -1,4 +1,10 @@
{
+ "About Yogurt": "Informazioni su Yogurt",
+ "Like Yogurt? Sharing it or starring it on GitHub helps us keep building it.": "Ti piace Yogurt? Condividerlo o dargli una stella su GitHub ci aiuta a continuare a svilupparlo.",
+ "Copy link": "Copia link",
+ "Share…": "Condividi…",
+ "View on GitHub": "Visualizza su GitHub",
+ "Yogurt couldn't open the share menu.": "Yogurt non ha potuto aprire il menu di condivisione.",
"Open in transcript": "Apri nella trascrizione",
"Open note": "Apri nota",
"Other people": "Altre persone",
diff --git a/app/src/shared/locales/ja.json b/app/src/shared/locales/ja.json
index 82ca3a5b..cfe60c15 100644
--- a/app/src/shared/locales/ja.json
+++ b/app/src/shared/locales/ja.json
@@ -1,4 +1,10 @@
{
+ "About Yogurt": "Yogurt について",
+ "Like Yogurt? Sharing it or starring it on GitHub helps us keep building it.": "Yogurt を気に入っていただけましたか? 他の人に紹介したり、GitHub でスターを付けたりしていただけると、開発を続ける励みになります。",
+ "Copy link": "リンクをコピー",
+ "Share…": "共有…",
+ "View on GitHub": "GitHub で表示",
+ "Yogurt couldn't open the share menu.": "Yogurt は共有メニューを開けませんでした。",
"Open in transcript": "文字起こしで開く",
"Open note": "ノートを開く",
"Other people": "その他の参加者",
diff --git a/app/src/shared/locales/ko.json b/app/src/shared/locales/ko.json
index bf2fbd14..f426d73c 100644
--- a/app/src/shared/locales/ko.json
+++ b/app/src/shared/locales/ko.json
@@ -1,4 +1,10 @@
{
+ "About Yogurt": "Yogurt 정보",
+ "Like Yogurt? Sharing it or starring it on GitHub helps us keep building it.": "Yogurt가 마음에 드시나요? 주변에 공유하거나 GitHub에서 별표를 주시면 개발을 이어 가는 데 도움이 됩니다.",
+ "Copy link": "링크 복사",
+ "Share…": "공유…",
+ "View on GitHub": "GitHub에서 보기",
+ "Yogurt couldn't open the share menu.": "Yogurt에서 공유 메뉴를 열 수 없습니다.",
"Open in transcript": "대화록에서 열기",
"Open note": "노트 열기",
"Other people": "기타 참석자",
diff --git a/app/src/shared/locales/ms.json b/app/src/shared/locales/ms.json
index 170642d2..27f46055 100644
--- a/app/src/shared/locales/ms.json
+++ b/app/src/shared/locales/ms.json
@@ -1,4 +1,10 @@
{
+ "About Yogurt": "Perihal Yogurt",
+ "Like Yogurt? Sharing it or starring it on GitHub helps us keep building it.": "Suka Yogurt? Dengan berkongsi aplikasi ini atau memberinya bintang di GitHub, anda membantu kami meneruskan pembangunannya.",
+ "Copy link": "Salin pautan",
+ "Share…": "Kongsi…",
+ "View on GitHub": "Lihat di GitHub",
+ "Yogurt couldn't open the share menu.": "Yogurt tidak dapat membuka menu perkongsian.",
"Open in transcript": "Buka dalam transkrip",
"Open note": "Buka nota",
"Other people": "Orang lain",
diff --git a/app/src/shared/locales/nb.json b/app/src/shared/locales/nb.json
index 3371cb7c..f15b574b 100644
--- a/app/src/shared/locales/nb.json
+++ b/app/src/shared/locales/nb.json
@@ -1,4 +1,10 @@
{
+ "About Yogurt": "Om Yogurt",
+ "Like Yogurt? Sharing it or starring it on GitHub helps us keep building it.": "Liker du Yogurt? Hvis du deler det eller gir det en stjerne på GitHub, hjelper du oss med å utvikle det videre.",
+ "Copy link": "Kopier lenke",
+ "Share…": "Del…",
+ "View on GitHub": "Vis på GitHub",
+ "Yogurt couldn't open the share menu.": "Yogurt kunne ikke åpne delingsmenyen.",
"Open in transcript": "Åpne i transkripsjonen",
"Open note": "Åpne notat",
"Other people": "Andre personer",
diff --git a/app/src/shared/locales/nl.json b/app/src/shared/locales/nl.json
index c3c979b8..875b7ff5 100644
--- a/app/src/shared/locales/nl.json
+++ b/app/src/shared/locales/nl.json
@@ -1,4 +1,10 @@
{
+ "About Yogurt": "Over Yogurt",
+ "Like Yogurt? Sharing it or starring it on GitHub helps us keep building it.": "Vind je Yogurt fijn? Door het te delen of een ster te geven op GitHub help je ons het verder te ontwikkelen.",
+ "Copy link": "Link kopiëren",
+ "Share…": "Delen…",
+ "View on GitHub": "Bekijken op GitHub",
+ "Yogurt couldn't open the share menu.": "Yogurt kon het deelmenu niet openen.",
"Open in transcript": "Openen in transcript",
"Open note": "Notitie openen",
"Other people": "Andere personen",
diff --git a/app/src/shared/locales/pl.json b/app/src/shared/locales/pl.json
index 6378e99f..c93571fd 100644
--- a/app/src/shared/locales/pl.json
+++ b/app/src/shared/locales/pl.json
@@ -1,4 +1,10 @@
{
+ "About Yogurt": "O programie Yogurt",
+ "Like Yogurt? Sharing it or starring it on GitHub helps us keep building it.": "Podoba Ci się Yogurt? Udostępniając go lub dając mu gwiazdkę na GitHubie, pomagasz nam dalej go rozwijać.",
+ "Copy link": "Kopiuj link",
+ "Share…": "Udostępnij…",
+ "View on GitHub": "Zobacz na GitHubie",
+ "Yogurt couldn't open the share menu.": "Yogurt nie mógł otworzyć menu udostępniania.",
"Open in transcript": "Otwórz w transkrypcji",
"Open note": "Otwórz notatkę",
"Other people": "Inne osoby",
diff --git a/app/src/shared/locales/pt-BR.json b/app/src/shared/locales/pt-BR.json
index 34212709..10b65574 100644
--- a/app/src/shared/locales/pt-BR.json
+++ b/app/src/shared/locales/pt-BR.json
@@ -1,4 +1,10 @@
{
+ "About Yogurt": "Sobre o Yogurt",
+ "Like Yogurt? Sharing it or starring it on GitHub helps us keep building it.": "Gostou do Yogurt? Compartilhar o app ou dar uma estrela no GitHub nos ajuda a continuar desenvolvendo o projeto.",
+ "Copy link": "Copiar link",
+ "Share…": "Compartilhar…",
+ "View on GitHub": "Ver no GitHub",
+ "Yogurt couldn't open the share menu.": "O Yogurt não conseguiu abrir o menu de compartilhamento.",
"Open in transcript": "Abrir na transcrição",
"Open note": "Abrir nota",
"Other people": "Outras pessoas",
diff --git a/app/src/shared/locales/ro.json b/app/src/shared/locales/ro.json
index b284b37e..17ab5cf7 100644
--- a/app/src/shared/locales/ro.json
+++ b/app/src/shared/locales/ro.json
@@ -1,4 +1,10 @@
{
+ "About Yogurt": "Despre Yogurt",
+ "Like Yogurt? Sharing it or starring it on GitHub helps us keep building it.": "Îți place Yogurt? Dacă îl distribui sau îi dai o stea pe GitHub, ne ajuți să îl dezvoltăm în continuare.",
+ "Copy link": "Copiază linkul",
+ "Share…": "Distribuie…",
+ "View on GitHub": "Vezi pe GitHub",
+ "Yogurt couldn't open the share menu.": "Yogurt nu a putut deschide meniul de distribuire.",
"Open in transcript": "Deschide în transcriere",
"Open note": "Deschide nota",
"Other people": "Alte persoane",
diff --git a/app/src/shared/locales/ru.json b/app/src/shared/locales/ru.json
index 60c998da..c09474b9 100644
--- a/app/src/shared/locales/ru.json
+++ b/app/src/shared/locales/ru.json
@@ -1,4 +1,10 @@
{
+ "About Yogurt": "О Yogurt",
+ "Like Yogurt? Sharing it or starring it on GitHub helps us keep building it.": "Вам нравится Yogurt? Если вы поделитесь им или поставите звезду на GitHub, это поможет нам продолжать разработку.",
+ "Copy link": "Скопировать ссылку",
+ "Share…": "Поделиться…",
+ "View on GitHub": "Открыть на GitHub",
+ "Yogurt couldn't open the share menu.": "Yogurt не удалось открыть меню «Поделиться».",
"Open in transcript": "Открыть в расшифровке",
"Open note": "Открыть заметку",
"Other people": "Другие участники",
diff --git a/app/src/shared/locales/sv.json b/app/src/shared/locales/sv.json
index e5237194..fb738d5e 100644
--- a/app/src/shared/locales/sv.json
+++ b/app/src/shared/locales/sv.json
@@ -1,4 +1,10 @@
{
+ "About Yogurt": "Om Yogurt",
+ "Like Yogurt? Sharing it or starring it on GitHub helps us keep building it.": "Gillar du Yogurt? Genom att dela det eller ge det en stjärna på GitHub hjälper du oss att fortsätta utveckla det.",
+ "Copy link": "Kopiera länk",
+ "Share…": "Dela…",
+ "View on GitHub": "Visa på GitHub",
+ "Yogurt couldn't open the share menu.": "Yogurt kunde inte öppna delningsmenyn.",
"Open in transcript": "Öppna i transkriptionen",
"Open note": "Öppna anteckning",
"Other people": "Andra personer",
diff --git a/app/src/shared/locales/th.json b/app/src/shared/locales/th.json
index 56de3a65..c8a2c995 100644
--- a/app/src/shared/locales/th.json
+++ b/app/src/shared/locales/th.json
@@ -1,4 +1,10 @@
{
+ "About Yogurt": "เกี่ยวกับ Yogurt",
+ "Like Yogurt? Sharing it or starring it on GitHub helps us keep building it.": "ชอบ Yogurt ไหม? การแชร์แอปหรือให้ดาวบน GitHub ช่วยให้เราพัฒนาแอปต่อไปได้",
+ "Copy link": "คัดลอกลิงก์",
+ "Share…": "แชร์…",
+ "View on GitHub": "ดูบน GitHub",
+ "Yogurt couldn't open the share menu.": "Yogurt เปิดเมนูแชร์ไม่ได้",
"Open in transcript": "เปิดในข้อความถอดเสียง",
"Open note": "เปิดบันทึก",
"Other people": "บุคคลอื่น",
diff --git a/app/src/shared/locales/tr.json b/app/src/shared/locales/tr.json
index d0bce0f4..91f22a66 100644
--- a/app/src/shared/locales/tr.json
+++ b/app/src/shared/locales/tr.json
@@ -1,4 +1,10 @@
{
+ "About Yogurt": "Yogurt hakkında",
+ "Like Yogurt? Sharing it or starring it on GitHub helps us keep building it.": "Yogurt’u beğendiniz mi? Uygulamayı paylaşmanız veya GitHub’da yıldız vermeniz geliştirmeye devam etmemize yardımcı olur.",
+ "Copy link": "Bağlantıyı kopyala",
+ "Share…": "Paylaş…",
+ "View on GitHub": "GitHub’da görüntüle",
+ "Yogurt couldn't open the share menu.": "Yogurt paylaşım menüsünü açamadı.",
"Open in transcript": "Dökümde aç",
"Open note": "Notu aç",
"Other people": "Diğer kişiler",
diff --git a/app/src/shared/locales/uk.json b/app/src/shared/locales/uk.json
index 03254ec3..68de63ce 100644
--- a/app/src/shared/locales/uk.json
+++ b/app/src/shared/locales/uk.json
@@ -1,4 +1,10 @@
{
+ "About Yogurt": "Про Yogurt",
+ "Like Yogurt? Sharing it or starring it on GitHub helps us keep building it.": "Вам подобається Yogurt? Якщо ви поділитеся ним або поставите зірку на GitHub, це допоможе нам продовжувати розробку.",
+ "Copy link": "Копіювати посилання",
+ "Share…": "Поділитися…",
+ "View on GitHub": "Переглянути на GitHub",
+ "Yogurt couldn't open the share menu.": "Yogurt не вдалося відкрити меню поширення.",
"Open in transcript": "Відкрити в транскрипції",
"Open note": "Відкрити нотатку",
"Other people": "Інші учасники",
diff --git a/app/src/shared/locales/vi.json b/app/src/shared/locales/vi.json
index c42ec41e..2ab9af2d 100644
--- a/app/src/shared/locales/vi.json
+++ b/app/src/shared/locales/vi.json
@@ -1,4 +1,10 @@
{
+ "About Yogurt": "Giới thiệu về Yogurt",
+ "Like Yogurt? Sharing it or starring it on GitHub helps us keep building it.": "Bạn thích Yogurt chứ? Chia sẻ ứng dụng hoặc gắn sao trên GitHub sẽ giúp chúng tôi tiếp tục phát triển Yogurt.",
+ "Copy link": "Sao chép liên kết",
+ "Share…": "Chia sẻ…",
+ "View on GitHub": "Xem trên GitHub",
+ "Yogurt couldn't open the share menu.": "Yogurt không thể mở menu chia sẻ.",
"Open in transcript": "Mở trong bản chép lời",
"Open note": "Mở ghi chú",
"Other people": "Những người khác",
diff --git a/app/src/shared/locales/zh-CN.json b/app/src/shared/locales/zh-CN.json
index 4847d36b..e3a0de84 100644
--- a/app/src/shared/locales/zh-CN.json
+++ b/app/src/shared/locales/zh-CN.json
@@ -1,4 +1,10 @@
{
+ "About Yogurt": "关于 Yogurt",
+ "Like Yogurt? Sharing it or starring it on GitHub helps us keep building it.": "喜欢 Yogurt 吗?把它分享给别人,或在 GitHub 上为项目点颗星,都能帮助我们继续开发。",
+ "Copy link": "复制链接",
+ "Share…": "分享…",
+ "View on GitHub": "在 GitHub 上查看",
+ "Yogurt couldn't open the share menu.": "Yogurt 无法打开分享菜单。",
"Open in transcript": "在转录中打开",
"Open note": "打开笔记",
"Other people": "其他人",
diff --git a/app/src/shared/locales/zh-TW.json b/app/src/shared/locales/zh-TW.json
index 53068e37..f4ef65a0 100644
--- a/app/src/shared/locales/zh-TW.json
+++ b/app/src/shared/locales/zh-TW.json
@@ -1,4 +1,10 @@
{
+ "About Yogurt": "關於 Yogurt",
+ "Like Yogurt? Sharing it or starring it on GitHub helps us keep building it.": "喜歡 Yogurt 嗎?把它分享給朋友,或在 GitHub 上為專案加顆星,都能幫助我們繼續開發。",
+ "Copy link": "複製連結",
+ "Share…": "分享…",
+ "View on GitHub": "在 GitHub 上檢視",
+ "Yogurt couldn't open the share menu.": "Yogurt 無法開啟分享選單。",
"Open in transcript": "在逐字稿中開啟",
"Open note": "開啟筆記",
"Other people": "其他人",
diff --git a/app/src/shared/project.ts b/app/src/shared/project.ts
new file mode 100644
index 00000000..d923db91
--- /dev/null
+++ b/app/src/shared/project.ts
@@ -0,0 +1,2 @@
+export const projectWebsite = 'https://yogurt.so'
+export const projectRepository = 'https://github.com/FrigadeHQ/yogurt'
diff --git a/app/src/shared/types.ts b/app/src/shared/types.ts
index 9065069f..a9831f83 100644
--- a/app/src/shared/types.ts
+++ b/app/src/shared/types.ts
@@ -147,8 +147,9 @@ export type YogurtApi = {
/** status, the draft as it is written, and the saved notes; returns the way to stop listening */
onChange(cb: (v: NoteView) => void): () => void
}
- /** copying and exporting a meeting's notes or transcript; `side` is the notes shown (the person's own or the enhanced ones) */
share: {
+ /** opens the Mac share menu for the public Yogurt website, anchored in renderer CSS pixels */
+ appLink(x: number, y: number): Promise<boolean>
/** puts the notes or the transcript on the clipboard as text and HTML; nothing: there was nothing to copy */
copy(meetingId: string, what: 'notes' | 'transcript', side: 'mine' | 'enhanced'): Promise<'copied' | 'nothing' | 'failed'>
/** asks where to save a Markdown file, then writes it */
diff --git a/app/test/aboutYogurt.test.ts b/app/test/aboutYogurt.test.ts
new file mode 100644
index 00000000..74e0f42c
--- /dev/null
+++ b/app/test/aboutYogurt.test.ts
@@ -0,0 +1,18 @@
+import { createElement } from 'react'
+import { renderToStaticMarkup } from 'react-dom/server'
+import { afterEach, expect, it, vi } from 'vitest'
+import { AboutYogurt } from '../src/renderer/src/components/AboutYogurt'
+import { setLanguage } from '../src/shared/i18n'
+
+afterEach(() => { vi.unstubAllGlobals(); setLanguage('en') })
+
+it.each(['darwin', 'win32', 'linux'])('offers the native picker only on Mac (%s)', os => {
+ setLanguage('en')
+ vi.stubGlobal('window', { yogurt: { os } })
+ const html = renderToStaticMarkup(createElement(AboutYogurt))
+ expect(html.includes('aria-haspopup="menu"')).toBe(os === 'darwin')
+ expect(html).toContain('aria-label="Copy link"')
+ expect(html).toContain('data-widest="Copied"')
+ expect(html).toContain('href="https://github.com/FrigadeHQ/yogurt"')
+ expect(html).toContain('prefers-color-scheme: dark')
+})
diff --git a/app/test/share.test.ts b/app/test/share.test.ts
index 96e81aad..d2f179c5 100644
--- a/app/test/share.test.ts
+++ b/app/test/share.test.ts
@@ -6,10 +6,13 @@ import { join } from 'node:path'
const handlers = new Map<string, (...a: unknown[]) => unknown>()
const written: Array<Record<string, string>> = []
+const shareMenus: unknown[] = []
+const popup = vi.fn()
const state = { clipboardFails: false, dialog: { canceled: false, filePath: '/tmp/x.md' } as { canceled: boolean; filePath?: string } }
vi.mock('electron', () => ({
app: { getPath: () => '/docs' },
ipcMain: { handle: (c: string, f: (...a: unknown[]) => unknown) => { handlers.set(c, f) } },
+ ShareMenu: class { constructor(item: unknown) { shareMenus.push(item) } popup = popup },
ClipboardItem: class { constructor(public items: Record<string, string>) {} },
clipboard: { write: async (items: Array<{ items: Record<string, string> }>) => { if (state.clipboardFails) throw new Error('no'); written.push(items[0].items) } },
dialog: { showSaveDialog: async () => state.dialog },
@@ -40,6 +43,44 @@ beforeEach(() => {
})
afterEach(() => rmSync(dir, { recursive: true, force: true }))
+describe('share:app-link', () => {
+ const sender = { mainFrame: {}, getZoomFactor: () => 1.5 }
+ const event = { sender, senderFrame: sender.mainFrame }
+ const window = { webContents: sender, isDestroyed: () => false, getContentSize: () => [600, 400] }
+ beforeEach(() => {
+ shareMenus.length = 0
+ hookShare({ store: store as never, window: () => window as never })
+ })
+ afterEach(() => vi.unstubAllGlobals())
+
+ it('hands only the public site to the Mac menu and anchors it to the invoking window', () => {
+ vi.stubGlobal('process', Object.create(process, { platform: { value: 'darwin' } }))
+ const open = handlers.get('share:app-link')!
+ expect(open(event, 20.5, 42, 'unrelated renderer data')).toBe(true)
+ expect(shareMenus).toEqual([{ urls: ['https://yogurt.so'] }])
+ expect(popup).toHaveBeenCalledWith({ window, x: 31, y: 63 })
+ expect(open(event, -3, 501)).toBe(true)
+ expect(popup).toHaveBeenLastCalledWith({ window, x: 0, y: 399 })
+ })
+
+ it('ignores other windows, subframes, and invalid positions', () => {
+ vi.stubGlobal('process', Object.create(process, { platform: { value: 'darwin' } }))
+ const open = handlers.get('share:app-link')!
+ expect(open({ ...event, sender: {} }, 1, 2)).toBe(false)
+ expect(open({ ...event, senderFrame: {} }, 1, 2)).toBe(false)
+ expect(open(event, NaN, 2)).toBe(false)
+ expect(open(event, 1, Infinity)).toBe(false)
+ expect(open(event, '1', 2)).toBe(false)
+ expect(shareMenus).toHaveLength(0)
+ })
+
+ it.each(['win32', 'linux'])('does not construct a native menu on %s', platform => {
+ vi.stubGlobal('process', Object.create(process, { platform: { value: platform } }))
+ expect(handlers.get('share:app-link')!(event, 0, 0)).toBe(false)
+ expect(shareMenus).toHaveLength(0)
+ })
+})
+
describe('share:copy', () => {
it('copies the enhanced notes when there are some, the person\'s own when there are not', async () => {
store.notes = () => ({ mine: 'my line', enhanced: '## Plan', edited: false })