Skip to content

armgit / TREK

Public Imported from GitHub
0

The most complete open-source travel planner: real-time collaboration, bookings, budgets, packing lists, journals, offline PWA, SSO and an AI-ready MCP server, with planet-wide place search and routing built in.

3.2.1 (#1433)

jubnl91025683bb9c
diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md
new file mode 100644
index 000000000..5043b6660
--- /dev/null
+++ b/CODE_OF_CONDUCT.md
@@ -0,0 +1,136 @@
+# Contributor Covenant 3.0 Code of Conduct
+
+## Our Pledge
+
+We pledge to make our community welcoming, safe, and equitable for all.
+
+We are committed to fostering an environment that respects and promotes the dignity, rights, and contributions of all
+individuals, regardless of characteristics including race, ethnicity, caste, color, age, physical characteristics,
+neurodiversity, disability, sex or gender, gender identity or expression, sexual orientation, language, philosophy or
+religion, national or social origin, socio-economic position, level of education, or other status. The same privileges
+of participation are extended to everyone who participates in good faith and in accordance with this Covenant.
+
+## Encouraged Behaviors
+
+While acknowledging differences in social norms, we all strive to meet our community's expectations for positive
+behavior. We also understand that our words and actions may be interpreted differently than we intend based on culture,
+background, or native language.
+
+With these considerations in mind, we agree to behave mindfully toward each other and act in ways that center our shared
+values, including:
+
+1. Respecting the **purpose of our community**, our activities, and our ways of gathering.
+2. Engaging **kindly and honestly** with others.
+3. Respecting **different viewpoints** and experiences.
+4. **Taking responsibility** for our actions and contributions.
+5. Gracefully giving and accepting **constructive feedback**.
+6. Committing to **repairing harm** when it occurs.
+7. Behaving in other ways that promote and sustain the **well-being of our community**.
+
+## Restricted Behaviors
+
+We agree to restrict the following behaviors in our community. Instances, threats, and promotion of these behaviors are
+violations of this Code of Conduct.
+
+1. **Harassment.** Violating explicitly expressed boundaries or engaging in unnecessary personal attention after any
+ clear request to stop.
+2. **Character attacks.** Making insulting, demeaning, or pejorative comments directed at a community member or group of
+ people.
+3. **Stereotyping or discrimination.** Characterizing anyone’s personality or behavior on the basis of immutable
+ identities or traits.
+4. **Sexualization.** Behaving in a way that would generally be considered inappropriately intimate in the context or
+ purpose of the community.
+5. **Violating confidentiality**. Sharing or acting on someone's personal or private information without their
+ permission.
+6. **Endangerment.** Causing, encouraging, or threatening violence or other harm toward any person or group.
+7. Behaving in other ways that **threaten the well-being** of our community.
+
+### Other Restrictions
+
+1. **Misleading identity.** Impersonating someone else for any reason, or pretending to be someone else to evade
+ enforcement actions.
+2. **Failing to credit sources.** Not properly crediting the sources of content you contribute.
+3. **Promotional materials**. Sharing marketing or other commercial content in a way that is outside the norms of the
+ community.
+4. **Irresponsible communication.** Failing to responsibly present content which includes, links or describes any other
+ restricted behaviors.
+
+## Reporting an Issue
+
+Tensions can occur between community members even when they are trying their best to collaborate. Not every conflict
+represents a code of conduct violation, and this Code of Conduct reinforces encouraged behaviors and norms that can help
+avoid conflicts and minimize harm.
+
+When an incident does occur, it is important to report it promptly. To report a possible violation, **send an email to
+
+Community Moderators take reports of violations seriously and will make every effort to respond in a timely manner. They
+will investigate all reports of code of conduct violations, reviewing messages, logs, and recordings, or interviewing
+witnesses and other participants. Community Moderators will keep investigation and enforcement actions as transparent as
+possible while prioritizing safety and confidentiality. In order to honor these values, enforcement actions are carried
+out in private with the involved parties, but communicating to the whole community may be part of a mutually agreed upon
+resolution.
+
+## Addressing and Repairing Harm
+
+****
+
+If an investigation by the Community Moderators finds that this Code of Conduct has been violated, the following
+enforcement ladder may be used to determine how best to repair harm, based on the incident's impact on the individuals
+involved and the community as a whole. Depending on the severity of a violation, lower rungs on the ladder may be
+skipped.
+
+1) Warning
+ 1) Event: A violation involving a single incident or series of incidents.
+ 2) Consequence: A private, written warning from the Community Moderators.
+ 3) Repair: Examples of repair include a private written apology, acknowledgement of responsibility, and seeking
+ clarification on expectations.
+2) Temporarily Limited Activities
+ 1) Event: A repeated incidence of a violation that previously resulted in a warning, or the first incidence of a
+ more serious violation.
+ 2) Consequence: A private, written warning with a time-limited cooldown period designed to underscore the
+ seriousness of the situation and give the community members involved time to process the incident. The cooldown
+ period may be limited to particular communication channels or interactions with particular community members.
+ 3) Repair: Examples of repair may include making an apology, using the cooldown period to reflect on actions and
+ impact, and being thoughtful about re-entering community spaces after the period is over.
+3) Temporary Suspension
+ 1) Event: A pattern of repeated violation which the Community Moderators have tried to address with warnings, or a
+ single serious violation.
+ 2) Consequence: A private written warning with conditions for return from suspension. In general, temporary
+ suspensions give the person being suspended time to reflect upon their behavior and possible corrective actions.
+ 3) Repair: Examples of repair include respecting the spirit of the suspension, meeting the specified conditions for
+ return, and being thoughtful about how to reintegrate with the community when the suspension is lifted.
+4) Permanent Ban
+ 1) Event: A pattern of repeated code of conduct violations that other steps on the ladder have failed to resolve, or
+ a violation so serious that the Community Moderators determine there is no way to keep the community safe with
+ this person as a member.
+ 2) Consequence: Access to all community spaces, tools, and communication channels is removed. In general, permanent
+ bans should be rarely used, should have strong reasoning behind them, and should only be resorted to if working
+ through other remedies has failed to change the behavior.
+ 3) Repair: There is no possible repair in cases of this severity.
+
+This enforcement ladder is intended as a guideline. It does not limit the ability of Community Managers to use their
+discretion and judgment, in keeping with the best interests of our community.
+
+## Scope
+
+This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing
+the community in public or other spaces. Examples of representing our community include using an official email address,
+posting via an official social media account, or acting as an appointed representative at an online or offline event.
+
+## Attribution
+
+This Code of Conduct is adapted from the Contributor Covenant, version 3.0, permanently available
+at [https://www.contributor-covenant.org/version/3/0/](https://www.contributor-covenant.org/version/3/0/).
+
+Contributor Covenant is stewarded by the Organization for Ethical Source and licensed under CC BY-SA 4.0. To view a copy
+of this license,
+visit [https://creativecommons.org/licenses/by-sa/4.0/](https://creativecommons.org/licenses/by-sa/4.0/)
+
+For answers to common questions about Contributor Covenant, see the FAQ
+at [https://www.contributor-covenant.org/faq](https://www.contributor-covenant.org/faq). Translations are provided
+at [https://www.contributor-covenant.org/translations](https://www.contributor-covenant.org/translations). Additional
+enforcement and community guideline resources can be found
+at [https://www.contributor-covenant.org/resources](https://www.contributor-covenant.org/resources). The enforcement
+ladder was inspired by the work of [Mozilla’s code of conduct team](https://github.com/mozilla/inclusion).
+
diff --git a/README.md b/README.md
index 31f8c82d2..92ac2e637 100644
--- a/README.md
+++ b/README.md
@@ -428,6 +428,7 @@ Caddy handles TLS and WebSockets automatically.
| `ADMIN_PASSWORD` | Password for the first admin on initial boot. Pairs with `ADMIN_EMAIL`. | random |
| **Other** | | |
| `DEMO_MODE` | Enable demo mode (hourly data resets) | `false` |
+| `UNSPLASH_ACCESS_KEY` | Optional Unsplash Access Key for trip-cover and place-image search. Without one, TREK uses Unsplash's unauthenticated endpoint, which some datacenter/VPS IPs are blocked from. Get a free key at [unsplash.com/developers](https://unsplash.com/developers). Overrides any per-admin key set in Admin > Settings (where it can also be configured instead). | — |
| `MCP_RATE_LIMIT` | Max MCP API requests per user per minute | `300` |
| `MCP_MAX_SESSION_PER_USER` | Max concurrent MCP sessions per user | `20` |
diff --git a/charts/trek/templates/deployment.yaml b/charts/trek/templates/deployment.yaml
index 09d90dc86..37d52b1c1 100644
--- a/charts/trek/templates/deployment.yaml
+++ b/charts/trek/templates/deployment.yaml
@@ -63,6 +63,12 @@ spec:
name: {{ default (printf "%s-secret" (include "trek.fullname" .)) .Values.existingSecret }}
key: OIDC_CLIENT_SECRET
optional: true
+ - name: UNSPLASH_ACCESS_KEY
+ valueFrom:
+ secretKeyRef:
+ name: {{ default (printf "%s-secret" (include "trek.fullname" .)) .Values.existingSecret }}
+ key: UNSPLASH_ACCESS_KEY
+ optional: true
volumeMounts:
- name: data
mountPath: /app/data
diff --git a/charts/trek/templates/secret.yaml b/charts/trek/templates/secret.yaml
index 20edd114f..08d81cabd 100644
--- a/charts/trek/templates/secret.yaml
+++ b/charts/trek/templates/secret.yaml
@@ -17,6 +17,9 @@ data:
{{- if .Values.secretEnv.OIDC_CLIENT_SECRET }}
OIDC_CLIENT_SECRET: {{ .Values.secretEnv.OIDC_CLIENT_SECRET | b64enc | quote }}
{{- end }}
+ {{- if .Values.secretEnv.UNSPLASH_ACCESS_KEY }}
+ UNSPLASH_ACCESS_KEY: {{ .Values.secretEnv.UNSPLASH_ACCESS_KEY | b64enc | quote }}
+ {{- end }}
{{- end }}
{{- if and (not .Values.existingSecret) (.Values.generateEncryptionKey) }}
@@ -44,4 +47,7 @@ stringData:
{{- if .Values.secretEnv.OIDC_CLIENT_SECRET }}
OIDC_CLIENT_SECRET: {{ .Values.secretEnv.OIDC_CLIENT_SECRET }}
{{- end }}
+ {{- if .Values.secretEnv.UNSPLASH_ACCESS_KEY }}
+ UNSPLASH_ACCESS_KEY: {{ .Values.secretEnv.UNSPLASH_ACCESS_KEY }}
+ {{- end }}
{{- end }}
diff --git a/charts/trek/values.yaml b/charts/trek/values.yaml
index e141aa88f..a0523ce14 100644
--- a/charts/trek/values.yaml
+++ b/charts/trek/values.yaml
@@ -92,6 +92,12 @@ secretEnv:
ADMIN_PASSWORD: ""
# OIDC client secret — set together with env.OIDC_ISSUER and env.OIDC_CLIENT_ID.
OIDC_CLIENT_SECRET: ""
+ # Optional Unsplash Access Key for trip-cover and place-image search.
+ # Without one, TREK uses Unsplash's unauthenticated endpoint, which some
+ # datacenter/VPS IPs (including many Kubernetes clusters) are blocked from.
+ # Get a free key at https://unsplash.com/developers. Can also be set per-admin
+ # in Admin > Settings; this value overrides that. Leave empty to disable.
+ UNSPLASH_ACCESS_KEY: ""
# If true, a random ENCRYPTION_KEY is generated at install and preserved across upgrades
generateEncryptionKey: false
diff --git a/client/src/api/client.ts b/client/src/api/client.ts
index f9a388d66..fd2165ef1 100644
--- a/client/src/api/client.ts
+++ b/client/src/api/client.ts
@@ -461,14 +461,16 @@ export const adminApi = {
addons: () => apiClient.get('/admin/addons').then(r => r.data),
updateAddon: (id: number | string, data: Record<string, unknown>) => apiClient.put(`/admin/addons/${id}`, data).then(r => r.data),
plugins: () => apiClient.get('/admin/plugins').then(r => r.data),
- pluginBrowse: () => apiClient.get('/admin/plugins/registry').then(r => r.data),
+ pluginBrowse: (refresh?: boolean) => apiClient.get('/admin/plugins/registry', { params: refresh ? { refresh: 1 } : undefined }).then(r => r.data),
pluginDetail: (id: string) => apiClient.get(`/admin/plugins/registry/${encodeURIComponent(id)}`).then(r => r.data),
- pluginInstall: (id: string, version?: string) => apiClient.post('/admin/plugins/install', { id, version }).then(r => r.data),
+ pluginInstall: (id: string, opts?: { version?: string; constraint?: string; withDependencies?: boolean }) =>
+ apiClient.post('/admin/plugins/install', { id, ...opts }).then(r => r.data),
pluginActivate: (id: string, consent?: boolean) => apiClient.post(`/admin/plugins/${id}/activate`, consent ? { consent: true } : {}).then(r => r.data),
pluginDeactivate: (id: string) => apiClient.post(`/admin/plugins/${id}/deactivate`).then(r => r.data),
pluginUpdate: (id: string) => apiClient.post(`/admin/plugins/${id}/update`).then(r => r.data),
pluginUninstall: (id: string, deleteData: boolean) => apiClient.post(`/admin/plugins/${id}/uninstall`, { deleteData }).then(r => r.data),
pluginRescan: () => apiClient.post('/admin/plugins/rescan').then(r => r.data),
+ pluginUpload: (file: File) => { const fd = new FormData(); fd.append('file', file); return apiClient.post('/admin/plugins/upload', fd, { headers: { 'Content-Type': 'multipart/form-data' } }).then(r => r.data) },
pluginErrors: (id: string) => apiClient.get(`/admin/plugins/${id}/errors`).then(r => r.data),
pluginAudit: (id: string) => apiClient.get(`/admin/plugins/${id}/audit`).then(r => r.data),
// Local LLM (Ollama) management for the AI-parsing addon.
@@ -556,9 +558,34 @@ export const addonsApi = {
export const pluginsApi = {
// Active plugins the client renders (page nav entries, dashboard widgets).
active: () => apiClient.get('/plugins').then(r => r.data),
- // Call one of a plugin's own declared routes through the host proxy.
- invoke: (id: string, sub: string, init?: { method?: string; body?: unknown }) =>
- apiClient.request({ url: `/plugins/${id}${sub}`, method: init?.method || 'GET', data: init?.body }).then(r => r.data),
+ // Extra place info contributed by placeDetailProvider plugins (#1429). Fail-safe:
+ // the server skips any slow/failing provider, so this only ever adds rows.
+ placeDetails: (placeId: number) =>
+ apiClient.get(`/place-details/${placeId}`).then(r => r.data as { providers: Array<{ pluginId: string; items: Array<{ label: string; value?: string; url?: string }> }> }),
+ // Validation/warning contributions from warningProvider plugins (#1429). Fail-safe.
+ tripWarnings: (tripId: number) =>
+ apiClient.get(`/trip-warnings/${tripId}`).then(r => r.data as { warnings: Array<{ pluginId: string; level: 'info' | 'warning' | 'error'; message: string; dayId?: number; placeId?: number }> }),
+ // Call one of a plugin's own declared routes through the host proxy. `sub` is
+ // supplied by untrusted plugin code (the trekBridge forwards it verbatim), so it
+ // MUST stay inside the plugin's own /plugins/:id/ namespace. We resolve it with
+ // the URL parser — which normalizes `../`, encoded traversal and backslashes the
+ // same way the browser would before sending — and reject anything that escapes
+ // the prefix or points off-origin. Without this a plugin could send
+ // sub='/../../auth/me' and drive arbitrary authenticated /api routes as the user.
+ invoke: (id: string, sub: string, init?: { method?: string; body?: unknown }) => {
+ const prefix = `/api/plugins/${id}/`
+ let resolved: URL
+ try {
+ resolved = new URL(String(sub).replace(/^\/+/, ''), window.location.origin + prefix)
+ } catch {
+ return Promise.reject(new Error('invalid plugin route'))
+ }
+ if (resolved.origin !== window.location.origin || !resolved.pathname.startsWith(prefix)) {
+ return Promise.reject(new Error('plugin route escapes its namespace'))
+ }
+ const url = resolved.pathname.slice('/api'.length) + resolved.search
+ return apiClient.request({ url, method: init?.method || 'GET', data: init?.body }).then(r => r.data)
+ },
}
export const airtrailApi = {
@@ -675,8 +702,8 @@ export const budgetApi = {
setPayers: (tripId: number | string, id: number, payers: { user_id: number; amount: number }[]) => apiClient.put(`/trips/${tripId}/budget/${id}/payers`, { payers }).then(r => r.data),
perPersonSummary: (tripId: number | string) => apiClient.get(`/trips/${tripId}/budget/summary/per-person`).then(r => r.data),
settlement: (tripId: number | string, base?: string) => apiClient.get(`/trips/${tripId}/budget/settlement`, base ? { params: { base } } : undefined).then(r => r.data),
- createSettlement: (tripId: number | string, data: { from_user_id: number; to_user_id: number; amount: number }) => apiClient.post(`/trips/${tripId}/budget/settlements`, data).then(r => r.data),
- updateSettlement: (tripId: number | string, settlementId: number, data: { from_user_id: number; to_user_id: number; amount: number }) => apiClient.put(`/trips/${tripId}/budget/settlements/${settlementId}`, data).then(r => r.data),
+ createSettlement: (tripId: number | string, data: { from_user_id: number; to_user_id: number; amount: number; currency?: string }) => apiClient.post(`/trips/${tripId}/budget/settlements`, data).then(r => r.data),
+ updateSettlement: (tripId: number | string, settlementId: number, data: { from_user_id: number; to_user_id: number; amount: number; currency?: string }) => apiClient.put(`/trips/${tripId}/budget/settlements/${settlementId}`, data).then(r => r.data),
deleteSettlement: (tripId: number | string, settlementId: number) => apiClient.delete(`/trips/${tripId}/budget/settlements/${settlementId}`).then(r => r.data),
reorderItems: (tripId: number | string, orderedIds: number[]) => apiClient.put(`/trips/${tripId}/budget/reorder/items`, { orderedIds }).then(r => r.data),
reorderCategories: (tripId: number | string, orderedCategories: string[]) => apiClient.put(`/trips/${tripId}/budget/reorder/categories`, { orderedCategories } satisfies BudgetReorderCategoriesRequest).then(r => r.data),
diff --git a/client/src/components/Admin/AdminPluginsPanel.tsx b/client/src/components/Admin/AdminPluginsPanel.tsx
index f030adc83..6c021e331 100644
--- a/client/src/components/Admin/AdminPluginsPanel.tsx
+++ b/client/src/components/Admin/AdminPluginsPanel.tsx
@@ -1,10 +1,10 @@
-import { useEffect, useMemo, useState } from 'react'
+import { useEffect, useMemo, useRef, useState, type DragEvent } from 'react'
import {
- Blocks, AlertTriangle, PackageOpen, RefreshCw, Trash2, Download, Bug, X, ShieldCheck,
+ Blocks, AlertTriangle, PackageOpen, RefreshCw, Trash2, Download, Bug, X, ShieldCheck, UploadCloud,
ArrowUpCircle, Github, ExternalLink, ChevronDown, Check, Lock, Search,
SlidersHorizontal, ArrowUpDown, CircleDot, MoreHorizontal, RotateCw, ArrowRight, Database, Users, LayoutDashboard,
Radio, Luggage, Plane, Globe, Image, CalendarDays, Map, Bell, Cloud, Camera, Compass,
- BookOpen, Wallet, Puzzle,
+ BookOpen, Wallet, Puzzle, MapPin, ListChecks, Pencil, Tag, FileText,
} from 'lucide-react'
import { adminApi } from '../../api/client'
import { useTranslation } from '../../i18n'
@@ -21,6 +21,12 @@ import ToggleSwitch from '../Settings/ToggleSwitch'
* tile; the security section at the bottom explains the model honestly.
*/
+interface PluginDep { id: string; version: string }
+interface VersionMismatch { id: string; wanted: string; installed: string }
+type DependencyStatus = 'ok' | 'addonDisabled' | 'missingPlugin'
+interface PluginDependencies { requiredAddons: string[]; pluginDependencies: PluginDep[] }
+interface DependencyIssues { disabledAddons: string[]; missing: PluginDep[]; versionMismatch: VersionMismatch[] }
+
interface PluginRow {
id: string
name: string
@@ -35,6 +41,9 @@ interface PluginRow {
source_repo: string | null
permissions: string
capabilities: string
+ dependencies?: PluginDependencies
+ dependencyStatus?: DependencyStatus
+ dependencyIssues?: DependencyIssues
}
interface RegistryItem {
id: string
@@ -48,6 +57,8 @@ interface RegistryItem {
minTrekVersion: string | null
reviewedAt: string | null
screenshotUrl: string | null
+ requiredAddons?: string[]
+ pluginDependencies?: PluginDep[]
}
interface RegistryDetail extends RegistryItem {
size: number | null
@@ -58,11 +69,21 @@ interface RegistryDetail extends RegistryItem {
settings: Array<{ key: string; label: string; inputType: string; scope: string; required: boolean }>
license: string | null
icon: string | null
+ requiredAddons?: string[]
+ pluginDependencies?: PluginDep[]
} | null
}
+/** 409 error-body shape from POST /activate when a dependency blocks activation. */
+interface ActivateErr {
+ response?: {
+ status?: number
+ data?: { code?: string; error?: string; newPermissions?: string[]; newEgress?: string[]; addons?: string[]; missing?: PluginDep[]; versionMismatch?: VersionMismatch[] }
+ }
+}
+
type T = (k: string, p?: Record<string, unknown>) => string
-type TypeFilter = 'all' | 'widget' | 'page' | 'integration'
+type TypeFilter = 'all' | 'widget' | 'page' | 'integration' | 'trip-page'
type StatusFilter = 'all' | 'on' | 'off' | 'update' | 'err'
type SortKey = 'name' | 'recent' | 'updates'
@@ -83,11 +104,15 @@ const ICON_MAP: Record<string, React.ComponentType<{ size?: number; className?:
// Known permissions → human-readable i18n key; unknown ones render as raw code.
const PERM_KEYS = [
- 'db:own', 'db:read:trips', 'db:read:users', 'ws:broadcast:trip', 'ws:broadcast:user',
- 'hook:photo-provider', 'hook:calendar-source', 'http:outbound',
+ 'db:own', 'db:read:trips', 'db:read:users', 'db:read:costs', 'db:read:packing', 'db:read:files', 'db:write:costs',
+ 'db:write:places', 'db:write:days', 'db:write:itinerary', 'db:write:trips',
+ 'db:meta',
+ 'events:subscribe',
+ 'ws:broadcast:trip', 'ws:broadcast:user',
+ 'hook:photo-provider', 'hook:calendar-source', 'hook:place-detail-provider', 'hook:trip-warning-provider', 'http:outbound',
]
-const KNOWN_TYPES = ['widget', 'page', 'integration']
+const KNOWN_TYPES = ['widget', 'page', 'integration', 'trip-page']
function isNewer(a: string, b: string): boolean {
const nums = (v: string) => v.split('-')[0].split('.').map(n => parseInt(n, 10) || 0)
@@ -111,16 +136,50 @@ function deriveCaps(perms: string[], caps: { widget?: { slot?: string } }, t: T)
const out: Cap[] = []
if (perms.includes('db:read:trips')) out.push({ icon: Database, label: t('admin.plugins.cap.readsTrips') })
if (perms.includes('db:read:users')) out.push({ icon: Users, label: t('admin.plugins.cap.readsUsers') })
- if (caps.widget) out.push({ icon: LayoutDashboard, label: t(caps.widget.slot === 'hero' ? 'admin.plugins.cap.heroWidget' : 'admin.plugins.cap.widget') })
+ if (perms.includes('db:write:costs')) out.push({ icon: Wallet, label: t('admin.plugins.cap.writesCosts') })
+ else if (perms.includes('db:read:costs')) out.push({ icon: Wallet, label: t('admin.plugins.cap.readsCosts') })
+ if (perms.includes('db:read:packing')) out.push({ icon: Luggage, label: t('admin.plugins.cap.readsPacking') })
+ if (perms.includes('db:read:files')) out.push({ icon: FileText, label: t('admin.plugins.cap.readsFiles') })
+ if (perms.includes('db:write:places')) out.push({ icon: MapPin, label: t('admin.plugins.cap.writesPlaces') })
+ if (perms.includes('db:write:days')) out.push({ icon: CalendarDays, label: t('admin.plugins.cap.writesDays') })
+ if (perms.includes('db:write:itinerary')) out.push({ icon: ListChecks, label: t('admin.plugins.cap.writesItinerary') })
+ if (perms.includes('db:write:trips')) out.push({ icon: Pencil, label: t('admin.plugins.cap.writesTrips') })
+ if (perms.includes('db:meta')) out.push({ icon: Tag, label: t('admin.plugins.cap.metadata') })
+ if (caps.widget) {
+ const slotKey = caps.widget.slot === 'hero' ? 'admin.plugins.cap.heroWidget'
+ : caps.widget.slot === 'place-detail' ? 'admin.plugins.cap.placeSlot'
+ : 'admin.plugins.cap.widget'
+ out.push({ icon: LayoutDashboard, label: t(slotKey as never) })
+ }
if (perms.some(p => p.startsWith('ws:broadcast'))) out.push({ icon: Radio, label: t('admin.plugins.cap.realtime') })
if (perms.includes('hook:photo-provider')) out.push({ icon: Image, label: t('admin.plugins.cap.photos') })
if (perms.includes('hook:calendar-source')) out.push({ icon: CalendarDays, label: t('admin.plugins.cap.calendar') })
+ if (perms.includes('hook:place-detail-provider')) out.push({ icon: MapPin, label: t('admin.plugins.cap.placeDetails') })
+ if (perms.includes('hook:trip-warning-provider')) out.push({ icon: AlertTriangle, label: t('admin.plugins.cap.warnings') })
+ if (perms.includes('events:subscribe')) out.push({ icon: Radio, label: t('admin.plugins.cap.events') })
for (const h of perms.filter(p => p.startsWith('http:outbound:')).map(p => p.slice('http:outbound:'.length)).filter(Boolean)) {
out.push({ icon: ArrowRight, label: h, net: true })
}
return out
}
+interface DepChip { icon: React.ComponentType<{ size?: number; className?: string }>; label: string; blocked: boolean }
+
+// A plugin's declared dependencies as chips — a required addon (amber when that
+// addon is disabled) or a plugin dependency (amber when missing / version-mismatched).
+function deriveDeps(p: PluginRow, t: T): DepChip[] {
+ const out: DepChip[] = []
+ const issues = p.dependencyIssues
+ for (const a of p.dependencies?.requiredAddons ?? []) {
+ out.push({ icon: Blocks, label: t('admin.plugins.cap.requiresAddon', { addon: a }), blocked: !!issues?.disabledAddons.includes(a) })
+ }
+ for (const d of p.dependencies?.pluginDependencies ?? []) {
+ const blocked = !!(issues?.missing.some(m => m.id === d.id) || issues?.versionMismatch.some(m => m.id === d.id))
+ out.push({ icon: Puzzle, label: t('admin.plugins.cap.dependsOn', { id: d.id, version: d.version }), blocked })
+ }
+ return out
+}
+
function PluginIcon({ name, size = 20, className }: { name: string | null; size?: number; className?: string }) {
const Icon = (name && Object.prototype.hasOwnProperty.call(ICON_MAP, name) && ICON_MAP[name]) || Blocks
return <Icon size={size} className={className} />
@@ -135,6 +194,16 @@ function ReviewedBadge({ t, compact }: { t: T; compact?: boolean }) {
)
}
+/** Marks a manually-uploaded (sideloaded) plugin: no registry, unsigned, not reviewed. */
+function SideloadedBadge({ t }: { t: T }) {
+ return (
+ <span className="inline-flex items-center gap-1 px-1.5 py-[2px] rounded-md text-[11px] font-medium bg-warning-soft text-warning border border-warning/25"
+ title={t('admin.plugins.sideloadedHint')}>
+ <UploadCloud size={11} /> {t('admin.plugins.sideloaded')}
+ </span>
+ )
+}
+
function TypeBadge({ type, t }: { type: string; t: T }) {
return (
<span className="inline-flex items-center px-2 py-0.5 rounded-md text-[10px] font-semibold uppercase tracking-wide bg-accent-subtle text-content-muted">
@@ -160,6 +229,8 @@ export default function AdminPluginsPanel() {
// A QUEUE, not one slot: "Update All" can produce several re-consent prompts —
// each must be shown, not silently overwritten by the last one.
const [consentQueue, setConsentQueue] = useState<Array<{ plugin: PluginRow; version: string; newPermissions: string[]; newEgress: string[] }>>([])
+ // Open when enabling a plugin is blocked by missing/outdated plugin dependencies.
+ const [depResolve, setDepResolve] = useState<{ plugin: PluginRow; missing: PluginDep[]; versionMismatch: VersionMismatch[] } | null>(null)
const [menu, setMenu] = useState<string | null>(null)
// Toolbar state.
@@ -168,6 +239,11 @@ export default function AdminPluginsPanel() {
const [statusFilter, setStatusFilter] = useState<StatusFilter>('all')
const [sort, setSort] = useState<SortKey>('name')
+ // Sideload upload: drag a plugin .zip onto the panel or use the toolbar button.
+ const [dragActive, setDragActive] = useState(false)
+ const uploadInputRef = useRef<HTMLInputElement>(null)
+ const dragDepth = useRef(0)
+
const refresh = () => {
adminApi.plugins()
.then((d: { enabled: boolean; plugins: PluginRow[] }) => {
@@ -199,6 +275,43 @@ export default function AdminPluginsPanel() {
setView('discover')
if (!registry) adminApi.pluginBrowse().then(setRegistry).catch(() => setRegistry([]))
}
+ // The rescan/reload button rediscovers locally-installed plugins AND force-pulls
+ // the remote registry (bypassing the 30-min server cache + GitHub's CDN), so a
+ // just-published plugin shows up right away instead of up to ~35 min later.
+ const rescan = () => act('__rescan', async () => {
+ await adminApi.pluginRescan()
+ const items: RegistryItem[] = await adminApi.pluginBrowse(true)
+ setRegistry(items)
+ const map: Record<string, string> = {}
+ items.forEach((i) => { if (i.latest) map[i.id] = i.latest })
+ setLatest(map)
+ }, t('admin.plugins.rescanned'))
+
+ // Sideload a plugin archive (installs INACTIVE — the admin still consents on activation).
+ const uploadPlugin = async (file: File) => {
+ setBusy('__upload'); setMenu(null)
+ try {
+ const res = await adminApi.pluginUpload(file)
+ setView('installed')
+ toast.success(t('admin.plugins.uploaded', { name: res.id }))
+ } catch (e) {
+ toast.error((e as { response?: { data?: { error?: string } } })?.response?.data?.error || t('admin.plugins.actionError'))
+ } finally {
+ setBusy(null); refresh()
+ }
+ }
+ const pickUpload = () => uploadInputRef.current?.click()
+ const onDragEnter = (e: DragEvent) => {
+ if (!runtimeOn || !Array.from(e.dataTransfer.types).includes('Files')) return
+ e.preventDefault(); dragDepth.current++; setDragActive(true)
+ }
+ const onDragLeave = () => { if (--dragDepth.current <= 0) { dragDepth.current = 0; setDragActive(false) } }
+ const onDrop = (e: DragEvent) => {
+ e.preventDefault(); dragDepth.current = 0; setDragActive(false)
+ if (!runtimeOn) return
+ const f = e.dataTransfer.files?.[0]
+ if (f) void uploadPlugin(f)
+ }
const openErrors = (id: string) => {
setMenu(null)
adminApi.pluginErrors(id)
@@ -211,23 +324,63 @@ export default function AdminPluginsPanel() {
const restart = (id: string) => act(id, async () => { await adminApi.pluginDeactivate(id); await adminApi.pluginActivate(id) }, t('admin.plugins.restarted'))
const installedIds = new Set(plugins.map(p => p.id))
+ // Installed-but-disabled direct deps that enabling `p` will auto-enable first.
+ const autoEnabledDeps = (p: PluginRow) =>
+ (p.dependencies?.pluginDependencies ?? [])
+ .map(d => plugins.find(x => x.id === d.id))
+ .filter((x): x is PluginRow => !!x && x.enabled === 0)
+ .map(x => x.name)
+
+ // Shared handling for a failed activation: route each 409 code to the right fix
+ // (consent dialog, download-dependency dialog, or a clear toast).
+ const onActivateError = (p: PluginRow, e: ActivateErr) => {
+ const d = e?.response?.data
+ if (e?.response?.status === 409 && d?.code === 'CONSENT_REQUIRED') {
+ setConsentQueue(qq => [...qq, { plugin: p, version: latest[p.id] ?? p.version ?? '', newPermissions: d.newPermissions ?? [], newEgress: d.newEgress ?? [] }])
+ } else if (e?.response?.status === 409 && d?.code === 'ADDON_DISABLED') {
+ toast.error(t('admin.plugins.dep.addonDisabledToast', { addons: (d.addons ?? []).join(', ') }))
+ } else if (e?.response?.status === 409 && d?.code === 'DEPENDENCY_MISSING') {
+ setDepResolve({ plugin: p, missing: d.missing ?? [], versionMismatch: d.versionMismatch ?? [] })
+ } else {
+ // DEPENDENCY_CYCLE and everything else surface their server message.
+ toast.error(d?.error || t('admin.plugins.actionError'))
+ }
+ }
+
+ const attemptActivate = (p: PluginRow) => {
+ const cascaded = autoEnabledDeps(p)
+ return adminApi.pluginActivate(p.id)
+ .then(() => {
+ toast.success(t('admin.plugins.activated'))
+ if (cascaded.length) toast.success(t('admin.plugins.dep.autoEnabled', { plugins: cascaded.join(', ') }))
+ setDepResolve(null)
+ })
+ .catch((e: ActivateErr) => onActivateError(p, e))
+ }
+
// Enable/disable a plugin. Re-enabling one whose update widened its permissions
- // must NOT grant them silently — the server answers 409 CONSENT_REQUIRED and we
- // route through the same consent dialog the Update button uses.
+ // must NOT grant them silently (409 CONSENT_REQUIRED → consent dialog); a disabled
+ // required addon or a missing plugin dependency (409 ADDON_DISABLED /
+ // DEPENDENCY_MISSING) routes to the right remedy.
const toggle = (p: PluginRow) => {
if (busy === p.id) return
if (p.enabled === 1) { void act(p.id, () => adminApi.pluginDeactivate(p.id), t('admin.plugins.deactivated')); return }
setBusy(p.id); setMenu(null)
- adminApi.pluginActivate(p.id)
- .then(() => toast.success(t('admin.plugins.activated')))
- .catch((e: { response?: { status?: number; data?: { code?: string; error?: string; newPermissions?: string[]; newEgress?: string[] } } }) => {
- const d = e?.response?.data
- if (e?.response?.status === 409 && d?.code === 'CONSENT_REQUIRED') {
- setConsentQueue(qq => [...qq, { plugin: p, version: latest[p.id] ?? p.version ?? '', newPermissions: d.newPermissions ?? [], newEgress: d.newEgress ?? [] }])
- } else {
- toast.error(d?.error || t('admin.plugins.actionError'))
- }
+ attemptActivate(p).finally(() => { setBusy(null); refresh() })
+ }
+
+ // Download a missing/outdated plugin dependency (latest compatible for its range,
+ // transitively), then retry enabling the plugin that needed it.
+ const resolveDependency = (parent: PluginRow, depId: string, constraint?: string) => {
+ if (busy === parent.id) return
+ setBusy(parent.id)
+ adminApi.pluginInstall(depId, { constraint, withDependencies: true })
+ .then((r: { installed?: string[]; requiredAddons?: string[] }) => {
+ toast.success(t('admin.plugins.dep.downloaded', { id: depId }))
+ if (r?.requiredAddons?.length) toast.error(t('admin.plugins.dep.addonDisabledToast', { addons: r.requiredAddons.join(', ') }))
+ return attemptActivate(parent)
})
+ .catch((e: ActivateErr) => onActivateError(parent, e))
.finally(() => { setBusy(null); refresh() })
}
@@ -285,7 +438,18 @@ export default function AdminPluginsPanel() {
const anyFilter = q.trim() !== '' || typeFilter !== 'all' || statusFilter !== 'all'
return (
- <div className="relative bg-surface-card border border-edge rounded-2xl shadow-card mb-24 sm:mb-0">
+ <div className="relative bg-surface-card border border-edge rounded-2xl shadow-card mb-24 sm:mb-0"
+ onDragEnter={onDragEnter} onDragOver={e => { if (dragActive) e.preventDefault() }} onDragLeave={onDragLeave} onDrop={onDrop}>
+ {/* Hidden input for the toolbar "Upload plugin" button (drag-drop uses the same handler). */}
+ <input ref={uploadInputRef} type="file" accept=".zip,.tgz,.tar.gz" className="hidden"
+ onChange={e => { const f = e.target.files?.[0]; if (f) void uploadPlugin(f); e.target.value = '' }} />
+ {/* Drag-to-install overlay */}
+ {dragActive && (
+ <div className="absolute inset-0 z-40 rounded-2xl border-2 border-dashed border-accent bg-accent-soft/70 backdrop-blur-[2px] flex flex-col items-center justify-center gap-2.5 pointer-events-none">
+ <UploadCloud size={34} className="text-accent" />
+ <span className="text-sm font-semibold text-accent">{t('admin.plugins.dropToUpload')}</span>
+ </div>
+ )}
{/* Click-away layer for any open dropdown (filters or a row's ⋯ menu). */}
{menu && <div className="fixed inset-0 z-20" onClick={() => setMenu(null)} />}
{/* Header */}
@@ -324,10 +488,16 @@ export default function AdminPluginsPanel() {
<SegBtn active={view === 'installed'} onClick={() => setView('installed')} label={t('admin.plugins.installed')} count={plugins.length} />
<SegBtn active={view === 'discover'} onClick={openDiscover} label={t('admin.plugins.tabDiscover')} count={registry?.length} />
</div>
- <button onClick={() => act('__rescan', adminApi.pluginRescan, t('admin.plugins.rescanned'))} title={t('admin.plugins.rescan')}
- className="sm:hidden h-[38px] w-[38px] grid place-items-center rounded-xl border border-edge bg-surface-card text-content-muted hover:text-content hover:border-content-faint transition-colors shrink-0">
- <RefreshCw size={15} />
- </button>
+ <div className="sm:hidden flex items-center gap-2 shrink-0">
+ <button onClick={pickUpload} title={t('admin.plugins.upload')}
+ className="h-[38px] w-[38px] grid place-items-center rounded-xl border border-edge bg-surface-card text-content-muted hover:text-content hover:border-content-faint transition-colors">
+ <UploadCloud size={15} />
+ </button>
+ <button onClick={rescan} title={t('admin.plugins.rescan')}
+ className="h-[38px] w-[38px] grid place-items-center rounded-xl border border-edge bg-surface-card text-content-muted hover:text-content hover:border-content-faint transition-colors">
+ <RefreshCw size={15} />
+ </button>
+ </div>
</div>
<div className="relative w-full sm:flex-1 sm:min-w-[160px]">
@@ -344,6 +514,7 @@ export default function AdminPluginsPanel() {
options={[
['all', t('admin.plugins.allTypes')], ['widget', t('admin.plugins.type.widget')],
['integration', t('admin.plugins.type.integration')], ['page', t('admin.plugins.type.page')],
+ ['trip-page', t('admin.plugins.type.trip-page')],
]}
valueLabel={typeFilter === 'all' ? t('admin.plugins.allTypes') : t(`admin.plugins.type.${typeFilter}` as never)}
onPick={v => setTypeFilter(v as TypeFilter)} />
@@ -363,7 +534,11 @@ export default function AdminPluginsPanel() {
valueLabel={sortLabel(sort, t)}
onPick={v => setSort(v as SortKey)} />
- <button onClick={() => act('__rescan', adminApi.pluginRescan, t('admin.plugins.rescanned'))} title={t('admin.plugins.rescan')}
+ <button onClick={pickUpload} title={t('admin.plugins.upload')}
+ className="hidden sm:grid h-[38px] w-[38px] place-items-center rounded-xl border border-edge bg-surface-card text-content-muted hover:text-content hover:border-content-faint transition-colors">
+ <UploadCloud size={15} />
+ </button>
+ <button onClick={rescan} title={t('admin.plugins.rescan')}
className="hidden sm:grid h-[38px] w-[38px] place-items-center rounded-xl border border-edge bg-surface-card text-content-muted hover:text-content hover:border-content-faint transition-colors">
<RefreshCw size={15} />
</button>
@@ -462,6 +637,14 @@ export default function AdminPluginsPanel() {
onLater={() => { setConsentQueue(qq => qq.slice(1)); toast.success(t('admin.plugins.updateKeptOff')) }}
/>
)}
+
+ {depResolve && (
+ <DependencyResolveDialog
+ data={depResolve} t={t} busy={busy === depResolve.plugin.id} installedIds={installedIds}
+ onDownload={(depId, constraint) => resolveDependency(depResolve.plugin, depId, constraint)}
+ onClose={() => setDepResolve(null)}
+ />
+ )}
</div>
)
}
@@ -541,6 +724,7 @@ function InstalledRow({ p, t, busy, menu, setMenu, hasUpdate, latestVer, onToggl
onToggle: () => void; onUpdate: () => void; onRestart: () => void; onErrors: () => void; onUninstall: () => void
}) {
const caps = deriveCaps(parseJson<string[]>(p.permissions, []), parseJson<{ widget?: { slot?: string } }>(p.capabilities, {}), t)
+ const deps = deriveDeps(p, t)
const menuOpen = menu === `row:${p.id}`
return (
<div className="group relative flex items-center gap-3 sm:gap-4 px-2.5 sm:px-3 py-3.5 rounded-2xl hover:bg-surface-secondary transition-colors">
@@ -557,6 +741,7 @@ function InstalledRow({ p, t, busy, menu, setMenu, hasUpdate, latestVer, onToggl
<span className="text-[14.5px] font-semibold tracking-[-.006em] text-content">{p.name}</span>
{p.version && <span className="text-[11.5px] text-content-faint font-medium tabular-nums">v{p.version}</span>}
{p.reviewed_at && <ReviewedBadge t={t} compact />}
+ {p.source_repo === 'local:upload' && <SideloadedBadge t={t} />}
</div>
{p.description && <p className="text-[12.5px] text-content-muted mt-0.5 truncate">{p.description}</p>}
{p.status === 'error' && p.last_error ? (
@@ -573,6 +758,16 @@ function InstalledRow({ p, t, busy, menu, setMenu, hasUpdate, latestVer, onToggl
))}
</div>
)}
+ {deps.length > 0 && (
+ <div className="hidden sm:flex items-center gap-1.5 flex-wrap mt-1.5">
+ {deps.map((d, i) => (
+ <span key={i} className={`inline-flex items-center gap-1.5 text-[11px] font-medium px-2 py-[3px] rounded-md border ${
+ d.blocked ? 'text-warning border-warning/30 bg-warning-soft' : 'text-content-secondary border-edge-secondary bg-surface-tertiary'}`}>
+ <d.icon size={12} className={d.blocked ? 'text-warning' : 'text-content-muted'} />{d.label}
+ </span>
+ ))}
+ </div>
+ )}
</div>
<div className="flex items-center gap-1.5 sm:gap-2 shrink-0">
@@ -597,7 +792,7 @@ function InstalledRow({ p, t, busy, menu, setMenu, hasUpdate, latestVer, onToggl
<MenuItem icon={<RotateCw size={14} />} label={t('admin.plugins.restart')} onClick={onRestart} />
)}
<MenuItem icon={<Bug size={14} />} label={t('admin.plugins.viewErrors')} onClick={onErrors} />
- {p.source_repo && (
+ {p.source_repo && p.source_repo !== 'local:upload' && (
<a href={`https://github.com/${p.source_repo}`} target="_blank" rel="noreferrer" onClick={() => setMenu(null)}
className="w-full flex items-center gap-2.5 px-2.5 py-2 rounded-lg text-[13px] text-content-secondary hover:bg-surface-tertiary transition-colors">
<Github size={14} /> {t('admin.plugins.sourceRepo')}
@@ -875,6 +1070,57 @@ function UpdateConsentDialog({ data, t, onApprove, onLater }: {
)
}
+// Shown when enabling a plugin is blocked by missing/outdated plugin dependencies.
+// Each dependency gets a one-click download (latest version satisfying its range,
+// transitively) that then retries enabling the plugin.
+function DependencyResolveDialog({ data, t, busy, installedIds, onDownload, onClose }: {
+ data: { plugin: PluginRow; missing: PluginDep[]; versionMismatch: VersionMismatch[] }
+ t: T; busy: boolean; installedIds: Set<string>
+ onDownload: (depId: string, constraint?: string) => void; onClose: () => void
+}) {
+ const rows: Array<{ id: string; constraint: string; installed?: string }> = [
+ ...data.missing.map(d => ({ id: d.id, constraint: d.version })),
+ ...data.versionMismatch.map(d => ({ id: d.id, constraint: d.wanted, installed: d.installed })),
+ ]
+ return (
+ <div className="fixed inset-0 z-50 flex items-center justify-center bg-black/50 p-4" onClick={onClose}>
+ <div className="bg-surface-card border border-edge rounded-2xl w-full max-w-md shadow-modal overflow-hidden" onClick={e => e.stopPropagation()}>
+ <div className="px-5 py-4 border-b border-edge-secondary flex items-start gap-3">
+ <div className="w-9 h-9 rounded-lg bg-warning-soft grid place-items-center shrink-0"><Puzzle size={18} className="text-warning" /></div>
+ <div>
+ <h3 className="text-sm font-semibold text-content">{t('admin.plugins.dep.resolveTitle')}</h3>
+ <p className="text-xs text-content-muted mt-1">{t('admin.plugins.dep.resolveBody', { name: data.plugin.name })}</p>
+ </div>
+ </div>
+ <div className="p-5 space-y-2.5">
+ {rows.map(r => (
+ <div key={r.id} className="flex items-center gap-3 p-3 rounded-xl border border-edge-secondary bg-surface-tertiary">
+ <div className="min-w-0 flex-1">
+ <div className="text-[13px] font-semibold text-content truncate">{r.id}</div>
+ <div className="text-[11.5px] text-content-muted mt-0.5">
+ {r.installed
+ ? t('admin.plugins.dep.mismatch', { wanted: r.constraint, installed: r.installed })
+ : t('admin.plugins.dep.requires', { version: r.constraint })}
+ </div>
+ </div>
+ <button onClick={() => onDownload(r.id, r.constraint)} disabled={busy}
+ className="inline-flex items-center gap-1.5 text-[11.5px] font-semibold px-3 py-1.5 rounded-full bg-accent text-accent-text hover:bg-accent-hover transition-colors disabled:opacity-50 shrink-0">
+ <Download size={13} /> {r.installed ? t('admin.plugins.dep.update') : t('admin.plugins.dep.download')}
+ </button>
+ </div>
+ ))}
+ {rows.some(r => !installedIds.has(r.id)) && (
+ <p className="text-[11.5px] text-content-faint pt-1">{t('admin.plugins.dep.resolveHint')}</p>
+ )}
+ </div>
+ <div className="px-5 py-3.5 border-t border-edge-secondary bg-surface-secondary flex items-center justify-end">
+ <button onClick={onClose} className="text-xs font-medium px-3.5 py-2 rounded-lg border border-edge text-content-muted hover:text-content hover:bg-surface-tertiary transition-colors">{t('common.cancel')}</button>
+ </div>
+ </div>
+ </div>
+ )
+}
+
// Footer: a plain-language note on what "Reviewed" means, plus a collapsible
// panel that lays out how plugins are contained, the limits, and the worst case.
function SecurityInfo({ t }: { t: T }) {
diff --git a/client/src/components/Budget/CostsPanel.test.tsx b/client/src/components/Budget/CostsPanel.test.tsx
index 9c530a380..7899e2b83 100644
--- a/client/src/components/Budget/CostsPanel.test.tsx
+++ b/client/src/components/Budget/CostsPanel.test.tsx
@@ -4,6 +4,7 @@ import { http, HttpResponse } from 'msw'
import { server } from '../../../tests/helpers/msw/server'
import { useAuthStore } from '../../store/authStore'
import { useTripStore } from '../../store/tripStore'
+import { useSettingsStore } from '../../store/settingsStore'
import { resetAllStores, seedStore } from '../../../tests/helpers/store'
import { buildUser, buildTrip, buildBudgetItem } from '../../../tests/helpers/factories'
import CostsPanel from './CostsPanel'
@@ -164,6 +165,28 @@ describe('CostsPanel — settlements in the ledger', () => {
expect(screen.getByText('Unfinished')).toBeInTheDocument()
})
+ it('sums only unfinished expenses in the Outstanding amount card', async () => {
+ // Display in the trip's own currency so FX conversion is an identity — keeps the asserted sum deterministic.
+ seedStore(useSettingsStore, { settings: { ...useSettingsStore.getState().settings, default_currency: 'EUR' } })
+ const paid = { ...buildBudgetItem({ trip_id: 1, category: 'food', name: 'Dinner' }), total_price: 60, payers: [{ user_id: 1, amount: 60, username: 'alice' }], members: [{ user_id: 1, username: 'alice', paid: 1 }] }
+ const unfinishedA = { ...buildBudgetItem({ trip_id: 1, category: 'lodging', name: 'Hotel' }), total_price: 90, payers: [], members: [{ user_id: 1, username: 'alice', paid: 0 }] }
+ const unfinishedB = { ...buildBudgetItem({ trip_id: 1, category: 'transport', name: 'Taxi' }), total_price: 30, payers: [], members: [{ user_id: 1, username: 'alice', paid: 0 }] }
+ const zero = { ...buildBudgetItem({ trip_id: 1, category: 'misc', name: 'Freebie' }), total_price: 0, payers: [], members: [{ user_id: 1, username: 'alice', paid: 0 }] }
+ server.use(
+ http.get('/api/trips/1/budget', () => HttpResponse.json({ items: [paid, unfinishedA, unfinishedB, zero] })),
+ http.get('/api/trips/1/budget/settlement', () => HttpResponse.json({ balances: [], flows: [], settlements: [] })),
+ )
+ render(<CostsPanel tripId={1} tripMembers={tripMembers} />)
+
+ // Footer only shows the count once unfinished expenses have loaded.
+ const foot = await screen.findByText('expenses need a payer')
+ expect(foot).toHaveTextContent('2 expenses need a payer') // the two payer-less, non-zero expenses
+ // Sum is 90 + 30 = 120 — the paid (60) and zero-total items are excluded.
+ // Sum is 90 + 30 = 120 — the paid (60) and zero-total items are excluded.
+ const card = screen.getByText('Outstanding amount').closest('div[style*="border-radius: 22"]')
+ expect(card).toHaveTextContent('120') // 120,00 € (locale separator), i.e. 90 + 30
+ })
+
it('records a recorded-total expense with nobody to split with (#1286)', async () => {
let posted: Record<string, unknown> | null = null
server.use(
diff --git a/client/src/components/Budget/CostsPanel.tsx b/client/src/components/Budget/CostsPanel.tsx
index 2a35aba18..d5e622ccb 100644
--- a/client/src/components/Budget/CostsPanel.tsx
+++ b/client/src/components/Budget/CostsPanel.tsx
@@ -1,6 +1,6 @@
import { useState, useEffect, useMemo, useCallback } from 'react'
import { useSearchParams } from 'react-router-dom'
-import { ArrowDown, ArrowUp, BarChart3, Plus, Search, ArrowRight, ArrowLeftRight, Check, RotateCcw, Pencil, Trash2 } from 'lucide-react'
+import { ArrowDown, ArrowUp, BarChart3, Plus, Search, ArrowRight, ArrowLeftRight, Check, RotateCcw, Pencil, Trash2, AlertCircle } from 'lucide-react'
import { useTripStore } from '../../store/tripStore'
import { useAuthStore } from '../../store/authStore'
import { useSettingsStore } from '../../store/settingsStore'
@@ -179,6 +179,9 @@ export default function CostsPanel({ tripId, tripMembers = [] }: CostsPanelProps
const myShare = shares[me] || 0
return convert(myShare, curOf(e))
}
+ // "Unfinished": a recorded total nobody has paid yet — counts toward the trip
+ // total but stays out of settlements until who-paid is filled in.
+ const isUnfinished = (e: BudgetItem) => baseTotal(e) > 0 && (e.payers || []).filter(p => p.amount > 0).length === 0
const totals = useMemo(() => {
const totalSpend = budgetItems.reduce((a, e) => a + baseTotal(e), 0)
@@ -186,7 +189,9 @@ export default function CostsPanel({ tripId, tripMembers = [] }: CostsPanelProps
const myShare = budgetItems.reduce((a, e) => a + myShareOf(e), 0)
const owe = (settlement?.flows || []).filter(f => f.from.user_id === me).reduce((a, f) => a + f.amount, 0)
const owed = (settlement?.flows || []).filter(f => f.to.user_id === me).reduce((a, f) => a + f.amount, 0)
- return { totalSpend, myPaid, myShare, owe, owed }
+ const outstanding = budgetItems.reduce((a, e) => (isUnfinished(e) ? a + baseTotal(e) : a), 0)
+ const outstandingCount = budgetItems.filter(isUnfinished).length
+ return { totalSpend, myPaid, myShare, owe, owed, outstanding, outstandingCount }
}, [budgetItems, settlement, me])
// ── filtering + day grouping ────────────────────────────────────────────
@@ -254,7 +259,7 @@ export default function CostsPanel({ tripId, tripMembers = [] }: CostsPanelProps
// ── settle actions ──────────────────────────────────────────────────────
const settleFlow = async (fromId: number, toId: number, amount: number) => {
try {
- await budgetApi.createSettlement(tripId, { from_user_id: fromId, to_user_id: toId, amount })
+ await budgetApi.createSettlement(tripId, { from_user_id: fromId, to_user_id: toId, amount, currency: base })
loadSettlement()
} catch { toast.error(t('common.unknownError')) }
}
@@ -265,7 +270,7 @@ export default function CostsPanel({ tripId, tripMembers = [] }: CostsPanelProps
const flows = settlement?.flows || []
if (!flows.length) return
try {
- for (const f of flows) await budgetApi.createSettlement(tripId, { from_user_id: f.from.user_id, to_user_id: f.to.user_id, amount: f.amount })
+ for (const f of flows) await budgetApi.createSettlement(tripId, { from_user_id: f.from.user_id, to_user_id: f.to.user_id, amount: f.amount, currency: base })
loadSettlement()
} catch { toast.error(t('common.unknownError')) }
}
@@ -369,7 +374,7 @@ export default function CostsPanel({ tripId, tripMembers = [] }: CostsPanelProps
</div>
{/* ── Summary cards ── */}
- <div style={{ display: 'grid', gridTemplateColumns: '1fr 1fr 1.15fr', gap: 16, marginBottom: 36 }} className="costs-summary">
+ <div style={{ display: 'grid', gridTemplateColumns: 'repeat(4, 1fr)', gap: 16, marginBottom: 36 }} className="costs-summary">
<SummaryCard label={t('costs.youOwe')} sub={t('costs.youOweSub')} amount={totals.owe} currency={base} locale={locale}
icon={<ArrowDown size={18} />} tone="owe"
foot={totals.owe > 0.01
@@ -380,6 +385,11 @@ export default function CostsPanel({ tripId, tripMembers = [] }: CostsPanelProps
foot={totals.owed > 0.01
? <FlowPills ids={(settlement?.flows || []).filter(f => f.to.user_id === me).map(f => f.from.user_id)} lead={t('costs.from')} Avatar={Avatar} name={personName} />
: <span className="text-content-faint">{t('costs.nothingOwed')}</span>} />
+ <SummaryCard label={t('costs.outstanding')} sub={t('costs.outstandingSub')} amount={totals.outstanding} currency={base} locale={locale}
+ icon={<AlertCircle size={18} />} tone="unfinished"
+ foot={totals.outstandingCount > 0
+ ? <span><b>{totals.outstandingCount}</b> {t('costs.outstandingItems')}</span>
+ : <span className="text-content-faint">{t('costs.allSettled')}</span>} />
<SummaryCard label={t('costs.totalSpend')} sub={t('costs.totalSpendSub')} amount={totals.totalSpend} currency={base} locale={locale}
icon={<BarChart3 size={18} />} tone="total"
foot={<span style={{ display: 'flex', gap: 16 }}><span>{t('costs.yourShare')} · <b>{fmt0(totals.myShare)}</b></span><span>{t('costs.youPaid')} · <b>{fmt0(totals.myPaid)}</b></span></span>} />
@@ -475,7 +485,7 @@ export default function CostsPanel({ tripId, tripMembers = [] }: CostsPanelProps
)}
{(editingSettlement || addingPayment) && (
- <SettlementModal tripId={tripId} people={people} me={me} editing={editingSettlement}
+ <SettlementModal tripId={tripId} people={people} me={me} editing={editingSettlement} currency={base}
onClose={() => { setEditingSettlement(null); setAddingPayment(false) }}
onSaved={() => { setEditingSettlement(null); setAddingPayment(false); loadSettlement() }} />
)}
@@ -511,9 +521,12 @@ export default function CostsPanel({ tripId, tripMembers = [] }: CostsPanelProps
.costs-root .text-content-faint { color: var(--c-ink3) !important; }
.costs-root .exp-actions { opacity: 1; }
@media (max-width: 1100px) {
- .costs-root .costs-summary { grid-template-columns: 1fr !important; }
+ .costs-root .costs-summary { grid-template-columns: 1fr 1fr !important; }
.costs-root .costs-grid { grid-template-columns: 1fr !important; }
}
+ @media (max-width: 640px) {
+ .costs-root .costs-summary { grid-template-columns: 1fr !important; }
+ }
`}</style>
</div>
)
@@ -580,6 +593,18 @@ export default function CostsPanel({ tripId, tripMembers = [] }: CostsPanelProps
</div>
</div>
+ {/* Outstanding */}
+ <div className={cardCls} style={{ borderRadius: 18, padding: 16 }}>
+ <div style={{ display: 'flex', alignItems: 'center', gap: 11 }}>
+ <div style={{ width: 34, height: 34, borderRadius: 10, display: 'grid', placeItems: 'center', background: '#d9770622', color: '#d97706', flexShrink: 0 }}><AlertCircle size={17} /></div>
+ <div style={{ minWidth: 0 }}>
+ <div className="text-content" style={{ fontSize: 'calc(12.5px * var(--fs-scale-body, 1))', fontWeight: 600 }}>{t('costs.outstanding')}</div>
+ <div className="text-content-faint" style={{ fontSize: 'calc(10.5px * var(--fs-scale-caption, 1))' }}>{t('costs.outstandingSub')}</div>
+ </div>
+ <div style={{ marginLeft: 'auto', fontSize: 'calc(27px * var(--fs-scale-title, 1))', fontWeight: 700, letterSpacing: '-0.03em', lineHeight: 1, display: 'flex', alignItems: 'baseline', color: '#d97706' }}>{bigMoney(totals.outstanding, 16, 'var(--c-ink3)')}</div>
+ </div>
+ </div>
+
{/* Settle up */}
<div className={cardCls} style={{ borderRadius: 18, padding: 16 }}>
<div style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between', marginBottom: 14, gap: 8 }}>
@@ -645,21 +670,19 @@ export default function CostsPanel({ tripId, tripMembers = [] }: CostsPanelProps
const cur = curOf(e)
const payers = (e.payers || []).filter(p => p.amount > 0)
const net = round2(myPaidOf(e) - myShareOf(e))
- // "Unfinished": a recorded total nobody has paid yet — counts toward the trip
- // total but stays out of settlements until who-paid is filled in.
- const isUnfinished = baseTotal(e) > 0 && payers.length === 0
+ const unfinished = isUnfinished(e)
return (
<div className="bg-surface-card border border-edge exp-row" style={{ display: 'grid', gridTemplateColumns: '46px 1fr auto', gap: 16, alignItems: 'center', borderRadius: 18, padding: '16px 20px' }}>
<span style={{ position: 'relative', width: 46, height: 46, borderRadius: 13, display: 'grid', placeItems: 'center', background: c.color + '22', color: c.color }}>
<Icon size={21} />
- {isMobile && isUnfinished && (
+ {isMobile && unfinished && (
<span title={t('costs.unfinishedHint')} style={{ position: 'absolute', bottom: -4, right: -4, width: 20, height: 20, borderRadius: '50%', background: '#d97706', color: '#fff', display: 'grid', placeItems: 'center', fontSize: 'calc(12px * var(--fs-scale-body, 1))', fontWeight: 800, lineHeight: 1, border: '2px solid var(--bg-card)' }}>!</span>
)}
</span>
<div style={{ minWidth: 0 }}>
<div style={{ display: 'flex', alignItems: 'center', gap: 7, marginBottom: 6 }}>
<span className="text-content" style={{ fontSize: 'calc(15px * var(--fs-scale-subtitle, 1))', fontWeight: 600 }}>{e.name}</span>
- {isUnfinished && !isMobile && (
+ {unfinished && !isMobile && (
<span title={t('costs.unfinishedHint')} style={{ display: 'inline-flex', alignItems: 'center', gap: 4, padding: '2px 8px 2px 6px', borderRadius: 999, background: 'rgba(217,119,6,0.14)', color: '#d97706', fontSize: 'calc(11px * var(--fs-scale-caption, 1))', fontWeight: 700, flexShrink: 0 }}>
<span style={{ width: 14, height: 14, borderRadius: '50%', background: '#d97706', color: '#fff', display: 'grid', placeItems: 'center', fontSize: 'calc(10px * var(--fs-scale-caption, 1))', fontWeight: 800 }}>!</span>
{t('costs.unfinished')}
@@ -786,9 +809,9 @@ export default function CostsPanel({ tripId, tripMembers = [] }: CostsPanelProps
}
// ── pure subcomponents ─────────────────────────────────────────────────────
-function SummaryCard({ label, sub, amount, currency, locale, icon, foot, tone }: { label: string; sub: string; amount: number; currency: string; locale: string; icon: React.ReactNode; foot: React.ReactNode; tone: 'owe' | 'owed' | 'total' }) {
+function SummaryCard({ label, sub, amount, currency, locale, icon, foot, tone }: { label: string; sub: string; amount: number; currency: string; locale: string; icon: React.ReactNode; foot: React.ReactNode; tone: 'owe' | 'owed' | 'total' | 'unfinished' }) {
const total = tone === 'total'
- const accent = tone === 'owe' ? '#dc2626' : tone === 'owed' ? '#16a34a' : undefined
+ const accent = tone === 'owe' ? '#dc2626' : tone === 'owed' ? '#16a34a' : tone === 'unfinished' ? '#d97706' : undefined
const muted = total ? 'rgba(255,255,255,0.55)' : 'var(--text-faint)'
// formatToParts keeps the design's "big integer + muted symbol/decimals" styling
// while letting Intl place the symbol and pick separators per locale + currency.
@@ -835,8 +858,8 @@ function FlowPills({ ids, lead, Avatar, name }: { ids: number[]; lead: string; A
// Add or edit a settle-up payment (from / to / amount). Reachable inline from the
// ledger row and from a manual "Add payment" button, so recording "I sent money to
// X" works the same whether or not there's an outstanding expense behind it.
-function SettlementModal({ tripId, people, me, editing, onClose, onSaved }: {
- tripId: number; people: TripMember[]; me: number; editing: Settlement | null; onClose: () => void; onSaved: () => void
+function SettlementModal({ tripId, people, me, editing, currency, onClose, onSaved }: {
+ tripId: number; people: TripMember[]; me: number; editing: Settlement | null; currency: string; onClose: () => void; onSaved: () => void
}) {
const { t } = useTranslation()
const toast = useToast()
@@ -853,7 +876,7 @@ function SettlementModal({ tripId, people, me, editing, onClose, onSaved }: {
const save = async () => {
if (!valid) return
setSaving(true)
- const data = { from_user_id: Number(fromId), to_user_id: Number(toId), amount: amt }
+ const data = { from_user_id: Number(fromId), to_user_id: Number(toId), amount: amt, currency }
try {
if (editing) await budgetApi.updateSettlement(tripId, editing.id, data)
else await budgetApi.createSettlement(tripId, data)
diff --git a/client/src/components/Files/FileManager.helpers.test.ts b/client/src/components/Files/FileManager.helpers.test.ts
new file mode 100644
index 000000000..dbb2bc6d3
--- /dev/null
+++ b/client/src/components/Files/FileManager.helpers.test.ts
@@ -0,0 +1,23 @@
+import { describe, it, expect } from 'vitest';
+import { isWalletPass } from './FileManager.helpers';
+
+describe('isWalletPass (#1447)', () => {
+ it('detects by extension when the mime is unreliable', () => {
+ // Browsers frequently send octet-stream / empty for .pkpass uploads
+ expect(isWalletPass('application/octet-stream', 'boarding.pkpass')).toBe(true);
+ expect(isWalletPass(null, 'multi.pkpasses')).toBe(true);
+ expect(isWalletPass('', 'CAPS.PKPASS')).toBe(true);
+ });
+
+ it('falls back to the wallet MIME types when there is no extension', () => {
+ expect(isWalletPass('application/vnd.apple.pkpass', 'pass')).toBe(true);
+ expect(isWalletPass('application/vnd.apple.pkpasses', null)).toBe(true);
+ });
+
+ it('is false for non-wallet files', () => {
+ expect(isWalletPass('application/pdf', 'report.pdf')).toBe(false);
+ expect(isWalletPass('image/png', 'photo.png')).toBe(false);
+ expect(isWalletPass('text/markdown', 'notes.md')).toBe(false);
+ expect(isWalletPass(null, null)).toBe(false);
+ });
+});
diff --git a/client/src/components/Files/FileManager.helpers.ts b/client/src/components/Files/FileManager.helpers.ts
index b9568e832..747f8fc0e 100644
--- a/client/src/components/Files/FileManager.helpers.ts
+++ b/client/src/components/Files/FileManager.helpers.ts
@@ -26,6 +26,18 @@ export function isMarkdown(mimeType?: string | null, name?: string | null) {
return !!mimeType && (mimeType === 'text/markdown' || mimeType === 'text/x-markdown')
}
+/**
+ * Apple Wallet pass (#1447). Detected by EXTENSION first — browsers often send an
+ * empty / octet-stream MIME for .pkpass — falling back to the wallet MIME types.
+ * Wallet passes must be downloaded so the OS hands them to Apple Wallet rather
+ * than rendered in the in-app PDF preview.
+ */
+export function isWalletPass(mimeType?: string | null, name?: string | null) {
+ const ext = (name || '').toLowerCase().split('.').pop()
+ if (ext === 'pkpass' || ext === 'pkpasses') return true
+ return !!mimeType && (mimeType === 'application/vnd.apple.pkpass' || mimeType === 'application/vnd.apple.pkpasses')
+}
+
export function getFileIcon(mimeType?: string | null) {
if (!mimeType) return File
if (mimeType === 'application/pdf') return FileText
diff --git a/client/src/components/Files/FileManager.test.tsx b/client/src/components/Files/FileManager.test.tsx
index cd4dd40fc..478caf79f 100644
--- a/client/src/components/Files/FileManager.test.tsx
+++ b/client/src/components/Files/FileManager.test.tsx
@@ -15,6 +15,15 @@ vi.mock('../../api/authUrl', () => ({
getAuthUrl: vi.fn().mockResolvedValue('http://localhost/signed-url'),
}));
+// Mock the blob download/open helpers so we can assert wallet passes are
+// downloaded (#1447) rather than opened in the in-app PDF preview.
+vi.mock('../../utils/fileDownload', () => ({
+ openFile: vi.fn().mockResolvedValue(undefined),
+ downloadFile: vi.fn().mockResolvedValue(undefined),
+}));
+
+import { openFile as openFileInTab } from '../../utils/fileDownload';
+
// Markdown pipeline mocked to render its children verbatim (the unified/ESM
// pipeline is heavy in jsdom) — we only assert the markdown text reaches the modal.
vi.mock('react-markdown', () => ({
@@ -313,6 +322,21 @@ describe('FileManager', () => {
});
});
+ it('FE-COMP-FILEMANAGER-035: pkpass click downloads via blob helper, not the PDF preview (#1447)', async () => {
+ const files = [buildFile({ id: 1, mime_type: 'application/octet-stream', original_name: 'boarding.pkpass', url: '/uploads/trips/1/boarding.pkpass' })];
+ render(<FileManager {...defaultProps} files={files} />);
+ const user = userEvent.setup();
+
+ await user.click(screen.getByText('boarding.pkpass'));
+
+ // Blob helper is called with the file url + name — the OS hands it to Wallet
+ await waitFor(() => {
+ expect(openFileInTab).toHaveBeenCalledWith('/uploads/trips/1/boarding.pkpass', 'boarding.pkpass');
+ });
+ // No PDF preview modal — the filename appears only once (in the list row)
+ expect(screen.getAllByText('boarding.pkpass').length).toBe(1);
+ });
+
it('FE-COMP-FILEMANAGER-015: file with uploader name shows avatar chip initials', () => {
const files = [buildFile({ uploaded_by_name: 'Alice Smith' })];
render(<FileManager {...defaultProps} files={files} />);
diff --git a/client/src/components/Files/useFileManager.ts b/client/src/components/Files/useFileManager.ts
index 93d2e3fe3..0bfcb5cc3 100644
--- a/client/src/components/Files/useFileManager.ts
+++ b/client/src/components/Files/useFileManager.ts
@@ -7,7 +7,8 @@ import type { Place, Reservation, TripFile, Day, AssignmentsMap } from '../../ty
import { useCanDo } from '../../store/permissionsStore'
import { useTripStore } from '../../store/tripStore'
import { getAuthUrl } from '../../api/authUrl'
-import { isImage, isMedia } from './FileManager.helpers'
+import { isImage, isMedia, isWalletPass } from './FileManager.helpers'
+import { openFile as openFileInTab } from '../../utils/fileDownload'
export interface FileManagerProps {
files?: TripFile[]
@@ -191,6 +192,10 @@ export function useFileManager({ files = [], onUpload, onDelete, onUpdate, place
if (isMedia(file.mime_type)) {
const idx = mediaFiles.findIndex(f => f.id === file.id)
setLightboxIndex(idx >= 0 ? idx : 0)
+ } else if (isWalletPass(file.mime_type, file.original_name)) {
+ // Download so the OS hands the pass to Apple Wallet (#1447) rather than
+ // forcing it into the in-app PDF preview.
+ openFileInTab(file.url, file.original_name).catch(() => {})
} else {
setPreviewFile(file)
}
diff --git a/client/src/components/Planner/DayPlanSidebar.test.tsx b/client/src/components/Planner/DayPlanSidebar.test.tsx
index 3c29bb8c0..a4763248d 100644
--- a/client/src/components/Planner/DayPlanSidebar.test.tsx
+++ b/client/src/components/Planner/DayPlanSidebar.test.tsx
@@ -129,6 +129,7 @@ beforeEach(() => {
resetAllStores()
vi.clearAllMocks()
sessionStorage.clear()
+ localStorage.clear()
// Reset mutable day-notes state
mockDayNotesState.noteUi = {}
mockDayNotesState.dayNotes = {}
diff --git a/client/src/components/Planner/DayPlanSidebar.tsx b/client/src/components/Planner/DayPlanSidebar.tsx
index a97acda7b..d37dfdfa2 100644
--- a/client/src/components/Planner/DayPlanSidebar.tsx
+++ b/client/src/components/Planner/DayPlanSidebar.tsx
@@ -96,6 +96,9 @@ interface DayPlanSidebarProps {
onScrollTopChange?: (top: number) => void
/** Mobile: show the route tools footer (Route toggle / Optimize / travel profile) on expanded days, since selecting a day closes the sheet */
showRouteToolsWhenExpanded?: boolean
+ /** Mobile: drag & drop reorder is disabled (touch-scroll hijack, #1432); the
+ * grip handle is hidden and the arrow reorder buttons take over instead. */
+ isMobile?: boolean
}
/**
@@ -140,6 +143,7 @@ function useDayPlanSidebar(props: DayPlanSidebarProps) {
initialScrollTop,
onScrollTopChange,
showRouteToolsWhenExpanded = false,
+ isMobile = false,
} = props
const toast = useToast()
const { t, language, locale } = useTranslation()
@@ -153,7 +157,7 @@ function useDayPlanSidebar(props: DayPlanSidebarProps) {
const [expandedDays, setExpandedDays] = useState(() => {
try {
- const saved = sessionStorage.getItem(`day-expanded-${tripId}`)
+ const saved = localStorage.getItem(`day-expanded-${tripId}`)
if (saved) return new Set<number>(JSON.parse(saved) as number[])
} catch {}
return new Set<number>(days.map(d => d.id))
@@ -260,7 +264,7 @@ function useDayPlanSidebar(props: DayPlanSidebarProps) {
setExpandedDays(prev => {
const n = new Set(prev)
days.forEach(d => { if (!prev.has(d.id)) n.add(d.id) })
- try { sessionStorage.setItem(`day-expanded-${tripId}`, JSON.stringify([...n])) } catch {}
+ try { localStorage.setItem(`day-expanded-${tripId}`, JSON.stringify([...n])) } catch {}
return n
})
}
@@ -293,7 +297,7 @@ function useDayPlanSidebar(props: DayPlanSidebarProps) {
setExpandedDays(prev => {
const n = new Set(prev)
n.has(dayId) ? n.delete(dayId) : n.add(dayId)
- try { sessionStorage.setItem(`day-expanded-${tripId}`, JSON.stringify([...n])) } catch {}
+ try { localStorage.setItem(`day-expanded-${tripId}`, JSON.stringify([...n])) } catch {}
return n
})
}
@@ -1019,6 +1023,7 @@ function useDayPlanSidebar(props: DayPlanSidebarProps) {
initialScrollTop,
onScrollTopChange,
showRouteToolsWhenExpanded,
+ isMobile,
toast,
t,
language,
@@ -1184,6 +1189,7 @@ const DayPlanSidebar = React.memo(function DayPlanSidebar(props: DayPlanSidebarP
initialScrollTop,
onScrollTopChange,
showRouteToolsWhenExpanded,
+ isMobile,
toast,
t,
language,
@@ -1648,9 +1654,9 @@ const DayPlanSidebar = React.memo(function DayPlanSidebar(props: DayPlanSidebarP
return (
<React.Fragment key={`place-${assignment.id}`}>
<div
- draggable={canEditDays}
+ draggable={canEditDays && !isMobile}
onDragStart={e => {
- if (!canEditDays) { e.preventDefault(); return }
+ if (!canEditDays || isMobile) { e.preventDefault(); return }
e.dataTransfer.setData('assignmentId', String(assignment.id))
e.dataTransfer.setData('fromDayId', String(day.id))
e.dataTransfer.effectAllowed = 'move'
@@ -1745,7 +1751,7 @@ const DayPlanSidebar = React.memo(function DayPlanSidebar(props: DayPlanSidebarP
opacity: isDraggingThis ? 0.4 : 1,
}}
>
- {canEditDays && <div className="dp-grip" style={{ flexShrink: 0, color: 'var(--text-faint)', display: 'flex', alignItems: 'center', opacity: 0.3, transition: 'opacity 0.15s', cursor: 'grab' }}>
+ {canEditDays && !isMobile && <div className="dp-grip" style={{ flexShrink: 0, color: 'var(--text-faint)', display: 'flex', alignItems: 'center', opacity: 0.3, transition: 'opacity 0.15s', cursor: 'grab' }}>
<GripVertical size={13} strokeWidth={1.8} />
</div>}
<div
@@ -2005,9 +2011,9 @@ const DayPlanSidebar = React.memo(function DayPlanSidebar(props: DayPlanSidebarP
const key = inBottom ? `transport-after-${res.id}${ls}-${day.id}` : `transport-${res.id}${ls}-${day.id}`
if (dropTargetRef.current !== key) setDropTargetKey(key)
}}
- draggable={canEditDays && spanPhase !== 'middle' && !res.__leg}
+ draggable={canEditDays && spanPhase !== 'middle' && !res.__leg && !isMobile}
onDragStart={e => {
- if (!canEditDays || spanPhase === 'middle' || res.__leg) { e.preventDefault(); return }
+ if (!canEditDays || spanPhase === 'middle' || res.__leg || isMobile) { e.preventDefault(); return }
// setData is required for the drag to start reliably (Firefox) and
// matches how place/note items initiate their drag.
e.dataTransfer.setData('reservationId', String(res.id))
@@ -2056,7 +2062,7 @@ const DayPlanSidebar = React.memo(function DayPlanSidebar(props: DayPlanSidebarP
opacity: draggingId === res.id ? 0.4 : spanPhase === 'middle' ? 0.65 : 1,
}}
>
- {canEditDays && spanPhase !== 'middle' && !res.__leg && (
+ {canEditDays && spanPhase !== 'middle' && !res.__leg && !isMobile && (
<div className="dp-grip" style={{ flexShrink: 0, color: 'var(--text-faint)', display: 'flex', alignItems: 'center', opacity: 0.3, transition: 'opacity 0.15s', cursor: 'grab' }}>
<GripVertical size={13} strokeWidth={1.8} />
</div>
@@ -2173,8 +2179,8 @@ const DayPlanSidebar = React.memo(function DayPlanSidebar(props: DayPlanSidebarP
return (
<React.Fragment key={`note-${note.id}`}>
<div
- draggable={canEditDays}
- onDragStart={e => { if (!canEditDays) { e.preventDefault(); return } e.dataTransfer.setData('noteId', String(note.id)); e.dataTransfer.setData('fromDayId', String(day.id)); e.dataTransfer.effectAllowed = 'move'; dragDataRef.current = { noteId: String(note.id), fromDayId: String(day.id) }; setDraggingId(`note-${note.id}`) }}
+ draggable={canEditDays && !isMobile}
+ onDragStart={e => { if (!canEditDays || isMobile) { e.preventDefault(); return } e.dataTransfer.setData('noteId', String(note.id)); e.dataTransfer.setData('fromDayId', String(day.id)); e.dataTransfer.effectAllowed = 'move'; dragDataRef.current = { noteId: String(note.id), fromDayId: String(day.id) }; setDraggingId(`note-${note.id}`) }}
onDragEnd={() => { setDraggingId(null); setDropTargetKey(null); dragDataRef.current = null }}
onDragOver={e => { e.preventDefault(); e.stopPropagation(); if (dropTargetKey !== `note-${note.id}`) setDropTargetKey(`note-${note.id}`) }}
onDrop={e => {
@@ -2242,7 +2248,7 @@ const DayPlanSidebar = React.memo(function DayPlanSidebar(props: DayPlanSidebarP
transition: 'background 0.1s', cursor: 'grab', userSelect: 'none',
}}
>
- {canEditDays && <div className="dp-grip" style={{ flexShrink: 0, color: 'var(--text-faint)', display: 'flex', alignItems: 'center', opacity: 0.3, transition: 'opacity 0.15s', cursor: 'grab' }}>
+ {canEditDays && !isMobile && <div className="dp-grip" style={{ flexShrink: 0, color: 'var(--text-faint)', display: 'flex', alignItems: 'center', opacity: 0.3, transition: 'opacity 0.15s', cursor: 'grab' }}>
<GripVertical size={13} strokeWidth={1.8} />
</div>}
<div style={{ width: 28, height: 28, flexShrink: 0, display: 'flex', alignItems: 'center', justifyContent: 'center', borderRadius: '50%', background: 'var(--bg-hover)', overflow: 'hidden' }}>
diff --git a/client/src/components/Planner/PlaceInspector.test.tsx b/client/src/components/Planner/PlaceInspector.test.tsx
index 9178bd97b..38c0ae340 100644
--- a/client/src/components/Planner/PlaceInspector.test.tsx
+++ b/client/src/components/Planner/PlaceInspector.test.tsx
@@ -259,8 +259,8 @@ describe('PlaceInspector', () => {
onRemoveAssignment={onRemoveAssignment}
/>
);
- // Find the remove button — it has "Remove" text (sm:hidden span)
- const removeBtn = screen.getByText('Remove').closest('button')!;
+ // Find the remove button — it carries the "Remove from Day" label
+ const removeBtn = screen.getByText('Remove from Day').closest('button')!;
await user.click(removeBtn);
// Component calls onRemoveAssignment(selectedDayId, assignmentInDay.id)
expect(onRemoveAssignment).toHaveBeenCalledWith(1, 99);
diff --git a/client/src/components/Planner/PlaceInspector.tsx b/client/src/components/Planner/PlaceInspector.tsx
index 4d1684f98..35f6eccbf 100644
--- a/client/src/components/Planner/PlaceInspector.tsx
+++ b/client/src/components/Planner/PlaceInspector.tsx
@@ -8,7 +8,7 @@ import { X, Clock, MapPin, ExternalLink, Phone, Euro, Edit2, Trash2, Plus, Minus
import PlaceAvatar from '../shared/PlaceAvatar'
import GuestBadge from '../shared/GuestBadge'
import StatusBadge from '../Collections/StatusBadge'
-import { mapsApi } from '../../api/client'
+import { mapsApi, pluginsApi } from '../../api/client'
import { collectionsApi } from '../../api/collections'
import { useSettingsStore } from '../../store/settingsStore'
import { useAddonStore } from '../../store/addonStore'
@@ -16,6 +16,8 @@ import { useSaveToCollectionStore } from '../../store/saveToCollectionStore'
import { getCategoryIcon } from '../shared/categoryIcons'
import { useToast } from '../shared/Toast'
import { useTranslation, translateApiError } from '../../i18n'
+import { usePluginStore } from '../../store/pluginStore'
+import PluginFrame from '../Plugins/PluginFrame'
import type { Place, Category, Day, Assignment, Reservation, TripFile, AssignmentsMap } from '../../types'
import type { CollectionStatus } from '@trek/shared'
import { splitReservationDateTime, formatTime } from '../../utils/formatters'
@@ -142,6 +144,21 @@ export default function PlaceInspector({
leftWidth = 0, rightWidth = 0,
collectionStatus, onCopyToTrip, onSetStatus, onRemoveFromList,
}: PlaceInspectorProps) {
+ // Plugins that declared a place-detail slot mount at the bottom of this panel,
+ // scoped to the open place (trip mode only). Inline-filter like the other sites.
+ const placeDetailPlugins = usePluginStore((s) => s.plugins).filter((p) => p.type === 'widget' && p.slot === 'place-detail')
+ // Extra native rows contributed by placeDetailProvider plugins (#1429). Fail-safe:
+ // any provider error/timeout is dropped server-side, so this only ever adds rows.
+ const [providerDetails, setProviderDetails] = useState<Array<{ pluginId: string; items: Array<{ label: string; value?: string; url?: string }> }>>([])
+ const placeIdForDetails = mode === 'trip' ? place?.id : undefined
+ useEffect(() => {
+ if (placeIdForDetails == null) { setProviderDetails([]); return }
+ let cancelled = false
+ pluginsApi.placeDetails(placeIdForDetails)
+ .then((d) => { if (!cancelled) setProviderDetails((d.providers || []).filter((p) => Array.isArray(p.items) && p.items.length > 0)) })
+ .catch(() => { if (!cancelled) setProviderDetails([]) })
+ return () => { cancelled = true }
+ }, [placeIdForDetails])
const { t, locale, language } = useTranslation()
const toast = useToast()
const timeFormat = useSettingsStore(s => s.settings.time_format) || '24h'
@@ -356,6 +373,34 @@ export default function PlaceInspector({
fileInputRef={fileInputRef} handleFileUpload={handleFileUpload} isUploading={isUploading}
distanceUnit={distanceUnit} />
+ {/* Extra native rows from placeDetailProvider plugins (#1429). */}
+ {mode === 'trip' && providerDetails.length > 0 && (
+ <div className="bg-surface-hover" style={{ borderRadius: 10, padding: '10px 12px', display: 'flex', flexDirection: 'column', gap: 6 }}>
+ {providerDetails.flatMap((p) => p.items.map((it, i) => (
+ <div key={`${p.pluginId}-${i}`} style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'baseline', gap: 8, fontSize: 'calc(12.5px * var(--fs-scale-body, 1))' }}>
+ <span className="text-content-secondary" style={{ fontWeight: 500, flexShrink: 0 }}>{it.label}</span>
+ {it.url
+ ? <a href={it.url} target="_blank" rel="noreferrer noopener" className="text-accent" style={{ textDecoration: 'none', textAlign: 'right', overflow: 'hidden', textOverflow: 'ellipsis' }}>{it.value ?? '↗'}</a>
+ : <span className="text-content-muted" style={{ textAlign: 'right' }}>{it.value}</span>}
+ </div>
+ )))}
+ </div>
+ )}
+
+ {/* Place-detail plugin slots (#1429): sandboxed, scoped to this place. */}
+ {mode === 'trip' && placeDetailPlugins.length > 0 && (
+ <div style={{ display: 'flex', flexDirection: 'column', gap: 8 }}>
+ {placeDetailPlugins.map((p) => {
+ const tid = (place as { trip_id?: number | string }).trip_id
+ return (
+ <div key={p.id} className="bg-surface-hover" style={{ borderRadius: 10, overflow: 'hidden' }}>
+ <PluginFrame pluginId={p.id} tripId={tid != null ? String(tid) : null} placeId={String(place.id)} title={p.name} />
+ </div>
+ )
+ })}
+ </div>
+ )}
+
</div>
{/* Footer actions */}
@@ -372,7 +417,7 @@ export default function PlaceInspector({
{mode === 'trip' && selectedDayId && (
assignmentInDay ? (
<ActionButton onClick={() => onRemoveAssignment?.(selectedDayId, assignmentInDay.id)} variant="ghost" icon={<Minus size={13} />}
- label={<><span className="hidden sm:inline">{t('inspector.removeFromDay')}</span><span className="sm:hidden">{t('inspector.remove')}</span></>} />
+ label={<span className="hidden sm:inline">{t('inspector.removeFromDay')}</span>} />
) : (
<ActionButton onClick={() => onAssignToDay?.(place.id)} variant="primary" icon={<Plus size={13} />} label={t('inspector.addToDay')} />
)
diff --git a/client/src/components/Planner/PlacesSidebar.tsx b/client/src/components/Planner/PlacesSidebar.tsx
index 06f93bc05..cefe35382 100644
--- a/client/src/components/Planner/PlacesSidebar.tsx
+++ b/client/src/components/Planner/PlacesSidebar.tsx
@@ -23,13 +23,13 @@ const PlacesSidebar = React.memo(function PlacesSidebar(props: PlacesSidebarProp
} = S
return (
<div
- onDragEnter={handleSidebarDragEnter}
- onDragOver={handleSidebarDragOver}
- onDragLeave={handleSidebarDragLeave}
- onDrop={handleSidebarDrop}
+ onDragEnter={isMobile ? undefined : handleSidebarDragEnter}
+ onDragOver={isMobile ? undefined : handleSidebarDragOver}
+ onDragLeave={isMobile ? undefined : handleSidebarDragLeave}
+ onDrop={isMobile ? undefined : handleSidebarDrop}
style={{ display: 'flex', flexDirection: 'column', height: '100%', fontFamily: "var(--font-system)", position: 'relative' }}
>
- {sidebarDragOver && <PlacesDropOverlay {...S} />}
+ {!isMobile && sidebarDragOver && <PlacesDropOverlay {...S} />}
{/* Kopfbereich */}
<PlacesHeader {...S} />
diff --git a/client/src/components/Planner/PlacesSidebarRow.tsx b/client/src/components/Planner/PlacesSidebarRow.tsx
index ff718c49e..0801b838e 100644
--- a/client/src/components/Planner/PlacesSidebarRow.tsx
+++ b/client/src/components/Planner/PlacesSidebarRow.tsx
@@ -36,8 +36,9 @@ export const MemoPlaceRow = React.memo(function MemoPlaceRow({
ref={element => registerPlaceRow(place.id, element)}
aria-selected={isSelected}
data-place-id={place.id}
- draggable={!selectMode}
+ draggable={!selectMode && !isMobile}
onDragStart={e => {
+ if (isMobile) { e.preventDefault(); return }
e.dataTransfer.setData('placeId', String(place.id))
e.dataTransfer.effectAllowed = 'copy'
window.__dragData = { placeId: String(place.id) }
@@ -55,7 +56,7 @@ export const MemoPlaceRow = React.memo(function MemoPlaceRow({
style={{
display: 'flex', alignItems: 'center', gap: 10,
padding: '9px 14px 9px 16px',
- cursor: selectMode ? 'pointer' : 'grab',
+ cursor: selectMode || isMobile ? 'pointer' : 'grab',
background: isChecked ? 'color-mix(in srgb, var(--accent) 8%, transparent)' : isSelected ? 'var(--border-faint)' : 'transparent',
borderBottom: '1px solid var(--border-faint)',
transition: 'background 0.1s',
diff --git a/client/src/components/Planner/ReservationModal.test.tsx b/client/src/components/Planner/ReservationModal.test.tsx
index a4d1209c1..f1f2a7bfc 100644
--- a/client/src/components/Planner/ReservationModal.test.tsx
+++ b/client/src/components/Planner/ReservationModal.test.tsx
@@ -409,6 +409,12 @@ describe('ReservationModal', () => {
expect(screen.getByRole('button', { name: /Attach file/i })).toBeInTheDocument();
});
+ it('FE-PLANNER-RESMODAL-029b: file input accepts pkpass (#1448)', () => {
+ render(<ReservationModal {...defaultProps} />);
+ const fileInput = document.querySelector('input[type="file"]') as HTMLInputElement;
+ expect(fileInput.accept).toContain('.pkpass');
+ });
+
it('FE-PLANNER-RESMODAL-030: hotel type — saving calls onSave with correct hotel shape', async () => {
const onSave = vi.fn().mockResolvedValue(undefined);
render(<ReservationModal {...defaultProps} onSave={onSave} />);
diff --git a/client/src/components/Planner/ReservationModal.tsx b/client/src/components/Planner/ReservationModal.tsx
index 05960f994..f8a775f1f 100644
--- a/client/src/components/Planner/ReservationModal.tsx
+++ b/client/src/components/Planner/ReservationModal.tsx
@@ -682,7 +682,7 @@ export function ReservationModal({ isOpen, onClose, onSave, reservation, days, p
</button>
</div>
))}
- <input ref={fileInputRef} type="file" accept=".pdf,.doc,.docx,.txt,image/*" style={{ display: 'none' }} onChange={handleFileChange} />
+ <input ref={fileInputRef} type="file" accept=".pdf,.doc,.docx,.txt,.pkpass,.pkpasses,image/*,application/vnd.apple.pkpass,application/vnd.apple.pkpasses" style={{ display: 'none' }} onChange={handleFileChange} />
<div style={{ display: 'flex', gap: 6, flexWrap: 'wrap' }}>
{onFileUpload && <button type="button" onClick={() => fileInputRef.current?.click()} disabled={uploadingFile} className="text-content-faint" style={{
display: 'flex', alignItems: 'center', gap: 5, padding: '6px 10px',
diff --git a/client/src/components/Planner/TransportModal.test.tsx b/client/src/components/Planner/TransportModal.test.tsx
index b57032fc1..9cd153469 100644
--- a/client/src/components/Planner/TransportModal.test.tsx
+++ b/client/src/components/Planner/TransportModal.test.tsx
@@ -71,6 +71,12 @@ describe('TransportModal', () => {
expect(screen.getByText(/Add transport/i)).toBeInTheDocument();
});
+ it('FE-PLANNER-TRANSMODAL-002b: file input accepts pkpass (#1448)', () => {
+ render(<TransportModal {...defaultProps} />);
+ const fileInput = document.querySelector('input[type="file"]') as HTMLInputElement;
+ expect(fileInput.accept).toContain('.pkpass');
+ });
+
it('FE-PLANNER-TRANSMODAL-003: shows "Edit transport" title when editing', () => {
const res = buildReservation({ title: 'Paris Flight', type: 'flight' });
render(<TransportModal {...defaultProps} reservation={res} />);
diff --git a/client/src/components/Planner/TransportModal.tsx b/client/src/components/Planner/TransportModal.tsx
index 38ca05291..12bcdfab4 100644
--- a/client/src/components/Planner/TransportModal.tsx
+++ b/client/src/components/Planner/TransportModal.tsx
@@ -946,7 +946,7 @@ export function TransportModal({ isOpen, onClose, onSave, reservation, days, sel
</button>
</div>
))}
- <input ref={fileInputRef} type="file" accept=".pdf,.doc,.docx,.txt,image/*" style={{ display: 'none' }} onChange={handleFileChange} />
+ <input ref={fileInputRef} type="file" accept=".pdf,.doc,.docx,.txt,.pkpass,.pkpasses,image/*,application/vnd.apple.pkpass,application/vnd.apple.pkpasses" style={{ display: 'none' }} onChange={handleFileChange} />
<div style={{ display: 'flex', gap: 6, flexWrap: 'wrap' }}>
{onFileUpload && <button type="button" onClick={() => fileInputRef.current?.click()} disabled={uploadingFile} className="text-content-faint" style={{
display: 'flex', alignItems: 'center', gap: 5, padding: '6px 10px',
diff --git a/client/src/components/Planner/TripWarningsBanner.tsx b/client/src/components/Planner/TripWarningsBanner.tsx
new file mode 100644
index 000000000..a5c6b4cbf
--- /dev/null
+++ b/client/src/components/Planner/TripWarningsBanner.tsx
@@ -0,0 +1,46 @@
+import { useEffect, useState } from 'react'
+import { AlertTriangle, Info, AlertCircle } from 'lucide-react'
+import { pluginsApi } from '../../api/client'
+
+/**
+ * Shows validation/warning contributions from `warningProvider` plugins (#1429).
+ * Self-contained + fail-safe: the server skips any slow/failing provider, so this
+ * only ever adds rows; it renders nothing (and takes no space) when there are none.
+ */
+type Warning = { pluginId: string; level: 'info' | 'warning' | 'error'; message: string }
+
+const STYLE = {
+ info: { Icon: Info, color: 'var(--info)', bg: 'var(--info-soft)' },
+ warning: { Icon: AlertTriangle, color: 'var(--warning)', bg: 'var(--warning-soft)' },
+ error: { Icon: AlertCircle, color: 'var(--danger)', bg: 'var(--danger-soft)' },
+} as const
+
+export default function TripWarningsBanner({ tripId }: { tripId: number }) {
+ const [warnings, setWarnings] = useState<Warning[]>([])
+ useEffect(() => {
+ if (!Number.isFinite(tripId)) { setWarnings([]); return }
+ let cancelled = false
+ pluginsApi.tripWarnings(tripId)
+ .then((d) => { if (!cancelled) setWarnings(d.warnings || []) })
+ .catch(() => { if (!cancelled) setWarnings([]) })
+ return () => { cancelled = true }
+ }, [tripId])
+
+ if (warnings.length === 0) return null
+ // A non-blocking overlay pinned to the top of the (fixed) planner content region:
+ // the wrapper ignores pointer events so it never covers the map/panels, and only
+ // the warning pills themselves are interactive.
+ return (
+ <div style={{ position: 'absolute', top: 0, left: 0, right: 0, zIndex: 6, pointerEvents: 'none', display: 'flex', flexDirection: 'column', gap: 6, padding: '8px 16px' }}>
+ {warnings.map((w, i) => {
+ const s = STYLE[w.level] ?? STYLE.warning
+ return (
+ <div key={`${w.pluginId}-${i}`} style={{ pointerEvents: 'auto', display: 'flex', alignItems: 'center', gap: 8, padding: '8px 12px', borderRadius: 10, background: s.bg, color: s.color, fontSize: 'calc(13px * var(--fs-scale-body, 1))', fontWeight: 500, boxShadow: 'var(--shadow-card)' }}>
+ <s.Icon size={15} style={{ flexShrink: 0 }} />
+ <span>{w.message}</span>
+ </div>
+ )
+ })}
+ </div>
+ )
+}
diff --git a/client/src/components/Plugins/PluginFrame.test.tsx b/client/src/components/Plugins/PluginFrame.test.tsx
index a86713e0c..e9afc6bcf 100644
--- a/client/src/components/Plugins/PluginFrame.test.tsx
+++ b/client/src/components/Plugins/PluginFrame.test.tsx
@@ -9,7 +9,8 @@ const invoke = vi.fn((..._args: unknown[]) => Promise.resolve({ ok: true }));
vi.mock('react-router-dom', () => ({ useNavigate: () => navigate }));
vi.mock('../shared/Toast', () => ({ useToast: () => toast }));
vi.mock('../../i18n', () => ({ useTranslation: () => ({ locale: 'en' }) }));
-vi.mock('../../store/authStore', () => ({ useAuthStore: (sel: (s: unknown) => unknown) => sel({ user: { id: 7 } }) }));
+vi.mock('../../store/authStore', () => ({ useAuthStore: (sel: (s: unknown) => unknown) => sel({ user: { id: 7, username: 'ada', avatar_url: null, role: 'admin' } }) }));
+vi.mock('../../store/settingsStore', () => ({ useSettingsStore: (sel: (s: unknown) => unknown) => sel({ settings: { default_currency: 'EUR', time_format: '24h', distance_unit: 'metric', temperature_unit: 'celsius' } }) }));
vi.mock('../../api/client', () => ({ pluginsApi: { invoke: (id: string, sub: string, init?: unknown) => invoke(id, sub, init) } }));
function fromFrame(frame: HTMLIFrameElement, data: unknown) {
@@ -64,4 +65,40 @@ describe('PluginFrame', () => {
await waitFor(() => expect(invoke).toHaveBeenCalledWith('demo', '/status', { method: 'GET', body: undefined }));
await waitFor(() => expect(posted.some((m) => (m as { type?: string }).type === 'trek:response')).toBe(true));
});
+
+ it('FE-PLUGINS-FRAME-005: context carries theme tokens, formats and non-secret display identity', () => {
+ const { container } = render(<PluginFrame pluginId="demo" />);
+ const iframe = container.querySelector('iframe')!;
+ const posted: Array<Record<string, unknown>> = [];
+ (iframe.contentWindow as unknown as { postMessage: (m: unknown) => void }).postMessage = (m: unknown) => posted.push(m as Record<string, unknown>);
+
+ fromFrame(iframe, { type: 'trek:context:request' });
+
+ const ctx = posted.find((m) => m.type === 'trek:context') as Record<string, unknown> | undefined;
+ expect(ctx).toBeTruthy();
+ expect(ctx!.tokens).toBeTruthy(); // resolved design tokens (empty {} in jsdom, but present)
+ expect(ctx!.formats).toMatchObject({ currency: 'EUR', timeFormat: '24h', distanceUnit: 'metric' });
+ // Display identity is present but carries NO secret (no email, role only as a boolean).
+ expect(ctx!.user).toMatchObject({ name: 'ada', isAdmin: true });
+ expect(JSON.stringify(ctx)).not.toContain('@'); // no email leaked
+ });
+
+ it('FE-PLUGINS-FRAME-006: context mirrors the host appearance state (scheme/density/flags)', () => {
+ const { container } = render(<PluginFrame pluginId="demo" />);
+ const iframe = container.querySelector('iframe')!;
+ const posted: Array<Record<string, unknown>> = [];
+ (iframe.contentWindow as unknown as { postMessage: (m: unknown) => void }).postMessage = (m: unknown) => posted.push(m as Record<string, unknown>);
+
+ fromFrame(iframe, { type: 'trek:context:request' });
+
+ const ctx = posted.find((m) => m.type === 'trek:context') as Record<string, unknown> | undefined;
+ expect(ctx).toBeTruthy();
+ // A plugin can honour the same accent/density/accessibility choices as the host.
+ expect(ctx!.appearance).toMatchObject({
+ scheme: 'default',
+ density: 'comfortable',
+ noTransparency: false,
+ reducedMotion: false,
+ });
+ });
});
diff --git a/client/src/components/Plugins/PluginFrame.tsx b/client/src/components/Plugins/PluginFrame.tsx
index ab4ae6814..207362f66 100644
--- a/client/src/components/Plugins/PluginFrame.tsx
+++ b/client/src/components/Plugins/PluginFrame.tsx
@@ -1,10 +1,68 @@
-import { useEffect, useRef, useState } from 'react'
+import { useCallback, useEffect, useRef, useState } from 'react'
import { useNavigate } from 'react-router-dom'
import { useTranslation } from '../../i18n'
import { useAuthStore } from '../../store/authStore'
+import { useSettingsStore } from '../../store/settingsStore'
import { useToast } from '../shared/Toast'
import { pluginsApi } from '../../api/client'
+// The design-token contract handed to plugins (#4 richer context): non-secret CSS
+// values, resolved for the CURRENT theme, so a plugin can match TREK exactly (and
+// re-match on a theme toggle / accent change) instead of hard-coding a mirror of
+// the palette that drifts. Names mirror index.css so a plugin can apply them
+// verbatim as CSS variables. This is the whole GLOBAL (:root/.dark) palette — the
+// part that a user can recolour via appearance settings (accent scheme, custom
+// accent, high-contrast) flows through here live. The glassy `.trek-dash` layer
+// (--glass-*/--r-*/--sh-*) is intentionally NOT read here: it is scoped to the
+// dashboard subtree, so it resolves EMPTY at documentElement — the SDK design kit
+// bakes those values instead (they don't vary with the accent, only light/dark).
+const TOKEN_VARS = [
+ // surfaces
+ '--bg-primary', '--bg-secondary', '--bg-tertiary', '--bg-elevated',
+ '--bg-card', '--bg-input', '--bg-hover', '--bg-selected', '--bg-inverse',
+ // text
+ '--text-primary', '--text-secondary', '--text-muted', '--text-faint', '--text-inverse',
+ // borders
+ '--border-primary', '--border-secondary', '--border-faint',
+ // accent (recoloured by the chosen scheme / custom accent)
+ '--accent', '--accent-text', '--accent-on', '--accent-hover', '--accent-subtle',
+ // semantic + soft fills
+ '--success', '--success-soft', '--danger', '--danger-soft',
+ '--warning', '--warning-soft', '--info', '--info-soft',
+ // shadows
+ '--shadow-card', '--shadow-elevated', '--shadow-sm', '--shadow-md', '--shadow-lg',
+ // radii, type, misc
+ '--radius-sm', '--radius-md', '--radius-lg', '--radius-xl',
+ '--font-system', '--font-subtext', '--overlay', '--ease-out-quint',
+]
+function readThemeTokens(): Record<string, string> {
+ const cs = getComputedStyle(document.documentElement)
+ const out: Record<string, string> = {}
+ for (const v of TOKEN_VARS) {
+ const val = cs.getPropertyValue(v).trim()
+ if (val) out[v] = val
+ }
+ return out
+}
+
+/**
+ * The host's current appearance state, mirrored from the attributes applyAppearance
+ * writes on <html>, so a plugin can honour the same accessibility/appearance choices
+ * inside its own sandboxed document (it can't read the parent DOM). All booleans/enums
+ * — nothing secret.
+ */
+function readAppearance() {
+ const el = document.documentElement
+ return {
+ scheme: el.dataset.scheme || 'default',
+ density: el.dataset.density === 'compact' ? 'compact' : 'comfortable',
+ noTransparency: el.hasAttribute('data-no-transparency'),
+ reducedMotion:
+ el.hasAttribute('data-reduce-motion') ||
+ window.matchMedia('(prefers-reduced-motion: reduce)').matches,
+ }
+}
+
/**
* Renders a plugin's sandboxed page/widget iframe and hosts the trekBridge
* (#plugins, M3).
@@ -21,6 +79,8 @@ import { pluginsApi } from '../../api/client'
interface PluginFrameProps {
pluginId: string
tripId?: string | null
+ /** The place in view — set for a place-detail slot so the plugin can scope to it. */
+ placeId?: string | null
className?: string
title?: string
}
@@ -33,7 +93,7 @@ type Inbound =
| { type: 'trek:resize'; height?: number }
| { type: 'trek:invoke'; requestId: string; sub: string; method?: string; body?: unknown }
-export default function PluginFrame({ pluginId, tripId = null, className, title }: PluginFrameProps) {
+export default function PluginFrame({ pluginId, tripId = null, placeId = null, className, title }: PluginFrameProps) {
const frameRef = useRef<HTMLIFrameElement | null>(null)
// A sandboxed frame may navigate ITSELF (connect-src can't stop that), and its
// window identity keeps matching our iframe afterwards. Track loads and refuse
@@ -48,22 +108,49 @@ export default function PluginFrame({ pluginId, tripId = null, className, title
const navigate = useNavigate()
const toast = useToast()
const userId = useAuthStore((s) => s.user?.id)
+ const userName = useAuthStore((s) => s.user?.username ?? null)
+ const userAvatar = useAuthStore((s) => s.user?.avatar_url ?? null)
+ const isAdmin = useAuthStore((s) => s.user?.role === 'admin')
+ const settings = useSettingsStore((s) => s.settings)
const [height, setHeight] = useState<number | null>(null)
+ // opaque frame -> targetOrigin must be '*'. Hoisted so the iframe's onLoad can
+ // deliver the context too: the trek:ready handshake alone is racy — if the frame
+ // boots before the effect's listener attaches, the plugin never learns the theme
+ // and falls back to the OS scheme (dark mode looking "off" until a toggle).
+ const postFrame = useCallback((msg: unknown) => frameRef.current?.contentWindow?.postMessage(msg, '*'), [])
+ const buildContext = useCallback(() => ({
+ type: 'trek:context',
+ tripId,
+ placeId,
+ userId: userId != null ? String(userId) : null,
+ theme: document.documentElement.classList.contains('dark') ? 'dark' : 'light',
+ locale,
+ hostOrigin: window.location.origin,
+ // #4 richer context — non-secret display data so plugins render natively:
+ // who the user is (name/avatar/isAdmin — never email/role beyond a boolean),
+ // how TREK formats things, the resolved theme tokens, and the appearance state
+ // (accent scheme, density, reduced-motion / no-transparency) so a plugin can
+ // mirror the same look and accessibility choices as the host.
+ user: userName != null ? { name: userName, avatar: userAvatar, isAdmin } : null,
+ appearance: readAppearance(),
+ formats: {
+ locale,
+ currency: settings.default_currency,
+ timeFormat: settings.time_format,
+ distanceUnit: settings.distance_unit,
+ temperatureUnit: settings.temperature_unit,
+ timezone: Intl.DateTimeFormat().resolvedOptions().timeZone,
+ },
+ tokens: readThemeTokens(),
+ }), [tripId, placeId, userId, locale, userName, userAvatar, isAdmin, settings])
+
useEffect(() => {
const frame = frameRef.current
if (!frame) return
- const post = (msg: unknown) => frame.contentWindow?.postMessage(msg, '*') // opaque frame -> targetOrigin must be '*'
-
- const context = () => ({
- type: 'trek:context',
- tripId,
- userId: userId != null ? String(userId) : null,
- theme: document.documentElement.classList.contains('dark') ? 'dark' : 'light',
- locale,
- hostOrigin: window.location.origin,
- })
+ const post = postFrame
+ const context = buildContext
const onMessage = async (ev: MessageEvent) => {
// The ONLY trusted identity: the message came from OUR iframe's window.
@@ -109,14 +196,50 @@ export default function PluginFrame({ pluginId, tripId = null, className, title
}
window.addEventListener('message', onMessage)
- return () => window.removeEventListener('message', onMessage)
- }, [pluginId, tripId, userId, locale, navigate, toast])
+
+ // The frame is opaque-origin and can't read our DOM, and we otherwise send the
+ // context (incl. theme + tokens) only once on trek:ready — so a plugin can't
+ // follow an in-app appearance change. Watch the <html> element for anything
+ // applyAppearance touches (the `dark` class, the data-* appearance attributes,
+ // and inline style for the custom-accent vars) and re-post the context when the
+ // resulting look actually changes, so plugins restyle live. A compact signature
+ // dedupes: unrelated mutations don't trigger a repost. (Plugins re-apply on
+ // trek:context.)
+ const htmlEl = document.documentElement
+ const appearanceSig = () => {
+ const cs = getComputedStyle(htmlEl)
+ return [
+ htmlEl.classList.contains('dark'),
+ htmlEl.dataset.scheme || '',
+ htmlEl.dataset.density || '',
+ htmlEl.hasAttribute('data-no-transparency'),
+ htmlEl.hasAttribute('data-reduce-motion'),
+ cs.getPropertyValue('--accent').trim(),
+ ].join('|')
+ }
+ let prevSig = appearanceSig()
+ const themeObserver = new MutationObserver(() => {
+ const sig = appearanceSig()
+ if (sig === prevSig) return
+ prevSig = sig
+ if (loadsRef.current <= 1) post(context())
+ })
+ themeObserver.observe(htmlEl, {
+ attributes: true,
+ attributeFilter: ['class', 'style', 'data-scheme', 'data-density', 'data-no-transparency', 'data-reduce-motion'],
+ })
+
+ return () => { window.removeEventListener('message', onMessage); themeObserver.disconnect() }
+ }, [pluginId, navigate, toast, postFrame, buildContext])
return (
<iframe
ref={frameRef}
src={`/plugin-frame/${pluginId}/index.html`}
- onLoad={() => { loadsRef.current += 1 }}
+ // Deliver the context as soon as the document is parsed (the plugin sets up its
+ // message listener during parse), closing the trek:ready race so the theme is
+ // right on first paint. A 2nd load is a self-navigation — don't bridge to it.
+ onLoad={() => { loadsRef.current += 1; if (loadsRef.current === 1) postFrame(buildContext()) }}
sandbox="allow-scripts allow-forms"
referrerPolicy="no-referrer"
loading="lazy"
diff --git a/client/src/components/Plugins/PluginWidgets.tsx b/client/src/components/Plugins/PluginWidgets.tsx
index b7308fca3..afa243be0 100644
--- a/client/src/components/Plugins/PluginWidgets.tsx
+++ b/client/src/components/Plugins/PluginWidgets.tsx
@@ -1,21 +1,46 @@
+import { Blocks } from 'lucide-react'
import PluginFrame from './PluginFrame'
import type { ActivePlugin } from '../../store/pluginStore'
/**
* Renders active `widget` plugins as dashboard cards (#plugins, M8). Each is a
* sandboxed PluginFrame; the widget talks to TREK only over the bridge.
+ *
+ * The card mirrors the native dashboard tools (glassy `.tool` surface + uppercase
+ * title) so plugins sit alongside them seamlessly, and the body auto-sizes to the
+ * height the widget reports over trek:resize — no fixed height that would clip a
+ * taller widget's controls.
*/
export default function PluginWidgets({ plugins, tripId = null }: { plugins: ActivePlugin[]; tripId?: string | null }) {
if (plugins.length === 0) return null
return (
<>
{plugins.map((p) => (
- <div key={p.id} className="bg-surface-card border border-edge rounded-xl overflow-hidden">
- <div className="px-3 py-2 text-xs font-medium text-content-muted border-b border-edge-secondary flex items-center gap-1.5">
- {p.name}
+ <div
+ key={p.id}
+ style={{
+ background: 'var(--glass-bg)',
+ border: '1px solid var(--glass-border)',
+ borderRadius: 'var(--r-xl, 20px)',
+ boxShadow: 'var(--glass-shadow), var(--glass-highlight)',
+ backdropFilter: 'var(--glass-blur)',
+ WebkitBackdropFilter: 'var(--glass-blur)',
+ overflow: 'hidden',
+ }}
+ >
+ <div
+ style={{
+ display: 'flex', alignItems: 'center', gap: 8, padding: '16px 20px 8px',
+ fontSize: 13, fontWeight: 500, textTransform: 'uppercase', letterSpacing: '0.14em',
+ color: 'var(--ink-3)',
+ }}
+ >
+ <Blocks size={14} style={{ flexShrink: 0 }} />
+ <span style={{ overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' }}>{p.name}</span>
</div>
- <div style={{ height: 180 }}>
- <PluginFrame pluginId={p.id} tripId={tripId} title={p.name} className="w-full h-full" />
+ {/* min-height is just a pre-resize floor; trek:resize drives the real height. */}
+ <div style={{ minHeight: 60 }}>
+ <PluginFrame pluginId={p.id} tripId={tripId} title={p.name} />
</div>
</div>
))}
diff --git a/client/src/components/shared/Modal.tsx b/client/src/components/shared/Modal.tsx
index 14033088c..f167a277a 100644
--- a/client/src/components/shared/Modal.tsx
+++ b/client/src/components/shared/Modal.tsx
@@ -51,7 +51,7 @@ export default function Modal({
return ReactDOM.createPortal(
<div
- className="fixed inset-0 z-[200] flex items-start sm:items-center justify-center px-4 trek-modal-backdrop trek-backdrop-enter bg-[rgba(15,23,42,0.5)]"
+ className="fixed inset-0 z-[10000] flex items-start sm:items-center justify-center px-4 trek-modal-backdrop trek-backdrop-enter bg-[rgba(15,23,42,0.5)]"
style={{ paddingTop: 70, paddingBottom: 'calc(20px + var(--bottom-nav-h))', overflow: 'hidden' }}
onMouseDown={e => { mouseDownTarget.current = e.target }}
onClick={e => {
diff --git a/client/src/pages/AdminPage.test.tsx b/client/src/pages/AdminPage.test.tsx
index b9a472b4c..d9afb7e92 100644
--- a/client/src/pages/AdminPage.test.tsx
+++ b/client/src/pages/AdminPage.test.tsx
@@ -703,7 +703,8 @@ describe('AdminPage', () => {
await waitFor(() => expect(screen.getByRole('button', { name: /^users$/i })).toBeInTheDocument());
fireEvent.click(screen.getByRole('button', { name: /settings/i }));
- const keyInput = await screen.findByPlaceholderText('Enter key...');
+ // Maps is the first 'Enter key...' input (Unsplash is the second).
+ const keyInput = (await screen.findAllByPlaceholderText('Enter key...'))[0];
// Type a value — covers the onChange handler
fireEvent.change(keyInput, { target: { value: 'test-api-key-abc123' } });
@@ -978,6 +979,35 @@ describe('AdminPage', () => {
expect(capturedBody).toMatchObject({ maps_api_key: 'test-maps-key-123' });
});
});
+
+ it('typing in the Unsplash API key and clicking Save sends unsplash_api_key', async () => {
+ let capturedBody: Record<string, unknown> | undefined;
+ server.use(
+ http.put('/api/auth/me/api-keys', async ({ request }) => {
+ capturedBody = (await request.json()) as Record<string, unknown>;
+ return HttpResponse.json({ success: true });
+ }),
+ );
+
+ seedStore(useAuthStore, { isAuthenticated: true, user: buildAdmin() });
+ render(<AdminPage />);
+
+ await waitFor(() => expect(screen.getByRole('button', { name: /^users$/i })).toBeInTheDocument());
+ fireEvent.click(screen.getByRole('button', { name: /settings/i }));
+
+ const apiKeysHeading = await screen.findByRole('heading', { name: /^api keys$/i });
+ const apiKeysCard = apiKeysHeading.closest<HTMLElement>('.bg-white');
+
+ // The Unsplash key is the second 'Enter key...' input (after Maps).
+ const keyInputs = within(apiKeysCard!).getAllByPlaceholderText('Enter key...');
+ fireEvent.change(keyInputs[1], { target: { value: 'test-unsplash-key' } });
+
+ fireEvent.click(within(apiKeysCard!).getByRole('button', { name: /^save$/i }));
+
+ await waitFor(() => {
+ expect(capturedBody?.unsplash_api_key).toBe('test-unsplash-key');
+ });
+ });
});
describe('FE-PAGE-ADMIN-044: Validate API key in Settings tab', () => {
diff --git a/client/src/pages/DashboardPage.test.tsx b/client/src/pages/DashboardPage.test.tsx
index 535c1997b..597fc6dd3 100644
--- a/client/src/pages/DashboardPage.test.tsx
+++ b/client/src/pages/DashboardPage.test.tsx
@@ -901,5 +901,38 @@ describe('DashboardPage', () => {
expect(s.dashboard_fx_to).toBe('CHF');
expect(s.dashboard_timezones).toEqual(['America/New_York']);
});
+
+ it('keeps the legacy localStorage keys when the server write fails, so nothing is lost (#1311)', async () => {
+ // The write to persist the migrated values fails (server briefly unavailable during a
+ // docker upgrade). The legacy localStorage source must survive so the next load retries —
+ // the old code deleted it unconditionally, permanently losing the values.
+ server.use(
+ http.put('/api/settings', () => new HttpResponse(null, { status: 500 })),
+ http.post('/api/settings/bulk', () => new HttpResponse(null, { status: 500 })),
+ );
+ localStorage.setItem('trek_fx_from', 'CAD');
+ localStorage.setItem('trek_fx_to', 'CHF');
+ localStorage.setItem('trek_dashboard_tz', JSON.stringify(['America/New_York']));
+ seedStore(useSettingsStore, { settings: buildSettings(), isLoaded: true });
+ render(<DashboardPage />);
+ // The optimistic store update proves the migration effect ran; the failed write must NOT
+ // have removed the localStorage source.
+ await waitFor(() => {
+ expect(useSettingsStore.getState().settings.dashboard_fx_from).toBe('CAD');
+ });
+ expect(localStorage.getItem('trek_fx_from')).toBe('CAD');
+ expect(localStorage.getItem('trek_fx_to')).toBe('CHF');
+ expect(localStorage.getItem('trek_dashboard_tz')).toBe(JSON.stringify(['America/New_York']));
+ });
+
+ it('drops a malformed legacy timezone value instead of retrying forever (#1311)', async () => {
+ localStorage.setItem('trek_dashboard_tz', 'not-json');
+ seedStore(useSettingsStore, { settings: buildSettings(), isLoaded: true });
+ render(<DashboardPage />);
+ await waitFor(() => {
+ expect(localStorage.getItem('trek_dashboard_tz')).toBeNull();
+ });
+ expect(useSettingsStore.getState().settings.dashboard_timezones).toBeUndefined();
+ });
});
});
diff --git a/client/src/pages/DashboardPage.tsx b/client/src/pages/DashboardPage.tsx
index 33883343c..538efa529 100644
--- a/client/src/pages/DashboardPage.tsx
+++ b/client/src/pages/DashboardPage.tsx
@@ -618,10 +618,15 @@ function CurrencyTool(): React.ReactElement {
const lf = localStorage.getItem('trek_fx_from')
const lt = localStorage.getItem('trek_fx_to')
if (!lf && !lt) return
- if (lf) updateSetting('dashboard_fx_from', lf).catch(() => {})
- if (lt) updateSetting('dashboard_fx_to', lt).catch(() => {})
- localStorage.removeItem('trek_fx_from')
- localStorage.removeItem('trek_fx_to')
+ const writes: Promise<void>[] = []
+ if (lf) writes.push(updateSetting('dashboard_fx_from', lf))
+ if (lt) writes.push(updateSetting('dashboard_fx_to', lt))
+ // Only drop the localStorage source once the server has durably stored the values, so a
+ // failed write during a (docker) upgrade can't destroy the only copy (#1311). Retry next load.
+ Promise.all(writes).then(() => {
+ localStorage.removeItem('trek_fx_from')
+ localStorage.removeItem('trek_fx_to')
+ }).catch(() => { /* keep localStorage; retry on next load */ })
}, [isLoaded, updateSetting])
const currencies = rates ? Object.keys(rates).sort() : FX_FALLBACK
@@ -697,11 +702,15 @@ function TimezoneTool({ locale }: { locale: string }): React.ReactElement {
if (!isLoaded) return
const raw = localStorage.getItem('trek_dashboard_tz')
if (!raw) return
- try {
- const parsed = JSON.parse(raw)
- if (Array.isArray(parsed)) updateSetting('dashboard_timezones', parsed).catch(() => {})
- } catch { /* ignore malformed storage */ }
- localStorage.removeItem('trek_dashboard_tz')
+ let parsed: unknown
+ // A malformed/non-array value can never be written, so drop it now to avoid retrying forever.
+ try { parsed = JSON.parse(raw) } catch { localStorage.removeItem('trek_dashboard_tz'); return }
+ if (!Array.isArray(parsed)) { localStorage.removeItem('trek_dashboard_tz'); return }
+ // Only drop the localStorage source once the server has durably stored the value, so a failed
+ // write during a (docker) upgrade can't destroy the only copy (#1311). Retry next load.
+ updateSetting('dashboard_timezones', parsed)
+ .then(() => { localStorage.removeItem('trek_dashboard_tz') })
+ .catch(() => { /* keep localStorage; retry on next load */ })
}, [isLoaded, updateSetting])
const allZones = React.useMemo<string[]>(() => {
diff --git a/client/src/pages/TripPlannerPage.tsx b/client/src/pages/TripPlannerPage.tsx
index 3274d03cc..8c8130389 100644
--- a/client/src/pages/TripPlannerPage.tsx
+++ b/client/src/pages/TripPlannerPage.tsx
@@ -30,6 +30,8 @@ import CostsPanel, { ExpenseModal, type ExpensePrefill } from '../components/Bud
import type { BookingExpenseRequest } from '../components/Planner/BookingCostsSection.types'
import type { BudgetItem } from '../types'
import CollabPanel from '../components/Collab/CollabPanel'
+import PluginFrame from '../components/Plugins/PluginFrame'
+import TripWarningsBanner from '../components/Planner/TripWarningsBanner'
import Navbar from '../components/Layout/Navbar'
import { useToast } from '../components/shared/Toast'
import { Map, X, PanelLeftClose, PanelLeftOpen, PanelRightClose, PanelRightOpen, Ticket, PackageCheck, Wallet, FolderOpen, Users, Train } from 'lucide-react'
@@ -298,6 +300,9 @@ export default function TripPlannerPage(): React.ReactElement | null {
{/* Offset by navbar + tab bar (44px) */}
<div style={{ position: 'fixed', top: 'calc(var(--nav-h) + 44px)', left: 0, right: 0, bottom: 0, overflow: 'hidden', overscrollBehavior: 'contain' }}>
+ {/* Plugin validation/warning contributions (#1429) — non-blocking overlay. */}
+ <TripWarningsBanner tripId={tripId} />
+
{activeTab === 'plan' && (
<div style={{ position: 'absolute', inset: 0 }}>
<MapView
@@ -376,6 +381,7 @@ export default function TripPlannerPage(): React.ReactElement | null {
opacity: leftCollapsed ? 0 : 1,
}}>
<DayPlanSidebar
+ isMobile={isMobile}
tripId={tripId}
trip={trip}
days={days}
@@ -624,7 +630,7 @@ export default function TripPlannerPage(): React.ReactElement | null {
</div>
<div style={{ flex: 1, overflow: 'auto' }}>
{mobileSidebarOpen === 'left'
- ? <DayPlanSidebar tripId={tripId} trip={trip} days={days} places={places} categories={categories} assignments={assignments} selectedDayId={selectedDayId} selectedPlaceId={selectedPlaceId} selectedAssignmentId={selectedAssignmentId} onSelectDay={(id) => { handleSelectDay(id); setMobileSidebarOpen(null) }} onPlaceClick={(placeId, assignmentId) => { handlePlaceClick(placeId, assignmentId) }} onReorder={handleReorder} onReorderDays={handleReorderDays} onAddDay={handleAddDay} onUpdateDayTitle={handleUpdateDayTitle} onAssignToDay={handleAssignToDay} onRouteCalculated={(r) => { if (r) { setRoute([r.coordinates]); setRouteInfo(r) } }} reservations={reservations} visibleConnectionIds={visibleConnections} onToggleConnection={toggleConnection} onAddReservation={(dayId) => { setEditingReservation(null); tripActions.setSelectedDay(dayId); setShowReservationModal(true); setMobileSidebarOpen(null) }} onAddTransport={can('day_edit', trip) ? (dayId) => { setTransportModalDayId(dayId); setEditingTransport(null); setTransitPrefill(null); setTransportModalAutomated(false); setShowTransportModal(true); setMobileSidebarOpen(null) } : undefined} onOpenTransit={(r) => { setTransitJourney(r); setMobileSidebarOpen(null) }} onPlanTransit={can('day_edit', trip) ? (dayId) => { setTransportModalDayId(dayId); setEditingTransport(null); setTransitPrefill(null); setTransportModalAutomated(true); setShowTransportModal(true); setMobileSidebarOpen(null) } : undefined} onAddPlace={() => { setEditingPlace(null); setShowPlaceForm(true); setMobileSidebarOpen(null) }} onDayDetail={(day) => { setShowDayDetail(day); setSelectedPlaceId(null); selectAssignment(null) }} onRemoveAssignment={handleRemoveAssignment} onEditPlace={(place, assignmentId) => { setEditingPlace(place); setEditingAssignmentId(assignmentId || null); setShowPlaceForm(true); setMobileSidebarOpen(null) }} onDeletePlace={(placeId) => handleDeletePlace(placeId)} accommodations={tripAccommodations} routeShown={routeShown} routeProfile={routeProfile} onToggleRoute={() => setRouteShown(v => !v)} onSetRouteProfile={setRouteProfile} onNavigateToFiles={() => { setMobileSidebarOpen(null); handleTabChange('dateien') }} onExpandedDaysChange={setExpandedDayIds} pushUndo={pushUndo} canUndo={canUndo} lastActionLabel={lastActionLabel} onUndo={handleUndo} onEditTransport={can('day_edit', trip) ? (reservation) => { setEditingTransport(reservation); setTransportModalDayId(reservation.day_id ?? null); setShowTransportModal(true); setMobileSidebarOpen(null) } : undefined} onEditReservation={can('reservation_edit', trip) ? (r) => { setEditingReservation(r); setShowReservationModal(true); setMobileSidebarOpen(null) } : undefined} initialScrollTop={mobilePlanScrollTopRef.current} onScrollTopChange={(top) => { mobilePlanScrollTopRef.current = top }} showRouteToolsWhenExpanded />
+ ? <DayPlanSidebar tripId={tripId} trip={trip} days={days} places={places} categories={categories} assignments={assignments} selectedDayId={selectedDayId} selectedPlaceId={selectedPlaceId} selectedAssignmentId={selectedAssignmentId} onSelectDay={(id) => { handleSelectDay(id); setMobileSidebarOpen(null) }} onPlaceClick={(placeId, assignmentId) => { handlePlaceClick(placeId, assignmentId) }} onReorder={handleReorder} onReorderDays={handleReorderDays} onAddDay={handleAddDay} onUpdateDayTitle={handleUpdateDayTitle} onAssignToDay={handleAssignToDay} onRouteCalculated={(r) => { if (r) { setRoute([r.coordinates]); setRouteInfo(r) } }} reservations={reservations} visibleConnectionIds={visibleConnections} onToggleConnection={toggleConnection} onAddReservation={(dayId) => { setEditingReservation(null); tripActions.setSelectedDay(dayId); setShowReservationModal(true); setMobileSidebarOpen(null) }} onAddTransport={can('day_edit', trip) ? (dayId) => { setTransportModalDayId(dayId); setEditingTransport(null); setTransitPrefill(null); setTransportModalAutomated(false); setShowTransportModal(true); setMobileSidebarOpen(null) } : undefined} onOpenTransit={(r) => { setTransitJourney(r); setMobileSidebarOpen(null) }} onPlanTransit={can('day_edit', trip) ? (dayId) => { setTransportModalDayId(dayId); setEditingTransport(null); setTransitPrefill(null); setTransportModalAutomated(true); setShowTransportModal(true); setMobileSidebarOpen(null) } : undefined} onAddPlace={() => { setEditingPlace(null); setShowPlaceForm(true); setMobileSidebarOpen(null) }} onDayDetail={(day) => { setShowDayDetail(day); setSelectedPlaceId(null); selectAssignment(null) }} onRemoveAssignment={handleRemoveAssignment} onEditPlace={(place, assignmentId) => { setEditingPlace(place); setEditingAssignmentId(assignmentId || null); setShowPlaceForm(true); setMobileSidebarOpen(null) }} onDeletePlace={(placeId) => handleDeletePlace(placeId)} accommodations={tripAccommodations} routeShown={routeShown} routeProfile={routeProfile} onToggleRoute={() => setRouteShown(v => !v)} onSetRouteProfile={setRouteProfile} onNavigateToFiles={() => { setMobileSidebarOpen(null); handleTabChange('dateien') }} onExpandedDaysChange={setExpandedDayIds} pushUndo={pushUndo} canUndo={canUndo} lastActionLabel={lastActionLabel} onUndo={handleUndo} onEditTransport={can('day_edit', trip) ? (reservation) => { setEditingTransport(reservation); setTransportModalDayId(reservation.day_id ?? null); setShowTransportModal(true); setMobileSidebarOpen(null) } : undefined} onEditReservation={can('reservation_edit', trip) ? (r) => { setEditingReservation(r); setShowReservationModal(true); setMobileSidebarOpen(null) } : undefined} initialScrollTop={mobilePlanScrollTopRef.current} onScrollTopChange={(top) => { mobilePlanScrollTopRef.current = top }} showRouteToolsWhenExpanded isMobile />
: <PlacesSidebar tripId={tripId} places={places} categories={categories} assignments={assignments} selectedDayId={selectedDayId} selectedPlaceId={selectedPlaceId} onPlaceClick={(placeId) => { handlePlaceClick(placeId); setMobileSidebarOpen(null) }} onAddPlace={() => { setEditingPlace(null); setShowPlaceForm(true); setMobileSidebarOpen(null) }} onAssignToDay={handleAssignToDay} onEditPlace={(place) => { openPlaceEditor(place); setMobileSidebarOpen(null) }} onDeletePlace={(placeId) => handleDeletePlace(placeId)} onBulkDeletePlaces={(ids) => setDeletePlaceIds(ids)} onBulkDeleteConfirm={(ids) => confirmDeletePlaces(ids)} onBulkChangeCategory={(ids, catId) => confirmChangeCategory(ids, catId)} days={days} isMobile onCategoryFilterChange={setMapCategoryFilter} onPlacesFilterChange={setMapPlacesFilter} pushUndo={pushUndo} initialScrollTop={mobilePlacesScrollTopRef.current} onScrollTopChange={(top) => { mobilePlacesScrollTopRef.current = top }} />
}
</div>
@@ -709,6 +715,12 @@ export default function TripPlannerPage(): React.ReactElement | null {
<CollabPanel tripId={tripId} tripMembers={tripMembers} collabFeatures={collabFeatures} />
</div>
)}
+
+ {activeTab.startsWith('plugin:') && (
+ <div style={{ position: 'absolute', top: 0, left: 0, right: 0, bottom: 'var(--bottom-nav-h)', overflow: 'hidden' }}>
+ <PluginFrame pluginId={activeTab.slice('plugin:'.length)} tripId={String(tripId)} className="w-full h-full" />
+ </div>
+ )}
</div>
<PlaceFormModal isOpen={showPlaceForm} onClose={() => { setShowPlaceForm(false); setEditingPlace(null); setEditingAssignmentId(null); setPrefillCoords(null) }} onSave={handleSavePlace} place={editingPlace} prefillCoords={prefillCoords} assignmentId={editingAssignmentId} dayAssignments={editingPlace ? Object.values(assignments).flat() : []} tripId={tripId} categories={categories} onCategoryCreated={cat => tripActions.addCategory?.(cat)} isMobile={isMobile} />
diff --git a/client/src/pages/admin/AdminSettingsTab.tsx b/client/src/pages/admin/AdminSettingsTab.tsx
index 7dae06c8a..063865b9c 100644
--- a/client/src/pages/admin/AdminSettingsTab.tsx
+++ b/client/src/pages/admin/AdminSettingsTab.tsx
@@ -26,7 +26,7 @@ export default function AdminSettingsTab({ admin, t }: AdminSettingsTabProps): R
passkeyLogin, setPasskeyLogin, passkeyConfigured,
webauthnRpId, setWebauthnRpId, webauthnOrigins, setWebauthnOrigins, savingWebauthn, handleSaveWebauthn,
allowedFileTypes, setAllowedFileTypes, savingFileTypes, setSavingFileTypes,
- mapsKey, setMapsKey, showKeys, savingKeys, validating, validation,
+ mapsKey, setMapsKey, unsplashKey, setUnsplashKey, showKeys, savingKeys, validating, validation,
setShowRotateJwtModal,
handleToggleAuthSetting, handleToggleRequireMfa,
toggleKey, handleSaveApiKeys, handleValidateKey,
@@ -304,6 +304,30 @@ export default function AdminSettingsTab({ admin, t }: AdminSettingsTabProps): R
)}
</div>
+ {/* Unsplash Key */}
+ <div>
+ <label className="flex items-center gap-2 text-sm font-medium text-slate-700 mb-1.5">
+ {t('admin.unsplashKey')}
+ </label>
+ <div className="relative">
+ <input
+ type={showKeys.unsplash ? 'text' : 'password'}
+ value={unsplashKey}
+ onChange={e => setUnsplashKey(e.target.value)}
+ placeholder={t('settings.keyPlaceholder')}
+ className="w-full pr-10 px-3 py-2 border border-slate-300 rounded-lg text-sm focus:ring-2 focus:ring-slate-400 focus:border-transparent"
+ />
+ <button
+ type="button"
+ onClick={() => toggleKey('unsplash')}
+ className="absolute right-3 top-1/2 -translate-y-1/2 text-slate-400 hover:text-slate-600"
+ >
+ {showKeys.unsplash ? <EyeOff className="w-4 h-4" /> : <Eye className="w-4 h-4" />}
+ </button>
+ </div>
+ <p className="text-xs text-slate-400 mt-1">{t('admin.unsplashKeyHint')}</p>
+ </div>
+
{/* Place Photos Toggle */}
<div className="flex items-center justify-between gap-4 py-3 border-t border-slate-100">
<div>
diff --git a/client/src/pages/admin/useAdmin.ts b/client/src/pages/admin/useAdmin.ts
index 19b02c5bb..3f3d57dbe 100644
--- a/client/src/pages/admin/useAdmin.ts
+++ b/client/src/pages/admin/useAdmin.ts
@@ -97,6 +97,7 @@ export function useAdmin() {
// API Keys
const [mapsKey, setMapsKey] = useState<string>('')
const [weatherKey, setWeatherKey] = useState<string>('')
+ const [unsplashKey, setUnsplashKey] = useState<string>('')
const [showKeys, setShowKeys] = useState<Record<string, boolean>>({})
const [savingKeys, setSavingKeys] = useState<boolean>(false)
const [validating, setValidating] = useState<Record<string, boolean>>({})
@@ -166,6 +167,7 @@ export function useAdmin() {
const data = await authApi.getSettings()
setMapsKey(data.settings?.maps_api_key || '')
setWeatherKey(data.settings?.openweather_api_key || '')
+ setUnsplashKey(data.settings?.unsplash_api_key || '')
} catch (err: unknown) {
// ignore
}
@@ -220,6 +222,7 @@ export function useAdmin() {
await updateApiKeys({
maps_api_key: mapsKey,
openweather_api_key: weatherKey,
+ unsplash_api_key: unsplashKey,
})
toast.success(t('admin.keySaved'))
} catch (err: unknown) {
@@ -233,7 +236,7 @@ export function useAdmin() {
setValidating({ maps: true, weather: true })
try {
// Save first so validation uses the current values
- await updateApiKeys({ maps_api_key: mapsKey, openweather_api_key: weatherKey })
+ await updateApiKeys({ maps_api_key: mapsKey, openweather_api_key: weatherKey, unsplash_api_key: unsplashKey })
const result = await authApi.validateKeys()
setValidation(result)
} catch (err: unknown) {
@@ -247,7 +250,7 @@ export function useAdmin() {
setValidating(prev => ({ ...prev, [keyType]: true }))
try {
// Save first so validation uses the current values
- await updateApiKeys({ maps_api_key: mapsKey, openweather_api_key: weatherKey })
+ await updateApiKeys({ maps_api_key: mapsKey, openweather_api_key: weatherKey, unsplash_api_key: unsplashKey })
const result = await authApi.validateKeys()
setValidation(prev => ({ ...prev, [keyType]: result[keyType] }))
} catch (err: unknown) {
@@ -378,7 +381,7 @@ export function useAdmin() {
invites, setInvites, inviteTrips, showCreateInvite, setShowCreateInvite, inviteForm, setInviteForm,
allowedFileTypes, setAllowedFileTypes, savingFileTypes, setSavingFileTypes,
smtpValues, setSmtpValues, smtpLoaded,
- mapsKey, setMapsKey, weatherKey, setWeatherKey,
+ mapsKey, setMapsKey, weatherKey, setWeatherKey, unsplashKey, setUnsplashKey,
showKeys, setShowKeys, savingKeys, validating, validation,
updateInfo, setUpdateInfo, showUpdateModal, setShowUpdateModal,
showRotateJwtModal, setShowRotateJwtModal, rotatingJwt, setRotatingJwt,
diff --git a/client/src/pages/tripPlanner/useTripPlanner.ts b/client/src/pages/tripPlanner/useTripPlanner.ts
index 69fd70815..222d1fc0c 100644
--- a/client/src/pages/tripPlanner/useTripPlanner.ts
+++ b/client/src/pages/tripPlanner/useTripPlanner.ts
@@ -5,7 +5,7 @@ import { useCanDo } from '../../store/permissionsStore'
import { useSettingsStore } from '../../store/settingsStore'
import { getCached, fetchPhoto } from '../../services/photoService'
import { useToast } from '../../components/shared/Toast'
-import { Map, Ticket, PackageCheck, Wallet, FolderOpen, Users, Train } from 'lucide-react'
+import { Map, Ticket, PackageCheck, Wallet, FolderOpen, Users, Train, Blocks } from 'lucide-react'
import { useTranslation, translateApiError } from '../../i18n'
import { addonsApi, accommodationsApi, authApi, tripsApi, assignmentsApi, healthApi, airtrailApi, mapsApi, placesApi } from '../../api/client'
import { parsedItemToDraft, isTransportItem, type BookingReviewDraft } from '../../components/Planner/parsedItemToDraft'
@@ -21,6 +21,7 @@ import { useRouteCalculation } from '../../hooks/useRouteCalculation'
import { usePlaceSelection } from '../../hooks/usePlaceSelection'
import { usePlannerHistory } from '../../hooks/usePlannerHistory'
import { useAirtrailConnection } from '../../hooks/useAirtrailConnection'
+import { usePluginStore } from '../../store/pluginStore'
import type { Accommodation, TripMember, Day, Place, Reservation } from '../../types'
import { resolvePoolAssignmentId } from './tripPlannerModel'
@@ -42,6 +43,9 @@ export function useTripPlanner() {
const toast = useToast()
const { t, language } = useTranslation()
const { settings } = useSettingsStore()
+ // trip-page plugins mount as tabs inside this trip planner (tripId-scoped).
+ const allPlugins = usePluginStore(s => s.plugins)
+ const pluginsLoaded = usePluginStore(s => s.loaded)
const placesPhotosEnabled = useAuthStore(s => s.placesPhotosEnabled)
const trip = useTripStore(s => s.trip)
const days = useTripStore(s => s.days)
@@ -94,6 +98,9 @@ export function useTripPlanner() {
const TRANSPORT_TYPES = new Set(['flight', 'train', 'bus', 'car', 'taxi', 'bicycle', 'cruise', 'ferry', 'transit', 'transport_other'])
+ const tripPagePlugins = allPlugins.filter(p => p.type === 'trip-page')
+ const tripPluginIds = tripPagePlugins.map(p => p.id).join(',')
+
const TRIP_TABS = [
{ id: 'plan', label: t('trip.tabs.plan'), icon: Map },
{ id: 'transports', label: t('trip.tabs.transports'), icon: Train },
@@ -102,6 +109,7 @@ export function useTripPlanner() {
...(enabledAddons.budget ? [{ id: 'finanzplan', label: t('trip.tabs.budget'), icon: Wallet }] : []),
...(enabledAddons.documents ? [{ id: 'dateien', label: t('trip.tabs.files'), icon: FolderOpen }] : []),
...(enabledAddons.collab ? [{ id: 'collab', label: t('admin.addons.catalog.collab.name'), icon: Users }] : []),
+ ...tripPagePlugins.map(p => ({ id: `plugin:${p.id}`, label: p.name, icon: Blocks })),
]
const [activeTab, setActiveTab] = useState<string>(() => {
@@ -110,12 +118,14 @@ export function useTripPlanner() {
})
useEffect(() => {
+ // Don't evict a saved plugin tab before the plugin feed has loaded.
+ if (activeTab.startsWith('plugin:') && !pluginsLoaded) return
const validTabIds = TRIP_TABS.map(t => t.id)
if (!validTabIds.includes(activeTab)) {
setActiveTab('plan')
sessionStorage.setItem(`trip-tab-${tripId}`, 'plan')
}
- }, [enabledAddons])
+ }, [enabledAddons, tripPluginIds, pluginsLoaded])
const handleTabChange = (tabId: string): void => {
setActiveTab(tabId)
diff --git a/client/src/store/pluginStore.test.ts b/client/src/store/pluginStore.test.ts
index 234c7b0aa..5820e0a35 100644
--- a/client/src/store/pluginStore.test.ts
+++ b/client/src/store/pluginStore.test.ts
@@ -17,6 +17,7 @@ describe('pluginStore', () => {
plugins: [
{ id: 'flights', name: 'Flights', type: 'widget', icon: 'Plane' },
{ id: 'report', name: 'Report', type: 'page', icon: 'FileText' },
+ { id: 'diary', name: 'Diary', type: 'trip-page', icon: 'Book' },
],
}),
),
@@ -26,9 +27,10 @@ describe('pluginStore', () => {
const s = usePluginStore.getState();
expect(s.loaded).toBe(true);
- expect(s.plugins).toHaveLength(2);
+ expect(s.plugins).toHaveLength(3);
expect(s.pages().map((p) => p.id)).toEqual(['report']);
expect(s.widgets().map((p) => p.id)).toEqual(['flights']);
+ expect(s.tripPages().map((p) => p.id)).toEqual(['diary']);
expect(s.getById('flights')?.name).toBe('Flights');
expect(s.getById('nope')).toBeUndefined();
});
diff --git a/client/src/store/pluginStore.ts b/client/src/store/pluginStore.ts
index 7e327a807..94d4e67d2 100644
--- a/client/src/store/pluginStore.ts
+++ b/client/src/store/pluginStore.ts
@@ -10,9 +10,9 @@ import { pluginsApi } from '../api/client'
export interface ActivePlugin {
id: string
name: string
- type: 'integration' | 'page' | 'widget'
+ type: 'integration' | 'page' | 'widget' | 'trip-page'
icon: string | null
- slot?: 'sidebar' | 'hero'
+ slot?: 'sidebar' | 'hero' | 'place-detail'
}
interface PluginState {
@@ -23,6 +23,8 @@ interface PluginState {
pages: () => ActivePlugin[]
widgets: () => ActivePlugin[]
heroWidgets: () => ActivePlugin[]
+ tripPages: () => ActivePlugin[]
+ placeDetailWidgets: () => ActivePlugin[]
}
export const usePluginStore = create<PluginState>((set, get) => ({
@@ -40,6 +42,8 @@ export const usePluginStore = create<PluginState>((set, get) => ({
getById: (id) => get().plugins.find((p) => p.id === id),
pages: () => get().plugins.filter((p) => p.type === 'page'),
- widgets: () => get().plugins.filter((p) => p.type === 'widget' && p.slot !== 'hero'),
+ widgets: () => get().plugins.filter((p) => p.type === 'widget' && p.slot !== 'hero' && p.slot !== 'place-detail'),
heroWidgets: () => get().plugins.filter((p) => p.type === 'widget' && p.slot === 'hero'),
+ tripPages: () => get().plugins.filter((p) => p.type === 'trip-page'),
+ placeDetailWidgets: () => get().plugins.filter((p) => p.type === 'widget' && p.slot === 'place-detail'),
}))
diff --git a/client/vite.config.js b/client/vite.config.js
index 6cdcfe889..dfedccdbc 100644
--- a/client/vite.config.js
+++ b/client/vite.config.js
@@ -1,6 +1,6 @@
-import { defineConfig } from 'vite'
-import react from '@vitejs/plugin-react'
-import { VitePWA } from 'vite-plugin-pwa'
+import react from '@vitejs/plugin-react';
+import { defineConfig } from 'vite';
+import { VitePWA } from 'vite-plugin-pwa';
export default defineConfig({
plugins: [
@@ -11,7 +11,14 @@ export default defineConfig({
maximumFileSizeToCacheInBytes: 10 * 1024 * 1024,
globPatterns: ['**/*.{js,css,html,svg,png,woff,woff2,ttf}'],
navigateFallback: 'index.html',
- navigateFallbackDenylist: [/^\/api/, /^\/uploads/, /^\/mcp/, /^\/oauth\//, /^\/.well-known\//, /^\/plugin-frame\//],
+ navigateFallbackDenylist: [
+ /^\/api/,
+ /^\/uploads/,
+ /^\/mcp/,
+ /^\/oauth\//,
+ /^\/.well-known\//,
+ /^\/plugin-frame\//,
+ ],
runtimeCaching: [
{
// Carto map tiles (default provider)
@@ -129,6 +136,10 @@ export default defineConfig({
target: 'http://localhost:3001',
changeOrigin: true,
},
+ '/plugin-frame': {
+ target: 'http://localhost:3001',
+ changeOrigin: true,
+ },
'/uploads': {
target: 'http://localhost:3001',
changeOrigin: true,
@@ -164,6 +175,6 @@ export default defineConfig({
target: 'http://localhost:3001',
changeOrigin: true,
},
- }
- }
-})
+ },
+ },
+});
diff --git a/docker-compose.yml b/docker-compose.yml
index 17cbdcae7..3a343f791 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -45,6 +45,7 @@ services:
# - MCP_RATE_LIMIT=300 # Max MCP API requests per user per minute (default: 300)
# - MCP_MAX_SESSION_PER_USER=20 # Max concurrent MCP sessions per user (default: 20)
# - KITINERARY_EXTRACTOR_PATH= # Optional. Full path to kitinerary-extractor binary. Auto-detected from PATH and /usr/lib/*/libexec/kf6/ when unset.
+# - UNSPLASH_ACCESS_KEY= # Optional. Unsplash Access Key for trip-cover / place-image search. Without one, TREK uses Unsplash's unauthenticated endpoint, which some datacenter/VPS IPs are blocked from (#1449). Free key at unsplash.com/developers. Can also be set per-admin in Admin > Settings; the env var overrides that.
volumes:
- ./data:/app/data
- ./uploads:/app/uploads
diff --git a/plugin-sdk/README.md b/plugin-sdk/README.md
index 52897fc20..edbe579cf 100644
--- a/plugin-sdk/README.md
+++ b/plugin-sdk/README.md
@@ -5,11 +5,17 @@ The SDK for building [TREK](https://github.com/mauriceboe/TREK) plugins.
## Scaffold a plugin
```bash
-npx trek-plugin-sdk create # interactive wizard (id, type, permissions)
+npx trek-plugin-sdk # no command? a guided menu of everything below
+npx trek-plugin-sdk create # interactive wizard (id, location, type, permissions)
npx trek-plugin-sdk create my-plugin --type widget # or non-interactive
cd my-plugin
```
+The wizard also offers to initialize a git repo and install dependencies for you.
+In a non-interactive shell (CI, pipes) every command stays flag-driven with plain
+output — no prompts, and machine output (`entry` JSON, `pack --json`, PR URLs) stays
+on stdout.
+
## Develop with a live reload loop
`dev` runs your plugin locally — no full TREK needed. It injects a `ctx` that
@@ -21,9 +27,34 @@ SQLite file, serves your routes and your page/widget UI, and reloads on save.
npx trek-plugin-sdk dev # http://localhost:4317 — dashboard, routes, UI
```
-Hit a route as an unauthenticated request with `?_anon=1`. Drop a
-`dev-fixtures.json` (trips, users, config) next to your manifest to feed
-`ctx.trips` / `ctx.users`.
+Open **`/preview`** to see a page/widget rendered in a real sandboxed frame with a
+theme/accent/appearance toggle (`trek.invoke()` is proxied to your routes). Hit a route
+as an unauthenticated request with `?_anon=1`. Drop a `dev-fixtures.json` (trips, users,
+config) next to your manifest to feed `ctx.trips` / `ctx.users`.
+
+## Build a native UI (page / widget)
+
+The UI is a sandboxed, opaque-origin iframe that can't load TREK's stylesheet — so the
+SDK ships it. Put **one line** in your `client/index.html` `<head>`:
+
+```html
+<!-- trek:ui -->
+```
+
+`dev` and `pack` expand it into the inlined **design kit**: token-driven styles that
+follow the host's theme and accent (glass, cards, `.trek-btn`, `.trek-input`,
+`.trek-chip`, `.trek-row`, hover), plus a `window.trek` bridge:
+
+```js
+trek.onContext((ctx) => { /* ctx.theme, ctx.tokens, ctx.appearance, ctx.user, ctx.tripId */ })
+const data = await trek.invoke('/status') // calls your own route, host-proxied
+trek.notify('success', 'Saved')
+```
+
+The kit applies the theme, mirrors the appearance flags (reduced-motion,
+no-transparency) and auto-reports your height. See the
+[Plugin Development wiki](https://github.com/mauriceboe/TREK/wiki/Plugin-Development)
+for the full component + token reference.
## Write a plugin
@@ -99,6 +130,7 @@ losing it means you can't ship signed updates.
- `PLUGIN_API_VERSION` — embed as `apiVersion` in your manifest.
- `validateManifest(json)` — the manifest rules the server loader uses.
- `createMockHost(opts)` (from `trek-plugin-sdk/testing`).
+- `TREK_UI_CSS`, `TREK_THEME_JS`, `TREK_UI_MARKER`, `injectTrekUi(html)` — the design kit, for authors who inline it themselves (a bundler, a custom build). Most plugins just use the `<!-- trek:ui -->` marker instead.
## Commands
diff --git a/plugin-sdk/examples/trip-doctor/README.md b/plugin-sdk/examples/trip-doctor/README.md
new file mode 100644
index 000000000..bd3095c54
--- /dev/null
+++ b/plugin-sdk/examples/trip-doctor/README.md
@@ -0,0 +1,41 @@
+# Trip Doctor
+
+> A hooks-only example plugin that enriches TREK's own planner — no UI of its own.
+
+Trip Doctor is the companion example for the **provider hooks** and **entity
+metadata** added in #1429. It shows how a plugin can contribute *data* that TREK
+renders natively, instead of shipping its own iframe widget.
+
+## What it does
+
+- **Warnings** — scans the open trip and flags places with no map location, plus a
+ tip when the trip has no bookings yet. These appear as a non-blocking banner at
+ the top of the trip planner (via the `warningProvider` hook).
+- **Place notes** — pin a private note on any place; it shows up as a "Note" row at
+ the foot of the place-detail panel (via the `placeDetailProvider` hook). Notes are
+ stored in the plugin's own per-plugin metadata (`ctx.meta`), not in a schema fork.
+- **`POST /pin`** `{ placeId, note }` — set or clear a place's note. Call it from a
+ companion widget, a keyboard shortcut, or `curl`.
+
+## Permissions
+
+| Permission | Why |
+|---|---|
+| `db:read:trips` | Read the trip's places + reservations to find gaps. Membership-checked by the host — the plugin only ever sees a trip the current user can access. |
+| `db:meta` | Store/read the plugin's own note on a place. Isolated to this plugin; writes require the user's `place_edit` permission. |
+| `hook:trip-warning-provider` | Contribute the validation warnings shown in the planner. |
+| `hook:place-detail-provider` | Contribute the "Note" row shown on a place. |
+
+No network access. Every read and write is bound by the host to the person viewing
+the planner — Trip Doctor never passes a user id, and a hook that errors or runs
+long is dropped without affecting the planner.
+
+## Run it
+
+```bash
+npx @trek/plugin-sdk dev # hot-reload against a local TREK
+npx @trek/plugin-sdk pack # build a signed .trekplugin bundle
+```
+
+See the [Plugin Cookbook](https://github.com/mauriceboe/TREK/wiki/Plugin-Cookbook)
+for the individual recipes this example is built from.
diff --git a/plugin-sdk/examples/trip-doctor/server/index.js b/plugin-sdk/examples/trip-doctor/server/index.js
new file mode 100644
index 000000000..4530f3b21
--- /dev/null
+++ b/plugin-sdk/examples/trip-doctor/server/index.js
@@ -0,0 +1,73 @@
+// Trip Doctor — a hooks-only TREK plugin that showcases the #1429 capabilities.
+//
+// It has no UI of its own. Instead it feeds data into TREK's own planner surfaces
+// through two provider hooks, and stores its notes in its own per-plugin metadata:
+//
+// • warningProvider → validation banner in the trip planner
+// • placeDetailProvider → an extra "Note" row at the foot of the place panel
+// • POST /pin → pin/clear that note (ctx.meta), from your own UI or a
+// keyboard-shortcut plugin
+//
+// SECURITY: the plugin never passes a user id. The host binds the person viewing
+// the planner to the invocation, membership-checks the trip/place against THEM,
+// and (for meta writes) requires their place_edit permission. A hook that is slow
+// or throws is dropped by the host, so it can never break or stall the planner.
+
+module.exports = {
+ hooks: {
+ // Core calls this for the open trip; return the problems to surface.
+ warningProvider: {
+ async getWarnings(tripId, ctx) {
+ const warnings = [];
+
+ const places = await ctx.trips.getPlaces(tripId);
+ for (const p of places) {
+ if (p.lat == null || p.lng == null) {
+ warnings.push({
+ level: 'warning',
+ message: `"${p.name || 'A place'}" has no map location`,
+ placeId: p.id,
+ });
+ }
+ }
+
+ const reservations = await ctx.trips.getReservations(tripId);
+ if (reservations.length === 0) {
+ warnings.push({ level: 'info', message: 'No bookings added to this trip yet' });
+ }
+
+ return warnings;
+ },
+ },
+
+ // Core calls this for the open place; return the pinned note (if any).
+ placeDetailProvider: {
+ async getDetails(placeId, ctx) {
+ const note = await ctx.meta.get('place', placeId, 'note');
+ return note ? [{ label: 'Note', value: String(note) }] : [];
+ },
+ },
+ },
+
+ routes: [
+ {
+ // POST /pin { placeId, note } — pin a note on a place, or clear it (empty note).
+ method: 'POST',
+ path: '/pin',
+ auth: true,
+ async handler(req, ctx) {
+ const json = { 'content-type': 'application/json' };
+ const { placeId, note } = req.body || {};
+ if (!placeId) {
+ return { status: 400, headers: json, body: JSON.stringify({ error: 'placeId required' }) };
+ }
+ if (note && String(note).trim()) {
+ await ctx.meta.set('place', Number(placeId), 'note', String(note).trim());
+ } else {
+ await ctx.meta.delete('place', Number(placeId), 'note');
+ }
+ return { status: 200, headers: json, body: JSON.stringify({ ok: true }) };
+ },
+ },
+ ],
+};
diff --git a/plugin-sdk/examples/trip-doctor/trek-plugin.json b/plugin-sdk/examples/trip-doctor/trek-plugin.json
new file mode 100644
index 000000000..d574ec1c9
--- /dev/null
+++ b/plugin-sdk/examples/trip-doctor/trek-plugin.json
@@ -0,0 +1,23 @@
+{
+ "id": "trip-doctor",
+ "name": "Trip Doctor",
+ "version": "1.0.0",
+ "apiVersion": 1,
+ "author": "TREK",
+ "description": "Checks a trip for common gaps (places with no map location, no bookings yet) and lets you pin a private note on any place. A hooks-only plugin — it has no UI of its own; TREK renders everything natively.",
+ "homepage": "https://github.com/mauriceboe/trek-plugin-trip-doctor",
+ "license": "MIT",
+ "icon": "Stethoscope",
+ "type": "integration",
+ "trek": ">=3.2.0 <4.0.0",
+ "nativeModules": false,
+ "permissions": [
+ "db:read:trips",
+ "db:meta",
+ "hook:trip-warning-provider",
+ "hook:place-detail-provider"
+ ],
+ "routes": [
+ { "method": "POST", "path": "/pin", "auth": true }
+ ]
+}
diff --git a/plugin-sdk/package-lock.json b/plugin-sdk/package-lock.json
index f508d9def..b365df114 100644
--- a/plugin-sdk/package-lock.json
+++ b/plugin-sdk/package-lock.json
@@ -1,180 +1,151 @@
{
"name": "trek-plugin-sdk",
- "version": "1.0.0",
+ "version": "1.3.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "trek-plugin-sdk",
- "version": "1.0.0",
+ "version": "1.3.0",
"license": "MIT",
+ "dependencies": {
+ "@clack/prompts": "^1.7.0",
+ "semver": "^7.7.4"
+ },
"bin": {
"create-trek-plugin": "dist/cli/create.js",
- "trek-plugin": "dist/cli/trek-plugin.js"
+ "trek-plugin": "dist/cli/trek-plugin.js",
+ "trek-plugin-sdk": "dist/cli/trek-plugin.js"
},
"devDependencies": {
- "@types/node": "^22.0.0",
- "typescript": "^5.6.0",
- "vitest": "^2.1.0"
+ "@types/node": "^22.20.0",
+ "@types/semver": "^7.7.1",
+ "typescript": "^5.9.3",
+ "vitest": "^4.1.9"
+ },
+ "engines": {
+ "node": ">=18"
}
},
- "node_modules/@esbuild/aix-ppc64": {
- "version": "0.21.5",
- "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.21.5.tgz",
- "integrity": "sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ==",
- "cpu": [
- "ppc64"
- ],
- "dev": true,
+ "node_modules/@clack/core": {
+ "version": "1.4.3",
+ "resolved": "https://registry.npmjs.org/@clack/core/-/core-1.4.3.tgz",
+ "integrity": "sha512-/kr3UWNtdJfxZtPgDqUOmG2pvwlmcLGheex5yiZKdwbzZJxhV+HMNR9QNmyY5cGwTNV6LrR7Jtp+KjhUAP1qBQ==",
"license": "MIT",
- "optional": true,
- "os": [
- "aix"
- ],
+ "dependencies": {
+ "fast-wrap-ansi": "^0.2.0",
+ "sisteransi": "^1.0.5"
+ },
"engines": {
- "node": ">=12"
+ "node": ">= 20.12.0"
}
},
- "node_modules/@esbuild/android-arm": {
- "version": "0.21.5",
- "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.21.5.tgz",
- "integrity": "sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg==",
- "cpu": [
- "arm"
- ],
- "dev": true,
+ "node_modules/@clack/prompts": {
+ "version": "1.7.0",
+ "resolved": "https://registry.npmjs.org/@clack/prompts/-/prompts-1.7.0.tgz",
+ "integrity": "sha512-y7/yvZ2TPAnR9+jnc00klvNNLkJiXFFrQA/hlLCcxA9a2A4zQIOimyFQ9XfwYKiGD1fb5GY8vbKIIgO8d5Tb2A==",
"license": "MIT",
- "optional": true,
- "os": [
- "android"
- ],
+ "dependencies": {
+ "@clack/core": "1.4.3",
+ "fast-string-width": "^3.0.2",
+ "fast-wrap-ansi": "^0.2.0",
+ "sisteransi": "^1.0.5"
+ },
"engines": {
- "node": ">=12"
+ "node": ">= 20.12.0"
}
},
- "node_modules/@esbuild/android-arm64": {
- "version": "0.21.5",
- "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.21.5.tgz",
- "integrity": "sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A==",
- "cpu": [
- "arm64"
- ],
+ "node_modules/@emnapi/core": {
+ "version": "1.11.1",
+ "resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.11.1.tgz",
+ "integrity": "sha512-RSvbQmHzdKzNsLYa/wHrbc3KN4sYLKAdPZxqiM2HATqv/SBk2/ENSHpvXGaLOMcsAyz0poEGqkmmKYG3OWiJEQ==",
"dev": true,
"license": "MIT",
"optional": true,
- "os": [
- "android"
- ],
- "engines": {
- "node": ">=12"
+ "dependencies": {
+ "@emnapi/wasi-threads": "1.2.2",
+ "tslib": "^2.4.0"
}
},
- "node_modules/@esbuild/android-x64": {
- "version": "0.21.5",
- "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.21.5.tgz",
- "integrity": "sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA==",
- "cpu": [
- "x64"
- ],
+ "node_modules/@emnapi/runtime": {
+ "version": "1.11.1",
+ "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.11.1.tgz",
+ "integrity": "sha512-vgj7R3y3Wgx24IQaGPA/R6YFXLHVMOZ0uVEyIQPaWs+rd1AzfEMXlAC22FYwO1XkKR6NPsq7mUandH8oIRdZFw==",
"dev": true,
"license": "MIT",
"optional": true,
- "os": [
- "android"
- ],
- "engines": {
- "node": ">=12"
+ "dependencies": {
+ "tslib": "^2.4.0"
}
},
- "node_modules/@esbuild/darwin-arm64": {
- "version": "0.21.5",
- "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.21.5.tgz",
- "integrity": "sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ==",
- "cpu": [
- "arm64"
- ],
+ "node_modules/@emnapi/wasi-threads": {
+ "version": "1.2.2",
+ "resolved": "https://registry.npmjs.org/@emnapi/wasi-threads/-/wasi-threads-1.2.2.tgz",
+ "integrity": "sha512-c95qOXkHdydNKhscBTebqEC1CVAZpyqOfVfBzQ1qgzyl3gfeldUjIggDbIZgDKsHLgnsM+igH7TJ/eAasaVuMA==",
"dev": true,
"license": "MIT",
"optional": true,
- "os": [
- "darwin"
- ],
- "engines": {
- "node": ">=12"
+ "dependencies": {
+ "tslib": "^2.4.0"
}
},
- "node_modules/@esbuild/darwin-x64": {
- "version": "0.21.5",
- "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.21.5.tgz",
- "integrity": "sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw==",
- "cpu": [
- "x64"
- ],
+ "node_modules/@jridgewell/sourcemap-codec": {
+ "version": "1.5.5",
+ "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz",
+ "integrity": "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==",
"dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "darwin"
- ],
- "engines": {
- "node": ">=12"
- }
+ "license": "MIT"
},
- "node_modules/@esbuild/freebsd-arm64": {
- "version": "0.21.5",
- "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.21.5.tgz",
- "integrity": "sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g==",
- "cpu": [
- "arm64"
- ],
+ "node_modules/@napi-rs/wasm-runtime": {
+ "version": "1.1.6",
+ "resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-1.1.6.tgz",
+ "integrity": "sha512-ZLv/JdUfkvOy9eCnnBaGfiO+XimbjebAeO+MRQqD/B+FR1tnRN0tpKSJHRbE8sFfS6aqsXZ67TQjfwfsxULVbg==",
"dev": true,
"license": "MIT",
"optional": true,
- "os": [
- "freebsd"
- ],
- "engines": {
- "node": ">=12"
+ "dependencies": {
+ "@tybys/wasm-util": "^0.10.3"
+ },
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/Brooooooklyn"
+ },
+ "peerDependencies": {
+ "@emnapi/core": "^1.7.1",
+ "@emnapi/runtime": "^1.7.1"
}
},
- "node_modules/@esbuild/freebsd-x64": {
- "version": "0.21.5",
- "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.21.5.tgz",
- "integrity": "sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ==",
- "cpu": [
- "x64"
- ],
+ "node_modules/@oxc-project/types": {
+ "version": "0.138.0",
+ "resolved": "https://registry.npmjs.org/@oxc-project/types/-/types-0.138.0.tgz",
+ "integrity": "sha512-1a7ZKmrRTCoN1XMZ4L0PyyqrMnrNlLyPuOkdSX2MZg7IiIGRUyurNhAm73ptDOraoBcIordsIGKNPKUzy3ZmfA==",
"dev": true,
"license": "MIT",
- "optional": true,
- "os": [
- "freebsd"
- ],
- "engines": {
- "node": ">=12"
+ "funding": {
+ "url": "https://github.com/sponsors/Boshen"
}
},
- "node_modules/@esbuild/linux-arm": {
- "version": "0.21.5",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.21.5.tgz",
- "integrity": "sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA==",
+ "node_modules/@rolldown/binding-android-arm64": {
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm64/-/binding-android-arm64-1.1.4.tgz",
+ "integrity": "sha512-EZLpf/8y7GXkkra90ML47kzik/GMP3EMcE9bPyHmRfxLC6z9+aW5A8poCsoxjrT5GfEcNAAvWwUHjvP1pUQkfw==",
"cpu": [
- "arm"
+ "arm64"
],
"dev": true,
"license": "MIT",
"optional": true,
"os": [
- "linux"
+ "android"
],
"engines": {
- "node": ">=12"
+ "node": "^20.19.0 || >=22.12.0"
}
},
- "node_modules/@esbuild/linux-arm64": {
- "version": "0.21.5",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.21.5.tgz",
- "integrity": "sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q==",
+ "node_modules/@rolldown/binding-darwin-arm64": {
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-arm64/-/binding-darwin-arm64-1.1.4.tgz",
+ "integrity": "sha512-aUi+HBvmYb7j8krl1+qJgkG8C17fO79gk3c+jPw4S8glRFc1DTija9S3EyaTSQUm5GJXYKDAsugBEhFHH2vYiQ==",
"cpu": [
"arm64"
],
@@ -182,52 +153,52 @@
"license": "MIT",
"optional": true,
"os": [
- "linux"
+ "darwin"
],
"engines": {
- "node": ">=12"
+ "node": "^20.19.0 || >=22.12.0"
}
},
- "node_modules/@esbuild/linux-ia32": {
- "version": "0.21.5",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.21.5.tgz",
- "integrity": "sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg==",
+ "node_modules/@rolldown/binding-darwin-x64": {
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-x64/-/binding-darwin-x64-1.1.4.tgz",
+ "integrity": "sha512-F7hHC3gwY11+vByKPRWqwGbeXWVgKmL+pTGCinaEhdihzBV2aQ0fvZOch9cXYUOKuKKq429HeYXOqQLc7wFCEg==",
"cpu": [
- "ia32"
+ "x64"
],
"dev": true,
"license": "MIT",
"optional": true,
"os": [
- "linux"
+ "darwin"
],
"engines": {
- "node": ">=12"
+ "node": "^20.19.0 || >=22.12.0"
}
},
- "node_modules/@esbuild/linux-loong64": {
- "version": "0.21.5",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.21.5.tgz",
- "integrity": "sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg==",
+ "node_modules/@rolldown/binding-freebsd-x64": {
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-freebsd-x64/-/binding-freebsd-x64-1.1.4.tgz",
+ "integrity": "sha512-sI5yw+7s92SK6odiEhD5lKCBlWcpjHS5qyqpVQbZAJ0fIzEUXrmbl3DH2ybR3PZogulNJF+COLtmA8hUfvkCCQ==",
"cpu": [
- "loong64"
+ "x64"
],
"dev": true,
"license": "MIT",
"optional": true,
"os": [
- "linux"
+ "freebsd"
],
"engines": {
- "node": ">=12"
+ "node": "^20.19.0 || >=22.12.0"
}
},
- "node_modules/@esbuild/linux-mips64el": {
- "version": "0.21.5",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.21.5.tgz",
- "integrity": "sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg==",
+ "node_modules/@rolldown/binding-linux-arm-gnueabihf": {
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-1.1.4.tgz",
+ "integrity": "sha512-mCi0OKgEieFircrtVYmQAFGszRtMnZ6fpZAXrxanXAu7lqZcsK1E1RAaZNG0uKAnxox3B1f4EyQNnoyMfN1vAA==",
"cpu": [
- "mips64el"
+ "arm"
],
"dev": true,
"license": "MIT",
@@ -236,15 +207,15 @@
"linux"
],
"engines": {
- "node": ">=12"
+ "node": "^20.19.0 || >=22.12.0"
}
},
- "node_modules/@esbuild/linux-ppc64": {
- "version": "0.21.5",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.21.5.tgz",
- "integrity": "sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w==",
+ "node_modules/@rolldown/binding-linux-arm64-gnu": {
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.1.4.tgz",
+ "integrity": "sha512-B9Ial3Kv5sh0SHnB1g/QWcUQCEvCF6QKGAl4zXypYj65mVI+B4AhFBwPtSN7pDrJeIx8Z7zdy4ntx+wQABom7w==",
"cpu": [
- "ppc64"
+ "arm64"
],
"dev": true,
"license": "MIT",
@@ -253,15 +224,15 @@
"linux"
],
"engines": {
- "node": ">=12"
+ "node": "^20.19.0 || >=22.12.0"
}
},
- "node_modules/@esbuild/linux-riscv64": {
- "version": "0.21.5",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.21.5.tgz",
- "integrity": "sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA==",
+ "node_modules/@rolldown/binding-linux-arm64-musl": {
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.1.4.tgz",
+ "integrity": "sha512-lZVym0PuHE1KZ22gmFTC15lAkrg9iTszR617oYRB/iPY1A56ywoJzVKOJBKaot5RiikCObmur6pogpse3gRcng==",
"cpu": [
- "riscv64"
+ "arm64"
],
"dev": true,
"license": "MIT",
@@ -270,15 +241,15 @@
"linux"
],
"engines": {
- "node": ">=12"
+ "node": "^20.19.0 || >=22.12.0"
}
},
- "node_modules/@esbuild/linux-s390x": {
- "version": "0.21.5",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.21.5.tgz",
- "integrity": "sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A==",
+ "node_modules/@rolldown/binding-linux-ppc64-gnu": {
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-1.1.4.tgz",
+ "integrity": "sha512-t2DNiLJWNTbnEHyUzTumldML6ET4/g16467LZoDDJ3tSxGvguL5/NyC2lCsNKuyRycg9XeDQF5SSv+TNOhQEXg==",
"cpu": [
- "s390x"
+ "ppc64"
],
"dev": true,
"license": "MIT",
@@ -287,15 +258,15 @@
"linux"
],
"engines": {
- "node": ">=12"
+ "node": "^20.19.0 || >=22.12.0"
}
},
- "node_modules/@esbuild/linux-x64": {
- "version": "0.21.5",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.21.5.tgz",
- "integrity": "sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ==",
+ "node_modules/@rolldown/binding-linux-s390x-gnu": {
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-1.1.4.tgz",
+ "integrity": "sha512-0WIRnL1Uw4BvTZRLQt+PVgo6ZKTJadlC2btP+/EOXv2f/DWbY0rEgl+y834mIVwP1FkTlWVTrGGJXf12lru7EQ==",
"cpu": [
- "x64"
+ "s390x"
],
"dev": true,
"license": "MIT",
@@ -304,13 +275,13 @@
"linux"
],
"engines": {
- "node": ">=12"
+ "node": "^20.19.0 || >=22.12.0"
}
},
- "node_modules/@esbuild/netbsd-x64": {
- "version": "0.21.5",
- "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.21.5.tgz",
- "integrity": "sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg==",
+ "node_modules/@rolldown/binding-linux-x64-gnu": {
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.1.4.tgz",
+ "integrity": "sha512-JWtGshGfX+oENAKonoNkqEJX+7hC8yfhi9GUyPX1VX4mdh1y5r+ZiJLR5XzAB0aoP6s/PcILsGjKq8O0mm24bw==",
"cpu": [
"x64"
],
@@ -318,16 +289,16 @@
"license": "MIT",
"optional": true,
"os": [
- "netbsd"
+ "linux"
],
"engines": {
- "node": ">=12"
+ "node": "^20.19.0 || >=22.12.0"
}
},
- "node_modules/@esbuild/openbsd-x64": {
- "version": "0.21.5",
- "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.21.5.tgz",
- "integrity": "sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow==",
+ "node_modules/@rolldown/binding-linux-x64-musl": {
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-musl/-/binding-linux-x64-musl-1.1.4.tgz",
+ "integrity": "sha512-rT6yQcxUuXs4CnbofqwHRRV0iem349rLMYpTjkgQGLjrY4ado/eDzwPZPTCgTOlF6Nkp8NEv70yLMTn6qkWxsQ==",
"cpu": [
"x64"
],
@@ -335,52 +306,54 @@
"license": "MIT",
"optional": true,
"os": [
- "openbsd"
+ "linux"
],
"engines": {
- "node": ">=12"
+ "node": "^20.19.0 || >=22.12.0"
}
},
- "node_modules/@esbuild/sunos-x64": {
- "version": "0.21.5",
- "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.21.5.tgz",
- "integrity": "sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg==",
+ "node_modules/@rolldown/binding-openharmony-arm64": {
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-openharmony-arm64/-/binding-openharmony-arm64-1.1.4.tgz",
+ "integrity": "sha512-KXMGoboq5cyaCQjDA4GLuRiOwBQ0EyFnJoVViLeZ45/3rFItRODEr+NdsBcVpll40hhNArlm/speWGRvj08LzA==",
"cpu": [
- "x64"
+ "arm64"
],
"dev": true,
"license": "MIT",
"optional": true,
"os": [
- "sunos"
+ "openharmony"
],
"engines": {
- "node": ">=12"
+ "node": "^20.19.0 || >=22.12.0"
}
},
- "node_modules/@esbuild/win32-arm64": {
- "version": "0.21.5",
- "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.21.5.tgz",
- "integrity": "sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A==",
+ "node_modules/@rolldown/binding-wasm32-wasi": {
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-wasm32-wasi/-/binding-wasm32-wasi-1.1.4.tgz",
+ "integrity": "sha512-5K83rb36oJiY7BCyE9zLZtGcPV4g5wvq+xwdO0XPIwDVZI8cyB/AUjkNXGb92/rnmezEkjMOpgY61rtwjQtFwg==",
"cpu": [
- "arm64"
+ "wasm32"
],
"dev": true,
"license": "MIT",
"optional": true,
- "os": [
- "win32"
- ],
+ "dependencies": {
+ "@emnapi/core": "1.11.1",
+ "@emnapi/runtime": "1.11.1",
+ "@napi-rs/wasm-runtime": "^1.1.6"
+ },
"engines": {
- "node": ">=12"
+ "node": "^20.19.0 || >=22.12.0"
}
},
- "node_modules/@esbuild/win32-ia32": {
- "version": "0.21.5",
- "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.21.5.tgz",
- "integrity": "sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA==",
+ "node_modules/@rolldown/binding-win32-arm64-msvc": {
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.1.4.tgz",
+ "integrity": "sha512-PnWBtw3TV5KOg69HQQDR0mnQuyCmSGR2pAB4DC1rPF808fgKeTUMj2EOEyKATpgiuxuR5APQmiDO7PDgEjTFSA==",
"cpu": [
- "ia32"
+ "arm64"
],
"dev": true,
"license": "MIT",
@@ -389,13 +362,13 @@
"win32"
],
"engines": {
- "node": ">=12"
+ "node": "^20.19.0 || >=22.12.0"
}
},
- "node_modules/@esbuild/win32-x64": {
- "version": "0.21.5",
- "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.21.5.tgz",
- "integrity": "sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw==",
+ "node_modules/@rolldown/binding-win32-x64-msvc": {
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.1.4.tgz",
+ "integrity": "sha512-M1lpniBePobTfsa7Ks9a199e1akxsXn+GYBUKsEzv3YFzOm1HJAMNwKI3qr0Zq+mxwx9gOZoTdP1yXRYsZUocQ==",
"cpu": [
"x64"
],
@@ -406,659 +379,571 @@
"win32"
],
"engines": {
- "node": ">=12"
+ "node": "^20.19.0 || >=22.12.0"
}
},
- "node_modules/@jridgewell/sourcemap-codec": {
- "version": "1.5.5",
- "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz",
- "integrity": "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==",
+ "node_modules/@rolldown/pluginutils": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/@rolldown/pluginutils/-/pluginutils-1.0.1.tgz",
+ "integrity": "sha512-2j9bGt5Jh8hj+vPtgzPtl72j0yRxHAyumoo6TNfAjsLB04UtpSvPbPcDcBMxz7n+9CYB0c1GxQFxYRg2jimqGw==",
"dev": true,
"license": "MIT"
},
- "node_modules/@rollup/rollup-android-arm-eabi": {
- "version": "4.62.2",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.62.2.tgz",
- "integrity": "sha512-6o7ZLZK+BeenkZCFNDXqpbjw9bD6nuWonvS/lwQJp7NoVVxm6p3qE7qQ5jGuBjiFsgvqjD8mZAU5oWxTmbOeOg==",
- "cpu": [
- "arm"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "android"
- ]
- },
- "node_modules/@rollup/rollup-android-arm64": {
- "version": "4.62.2",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.62.2.tgz",
- "integrity": "sha512-BaH7BllCACHoH1LguOU56UItGfUWjujlO65kS9LAodViaN4bwIKd7oeW/ZHJ/4ljr/7MIiENnNy3HJ0zXv8Zkw==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "android"
- ]
- },
- "node_modules/@rollup/rollup-darwin-arm64": {
- "version": "4.62.2",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.62.2.tgz",
- "integrity": "sha512-v39RCCvj4He82I9sFmk+M1VZ0PLM9sfsLVikjfx2hYBNALhrrOR2D3JjQA6AhlaSOgcR+RzrKY7e1+bT6SUO/A==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "darwin"
- ]
- },
- "node_modules/@rollup/rollup-darwin-x64": {
- "version": "4.62.2",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.62.2.tgz",
- "integrity": "sha512-yl0y2vq3S3lHeuXhEdss6TWfKW8vkujImO12tn4ZkG/4oghr09LvdYm2RElVjokTQiUvDUGXLGsYeLqUMCKpGA==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "darwin"
- ]
- },
- "node_modules/@rollup/rollup-freebsd-arm64": {
- "version": "4.62.2",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.62.2.tgz",
- "integrity": "sha512-tT4pvt4qXD+vEoezupCWi+a1F0vvDiksiHc+PxRlYTOH1I6/X4id9jPxTP+Fg+545euaFT1jJVs4CEdHZAU1vw==",
- "cpu": [
- "arm64"
- ],
+ "node_modules/@standard-schema/spec": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/@standard-schema/spec/-/spec-1.1.0.tgz",
+ "integrity": "sha512-l2aFy5jALhniG5HgqrD6jXLi/rUWrKvqN/qJx6yoJsgKhblVd+iqqU4RCXavm/jPityDo5TCvKMnpjKnOriy0w==",
"dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "freebsd"
- ]
+ "license": "MIT"
},
- "node_modules/@rollup/rollup-freebsd-x64": {
- "version": "4.62.2",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.62.2.tgz",
- "integrity": "sha512-6nU5F2wCW+qvCBhTn1pdIU3bzsIoF7EUwsCDRxilWGprQR6yd508YnH9+OKFCwpfS8pjZqDUmnCAr7exax0XCg==",
- "cpu": [
- "x64"
- ],
+ "node_modules/@tybys/wasm-util": {
+ "version": "0.10.3",
+ "resolved": "https://registry.npmjs.org/@tybys/wasm-util/-/wasm-util-0.10.3.tgz",
+ "integrity": "sha512-F3fo1MYrRJYL3zER0OUOmkutjr1Vp23m7OsSgp7nq4SP6OqX6C/56XFIPAl5bt3zaBRjmW7SGz3u/6LwFpYcOg==",
"dev": true,
"license": "MIT",
"optional": true,
- "os": [
- "freebsd"
- ]
+ "dependencies": {
+ "tslib": "^2.4.0"
+ }
},
- "node_modules/@rollup/rollup-linux-arm-gnueabihf": {
- "version": "4.62.2",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.62.2.tgz",
- "integrity": "sha512-n1GJHPOvpIfhi3TmrCeh6S6URt9BFCt0KQE3qvexyGCTAKpR4Lg+eWvNZEqu7epxwus/8ElT3hacYEucm49SZg==",
- "cpu": [
- "arm"
- ],
+ "node_modules/@types/chai": {
+ "version": "5.2.3",
+ "resolved": "https://registry.npmjs.org/@types/chai/-/chai-5.2.3.tgz",
+ "integrity": "sha512-Mw558oeA9fFbv65/y4mHtXDs9bPnFMZAL/jxdPFUpOHHIXX91mcgEHbS5Lahr+pwZFR8A7GQleRWeI6cGFC2UA==",
"dev": true,
"license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ]
+ "dependencies": {
+ "@types/deep-eql": "*",
+ "assertion-error": "^2.0.1"
+ }
},
- "node_modules/@rollup/rollup-linux-arm-musleabihf": {
- "version": "4.62.2",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.62.2.tgz",
- "integrity": "sha512-JqgflS8wEB+UXV/vS1RpRbifGBeN4D5lz8D8oOFbFZw4vedvdOgCFAjfBmIMdW3yL10XpQQ0Ambepw6MXrhOnA==",
- "cpu": [
- "arm"
- ],
+ "node_modules/@types/deep-eql": {
+ "version": "4.0.2",
+ "resolved": "https://registry.npmjs.org/@types/deep-eql/-/deep-eql-4.0.2.tgz",
+ "integrity": "sha512-c9h9dVVMigMPc4bwTvC5dxqtqJZwQPePsWjPlpSOnojbor6pGqdk541lfA7AqFQr5pB1BRdq0juY9db81BwyFw==",
"dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ]
+ "license": "MIT"
},
- "node_modules/@rollup/rollup-linux-arm64-gnu": {
- "version": "4.62.2",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.62.2.tgz",
- "integrity": "sha512-wnFJkogWvN4jm/hQRF2UBaeUmk20j5+DmHvoyWii2b8HJDyvz1MF2OU/6ynXt2KR63rbZLWkFpoytpdc/yBuSA==",
- "cpu": [
- "arm64"
- ],
+ "node_modules/@types/estree": {
+ "version": "1.0.9",
+ "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.9.tgz",
+ "integrity": "sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg==",
"dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ]
+ "license": "MIT"
},
- "node_modules/@rollup/rollup-linux-arm64-musl": {
- "version": "4.62.2",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.62.2.tgz",
- "integrity": "sha512-HVu2bp0zhvJ8xHEV9+UUs7S90VadmBSY3LcIMvozbPo4AuMGDWlz3ymHLHZPX4hR67TKTt8Qp5PJ5RBg/i+RMQ==",
- "cpu": [
- "arm64"
- ],
+ "node_modules/@types/node": {
+ "version": "22.20.0",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-22.20.0.tgz",
+ "integrity": "sha512-QWlFW2wf3nTjC13/DqRnBpR4ZO36VJH/JVBkA/vcnmbTBNQIlnObqyqZE1tUR7+Ni23Lda8R1BxMfbXRpCUx5g==",
"dev": true,
"license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ]
+ "dependencies": {
+ "undici-types": "~6.21.0"
+ }
},
- "node_modules/@rollup/rollup-linux-loong64-gnu": {
- "version": "4.62.2",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.62.2.tgz",
- "integrity": "sha512-mQqqAV8QaoSgr9I2fKDLY2BAVvmKjWoGiu/cSYQonsLvtqwEn1E4QYfnCOcp5zoEqNhsDYin1s6jx/VJmrxlZg==",
- "cpu": [
- "loong64"
- ],
+ "node_modules/@types/semver": {
+ "version": "7.7.1",
+ "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.7.1.tgz",
+ "integrity": "sha512-FmgJfu+MOcQ370SD0ev7EI8TlCAfKYU+B4m5T3yXc1CiRN94g/SZPtsCkk506aUDtlMnFZvasDwHHUcZUEaYuA==",
"dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ]
+ "license": "MIT"
},
- "node_modules/@rollup/rollup-linux-loong64-musl": {
- "version": "4.62.2",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-musl/-/rollup-linux-loong64-musl-4.62.2.tgz",
- "integrity": "sha512-IxKLoxCQ2IWi6bT2akyDUBGsOImDKB+sPp4EsTmwFQ/fMwpCKm8uLSSgP/Kx/QYUgKis6SEZ5/Nlhup0DIA0PQ==",
- "cpu": [
- "loong64"
- ],
+ "node_modules/@vitest/expect": {
+ "version": "4.1.9",
+ "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-4.1.9.tgz",
+ "integrity": "sha512-vl/rYsUKcBr3SnQn166+XR5ZQcgMx3DQhFWdfli/cWpLnLUmbxZvyrJZotLFUryib+LtArYMSTJ5RbQ57ZqrlA==",
"dev": true,
"license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ]
+ "dependencies": {
+ "@standard-schema/spec": "^1.1.0",
+ "@types/chai": "^5.2.2",
+ "@vitest/spy": "4.1.9",
+ "@vitest/utils": "4.1.9",
+ "chai": "^6.2.2",
+ "tinyrainbow": "^3.1.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/vitest"
+ }
},
- "node_modules/@rollup/rollup-linux-ppc64-gnu": {
- "version": "4.62.2",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.62.2.tgz",
- "integrity": "sha512-Mk5ha2RQSgyFfmYYLkBpPnUk8D8FriBxesO1u9O75X0mHgXL1UQcH5Itl2lurWL2tj0RxV9b9tJgipac0hRY9A==",
- "cpu": [
- "ppc64"
- ],
+ "node_modules/@vitest/mocker": {
+ "version": "4.1.9",
+ "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-4.1.9.tgz",
+ "integrity": "sha512-EVkXzBjrPGM+cK8/ANWgBrkUCfJfb38/EfTSO8h7pWvKkyPkpWxvR7BkD2MyItMF62C97zAEoqdpUixwR/e+Rw==",
"dev": true,
"license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ]
+ "dependencies": {
+ "@vitest/spy": "4.1.9",
+ "estree-walker": "^3.0.3",
+ "magic-string": "^0.30.21"
+ },
+ "funding": {
+ "url": "https://opencollective.com/vitest"
+ },
+ "peerDependencies": {
+ "msw": "^2.4.9",
+ "vite": "^6.0.0 || ^7.0.0 || ^8.0.0"
+ },
+ "peerDependenciesMeta": {
+ "msw": {
+ "optional": true
+ },
+ "vite": {
+ "optional": true
+ }
+ }
},
- "node_modules/@rollup/rollup-linux-ppc64-musl": {
- "version": "4.62.2",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-musl/-/rollup-linux-ppc64-musl-4.62.2.tgz",
- "integrity": "sha512-CjvEnqJL/0/TQ3TXX3OPIJ/kmBellrWd4heXUmHeJlTnmwjKpSJzoehLaL6Xk0ZnMHBu9dZuFADNOrtjF4v+2w==",
- "cpu": [
- "ppc64"
- ],
+ "node_modules/@vitest/pretty-format": {
+ "version": "4.1.9",
+ "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-4.1.9.tgz",
+ "integrity": "sha512-s0iufns3iIFitdgm+YR7g1whCAaGtXz459VS9/PqyKDEEFgYIhsHOQmXgIgDuYCt7DeQmiZT0Qe2OA2p4ZPu5A==",
"dev": true,
"license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ]
+ "dependencies": {
+ "tinyrainbow": "^3.1.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/vitest"
+ }
},
- "node_modules/@rollup/rollup-linux-riscv64-gnu": {
- "version": "4.62.2",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.62.2.tgz",
- "integrity": "sha512-1SiZbzwdkaDURsew/tSOrooKiYy7EQGT6m8ufavAi9NEyQb/6VuIxFXAL1fqa4iZe3g4NbNk4P7J32z2tw5Mgg==",
- "cpu": [
- "riscv64"
- ],
+ "node_modules/@vitest/runner": {
+ "version": "4.1.9",
+ "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-4.1.9.tgz",
+ "integrity": "sha512-KXLMDtc7oe70+3mJfGrPUWPesswH+3sTxAMAMl8DG7I8IUQT4XW718dY5ID3vPUcmlu27CcKfY4P3h3I29SLJg==",
"dev": true,
"license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ]
+ "dependencies": {
+ "@vitest/utils": "4.1.9",
+ "pathe": "^2.0.3"
+ },
+ "funding": {
+ "url": "https://opencollective.com/vitest"
+ }
},
- "node_modules/@rollup/rollup-linux-riscv64-musl": {
- "version": "4.62.2",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.62.2.tgz",
- "integrity": "sha512-nQts12zJ3NQRoE6uYljOH89v7szzLDvG2JD/vsX+vGXU8w/At1GowTZ5/7qeFQ8m7L55rpR8Okugnuo5bgjy2Q==",
- "cpu": [
- "riscv64"
- ],
+ "node_modules/@vitest/snapshot": {
+ "version": "4.1.9",
+ "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-4.1.9.tgz",
+ "integrity": "sha512-Jc7RKGNBo8Z28WYIm0Niej4xdSPByRf6mU58VpHQkd6Zh05rlnA+twjbK5HyeIGHxrzsc3mJgS43uM0CZKzaIA==",
"dev": true,
"license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ]
+ "dependencies": {
+ "@vitest/pretty-format": "4.1.9",
+ "@vitest/utils": "4.1.9",
+ "magic-string": "^0.30.21",
+ "pathe": "^2.0.3"
+ },
+ "funding": {
+ "url": "https://opencollective.com/vitest"
+ }
},
- "node_modules/@rollup/rollup-linux-s390x-gnu": {
- "version": "4.62.2",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.62.2.tgz",
- "integrity": "sha512-E9/ll019jhPIJgpzfZoIkBGhcz+kKNgVWYRY0zr9srBdPPFVpvOKW8VaJKUbeK+eZXyQF9ltME+Kk6affeaPgg==",
- "cpu": [
- "s390x"
- ],
+ "node_modules/@vitest/spy": {
+ "version": "4.1.9",
+ "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-4.1.9.tgz",
+ "integrity": "sha512-fHpsS6mIi+PiEW+vcRVOMkX1oSaPKne3VOclSFICPcGOmfKgXPU5iAah+wcNcj2xPrCCmfq99IDGf+EojhhvhA==",
"dev": true,
"license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ]
+ "funding": {
+ "url": "https://opencollective.com/vitest"
+ }
},
- "node_modules/@rollup/rollup-linux-x64-gnu": {
- "version": "4.62.2",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.62.2.tgz",
- "integrity": "sha512-5BqxR/pshjey51iliyzTD5Xi3EN0aLmQ2lZ3lvefVV9c82BvrLo2/6OT55iifpWBufs6kdwWbuOKS841DrmK9A==",
- "cpu": [
- "x64"
- ],
+ "node_modules/@vitest/utils": {
+ "version": "4.1.9",
+ "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-4.1.9.tgz",
+ "integrity": "sha512-A51o8ymO5PpqlWNnBP9ZHPXDIpuMtTLlGSjN7la4US+LJzoUMyhwjA5QXlm39JexgwHKW4Xjs8Z2d3dLCXOeuA==",
"dev": true,
"license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ]
+ "dependencies": {
+ "@vitest/pretty-format": "4.1.9",
+ "convert-source-map": "^2.0.0",
+ "tinyrainbow": "^3.1.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/vitest"
+ }
},
- "node_modules/@rollup/rollup-linux-x64-musl": {
- "version": "4.62.2",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.62.2.tgz",
- "integrity": "sha512-uNN83XxQrRAh/w0/pmAfibcwyb6YWt4gP+dpnQKPVJshAloQ785ii8CT8ZCIxkGg9opVsvAlGhFitSm6D1Jjpg==",
- "cpu": [
- "x64"
- ],
+ "node_modules/assertion-error": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-2.0.1.tgz",
+ "integrity": "sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==",
"dev": true,
"license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ]
+ "engines": {
+ "node": ">=12"
+ }
},
- "node_modules/@rollup/rollup-openbsd-x64": {
- "version": "4.62.2",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-openbsd-x64/-/rollup-openbsd-x64-4.62.2.tgz",
- "integrity": "sha512-srjEIxSH3LRnJN6THczDHWQplqEMFiAJrTab0msUryh9kwNpkICf3Ea6q6MN/2cZwRFUNx5w+h6Hpi4QuHS6Zg==",
- "cpu": [
- "x64"
- ],
+ "node_modules/chai": {
+ "version": "6.2.2",
+ "resolved": "https://registry.npmjs.org/chai/-/chai-6.2.2.tgz",
+ "integrity": "sha512-NUPRluOfOiTKBKvWPtSD4PhFvWCqOi0BGStNWs57X9js7XGTprSmFoz5F0tWhR4WPjNeR9jXqdC7/UpSJTnlRg==",
"dev": true,
"license": "MIT",
- "optional": true,
- "os": [
- "openbsd"
- ]
+ "engines": {
+ "node": ">=18"
+ }
},
- "node_modules/@rollup/rollup-openharmony-arm64": {
- "version": "4.62.2",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.62.2.tgz",
- "integrity": "sha512-8hOJnxgbyObnCm5AlRA3A931xX19xq80RjVTKgJOvEKWqJruP/Uf12IbAOaDjjEXYRewwHLfmF0YRIdK3OwKWA==",
- "cpu": [
- "arm64"
- ],
+ "node_modules/convert-source-map": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz",
+ "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==",
"dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "openharmony"
- ]
+ "license": "MIT"
},
- "node_modules/@rollup/rollup-win32-arm64-msvc": {
- "version": "4.62.2",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.62.2.tgz",
- "integrity": "sha512-mmF4AY1i0hG/bLWUctUq59gtmgaSIRa3cu/A3JFRp/sCNEme2bgDEiDS22P9FbnJB8NJNF4jPJiSP5RHQpUTDg==",
- "cpu": [
- "arm64"
- ],
+ "node_modules/detect-libc": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz",
+ "integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==",
"dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "win32"
- ]
+ "license": "Apache-2.0",
+ "engines": {
+ "node": ">=8"
+ }
},
- "node_modules/@rollup/rollup-win32-ia32-msvc": {
- "version": "4.62.2",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.62.2.tgz",
- "integrity": "sha512-DZgkknc6jhHrk46V25vbAM0zZkyP0nSDkJB8/dRkLTxv470dOmWDqGoEJl/9A0dFfS7yE3REOwNDxpHwSLSt0Q==",
- "cpu": [
- "ia32"
- ],
+ "node_modules/es-module-lexer": {
+ "version": "2.3.0",
+ "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-2.3.0.tgz",
+ "integrity": "sha512-KLdwQm2NvGLDkQDCGvmiQrhkd0JbMzXthwQAUgWjQuQdBLFa3eiBP5arXZyA+f8x+x7OXgud6bq2rxjGtHV2tw==",
"dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "win32"
- ]
+ "license": "MIT"
},
- "node_modules/@rollup/rollup-win32-x64-gnu": {
- "version": "4.62.2",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.62.2.tgz",
- "integrity": "sha512-T6xr6ucWSFto+VGajA8YH26LdpHRuP4YLHEKAtCWvJDOlnmWcDZVCI2Jmjr+IFHDlt2zRaTAKE4tfjTaWLgJBg==",
- "cpu": [
- "x64"
- ],
+ "node_modules/estree-walker": {
+ "version": "3.0.3",
+ "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz",
+ "integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==",
"dev": true,
"license": "MIT",
- "optional": true,
- "os": [
- "win32"
- ]
+ "dependencies": {
+ "@types/estree": "^1.0.0"
+ }
},
- "node_modules/@rollup/rollup-win32-x64-msvc": {
- "version": "4.62.2",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.62.2.tgz",
- "integrity": "sha512-BfzEnDJOt9T8M989/lA37EcJgat01wLRnoi5dQf3QzOH7jzpqTAzdDbVfRljVr5r+jzKqpbHeyOfAaXxAd0PAA==",
- "cpu": [
- "x64"
- ],
+ "node_modules/expect-type": {
+ "version": "1.4.0",
+ "resolved": "https://registry.npmjs.org/expect-type/-/expect-type-1.4.0.tgz",
+ "integrity": "sha512-KfYbmpRm0VbLjEvVa9yGwCi9GI34xvi7A/HXYWQO65CSD2u3MczUJSuwXKFIxlGsgBQizV9q5J9NHj4VG0n+pA==",
"dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "win32"
- ]
+ "license": "Apache-2.0",
+ "engines": {
+ "node": ">=12.0.0"
+ }
},
- "node_modules/@types/estree": {
- "version": "1.0.9",
- "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.9.tgz",
- "integrity": "sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg==",
- "dev": true,
+ "node_modules/fast-string-truncated-width": {
+ "version": "3.0.3",
+ "resolved": "https://registry.npmjs.org/fast-string-truncated-width/-/fast-string-truncated-width-3.0.3.tgz",
+ "integrity": "sha512-0jjjIEL6+0jag3l2XWWizO64/aZVtpiGE3t0Zgqxv0DPuxiMjvB3M24fCyhZUO4KomJQPj3LTSUnDP3GpdwC0g==",
"license": "MIT"
},
- "node_modules/@types/node": {
- "version": "22.20.0",
- "resolved": "https://registry.npmjs.org/@types/node/-/node-22.20.0.tgz",
- "integrity": "sha512-QWlFW2wf3nTjC13/DqRnBpR4ZO36VJH/JVBkA/vcnmbTBNQIlnObqyqZE1tUR7+Ni23Lda8R1BxMfbXRpCUx5g==",
- "dev": true,
+ "node_modules/fast-string-width": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/fast-string-width/-/fast-string-width-3.0.2.tgz",
+ "integrity": "sha512-gX8LrtNEI5hq8DVUfRQMbr5lpaS4nMIWV+7XEbXk2b8kiQIizgnlr12B4dA3ZEx3308ze0O4Q1R+cHts8kyUJg==",
"license": "MIT",
"dependencies": {
- "undici-types": "~6.21.0"
+ "fast-string-truncated-width": "^3.0.2"
}
},
- "node_modules/@vitest/expect": {
- "version": "2.1.9",
- "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-2.1.9.tgz",
- "integrity": "sha512-UJCIkTBenHeKT1TTlKMJWy1laZewsRIzYighyYiJKZreqtdxSos/S1t+ktRMQWu2CKqaarrkeszJx1cgC5tGZw==",
- "dev": true,
+ "node_modules/fast-wrap-ansi": {
+ "version": "0.2.2",
+ "resolved": "https://registry.npmjs.org/fast-wrap-ansi/-/fast-wrap-ansi-0.2.2.tgz",
+ "integrity": "sha512-7F2Fl+TjRSenLqlU3UjSH0iyqopqoZIu7eZVpEirP2g1GtWa2G/ecEmBdgz31+Mxr+ELclgg6sokpSFIQiZ02Q==",
"license": "MIT",
"dependencies": {
- "@vitest/spy": "2.1.9",
- "@vitest/utils": "2.1.9",
- "chai": "^5.1.2",
- "tinyrainbow": "^1.2.0"
- },
- "funding": {
- "url": "https://opencollective.com/vitest"
+ "fast-string-width": "^3.0.2"
}
},
- "node_modules/@vitest/mocker": {
- "version": "2.1.9",
- "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-2.1.9.tgz",
- "integrity": "sha512-tVL6uJgoUdi6icpxmdrn5YNo3g3Dxv+IHJBr0GXHaEdTcw3F+cPKnsXFhli6nO+f/6SDKPHEK1UN+k+TQv0Ehg==",
+ "node_modules/fdir": {
+ "version": "6.5.0",
+ "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz",
+ "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==",
"dev": true,
"license": "MIT",
- "dependencies": {
- "@vitest/spy": "2.1.9",
- "estree-walker": "^3.0.3",
- "magic-string": "^0.30.12"
- },
- "funding": {
- "url": "https://opencollective.com/vitest"
+ "engines": {
+ "node": ">=12.0.0"
},
"peerDependencies": {
- "msw": "^2.4.9",
- "vite": "^5.0.0"
+ "picomatch": "^3 || ^4"
},
"peerDependenciesMeta": {
- "msw": {
- "optional": true
- },
- "vite": {
+ "picomatch": {
"optional": true
}
}
},
- "node_modules/@vitest/pretty-format": {
- "version": "2.1.9",
- "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-2.1.9.tgz",
- "integrity": "sha512-KhRIdGV2U9HOUzxfiHmY8IFHTdqtOhIzCpd8WRdJiE7D/HUcZVD0EgQCVjm+Q9gkUXWgBvMmTtZgIG48wq7sOQ==",
+ "node_modules/fsevents": {
+ "version": "2.3.3",
+ "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz",
+ "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==",
"dev": true,
+ "hasInstallScript": true,
"license": "MIT",
- "dependencies": {
- "tinyrainbow": "^1.2.0"
- },
- "funding": {
- "url": "https://opencollective.com/vitest"
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": "^8.16.0 || ^10.6.0 || >=11.0.0"
}
},
- "node_modules/@vitest/runner": {
- "version": "2.1.9",
- "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-2.1.9.tgz",
- "integrity": "sha512-ZXSSqTFIrzduD63btIfEyOmNcBmQvgOVsPNPe0jYtESiXkhd8u2erDLnMxmGrDCwHCCHE7hxwRDCT3pt0esT4g==",
+ "node_modules/lightningcss": {
+ "version": "1.32.0",
+ "resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.32.0.tgz",
+ "integrity": "sha512-NXYBzinNrblfraPGyrbPoD19C1h9lfI/1mzgWYvXUTe414Gz/X1FD2XBZSZM7rRTrMA8JL3OtAaGifrIKhQ5yQ==",
"dev": true,
- "license": "MIT",
+ "license": "MPL-2.0",
"dependencies": {
- "@vitest/utils": "2.1.9",
- "pathe": "^1.1.2"
+ "detect-libc": "^2.0.3"
+ },
+ "engines": {
+ "node": ">= 12.0.0"
},
"funding": {
- "url": "https://opencollective.com/vitest"
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ },
+ "optionalDependencies": {
+ "lightningcss-android-arm64": "1.32.0",
+ "lightningcss-darwin-arm64": "1.32.0",
+ "lightningcss-darwin-x64": "1.32.0",
+ "lightningcss-freebsd-x64": "1.32.0",
+ "lightningcss-linux-arm-gnueabihf": "1.32.0",
+ "lightningcss-linux-arm64-gnu": "1.32.0",
+ "lightningcss-linux-arm64-musl": "1.32.0",
+ "lightningcss-linux-x64-gnu": "1.32.0",
+ "lightningcss-linux-x64-musl": "1.32.0",
+ "lightningcss-win32-arm64-msvc": "1.32.0",
+ "lightningcss-win32-x64-msvc": "1.32.0"
}
},
- "node_modules/@vitest/snapshot": {
- "version": "2.1.9",
- "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-2.1.9.tgz",
- "integrity": "sha512-oBO82rEjsxLNJincVhLhaxxZdEtV0EFHMK5Kmx5sJ6H9L183dHECjiefOAdnqpIgT5eZwT04PoggUnW88vOBNQ==",
+ "node_modules/lightningcss-android-arm64": {
+ "version": "1.32.0",
+ "resolved": "https://registry.npmjs.org/lightningcss-android-arm64/-/lightningcss-android-arm64-1.32.0.tgz",
+ "integrity": "sha512-YK7/ClTt4kAK0vo6w3X+Pnm0D2cf2vPHbhOXdoNti1Ga0al1P4TBZhwjATvjNwLEBCnKvjJc2jQgHXH0NEwlAg==",
+ "cpu": [
+ "arm64"
+ ],
"dev": true,
- "license": "MIT",
- "dependencies": {
- "@vitest/pretty-format": "2.1.9",
- "magic-string": "^0.30.12",
- "pathe": "^1.1.2"
+ "license": "MPL-2.0",
+ "optional": true,
+ "os": [
+ "android"
+ ],
+ "engines": {
+ "node": ">= 12.0.0"
},
"funding": {
- "url": "https://opencollective.com/vitest"
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
}
},
- "node_modules/@vitest/spy": {
- "version": "2.1.9",
- "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-2.1.9.tgz",
- "integrity": "sha512-E1B35FwzXXTs9FHNK6bDszs7mtydNi5MIfUWpceJ8Xbfb1gBMscAnwLbEu+B44ed6W3XjL9/ehLPHR1fkf1KLQ==",
+ "node_modules/lightningcss-darwin-arm64": {
+ "version": "1.32.0",
+ "resolved": "https://registry.npmjs.org/lightningcss-darwin-arm64/-/lightningcss-darwin-arm64-1.32.0.tgz",
+ "integrity": "sha512-RzeG9Ju5bag2Bv1/lwlVJvBE3q6TtXskdZLLCyfg5pt+HLz9BqlICO7LZM7VHNTTn/5PRhHFBSjk5lc4cmscPQ==",
+ "cpu": [
+ "arm64"
+ ],
"dev": true,
- "license": "MIT",
- "dependencies": {
- "tinyspy": "^3.0.2"
+ "license": "MPL-2.0",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": ">= 12.0.0"
},
"funding": {
- "url": "https://opencollective.com/vitest"
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
}
},
- "node_modules/@vitest/utils": {
- "version": "2.1.9",
- "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-2.1.9.tgz",
- "integrity": "sha512-v0psaMSkNJ3A2NMrUEHFRzJtDPFn+/VWZ5WxImB21T9fjucJRmS7xCS3ppEnARb9y11OAzaD+P2Ps+b+BGX5iQ==",
+ "node_modules/lightningcss-darwin-x64": {
+ "version": "1.32.0",
+ "resolved": "https://registry.npmjs.org/lightningcss-darwin-x64/-/lightningcss-darwin-x64-1.32.0.tgz",
+ "integrity": "sha512-U+QsBp2m/s2wqpUYT/6wnlagdZbtZdndSmut/NJqlCcMLTWp5muCrID+K5UJ6jqD2BFshejCYXniPDbNh73V8w==",
+ "cpu": [
+ "x64"
+ ],
"dev": true,
- "license": "MIT",
- "dependencies": {
- "@vitest/pretty-format": "2.1.9",
- "loupe": "^3.1.2",
- "tinyrainbow": "^1.2.0"
+ "license": "MPL-2.0",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": ">= 12.0.0"
},
"funding": {
- "url": "https://opencollective.com/vitest"
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
}
},
- "node_modules/assertion-error": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-2.0.1.tgz",
- "integrity": "sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==",
+ "node_modules/lightningcss-freebsd-x64": {
+ "version": "1.32.0",
+ "resolved": "https://registry.npmjs.org/lightningcss-freebsd-x64/-/lightningcss-freebsd-x64-1.32.0.tgz",
+ "integrity": "sha512-JCTigedEksZk3tHTTthnMdVfGf61Fky8Ji2E4YjUTEQX14xiy/lTzXnu1vwiZe3bYe0q+SpsSH/CTeDXK6WHig==",
+ "cpu": [
+ "x64"
+ ],
"dev": true,
- "license": "MIT",
+ "license": "MPL-2.0",
+ "optional": true,
+ "os": [
+ "freebsd"
+ ],
"engines": {
- "node": ">=12"
+ "node": ">= 12.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
}
},
- "node_modules/cac": {
- "version": "6.7.14",
- "resolved": "https://registry.npmjs.org/cac/-/cac-6.7.14.tgz",
- "integrity": "sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==",
+ "node_modules/lightningcss-linux-arm-gnueabihf": {
+ "version": "1.32.0",
+ "resolved": "https://registry.npmjs.org/lightningcss-linux-arm-gnueabihf/-/lightningcss-linux-arm-gnueabihf-1.32.0.tgz",
+ "integrity": "sha512-x6rnnpRa2GL0zQOkt6rts3YDPzduLpWvwAF6EMhXFVZXD4tPrBkEFqzGowzCsIWsPjqSK+tyNEODUBXeeVHSkw==",
+ "cpu": [
+ "arm"
+ ],
"dev": true,
- "license": "MIT",
+ "license": "MPL-2.0",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
"engines": {
- "node": ">=8"
- }
- },
- "node_modules/chai": {
- "version": "5.3.3",
- "resolved": "https://registry.npmjs.org/chai/-/chai-5.3.3.tgz",
- "integrity": "sha512-4zNhdJD/iOjSH0A05ea+Ke6MU5mmpQcbQsSOkgdaUMJ9zTlDTD/GYlwohmIE2u0gaxHYiVHEn1Fw9mZ/ktJWgw==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "assertion-error": "^2.0.1",
- "check-error": "^2.1.1",
- "deep-eql": "^5.0.1",
- "loupe": "^3.1.0",
- "pathval": "^2.0.0"
+ "node": ">= 12.0.0"
},
- "engines": {
- "node": ">=18"
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
}
},
- "node_modules/check-error": {
- "version": "2.1.3",
- "resolved": "https://registry.npmjs.org/check-error/-/check-error-2.1.3.tgz",
- "integrity": "sha512-PAJdDJusoxnwm1VwW07VWwUN1sl7smmC3OKggvndJFadxxDRyFJBX/ggnu/KE4kQAB7a3Dp8f/YXC1FlUprWmA==",
+ "node_modules/lightningcss-linux-arm64-gnu": {
+ "version": "1.32.0",
+ "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-gnu/-/lightningcss-linux-arm64-gnu-1.32.0.tgz",
+ "integrity": "sha512-0nnMyoyOLRJXfbMOilaSRcLH3Jw5z9HDNGfT/gwCPgaDjnx0i8w7vBzFLFR1f6CMLKF8gVbebmkUN3fa/kQJpQ==",
+ "cpu": [
+ "arm64"
+ ],
"dev": true,
- "license": "MIT",
+ "license": "MPL-2.0",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
"engines": {
- "node": ">= 16"
+ "node": ">= 12.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
}
},
- "node_modules/debug": {
- "version": "4.4.3",
- "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
- "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
+ "node_modules/lightningcss-linux-arm64-musl": {
+ "version": "1.32.0",
+ "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-musl/-/lightningcss-linux-arm64-musl-1.32.0.tgz",
+ "integrity": "sha512-UpQkoenr4UJEzgVIYpI80lDFvRmPVg6oqboNHfoH4CQIfNA+HOrZ7Mo7KZP02dC6LjghPQJeBsvXhJod/wnIBg==",
+ "cpu": [
+ "arm64"
+ ],
"dev": true,
- "license": "MIT",
- "dependencies": {
- "ms": "^2.1.3"
- },
+ "license": "MPL-2.0",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
"engines": {
- "node": ">=6.0"
+ "node": ">= 12.0.0"
},
- "peerDependenciesMeta": {
- "supports-color": {
- "optional": true
- }
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
}
},
- "node_modules/deep-eql": {
- "version": "5.0.2",
- "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-5.0.2.tgz",
- "integrity": "sha512-h5k/5U50IJJFpzfL6nO9jaaumfjO/f2NjK/oYB2Djzm4p9L+3T9qWpZqZ2hAbLPuuYq9wrU08WQyBTL5GbPk5Q==",
+ "node_modules/lightningcss-linux-x64-gnu": {
+ "version": "1.32.0",
+ "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-gnu/-/lightningcss-linux-x64-gnu-1.32.0.tgz",
+ "integrity": "sha512-V7Qr52IhZmdKPVr+Vtw8o+WLsQJYCTd8loIfpDaMRWGUZfBOYEJeyJIkqGIDMZPwPx24pUMfwSxxI8phr/MbOA==",
+ "cpu": [
+ "x64"
+ ],
"dev": true,
- "license": "MIT",
+ "license": "MPL-2.0",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
"engines": {
- "node": ">=6"
+ "node": ">= 12.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
}
},
- "node_modules/es-module-lexer": {
- "version": "1.7.0",
- "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.7.0.tgz",
- "integrity": "sha512-jEQoCwk8hyb2AZziIOLhDqpm5+2ww5uIE6lkO/6jcOCusfk6LhMHpXXfBLXTZ7Ydyt0j4VoUQv6uGNYbdW+kBA==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/esbuild": {
- "version": "0.21.5",
- "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.21.5.tgz",
- "integrity": "sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw==",
+ "node_modules/lightningcss-linux-x64-musl": {
+ "version": "1.32.0",
+ "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-musl/-/lightningcss-linux-x64-musl-1.32.0.tgz",
+ "integrity": "sha512-bYcLp+Vb0awsiXg/80uCRezCYHNg1/l3mt0gzHnWV9XP1W5sKa5/TCdGWaR/zBM2PeF/HbsQv/j2URNOiVuxWg==",
+ "cpu": [
+ "x64"
+ ],
"dev": true,
- "hasInstallScript": true,
- "license": "MIT",
- "bin": {
- "esbuild": "bin/esbuild"
- },
+ "license": "MPL-2.0",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
"engines": {
- "node": ">=12"
+ "node": ">= 12.0.0"
},
- "optionalDependencies": {
- "@esbuild/aix-ppc64": "0.21.5",
- "@esbuild/android-arm": "0.21.5",
- "@esbuild/android-arm64": "0.21.5",
- "@esbuild/android-x64": "0.21.5",
- "@esbuild/darwin-arm64": "0.21.5",
- "@esbuild/darwin-x64": "0.21.5",
- "@esbuild/freebsd-arm64": "0.21.5",
- "@esbuild/freebsd-x64": "0.21.5",
- "@esbuild/linux-arm": "0.21.5",
- "@esbuild/linux-arm64": "0.21.5",
- "@esbuild/linux-ia32": "0.21.5",
- "@esbuild/linux-loong64": "0.21.5",
- "@esbuild/linux-mips64el": "0.21.5",
- "@esbuild/linux-ppc64": "0.21.5",
- "@esbuild/linux-riscv64": "0.21.5",
- "@esbuild/linux-s390x": "0.21.5",
- "@esbuild/linux-x64": "0.21.5",
- "@esbuild/netbsd-x64": "0.21.5",
- "@esbuild/openbsd-x64": "0.21.5",
- "@esbuild/sunos-x64": "0.21.5",
- "@esbuild/win32-arm64": "0.21.5",
- "@esbuild/win32-ia32": "0.21.5",
- "@esbuild/win32-x64": "0.21.5"
- }
- },
- "node_modules/estree-walker": {
- "version": "3.0.3",
- "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz",
- "integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@types/estree": "^1.0.0"
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
}
},
- "node_modules/expect-type": {
- "version": "1.4.0",
- "resolved": "https://registry.npmjs.org/expect-type/-/expect-type-1.4.0.tgz",
- "integrity": "sha512-KfYbmpRm0VbLjEvVa9yGwCi9GI34xvi7A/HXYWQO65CSD2u3MczUJSuwXKFIxlGsgBQizV9q5J9NHj4VG0n+pA==",
+ "node_modules/lightningcss-win32-arm64-msvc": {
+ "version": "1.32.0",
+ "resolved": "https://registry.npmjs.org/lightningcss-win32-arm64-msvc/-/lightningcss-win32-arm64-msvc-1.32.0.tgz",
+ "integrity": "sha512-8SbC8BR40pS6baCM8sbtYDSwEVQd4JlFTOlaD3gWGHfThTcABnNDBda6eTZeqbofalIJhFx0qKzgHJmcPTnGdw==",
+ "cpu": [
+ "arm64"
+ ],
"dev": true,
- "license": "Apache-2.0",
+ "license": "MPL-2.0",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
"engines": {
- "node": ">=12.0.0"
+ "node": ">= 12.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
}
},
- "node_modules/fsevents": {
- "version": "2.3.3",
- "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz",
- "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==",
+ "node_modules/lightningcss-win32-x64-msvc": {
+ "version": "1.32.0",
+ "resolved": "https://registry.npmjs.org/lightningcss-win32-x64-msvc/-/lightningcss-win32-x64-msvc-1.32.0.tgz",
+ "integrity": "sha512-Amq9B/SoZYdDi1kFrojnoqPLxYhQ4Wo5XiL8EVJrVsB8ARoC1PWW6VGtT0WKCemjy8aC+louJnjS7U18x3b06Q==",
+ "cpu": [
+ "x64"
+ ],
"dev": true,
- "hasInstallScript": true,
- "license": "MIT",
+ "license": "MPL-2.0",
"optional": true,
"os": [
- "darwin"
+ "win32"
],
"engines": {
- "node": "^8.16.0 || ^10.6.0 || >=11.0.0"
+ "node": ">= 12.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
}
},
- "node_modules/loupe": {
- "version": "3.2.1",
- "resolved": "https://registry.npmjs.org/loupe/-/loupe-3.2.1.tgz",
- "integrity": "sha512-CdzqowRJCeLU72bHvWqwRBBlLcMEtIvGrlvef74kMnV2AolS9Y8xUv1I0U/MNAWMhBlKIoyuEgoJ0t/bbwHbLQ==",
- "dev": true,
- "license": "MIT"
- },
"node_modules/magic-string": {
"version": "0.30.21",
"resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.21.tgz",
@@ -1069,13 +954,6 @@
"@jridgewell/sourcemap-codec": "^1.5.5"
}
},
- "node_modules/ms": {
- "version": "2.1.3",
- "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
- "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
- "dev": true,
- "license": "MIT"
- },
"node_modules/nanoid": {
"version": "3.3.15",
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.15.tgz",
@@ -1095,23 +973,27 @@
"node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1"
}
},
- "node_modules/pathe": {
- "version": "1.1.2",
- "resolved": "https://registry.npmjs.org/pathe/-/pathe-1.1.2.tgz",
- "integrity": "sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/pathval": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/pathval/-/pathval-2.0.1.tgz",
- "integrity": "sha512-//nshmD55c46FuFw26xV/xFAaB5HF9Xdap7HJBBnrKdAd6/GxDBaNA1870O79+9ueg61cZLSVc+OaFlfmObYVQ==",
+ "node_modules/obug": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/obug/-/obug-2.1.3.tgz",
+ "integrity": "sha512-9miFgM2OFba7hB+pRgvtV84pYTBaoTHohvmIgiRt6dRIzbwEOIaNaP+dIlGs2fNFoB0SeISs0Jz5WFVRid6Xyg==",
"dev": true,
+ "funding": [
+ "https://github.com/sponsors/sxzz",
+ "https://opencollective.com/debug"
+ ],
"license": "MIT",
"engines": {
- "node": ">= 14.16"
+ "node": ">=12.20.0"
}
},
+ "node_modules/pathe": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/pathe/-/pathe-2.0.3.tgz",
+ "integrity": "sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==",
+ "dev": true,
+ "license": "MIT"
+ },
"node_modules/picocolors": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz",
@@ -1119,6 +1001,19 @@
"dev": true,
"license": "ISC"
},
+ "node_modules/picomatch": {
+ "version": "4.0.5",
+ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.5.tgz",
+ "integrity": "sha512-RvwwcruNjI1ncT5xRakeyS9Lf8lcItv34KD+aif+VH9kduAyfYBipGh12274xtenIPZ119/R9BdTBa8gAwSh0A==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/jonschlinkert"
+ }
+ },
"node_modules/postcss": {
"version": "8.5.16",
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.16.tgz",
@@ -1148,49 +1043,50 @@
"node": "^10 || ^12 || >=14"
}
},
- "node_modules/rollup": {
- "version": "4.62.2",
- "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.62.2.tgz",
- "integrity": "sha512-RFnrW4lhXA3s3eqHDZvN654g8OTjzRfqpIRJYczCGB6HzphckVAi/Qh4tbPUbRuDi7s1Llv8g/NspLkttY3gTA==",
+ "node_modules/rolldown": {
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/rolldown/-/rolldown-1.1.4.tgz",
+ "integrity": "sha512-IjZYiLxZwpnhwhdBH2ugdTGVSdhCQUmLxLoqyjiL0JxYjyRst+5a0P3xfrTxJ5F638j4Mvvw5FAX5XE6eHpXbA==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@types/estree": "1.0.9"
+ "@oxc-project/types": "=0.138.0",
+ "@rolldown/pluginutils": "^1.0.0"
},
"bin": {
- "rollup": "dist/bin/rollup"
+ "rolldown": "bin/cli.mjs"
},
"engines": {
- "node": ">=18.0.0",
- "npm": ">=8.0.0"
+ "node": "^20.19.0 || >=22.12.0"
},
"optionalDependencies": {
- "@rollup/rollup-android-arm-eabi": "4.62.2",
- "@rollup/rollup-android-arm64": "4.62.2",
- "@rollup/rollup-darwin-arm64": "4.62.2",
- "@rollup/rollup-darwin-x64": "4.62.2",
- "@rollup/rollup-freebsd-arm64": "4.62.2",
- "@rollup/rollup-freebsd-x64": "4.62.2",
- "@rollup/rollup-linux-arm-gnueabihf": "4.62.2",
- "@rollup/rollup-linux-arm-musleabihf": "4.62.2",
- "@rollup/rollup-linux-arm64-gnu": "4.62.2",
- "@rollup/rollup-linux-arm64-musl": "4.62.2",
- "@rollup/rollup-linux-loong64-gnu": "4.62.2",
- "@rollup/rollup-linux-loong64-musl": "4.62.2",
- "@rollup/rollup-linux-ppc64-gnu": "4.62.2",
- "@rollup/rollup-linux-ppc64-musl": "4.62.2",
- "@rollup/rollup-linux-riscv64-gnu": "4.62.2",
- "@rollup/rollup-linux-riscv64-musl": "4.62.2",
- "@rollup/rollup-linux-s390x-gnu": "4.62.2",
- "@rollup/rollup-linux-x64-gnu": "4.62.2",
- "@rollup/rollup-linux-x64-musl": "4.62.2",
- "@rollup/rollup-openbsd-x64": "4.62.2",
- "@rollup/rollup-openharmony-arm64": "4.62.2",
- "@rollup/rollup-win32-arm64-msvc": "4.62.2",
- "@rollup/rollup-win32-ia32-msvc": "4.62.2",
- "@rollup/rollup-win32-x64-gnu": "4.62.2",
- "@rollup/rollup-win32-x64-msvc": "4.62.2",
- "fsevents": "~2.3.2"
+ "@rolldown/binding-android-arm64": "1.1.4",
+ "@rolldown/binding-darwin-arm64": "1.1.4",
+ "@rolldown/binding-darwin-x64": "1.1.4",
+ "@rolldown/binding-freebsd-x64": "1.1.4",
+ "@rolldown/binding-linux-arm-gnueabihf": "1.1.4",
+ "@rolldown/binding-linux-arm64-gnu": "1.1.4",
+ "@rolldown/binding-linux-arm64-musl": "1.1.4",
+ "@rolldown/binding-linux-ppc64-gnu": "1.1.4",
+ "@rolldown/binding-linux-s390x-gnu": "1.1.4",
+ "@rolldown/binding-linux-x64-gnu": "1.1.4",
+ "@rolldown/binding-linux-x64-musl": "1.1.4",
+ "@rolldown/binding-openharmony-arm64": "1.1.4",
+ "@rolldown/binding-wasm32-wasi": "1.1.4",
+ "@rolldown/binding-win32-arm64-msvc": "1.1.4",
+ "@rolldown/binding-win32-x64-msvc": "1.1.4"
+ }
+ },
+ "node_modules/semver": {
+ "version": "7.8.5",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.5.tgz",
+ "integrity": "sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==",
+ "license": "ISC",
+ "bin": {
+ "semver": "bin/semver.js"
+ },
+ "engines": {
+ "node": ">=10"
}
},
"node_modules/siginfo": {
@@ -1200,6 +1096,12 @@
"dev": true,
"license": "ISC"
},
+ "node_modules/sisteransi": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz",
+ "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==",
+ "license": "MIT"
+ },
"node_modules/source-map-js": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz",
@@ -1218,9 +1120,9 @@
"license": "MIT"
},
"node_modules/std-env": {
- "version": "3.10.0",
- "resolved": "https://registry.npmjs.org/std-env/-/std-env-3.10.0.tgz",
- "integrity": "sha512-5GS12FdOZNliM5mAOxFRg7Ir0pWz8MdpYm6AY6VPkGpbA7ZzmbzNcBJQ0GPvvyWgcY7QAhCgf9Uy89I03faLkg==",
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/std-env/-/std-env-4.1.0.tgz",
+ "integrity": "sha512-Rq7ybcX2RuC55r9oaPVEW7/xu3tj8u4GeBYHBWCychFtzMIr86A7e3PPEBPT37sHStKX3+TiX/Fr/ACmJLVlLQ==",
"dev": true,
"license": "MIT"
},
@@ -1232,42 +1134,50 @@
"license": "MIT"
},
"node_modules/tinyexec": {
- "version": "0.3.2",
- "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-0.3.2.tgz",
- "integrity": "sha512-KQQR9yN7R5+OSwaK0XQoj22pwHoTlgYqmUscPYoknOoWCWfj/5/ABTMRi69FrKU5ffPVh5QcFikpWJI/P1ocHA==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/tinypool": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/tinypool/-/tinypool-1.1.1.tgz",
- "integrity": "sha512-Zba82s87IFq9A9XmjiX5uZA/ARWDrB03OHlq+Vw1fSdt0I+4/Kutwy8BP4Y/y/aORMo61FQ0vIb5j44vSo5Pkg==",
+ "version": "1.2.4",
+ "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-1.2.4.tgz",
+ "integrity": "sha512-SHf/r48b7vOrjve9PxJo3MN5v5yuyjHvdUcrQffT3WXMUfnGmHDVbC4k3sHJaJTgZCwpUplIaAo5ANtMyp3YHg==",
"dev": true,
"license": "MIT",
"engines": {
- "node": "^18.0.0 || >=20.0.0"
+ "node": ">=18"
}
},
- "node_modules/tinyrainbow": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/tinyrainbow/-/tinyrainbow-1.2.0.tgz",
- "integrity": "sha512-weEDEq7Z5eTHPDh4xjX789+fHfF+P8boiFB+0vbWzpbnbsEr/GRaohi/uMKxg8RZMXnl1ItAi/IUHWMsjDV7kQ==",
+ "node_modules/tinyglobby": {
+ "version": "0.2.17",
+ "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.17.tgz",
+ "integrity": "sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g==",
"dev": true,
"license": "MIT",
+ "dependencies": {
+ "fdir": "^6.5.0",
+ "picomatch": "^4.0.4"
+ },
"engines": {
- "node": ">=14.0.0"
+ "node": ">=12.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/SuperchupuDev"
}
},
- "node_modules/tinyspy": {
- "version": "3.0.2",
- "resolved": "https://registry.npmjs.org/tinyspy/-/tinyspy-3.0.2.tgz",
- "integrity": "sha512-n1cw8k1k0x4pgA2+9XrOkFydTerNcJ1zWCO5Nn9scWHTD+5tp8dghT2x1uduQePZTZgd3Tupf+x9BxJjeJi77Q==",
+ "node_modules/tinyrainbow": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/tinyrainbow/-/tinyrainbow-3.1.0.tgz",
+ "integrity": "sha512-Bf+ILmBgretUrdJxzXM0SgXLZ3XfiaUuOj/IKQHuTXip+05Xn+uyEYdVg0kYDipTBcLrCVyUzAPz7QmArb0mmw==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=14.0.0"
}
},
+ "node_modules/tslib": {
+ "version": "2.8.1",
+ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz",
+ "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==",
+ "dev": true,
+ "license": "0BSD",
+ "optional": true
+ },
"node_modules/typescript": {
"version": "5.9.3",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz",
@@ -1290,21 +1200,23 @@
"license": "MIT"
},
"node_modules/vite": {
- "version": "5.4.21",
- "resolved": "https://registry.npmjs.org/vite/-/vite-5.4.21.tgz",
- "integrity": "sha512-o5a9xKjbtuhY6Bi5S3+HvbRERmouabWbyUcpXXUA1u+GNUKoROi9byOJ8M0nHbHYHkYICiMlqxkg1KkYmm25Sw==",
+ "version": "8.1.3",
+ "resolved": "https://registry.npmjs.org/vite/-/vite-8.1.3.tgz",
+ "integrity": "sha512-Ds+gBRbj0lwRO2Y5hwnUBdxSwlAve9LeRyU4sNnAr0ewW0gWF0n5bgXgUzbgZ49MV9BVUAQUFYVcDUcilUExMA==",
"dev": true,
"license": "MIT",
"dependencies": {
- "esbuild": "^0.21.3",
- "postcss": "^8.4.43",
- "rollup": "^4.20.0"
+ "lightningcss": "^1.32.0",
+ "picomatch": "^4.0.4",
+ "postcss": "^8.5.16",
+ "rolldown": "~1.1.3",
+ "tinyglobby": "^0.2.17"
},
"bin": {
"vite": "bin/vite.js"
},
"engines": {
- "node": "^18.0.0 || >=20.0.0"
+ "node": "^20.19.0 || >=22.12.0"
},
"funding": {
"url": "https://github.com/vitejs/vite?sponsor=1"
@@ -1313,23 +1225,33 @@
"fsevents": "~2.3.3"
},
"peerDependencies": {
- "@types/node": "^18.0.0 || >=20.0.0",
- "less": "*",
- "lightningcss": "^1.21.0",
- "sass": "*",
- "sass-embedded": "*",
- "stylus": "*",
- "sugarss": "*",
- "terser": "^5.4.0"
+ "@types/node": "^20.19.0 || >=22.12.0",
+ "@vitejs/devtools": "^0.3.0",
+ "esbuild": "^0.27.0 || ^0.28.0",
+ "jiti": ">=1.21.0",
+ "less": "^4.0.0",
+ "sass": "^1.70.0",
+ "sass-embedded": "^1.70.0",
+ "stylus": ">=0.54.8",
+ "sugarss": "^5.0.0",
+ "terser": "^5.16.0",
+ "tsx": "^4.8.1",
+ "yaml": "^2.4.2"
},
"peerDependenciesMeta": {
"@types/node": {
"optional": true
},
- "less": {
+ "@vitejs/devtools": {
+ "optional": true
+ },
+ "esbuild": {
+ "optional": true
+ },
+ "jiti": {
"optional": true
},
- "lightningcss": {
+ "less": {
"optional": true
},
"sass": {
@@ -1346,85 +1268,89 @@
},
"terser": {
"optional": true
+ },
+ "tsx": {
+ "optional": true
+ },
+ "yaml": {
+ "optional": true
}
}
},
- "node_modules/vite-node": {
- "version": "2.1.9",
- "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-2.1.9.tgz",
- "integrity": "sha512-AM9aQ/IPrW/6ENLQg3AGY4K1N2TGZdR5e4gu/MmmR2xR3Ll1+dib+nook92g4TV3PXVyeyxdWwtaCAiUL0hMxA==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "cac": "^6.7.14",
- "debug": "^4.3.7",
- "es-module-lexer": "^1.5.4",
- "pathe": "^1.1.2",
- "vite": "^5.0.0"
- },
- "bin": {
- "vite-node": "vite-node.mjs"
- },
- "engines": {
- "node": "^18.0.0 || >=20.0.0"
- },
- "funding": {
- "url": "https://opencollective.com/vitest"
- }
- },
"node_modules/vitest": {
- "version": "2.1.9",
- "resolved": "https://registry.npmjs.org/vitest/-/vitest-2.1.9.tgz",
- "integrity": "sha512-MSmPM9REYqDGBI8439mA4mWhV5sKmDlBKWIYbA3lRb2PTHACE0mgKwA8yQ2xq9vxDTuk4iPrECBAEW2aoFXY0Q==",
+ "version": "4.1.9",
+ "resolved": "https://registry.npmjs.org/vitest/-/vitest-4.1.9.tgz",
+ "integrity": "sha512-nE3/LEyc0z87uHYLZebqCUOaJr2hdtuPp7BQ4BosVFnfltxgAvMG08NyrSGlPpOUWvR27c5flSmYFTNr78L9GQ==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@vitest/expect": "2.1.9",
- "@vitest/mocker": "2.1.9",
- "@vitest/pretty-format": "^2.1.9",
- "@vitest/runner": "2.1.9",
- "@vitest/snapshot": "2.1.9",
- "@vitest/spy": "2.1.9",
- "@vitest/utils": "2.1.9",
- "chai": "^5.1.2",
- "debug": "^4.3.7",
- "expect-type": "^1.1.0",
- "magic-string": "^0.30.12",
- "pathe": "^1.1.2",
- "std-env": "^3.8.0",
+ "@vitest/expect": "4.1.9",
+ "@vitest/mocker": "4.1.9",
+ "@vitest/pretty-format": "4.1.9",
+ "@vitest/runner": "4.1.9",
+ "@vitest/snapshot": "4.1.9",
+ "@vitest/spy": "4.1.9",
+ "@vitest/utils": "4.1.9",
+ "es-module-lexer": "^2.0.0",
+ "expect-type": "^1.3.0",
+ "magic-string": "^0.30.21",
+ "obug": "^2.1.1",
+ "pathe": "^2.0.3",
+ "picomatch": "^4.0.3",
+ "std-env": "^4.0.0-rc.1",
"tinybench": "^2.9.0",
- "tinyexec": "^0.3.1",
- "tinypool": "^1.0.1",
- "tinyrainbow": "^1.2.0",
- "vite": "^5.0.0",
- "vite-node": "2.1.9",
+ "tinyexec": "^1.0.2",
+ "tinyglobby": "^0.2.15",
+ "tinyrainbow": "^3.1.0",
+ "vite": "^6.0.0 || ^7.0.0 || ^8.0.0",
"why-is-node-running": "^2.3.0"
},
"bin": {
"vitest": "vitest.mjs"
},
"engines": {
- "node": "^18.0.0 || >=20.0.0"
+ "node": "^20.0.0 || ^22.0.0 || >=24.0.0"
},
"funding": {
"url": "https://opencollective.com/vitest"
},
"peerDependencies": {
"@edge-runtime/vm": "*",
- "@types/node": "^18.0.0 || >=20.0.0",
- "@vitest/browser": "2.1.9",
- "@vitest/ui": "2.1.9",
+ "@opentelemetry/api": "^1.9.0",
+ "@types/node": "^20.0.0 || ^22.0.0 || >=24.0.0",
+ "@vitest/browser-playwright": "4.1.9",
+ "@vitest/browser-preview": "4.1.9",
+ "@vitest/browser-webdriverio": "4.1.9",
+ "@vitest/coverage-istanbul": "4.1.9",
+ "@vitest/coverage-v8": "4.1.9",
+ "@vitest/ui": "4.1.9",
"happy-dom": "*",
- "jsdom": "*"
+ "jsdom": "*",
+ "vite": "^6.0.0 || ^7.0.0 || ^8.0.0"
},
"peerDependenciesMeta": {
"@edge-runtime/vm": {
"optional": true
},
+ "@opentelemetry/api": {
+ "optional": true
+ },
"@types/node": {
"optional": true
},
- "@vitest/browser": {
+ "@vitest/browser-playwright": {
+ "optional": true
+ },
+ "@vitest/browser-preview": {
+ "optional": true
+ },
+ "@vitest/browser-webdriverio": {
+ "optional": true
+ },
+ "@vitest/coverage-istanbul": {
+ "optional": true
+ },
+ "@vitest/coverage-v8": {
"optional": true
},
"@vitest/ui": {
@@ -1435,6 +1361,9 @@
},
"jsdom": {
"optional": true
+ },
+ "vite": {
+ "optional": false
}
}
},
diff --git a/plugin-sdk/package.json b/plugin-sdk/package.json
index e759593f2..8d3d3990b 100644
--- a/plugin-sdk/package.json
+++ b/plugin-sdk/package.json
@@ -1,25 +1,57 @@
{
"name": "trek-plugin-sdk",
- "version": "1.2.1",
+ "version": "1.3.0",
"description": "SDK for building TREK plugins: types, definePlugin, a mock host, manifest validation, and the create-trek-plugin / trek-plugin CLIs.",
"type": "module",
"license": "MIT",
"author": "mauriceboe",
+ "maintainers": [
+ {
+ "name": "mauriceboe",
+ "url": "https://github.com/mauriceboe"
+ },
+ {
+ "name": "jubnl",
+ "url": "https://github.com/jubnl"
+ }
+ ],
"homepage": "https://github.com/mauriceboe/TREK/wiki/Plugin-Development",
- "repository": { "type": "git", "url": "git+https://github.com/mauriceboe/TREK.git", "directory": "plugin-sdk" },
- "bugs": { "url": "https://github.com/mauriceboe/TREK/issues" },
- "engines": { "node": ">=18" },
- "publishConfig": { "access": "public" },
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/mauriceboe/TREK.git",
+ "directory": "plugin-sdk"
+ },
+ "bugs": {
+ "url": "https://github.com/mauriceboe/TREK/issues"
+ },
+ "engines": {
+ "node": ">=18"
+ },
+ "publishConfig": {
+ "access": "public"
+ },
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
"exports": {
".": {
- "import": { "types": "./dist/index.d.ts", "default": "./dist/index.js" },
- "require": { "types": "./dist/cjs/index.d.ts", "default": "./dist/cjs/index.js" }
+ "import": {
+ "types": "./dist/index.d.ts",
+ "default": "./dist/index.js"
+ },
+ "require": {
+ "types": "./dist/cjs/index.d.ts",
+ "default": "./dist/cjs/index.js"
+ }
},
"./testing": {
- "import": { "types": "./dist/mock-host.d.ts", "default": "./dist/mock-host.js" },
- "require": { "types": "./dist/cjs/mock-host.d.ts", "default": "./dist/cjs/mock-host.js" }
+ "import": {
+ "types": "./dist/mock-host.d.ts",
+ "default": "./dist/mock-host.js"
+ },
+ "require": {
+ "types": "./dist/cjs/mock-host.d.ts",
+ "default": "./dist/cjs/mock-host.js"
+ }
}
},
"bin": {
@@ -27,7 +59,13 @@
"trek-plugin": "./dist/cli/trek-plugin.js",
"create-trek-plugin": "./dist/cli/create.js"
},
- "files": ["dist"],
+ "files": [
+ "dist"
+ ],
+ "dependencies": {
+ "@clack/prompts": "^1.7.0",
+ "semver": "^7.7.4"
+ },
"scripts": {
"build": "tsc -p tsconfig.json && tsc -p tsconfig.cjs.json && node scripts/finish-cjs.mjs",
"typecheck": "tsc -p tsconfig.json --noEmit",
@@ -35,9 +73,14 @@
"prepublishOnly": "npm run build && npm test"
},
"devDependencies": {
- "@types/node": "^22.0.0",
- "typescript": "^5.6.0",
- "vitest": "^2.1.0"
+ "@types/node": "^22.20.0",
+ "@types/semver": "^7.7.1",
+ "typescript": "^5.9.3",
+ "vitest": "^4.1.9"
},
- "keywords": ["trek", "plugin", "sdk"]
+ "keywords": [
+ "trek",
+ "plugin",
+ "sdk"
+ ]
}
diff --git a/plugin-sdk/src/cli/create.ts b/plugin-sdk/src/cli/create.ts
index 4e57d16c4..2cf34dbfb 100644
--- a/plugin-sdk/src/cli/create.ts
+++ b/plugin-sdk/src/cli/create.ts
@@ -1,13 +1,20 @@
#!/usr/bin/env node
/**
- * create-trek-plugin <name> [--type integration|page|widget] (#plugins, M6).
+ * create-trek-plugin <name> [--type integration|page|widget|trip-page] (#plugins, M6).
* Scaffolds a working plugin: manifest, an isolated server entry using
* definePlugin, a README you must fill in, and (page/widget) a starter iframe.
*/
import fs from 'node:fs';
import path from 'node:path';
-import readline from 'node:readline';
+import os from 'node:os';
+import { execFileSync } from 'node:child_process';
import { createRequire } from 'node:module';
+import {
+ intro, outro, note, logSuccess, logWarn, spinner,
+ promptText, promptSelect, promptMultiselect, promptConfirm,
+ PERMISSION_CATALOG,
+} from './ui.js';
+import { KNOWN_ADDONS } from '../manifest.js';
/** This package's own version, for the scaffold's devDependency range. */
function sdkVersionRange(): string {
@@ -23,11 +30,17 @@ export interface ScaffoldOptions {
author?: string;
description?: string;
permissions?: string[];
+ /** External hosts the plugin may call — required by the manifest when `http:outbound` is granted. */
+ egress?: string[];
+ /** Addon ids that must be enabled for this plugin to activate. */
+ requiredAddons?: string[];
+ /** Other plugins this one depends on, each pinned by a semver range. */
+ pluginDependencies?: Array<{ id: string; version: string }>;
}
export function scaffold(name: string, type: string, targetDir: string, opts: ScaffoldOptions = {}): void {
if (!/^[a-z][a-z0-9-]{2,39}$/.test(name)) throw new Error(`invalid plugin id "${name}" (lowercase slug, 3–40 chars)`);
- if (!['integration', 'page', 'widget'].includes(type)) throw new Error(`invalid type "${type}"`);
+ if (!['integration', 'page', 'widget', 'trip-page'].includes(type)) throw new Error(`invalid type "${type}"`);
const root = path.join(targetDir, name);
if (fs.existsSync(root)) throw new Error(`${root} already exists`);
@@ -42,17 +55,23 @@ export function scaffold(name: string, type: string, targetDir: string, opts: Sc
author: opts.author || 'Your Name',
description: opts.description || 'Describe what your plugin does.',
type,
- trek: '>=3.2.0 <4.0.0',
+ trek: '>=3.2.1 <4.0.0',
nativeModules: false,
permissions: perms,
+ // Dependency declarations (empty by default). `requiredAddons` lists addon ids
+ // that must be enabled to activate; `pluginDependencies` lists other plugins
+ // ({ id, version-range }) that must be installed + satisfied first.
+ requiredAddons: opts.requiredAddons ?? [],
+ pluginDependencies: opts.pluginDependencies ?? [],
routes: [{ method: 'GET', path: '/hello', auth: true }],
};
+ if (opts.egress?.length) manifest.egress = opts.egress;
if (type === 'page') manifest.capabilities = { nav: { label: manifest.name, icon: 'Blocks', position: 'main' } };
if (type === 'widget') manifest.capabilities = { widget: { title: manifest.name, defaultSize: 'medium' } };
fs.writeFileSync(path.join(root, 'trek-plugin.json'), JSON.stringify(manifest, null, 2) + '\n');
- fs.writeFileSync(path.join(root, 'server', 'index.js'), SERVER_JS);
- fs.writeFileSync(path.join(root, 'README.md'), readme(name));
+ fs.writeFileSync(path.join(root, 'server', 'index.js'), SERVER_JS(perms.includes('db:own')));
+ fs.writeFileSync(path.join(root, 'README.md'), readme(name, opts.description ?? '> One sentence: what this plugin does.', perms));
// `type: commonjs` pins how the entry is parsed everywhere (dev, tests, TREK);
// the SDK is a devDependency ONLY (types + mock host) — at runtime both the
// dev server and TREK inject it, so it is never vendored into the artifact.
@@ -70,12 +89,12 @@ export function scaffold(name: string, type: string, targetDir: string, opts: Sc
}
}
-const SERVER_JS = `// Built plugin entry — runs in an isolated child process.
+const SERVER_JS = (has_db: boolean) => `// Built plugin entry — runs in an isolated child process.
const { definePlugin } = require('trek-plugin-sdk');
module.exports = definePlugin({
async onLoad(ctx) {
- await ctx.db.migrate('001_init', 'CREATE TABLE IF NOT EXISTS kv (k TEXT PRIMARY KEY, v TEXT)');
+ ${has_db ? 'await ctx.db.migrate(\'001_init\', \'CREATE TABLE IF NOT EXISTS kv (k TEXT PRIMARY KEY, v TEXT)\');' : ''}
ctx.log.info('plugin loaded');
},
routes: [
@@ -90,26 +109,57 @@ module.exports = definePlugin({
});
`;
+// The `<!-- trek:ui -->` marker is expanded by `dev` and `pack` into the inlined
+// design kit (native styles + a `window.trek` bridge). The source stays this one
+// line, so the starter is already themed, glassy and wired on first run.
const CLIENT_HTML = `<!doctype html>
-<html><head><meta charset="utf-8" /><title>Plugin</title></head>
+<html lang="en">
+<head>
+ <meta charset="utf-8" />
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
+ <title>Plugin</title>
+ <!-- trek:ui -->
+</head>
<body>
- <h1>Hello from your plugin</h1>
+ <div class="trek-glass trek-stack" style="margin: 16px">
+ <div class="trek-title">Your plugin</div>
+ <p class="trek-muted" id="hello">Click below to call your /hello route.</p>
+ <div class="trek-cluster">
+ <button class="trek-btn trek-btn--primary" id="ping">Say hello</button>
+ <span class="trek-chip trek-chip--accent" id="who">not connected</span>
+ </div>
+ </div>
<script>
- // The frame is sandboxed (opaque origin) — talk to TREK only via postMessage.
- window.parent.postMessage({ type: 'trek:ready' }, '*');
- window.addEventListener('message', (e) => {
- if (e.data && e.data.type === 'trek:context') {
- document.body.dataset.theme = e.data.theme;
+ // The design kit is inlined above (window.trek + native styles). The frame is
+ // sandboxed at an opaque origin — reach TREK only through window.trek.
+ trek.onContext(function (ctx) {
+ document.getElementById('who').textContent = (ctx.user ? ctx.user.name + ' \\u00b7 ' : '') + ctx.theme;
+ });
+ document.getElementById('ping').addEventListener('click', async function () {
+ try {
+ var data = await trek.invoke('/hello');
+ document.getElementById('hello').textContent = 'Hello, ' + ((data && data.hello) || 'traveller') + '!';
+ } catch (e) {
+ trek.notify('error', e.message);
}
});
</script>
-</body></html>
+</body>
+</html>
`;
-function readme(name: string): string {
+/** One markdown table row per granted scope, with the catalog's description as the "Why". */
+function permissionRows(scopes: string[]): string {
+ const rows = (scopes.length ? scopes : ['db:own']).map(
+ (s) => `| \`${s}\` | 'Describe why this plugin needs it.' |`,
+ );
+ return rows.join('\n');
+}
+
+function readme(name: string, description: string, scopes: string[]): string {
return `# ${name}
-> One sentence: what this plugin does.
+${description}
![screenshot](./docs/screenshot.png)
@@ -127,7 +177,7 @@ looks best (the card crops the edges).
| Permission | Why |
|---|---|
-| \`db:own\` | store the plugin's own data |
+${permissionRows(scopes)}
## Setup
@@ -140,36 +190,145 @@ one. Replace this line with your license (for example, MIT).
`;
}
-const KNOWN_PERMISSIONS = [
- 'db:own', 'db:read:trips', 'db:read:users', 'ws:broadcast:trip', 'ws:broadcast:user',
- 'hook:photo-provider', 'hook:calendar-source', 'http:outbound',
-];
+const SLUG = /^[a-z][a-z0-9-]{2,39}$/;
+
+/** Resolve a user-typed directory: expand a leading `~`, then make it absolute. */
+function resolveDir(input: string): string {
+ const raw = (input || '.').trim();
+ const expanded = raw === '~' || raw.startsWith('~/') ? path.join(os.homedir(), raw.slice(1)) : raw;
+ return path.resolve(expanded);
+}
-/** Interactive scaffold: prompt for the details, then create the plugin. Returns the chosen name. */
-export async function interactiveScaffold(targetDir: string, presetName?: string): Promise<string> {
- const rl = readline.createInterface({ input: process.stdin, output: process.stdout });
- const ask = (q: string, def?: string) =>
- new Promise<string>((resolve) => rl.question(def ? `${q} (${def}) ` : `${q} `, (a) => resolve(a.trim() || def || '')));
+/** True when `dir` sits inside an existing git work tree (so we don't offer to nest a repo). */
+function insideGitRepo(dir: string): boolean {
try {
- let name = presetName || '';
- while (!/^[a-z][a-z0-9-]{2,39}$/.test(name)) {
- name = await ask('Plugin id (lowercase-slug):');
- if (!/^[a-z][a-z0-9-]{2,39}$/.test(name)) console.log(' → must be a lowercase slug, 3–40 chars (e.g. flight-tracker)');
+ execFileSync('git', ['rev-parse', '--is-inside-work-tree'], { cwd: dir, stdio: 'ignore' });
+ return true;
+ } catch {
+ return false;
+ }
+}
+
+/**
+ * Interactive scaffold: a Clack wizard that collects the details, writes the
+ * plugin, and offers to set up git + install deps. Returns the created plugin id.
+ * Only ever called when stdout is a TTY (the dispatcher guards this).
+ */
+export async function interactiveScaffold(defaultDir: string, presetName?: string): Promise<string> {
+ intro('create-trek-plugin');
+
+ const id = presetName && SLUG.test(presetName)
+ ? presetName
+ : await promptText({
+ message: 'Plugin id',
+ placeholder: 'flight-tracker',
+ initialValue: presetName ?? '',
+ validate: (v) => (SLUG.test((v ?? '').trim()) ? undefined : 'lowercase slug, 3–40 chars (e.g. flight-tracker)'),
+ }).then((v) => v.trim());
+
+ const location = await promptText({
+ message: 'Where should the plugin be created?',
+ placeholder: `. (creates ./${id}/ here)`,
+ defaultValue: defaultDir,
+ validate: (v) => (fs.existsSync(path.join(resolveDir(v || defaultDir), id))
+ ? `${path.join(v || '.', id)} already exists`
+ : undefined),
+ });
+ const parentDir = resolveDir(location || defaultDir);
+ const dest = path.join(parentDir, id);
+
+ const type = await promptSelect<string>({
+ message: 'What kind of plugin is this?',
+ initialValue: 'integration',
+ options: [
+ { value: 'integration', label: 'integration', hint: 'server-only: routes, hooks, background work' },
+ { value: 'page', label: 'page', hint: 'adds a full navigation page (sandboxed iframe UI)' },
+ { value: 'widget', label: 'widget', hint: 'adds a dashboard widget (sandboxed iframe UI)' },
+ { value: 'trip-page', label: 'trip-page', hint: 'adds a tab inside every trip (sandboxed iframe UI)' },
+ ],
+ });
+
+ const author = await promptText({ message: 'Author', placeholder: 'Your Name', defaultValue: 'Your Name' });
+ const description = await promptText({
+ message: 'One-line description',
+ placeholder: 'Describe what your plugin does.',
+ defaultValue: 'Describe what your plugin does.',
+ });
+
+ const permissions = await promptMultiselect<string>({
+ message: 'Which permissions does it need?',
+ options: PERMISSION_CATALOG.map((p) => ({ value: p.value, label: p.label, hint: p.hint })),
+ initialValues: ['db:own'],
+ required: false,
+ });
+
+ let egress: string[] | undefined;
+ if (permissions.includes('http:outbound')) {
+ const raw = await promptText({
+ message: 'External hosts it may call (comma-separated)',
+ placeholder: 'api.example.com, api.other.com',
+ validate: (v) => ((v ?? '').split(',').map((s) => s.trim()).filter(Boolean).length ? undefined : 'list at least one host'),
+ });
+ egress = raw.split(',').map((s) => s.trim()).filter(Boolean);
+ }
+
+ const requiredAddons = await promptMultiselect<string>({
+ message: 'Requires any TREK addons enabled? (optional — the plugin can only activate when these are on)',
+ options: KNOWN_ADDONS.map((a) => ({ value: a, label: a })),
+ initialValues: [],
+ required: false,
+ });
+
+ note(
+ [
+ `id ${id}`,
+ `type ${type}`,
+ `location ${dest}`,
+ `author ${author}`,
+ `permissions ${permissions.join(', ') || '(none)'}`,
+ egress ? `egress ${egress.join(', ')}` : undefined,
+ requiredAddons.length ? `addons ${requiredAddons.join(', ')}` : undefined,
+ ].filter(Boolean).join('\n'),
+ 'Review',
+ );
+
+ const confirmed = await promptConfirm({ message: `Create the plugin at ${dest}?`, initialValue: true });
+ if (!confirmed) {
+ outro('Cancelled — nothing was written.');
+ process.exit(0);
+ }
+
+ scaffold(id, type, parentDir, { author, description, permissions, egress, requiredAddons });
+ logSuccess(`Created ${dest}`);
+
+ if (!insideGitRepo(parentDir)) {
+ const doGit = await promptConfirm({ message: 'Initialize a git repository?', initialValue: true });
+ if (doGit) {
+ try {
+ execFileSync('git', ['init'], { cwd: dest, stdio: 'ignore' });
+ logSuccess('Initialized a git repository');
+ } catch {
+ logWarn('Could not initialize git — run `git init` yourself later.');
+ }
}
- let type = '';
- while (!['integration', 'page', 'widget'].includes(type)) {
- type = (await ask('Type — integration | page | widget:', 'integration')).toLowerCase();
+ }
+
+ const doInstall = await promptConfirm({ message: 'Install dependencies now?', initialValue: true });
+ if (doInstall) {
+ const s = spinner();
+ s.start('Installing dependencies');
+ try {
+ execFileSync('npm', ['install'], { cwd: dest, stdio: 'ignore' });
+ s.stop('Dependencies installed');
+ } catch {
+ s.stop('Could not install dependencies');
+ logWarn('Run `npm install` in the plugin directory later.');
}
- const author = await ask('Author:', 'Your Name');
- const description = await ask('One-line description:', 'Describe what your plugin does.');
- console.log(`\n Permissions (space/comma separated). Available:\n ${KNOWN_PERMISSIONS.join(', ')}`);
- const permsRaw = await ask('Permissions:', 'db:own');
- const permissions = permsRaw.split(/[\s,]+/).filter(Boolean).filter((p) => KNOWN_PERMISSIONS.includes(p) || p.startsWith('http:outbound:'));
- scaffold(name, type, targetDir, { author, description, permissions });
- return name;
- } finally {
- rl.close();
}
+
+ const cd = path.relative(process.cwd(), dest) || dest;
+ outro(`Next steps:\n cd ${cd}\n npx trek-plugin-sdk dev`);
+ return id;
}
// CLI entry
@@ -179,7 +338,7 @@ if (process.argv[1] && process.argv[1].endsWith('create.js')) {
const typeIdx = args.indexOf('--type');
const type = typeIdx >= 0 ? args[typeIdx + 1] : 'integration';
if (!name) {
- console.error('usage: create-trek-plugin <name> [--type integration|page|widget]');
+ console.error('usage: create-trek-plugin <name> [--type integration|page|widget|trip-page]');
process.exit(2);
}
try {
diff --git a/plugin-sdk/src/cli/dev.ts b/plugin-sdk/src/cli/dev.ts
index 87208a9cb..63619060f 100644
--- a/plugin-sdk/src/cli/dev.ts
+++ b/plugin-sdk/src/cli/dev.ts
@@ -14,6 +14,7 @@ import path from 'node:path';
import http from 'node:http';
import { createRequire } from 'node:module';
import * as sdk from '../index.js';
+import { injectTrekUi } from '../ui/kit.js';
import { readJsonFile } from './json.js';
interface Fixtures {
@@ -201,6 +202,14 @@ export async function runDev(dir: string, opts: { port?: number } = {}): Promise
if (url.pathname === '/__dev/version') return send(200, String(version));
if (url.pathname === '/') return send(200, dashboard(id, String(manifest.type), plugin.routes ?? [], dbNote, broadcasts.length), 'text/html; charset=utf-8');
+ // Faithful host preview: embeds /ui in a sandboxed opaque-origin iframe (exactly
+ // like TREK) and plays the host — posts trek:context (with a theme/accent toggle),
+ // proxies trek:invoke to your /api routes, and honours resize/notify/navigate. This
+ // is where the design kit actually renders themed.
+ if (url.pathname === '/preview' && String(manifest.type) !== 'integration') {
+ return send(200, preview(id, String(manifest.type)), 'text/html; charset=utf-8');
+ }
+
// Static plugin UI at /ui (page/widget client bundle)
if (url.pathname === '/ui' || url.pathname.startsWith('/ui/')) {
const relFile = url.pathname === '/ui' ? 'index.html' : url.pathname.slice('/ui/'.length);
@@ -209,10 +218,11 @@ export async function runDev(dir: string, opts: { port?: number } = {}): Promise
if (!fs.existsSync(file) || !fs.statSync(file).isFile()) return send(404, 'not found — build your client/ bundle');
const raw = fs.readFileSync(file);
const type = contentType(file);
- // Only the HTML doc is rewritten (live-reload inject) as a string; every other
- // asset is sent as the raw Buffer — a UTF-8 round-trip corrupts binary files.
+ // Only the HTML doc is rewritten (expand the `<!-- trek:ui -->` marker into the
+ // design kit, then inject live-reload) as a string; every other asset is sent as
+ // the raw Buffer — a UTF-8 round-trip corrupts binary files.
const body: string | Buffer = type.startsWith('text/html')
- ? String(raw).replace('</body>', `${LIVE_RELOAD}</body>`)
+ ? injectTrekUi(String(raw)).replace('</body>', `${LIVE_RELOAD}</body>`)
: raw;
return send(200, body, type);
}
@@ -250,7 +260,10 @@ export async function runDev(dir: string, opts: { port?: number } = {}): Promise
console.log(` ${dbNote}`);
console.log(` granted: ${[...grants].join(', ') || '(none)'}`);
console.log(`\n ▸ http://localhost:${port}/ dashboard`);
- if (String(manifest.type) !== 'integration') console.log(` ▸ http://localhost:${port}/ui your plugin UI`);
+ if (String(manifest.type) !== 'integration') {
+ console.log(` ▸ http://localhost:${port}/preview themed host preview`);
+ console.log(` ▸ http://localhost:${port}/ui your plugin UI (raw)`);
+ }
for (const r of routes) console.log(` ▸ ${r.method.padEnd(4)} http://localhost:${port}/api${r.path}${r.auth === false ? ' (public)' : ''}`);
console.log('\n editing server/ or client/ hot-reloads. Ctrl+C to stop.\n');
@@ -284,7 +297,9 @@ function dashboard(id: string, type: string, routes: PluginRouteLike[], dbNote:
const rows = routes.length
? routes.map((r) => `<tr><td><code>${r.method}</code></td><td><a href="/api${r.path}">/api${r.path}</a></td><td>${r.auth === false ? 'public' : 'auth'}</td></tr>`).join('')
: '<tr><td colspan="3" style="opacity:.6">no routes declared</td></tr>';
- const ui = type !== 'integration' ? `<p><a href="/ui">▸ open your plugin UI (/ui)</a></p>` : '';
+ const ui = type !== 'integration'
+ ? `<p><a href="/preview">▸ open the themed host preview (/preview)</a> &nbsp;·&nbsp; <a href="/ui">raw /ui</a></p>`
+ : '';
return `<!doctype html><meta charset="utf-8"><title>${id} · trek-plugin dev</title>
<style>body{font:15px/1.5 system-ui,sans-serif;max-width:720px;margin:3rem auto;padding:0 1rem;color:#111}
h1{font-size:1.4rem}code{background:#f3f4f6;padding:.1em .35em;border-radius:4px}
@@ -297,3 +312,89 @@ ${ui}
<p class="muted">Add <code>?_anon=1</code> to a route to hit it as an unauthenticated request. Edit <code>server/</code> or <code>client/</code> and this reloads.</p>
${LIVE_RELOAD}`;
}
+
+/**
+ * A faithful host preview for a page/widget plugin. Loads /ui in a sandboxed,
+ * opaque-origin iframe (no allow-same-origin — exactly TREK's isolation) and plays
+ * the host over postMessage: it sends trek:context (with a theme/accent/appearance
+ * toggle), proxies trek:invoke to the dev server's /api routes with the dev user,
+ * and surfaces resize/notify/navigate. This is where the design kit renders themed.
+ */
+function preview(id: string, type: string): string {
+ const maxW = type === 'widget' ? '440px' : '1000px';
+ return `<!doctype html><html lang="en"><head><meta charset="utf-8">
+<meta name="viewport" content="width=device-width,initial-scale=1"><title>${id} · preview</title>
+<style>
+*{box-sizing:border-box}
+body{margin:0;font:14px/1.5 system-ui,-apple-system,sans-serif;background:#f4f5f7;color:#111827}
+body.dark{background:#0e0e11;color:#e5e7eb}
+header{display:flex;gap:14px;align-items:center;flex-wrap:wrap;padding:12px 16px;border-bottom:1px solid #e5e7eb;position:sticky;top:0;background:inherit;z-index:2}
+body.dark header{border-color:#27272a}
+header strong{font-weight:600}.sp{flex:1}
+label{display:inline-flex;align-items:center;gap:6px;font-size:12.5px;opacity:.85}
+select,button{font:inherit;font-size:13px;padding:5px 10px;border-radius:8px;border:1px solid #d1d5db;background:#fff;color:inherit;cursor:pointer}
+body.dark select,body.dark button{background:#1c1c21;border-color:#3f3f46;color:#e5e7eb}
+.stage{padding:28px 20px;display:flex;justify-content:center}
+.wrap{width:100%;max-width:${maxW}}
+iframe{width:100%;border:0;background:transparent;min-height:120px;display:block}
+.hint{font-size:12px;opacity:.55;text-align:center;padding:0 16px 20px}
+.toast{position:fixed;bottom:18px;left:50%;transform:translateX(-50%);background:#111827;color:#fff;padding:9px 16px;border-radius:10px;font-size:13px;opacity:0;transition:opacity .2s;pointer-events:none;z-index:3}
+.toast.on{opacity:.96}
+</style></head>
+<body>
+<header>
+ <strong>${id}</strong><span style="opacity:.5">· ${type} preview</span>
+ <span class="sp"></span>
+ <label>Theme <select id="theme"><option value="light">light</option><option value="dark">dark</option></select></label>
+ <label>Accent <select id="accent"><option value="default">default</option><option value="indigo">indigo</option><option value="teal">teal</option><option value="rose">rose</option></select></label>
+ <label><input type="checkbox" id="rm"> reduce motion</label>
+ <label><input type="checkbox" id="nt"> no transparency</label>
+ <label><input type="checkbox" id="trip" checked> trip context</label>
+</header>
+<div class="stage"><div class="wrap"><iframe id="f" src="/ui" sandbox="allow-scripts allow-forms" referrerpolicy="no-referrer" title="${id}"></iframe></div></div>
+<p class="hint">The frame runs sandboxed at an opaque origin, exactly like TREK — <code>trek.invoke()</code> is proxied to your /api routes as the dev user.</p>
+<div class="toast" id="toast"></div>
+<script>
+var f=document.getElementById('f');
+var LA={"default":{"--accent":"#111827","--accent-text":"#fff","--accent-hover":"#1f2937","--accent-subtle":"#f1f5f9"},
+indigo:{"--accent":"#4f46e5","--accent-text":"#fff","--accent-hover":"#4338ca","--accent-subtle":"#eef2ff"},
+teal:{"--accent":"#0d9488","--accent-text":"#fff","--accent-hover":"#0f766e","--accent-subtle":"#f0fdfa"},
+rose:{"--accent":"#e11d48","--accent-text":"#fff","--accent-hover":"#be123c","--accent-subtle":"#fff1f2"}};
+var DA={"default":{"--accent":"#e4e4e7","--accent-text":"#09090b","--accent-hover":"#d4d4d8","--accent-subtle":"rgba(255,255,255,.08)"},
+indigo:{"--accent":"#818cf8","--accent-text":"#09090b","--accent-hover":"#a5b4fc","--accent-subtle":"rgba(129,140,248,.18)"},
+teal:{"--accent":"#2dd4bf","--accent-text":"#09090b","--accent-hover":"#5eead4","--accent-subtle":"rgba(45,212,191,.18)"},
+rose:{"--accent":"#fb7185","--accent-text":"#09090b","--accent-hover":"#fda4af","--accent-subtle":"rgba(251,113,133,.18)"}};
+function val(id){return document.getElementById(id);}
+function ctx(){
+ var theme=val("theme").value, accent=val("accent").value;
+ document.body.classList.toggle("dark", theme==="dark");
+ var tokens={}; var src=theme==="dark"?DA[accent]:LA[accent]; for(var k in src){tokens[k]=src[k];}
+ return {type:"trek:context",theme:theme,locale:"en",hostOrigin:location.origin,
+ tripId: val("trip").checked?42:null, userId:"1",
+ user:{name:"Dev User",avatar:null,isAdmin:true},
+ appearance:{scheme:accent,density:"comfortable",reducedMotion:val("rm").checked,noTransparency:val("nt").checked},
+ formats:{locale:"en",currency:"EUR",timeFormat:"24h",distanceUnit:"metric",temperatureUnit:"celsius",timezone:Intl.DateTimeFormat().resolvedOptions().timeZone},
+ tokens:tokens};
+}
+function postCtx(){ if(f.contentWindow) f.contentWindow.postMessage(ctx(),"*"); }
+var tt; function toast(msg){var el=document.getElementById("toast");el.textContent=msg;el.classList.add("on");clearTimeout(tt);tt=setTimeout(function(){el.classList.remove("on");},2200);}
+window.addEventListener("message", function(ev){
+ if(ev.source!==f.contentWindow) return;
+ var m=ev.data; if(!m||typeof m!=="object") return;
+ if(m.type==="trek:ready"||m.type==="trek:context:request"){ postCtx(); }
+ else if(m.type==="trek:resize"){ if(m.height>0) f.style.height=Math.min(m.height,2000)+"px"; }
+ else if(m.type==="trek:notify"){ toast((m.level?("["+m.level+"] "):"")+(m.message||"")); }
+ else if(m.type==="trek:navigate"){ toast("navigate \\u2192 "+m.to); }
+ else if(m.type==="trek:invoke"){
+ fetch("/api"+m.sub,{method:m.method||"GET",headers:{"content-type":"application/json"},body:m.body!=null?JSON.stringify(m.body):undefined})
+ .then(function(r){var ct=r.headers.get("content-type")||"";return (ct.indexOf("json")>=0?r.json():r.text());})
+ .then(function(data){ f.contentWindow.postMessage({type:"trek:response",requestId:m.requestId,data:data},"*"); })
+ .catch(function(e){ f.contentWindow.postMessage({type:"trek:error",requestId:m.requestId,code:"error",message:String(e&&e.message||e)},"*"); });
+ }
+});
+["theme","accent","rm","nt","trip"].forEach(function(id){ val(id).addEventListener("change",postCtx); });
+f.addEventListener("load", function(){ f.style.height="120px"; postCtx(); });
+var __v; setInterval(function(){ fetch("/__dev/version").then(function(r){return r.text();}).then(function(v){ if(__v&&v!==__v){ f.src=f.src; } __v=v; }).catch(function(){}); },1000);
+</script>
+</body></html>`;
+}
diff --git a/plugin-sdk/src/cli/menu.ts b/plugin-sdk/src/cli/menu.ts
new file mode 100644
index 000000000..4b2ac7941
--- /dev/null
+++ b/plugin-sdk/src/cli/menu.ts
@@ -0,0 +1,70 @@
+/**
+ * The top-level menu shown when `trek-plugin-sdk` is run with no command in a
+ * terminal (#plugins). It only picks WHICH command to run — the dispatcher then
+ * runs it through the same interactive path a named command would take, so each
+ * command still prompts for whatever it needs.
+ */
+import { intro, outro, promptSelect } from './ui.js';
+
+export interface MenuItem {
+ value: string;
+ label: string;
+ hint: string;
+}
+
+/** The everyday author journey. `advanced`/`exit` are control entries. */
+export const PRIMARY_MENU: MenuItem[] = [
+ { value: 'create', label: 'Create a plugin', hint: 'Scaffold a new plugin' },
+ { value: 'dev', label: 'Run the dev server', hint: 'Live-reload your plugin locally' },
+ { value: 'validate', label: 'Validate', hint: 'Check the manifest + layout' },
+ { value: 'pack', label: 'Pack', hint: 'Build plugin.zip' },
+ { value: 'publish', label: 'Publish', hint: 'Release + open the registry PR' },
+ { value: 'advanced', label: 'Advanced…', hint: 'Signing, registry entry, preflight' },
+ { value: 'exit', label: 'Exit', hint: '' },
+];
+
+/** The less-common signing/registry commands, behind the `advanced` entry. */
+export const ADVANCED_MENU: MenuItem[] = [
+ { value: 'keygen', label: 'Generate a signing key', hint: 'Create an Ed25519 signing key' },
+ { value: 'sign', label: 'Sign an artifact', hint: 'Print a signature + public key' },
+ { value: 'entry', label: 'Registry entry', hint: 'Print the ready-to-PR registry JSON' },
+ { value: 'preflight', label: 'Preflight', hint: 'Run the registry CI checks locally' },
+ { value: 'submit', label: 'Submit', hint: 'Open the registry PR' },
+ { value: 'release', label: 'Release', hint: 'Pack → GitHub release → print entry' },
+ { value: 'back', label: '← Back', hint: '' },
+];
+
+/** Every value the menu can yield, control entries included. */
+const MENU_VALUES = new Set([...PRIMARY_MENU, ...ADVANCED_MENU].map((m) => m.value));
+
+/** Pure: a menu value maps to itself when known, else `undefined`. Unit-tested. */
+export function resolveMenuChoice(value: string): string | undefined {
+ return MENU_VALUES.has(value) ? value : undefined;
+}
+
+const toOptions = (items: MenuItem[]) =>
+ items.map(({ value, label, hint }) => (hint ? { value, label, hint } : { value, label }));
+
+/**
+ * Show the menu and return the chosen command name for the dispatcher to run,
+ * or `null` if the user chose Exit. Loops back from the Advanced submenu.
+ */
+export async function runMenu(): Promise<string | null> {
+ intro('trek-plugin-sdk');
+ for (;;) {
+ const choice = await promptSelect<string>({
+ message: 'What would you like to do?',
+ options: toOptions(PRIMARY_MENU),
+ });
+ if (choice === 'exit') {
+ outro('Nothing to do — bye!');
+ return null;
+ }
+ if (choice === 'advanced') {
+ const adv = await promptSelect<string>({ message: 'Advanced commands', options: toOptions(ADVANCED_MENU) });
+ if (adv === 'back') continue;
+ return adv;
+ }
+ return choice;
+ }
+}
diff --git a/plugin-sdk/src/cli/pack.ts b/plugin-sdk/src/cli/pack.ts
index 02d215d3e..de1371951 100644
--- a/plugin-sdk/src/cli/pack.ts
+++ b/plugin-sdk/src/cli/pack.ts
@@ -12,6 +12,7 @@ import fs from 'node:fs';
import path from 'node:path';
import { createHash } from 'node:crypto';
import { makeZip, type ZipInput } from '../zip.js';
+import { injectTrekUi } from '../ui/kit.js';
import { validatePluginDir } from './validate.js';
const MAX_TOTAL = 50 * 1024 * 1024;
@@ -41,7 +42,14 @@ function walk(base: string, rel: string, out: ZipInput[]): void {
walk(base, childRel, out);
} else if (entry.isFile()) {
if (entry.name.endsWith('.map') || entry.name.endsWith('.ts')) continue;
- out.push({ name: childRel, data: fs.readFileSync(path.join(base, childRel)) });
+ // Expand the `<!-- trek:ui -->` marker into the inlined design kit as the file
+ // enters the archive, so the source stays a one-line opt-in. A no-op on HTML
+ // without the marker, so it's safe to run over every .html.
+ if (entry.name.endsWith('.html')) {
+ out.push({ name: childRel, data: Buffer.from(injectTrekUi(fs.readFileSync(path.join(base, childRel), 'utf8')), 'utf8') });
+ } else {
+ out.push({ name: childRel, data: fs.readFileSync(path.join(base, childRel)) });
+ }
}
// symlinks and other non-regular entries are skipped (never shipped)
}
diff --git a/plugin-sdk/src/cli/publish.ts b/plugin-sdk/src/cli/publish.ts
index 5efb4f2d7..11c84b9e2 100644
--- a/plugin-sdk/src/cli/publish.ts
+++ b/plugin-sdk/src/cli/publish.ts
@@ -14,6 +14,7 @@ import { packPluginDir } from './pack.js';
import { buildEntry } from './entry.js';
import { preflight } from './preflight.js';
import { submitEntry } from './submit.js';
+import { plainLog, type LogSink } from './ui.js';
function git(dir: string, args: string[], quiet = true): string {
return execFileSync('git', ['-C', dir, ...args], { encoding: 'utf8', stdio: quiet ? 'pipe' : 'inherit' }).toString().trim();
@@ -25,15 +26,18 @@ function tagExists(dir: string, tag: string): boolean {
export async function publishPlugin(opts: {
dir: string; repo: string; tag: string; now: string;
signKeyPath?: string; registry?: string; draft?: boolean; notes?: string; skipPreflight?: boolean;
+ /** Progress sink. Defaults to the plain console.error lines (CI parity). */
+ log?: LogSink;
}): Promise<{ prUrl: string }> {
const dir = path.resolve(opts.dir);
- const step = (n: number, msg: string) => console.error(`[${n}/4] ${msg}`);
+ const log = opts.log ?? plainLog;
+ const step = (n: number, msg: string) => log(`[${n}/4] ${msg}`);
// 1. Pack
step(1, 'Packing the artifact…');
const zip = path.join(dir, 'plugin.zip');
const packed = packPluginDir(dir, zip);
- console.error(` ✓ ${packed.files.length} files, ${packed.size} bytes`);
+ log(` ✓ ${packed.files.length} files, ${packed.size} bytes`);
// 2. Tag (if needed) + push + GitHub release with the artifact attached
step(2, `Tagging ${opts.tag} + creating the GitHub release…`);
@@ -47,24 +51,24 @@ export async function publishPlugin(opts: {
// Release already exists — (re)upload the packed artifact so its bytes match the pin.
execFileSync('gh', ['release', 'upload', opts.tag, packed.artifact, '--repo', opts.repo, '--clobber'], { stdio: 'pipe' });
}
- console.error(` ✓ release ${opts.tag} on ${opts.repo}`);
+ log(` ✓ release ${opts.tag} on ${opts.repo}`);
// 3. Build the entry, then run the registry CI checks locally
const entry = buildEntry({ dir, repo: opts.repo, tag: opts.tag, zipPath: packed.artifact, signKeyPath: opts.signKeyPath, now: opts.now });
if (opts.skipPreflight) {
- console.error('[3/4] Preflight skipped (--no-preflight).');
+ log('[3/4] Preflight skipped (--no-preflight).');
} else {
step(3, 'Preflight — running the registry CI checks…');
const rep = await preflight(entry);
- for (const f of rep.failures) console.error(' ✗ ' + f);
+ for (const f of rep.failures) log(' ✗ ' + f);
if (!rep.ok) throw new Error(`preflight found ${rep.failures.length} problem(s) — fix these and re-run (nothing was submitted). Did you push your code to ${opts.repo} before publishing?`);
- console.error(` ✓ all ${rep.passed.length} checks passed`);
+ log(` ✓ all ${rep.passed.length} checks passed`);
}
// 4. Open the registry PR
step(4, 'Opening the registry PR…');
const { prUrl } = submitEntry(entry, { registry: opts.registry, draft: opts.draft });
- console.error(' ✓ done');
+ log(' ✓ done');
fs.rmSync(zip, { force: true });
return { prUrl };
}
diff --git a/plugin-sdk/src/cli/trek-plugin.ts b/plugin-sdk/src/cli/trek-plugin.ts
index 9d9282649..418c4b8e2 100644
--- a/plugin-sdk/src/cli/trek-plugin.ts
+++ b/plugin-sdk/src/cli/trek-plugin.ts
@@ -34,6 +34,11 @@ import { submitEntry } from './submit.js';
import { publishPlugin } from './publish.js';
import { generateKeypair, loadPrivateKey, signArtifact, publicKeyBase64, defaultKeyPath } from './sign.js';
import { readJsonFile } from './json.js';
+import {
+ isInteractive, intro, outro, note, logInfo, logSuccess, logWarn, logError, spinner,
+ promptText, promptConfirm, clackLogSink, missingArgs,
+} from './ui.js';
+import { runMenu } from './menu.js';
const [cmd, ...args] = process.argv.slice(2);
@@ -57,116 +62,210 @@ function fail(msg: string): never {
const { flags, pos } = parse(args);
+type Flags = Record<string, string>;
+
/** --sign, --sign <keyfile>, or absent → the key path to sign with (or undefined). */
-function signKey(): string | undefined {
- if (!flags.sign) return undefined;
- return flags.sign === 'true' ? (flags.key || defaultKeyPath()) : flags.sign;
+function signKey(f: Flags): string | undefined {
+ if (!f.sign) return undefined;
+ return f.sign === 'true' ? (f.key || defaultKeyPath()) : f.sign;
+}
+
+/**
+ * Resolve the repo + tag every publishing command needs. Interactive: prompt for
+ * whatever is missing. Non-interactive: reproduce the command's exact error so
+ * scripts/CI behave exactly as before.
+ */
+async function ensureRepoTag(f: Flags, failMsg: string): Promise<{ repo: string; tag: string }> {
+ if (missingArgs(f, ['repo', 'tag']).length === 0) return { repo: f.repo, tag: f.tag };
+ if (!isInteractive()) fail(failMsg);
+ const repo = f.repo || await promptText({
+ message: 'GitHub repo (owner/name)', placeholder: 'you/trek-plugin-thing',
+ validate: (v) => (/^[^/\s]+\/[^/\s]+$/.test((v ?? '').trim()) ? undefined : 'format: owner/name'),
+ });
+ const tag = f.tag || await promptText({
+ message: 'Release tag', placeholder: 'v1.0.0',
+ validate: (v) => (/^v\d+\.\d+\.\d+/.test((v ?? '').trim()) ? undefined : 'format: vX.Y.Z'),
+ });
+ return { repo: repo.trim(), tag: tag.trim() };
}
+const USAGE = 'usage: trek-plugin <create|dev|validate|pack|keygen|sign|entry|preflight|submit|release|publish> [...]';
+
async function main(): Promise<void> {
- if (cmd === 'create') {
- const name = pos[0];
- if (!name || flags.interactive) {
- const created = await interactiveScaffold(process.cwd(), name);
- console.log(`\nCreated ${created}/ — build server/index.js, add docs/screenshot.png, then \`npx trek-plugin-sdk dev ${created}\`.`);
+ if (!cmd) {
+ // Bare invocation: a menu in a terminal, the usage line for scripts.
+ if (!isInteractive()) { console.error(USAGE); process.exit(2); }
+ const chosen = await runMenu();
+ if (chosen) await dispatch(chosen, {}, []);
+ return;
+ }
+ await dispatch(cmd, flags, pos);
+}
+
+async function dispatch(command: string, f: Flags, positional: string[]): Promise<void> {
+ const tui = isInteractive();
+ if (command === 'create') {
+ const name = positional[0];
+ if (!name || f.interactive) {
+ if (!tui) fail('create needs a plugin name in non-interactive mode: create <name> [--type integration|page|widget]');
+ await interactiveScaffold(process.cwd(), name);
return;
}
- scaffold(name, flags.type || 'integration', process.cwd(), {
- author: flags.author, description: flags.description,
- permissions: flags.permissions ? flags.permissions.split(/[\s,]+/).filter(Boolean) : undefined,
+ scaffold(name, f.type || 'integration', process.cwd(), {
+ author: f.author, description: f.description,
+ permissions: f.permissions ? f.permissions.split(/[\s,]+/).filter(Boolean) : undefined,
});
console.log(`Created ${name}/ — build server/index.js, add docs/screenshot.png, then \`npx trek-plugin-sdk dev ${name}\`.`);
- } else if (cmd === 'dev') {
- await runDev(pos[0] || '.', { port: flags.port ? Number(flags.port) : undefined });
- } else if (cmd === 'validate') {
- const r = validatePluginDir(pos[0] || '.');
- for (const w of r.warnings) console.warn('warning: ' + w);
- if (!r.ok) { for (const e of r.errors) console.error('error: ' + e); process.exit(1); }
- console.log('✓ plugin is valid');
- } else if (cmd === 'pack') {
- const r = packPluginDir(pos[0] || '.', flags.out || 'plugin.zip');
- if (flags.json) {
- console.log(JSON.stringify(r, null, 2));
+ } else if (command === 'dev') {
+ if (tui) intro(`trek-plugin dev — ${positional[0] || '.'}`);
+ await runDev(positional[0] || '.', { port: f.port ? Number(f.port) : undefined });
+ } else if (command === 'validate') {
+ const r = validatePluginDir(positional[0] || '.');
+ if (tui) {
+ for (const w of r.warnings) logWarn(w);
+ if (!r.ok) { for (const e of r.errors) logError(e); outro('✗ plugin has errors'); process.exit(1); }
+ outro('✓ plugin is valid');
} else {
- console.log(`Packed ${r.files.length} files -> ${path.relative(process.cwd(), r.artifact) || r.artifact}`);
- for (const f of r.files) console.log(' ' + f);
+ for (const w of r.warnings) console.warn('warning: ' + w);
+ if (!r.ok) { for (const e of r.errors) console.error('error: ' + e); process.exit(1); }
+ console.log('✓ plugin is valid');
+ }
+ } else if (command === 'pack') {
+ const r = packPluginDir(positional[0] || '.', f.out || 'plugin.zip');
+ const rel = path.relative(process.cwd(), r.artifact) || r.artifact;
+ if (f.json) {
+ console.log(JSON.stringify(r, null, 2)); // machine output — never decorated
+ } else if (tui) {
+ note([...r.files, '', `sha256: ${r.sha256}`, `size: ${r.size}`].join('\n'), `Packed ${r.files.length} files → ${rel}`);
+ logInfo('Upload plugin.zip to your release, then run `npx trek-plugin-sdk entry`.');
+ } else {
+ console.log(`Packed ${r.files.length} files -> ${rel}`);
+ for (const file of r.files) console.log(' ' + file);
console.log(`\nsha256: ${r.sha256}\nsize: ${r.size}`);
console.log('\nUpload this plugin.zip to your release, then run `npx trek-plugin-sdk entry` to generate the registry entry.');
}
- } else if (cmd === 'keygen') {
- const keyPath = flags.key || defaultKeyPath();
+ } else if (command === 'keygen') {
+ const keyPath = f.key || defaultKeyPath();
const { publicKey } = generateKeypair(keyPath);
- console.log(`Signing key written to ${keyPath} (keep it safe + BACK IT UP — losing it means you can't ship signed updates).`);
- console.log(`\nauthorPublicKey (goes in your registry entry): ${publicKey}`);
- console.log('\nSign releases with `npx trek-plugin-sdk release --sign` (or `entry --sign`).');
- } else if (cmd === 'sign') {
- const zip = pos[0] || 'plugin.zip';
+ if (tui) {
+ note(`Signing key written to ${keyPath}\nKeep it safe + BACK IT UP — losing it means you can't ship signed updates.\n\nauthorPublicKey (goes in your registry entry):\n${publicKey}`, 'Signing key');
+ logInfo('Sign releases with `npx trek-plugin-sdk release --sign` (or `entry --sign`).');
+ } else {
+ console.log(`Signing key written to ${keyPath} (keep it safe + BACK IT UP — losing it means you can't ship signed updates).`);
+ console.log(`\nauthorPublicKey (goes in your registry entry): ${publicKey}`);
+ console.log('\nSign releases with `npx trek-plugin-sdk release --sign` (or `entry --sign`).');
+ }
+ } else if (command === 'sign') {
+ const zip = positional[0] || 'plugin.zip';
if (!fs.existsSync(zip)) fail(`artifact not found: ${zip} — run \`npx trek-plugin-sdk pack\` first`);
- const key = loadPrivateKey(flags.key || defaultKeyPath());
+ const key = loadPrivateKey(f.key || defaultKeyPath());
const buf = fs.readFileSync(zip);
- console.log(`signature: ${signArtifact(buf, key)}`);
- console.log(`authorPublicKey: ${publicKeyBase64(key)}`);
- } else if (cmd === 'entry') {
- if (!flags.repo || !flags.tag) fail('entry needs --repo <owner/name> and --tag <vX.Y.Z>');
+ if (tui) {
+ note(`signature: ${signArtifact(buf, key)}\nauthorPublicKey: ${publicKeyBase64(key)}`, `Signed ${zip}`);
+ } else {
+ console.log(`signature: ${signArtifact(buf, key)}`);
+ console.log(`authorPublicKey: ${publicKeyBase64(key)}`);
+ }
+ } else if (command === 'entry') {
+ const { repo, tag } = await ensureRepoTag(f, 'entry needs --repo <owner/name> and --tag <vX.Y.Z>');
const entry = buildEntry({
- dir: flags.dir || pos[0] || '.',
- repo: flags.repo, tag: flags.tag,
- zipPath: flags.zip || 'plugin.zip',
- commit: flags.commit, asset: flags.asset, mergePath: flags.merge,
- signKeyPath: signKey(),
- now: new Date().toISOString(),
+ dir: f.dir || positional[0] || '.', repo, tag,
+ zipPath: f.zip || 'plugin.zip',
+ commit: f.commit, asset: f.asset, mergePath: f.merge,
+ signKeyPath: signKey(f), now: new Date().toISOString(),
});
const json = JSON.stringify(entry, null, 2) + '\n';
- if (flags.out) {
- fs.writeFileSync(flags.out, json);
- console.error(`Wrote ${flags.out} — add it as registry/plugins/${entry.id}.json in a TREK-Plugins PR.`);
+ if (f.out) {
+ fs.writeFileSync(f.out, json);
+ const msg = `Wrote ${f.out} — add it as registry/plugins/${entry.id}.json in a TREK-Plugins PR.`;
+ if (tui) logSuccess(msg); else console.error(msg);
+ } else {
+ process.stdout.write(json); // machine output on stdout — never decorated
+ }
+ } else if (command === 'preflight') {
+ let entry: ReturnType<typeof buildEntry>;
+ if (f.entry) {
+ entry = readJsonFile<ReturnType<typeof buildEntry>>(f.entry);
+ } else {
+ const { repo, tag } = await ensureRepoTag(f, 'preflight needs --repo <owner/name> --tag <vX>, or --entry <file.json>');
+ entry = buildEntry({ dir: positional[0] || '.', repo, tag, zipPath: f.zip || 'plugin.zip', commit: f.commit, signKeyPath: signKey(f), now: new Date().toISOString() });
+ }
+ if (tui) {
+ const s = spinner(); s.start('Running the registry CI checks over the network');
+ const rep = await preflight(entry, { all: !!f.all });
+ s.stop('Checks complete');
+ for (const p of rep.passed) logSuccess(p);
+ for (const fa of rep.failures) logError(fa);
+ if (!rep.ok) { outro(`${rep.failures.length} check(s) would fail CI — fix these before submitting.`); process.exit(1); }
+ outro('✓ all checks passed — this entry should sail through CI.');
} else {
- process.stdout.write(json);
+ console.error('Running registry CI checks over the network…\n');
+ const rep = await preflight(entry, { all: !!f.all });
+ for (const p of rep.passed) console.error(' ✓ ' + p);
+ for (const fa of rep.failures) console.error(' ✗ ' + fa);
+ if (!rep.ok) { console.error(`\n${rep.failures.length} check(s) would fail CI — fix these before submitting.`); process.exit(1); }
+ console.error('\n✓ all checks passed — this entry should sail through CI.');
+ }
+ } else if (command === 'publish') {
+ const { repo, tag } = await ensureRepoTag(f, 'publish needs --repo <owner/name> and --tag <vX.Y.Z>');
+ if (tui) {
+ note(`repo ${repo}\ntag ${tag}\ndir ${positional[0] || '.'}`, 'Publish');
+ const ok = await promptConfirm({ message: 'Create the GitHub release and open the registry PR?', initialValue: true });
+ if (!ok) { outro('Cancelled — nothing was published.'); return; }
}
- } else if (cmd === 'preflight') {
- const entry = flags.entry
- ? readJsonFile<ReturnType<typeof buildEntry>>(flags.entry)
- : (flags.repo && flags.tag
- ? buildEntry({ dir: pos[0] || '.', repo: flags.repo, tag: flags.tag, zipPath: flags.zip || 'plugin.zip', commit: flags.commit, signKeyPath: signKey(), now: new Date().toISOString() })
- : fail('preflight needs --repo <owner/name> --tag <vX>, or --entry <file.json>'));
- console.error('Running registry CI checks over the network…\n');
- const rep = await preflight(entry, { all: !!flags.all });
- for (const p of rep.passed) console.error(' ✓ ' + p);
- for (const f of rep.failures) console.error(' ✗ ' + f);
- if (!rep.ok) { console.error(`\n${rep.failures.length} check(s) would fail CI — fix these before submitting.`); process.exit(1); }
- console.error('\n✓ all checks passed — this entry should sail through CI.');
- } else if (cmd === 'publish') {
- if (!flags.repo || !flags.tag) fail('publish needs --repo <owner/name> and --tag <vX.Y.Z>');
const { prUrl } = await publishPlugin({
- dir: pos[0] || '.', repo: flags.repo, tag: flags.tag,
- signKeyPath: signKey(), registry: flags.registry, draft: !!flags.draft,
- notes: flags.notes, skipPreflight: !!flags['no-preflight'], now: new Date().toISOString(),
+ dir: positional[0] || '.', repo, tag,
+ signKeyPath: signKey(f), registry: f.registry, draft: !!f.draft,
+ notes: f.notes, skipPreflight: !!f['no-preflight'], now: new Date().toISOString(),
+ log: tui ? clackLogSink : undefined,
});
- console.error('\n✓ published — registry PR:');
- console.log(prUrl);
- } else if (cmd === 'submit') {
- if (!flags.repo || !flags.tag) fail('submit needs --repo <owner/name> and --tag <vX.Y.Z>');
+ if (tui) logSuccess('Published — registry PR:'); else console.error('\n✓ published — registry PR:');
+ console.log(prUrl); // machine output on stdout
+ } else if (command === 'submit') {
+ const { repo, tag } = await ensureRepoTag(f, 'submit needs --repo <owner/name> and --tag <vX.Y.Z>');
const entry = buildEntry({
- dir: pos[0] || '.', repo: flags.repo, tag: flags.tag,
- zipPath: flags.zip || 'plugin.zip', commit: flags.commit, signKeyPath: signKey(),
- now: new Date().toISOString(),
+ dir: positional[0] || '.', repo, tag,
+ zipPath: f.zip || 'plugin.zip', commit: f.commit, signKeyPath: signKey(f), now: new Date().toISOString(),
});
- console.error(`Opening a registry PR for ${entry.id} ${entry.versions[0].version}…`);
- const { prUrl } = submitEntry(entry, { registry: flags.registry, branch: flags.branch, draft: !!flags.draft, keep: !!flags.keep });
- console.log(prUrl);
- } else if (cmd === 'release') {
- if (!flags.repo || !flags.tag) fail('release needs --repo <owner/name> and --tag <vX.Y.Z>');
- const dir = pos[0] || '.';
- const zip = path.resolve(dir, flags.out || 'plugin.zip');
- const packed = packPluginDir(dir, zip);
- console.error(`Packed ${packed.files.length} files (${packed.size} bytes).`);
- console.error(`Creating GitHub release ${flags.tag} on ${flags.repo}…`);
- execFileSync('gh', ['release', 'create', flags.tag, packed.artifact, '--repo', flags.repo, '--title', flags.tag, '--notes', flags.notes || `Release ${flags.tag}`], { stdio: 'inherit' });
- const entry = buildEntry({ dir, repo: flags.repo, tag: flags.tag, zipPath: packed.artifact, commit: flags.commit, mergePath: flags.merge, signKeyPath: signKey(), now: new Date().toISOString() });
- console.error('\nRegistry entry (add as registry/plugins/' + entry.id + '.json in a TREK-Plugins PR, or run `npx trek-plugin-sdk submit`):\n');
- process.stdout.write(JSON.stringify(entry, null, 2) + '\n');
+ if (tui) {
+ note(`${entry.id} ${entry.versions[0].version}\nrepo ${repo}`, 'Submit registry PR');
+ const ok = await promptConfirm({ message: 'Open the registry PR now?', initialValue: true });
+ if (!ok) { outro('Cancelled — no PR opened.'); return; }
+ const s = spinner(); s.start('Opening the registry PR');
+ const { prUrl } = submitEntry(entry, { registry: f.registry, branch: f.branch, draft: !!f.draft, keep: !!f.keep });
+ s.stop('Registry PR opened');
+ console.log(prUrl);
+ } else {
+ console.error(`Opening a registry PR for ${entry.id} ${entry.versions[0].version}…`);
+ const { prUrl } = submitEntry(entry, { registry: f.registry, branch: f.branch, draft: !!f.draft, keep: !!f.keep });
+ console.log(prUrl);
+ }
+ } else if (command === 'release') {
+ const { repo, tag } = await ensureRepoTag(f, 'release needs --repo <owner/name> and --tag <vX.Y.Z>');
+ const dir = positional[0] || '.';
+ const zip = path.resolve(dir, f.out || 'plugin.zip');
+ if (tui) {
+ const packed = packPluginDir(dir, zip);
+ note(`packed ${packed.files.length} files (${packed.size} bytes)\nrepo ${repo}\ntag ${tag}`, 'Release');
+ const ok = await promptConfirm({ message: `Create GitHub release ${tag} on ${repo}?`, initialValue: true });
+ if (!ok) { outro('Cancelled — no release created.'); return; }
+ const s = spinner(); s.start(`Creating GitHub release ${tag}`);
+ execFileSync('gh', ['release', 'create', tag, packed.artifact, '--repo', repo, '--title', tag, '--notes', f.notes || `Release ${tag}`], { stdio: 'pipe' });
+ s.stop(`Released ${tag} on ${repo}`);
+ const entry = buildEntry({ dir, repo, tag, zipPath: packed.artifact, commit: f.commit, mergePath: f.merge, signKeyPath: signKey(f), now: new Date().toISOString() });
+ logInfo(`Registry entry (add as registry/plugins/${entry.id}.json, or run \`npx trek-plugin-sdk submit\`):`);
+ process.stdout.write(JSON.stringify(entry, null, 2) + '\n');
+ } else {
+ const packed = packPluginDir(dir, zip);
+ console.error(`Packed ${packed.files.length} files (${packed.size} bytes).`);
+ console.error(`Creating GitHub release ${tag} on ${repo}…`);
+ execFileSync('gh', ['release', 'create', tag, packed.artifact, '--repo', repo, '--title', tag, '--notes', f.notes || `Release ${tag}`], { stdio: 'inherit' });
+ const entry = buildEntry({ dir, repo, tag, zipPath: packed.artifact, commit: f.commit, mergePath: f.merge, signKeyPath: signKey(f), now: new Date().toISOString() });
+ console.error('\nRegistry entry (add as registry/plugins/' + entry.id + '.json in a TREK-Plugins PR, or run `npx trek-plugin-sdk submit`):\n');
+ process.stdout.write(JSON.stringify(entry, null, 2) + '\n');
+ }
} else {
- console.error('usage: trek-plugin <create|dev|validate|pack|keygen|sign|entry|preflight|submit|release|publish> [...]');
+ console.error(USAGE);
process.exit(2);
}
}
diff --git a/plugin-sdk/src/cli/ui.ts b/plugin-sdk/src/cli/ui.ts
new file mode 100644
index 000000000..37903f94f
--- /dev/null
+++ b/plugin-sdk/src/cli/ui.ts
@@ -0,0 +1,122 @@
+/**
+ * The one Clack styling layer for the plugin-author CLI (#plugins).
+ *
+ * Two rules make this safe to sprinkle across every command:
+ * 1. Nothing here runs unless `isInteractive()` — in CI / pipes the commands fall
+ * back to their plain, flag-driven behaviour with byte-identical output.
+ * 2. ALL decoration and prompts render to STDERR, so stdout stays a pure data
+ * channel (the `entry` JSON, `pack --json`, PR URLs) that can be piped.
+ */
+import {
+ intro as clackIntro,
+ outro as clackOutro,
+ note as clackNote,
+ log as clackLog,
+ spinner as clackSpinner,
+ cancel as clackCancel,
+ isCancel,
+ text as clackText,
+ select as clackSelect,
+ multiselect as clackMultiselect,
+ confirm as clackConfirm,
+ type TextOptions,
+ type SelectOptions,
+ type MultiSelectOptions,
+ type ConfirmOptions,
+ type SpinnerResult,
+} from '@clack/prompts';
+
+/** Every prompt and every decoration renders here, never on stdout. */
+const OUT = process.stderr;
+
+/** True only when a human is driving a real terminal on both stdin and stdout. */
+export function isInteractive(): boolean {
+ return Boolean(process.stdin.isTTY && process.stdout.isTTY);
+}
+
+// ── decoration ─────────────────────────────────────────────────────────────
+
+export const intro = (title: string): void => clackIntro(title, { output: OUT });
+export const outro = (message: string): void => clackOutro(message, { output: OUT });
+export const note = (message: string, title?: string): void => clackNote(message, title, { output: OUT });
+export const logInfo = (m: string): void => clackLog.info(m, { output: OUT });
+export const logSuccess = (m: string): void => clackLog.success(m, { output: OUT });
+export const logWarn = (m: string): void => clackLog.warn(m, { output: OUT });
+export const logError = (m: string): void => clackLog.error(m, { output: OUT });
+export const spinner = (): SpinnerResult => clackSpinner({ output: OUT });
+
+// ── cancellation ─────────────────────────────────────────────────────────────
+
+/** Clack returns a symbol when the user hits Ctrl+C — turn that into a clean exit. */
+export function orCancel<T>(value: T | symbol): T {
+ if (isCancel(value)) {
+ clackCancel('Cancelled.', { output: OUT });
+ process.exit(0);
+ }
+ return value as T;
+}
+
+// ── prompts (cancel-checked, stderr-rendered) ────────────────────────────────
+
+export const promptText = async (opts: Omit<TextOptions, 'output'>): Promise<string> =>
+ orCancel(await clackText({ ...opts, output: OUT }));
+
+export const promptSelect = async <Value>(opts: Omit<SelectOptions<Value>, 'output'>): Promise<Value> =>
+ orCancel(await clackSelect({ ...opts, output: OUT }));
+
+export const promptMultiselect = async <Value>(opts: Omit<MultiSelectOptions<Value>, 'output'>): Promise<Value[]> =>
+ orCancel(await clackMultiselect({ ...opts, output: OUT }));
+
+export const promptConfirm = async (opts: Omit<ConfirmOptions, 'output'>): Promise<boolean> =>
+ orCancel(await clackConfirm({ ...opts, output: OUT }));
+
+// ── permissions ──────────────────────────────────────────────────────────────
+
+/**
+ * The permissions an author can grant, each with a human hint for the multiselect.
+ * This list must stay in lockstep with the host's `KNOWN_PERMISSIONS`
+ * (server `src/nest/plugins/protocol/envelope.ts`) — same strings, same order.
+ * The manifest validator's `KNOWN_PERMISSIONS` (`../manifest.ts`) mirrors it too.
+ */
+export const PERMISSION_CATALOG: { value: string; label: string; hint: string }[] = [
+ { value: 'db:own', label: 'db:own', hint: 'A private database only this plugin can read/write' },
+ { value: 'db:read:trips', label: 'db:read:trips', hint: 'Read trips the requesting user can access' },
+ { value: 'db:read:users', label: 'db:read:users', hint: 'Read basic user profiles' },
+ { value: 'db:read:costs', label: 'db:read:costs', hint: 'Read costs (budget items) the requesting user can access' },
+ { value: 'db:write:costs', label: 'db:write:costs', hint: 'Create costs (budget items) on trips the user can edit' },
+ { value: 'db:write:places', label: 'db:write:places', hint: 'Add, edit and remove places on trips the user can edit' },
+ { value: 'db:write:days', label: 'db:write:days', hint: 'Add, edit and remove days on trips the user can edit' },
+ { value: 'db:write:itinerary', label: 'db:write:itinerary', hint: 'Assign and remove places on days of trips the user can edit' },
+ { value: 'db:write:trips', label: 'db:write:trips', hint: 'Edit trip details (title, dates, currency…) on trips the user can edit' },
+ { value: 'db:meta', label: 'db:meta', hint: 'Attach its own private data to trips, places and days the user can access' },
+ { value: 'ws:broadcast:trip', label: 'ws:broadcast:trip', hint: 'Push realtime events to everyone on a trip' },
+ { value: 'ws:broadcast:user', label: 'ws:broadcast:user', hint: 'Push realtime events to a single user' },
+ { value: 'hook:photo-provider', label: 'hook:photo-provider', hint: 'Supply place photos to TREK' },
+ { value: 'hook:calendar-source', label: 'hook:calendar-source', hint: 'Supply calendar events to TREK' },
+ { value: 'hook:place-detail-provider', label: 'hook:place-detail-provider', hint: 'Contribute extra details (reviews, ratings, links) to a place' },
+ { value: 'hook:trip-warning-provider', label: 'hook:trip-warning-provider', hint: 'Raise validation warnings on a trip (shown in the planner)' },
+ { value: 'http:outbound', label: 'http:outbound', hint: 'Call external HTTP hosts (needs an egress allow-list)' },
+];
+
+export const KNOWN_PERMISSIONS: string[] = PERMISSION_CATALOG.map((p) => p.value);
+
+// ── reporter seam (for commands that log their own progress, e.g. publish) ────
+
+/** A progress sink. The default writes the same plain lines as before; the
+ * interactive one routes through Clack styling. Keeping this an injectable
+ * `log(msg)` means the tested publish path is byte-identical by default. */
+export type LogSink = (msg: string) => void;
+
+/** Non-interactive default: exactly the previous `console.error` behaviour. */
+export const plainLog: LogSink = (msg: string) => console.error(msg);
+
+/** Interactive sink: same text, rendered as a Clack step on stderr. */
+export const clackLogSink: LogSink = (msg: string) => clackLog.step(msg.trim(), { output: OUT });
+
+// ── flag helpers ──────────────────────────────────────────────────────────────
+
+/** Pure: which of `required` flags are absent. Drives both the interactive
+ * prompt (fill the gaps) and the non-interactive error (report them). */
+export function missingArgs(flags: Record<string, string>, required: string[]): string[] {
+ return required.filter((k) => !flags[k]);
+}
diff --git a/plugin-sdk/src/cli/validate.ts b/plugin-sdk/src/cli/validate.ts
index ad4c2f192..c044e1564 100644
--- a/plugin-sdk/src/cli/validate.ts
+++ b/plugin-sdk/src/cli/validate.ts
@@ -7,7 +7,7 @@
*/
import fs from 'node:fs';
import path from 'node:path';
-import { validateManifest } from '../manifest.js';
+import { validateManifest, KNOWN_ADDONS } from '../manifest.js';
import { readJsonFile } from './json.js';
export interface ValidateReport {
@@ -33,6 +33,11 @@ export function validatePluginDir(dir: string): ValidateReport {
if (manifestId && path.basename(path.resolve(dir)) !== manifestId) {
warnings.push(`directory name should equal the plugin id "${manifestId}"`);
}
+ // A well-formed but unrecognised addon id is not an error (the plugin may target
+ // a newer TREK), but it can never enable here — surface it as a warning.
+ for (const a of res.manifest?.requiredAddons ?? []) {
+ if (!KNOWN_ADDONS.includes(a)) warnings.push(`requiredAddons: "${a}" is not a known TREK addon on this SDK version`);
+ }
} catch (e) {
errors.push('trek-plugin.json is not valid JSON: ' + (e instanceof Error ? e.message : e));
}
diff --git a/plugin-sdk/src/index.ts b/plugin-sdk/src/index.ts
index aa79f11ca..50435272a 100644
--- a/plugin-sdk/src/index.ts
+++ b/plugin-sdk/src/index.ts
@@ -9,6 +9,20 @@
/** Bumped on any breaking change to the plugin API surface. Embed as `apiVersion` in your manifest. */
export const PLUGIN_API_VERSION = 1 as const;
+// Core entity shapes returned by ctx reads/writes. Only `id` is guaranteed; the rest
+// are the fields plugins most commonly use (typed for autocomplete), left optional
+// because they mirror raw DB rows — and every shape keeps an index signature, so no
+// column is ever hidden from you.
+export interface Trip { id: number; user_id?: number; title?: string; start_date?: string | null; end_date?: string | null; currency?: string | null; [k: string]: unknown }
+export interface Place { id: number; trip_id?: number; name?: string; lat?: number | null; lng?: number | null; day_id?: number | null; category_id?: number | null; notes?: string | null; [k: string]: unknown }
+export interface Day { id: number; trip_id?: number; date?: string | null; title?: string | null; [k: string]: unknown }
+export interface Reservation { id: number; trip_id?: number; type?: string; [k: string]: unknown }
+export interface PackingItem { id: number; trip_id?: number; name?: string; [k: string]: unknown }
+export interface TripFile { id: number; trip_id?: number; filename?: string; [k: string]: unknown }
+export interface BudgetItem { id: number; trip_id?: number; name?: string; total_price?: number | null; currency?: string | null; [k: string]: unknown }
+export interface Assignment { id: number; day_id?: number; place_id?: number; notes?: string | null; [k: string]: unknown }
+export interface User { id: number; username?: string; display_name?: string | null; avatar?: string | null; [k: string]: unknown }
+
export interface PluginContext {
readonly id: string;
readonly config: Readonly<Record<string, unknown>>;
@@ -18,11 +32,58 @@ export interface PluginContext {
migrate(id: string, sql: string): Promise<{ applied: boolean }>;
};
trips: {
- getById(tripId: number, asUserId: number): Promise<unknown>;
- getPlaces(tripId: number, asUserId: number): Promise<unknown[]>;
- getReservations(tripId: number, asUserId: number): Promise<unknown[]>;
+ getById(tripId: number, asUserId?: number): Promise<Trip | null>;
+ getPlaces(tripId: number, asUserId?: number): Promise<Place[]>;
+ getReservations(tripId: number, asUserId?: number): Promise<Reservation[]>;
+ /** Update trip fields; needs `db:write:trips` + the acting user's trip_edit permission. Route context only. */
+ update(tripId: number, input: Record<string, unknown>): Promise<Trip>;
+ };
+ // Read-only views of other trip subsystems (#1429 eco). Membership-checked against
+ // the current user; each needs its own db:read:* scope.
+ packing: {
+ /** A trip's packing items (hydrated bags/assignees). Needs `db:read:packing`. */
+ list(tripId: number): Promise<PackingItem[]>;
+ };
+ files: {
+ /** A trip's files, trash excluded. Needs `db:read:files`. */
+ list(tripId: number): Promise<TripFile[]>;
+ };
+ // "Costs" = budget items. The acting user is bound by the host to the current
+ // invocation; create/update/delete also need 'budget_edit' and the Costs addon
+ // enabled.
+ costs: {
+ getByTrip(tripId: number): Promise<BudgetItem[]>;
+ listMine(): Promise<BudgetItem[]>;
+ create(tripId: number, input: Record<string, unknown>): Promise<BudgetItem>;
+ update(tripId: number, itemId: number, input: Record<string, unknown>): Promise<BudgetItem>;
+ delete(tripId: number, itemId: number): Promise<{ deleted: boolean }>;
+ };
+ // Core planner writes (#1429). Membership-checked against the invocation's user;
+ // each needs the matching write scope + the app's place_edit/day_edit permission.
+ places: {
+ create(tripId: number, input: Record<string, unknown>): Promise<Place>;
+ update(tripId: number, placeId: number, input: Record<string, unknown>): Promise<Place>;
+ delete(tripId: number, placeId: number): Promise<{ deleted: boolean }>;
};
- users: { getById(id: number): Promise<unknown> };
+ days: {
+ create(tripId: number, input: Record<string, unknown>): Promise<Day>;
+ update(tripId: number, dayId: number, input: Record<string, unknown>): Promise<Day>;
+ delete(tripId: number, dayId: number): Promise<{ deleted: boolean }>;
+ };
+ itinerary: {
+ assign(tripId: number, dayId: number, placeId: number, notes?: string | null): Promise<Assignment>;
+ unassign(tripId: number, assignmentId: number): Promise<{ deleted: boolean }>;
+ };
+ // Your OWN namespaced key/value store on a trip/place/day (#1429) — enrich core
+ // entities without forking the schema. Needs `db:meta`; the entity must belong to
+ // a trip the current user can access. Values are JSON-serialisable.
+ meta: {
+ get(entityType: 'trip' | 'place' | 'day', entityId: number, key: string): Promise<unknown>;
+ set(entityType: 'trip' | 'place' | 'day', entityId: number, key: string, value: unknown): Promise<unknown>;
+ list(entityType: 'trip' | 'place' | 'day', entityId: number): Promise<Record<string, unknown>>;
+ delete(entityType: 'trip' | 'place' | 'day', entityId: number, key: string): Promise<{ deleted: boolean }>;
+ };
+ users: { getById(id: number): Promise<User | null> };
ws: {
broadcastToTrip(tripId: number, event: string, data: Record<string, unknown>): Promise<void>;
broadcastToUser(userId: number, event: string, data: Record<string, unknown>): Promise<void>;
@@ -32,6 +93,17 @@ export interface PluginContext {
warn(msg: string, meta?: Record<string, unknown>): void;
error(msg: string, meta?: Record<string, unknown>): void;
};
+ /** Call a function another plugin exposes. `pluginId` must be a declared, version-
+ * satisfied dependency that lists `fn` in its manifest `capabilities.provides`. The
+ * call runs as the current acting user. */
+ plugins: {
+ call(pluginId: string, fn: string, args?: unknown): Promise<unknown>;
+ };
+ /** Publish an event to dependents that subscribed to it. `name` must be declared in
+ * this plugin's manifest `capabilities.emits`. Fire-and-forget. */
+ events: {
+ emit(name: string, payload?: unknown): void;
+ };
}
export interface PluginRequest {
@@ -81,7 +153,40 @@ export interface CalendarEvent {
}
export interface CalendarSource {
getName(): string;
- getEvents(userId: number, start: Date, end: Date): Promise<CalendarEvent[]>;
+ // start/end are ISO strings — the host->plugin boundary is JSON, so a Date would
+ // arrive as a string anyway (kept in lockstep with the runtime SDK copy).
+ getEvents(userId: number, start: string, end: string): Promise<CalendarEvent[]>;
+}
+/** One row of extra place info TREK renders natively (reviews/ratings/links/…). */
+export interface PlaceDetailItem { label: string; value?: string; url?: string; }
+export interface PlaceDetailProvider {
+ /** Extra info for a place; core calls this for a `place-detail` panel. Needs `hook:place-detail-provider`. */
+ getDetails(placeId: number, ctx: PluginContext): Promise<PlaceDetailItem[]>;
+}
+/** A validation/warning a plugin raises on a trip; TREK surfaces it in the planner. */
+export interface TripWarning { level: 'info' | 'warning' | 'error'; message: string; dayId?: number; placeId?: number; }
+export interface WarningProvider {
+ /** Problems/warnings for a trip (e.g. overpacked day, place closed). Needs `hook:trip-warning-provider`. */
+ getWarnings(tripId: number, ctx: PluginContext): Promise<TripWarning[]>;
+}
+
+/** A core-event subscription (#1429 eco). Handlers run with NO user (like a job)
+ * and receive only the event name + tripId — never the payload. Needs `events:subscribe`. */
+export interface PluginEventSubscription {
+ /** A core event name (e.g. `place:created`, `day:updated`, `file:created`) or `*` for all. */
+ on: string;
+ handler(payload: { event: string; tripId: number }, ctx: PluginContext): Promise<void> | void;
+}
+
+/** A function this plugin exposes to its dependents (declared in `capabilities.provides`). */
+export type PluginExport = (args: unknown, ctx: PluginContext) => Promise<unknown> | unknown;
+
+/** A subscription to another plugin's event. Authorized by declaring that plugin as a
+ * `pluginDependency`; the handler runs with NO user and receives the emitter's payload. */
+export interface PluginSubscription {
+ plugin: string;
+ event: string;
+ handler(payload: unknown, ctx: PluginContext): Promise<void> | void;
}
export interface PluginDefinition {
@@ -89,7 +194,17 @@ export interface PluginDefinition {
onUnload?(ctx: PluginContext): Promise<void> | void;
routes?: PluginRoute[];
jobs?: PluginJob[];
- hooks?: { photoProvider?: PhotoProvider; calendarSource?: CalendarSource };
+ events?: PluginEventSubscription[];
+ hooks?: {
+ photoProvider?: PhotoProvider;
+ calendarSource?: CalendarSource;
+ placeDetailProvider?: PlaceDetailProvider;
+ warningProvider?: WarningProvider;
+ };
+ /** Functions exposed to dependents (names must match manifest `capabilities.provides`). */
+ exports?: Record<string, PluginExport>;
+ /** Subscriptions to other plugins' events (each `plugin` must be a declared dependency). */
+ subscriptions?: PluginSubscription[];
}
/** Define a plugin. Gives you types; the returned object is what TREK loads. */
@@ -99,3 +214,7 @@ export function definePlugin(def: PluginDefinition): PluginDefinition {
export { validateManifest, type PluginManifest, type ValidationResult } from './manifest.js';
export { createMockHost, type MockHostOptions } from './mock-host.js';
+// The design kit for page/widget UIs: inline these into your client/index.html
+// (or drop a `<!-- trek:ui -->` marker and let `dev`/`pack` expand it) to get the
+// native TREK look — glass, hover, buttons, inputs — plus a `window.trek` bridge.
+export { TREK_UI_CSS, TREK_THEME_JS, TREK_UI_MARKER, injectTrekUi } from './ui/kit.js';
diff --git a/plugin-sdk/src/manifest.ts b/plugin-sdk/src/manifest.ts
index 1ffa3452d..f931629fc 100644
--- a/plugin-sdk/src/manifest.ts
+++ b/plugin-sdk/src/manifest.ts
@@ -4,15 +4,23 @@
* result (no throw) so the CLI can print every problem at once.
*/
+import { validRange } from 'semver';
+
+export interface PluginDependency {
+ id: string;
+ version: string;
+}
export interface PluginManifest {
id: string;
name: string;
version: string;
apiVersion: number;
- type: 'integration' | 'page' | 'widget';
+ type: 'integration' | 'page' | 'widget' | 'trip-page';
permissions: string[];
egress: string[];
nativeModules?: boolean;
+ requiredAddons: string[];
+ pluginDependencies: PluginDependency[];
}
export interface ValidationResult {
ok: boolean;
@@ -25,14 +33,25 @@ const ID_RE = /^[a-z][a-z0-9-]{2,39}$/;
// install loader, so surface it locally too.
const RESERVED_IDS = new Set(['registry', 'install', 'rescan']);
const SEMVER_RE = /^\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?$/;
+// Addon-id format (lowercase slug, underscores allowed e.g. `llm_parsing`).
+const ADDON_ID_RE = /^[a-z][a-z0-9_]{1,39}$/;
+// Mirror of the server's ADDON_IDS (server/src/addons.ts). Kept in sync so
+// `trek-plugin validate` can WARN on an addon id TREK doesn't know — never a hard
+// error (a plugin built for a newer TREK may reference an addon this SDK predates).
+export const KNOWN_ADDONS = [
+ 'mcp', 'packing', 'budget', 'documents', 'vacay', 'atlas', 'collab', 'journey', 'airtrail', 'llm_parsing', 'collections',
+];
// An outbound host: exact hostname (single-label sibling or dotted FQDN) or a
// `*.`-wildcard with a multi-label suffix. No `*`, no `*.`, no whole-TLD `*.com`,
// no spaces (mirrors the server manifest validator).
const HOST_RE = /^(\*\.[a-z0-9-]+(\.[a-z0-9-]+)+|[a-z0-9-]+(\.[a-z0-9-]+)*)$/i;
-const TYPES = ['integration', 'page', 'widget'];
+const TYPES = ['integration', 'page', 'widget', 'trip-page'];
const KNOWN_PERMISSIONS = [
- 'db:own', 'db:read:trips', 'db:read:users', 'ws:broadcast:trip', 'ws:broadcast:user',
- 'hook:photo-provider', 'hook:calendar-source', 'http:outbound',
+ 'db:own', 'db:read:trips', 'db:read:users', 'db:read:costs', 'db:read:packing', 'db:read:files', 'db:write:costs',
+ 'db:write:places', 'db:write:days', 'db:write:itinerary', 'db:write:trips',
+ 'db:meta',
+ 'ws:broadcast:trip', 'ws:broadcast:user',
+ 'hook:photo-provider', 'hook:calendar-source', 'hook:place-detail-provider', 'hook:trip-warning-provider', 'events:subscribe', 'http:outbound',
];
function isKnownPermission(p: string): boolean {
@@ -70,10 +89,16 @@ export function validateManifest(raw: unknown): ValidationResult {
if (egress.includes('*')) errors.push('egress[] must not contain a bare "*"');
for (const h of egress) if (!HOST_RE.test(h)) errors.push(`invalid egress host "${h}"`);
- const widget = (m.capabilities as { widget?: { slot?: unknown } } | undefined)?.widget;
- if (widget?.slot !== undefined && widget.slot !== 'sidebar' && widget.slot !== 'hero') {
- errors.push(`widget slot must be "sidebar" or "hero", got "${String(widget.slot)}"`);
+ const capabilities = (m.capabilities ?? undefined) as { widget?: { slot?: unknown }; provides?: unknown; emits?: unknown } | undefined;
+ const widget = capabilities?.widget;
+ if (widget?.slot !== undefined && widget.slot !== 'sidebar' && widget.slot !== 'hero' && widget.slot !== 'place-detail') {
+ errors.push(`widget slot must be "sidebar", "hero" or "place-detail", got "${String(widget.slot)}"`);
}
+ validateCapabilityNames(capabilities?.provides, 'provides', errors);
+ validateCapabilityNames(capabilities?.emits, 'emits', errors);
+
+ const requiredAddons = validateRequiredAddons(m.requiredAddons, errors);
+ const pluginDependencies = validatePluginDependencies(m.pluginDependencies, typeof m.id === 'string' ? m.id : '', errors);
if (errors.length) return { ok: false, errors };
return {
@@ -88,6 +113,66 @@ export function validateManifest(raw: unknown): ValidationResult {
permissions,
egress,
nativeModules: false,
+ requiredAddons,
+ pluginDependencies,
},
};
}
+
+// Export/event names exposed to other plugins (dots allowed for event names).
+const CAPABILITY_NAME_RE = /^[a-zA-Z][a-zA-Z0-9._-]{0,63}$/;
+
+function validateCapabilityNames(raw: unknown, field: string, errors: string[]): void {
+ if (raw === undefined) return;
+ if (!Array.isArray(raw)) {
+ errors.push(`capabilities.${field} must be an array of names`);
+ return;
+ }
+ for (const v of raw) {
+ if (typeof v !== 'string' || !CAPABILITY_NAME_RE.test(v)) errors.push(`invalid capabilities.${field} entry "${String(v)}"`);
+ }
+}
+
+function validateRequiredAddons(raw: unknown, errors: string[]): string[] {
+ if (raw === undefined) return [];
+ if (!Array.isArray(raw)) {
+ errors.push('requiredAddons must be an array of addon ids');
+ return [];
+ }
+ const out: string[] = [];
+ for (const v of raw) {
+ if (typeof v !== 'string' || !ADDON_ID_RE.test(v)) {
+ errors.push(`invalid requiredAddons entry "${String(v)}"`);
+ continue;
+ }
+ if (!out.includes(v)) out.push(v);
+ }
+ return out;
+}
+
+function validatePluginDependencies(raw: unknown, selfId: string, errors: string[]): PluginDependency[] {
+ if (raw === undefined) return [];
+ if (!Array.isArray(raw)) {
+ errors.push('pluginDependencies must be an array of { id, version }');
+ return [];
+ }
+ const out: PluginDependency[] = [];
+ for (const v of raw) {
+ if (!v || typeof v !== 'object') {
+ errors.push('each pluginDependencies entry must be an object');
+ continue;
+ }
+ const d = v as Record<string, unknown>;
+ const id = typeof d.id === 'string' ? d.id : '';
+ const version = typeof d.version === 'string' ? d.version : '';
+ if (!ID_RE.test(id)) errors.push(`invalid pluginDependencies id "${id}"`);
+ else if (RESERVED_IDS.has(id)) errors.push(`pluginDependencies id "${id}" is reserved`);
+ else if (id === selfId) errors.push(`plugin "${selfId}" cannot depend on itself`);
+ else if (out.some((e) => e.id === id)) errors.push(`duplicate pluginDependencies id "${id}"`);
+ if (!version || validRange(version) === null) errors.push(`invalid pluginDependencies version range "${version}" for "${id || '?'}"`);
+ if (ID_RE.test(id) && !RESERVED_IDS.has(id) && id !== selfId && version && validRange(version) !== null && !out.some((e) => e.id === id)) {
+ out.push({ id, version });
+ }
+ }
+ return out;
+}
diff --git a/plugin-sdk/src/mock-host.ts b/plugin-sdk/src/mock-host.ts
index 8c979d6b2..956662684 100644
--- a/plugin-sdk/src/mock-host.ts
+++ b/plugin-sdk/src/mock-host.ts
@@ -1,4 +1,4 @@
-import type { PluginContext } from './index.js';
+import type { PluginContext, Trip, Place, Day, Reservation, PackingItem, TripFile, BudgetItem, User } from './index.js';
/**
* A mock PluginContext for unit-testing a plugin without a running TREK
@@ -12,11 +12,31 @@ import type { PluginContext } from './index.js';
export interface MockHostOptions {
grants?: string[];
config?: Record<string, unknown>;
- /** Fixtures keyed by trip id; `members` gates access like the real host. */
- trips?: Record<number, { members: number[]; data?: unknown; places?: unknown[]; reservations?: unknown[] }>;
+ /**
+ * Fixtures keyed by trip id; `members` gates access like the real host.
+ * `costs` seeds budget items; `canEditCosts` (default true) models the
+ * 'budget_edit' permission for `costs.create`.
+ */
+ trips?: Record<
+ number,
+ {
+ members: number[]; data?: unknown; places?: unknown[]; reservations?: unknown[]; costs?: unknown[];
+ days?: unknown[]; assignments?: unknown[]; packing?: unknown[]; files?: unknown[];
+ /** Default true — model the place_edit / day_edit / trip_edit permission for writes. */
+ canEditCosts?: boolean; canEditPlaces?: boolean; canEditDays?: boolean; canEditTrip?: boolean;
+ }
+ >;
users?: Record<number, unknown>;
/** Optional canned db.query results, keyed by the exact sql string. */
queryResults?: Record<string, unknown[]>;
+ /** The host-bound acting user for costs.* (a job/onLoad has none → refused). */
+ actingUserId?: number;
+ /** Whether the Costs (budget) addon is enabled; gates all costs.* (default true). */
+ budgetAddonEnabled?: boolean;
+ /** Exports of the plugins this one depends on, keyed by plugin id then fn name.
+ * `ctx.plugins.call(id, fn, args)` invokes the matching function; a missing entry
+ * throws RESOURCE_FORBIDDEN (models "not a satisfied dependency / not exported"). */
+ pluginExports?: Record<string, Record<string, (args: unknown) => unknown>>;
}
export interface MockHost {
@@ -25,6 +45,8 @@ export interface MockHost {
calls: { method: string; args: unknown[] }[];
logs: { level: string; msg: string }[];
broadcasts: { kind: 'trip' | 'user'; target: number; event: string; data: unknown }[];
+ /** Events the plugin published via ctx.events.emit, for assertions. */
+ emitted: { name: string; payload: unknown }[];
}
class PermissionDenied extends Error {}
@@ -34,6 +56,7 @@ export function createMockHost(opts: MockHostOptions = {}): MockHost {
const calls: MockHost['calls'] = [];
const logs: MockHost['logs'] = [];
const broadcasts: MockHost['broadcasts'] = [];
+ const emitted: MockHost['emitted'] = [];
const need = (perm: string, method: string) => {
calls.push({ method, args: [] });
@@ -44,6 +67,30 @@ export function createMockHost(opts: MockHostOptions = {}): MockHost {
if (!t || !t.members.includes(asUserId)) throw new Error(`RESOURCE_FORBIDDEN: no access to trip ${tripId}`);
return t;
};
+ const requireBudgetAddon = () => {
+ if (opts.budgetAddonEnabled === false) throw new Error('RESOURCE_FORBIDDEN: the costs addon is disabled');
+ };
+ const requireActingUser = (): number => {
+ if (opts.actingUserId === undefined) throw new Error('RESOURCE_FORBIDDEN: this call requires an authenticated user context');
+ return opts.actingUserId;
+ };
+ const assertEdit = (
+ t: { canEditPlaces?: boolean; canEditDays?: boolean; canEditTrip?: boolean },
+ flag: 'canEditPlaces' | 'canEditDays' | 'canEditTrip',
+ tripId: number,
+ ) => {
+ if (t[flag] === false) throw new Error(`RESOURCE_FORBIDDEN: no permission to edit trip ${tripId}`);
+ };
+ const rows = (arr: unknown[] | undefined): Array<Record<string, unknown>> => (arr ?? []) as Array<Record<string, unknown>>;
+ // In-memory namespaced metadata store for ctx.meta (per mock plugin).
+ const metaStore: Record<string, unknown> = {};
+ const metaKey = (et: string, eid: number, key: string) => `${et}:${eid}:${key}`;
+ const metaGate = (entityType: string, entityId: number) => {
+ // The real host resolves place/day → trip; the mock only membership-checks the
+ // 'trip' entity type and otherwise just requires an acting user.
+ if (entityType === 'trip') assertMember(entityId, requireActingUser());
+ else requireActingUser();
+ };
const ctx: PluginContext = {
id: 'mock-plugin',
@@ -65,21 +112,199 @@ export function createMockHost(opts: MockHostOptions = {}): MockHost {
trips: {
async getById(tripId, asUserId) {
need('db:read:trips', 'trips.getById');
- return assertMember(tripId, asUserId).data ?? null;
+ return (assertMember(tripId, asUserId ?? requireActingUser()).data ?? null) as Trip | null;
},
async getPlaces(tripId, asUserId) {
need('db:read:trips', 'trips.getPlaces');
- return assertMember(tripId, asUserId).places ?? [];
+ return (assertMember(tripId, asUserId ?? requireActingUser()).places ?? []) as Place[];
},
async getReservations(tripId, asUserId) {
need('db:read:trips', 'trips.getReservations');
- return assertMember(tripId, asUserId).reservations ?? [];
+ return (assertMember(tripId, asUserId ?? requireActingUser()).reservations ?? []) as Reservation[];
+ },
+ async update(tripId, input) {
+ need('db:write:trips', 'trips.update');
+ const t = assertMember(tripId, requireActingUser());
+ assertEdit(t, 'canEditTrip', tripId);
+ const data = (t.data ??= {}) as Record<string, unknown>;
+ Object.assign(data, input);
+ return data as Trip;
+ },
+ },
+ packing: {
+ async list(tripId) {
+ need('db:read:packing', 'packing.list');
+ return (assertMember(tripId, requireActingUser()).packing ?? []) as PackingItem[];
+ },
+ },
+ files: {
+ async list(tripId) {
+ need('db:read:files', 'files.list');
+ return (assertMember(tripId, requireActingUser()).files ?? []) as TripFile[];
+ },
+ },
+ costs: {
+ async getByTrip(tripId) {
+ need('db:read:costs', 'costs.getByTrip');
+ requireBudgetAddon();
+ return (assertMember(tripId, requireActingUser()).costs ?? []) as BudgetItem[];
+ },
+ async listMine() {
+ need('db:read:costs', 'costs.listMine');
+ requireBudgetAddon();
+ const uid = requireActingUser();
+ return Object.values(opts.trips ?? {})
+ .filter((t) => t.members.includes(uid))
+ .flatMap((t) => t.costs ?? []) as BudgetItem[];
+ },
+ async create(tripId, input) {
+ need('db:write:costs', 'costs.create');
+ requireBudgetAddon();
+ const t = assertMember(tripId, requireActingUser());
+ if (t.canEditCosts === false) {
+ throw new Error(`RESOURCE_FORBIDDEN: no permission to edit costs on trip ${tripId}`);
+ }
+ const item = { id: (t.costs?.length ?? 0) + 1, trip_id: tripId, ...input };
+ (t.costs ??= []).push(item);
+ return item;
+ },
+ async update(tripId, itemId, input) {
+ need('db:write:costs', 'costs.update');
+ requireBudgetAddon();
+ const t = assertMember(tripId, requireActingUser());
+ if (t.canEditCosts === false) {
+ throw new Error(`RESOURCE_FORBIDDEN: no permission to edit costs on trip ${tripId}`);
+ }
+ const item = rows(t.costs).find((x) => x.id === itemId);
+ if (!item) throw new Error(`RESOURCE_FORBIDDEN: no cost ${itemId} on trip ${tripId}`);
+ Object.assign(item, input);
+ return item as BudgetItem;
+ },
+ async delete(tripId, itemId) {
+ need('db:write:costs', 'costs.delete');
+ requireBudgetAddon();
+ const t = assertMember(tripId, requireActingUser());
+ if (t.canEditCosts === false) {
+ throw new Error(`RESOURCE_FORBIDDEN: no permission to edit costs on trip ${tripId}`);
+ }
+ const list = rows((t.costs ??= []));
+ const i = list.findIndex((x) => x.id === itemId);
+ if (i < 0) throw new Error(`RESOURCE_FORBIDDEN: no cost ${itemId} on trip ${tripId}`);
+ list.splice(i, 1);
+ return { deleted: true };
+ },
+ },
+ places: {
+ async create(tripId, input) {
+ need('db:write:places', 'places.create');
+ const t = assertMember(tripId, requireActingUser());
+ assertEdit(t, 'canEditPlaces', tripId);
+ const place = { id: (t.places?.length ?? 0) + 1, trip_id: tripId, ...input };
+ (t.places ??= []).push(place);
+ return place;
+ },
+ async update(tripId, placeId, input) {
+ need('db:write:places', 'places.update');
+ const t = assertMember(tripId, requireActingUser());
+ assertEdit(t, 'canEditPlaces', tripId);
+ const place = rows(t.places).find((x) => x.id === placeId);
+ if (!place) throw new Error(`RESOURCE_FORBIDDEN: no place ${placeId} on trip ${tripId}`);
+ Object.assign(place, input);
+ return place as Place;
+ },
+ async delete(tripId, placeId) {
+ need('db:write:places', 'places.delete');
+ const t = assertMember(tripId, requireActingUser());
+ assertEdit(t, 'canEditPlaces', tripId);
+ const list = rows((t.places ??= []));
+ const i = list.findIndex((x) => x.id === placeId);
+ if (i < 0) throw new Error(`RESOURCE_FORBIDDEN: no place ${placeId} on trip ${tripId}`);
+ list.splice(i, 1);
+ return { deleted: true };
+ },
+ },
+ days: {
+ async create(tripId, input) {
+ need('db:write:days', 'days.create');
+ const t = assertMember(tripId, requireActingUser());
+ assertEdit(t, 'canEditDays', tripId);
+ const day = { id: (t.days?.length ?? 0) + 1, trip_id: tripId, ...input };
+ (t.days ??= []).push(day);
+ return day;
+ },
+ async update(tripId, dayId, input) {
+ need('db:write:days', 'days.update');
+ const t = assertMember(tripId, requireActingUser());
+ assertEdit(t, 'canEditDays', tripId);
+ const day = rows(t.days).find((x) => x.id === dayId);
+ if (!day) throw new Error(`RESOURCE_FORBIDDEN: no day ${dayId} on trip ${tripId}`);
+ Object.assign(day, input);
+ return day as Day;
+ },
+ async delete(tripId, dayId) {
+ need('db:write:days', 'days.delete');
+ const t = assertMember(tripId, requireActingUser());
+ assertEdit(t, 'canEditDays', tripId);
+ const list = rows((t.days ??= []));
+ const i = list.findIndex((x) => x.id === dayId);
+ if (i < 0) throw new Error(`RESOURCE_FORBIDDEN: no day ${dayId} on trip ${tripId}`);
+ list.splice(i, 1);
+ return { deleted: true };
+ },
+ },
+ itinerary: {
+ async assign(tripId, dayId, placeId, notes) {
+ need('db:write:itinerary', 'itinerary.assign');
+ const t = assertMember(tripId, requireActingUser());
+ assertEdit(t, 'canEditDays', tripId);
+ const assignment = { id: (t.assignments?.length ?? 0) + 1, day_id: dayId, place_id: placeId, notes: notes ?? null };
+ (t.assignments ??= []).push(assignment);
+ return assignment;
+ },
+ async unassign(tripId, assignmentId) {
+ need('db:write:itinerary', 'itinerary.unassign');
+ const t = assertMember(tripId, requireActingUser());
+ assertEdit(t, 'canEditDays', tripId);
+ const list = rows((t.assignments ??= []));
+ const i = list.findIndex((x) => x.id === assignmentId);
+ if (i < 0) throw new Error(`RESOURCE_FORBIDDEN: no assignment ${assignmentId} on trip ${tripId}`);
+ list.splice(i, 1);
+ return { deleted: true };
+ },
+ },
+ meta: {
+ async get(entityType, entityId, key) {
+ need('db:meta', 'meta.get');
+ metaGate(entityType, entityId);
+ return metaStore[metaKey(entityType, entityId, key)] ?? null;
+ },
+ async set(entityType, entityId, key, value) {
+ need('db:meta', 'meta.set');
+ metaGate(entityType, entityId);
+ metaStore[metaKey(entityType, entityId, key)] = value ?? null;
+ return { key, value: value ?? null };
+ },
+ async list(entityType, entityId) {
+ need('db:meta', 'meta.list');
+ metaGate(entityType, entityId);
+ const prefix = `${entityType}:${entityId}:`;
+ const out: Record<string, unknown> = {};
+ for (const k of Object.keys(metaStore)) if (k.startsWith(prefix)) out[k.slice(prefix.length)] = metaStore[k];
+ return out;
+ },
+ async delete(entityType, entityId, key) {
+ need('db:meta', 'meta.delete');
+ metaGate(entityType, entityId);
+ const k = metaKey(entityType, entityId, key);
+ const had = k in metaStore;
+ delete metaStore[k];
+ return { deleted: had };
},
},
users: {
async getById(id) {
need('db:read:users', 'users.getById');
- return opts.users?.[id] ?? null;
+ return (opts.users?.[id] ?? null) as User | null;
},
},
ws: {
@@ -97,7 +322,21 @@ export function createMockHost(opts: MockHostOptions = {}): MockHost {
warn: (msg) => logs.push({ level: 'warn', msg }),
error: (msg) => logs.push({ level: 'error', msg }),
},
+ plugins: {
+ async call(pluginId, fn, args) {
+ calls.push({ method: 'plugins.call', args: [pluginId, fn, args] });
+ const impl = opts.pluginExports?.[pluginId]?.[fn];
+ if (typeof impl !== 'function') throw new Error(`RESOURCE_FORBIDDEN: plugin ${pluginId} does not export "${fn}"`);
+ return impl(args);
+ },
+ },
+ events: {
+ emit(name, payload) {
+ calls.push({ method: 'events.emit', args: [name, payload] });
+ emitted.push({ name, payload });
+ },
+ },
};
- return { ctx, calls, logs, broadcasts };
+ return { ctx, calls, logs, broadcasts, emitted };
}
diff --git a/plugin-sdk/src/ui/kit.ts b/plugin-sdk/src/ui/kit.ts
new file mode 100644
index 000000000..eff2eae83
--- /dev/null
+++ b/plugin-sdk/src/ui/kit.ts
@@ -0,0 +1,335 @@
+/**
+ * The TREK plugin design kit (#plugins).
+ *
+ * A plugin's UI runs in a sandboxed, opaque-origin iframe — it can't load TREK's
+ * stylesheet, only postMessage. So instead of forcing every author to re-derive the
+ * look, we ship it: a token-driven stylesheet (`TREK_UI_CSS`) plus a tiny bootstrap
+ * (`TREK_THEME_JS`) that wires the frame to the host. Both are plain strings, meant
+ * to be INLINED into the plugin's own `client/index.html` (the CSP forbids external
+ * <link>/<script src> for an opaque frame). Authors opt in with a single
+ * `<!-- trek:ui -->` marker; `dev`/`pack` expand it, and `create` seeds it.
+ *
+ * The kit carries its own default values, so a component looks right on first paint,
+ * then the bootstrap overrides the live tokens the host sends (accent scheme, custom
+ * accent, high-contrast, light/dark) so the plugin tracks the app exactly. The glassy
+ * `.trek-dash` layer (the --glass, --r and --sh families) is scoped to the dashboard
+ * in the host, so it can't be read over the bridge — those values are baked here
+ * (they only change
+ * with light/dark, keyed off `[data-theme="dark"]`, not with the accent).
+ *
+ * Nothing here is a security boundary: it is the plugin's own inlined CSS/JS talking
+ * over the existing bridge. It grants no new capability — only a native look.
+ */
+
+/** Marker an author drops in `client/index.html`; `dev`/`pack` replace it with the kit. */
+export const TREK_UI_MARKER = '<!-- trek:ui -->';
+
+/** Token-driven stylesheet. Inline as `<style>${TREK_UI_CSS}</style>`. */
+export const TREK_UI_CSS = `/* TREK plugin design kit — token-driven, matches the host in light + dark. */
+:root {
+ color-scheme: light;
+ /* Live tokens (the host overrides these per theme/accent via the bridge). */
+ --bg-primary: #ffffff; --bg-secondary: #f8fafc; --bg-tertiary: #f1f5f9;
+ --bg-card: #ffffff; --bg-input: #ffffff; --bg-hover: rgba(0,0,0,.03); --bg-selected: #e2e8f0;
+ --text-primary: #111827; --text-secondary: #374151; --text-muted: #6b7280; --text-faint: #9ca3af;
+ --border-primary: #e5e7eb; --border-secondary: #f3f4f6; --border-faint: rgba(0,0,0,.06);
+ --accent: #111827; --accent-text: #ffffff; --accent-hover: #1f2937; --accent-subtle: #f1f5f9;
+ --success: #16a34a; --success-soft: #dcfce7; --danger: #dc2626; --danger-soft: #fef2f2;
+ --warning: #d97706; --warning-soft: #fffbeb; --info: #2563eb; --info-soft: #eff6ff;
+ --shadow-card: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
+ --shadow-sm: 0 1px 2px rgba(0,0,0,.05); --shadow-md: 0 4px 12px rgba(0,0,0,.08);
+ --shadow-lg: 0 12px 32px rgba(0,0,0,.12);
+ --radius-sm: 8px; --radius-md: 12px; --radius-lg: 16px; --radius-xl: 20px;
+ --font-system: 'Poppins', -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', system-ui, sans-serif;
+ /* Baked glass layer (mirrors the host's .trek-dash; not sent over the bridge). */
+ --glass-bg: linear-gradient(135deg, oklch(1 0 0 / .72) 0%, oklch(0.99 0.006 75 / .5) 100%);
+ --glass-border: oklch(0.88 0.008 70 / .7);
+ --glass-shadow: 0 1px 2px oklch(0.4 0.02 60 / .05), 0 12px 32px -14px oklch(0.3 0.02 60 / .2);
+ --glass-shadow-hover: 0 2px 6px oklch(0.4 0.02 60 / .07), 0 26px 56px -20px oklch(0.25 0.04 60 / .32);
+ --glass-highlight: inset 0 1px 0 oklch(1 0 0 / .8);
+ --glass-blur: blur(22px) saturate(1.7);
+ --r-sm: 14px; --r-md: 18px; --r-lg: 22px; --r-xl: 28px;
+ /* The house easings: a punchy card curve and TREK's ease-out-quint. */
+ --trek-ease: cubic-bezier(.2,.7,.2,1);
+ --trek-ease-quint: cubic-bezier(.23,1,.32,1);
+}
+[data-theme="dark"] {
+ color-scheme: dark;
+ --bg-primary: #121215; --bg-secondary: #1a1a1e; --bg-tertiary: #1c1c21;
+ --bg-card: #131316; --bg-input: #1c1c21; --bg-hover: rgba(255,255,255,.06); --bg-selected: rgba(255,255,255,.1);
+ --text-primary: #f4f4f5; --text-secondary: #d4d4d8; --text-muted: #a1a1aa; --text-faint: #71717a;
+ --border-primary: #27272a; --border-secondary: #1c1c21; --border-faint: rgba(255,255,255,.07);
+ --accent: #e4e4e7; --accent-text: #09090b; --accent-hover: #d4d4d8; --accent-subtle: rgba(255,255,255,.08);
+ --success: #22c55e; --success-soft: rgba(34,197,94,.15); --danger: #ef4444; --danger-soft: rgba(239,68,68,.15);
+ --warning: #f59e0b; --warning-soft: rgba(245,158,11,.15); --info: #3b82f6; --info-soft: rgba(59,130,246,.15);
+ --shadow-card: 0 1px 3px rgba(0,0,0,.4), 0 1px 2px rgba(0,0,0,.3);
+ --shadow-sm: 0 1px 2px rgba(0,0,0,.3); --shadow-md: 0 4px 12px rgba(0,0,0,.4);
+ --shadow-lg: 0 12px 32px rgba(0,0,0,.5);
+ --glass-bg: linear-gradient(135deg, oklch(0.31 0 0 / .58) 0%, oklch(0.25 0 0 / .42) 100%);
+ --glass-border: oklch(1 0 0 / .1);
+ --glass-shadow: 0 1px 2px oklch(0 0 0 / .3), 0 12px 32px -14px oklch(0 0 0 / .55);
+ --glass-shadow-hover: 0 2px 6px oklch(0 0 0 / .4), 0 26px 56px -20px oklch(0 0 0 / .72);
+ --glass-highlight: inset 0 1px 0 oklch(1 0 0 / .09);
+}
+
+/* Base: a light reset + native type. The bootstrap adds \`trek-ui\` to <body>. */
+*, *::before, *::after { box-sizing: border-box; }
+body.trek-ui {
+ margin: 0;
+ font-family: var(--font-system);
+ font-size: 14px;
+ line-height: 1.5;
+ color: var(--text-primary);
+ background: transparent;
+ -webkit-font-smoothing: antialiased;
+ -moz-osx-font-smoothing: grayscale;
+}
+.trek-ui :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
+
+/* Cards + panels ----------------------------------------------------------- */
+.trek-card {
+ background: var(--bg-card);
+ border: 1px solid var(--border-primary);
+ border-radius: var(--radius-lg);
+ box-shadow: var(--shadow-card);
+ padding: 16px;
+}
+.trek-glass {
+ background: var(--glass-bg);
+ border: 1px solid var(--glass-border);
+ border-radius: var(--r-xl);
+ box-shadow: var(--glass-shadow), var(--glass-highlight);
+ -webkit-backdrop-filter: var(--glass-blur);
+ backdrop-filter: var(--glass-blur);
+ padding: 24px 26px;
+}
+/* Add to a card/glass to make it lift on hover, like a native tool tile. */
+.trek-interactive {
+ transition: transform .3s var(--trek-ease), box-shadow .3s, border-color .3s;
+ cursor: pointer;
+}
+.trek-glass.trek-interactive:hover {
+ transform: translateY(-2px);
+ box-shadow: var(--glass-shadow-hover), var(--glass-highlight);
+}
+.trek-card.trek-interactive:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
+.trek-interactive:active { transform: translateY(0); }
+
+/* Buttons ------------------------------------------------------------------ */
+.trek-btn {
+ display: inline-flex; align-items: center; justify-content: center; gap: 8px;
+ padding: 10px 16px; border-radius: 12px;
+ font: inherit; font-size: 14px; font-weight: 500; line-height: 1;
+ border: 1px solid transparent; cursor: pointer; text-decoration: none; white-space: nowrap;
+ transition: transform .08s var(--trek-ease-quint), background .15s, box-shadow .15s, border-color .15s, color .15s;
+}
+.trek-btn:active { transform: scale(.97); }
+.trek-btn:disabled { opacity: .5; cursor: not-allowed; }
+.trek-btn--primary { background: var(--accent); color: var(--accent-text); box-shadow: var(--shadow-sm); }
+.trek-btn--primary:hover:not(:disabled) { background: var(--accent-hover); }
+.trek-btn--secondary { background: var(--bg-card); color: var(--text-primary); border-color: var(--border-primary); box-shadow: var(--shadow-sm); }
+.trek-btn--secondary:hover:not(:disabled) { background: var(--bg-hover); }
+.trek-btn--ghost { background: transparent; color: var(--text-secondary); }
+.trek-btn--ghost:hover:not(:disabled) { background: var(--bg-hover); color: var(--text-primary); }
+.trek-btn--danger { background: var(--danger); color: #fff; }
+.trek-btn--danger:hover:not(:disabled) { filter: brightness(1.05); }
+
+/* Form controls ------------------------------------------------------------ */
+.trek-input, .trek-textarea, .trek-select {
+ width: 100%; box-sizing: border-box;
+ padding: 8px 14px; border-radius: 10px;
+ border: 1px solid var(--border-primary); background: var(--bg-input); color: var(--text-primary);
+ font: inherit; font-size: 13px; outline: none;
+ transition: border-color .15s, box-shadow .15s, background .15s;
+}
+.trek-textarea { resize: vertical; min-height: 72px; }
+.trek-input::placeholder, .trek-textarea::placeholder { color: var(--text-faint); }
+.trek-input:focus, .trek-textarea:focus, .trek-select:focus {
+ border-color: var(--accent);
+ box-shadow: 0 0 0 3px color-mix(in oklch, var(--accent) 22%, transparent);
+}
+.trek-label { display: block; font-size: 12px; font-weight: 600; color: var(--text-secondary); margin-bottom: 6px; }
+
+/* Chips + badges ----------------------------------------------------------- */
+.trek-chip {
+ display: inline-flex; align-items: center; gap: 6px;
+ padding: 4px 10px; border-radius: 999px;
+ font-size: 12px; font-weight: 600; white-space: nowrap;
+ color: var(--text-secondary); background: var(--accent-subtle);
+}
+.trek-chip--accent { color: var(--accent); background: color-mix(in oklch, var(--accent) 12%, transparent); }
+.trek-chip--success { color: var(--success); background: var(--success-soft); }
+.trek-chip--danger { color: var(--danger); background: var(--danger-soft); }
+.trek-chip--warning { color: var(--warning); background: var(--warning-soft); }
+.trek-chip--info { color: var(--info); background: var(--info-soft); }
+
+/* Rows + text helpers ------------------------------------------------------ */
+.trek-row {
+ display: flex; align-items: center; gap: 12px;
+ padding: 10px 12px; border-radius: 12px; cursor: pointer;
+ transition: background .12s;
+}
+.trek-row:hover { background: var(--bg-hover); }
+.trek-title { font-size: 13px; font-weight: 500; text-transform: uppercase; letter-spacing: .14em; color: var(--text-muted); }
+.trek-muted { color: var(--text-muted); }
+.trek-faint { color: var(--text-faint); }
+
+/* Layout helpers ----------------------------------------------------------- */
+.trek-stack { display: flex; flex-direction: column; gap: 12px; }
+.trek-cluster { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
+
+/* Accessibility: mirror the host's own graceful-degrade rules. -------------- */
+[data-no-transparency] .trek-glass {
+ background: var(--bg-card); border-color: var(--border-primary);
+ box-shadow: var(--shadow-card);
+ -webkit-backdrop-filter: none; backdrop-filter: none;
+}
+[data-reduce-motion] .trek-interactive,
+[data-reduce-motion] .trek-btn,
+[data-reduce-motion] .trek-row { transition: none; }
+[data-reduce-motion] .trek-interactive:hover,
+[data-reduce-motion] .trek-btn:active { transform: none; }
+@media (prefers-reduced-motion: reduce) {
+ .trek-interactive, .trek-btn, .trek-row, .trek-input, .trek-textarea, .trek-select { transition: none; }
+ .trek-interactive:hover, .trek-btn:active { transform: none; }
+}`;
+
+/**
+ * The bridge bootstrap. Inline as `<script>${TREK_THEME_JS}</script>` (typically via
+ * the `<!-- trek:ui -->` marker). It: announces readiness; applies the host's theme
+ * tokens, theme name and appearance flags to the document; auto-reports its height so
+ * a widget/page self-sizes; and installs a small `window.trek` helper over the same
+ * bridge messages the host already understands — it adds no new capability.
+ */
+export const TREK_THEME_JS = `(function () {
+ 'use strict';
+ var docEl = document.documentElement;
+ var ctxHandlers = [];
+ var lastCtx = null;
+ var pending = {};
+ var seq = 0;
+ var lastH = -1;
+
+ function send(msg) { try { window.parent.postMessage(msg, '*'); } catch (e) {} }
+ function setFlag(name, on) { if (on) { docEl.setAttribute(name, ''); } else { docEl.removeAttribute(name); } }
+
+ function applyContext(m) {
+ if (m.theme) { docEl.setAttribute('data-theme', m.theme); }
+ var t = m.tokens || {};
+ for (var k in t) {
+ if (Object.prototype.hasOwnProperty.call(t, k) && t[k]) { docEl.style.setProperty(k, t[k]); }
+ }
+ var a = m.appearance || {};
+ setFlag('data-reduce-motion', a.reducedMotion);
+ setFlag('data-no-transparency', a.noTransparency);
+ if (a.density) { docEl.setAttribute('data-density', a.density); }
+ if (a.scheme) { docEl.setAttribute('data-scheme', a.scheme); }
+ if (document.body) { document.body.classList.add('trek-ui'); }
+ }
+
+ function reportHeight() {
+ var h = Math.ceil(document.documentElement.scrollHeight);
+ if (h > 0 && h !== lastH) { lastH = h; send({ type: 'trek:resize', height: h }); }
+ }
+
+ window.addEventListener('message', function (ev) {
+ // Opaque frame: origin serialises to 'null', so trust the SENDER — only our real
+ // parent window. Never act on a claimed id or on origin.
+ if (ev.source !== window.parent) { return; }
+ var m = ev.data;
+ if (!m || typeof m !== 'object') { return; }
+ if (m.type === 'trek:context') {
+ lastCtx = m; api.context = m;
+ applyContext(m);
+ for (var i = 0; i < ctxHandlers.length; i++) { try { ctxHandlers[i](m); } catch (e) {} }
+ reportHeight();
+ } else if (m.type === 'trek:response') {
+ var p = pending[m.requestId];
+ if (p) { delete pending[m.requestId]; p.resolve(m.data); }
+ } else if (m.type === 'trek:error') {
+ var q = pending[m.requestId];
+ if (q) { delete pending[m.requestId]; var err = new Error(m.message || 'invoke failed'); err.code = m.code; q.reject(err); }
+ }
+ });
+
+ // Native DOM helpers so a widget can build kit-styled UI with no bundler and no
+ // hand-written CSS — every element carries the same trek-* classes the kit ships.
+ function mkEl(tag, props, children) {
+ var node = document.createElement(tag);
+ props = props || {};
+ for (var k in props) {
+ if (!Object.prototype.hasOwnProperty.call(props, k)) { continue; }
+ var v = props[k];
+ if (v == null) { continue; }
+ if (k === 'class' || k === 'className') { node.className = v; }
+ else if (k === 'text') { node.textContent = v; }
+ else if (k === 'html') { node.innerHTML = v; }
+ else if (k === 'on') { for (var ev in v) { if (Object.prototype.hasOwnProperty.call(v, ev)) { node.addEventListener(ev, v[ev]); } } }
+ else { node.setAttribute(k, v); }
+ }
+ var kids = children == null ? [] : (typeof children === 'string' || children.nodeType ? [children] : children);
+ for (var i = 0; i < kids.length; i++) {
+ var c = kids[i];
+ if (c == null) { continue; }
+ node.appendChild(typeof c === 'string' ? document.createTextNode(c) : c);
+ }
+ return node;
+ }
+ var ui = {
+ el: mkEl,
+ button: function (label, opts) {
+ opts = opts || {};
+ return mkEl('button', { class: 'trek-btn' + (opts.variant ? ' trek-btn--' + opts.variant : ''), type: 'button', text: label, on: opts.onClick ? { click: opts.onClick } : null }, null);
+ },
+ card: function (children) { return mkEl('div', { class: 'trek-card' }, children); },
+ chip: function (text, variant) { return mkEl('span', { class: 'trek-chip' + (variant ? ' trek-chip--' + variant : ''), text: text }, null); },
+ input: function (opts) { opts = opts || {}; return mkEl('input', { class: 'trek-input', type: opts.type || 'text', placeholder: opts.placeholder || '', value: opts.value || '' }, null); },
+ mount: function (node, target) { (target || document.body).appendChild(node); return node; }
+ };
+
+ var api = {
+ context: null,
+ ui: ui,
+ ready: function () { send({ type: 'trek:ready' }); },
+ requestContext: function () { send({ type: 'trek:context:request' }); },
+ onContext: function (cb) {
+ ctxHandlers.push(cb);
+ if (lastCtx) { try { cb(lastCtx); } catch (e) {} }
+ return function () { var i = ctxHandlers.indexOf(cb); if (i >= 0) { ctxHandlers.splice(i, 1); } };
+ },
+ notify: function (level, message) { send({ type: 'trek:notify', level: level, message: message }); },
+ navigate: function (to) { send({ type: 'trek:navigate', to: to }); },
+ resize: function (px) { var h = px | 0; if (h > 0) { lastH = h; send({ type: 'trek:resize', height: h }); } },
+ invoke: function (sub, opts) {
+ opts = opts || {};
+ var id = 'r' + (++seq);
+ return new Promise(function (resolve, reject) {
+ pending[id] = { resolve: resolve, reject: reject };
+ send({ type: 'trek:invoke', requestId: id, sub: sub, method: opts.method, body: opts.body });
+ });
+ }
+ };
+ window.trek = api;
+
+ function boot() {
+ if (document.body) { document.body.classList.add('trek-ui'); }
+ api.ready();
+ reportHeight();
+ if (typeof ResizeObserver !== 'undefined' && document.body) {
+ new ResizeObserver(reportHeight).observe(document.body);
+ }
+ }
+ if (document.readyState === 'loading') { document.addEventListener('DOMContentLoaded', boot); } else { boot(); }
+})();`;
+
+/**
+ * Replace the `<!-- trek:ui -->` marker in a plugin's HTML with the inlined kit
+ * (style + bootstrap). A no-op when the marker is absent, so it is safe to run over
+ * any HTML. The source file on disk is never touched — the expansion happens at
+ * dev-serve / pack time, so an author's `client/index.html` stays a one-line opt-in.
+ */
+export function injectTrekUi(html: string): string {
+ if (!html.includes(TREK_UI_MARKER)) return html;
+ const block = `<style data-trek-ui>\n${TREK_UI_CSS}\n</style>\n<script data-trek-ui>\n${TREK_THEME_JS}\n</script>`;
+ return html.split(TREK_UI_MARKER).join(block);
+}
diff --git a/plugin-sdk/test/cli.test.ts b/plugin-sdk/test/cli.test.ts
new file mode 100644
index 000000000..6e6728db9
--- /dev/null
+++ b/plugin-sdk/test/cli.test.ts
@@ -0,0 +1,122 @@
+import { describe, it, expect, beforeEach, afterEach } from 'vitest';
+import fs from 'node:fs';
+import os from 'node:os';
+import path from 'node:path';
+import { validateManifest } from '../src/index.js';
+import { scaffold } from '../src/cli/create.js';
+import { PERMISSION_CATALOG, KNOWN_PERMISSIONS, isInteractive, missingArgs } from '../src/cli/ui.js';
+import { resolveMenuChoice, PRIMARY_MENU, ADVANCED_MENU } from '../src/cli/menu.js';
+
+describe('scaffold egress (http:outbound)', () => {
+ let tmp: string;
+ beforeEach(() => { tmp = fs.mkdtempSync(path.join(os.tmpdir(), 'egress-')); });
+ afterEach(() => { fs.rmSync(tmp, { recursive: true, force: true }); });
+
+ it('writes egress so an http:outbound plugin validates', () => {
+ scaffold('net-plug', 'integration', tmp, { permissions: ['http:outbound'], egress: ['api.example.com'] });
+ const m = JSON.parse(fs.readFileSync(path.join(tmp, 'net-plug', 'trek-plugin.json'), 'utf8'));
+ expect(m.egress).toEqual(['api.example.com']);
+ expect(validateManifest(m).ok).toBe(true);
+ });
+
+ it('without egress the same manifest is invalid — which the wizard now prevents', () => {
+ scaffold('net-plug', 'integration', tmp, { permissions: ['http:outbound'] });
+ const m = JSON.parse(fs.readFileSync(path.join(tmp, 'net-plug', 'trek-plugin.json'), 'utf8'));
+ expect(m.egress).toBeUndefined();
+ expect(validateManifest(m).ok).toBe(false); // http:outbound requires an egress allow-list
+ });
+
+ it('omits egress entirely when none is given (no empty array noise)', () => {
+ scaffold('plain-plug', 'integration', tmp, { permissions: ['db:own'] });
+ const m = JSON.parse(fs.readFileSync(path.join(tmp, 'plain-plug', 'trek-plugin.json'), 'utf8'));
+ expect('egress' in m).toBe(false);
+ });
+});
+
+describe('permission catalog', () => {
+ it('covers exactly the known permission ids (none lost in the move to ui.ts)', () => {
+ expect(KNOWN_PERMISSIONS).toEqual([
+ 'db:own', 'db:read:trips', 'db:read:users', 'db:read:costs', 'db:write:costs',
+ 'db:write:places', 'db:write:days', 'db:write:itinerary', 'db:write:trips',
+ 'db:meta',
+ 'ws:broadcast:trip', 'ws:broadcast:user',
+ 'hook:photo-provider', 'hook:calendar-source', 'hook:place-detail-provider', 'hook:trip-warning-provider', 'http:outbound',
+ ]);
+ for (const p of PERMISSION_CATALOG) expect(p.hint.length).toBeGreaterThan(0); // every option is described
+ });
+});
+
+describe('resolveMenuChoice', () => {
+ it('maps every menu value (commands + control entries) to itself', () => {
+ for (const item of [...PRIMARY_MENU, ...ADVANCED_MENU]) {
+ expect(resolveMenuChoice(item.value)).toBe(item.value);
+ }
+ });
+ it('returns undefined for anything not in the menu', () => {
+ expect(resolveMenuChoice('nope')).toBeUndefined();
+ expect(resolveMenuChoice('')).toBeUndefined();
+ });
+});
+
+describe('missingArgs', () => {
+ it('reports the absent required flags, in order', () => {
+ expect(missingArgs({}, ['repo', 'tag'])).toEqual(['repo', 'tag']);
+ expect(missingArgs({ repo: 'a/b' }, ['repo', 'tag'])).toEqual(['tag']);
+ expect(missingArgs({ repo: 'a/b', tag: 'v1.0.0' }, ['repo', 'tag'])).toEqual([]);
+ });
+});
+
+describe('isInteractive', () => {
+ it('is false when stdin/stdout are not TTYs (CI / pipes — the parity path)', () => {
+ const inTTY = process.stdin.isTTY;
+ const outTTY = process.stdout.isTTY;
+ try {
+ (process.stdin as { isTTY?: boolean }).isTTY = undefined;
+ (process.stdout as { isTTY?: boolean }).isTTY = undefined;
+ expect(isInteractive()).toBe(false);
+ (process.stdin as { isTTY?: boolean }).isTTY = true;
+ (process.stdout as { isTTY?: boolean }).isTTY = true;
+ expect(isInteractive()).toBe(true);
+ } finally {
+ (process.stdin as { isTTY?: boolean }).isTTY = inTTY;
+ (process.stdout as { isTTY?: boolean }).isTTY = outTTY;
+ }
+ });
+});
+
+describe('scaffold + validate dependencies', () => {
+ let tmp: string;
+ beforeEach(() => { tmp = fs.mkdtempSync(path.join(os.tmpdir(), 'deps-')); });
+ afterEach(() => { fs.rmSync(tmp, { recursive: true, force: true }); });
+
+ it('scaffolds empty dependency arrays that validate', () => {
+ scaffold('dep-plug', 'integration', tmp, { permissions: ['db:own'] });
+ const m = JSON.parse(fs.readFileSync(path.join(tmp, 'dep-plug', 'trek-plugin.json'), 'utf8'));
+ expect(m.requiredAddons).toEqual([]);
+ expect(m.pluginDependencies).toEqual([]);
+ expect(validateManifest(m).ok).toBe(true);
+ });
+
+ it('scaffolds requiredAddons passed as an option', () => {
+ scaffold('addon-plug', 'integration', tmp, { permissions: ['db:own'], requiredAddons: ['budget'] });
+ const m = JSON.parse(fs.readFileSync(path.join(tmp, 'addon-plug', 'trek-plugin.json'), 'utf8'));
+ expect(m.requiredAddons).toEqual(['budget']);
+ expect(validateManifest(m).ok).toBe(true);
+ });
+});
+
+describe('validateManifest dependency rules', () => {
+ const base = { id: 'my-plug', name: 'My Plug', version: '1.0.0', type: 'integration', permissions: ['db:own'] };
+ it('accepts valid requiredAddons + pluginDependencies', () => {
+ const r = validateManifest({ ...base, requiredAddons: ['budget', 'journey'], pluginDependencies: [{ id: 'koffi', version: '>=1.0.0 <2.0.0' }] });
+ expect(r.ok).toBe(true);
+ expect(r.manifest?.requiredAddons).toEqual(['budget', 'journey']);
+ expect(r.manifest?.pluginDependencies).toEqual([{ id: 'koffi', version: '>=1.0.0 <2.0.0' }]);
+ });
+ it('rejects a bad addon id, bad dep range, self-dependency, and duplicates', () => {
+ expect(validateManifest({ ...base, requiredAddons: ['Nope!'] }).ok).toBe(false);
+ expect(validateManifest({ ...base, pluginDependencies: [{ id: 'koffi', version: 'nope' }] }).ok).toBe(false);
+ expect(validateManifest({ ...base, pluginDependencies: [{ id: 'my-plug', version: '*' }] }).ok).toBe(false);
+ expect(validateManifest({ ...base, pluginDependencies: [{ id: 'koffi', version: '*' }, { id: 'koffi', version: '^1' }] }).ok).toBe(false);
+ });
+});
diff --git a/plugin-sdk/test/sdk.test.ts b/plugin-sdk/test/sdk.test.ts
index eadf27fed..1e6978dd7 100644
--- a/plugin-sdk/test/sdk.test.ts
+++ b/plugin-sdk/test/sdk.test.ts
@@ -87,6 +87,81 @@ describe('createMockHost', () => {
ctx.log.info('hi');
expect(logs).toEqual([{ level: 'info', msg: 'hi' }]);
});
+
+ it('gates costs reads/writes on the grant, addon, membership and edit permission', async () => {
+ const { ctx } = createMockHost({
+ grants: ['db:read:costs', 'db:write:costs'],
+ actingUserId: 42,
+ trips: {
+ 1: { members: [42], costs: [{ id: 5, name: 'Hotel' }] },
+ 2: { members: [42], costs: [{ id: 6, name: 'Food' }], canEditCosts: false },
+ },
+ });
+ // read: trip-scoped + cross-trip aggregate
+ expect(await ctx.costs.getByTrip(1)).toEqual([{ id: 5, name: 'Hotel' }]);
+ expect(await ctx.costs.listMine()).toEqual([{ id: 5, name: 'Hotel' }, { id: 6, name: 'Food' }]);
+ // write: allowed where the user may edit, refused where they may not
+ expect(await ctx.costs.create(1, { name: 'Taxi' })).toMatchObject({ trip_id: 1, name: 'Taxi' });
+ await expect(ctx.costs.create(2, { name: 'Nope' })).rejects.toThrow(/RESOURCE_FORBIDDEN/);
+ // update: edits an existing item where allowed, refused without edit permission
+ expect(await ctx.costs.update(1, 5, { name: 'Hostel' })).toMatchObject({ id: 5, name: 'Hostel' });
+ await expect(ctx.costs.update(2, 6, { name: 'Nope' })).rejects.toThrow(/RESOURCE_FORBIDDEN/);
+ // update: a missing item is refused
+ await expect(ctx.costs.update(1, 999, { name: 'X' })).rejects.toThrow(/RESOURCE_FORBIDDEN/);
+ // delete: removes where allowed, refused without edit permission / when missing
+ expect(await ctx.costs.delete(1, 5)).toEqual({ deleted: true });
+ await expect(ctx.costs.delete(2, 6)).rejects.toThrow(/RESOURCE_FORBIDDEN/);
+ await expect(ctx.costs.delete(1, 999)).rejects.toThrow(/RESOURCE_FORBIDDEN/);
+ });
+
+ it('gates planner writes (places/days/itinerary/trips) on grant, membership and edit permission', async () => {
+ const { ctx } = createMockHost({
+ grants: ['db:write:places', 'db:write:days', 'db:write:itinerary', 'db:write:trips'],
+ actingUserId: 42,
+ trips: {
+ 1: { members: [42], data: { id: 1, title: 'Japan' } },
+ 2: { members: [42], canEditPlaces: false },
+ },
+ });
+ // create + assign on a trip the user may edit
+ const place = await ctx.places.create(1, { name: 'Fushimi Inari' });
+ expect(place).toMatchObject({ trip_id: 1, name: 'Fushimi Inari' });
+ const day = await ctx.days.create(1, { notes: 'Day 1' });
+ expect(await ctx.itinerary.assign(1, (day as { id: number }).id, (place as { id: number }).id))
+ .toMatchObject({ day_id: (day as { id: number }).id });
+ expect(await ctx.trips.update(1, { title: 'Renamed' })).toMatchObject({ title: 'Renamed' });
+ // refused where the user may not edit
+ await expect(ctx.places.create(2, { name: 'Nope' })).rejects.toThrow(/RESOURCE_FORBIDDEN/);
+ });
+
+ it('refuses a planner write without the matching write scope', async () => {
+ const { ctx } = createMockHost({ grants: ['db:read:trips'], actingUserId: 42, trips: { 1: { members: [42] } } });
+ await expect(ctx.places.create(1, { name: 'X' })).rejects.toThrow(/PERMISSION_DENIED/);
+ });
+
+ it('ctx.meta stores/reads/lists/deletes namespaced metadata, gated on db:meta', async () => {
+ const { ctx } = createMockHost({ grants: ['db:meta'], actingUserId: 42, trips: { 1: { members: [42] } } });
+ await ctx.meta.set('trip', 1, 'rating', 5);
+ expect(await ctx.meta.get('trip', 1, 'rating')).toBe(5);
+ expect(await ctx.meta.list('trip', 1)).toEqual({ rating: 5 });
+ expect(await ctx.meta.delete('trip', 1, 'rating')).toEqual({ deleted: true });
+ expect(await ctx.meta.get('trip', 1, 'rating')).toBe(null);
+ const ungranted = createMockHost({ grants: [], actingUserId: 42, trips: { 1: { members: [42] } } });
+ await expect(ungranted.ctx.meta.get('trip', 1, 'x')).rejects.toThrow(/PERMISSION_DENIED/);
+ });
+
+ it('refuses costs when the permission is missing or the addon is disabled', async () => {
+ const ungranted = createMockHost({ grants: [], actingUserId: 42, trips: { 1: { members: [42] } } });
+ await expect(ungranted.ctx.costs.getByTrip(1)).rejects.toThrow(/PERMISSION_DENIED/);
+
+ const addonOff = createMockHost({
+ grants: ['db:read:costs'],
+ actingUserId: 42,
+ budgetAddonEnabled: false,
+ trips: { 1: { members: [42], costs: [] } },
+ });
+ await expect(addonOff.ctx.costs.getByTrip(1)).rejects.toThrow(/RESOURCE_FORBIDDEN/);
+ });
});
describe('scaffold + validate CLIs', () => {
@@ -106,6 +181,33 @@ describe('scaffold + validate CLIs', () => {
expect(r.warnings.some((w) => /placeholder|screenshot/.test(w))).toBe(true); // README is the unfilled template
});
+ it('scaffolds a client that opts into the design kit via the marker (source stays one line)', () => {
+ scaffold('kit-plug', 'widget', tmp);
+ const html = fs.readFileSync(path.join(tmp, 'kit-plug', 'client', 'index.html'), 'utf8');
+ expect(html).toContain('<!-- trek:ui -->'); // the one-line opt-in
+ expect(html).toContain('trek.onContext'); // uses the bridge the marker installs
+ expect(html).not.toContain('--glass-bg'); // kit is NOT pre-inlined in the source
+ });
+
+ it('scaffolds a trip-page plugin (a tab inside the trip) with a client UI', () => {
+ scaffold('trip-diary', 'trip-page', tmp);
+ const dir = path.join(tmp, 'trip-diary');
+ const m = JSON.parse(fs.readFileSync(path.join(dir, 'trek-plugin.json'), 'utf8'));
+ expect(m.type).toBe('trip-page');
+ expect(fs.existsSync(path.join(dir, 'client', 'index.html'))).toBe(true); // non-integration → gets a UI
+ expect(validatePluginDir(dir).ok).toBe(true);
+ });
+
+ it('pack expands the design-kit marker into the archived client HTML', () => {
+ scaffold('kit-plug', 'widget', tmp);
+ const out = path.join(tmp, 'kit-plug.zip');
+ packPluginDir(path.join(tmp, 'kit-plug'), out);
+ const html = readZip(fs.readFileSync(out))['client/index.html'].toString('utf8');
+ expect(html).not.toContain('<!-- trek:ui -->'); // expanded away
+ expect(html).toContain('.trek-glass'); // kit CSS inlined
+ expect(html).toContain('window.trek'); // bridge inlined
+ });
+
it('scaffolds a CommonJS package.json with the SDK as a devDependency only', () => {
scaffold('my-widget', 'widget', tmp);
const pkg = JSON.parse(fs.readFileSync(path.join(tmp, 'my-widget', 'package.json'), 'utf8'));
@@ -344,3 +446,38 @@ describe('sign + keygen (author signatures, TOFU)', () => {
expect(() => buildEntry({ dir: koffi, repo: 'mauriceboe/trek-plugin-koffi', tag: 'v1.1.0', zipPath: out, commit: 'a'.repeat(40), mergePath: existingPath, signKeyPath: key2, now: '2026-07-04T00:00:00.000Z' })).toThrow(/differs from the one already published/);
});
});
+
+describe('mock-host inter-plugin (plugins.call + events.emit)', () => {
+ it('calls a configured dependency export and records the call', async () => {
+ const { ctx, calls } = createMockHost({
+ pluginExports: { 'dep-lib': { greet: (args: any) => ({ hi: args?.who }) } },
+ });
+ const r = await ctx.plugins.call('dep-lib', 'greet', { who: 'ada' });
+ expect(r).toEqual({ hi: 'ada' });
+ expect(calls.some((c) => c.method === 'plugins.call')).toBe(true);
+ });
+
+ it('throws RESOURCE_FORBIDDEN calling an export that is not configured', async () => {
+ const { ctx } = createMockHost({ pluginExports: { 'dep-lib': {} } });
+ await expect(ctx.plugins.call('dep-lib', 'nope', {})).rejects.toThrow(/RESOURCE_FORBIDDEN/);
+ await expect(ctx.plugins.call('other', 'greet', {})).rejects.toThrow(/RESOURCE_FORBIDDEN/);
+ });
+
+ it('records emitted events', () => {
+ const { ctx, emitted } = createMockHost({});
+ ctx.events.emit('rate.updated', { pair: 'USD/EUR' });
+ expect(emitted).toEqual([{ name: 'rate.updated', payload: { pair: 'USD/EUR' } }]);
+ });
+});
+
+describe('validateManifest capabilities.provides/emits', () => {
+ const base = { id: 'my-plug', name: 'My Plug', version: '1.0.0', type: 'integration', permissions: ['db:own'] };
+ it('accepts well-formed provides + emits', () => {
+ const r = validateManifest({ ...base, capabilities: { provides: ['computeRate'], emits: ['rate.updated'] } });
+ expect(r.ok).toBe(true);
+ });
+ it('rejects a malformed export/event name and a non-array', () => {
+ expect(validateManifest({ ...base, capabilities: { provides: ['bad name!'] } }).ok).toBe(false);
+ expect(validateManifest({ ...base, capabilities: { emits: 'nope' } }).ok).toBe(false);
+ });
+});
diff --git a/plugin-sdk/test/ui-kit.test.ts b/plugin-sdk/test/ui-kit.test.ts
new file mode 100644
index 000000000..a3bd09bf6
--- /dev/null
+++ b/plugin-sdk/test/ui-kit.test.ts
@@ -0,0 +1,56 @@
+import { describe, it, expect } from 'vitest';
+import { TREK_UI_CSS, TREK_THEME_JS, TREK_UI_MARKER, injectTrekUi } from '../src/index.js';
+
+describe('design kit', () => {
+ it('ships a token-driven stylesheet with the signature TREK components', () => {
+ // Components an author leans on.
+ for (const cls of ['.trek-card', '.trek-glass', '.trek-btn', '.trek-input', '.trek-chip', '.trek-row']) {
+ expect(TREK_UI_CSS).toContain(cls);
+ }
+ // The glass recipe is baked (it can't be read over the bridge) and swaps for dark.
+ expect(TREK_UI_CSS).toContain('--glass-bg');
+ expect(TREK_UI_CSS).toContain('--glass-highlight');
+ expect(TREK_UI_CSS).toContain('[data-theme="dark"]');
+ // Honours the same accessibility choices as the host.
+ expect(TREK_UI_CSS).toContain('prefers-reduced-motion');
+ expect(TREK_UI_CSS).toContain('[data-no-transparency]');
+ });
+
+ it('ships a bootstrap that wires the frame and never breaks inline embedding', () => {
+ expect(TREK_THEME_JS).toContain("type: 'trek:ready'");
+ expect(TREK_THEME_JS).toContain('window.trek');
+ expect(TREK_THEME_JS).toContain("'trek:context'");
+ // Applies the host tokens + theme to the document.
+ expect(TREK_THEME_JS).toContain('setProperty');
+ expect(TREK_THEME_JS).toContain("setAttribute('data-theme'");
+ // Auto-sizing so a widget/page reports its own height.
+ expect(TREK_THEME_JS).toContain('trek:resize');
+ // Trusts only the real parent window (opaque frame has a 'null' origin).
+ expect(TREK_THEME_JS).toContain('ev.source !== window.parent');
+ });
+
+ it('never contains a closing tag that would break <style>/<script> inlining', () => {
+ expect(TREK_UI_CSS.toLowerCase()).not.toContain('</style');
+ expect(TREK_UI_CSS.toLowerCase()).not.toContain('</script');
+ expect(TREK_THEME_JS.toLowerCase()).not.toContain('</script');
+ expect(TREK_THEME_JS.toLowerCase()).not.toContain('</style');
+ });
+
+ it('injectTrekUi expands the marker into an inline style + script block', () => {
+ const html = `<!doctype html><html><head></head><body>${TREK_UI_MARKER}</body></html>`;
+ const out = injectTrekUi(html);
+ expect(out).not.toContain(TREK_UI_MARKER);
+ expect(out).toContain('<style data-trek-ui>');
+ expect(out).toContain('<script data-trek-ui>');
+ expect(out).toContain('.trek-glass');
+ expect(out).toContain('window.trek');
+ });
+
+ it('injectTrekUi is a no-op without the marker and expands every occurrence', () => {
+ const plain = '<html><body><h1>hi</h1></body></html>';
+ expect(injectTrekUi(plain)).toBe(plain);
+ const twice = `${TREK_UI_MARKER}<hr>${TREK_UI_MARKER}`;
+ const out = injectTrekUi(twice);
+ expect(out.match(/<style data-trek-ui>/g)?.length).toBe(2);
+ });
+});
diff --git a/server/.env.example b/server/.env.example
index c7e067426..47ad25f1d 100644
--- a/server/.env.example
+++ b/server/.env.example
@@ -43,6 +43,8 @@ DEMO_MODE=false # Demo mode - resets data hourly
# OVERPASS_URL= # Custom Overpass endpoint(s) for the map POI "explore" search, comma-separated. When set, REPLACES the bundled public mirrors — point it at an internal/self-hosted Overpass instance when the public ones are unreachable from your network. Non-http(s) entries are ignored. If you don't self-host Overpass but the public mirrors throttle you, setting APP_URL also gives outbound requests a unique User-Agent the mirrors rate-limit less.
# OVERPASS_TIMEOUT_MS=12000 # Per-endpoint timeout (ms) for Overpass POI requests; slower endpoints are abandoned so a faster mirror wins. Raise it for a slow self-hosted instance. (default: 12000)
+# UNSPLASH_ACCESS_KEY= # Optional Unsplash Access Key for trip-cover and place-image search. Without one, TREK uses Unsplash's unauthenticated endpoint, which some datacenter/VPS IPs get blocked from (#1449). Get a free key at unsplash.com/developers. Overrides any key set per-admin in Admin > Settings. Can also be configured there instead of here.
+
# Initial admin account — ONLY applied on the first boot, when the database has no
# users yet. Adding these later has no effect (the server logs a reminder if you do);
# to change an existing password sign in and use Settings, or reset the admin account.
diff --git a/server/src/db/migrations.ts b/server/src/db/migrations.ts
index ae46faf3b..cd70fa8b6 100644
--- a/server/src/db/migrations.ts
+++ b/server/src/db/migrations.ts
@@ -3419,6 +3419,70 @@ function runMigrations(db: Database.Database): void {
db.exec('CREATE INDEX IF NOT EXISTS idx_collection_place_labels_place ON collection_place_labels(collection_place_id);');
db.exec('CREATE INDEX IF NOT EXISTS idx_collection_place_labels_label ON collection_place_labels(label_id);');
},
+ // Migration 161: plugin-owned metadata on core entities (#1429). A namespaced
+ // key/value store so a plugin can attach data to a trip/place/day WITHOUT
+ // forking the core schema. One row per (plugin, entity, key); a plugin only
+ // ever sees its own rows. entity_type is polymorphic (no cross-table FK), so
+ // rows are purged by plugin_id on uninstall; entity deletes leave harmless
+ // orphans that the plugin's own reads never surface.
+ () => {
+ db.exec(`CREATE TABLE IF NOT EXISTS plugin_entity_metadata (
+ id INTEGER PRIMARY KEY AUTOINCREMENT,
+ plugin_id TEXT NOT NULL,
+ entity_type TEXT NOT NULL,
+ entity_id INTEGER NOT NULL,
+ key TEXT NOT NULL,
+ value TEXT,
+ updated_at TEXT NOT NULL DEFAULT (datetime('now')),
+ UNIQUE (plugin_id, entity_type, entity_id, key)
+ );`);
+ db.exec('CREATE INDEX IF NOT EXISTS idx_plugin_meta_entity ON plugin_entity_metadata (plugin_id, entity_type, entity_id);');
+ },
+
+ // Freeze the FX rate on settle-up transfers too (#1445). budget_settlements
+ // stored only a bare `amount` in whatever display currency the payer was
+ // viewing, so a later live-rate drift re-opened an already-settled position
+ // with a few-cent residual. Capture the display `currency` and the rate frozen
+ // at settle time (units of that currency per 1 trip currency), mirroring the
+ // budget_items columns. Legacy rows keep currency = NULL / rate = 1 and stay on
+ // live rates until re-edited.
+ () => {
+ try {
+ db.exec('ALTER TABLE budget_settlements ADD COLUMN currency TEXT');
+ } catch (err: any) {
+ if (!err.message?.includes('duplicate column name')) throw err;
+ }
+ try {
+ db.exec('ALTER TABLE budget_settlements ADD COLUMN exchange_rate REAL NOT NULL DEFAULT 1');
+ } catch (err: any) {
+ if (!err.message?.includes('duplicate column name')) throw err;
+ }
+ },
+
+ // #1446: guests are per-trip people, but their display name lived in the globally
+ // UNIQUE users.username, so a second "Jake" on another trip was auto-renamed to
+ // "Jake 2". Add a non-unique display_name; new guests store the human name here and
+ // get a uuid-based username that is never shown (the member views COALESCE to it).
+ () => {
+ try {
+ db.exec('ALTER TABLE users ADD COLUMN display_name TEXT');
+ } catch (err: any) {
+ if (!err.message?.includes('duplicate column name')) throw err;
+ }
+ },
+
+ // Plugin dependencies (#plugins): a plugin's trek-plugin.json can now declare
+ // `requiredAddons` (addon ids that must be enabled to activate) and
+ // `pluginDependencies` ({id, version-range} of other plugins that must be
+ // installed + satisfied). Stored as one JSON blob and populated by the
+ // discovery upsert on every install path. Legacy rows default to '{}' (no deps).
+ () => {
+ try {
+ db.exec("ALTER TABLE plugins ADD COLUMN dependencies TEXT NOT NULL DEFAULT '{}'");
+ } catch (err: any) {
+ if (!err.message?.includes('duplicate column name')) throw err;
+ }
+ },
];
if (currentVersion < migrations.length) {
diff --git a/server/src/mcp/tools/budget.ts b/server/src/mcp/tools/budget.ts
index 4d6005b41..6352ddc1a 100644
--- a/server/src/mcp/tools/budget.ts
+++ b/server/src/mcp/tools/budget.ts
@@ -5,7 +5,7 @@ import { isDemoUser } from '../../services/authService';
import {
createBudgetItem, updateBudgetItem, deleteBudgetItem,
updateMembers as updateBudgetMembers,
- toggleMemberPaid, getBudgetItem,
+ toggleMemberPaid, getBudgetItem, freezeForeignRate,
calculateSettlement, listSettlements, createSettlement, updateSettlement, deleteSettlement,
} from '../../services/budgetService';
import { getRates } from '../../services/exchangeRateService';
@@ -68,7 +68,11 @@ export function registerBudgetTools(server: McpServer, userId: number, scopes: s
if (!canAccessTrip(tripId, userId)) return noAccess();
if (!hasTripPermission('budget_edit', tripId, userId)) return permissionDenied();
const members = resolveMemberIds(tripId, member_ids);
- const item = createBudgetItem(tripId, { category, name, total_price, currency, member_ids: members, payers, expense_date, note });
+ const itemData = { category, name, total_price, currency, member_ids: members, payers, expense_date, note };
+ // Freeze the live FX rate at entry time so a settled position isn't re-opened
+ // when live rates drift (#1445) — same as the REST create path.
+ await freezeForeignRate(tripId, itemData);
+ const item = createBudgetItem(tripId, itemData);
safeBroadcast(tripId, 'budget:created', { item });
return ok({ item });
}
diff --git a/server/src/nest/admin/admin.controller.ts b/server/src/nest/admin/admin.controller.ts
index 9f39ec639..f85d01db7 100644
--- a/server/src/nest/admin/admin.controller.ts
+++ b/server/src/nest/admin/admin.controller.ts
@@ -1,6 +1,7 @@
import { Body, Controller, Delete, Get, HttpCode, HttpException, NotFoundException, Param, Post, Put, Query, Req, UseGuards } from '@nestjs/common';
import type { Request } from 'express';
import { AdminService } from './admin.service';
+import { PluginRuntimeService } from '../plugins/plugin-runtime.service';
import { JwtAuthGuard } from '../auth/jwt-auth.guard';
import { AdminGuard } from '../auth/admin.guard';
import { CurrentUser } from '../auth/current-user.decorator';
@@ -30,7 +31,10 @@ function ok<T>(result: T): Exclude<T, { error: string }> {
@Controller('api/admin')
@UseGuards(JwtAuthGuard, AdminGuard)
export class AdminController {
- constructor(private readonly admin: AdminService) {}
+ constructor(
+ private readonly admin: AdminService,
+ private readonly pluginRuntime: PluginRuntimeService,
+ ) {}
// ── Users ──
@Get('users')
@@ -271,13 +275,19 @@ export class AdminController {
listAddons() { return { addons: this.admin.listAddons() }; }
@Put('addons/:id')
- updateAddon(@CurrentUser() user: User, @Param('id') id: string, @Body() body: unknown, @Req() req: Request) {
+ async updateAddon(@CurrentUser() user: User, @Param('id') id: string, @Body() body: unknown, @Req() req: Request) {
const result = ok(this.admin.updateAddon(id, body));
writeAudit({ userId: user.id, action: 'admin.addon_update', resource: String(id), ip: getClientIp(req), details: result.auditDetails });
// Sessions only need re-creating when the registered MCP surface can
// actually change — an enabled-flip of an MCP-relevant addon. Config-only
// saves and photo-provider toggles used to kill every session (#1414).
if (result.mcpAffected) this.admin.invalidateMcpSessions();
+ // Disabling an addon cascades to plugins that require it: stop them (and any
+ // plugin that transitively depends on them) so a plugin never runs against a
+ // disabled addon (#plugins dependencies).
+ if (result.addon && result.addon.enabled === false && (body as { enabled?: boolean })?.enabled === false) {
+ await this.pluginRuntime.deactivateForDisabledAddon(id);
+ }
return { addon: result.addon };
}
diff --git a/server/src/nest/admin/admin.module.ts b/server/src/nest/admin/admin.module.ts
index 10aa83baf..ab881b7ac 100644
--- a/server/src/nest/admin/admin.module.ts
+++ b/server/src/nest/admin/admin.module.ts
@@ -1,8 +1,10 @@
import { Module } from '@nestjs/common';
import { AdminController } from './admin.controller';
import { AdminService } from './admin.service';
+import { PluginsModule } from '../plugins/plugins.module';
@Module({
+ imports: [PluginsModule],
controllers: [AdminController],
providers: [AdminService],
})
diff --git a/server/src/nest/booking-import/booking-import.service.ts b/server/src/nest/booking-import/booking-import.service.ts
index f651e5b6d..8f060f0e3 100644
--- a/server/src/nest/booking-import/booking-import.service.ts
+++ b/server/src/nest/booking-import/booking-import.service.ts
@@ -4,7 +4,7 @@ import { checkPermission } from '../../services/permissions';
import { verifyTripAccess } from '../../services/tripAccess';
import { createReservation } from '../../services/reservationService';
import { createPlace } from '../../services/placeService';
-import { createBudgetItem } from '../../services/budgetService';
+import { createBudgetItem, freezeForeignRate } from '../../services/budgetService';
import { isAddonEnabled } from '../../services/adminService';
import { ADDON_IDS } from '../../addons';
import { searchNominatim } from '../../services/mapsService';
@@ -235,13 +235,17 @@ export class BookingImportService {
const price = meta && meta.price != null ? Number(meta.price) : NaN;
if (Number.isFinite(price) && price > 0) {
try {
- const budgetItem = createBudgetItem(tripId, {
+ const budgetData = {
category: typeToCostCategory(item.type),
name: item.title,
total_price: price,
currency: meta && typeof meta.priceCurrency === 'string' ? meta.priceCurrency : null,
reservation_id: reservation.id,
- });
+ };
+ // Freeze the live FX rate for a foreign-currency booking price so a
+ // settled position isn't re-opened when live rates drift (#1445).
+ await freezeForeignRate(tripId, budgetData);
+ const budgetItem = createBudgetItem(tripId, budgetData);
broadcast(tripId, 'budget:created', { item: budgetItem }, socketId);
} catch (err) {
console.error(
diff --git a/server/src/nest/budget/budget.controller.ts b/server/src/nest/budget/budget.controller.ts
index 278cccb83..4a1c3e631 100644
--- a/server/src/nest/budget/budget.controller.ts
+++ b/server/src/nest/budget/budget.controller.ts
@@ -74,10 +74,10 @@ export class BudgetController {
}
@Post('settlements')
- createSettlement(
+ async createSettlement(
@CurrentUser() user: User,
@Param('tripId') tripId: string,
- @Body() body: { from_user_id?: number; to_user_id?: number; amount?: number },
+ @Body() body: { from_user_id?: number; to_user_id?: number; amount?: number; currency?: string | null },
@Headers('x-socket-id') socketId?: string,
) {
const trip = this.requireTrip(tripId, user);
@@ -85,9 +85,9 @@ export class BudgetController {
if (body.from_user_id == null || body.to_user_id == null || body.amount == null) {
throw new HttpException({ error: 'from_user_id, to_user_id and amount are required' }, 400);
}
- const settlement = this.budget.createSettlement(
+ const settlement = await this.budget.createSettlement(
tripId,
- { from_user_id: body.from_user_id, to_user_id: body.to_user_id, amount: body.amount },
+ { from_user_id: body.from_user_id, to_user_id: body.to_user_id, amount: body.amount, currency: body.currency },
user.id,
);
this.budget.broadcast(tripId, 'budget:settlement-created', { settlement }, socketId);
@@ -95,11 +95,11 @@ export class BudgetController {
}
@Put('settlements/:settlementId')
- updateSettlement(
+ async updateSettlement(
@CurrentUser() user: User,
@Param('tripId') tripId: string,
@Param('settlementId') settlementId: string,
- @Body() body: { from_user_id?: number; to_user_id?: number; amount?: number },
+ @Body() body: { from_user_id?: number; to_user_id?: number; amount?: number; currency?: string | null },
@Headers('x-socket-id') socketId?: string,
) {
const trip = this.requireTrip(tripId, user);
@@ -107,10 +107,11 @@ export class BudgetController {
if (body.from_user_id == null || body.to_user_id == null || body.amount == null) {
throw new HttpException({ error: 'from_user_id, to_user_id and amount are required' }, 400);
}
- const settlement = this.budget.updateSettlement(settlementId, tripId, {
+ const settlement = await this.budget.updateSettlement(settlementId, tripId, {
from_user_id: body.from_user_id,
to_user_id: body.to_user_id,
amount: body.amount,
+ currency: body.currency,
});
if (!settlement) {
throw new HttpException({ error: 'Settlement not found' }, 404);
diff --git a/server/src/nest/budget/budget.service.ts b/server/src/nest/budget/budget.service.ts
index d4a37b179..57c8ee870 100644
--- a/server/src/nest/budget/budget.service.ts
+++ b/server/src/nest/budget/budget.service.ts
@@ -41,39 +41,13 @@ export class BudgetService {
return svc.calculateSettlement(tripId, { base: effectiveBase, rates, tripCurrency });
}
- // Freeze the live FX rate at entry time into budget_items.exchange_rate so a settled
- // position isn't re-opened when live rates drift later (#1335). Only for a foreign
- // currency with no explicit rate; degrades to live rates if the fetch fails. On update
- // it (re)freezes only when the currency changes, so an unrelated edit never moves money.
- private async freezeForeignRate(
- tripId: string,
- data: { currency?: string | null; exchange_rate?: number },
- existingItemId?: string,
- ): Promise<void> {
- if (data.exchange_rate != null) return; // an explicit rate from the caller wins
- const cur = (data.currency || '').toUpperCase();
- if (!cur) return; // currency not being set in this request
- if (existingItemId != null) {
- const existing = db.prepare('SELECT currency FROM budget_items WHERE id = ?')
- .get(existingItemId) as { currency?: string } | undefined;
- if (existing && (existing.currency || '').toUpperCase() === cur) return; // currency unchanged
- }
- const trip = db.prepare('SELECT currency FROM trips WHERE id = ?')
- .get(tripId) as { currency?: string } | undefined;
- const tripCur = (trip?.currency || 'EUR').toUpperCase();
- if (cur === tripCur) return; // same as the trip currency → no conversion to freeze
- const rates = await getRates(tripCur);
- const r = rates?.[cur];
- if (r && r > 0) data.exchange_rate = r;
- }
-
async create(tripId: string, data: Parameters<typeof svc.createBudgetItem>[1]) {
- await this.freezeForeignRate(tripId, data);
+ await svc.freezeForeignRate(tripId, data);
return svc.createBudgetItem(tripId, data);
}
async update(id: string, tripId: string, data: Parameters<typeof svc.updateBudgetItem>[2]) {
- await this.freezeForeignRate(tripId, data, id);
+ await svc.freezeForeignRate(tripId, data, id);
return svc.updateBudgetItem(id, tripId, data);
}
@@ -97,11 +71,19 @@ export class BudgetService {
return svc.listSettlements(tripId);
}
- createSettlement(tripId: string, data: { from_user_id: number; to_user_id: number; amount: number }, userId: number) {
+ async createSettlement(tripId: string, data: { from_user_id: number; to_user_id: number; amount: number; currency?: string | null }, userId: number) {
+ // Freeze the FX rate for the display currency the amount was entered in so the
+ // transfer keeps cancelling its expense when live rates drift (#1445).
+ await svc.freezeForeignRate(tripId, data);
return svc.createSettlement(tripId, data, userId);
}
- updateSettlement(id: string, tripId: string, data: { from_user_id: number; to_user_id: number; amount: number }) {
+ async updateSettlement(id: string, tripId: string, data: { from_user_id: number; to_user_id: number; amount: number; currency?: string | null }) {
+ // Pass the settlement's stored currency so an edit that doesn't change it keeps
+ // the already-frozen rate (#1445) — otherwise a live-rate drift would re-open a
+ // settled position on an unrelated edit.
+ const existing = svc.listSettlements(tripId).find((s) => s.id === Number(id));
+ await svc.freezeForeignRate(tripId, data, undefined, existing?.currency ?? null);
return svc.updateSettlement(id, tripId, data);
}
diff --git a/server/src/nest/files/files-download.controller.ts b/server/src/nest/files/files-download.controller.ts
index 2fab2d18a..545842a03 100644
--- a/server/src/nest/files/files-download.controller.ts
+++ b/server/src/nest/files/files-download.controller.ts
@@ -42,9 +42,17 @@ export class FilesDownloadController {
}
// Serve Apple Wallet passes inline with the canonical MIME type so Safari
- // (iOS/macOS) hands them to Wallet instead of downloading as a blob.
- if (path.extname(resolved).toLowerCase() === '.pkpass') {
- res.setHeader('Content-Type', 'application/vnd.apple.pkpass');
+ // (iOS/macOS) hands them to Wallet instead of downloading as a blob. A
+ // `.pkpasses` bundle (a ZIP of multiple passes) is a distinct type with its
+ // own plural MIME type — without it Wallet won't offer to add the passes.
+ const walletMime =
+ path.extname(resolved).toLowerCase() === '.pkpass'
+ ? 'application/vnd.apple.pkpass'
+ : path.extname(resolved).toLowerCase() === '.pkpasses'
+ ? 'application/vnd.apple.pkpasses'
+ : null;
+ if (walletMime) {
+ res.setHeader('Content-Type', walletMime);
res.setHeader('Content-Disposition', `inline; filename="${path.basename(file.original_name || resolved)}"`);
}
diff --git a/server/src/nest/plugins/dependencies.ts b/server/src/nest/plugins/dependencies.ts
new file mode 100644
index 000000000..18ede9c0f
--- /dev/null
+++ b/server/src/nest/plugins/dependencies.ts
@@ -0,0 +1,150 @@
+import semver from 'semver';
+import type { PluginDependency } from './install/manifest';
+
+/**
+ * Pure dependency-reasoning helpers for the plugin runtime (#plugins). Kept
+ * side-effect free (no DB, no process) so the activation gate, the addon-disable
+ * cascade, and the registry resolver can all share — and unit-test — the same
+ * logic. The DB layer hands these functions plain rows; they never query.
+ */
+
+export interface PluginDependencies {
+ requiredAddons: string[];
+ pluginDependencies: PluginDependency[];
+}
+
+/** The subset of a `plugins` row these helpers reason over. */
+export interface PluginDepRow {
+ id: string;
+ version: string | null;
+ enabled: number;
+ /** The `dependencies` JSON blob column (may be null/legacy '{}'). */
+ dependencies: string | null;
+}
+
+/** Thrown when the dependency graph contains a cycle (A → B → A). */
+export class DependencyCycleError extends Error {
+ constructor(readonly cyclePath: string[]) {
+ super(`plugin dependency cycle: ${cyclePath.join(' -> ')}`);
+ this.name = 'DependencyCycleError';
+ }
+}
+
+const EMPTY: PluginDependencies = { requiredAddons: [], pluginDependencies: [] };
+
+/** Parse the stored `dependencies` JSON blob, tolerating legacy/garbage values. */
+export function parseDependencies(raw: string | null | undefined): PluginDependencies {
+ if (!raw) return { requiredAddons: [], pluginDependencies: [] };
+ try {
+ const o = JSON.parse(raw) as Partial<PluginDependencies>;
+ return {
+ requiredAddons: Array.isArray(o.requiredAddons) ? o.requiredAddons.filter((a): a is string => typeof a === 'string') : [],
+ pluginDependencies: Array.isArray(o.pluginDependencies)
+ ? o.pluginDependencies.filter(
+ (d): d is PluginDependency =>
+ !!d && typeof d === 'object' && typeof (d as PluginDependency).id === 'string' && typeof (d as PluginDependency).version === 'string',
+ )
+ : [],
+ };
+ } catch {
+ return { ...EMPTY };
+ }
+}
+
+/** Required addon ids that are currently NOT enabled — these block activation. */
+export function disabledRequiredAddons(deps: PluginDependencies, isAddonEnabled: (id: string) => boolean): string[] {
+ return deps.requiredAddons.filter((a) => !isAddonEnabled(a));
+}
+
+export interface VersionMismatch {
+ id: string;
+ /** The declared semver range. */
+ wanted: string;
+ /** The installed version that fails the range. */
+ installed: string;
+}
+
+export interface DependencyState {
+ /** Declared deps not installed at all. */
+ missing: PluginDependency[];
+ /** Installed but the version is outside the declared range. */
+ versionMismatch: VersionMismatch[];
+ /** Installed + satisfied but currently disabled (auto-enable candidates). */
+ satisfiedDisabled: string[];
+ /** Installed + satisfied + already enabled. */
+ satisfiedActive: string[];
+}
+
+/** Classify each declared plugin dependency against what is installed. */
+export function resolveDependencyState(deps: PluginDependencies, installed: Map<string, PluginDepRow>): DependencyState {
+ const state: DependencyState = { missing: [], versionMismatch: [], satisfiedDisabled: [], satisfiedActive: [] };
+ for (const dep of deps.pluginDependencies) {
+ const row = installed.get(dep.id);
+ if (!row) {
+ state.missing.push(dep);
+ continue;
+ }
+ const installedVersion = row.version ?? '0.0.0';
+ if (!semver.satisfies(installedVersion, dep.version, { includePrerelease: true })) {
+ state.versionMismatch.push({ id: dep.id, wanted: dep.version, installed: installedVersion });
+ continue;
+ }
+ if (row.enabled) state.satisfiedActive.push(dep.id);
+ else state.satisfiedDisabled.push(dep.id);
+ }
+ return state;
+}
+
+/** Plugins whose `pluginDependencies` reference `pluginId` (direct dependents). */
+export function findDependents(pluginId: string, rows: PluginDepRow[]): string[] {
+ return rows.filter((r) => parseDependencies(r.dependencies).pluginDependencies.some((d) => d.id === pluginId)).map((r) => r.id);
+}
+
+/**
+ * All plugins that (transitively) depend on `pluginId`. Used by the addon-disable
+ * cascade: disabling the addon disables the plugins that require it AND everything
+ * downstream of those. Order is leaf-most last is NOT guaranteed; callers only
+ * need the set for deactivation.
+ */
+export function findDependentsTransitive(pluginId: string, rows: PluginDepRow[]): string[] {
+ const out: string[] = [];
+ const seen = new Set<string>([pluginId]);
+ const queue = [pluginId];
+ while (queue.length) {
+ const cur = queue.shift() as string;
+ for (const dep of findDependents(cur, rows)) {
+ if (seen.has(dep)) continue;
+ seen.add(dep);
+ out.push(dep);
+ queue.push(dep);
+ }
+ }
+ return out;
+}
+
+/**
+ * Deps-first activation order for the given root ids over the installed graph.
+ * Edges to plugins that are NOT installed are ignored here (the activation gate
+ * reports those as missing separately). Throws {@link DependencyCycleError} on a
+ * back-edge. Passing multiple roots (boot) yields one global order with each
+ * plugin appearing once, dependencies always before their dependents.
+ */
+export function enableOrder(ids: string[], installed: Map<string, PluginDepRow>): string[] {
+ const order: string[] = [];
+ const done = new Set<string>();
+ const stack: string[] = [];
+ const visit = (cur: string): void => {
+ if (done.has(cur)) return;
+ const cycleAt = stack.indexOf(cur);
+ if (cycleAt !== -1) throw new DependencyCycleError([...stack.slice(cycleAt), cur]);
+ const row = installed.get(cur);
+ if (!row) return; // not installed — the gate handles it upstream
+ stack.push(cur);
+ for (const dep of parseDependencies(row.dependencies).pluginDependencies) visit(dep.id);
+ stack.pop();
+ done.add(cur);
+ order.push(cur);
+ };
+ for (const id of ids) visit(id);
+ return order;
+}
diff --git a/server/src/nest/plugins/host/create-rpc-host.ts b/server/src/nest/plugins/host/create-rpc-host.ts
index ac8e958af..34f1f08e1 100644
--- a/server/src/nest/plugins/host/create-rpc-host.ts
+++ b/server/src/nest/plugins/host/create-rpc-host.ts
@@ -1,9 +1,44 @@
import { db, canAccessTrip } from '../../../db/database';
import { broadcast, broadcastToUser } from '../../../websocket';
+import { listBudgetItems } from '../../../services/budgetService';
+import { listItems as listPackingItemsSvc } from '../../../services/packingService';
+import { listFiles } from '../../../services/fileService';
+import { checkPermission } from '../../../services/permissions';
+import { listTrips, updateTrip, NotFoundError, ValidationError } from '../../../services/tripService';
+import { createPlace, updatePlace, deletePlace } from '../../../services/placeService';
+import { createDay, getDay, updateDay, deleteDay } from '../../../services/dayService';
+import { createAssignment, deleteAssignment, dayExists, placeExists, getAssignmentForTrip } from '../../../services/assignmentService';
+import { isAddonEnabled } from '../../../services/adminService';
+import { ADDON_IDS } from '../../../addons';
+import { BudgetService } from '../../budget/budget.service';
import { PluginDataDb } from './plugin-data.service';
-import { PluginRpcHost } from './rpc-host';
+import { PluginRpcHost, ForbiddenResource, BadParams } from './rpc-host';
import { appendAudit } from './plugin-audit';
+/**
+ * The trip-access + role gate used by every planner write, mirroring the app's
+ * per-domain `canEdit` (canAccessTrip + checkPermission for the entity's *_edit
+ * action). Returns false — never throws — so the caller maps it to a clean
+ * RESOURCE_FORBIDDEN.
+ */
+function canEditTripAs(action: string, tripId: number, userId: number): boolean {
+ const trip = canAccessTrip(tripId, userId) as { user_id: number } | undefined;
+ if (!trip) return false;
+ const u = db.prepare('SELECT role FROM users WHERE id = ?').get(userId) as { role?: string } | undefined;
+ if (!u) return false;
+ return checkPermission(action, u.role ?? 'user', trip.user_id, userId, trip.user_id !== userId);
+}
+
+// Reused for costs.create so a plugin write frozen-FX and members/payers logic
+// matches a normal web-app budget write exactly (it has no injected deps).
+const budgetSvc = new BudgetService();
+
+// Quotas for plugin entity metadata (db:meta) — a cheap disk-DoS guard on the
+// shared trek.db volume. Generous for real use, small enough to bound abuse.
+const META_VALUE_MAX = 64 * 1024; // serialized JSON bytes per value
+const META_KEY_MAX = 256; // key string length (the key is attacker-controlled too)
+const META_KEYS_MAX = 100; // keys per (plugin, entity)
+
/**
* Wires a plugin's capability host to the REAL privileged modules (#plugins,
* M1). This is the ONLY plugin file that imports db/websocket — it runs in the
@@ -27,11 +62,20 @@ export function closePluginDataDb(id: string): void {
dataDbs.delete(id);
}
-export function createRealRpcHost(id: string, granted: ReadonlySet<string>): PluginRpcHost {
+/** Routes inter-plugin calls/events; supplied by PluginRuntimeService (owns the supervisor). */
+export interface PluginCallRouter {
+ callPlugin(callerId: string, targetId: string, fn: string, args: unknown, actingUserId: number | undefined): Promise<unknown>;
+ emitPluginEvent(sourceId: string, event: string, payload: unknown): void;
+}
+
+export function createRealRpcHost(id: string, granted: ReadonlySet<string>, router: PluginCallRouter): PluginRpcHost {
return new PluginRpcHost(id, granted, {
data: getPluginDataDb(id),
db,
canAccessTrip: (tripId, userId) => canAccessTrip(tripId, userId),
+ // The router binds this host's plugin id as the caller/source.
+ callPlugin: (targetId, fn, args, actingUserId) => router.callPlugin(id, targetId, fn, args, actingUserId),
+ emitPluginEvent: (event, payload) => router.emitPluginEvent(id, event, payload),
// Two users "share a trip" when both are owner-or-member of the same trip.
canSeeUser: (actingUserId, targetUserId) =>
!!db
@@ -47,5 +91,179 @@ export function createRealRpcHost(id: string, granted: ReadonlySet<string>): Plu
broadcastToTrip: (tripId, event, payload) => broadcast(tripId, `plugin:${id}:${event}`, payload),
broadcastToUser: (userId, payload) => broadcastToUser(userId, { type: `plugin:${id}`, ...payload }),
audit: (entry) => appendAudit(db, entry),
+ // --- Costs (budget items) ---
+ budgetAddonEnabled: () => isAddonEnabled(ADDON_IDS.BUDGET),
+ // Same gate as a REST/MCP budget mutation: the acting user must have trip
+ // access AND the 'budget_edit' permission for their global role.
+ canEditCosts: (tripId, userId) => {
+ const trip = canAccessTrip(tripId, userId) as { user_id: number } | undefined;
+ if (!trip) return false;
+ const u = db.prepare('SELECT role FROM users WHERE id = ?').get(userId) as { role?: string } | undefined;
+ if (!u) return false;
+ return checkPermission('budget_edit', u.role ?? 'user', trip.user_id, userId, trip.user_id !== userId);
+ },
+ // --- Read scopes (packing/files). Membership is checked by the host (tripRead);
+ // these just delegate to the same services the REST paths use. ---
+ listPackingItems: (tripId, userId) => listPackingItemsSvc(tripId, userId),
+ listTripFiles: (tripId) => listFiles(tripId, false),
+ listCostsForTrip: (tripId) => listBudgetItems(tripId),
+ // Cross-trip: every accessible trip's budget items (membership predicate is
+ // baked into listTrips). Reuses the hydrated list so members/payers come too.
+ listCostsForUser: (userId) => {
+ const trips = listTrips(userId, null) as Array<{ id: number }>;
+ return trips.flatMap((t) => listBudgetItems(t.id));
+ },
+ // Reuses BudgetService.create (frozen FX + members/payers), then broadcasts
+ // the same 'budget:created' event the controller emits so the web app updates
+ // live. No X-Socket-Id — a plugin has no originating socket.
+ createCost: async (tripId, input) => {
+ const item = await budgetSvc.create(String(tripId), input);
+ broadcast(tripId, 'budget:created', { item });
+ return item;
+ },
+ // Reuses BudgetService.update (re-frozen FX on a currency change), then
+ // broadcasts the same 'budget:updated' event the REST controller emits. A
+ // missing item is a clean RESOURCE_FORBIDDEN (parity with updatePlace).
+ updateCost: async (tripId, itemId, input) => {
+ const item = await budgetSvc.update(String(itemId), String(tripId), input);
+ if (item == null) throw new ForbiddenResource(`no cost ${itemId} on trip ${tripId}`);
+ broadcast(tripId, 'budget:updated', { item });
+ return item;
+ },
+ // Reuses BudgetService.remove, then broadcasts 'budget:deleted' with the
+ // numeric id — same payload the REST controller sends.
+ deleteCost: (tripId, itemId) => {
+ const deleted = budgetSvc.remove(String(itemId), String(tripId));
+ if (!deleted) throw new ForbiddenResource(`no cost ${itemId} on trip ${tripId}`);
+ broadcast(tripId, 'budget:deleted', { itemId });
+ return { deleted: true };
+ },
+ // --- Places (place_edit). Delegate to the same placeService the REST/MCP paths
+ // use, then broadcast the same events so open web sessions update live. ---
+ canEditPlaces: (tripId, userId) => canEditTripAs('place_edit', tripId, userId),
+ createPlace: (tripId, input) => {
+ const place = createPlace(String(tripId), input as Parameters<typeof createPlace>[1]);
+ broadcast(tripId, 'place:created', { place });
+ return place;
+ },
+ updatePlace: (tripId, placeId, input) => {
+ const place = updatePlace(String(tripId), String(placeId), input as Parameters<typeof updatePlace>[2]);
+ if (place === null) throw new ForbiddenResource(`no place ${placeId} on trip ${tripId}`);
+ broadcast(tripId, 'place:updated', { place });
+ return place;
+ },
+ deletePlace: (tripId, placeId) => {
+ const deleted = deletePlace(String(tripId), String(placeId));
+ if (!deleted) throw new ForbiddenResource(`no place ${placeId} on trip ${tripId}`);
+ broadcast(tripId, 'place:deleted', { placeId });
+ return { deleted: true };
+ },
+ // --- Days (day_edit). getDay scopes the row to the trip before any write. ---
+ canEditDays: (tripId, userId) => canEditTripAs('day_edit', tripId, userId),
+ createDay: (tripId, input) => {
+ const i = input as { date?: string; notes?: string };
+ const day = createDay(tripId, i.date, i.notes);
+ broadcast(tripId, 'day:created', { day });
+ return day;
+ },
+ updateDay: (tripId, dayId, input) => {
+ const current = getDay(dayId, tripId);
+ if (!current) throw new ForbiddenResource(`no day ${dayId} on trip ${tripId}`);
+ const day = updateDay(dayId, current, input as { notes?: string; title?: string | null });
+ broadcast(tripId, 'day:updated', { day });
+ return day;
+ },
+ deleteDay: (tripId, dayId) => {
+ const current = getDay(dayId, tripId);
+ if (!current) throw new ForbiddenResource(`no day ${dayId} on trip ${tripId}`);
+ deleteDay(dayId);
+ broadcast(tripId, 'day:deleted', { dayId });
+ return { deleted: true };
+ },
+ // --- Itinerary (day_edit). Both the day AND the place must belong to the trip,
+ // so a plugin can't cross-link another trip's rows (assignmentService doesn't
+ // self-check this — the controllers do, so we reproduce it here). ---
+ assignPlaceToDay: (tripId, dayId, placeId, notes) => {
+ if (!dayExists(dayId, tripId)) throw new ForbiddenResource(`no day ${dayId} on trip ${tripId}`);
+ if (!placeExists(placeId, tripId)) throw new ForbiddenResource(`no place ${placeId} on trip ${tripId}`);
+ const assignment = createAssignment(dayId, placeId, notes);
+ broadcast(tripId, 'assignment:created', { assignment });
+ return assignment;
+ },
+ unassignPlace: (tripId, assignmentId) => {
+ if (!getAssignmentForTrip(assignmentId, tripId)) throw new ForbiddenResource(`no assignment ${assignmentId} on trip ${tripId}`);
+ deleteAssignment(assignmentId);
+ broadcast(tripId, 'assignment:deleted', { assignmentId });
+ return { deleted: true };
+ },
+ // --- Trip (trip_edit). Only the schema-writable fields reach updateTrip; its
+ // NotFound/Validation errors are mapped to clean RPC codes. ---
+ canEditTrip: (tripId, userId) => canEditTripAs('trip_edit', tripId, userId),
+ updateTrip: (tripId, userId, input) => {
+ // The REST controller gates two fields behind their OWN admin-configurable
+ // permissions, separate from trip_edit — reproduce that here so a plugin (or
+ // its member user) can't archive or re-cover a trip it may only edit.
+ if ('is_archived' in input && !canEditTripAs('trip_archive', tripId, userId)) {
+ throw new ForbiddenResource(`no permission to archive trip ${tripId}`);
+ }
+ if ('cover_image' in input && !canEditTripAs('trip_cover_upload', tripId, userId)) {
+ throw new ForbiddenResource(`no permission to change the cover of trip ${tripId}`);
+ }
+ const u = db.prepare('SELECT role FROM users WHERE id = ?').get(userId) as { role?: string } | undefined;
+ try {
+ const result = updateTrip(tripId, userId, input as Parameters<typeof updateTrip>[2], u?.role ?? 'user');
+ broadcast(tripId, 'trip:updated', { trip: result.updatedTrip });
+ return result.updatedTrip;
+ } catch (e) {
+ if (e instanceof ValidationError) throw new BadParams(e.message);
+ if (e instanceof NotFoundError) throw new ForbiddenResource(e.message);
+ throw e;
+ }
+ },
+ // --- Plugin metadata (db:meta). A per-plugin namespaced key/value store keyed
+ // to a core entity; the plugin only ever sees rows tagged with its own id. ---
+ metaEntityTrip: (entityType, entityId) => {
+ if (entityType === 'trip') {
+ return (db.prepare('SELECT id FROM trips WHERE id = ?').get(entityId) as { id: number } | undefined)?.id;
+ }
+ const table = entityType === 'place' ? 'places' : 'days';
+ return (db.prepare(`SELECT trip_id FROM ${table} WHERE id = ?`).get(entityId) as { trip_id: number } | undefined)?.trip_id;
+ },
+ metaGet: (entityType, entityId, key) => {
+ const row = db.prepare('SELECT value FROM plugin_entity_metadata WHERE plugin_id=? AND entity_type=? AND entity_id=? AND key=?')
+ .get(id, entityType, entityId, key) as { value: string } | undefined;
+ if (!row) return null;
+ try { return JSON.parse(row.value); } catch { return null; }
+ },
+ metaSet: (entityType, entityId, key, value) => {
+ if (key.length > META_KEY_MAX) throw new BadParams(`metadata key too long (>${META_KEY_MAX} chars)`);
+ const json = JSON.stringify(value ?? null);
+ if (json.length > META_VALUE_MAX) throw new BadParams(`metadata value too large (>${META_VALUE_MAX} bytes)`);
+ const exists = db.prepare('SELECT 1 FROM plugin_entity_metadata WHERE plugin_id=? AND entity_type=? AND entity_id=? AND key=?')
+ .get(id, entityType, entityId, key);
+ if (!exists) {
+ const { n } = db.prepare('SELECT COUNT(*) AS n FROM plugin_entity_metadata WHERE plugin_id=? AND entity_type=? AND entity_id=?')
+ .get(id, entityType, entityId) as { n: number };
+ if (n >= META_KEYS_MAX) throw new BadParams(`too many metadata keys on this ${entityType} (max ${META_KEYS_MAX})`);
+ }
+ db.prepare(`INSERT INTO plugin_entity_metadata (plugin_id, entity_type, entity_id, key, value, updated_at)
+ VALUES (?, ?, ?, ?, ?, datetime('now'))
+ ON CONFLICT(plugin_id, entity_type, entity_id, key)
+ DO UPDATE SET value = excluded.value, updated_at = excluded.updated_at`)
+ .run(id, entityType, entityId, key, json);
+ return { key, value: value ?? null };
+ },
+ metaList: (entityType, entityId) => {
+ const list = db.prepare('SELECT key, value FROM plugin_entity_metadata WHERE plugin_id=? AND entity_type=? AND entity_id=? ORDER BY key')
+ .all(id, entityType, entityId) as Array<{ key: string; value: string }>;
+ const out: Record<string, unknown> = {};
+ for (const r of list) { try { out[r.key] = JSON.parse(r.value); } catch { out[r.key] = null; } }
+ return out;
+ },
+ metaDelete: (entityType, entityId, key) => {
+ const res = db.prepare('DELETE FROM plugin_entity_metadata WHERE plugin_id=? AND entity_type=? AND entity_id=? AND key=?')
+ .run(id, entityType, entityId, key);
+ return { deleted: res.changes > 0 };
+ },
});
}
diff --git a/server/src/nest/plugins/host/plugin-audit.ts b/server/src/nest/plugins/host/plugin-audit.ts
index 1f0a29037..5d568916a 100644
--- a/server/src/nest/plugins/host/plugin-audit.ts
+++ b/server/src/nest/plugins/host/plugin-audit.ts
@@ -30,15 +30,35 @@ export interface AuditEntry {
/** The methods worth auditing: core-data reads + broadcasts, not own-db noise. */
export function auditResource(method: string, params: Record<string, unknown>): string | null {
if (method.startsWith('trips.')) return `trip:${params.tripId ?? '?'}`;
+ if (method === 'costs.listMine') return 'costs:all';
+ if (method.startsWith('costs.')) return `trip:${params.tripId ?? '?'}`;
+ if (method.startsWith('places.') || method.startsWith('days.') || method.startsWith('itinerary.')) return `trip:${params.tripId ?? '?'}`;
+ if (method.startsWith('packing.') || method.startsWith('files.')) return `trip:${params.tripId ?? '?'}`;
+ if (method.startsWith('meta.')) return `${params.entityType ?? '?'}:${params.entityId ?? '?'}`;
if (method === 'users.getById') return `user:${params.id ?? '?'}`;
if (method === 'ws.broadcastToTrip') return `trip:${params.tripId ?? '?'}`;
if (method === 'ws.broadcastToUser') return `user:${params.userId ?? '?'}`;
+ if (method === 'plugins.call') return `plugin:${params.targetId ?? '?'}#${params.fn ?? '?'}`;
+ if (method === 'events.emit') return `event:${params.event ?? '?'}`;
return null;
}
/** True for calls we record (core data + ws); a plugin's own-db calls are skipped. */
export function isAuditable(method: string): boolean {
- return method.startsWith('trips.') || method.startsWith('users.') || method.startsWith('ws.');
+ return (
+ method.startsWith('trips.') ||
+ method.startsWith('costs.') ||
+ method.startsWith('places.') ||
+ method.startsWith('days.') ||
+ method.startsWith('itinerary.') ||
+ method.startsWith('packing.') ||
+ method.startsWith('files.') ||
+ method.startsWith('meta.') ||
+ method.startsWith('users.') ||
+ method.startsWith('ws.') ||
+ method.startsWith('plugins.') ||
+ method.startsWith('events.')
+ );
}
/** Append one entry to the per-plugin hash chain. Synchronous (better-sqlite3). */
diff --git a/server/src/nest/plugins/host/rpc-host.ts b/server/src/nest/plugins/host/rpc-host.ts
index ae02b6912..e3dadafae 100644
--- a/server/src/nest/plugins/host/rpc-host.ts
+++ b/server/src/nest/plugins/host/rpc-host.ts
@@ -1,3 +1,10 @@
+import {
+ budgetCreateItemRequestSchema, type BudgetCreateItemRequest,
+ budgetUpdateItemRequestSchema, type BudgetUpdateItemRequest,
+ placeCreateRequestSchema, placeUpdateRequestSchema,
+ dayCreateRequestSchema, dayUpdateRequestSchema,
+ tripUpdateRequestSchema,
+} from '@trek/shared';
import {
KNOWN_METHODS,
type KnownMethod,
@@ -44,6 +51,53 @@ export interface HostDeps {
broadcastToUser(userId: number, payload: Record<string, unknown>): void;
/** Optional sink for the capability audit log (host-side, hash-chained). */
audit?(entry: { pluginId: string; actingUserId?: number; method: string; resource: string | null; code: string }): void;
+ /** Call an export on another plugin (this host's plugin is the caller). Authorizes
+ * the dependency edge + the target's `provides` allowlist, forwards the acting user. */
+ callPlugin(targetId: string, fn: string, args: unknown, actingUserId: number | undefined): Promise<unknown>;
+ /** Publish an event from this host's plugin to its subscribed dependents. */
+ emitPluginEvent(event: string, payload: unknown): void;
+ /** True when the Costs (budget) addon is enabled — gates all costs.* methods. */
+ budgetAddonEnabled(): boolean;
+ /** True if the acting user may create costs on the trip (the 'budget_edit' permission). */
+ canEditCosts(tripId: number, userId: number): boolean;
+ /** A trip's packing items visible to `userId` (#858 private-item filter), for `packing.list`. */
+ listPackingItems(tripId: number, userId: number): unknown[];
+ /** A trip's files (trash excluded), for `files.list`. */
+ listTripFiles(tripId: number): unknown[];
+ /** All budget items of one trip, hydrated with members/payers. */
+ listCostsForTrip(tripId: number): unknown[];
+ /** All budget items across every trip the acting user can access. */
+ listCostsForUser(userId: number): unknown[];
+ /** Create a budget item on a trip (and broadcast); returns the created item. */
+ createCost(tripId: number, input: BudgetCreateItemRequest): unknown;
+ /** Update a budget item on a trip (and broadcast); returns the updated item. */
+ updateCost(tripId: number, itemId: number, input: BudgetUpdateItemRequest): unknown;
+ /** Delete a budget item from a trip (and broadcast); returns { deleted: true }. */
+ deleteCost(tripId: number, itemId: number): unknown;
+ // --- Places (the 'place_edit' permission) ---
+ canEditPlaces(tripId: number, userId: number): boolean;
+ createPlace(tripId: number, input: Record<string, unknown>): unknown;
+ updatePlace(tripId: number, placeId: number, input: Record<string, unknown>): unknown;
+ deletePlace(tripId: number, placeId: number): unknown;
+ // --- Days + itinerary (the 'day_edit' permission) ---
+ canEditDays(tripId: number, userId: number): boolean;
+ createDay(tripId: number, input: Record<string, unknown>): unknown;
+ updateDay(tripId: number, dayId: number, input: Record<string, unknown>): unknown;
+ deleteDay(tripId: number, dayId: number): unknown;
+ /** Assign a place to a day (both trip-scoped by the wiring); returns the assignment. */
+ assignPlaceToDay(tripId: number, dayId: number, placeId: number, notes: string | null): unknown;
+ /** Remove a day-assignment (trip-scoped by the wiring). */
+ unassignPlace(tripId: number, assignmentId: number): unknown;
+ // --- Trip (the 'trip_edit' permission) ---
+ canEditTrip(tripId: number, userId: number): boolean;
+ updateTrip(tripId: number, userId: number, input: Record<string, unknown>): unknown;
+ // --- Plugin metadata on core entities (db:meta) ---
+ /** The trip a trip/place/day belongs to (for the membership gate), or undefined. */
+ metaEntityTrip(entityType: string, entityId: number): number | undefined;
+ metaGet(entityType: string, entityId: number, key: string): unknown;
+ metaSet(entityType: string, entityId: number, key: string, value: unknown): unknown;
+ metaList(entityType: string, entityId: number): unknown;
+ metaDelete(entityType: string, entityId: number, key: string): unknown;
}
type Handler = (params: Record<string, unknown>, actingUserId: number | undefined) => unknown;
@@ -57,7 +111,11 @@ const str = (v: unknown, name: string): string => {
if (typeof v !== 'string') throw new BadParams(`${name} must be a string`);
return v;
};
-class BadParams extends Error {}
+export class BadParams extends Error {}
+
+// Mirrors the STRING_LIMITS the places REST controller enforces (the @trek/shared
+// schema doesn't), so the plugin write path rejects the same oversized fields.
+const PLACE_STR_LIMITS: Record<string, number> = { name: 200, description: 2000, address: 500, notes: 2000 };
export class PluginRpcHost {
private methods = new Map<string, Handler>();
@@ -86,6 +144,183 @@ export class PluginRpcHost {
this.tripRead(p, uid, () => deps.db.prepare('SELECT * FROM reservations WHERE trip_id = ? ORDER BY reservation_time').all(num(p.tripId, 'tripId'))),
);
}
+ if (has('db:read:packing')) {
+ // Delegate to the packing service, scoped to the acting user so its #858 private-
+ // item visibility filter applies (a plugin must not see other members' private items).
+ this.methods.set('packing.list', (p, uid) =>
+ this.tripRead(p, uid, (userId) => deps.listPackingItems(num(p.tripId, 'tripId'), userId)),
+ );
+ }
+ if (has('db:read:files')) {
+ // Trip files, trash excluded — same view the files tab shows.
+ this.methods.set('files.list', (p, uid) =>
+ this.tripRead(p, uid, () => deps.listTripFiles(num(p.tripId, 'tripId'))),
+ );
+ }
+
+ if (has('db:read:costs')) {
+ // "Costs" = budget items (trip-scoped). Same membership gate as trip reads;
+ // additionally requires the Costs addon to be enabled (parity with the app,
+ // where a disabled addon means there is nothing to read).
+ this.methods.set('costs.getByTrip', (p, uid) =>
+ this.tripRead(p, uid, () => {
+ this.requireBudgetAddon();
+ return deps.listCostsForTrip(num(p.tripId, 'tripId'));
+ }),
+ );
+ // Cross-trip aggregate: every cost the acting user can access. The acting
+ // user is host-bound; a job/onLoad (no user) is refused, same as tripRead.
+ this.methods.set('costs.listMine', (p, uid) => {
+ if (uid === undefined) throw new ForbiddenResource('cost reads require an authenticated user context');
+ this.requireBudgetAddon();
+ return deps.listCostsForUser(uid);
+ });
+ }
+
+ if (has('db:write:costs')) {
+ // The first plugin path that MUTATES core data. Gate it exactly like a
+ // normal web-app/MCP budget write: addon enabled + trip access + the
+ // 'budget_edit' permission for the host-bound acting user.
+ this.methods.set('costs.create', (p, uid) => {
+ const tripId = num(p.tripId, 'tripId');
+ if (uid === undefined) throw new ForbiddenResource('cost writes require an authenticated user context');
+ this.requireBudgetAddon();
+ const parsed = budgetCreateItemRequestSchema.safeParse(p.input);
+ if (!parsed.success) throw new BadParams(`invalid cost: ${parsed.error.issues[0]?.message ?? 'bad input'}`);
+ if (!this.deps.canAccessTrip(tripId, uid)) throw new ForbiddenResource(`no access to trip ${tripId}`);
+ if (!this.deps.canEditCosts(tripId, uid)) throw new ForbiddenResource(`no permission to edit costs on trip ${tripId}`);
+ return deps.createCost(tripId, parsed.data);
+ });
+ // Same gate as costs.create — addon + trip access + the acting user's
+ // 'budget_edit' permission — plus the item id. updateCost re-freezes the FX
+ // rate through BudgetService.update exactly like the create path.
+ this.methods.set('costs.update', (p, uid) => {
+ const tripId = num(p.tripId, 'tripId');
+ const itemId = num(p.itemId, 'itemId');
+ if (uid === undefined) throw new ForbiddenResource('cost writes require an authenticated user context');
+ this.requireBudgetAddon();
+ const parsed = budgetUpdateItemRequestSchema.safeParse(p.input);
+ if (!parsed.success) throw new BadParams(`invalid cost: ${parsed.error.issues[0]?.message ?? 'bad input'}`);
+ if (!this.deps.canAccessTrip(tripId, uid)) throw new ForbiddenResource(`no access to trip ${tripId}`);
+ if (!this.deps.canEditCosts(tripId, uid)) throw new ForbiddenResource(`no permission to edit costs on trip ${tripId}`);
+ return deps.updateCost(tripId, itemId, parsed.data);
+ });
+ // Deleting a cost is a budget write too: gated by db:write:costs and, per the
+ // app, the acting user's 'budget_edit' permission on the trip.
+ this.methods.set('costs.delete', (p, uid) => {
+ const tripId = num(p.tripId, 'tripId');
+ const itemId = num(p.itemId, 'itemId');
+ if (uid === undefined) throw new ForbiddenResource('cost writes require an authenticated user context');
+ this.requireBudgetAddon();
+ if (!this.deps.canAccessTrip(tripId, uid)) throw new ForbiddenResource(`no access to trip ${tripId}`);
+ if (!this.deps.canEditCosts(tripId, uid)) throw new ForbiddenResource(`no permission to edit costs on trip ${tripId}`);
+ return deps.deleteCost(tripId, itemId);
+ });
+ }
+
+ // --- Core planner writes (#1429). Each mirrors costs.create: validate the
+ // input against the SAME @trek/shared schema the web app uses, then gate on
+ // trip access + the entity's edit permission for the HOST-bound acting user
+ // (a job/onLoad has no user, so its writes are refused). The delegating deps
+ // reuse the real services + broadcast the same events, so the app stays live. ---
+ if (has('db:write:places')) {
+ this.methods.set('places.create', (p, uid) => {
+ const tripId = num(p.tripId, 'tripId');
+ const actor = this.requireActor(uid, 'place');
+ const parsed = placeCreateRequestSchema.safeParse(p.input);
+ if (!parsed.success) throw new BadParams(`invalid place: ${parsed.error.issues[0]?.message ?? 'bad input'}`);
+ this.capStrings(parsed.data as Record<string, unknown>, PLACE_STR_LIMITS);
+ this.requireTripEdit(tripId, actor, deps.canEditPlaces);
+ return deps.createPlace(tripId, parsed.data as Record<string, unknown>);
+ });
+ this.methods.set('places.update', (p, uid) => {
+ const tripId = num(p.tripId, 'tripId');
+ const placeId = num(p.placeId, 'placeId');
+ const actor = this.requireActor(uid, 'place');
+ const parsed = placeUpdateRequestSchema.safeParse(p.input);
+ if (!parsed.success) throw new BadParams(`invalid place: ${parsed.error.issues[0]?.message ?? 'bad input'}`);
+ this.capStrings(parsed.data as Record<string, unknown>, PLACE_STR_LIMITS);
+ this.requireTripEdit(tripId, actor, deps.canEditPlaces);
+ return deps.updatePlace(tripId, placeId, parsed.data as Record<string, unknown>);
+ });
+ this.methods.set('places.delete', (p, uid) => {
+ const tripId = num(p.tripId, 'tripId');
+ const placeId = num(p.placeId, 'placeId');
+ const actor = this.requireActor(uid, 'place');
+ this.requireTripEdit(tripId, actor, deps.canEditPlaces);
+ return deps.deletePlace(tripId, placeId);
+ });
+ }
+
+ if (has('db:write:days')) {
+ this.methods.set('days.create', (p, uid) => {
+ const tripId = num(p.tripId, 'tripId');
+ const actor = this.requireActor(uid, 'day');
+ const parsed = dayCreateRequestSchema.safeParse(p.input);
+ if (!parsed.success) throw new BadParams(`invalid day: ${parsed.error.issues[0]?.message ?? 'bad input'}`);
+ this.requireTripEdit(tripId, actor, deps.canEditDays);
+ return deps.createDay(tripId, parsed.data as Record<string, unknown>);
+ });
+ this.methods.set('days.update', (p, uid) => {
+ const tripId = num(p.tripId, 'tripId');
+ const dayId = num(p.dayId, 'dayId');
+ const actor = this.requireActor(uid, 'day');
+ const parsed = dayUpdateRequestSchema.safeParse(p.input);
+ if (!parsed.success) throw new BadParams(`invalid day: ${parsed.error.issues[0]?.message ?? 'bad input'}`);
+ this.requireTripEdit(tripId, actor, deps.canEditDays);
+ return deps.updateDay(tripId, dayId, parsed.data as Record<string, unknown>);
+ });
+ this.methods.set('days.delete', (p, uid) => {
+ const tripId = num(p.tripId, 'tripId');
+ const dayId = num(p.dayId, 'dayId');
+ const actor = this.requireActor(uid, 'day');
+ this.requireTripEdit(tripId, actor, deps.canEditDays);
+ return deps.deleteDay(tripId, dayId);
+ });
+ }
+
+ if (has('db:write:itinerary')) {
+ // Assigning/removing a place on a day is a DAY edit in the app (day_edit), so
+ // gate it with canEditDays; the wiring also checks the day AND place belong to
+ // the trip so a plugin can't cross-link another trip's rows.
+ this.methods.set('itinerary.assign', (p, uid) => {
+ const tripId = num(p.tripId, 'tripId');
+ const dayId = num(p.dayId, 'dayId');
+ const placeId = num(p.placeId, 'placeId');
+ const actor = this.requireActor(uid, 'itinerary');
+ const notes = p.notes === undefined || p.notes === null ? null : str(p.notes, 'notes');
+ this.requireTripEdit(tripId, actor, deps.canEditDays);
+ return deps.assignPlaceToDay(tripId, dayId, placeId, notes);
+ });
+ this.methods.set('itinerary.unassign', (p, uid) => {
+ const tripId = num(p.tripId, 'tripId');
+ const assignmentId = num(p.assignmentId, 'assignmentId');
+ const actor = this.requireActor(uid, 'itinerary');
+ this.requireTripEdit(tripId, actor, deps.canEditDays);
+ return deps.unassignPlace(tripId, assignmentId);
+ });
+ }
+
+ if (has('db:write:trips')) {
+ this.methods.set('trips.update', (p, uid) => {
+ const tripId = num(p.tripId, 'tripId');
+ const actor = this.requireActor(uid, 'trip');
+ const parsed = tripUpdateRequestSchema.safeParse(p.input);
+ if (!parsed.success) throw new BadParams(`invalid trip: ${parsed.error.issues[0]?.message ?? 'bad input'}`);
+ this.requireTripEdit(tripId, actor, deps.canEditTrip);
+ return deps.updateTrip(tripId, actor, parsed.data as Record<string, unknown>);
+ });
+ }
+
+ if (has('db:meta')) {
+ // A plugin's OWN namespaced key/value store attached to a core entity. Not
+ // core data — but the entity must belong to a trip the acting user can
+ // ACCESS, so a plugin can't stash/read metadata against another tenant's rows.
+ this.methods.set('meta.get', (p, uid) => { const e = this.metaEntity(p, uid, false); return deps.metaGet(e.entityType, e.entityId, str(p.key, 'key')); });
+ this.methods.set('meta.set', (p, uid) => { const e = this.metaEntity(p, uid, true); return deps.metaSet(e.entityType, e.entityId, str(p.key, 'key'), p.value); });
+ this.methods.set('meta.list', (p, uid) => { const e = this.metaEntity(p, uid, false); return deps.metaList(e.entityType, e.entityId); });
+ this.methods.set('meta.delete', (p, uid) => { const e = this.metaEntity(p, uid, true); return deps.metaDelete(e.entityType, e.entityId, str(p.key, 'key')); });
+ }
if (has('db:read:users')) {
// Scope to people the acting user can actually see (self or a trip they
@@ -122,6 +357,18 @@ export class PluginRpcHost {
return { ok: true };
});
}
+
+ // Inter-plugin capabilities (#plugins deps). Registered UNCONDITIONALLY — there
+ // is no permission for these; the router authorizes each call against the
+ // declared dependency edge + the target's `provides`/`emits` allowlist. The
+ // acting user is forwarded so the target's export runs as the caller's user.
+ this.methods.set('plugins.call', (p, uid) =>
+ deps.callPlugin(str(p.targetId, 'targetId'), str(p.fn, 'fn'), p.args, uid),
+ );
+ this.methods.set('events.emit', (p) => {
+ deps.emitPluginEvent(str(p.event, 'event'), p.payload);
+ return { ok: true };
+ });
}
/**
@@ -131,7 +378,7 @@ export class PluginRpcHost {
* could set to any id to read another user's trips. If no acting user is bound
* (a job / onLoad, or a forged call), the read is forbidden.
*/
- private tripRead(p: Record<string, unknown>, actingUserId: number | undefined, read: () => unknown): unknown {
+ private tripRead(p: Record<string, unknown>, actingUserId: number | undefined, read: (userId: number) => unknown): unknown {
const tripId = num(p.tripId, 'tripId');
if (actingUserId === undefined) {
throw new ForbiddenResource('trip reads require an authenticated user context');
@@ -139,7 +386,71 @@ export class PluginRpcHost {
if (!this.deps.canAccessTrip(tripId, actingUserId)) {
throw new ForbiddenResource(`no access to trip ${tripId}`);
}
- return read();
+ // The read runs only for a bound, membership-checked user — hand it through so
+ // per-user visibility filters (e.g. packing's #858 private items) can apply.
+ return read(actingUserId);
+ }
+
+ /** Refuse costs.* calls when the Costs (budget) addon is disabled. */
+ private requireBudgetAddon(): void {
+ if (!this.deps.budgetAddonEnabled()) {
+ throw new ForbiddenResource('the costs addon is disabled');
+ }
+ }
+
+ /**
+ * Every write needs a HOST-bound acting user. A job / onLoad (no user) or a call
+ * with a forged/unknown invocation id resolves to undefined and is refused — a
+ * plugin can never write "as" an arbitrary user.
+ */
+ private requireActor(uid: number | undefined, noun: string): number {
+ if (uid === undefined) throw new ForbiddenResource(`${noun} writes require an authenticated user context`);
+ return uid;
+ }
+
+ /**
+ * The @trek/shared write schemas don't carry the string-length caps the REST
+ * controllers add, so mirror those caps here — otherwise a plugin could write a
+ * field the web app would reject with 400 (e.g. a 100k-char place name).
+ */
+ private capStrings(input: Record<string, unknown>, limits: Record<string, number>): void {
+ for (const [field, max] of Object.entries(limits)) {
+ const v = input[field];
+ if (typeof v === 'string' && v.length > max) throw new BadParams(`${field} must be ${max} characters or fewer`);
+ }
+ }
+
+ /** A write is allowed only if the acting user can access AND edit the trip. */
+ private requireTripEdit(tripId: number, uid: number, canEdit: (t: number, u: number) => boolean): void {
+ if (!this.deps.canAccessTrip(tripId, uid)) throw new ForbiddenResource(`no access to trip ${tripId}`);
+ if (!canEdit(tripId, uid)) throw new ForbiddenResource(`no permission to edit trip ${tripId}`);
+ }
+
+ /**
+ * Validate a metadata target and gate it: the entity type must be one we support,
+ * and the trip it belongs to must be accessible to the host-bound acting user.
+ */
+ private metaEntity(p: Record<string, unknown>, uid: number | undefined, write: boolean): { entityType: string; entityId: number } {
+ const entityType = str(p.entityType, 'entityType');
+ if (entityType !== 'trip' && entityType !== 'place' && entityType !== 'day') {
+ throw new BadParams(`invalid entityType "${entityType}" (trip|place|day)`);
+ }
+ const entityId = num(p.entityId, 'entityId');
+ if (uid === undefined) throw new ForbiddenResource('metadata requires an authenticated user context');
+ const tripId = this.deps.metaEntityTrip(entityType, entityId);
+ if (tripId === undefined || !this.deps.canAccessTrip(tripId, uid)) {
+ throw new ForbiddenResource(`no access to ${entityType} ${entityId}`);
+ }
+ // Reads need trip access; WRITES additionally need the entity's edit permission
+ // — so a read-only member can't overwrite/delete metadata an editor created
+ // (matches how core writes are gated).
+ if (write) {
+ const canEdit = entityType === 'trip' ? this.deps.canEditTrip
+ : entityType === 'place' ? this.deps.canEditPlaces
+ : this.deps.canEditDays;
+ if (!canEdit(tripId, uid)) throw new ForbiddenResource(`no permission to edit ${entityType} ${entityId}`);
+ }
+ return { entityType, entityId };
}
async dispatch(req: RpcRequest, actingUserId?: number): Promise<RpcResponse | RpcError> {
diff --git a/server/src/nest/plugins/install/discovery.ts b/server/src/nest/plugins/install/discovery.ts
index 6794f5e49..f20d040b0 100644
--- a/server/src/nest/plugins/install/discovery.ts
+++ b/server/src/nest/plugins/install/discovery.ts
@@ -41,19 +41,20 @@ export function discoverPlugins(db: BetterSqlite3.Database): { discovered: strin
}
function upsert(db: BetterSqlite3.Database, m: PluginManifest): void {
+ const dependencies = JSON.stringify({ requiredAddons: m.requiredAddons, pluginDependencies: m.pluginDependencies });
const existing = db.prepare('SELECT id FROM plugins WHERE id = ?').get(m.id) as { id: string } | undefined;
if (existing) {
db.prepare(
`UPDATE plugins SET name = ?, description = ?, type = ?, icon = ?, version = ?, api_version = ?,
- min_trek_version = ?, permissions = ?, capabilities = ?, updated_at = CURRENT_TIMESTAMP WHERE id = ?`,
- ).run(m.name, m.description ?? null, m.type, m.icon ?? 'Blocks', m.version, m.apiVersion, m.minTrekVersion ?? null, JSON.stringify(m.permissions), JSON.stringify(m.capabilities), m.id);
+ min_trek_version = ?, permissions = ?, capabilities = ?, dependencies = ?, updated_at = CURRENT_TIMESTAMP WHERE id = ?`,
+ ).run(m.name, m.description ?? null, m.type, m.icon ?? 'Blocks', m.version, m.apiVersion, m.minTrekVersion ?? null, JSON.stringify(m.permissions), JSON.stringify(m.capabilities), dependencies, m.id);
} else {
db.prepare(
// granted_permissions '' (empty, not '[]') marks "never consented" so the
// first activation is distinguishable from a plugin consented to zero perms.
- `INSERT INTO plugins (id, name, description, type, icon, version, api_version, min_trek_version, permissions, capabilities, granted_permissions, status)
- VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, '', 'inactive')`,
- ).run(m.id, m.name, m.description ?? null, m.type, m.icon ?? 'Blocks', m.version, m.apiVersion, m.minTrekVersion ?? null, JSON.stringify(m.permissions), JSON.stringify(m.capabilities));
+ `INSERT INTO plugins (id, name, description, type, icon, version, api_version, min_trek_version, permissions, capabilities, dependencies, granted_permissions, status)
+ VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, '', 'inactive')`,
+ ).run(m.id, m.name, m.description ?? null, m.type, m.icon ?? 'Blocks', m.version, m.apiVersion, m.minTrekVersion ?? null, JSON.stringify(m.permissions), JSON.stringify(m.capabilities), dependencies);
}
// Refresh the settings-field descriptors from the manifest.
diff --git a/server/src/nest/plugins/install/manifest.ts b/server/src/nest/plugins/install/manifest.ts
index 095dc64f1..437058155 100644
--- a/server/src/nest/plugins/install/manifest.ts
+++ b/server/src/nest/plugins/install/manifest.ts
@@ -1,3 +1,4 @@
+import semver from 'semver';
import { isKnownPermission } from '../protocol/envelope';
/**
@@ -23,12 +24,23 @@ export interface ManifestSettingField {
export interface WidgetCapability {
title?: string;
defaultSize?: string;
- /** Where the widget mounts: dashboard sidebar (default) or as a hero-bar overlay. */
- slot?: 'sidebar' | 'hero';
+ /** Where the widget mounts: dashboard sidebar (default), hero-bar overlay, or the
+ * trip planner's place-detail panel (scoped to the selected place). */
+ slot?: 'sidebar' | 'hero' | 'place-detail';
}
export interface PluginCapabilities {
widget?: WidgetCapability;
+ /** Function names this plugin exposes to its dependents via ctx.plugins.call. */
+ provides?: string[];
+ /** Event names this plugin publishes to its dependents via ctx.events.emit. */
+ emits?: string[];
+}
+
+/** A declared dependency on another plugin, pinned by a semver range. */
+export interface PluginDependency {
+ id: string;
+ version: string;
}
export interface PluginManifest {
@@ -40,7 +52,7 @@ export interface PluginManifest {
description?: string;
homepage?: string;
icon?: string;
- type: 'integration' | 'page' | 'widget';
+ type: 'integration' | 'page' | 'widget' | 'trip-page';
trek?: string;
minTrekVersion?: string;
nativeModules: boolean;
@@ -48,9 +60,17 @@ export interface PluginManifest {
egress: string[];
settings: ManifestSettingField[];
capabilities: PluginCapabilities;
+ /** Addon ids that must be enabled for this plugin to activate (format-only here). */
+ requiredAddons: string[];
+ /** Other plugins that must be installed + version-satisfied to activate. */
+ pluginDependencies: PluginDependency[];
}
const ID_RE = /^[a-z][a-z0-9-]{2,39}$/;
+// Addon ids are lowercase slugs that may contain underscores (e.g. `llm_parsing`).
+// Validated format-only: existence is checked at activation, so a plugin declaring
+// an unknown addon still installs but can never enable (matches "allow install").
+const ADDON_ID_RE = /^[a-z][a-z0-9_]{1,39}$/;
// An outbound host: an exact hostname (single-label like a `redis` sibling
// service, or a dotted FQDN) OR a `*.`-prefixed wildcard that MUST have a real
// multi-label suffix. Rejects `*`, `*.`, whole-TLD `*.com`, schemes, and any
@@ -61,7 +81,9 @@ const HOST_RE = /^(\*\.[a-z0-9-]+(\.[a-z0-9-]+)+|[a-z0-9-]+(\.[a-z0-9-]+)*)$/i;
// (id "registry" would collide with GET registry/:id vs :id/errors routing).
const RESERVED_IDS = new Set(['registry', 'install', 'rescan']);
const SEMVER_RE = /^\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?$/;
-const TYPES = new Set(['integration', 'page', 'widget']);
+// 'trip-page' mounts the plugin's sandboxed UI as a tab inside every trip planner
+// (tripId-scoped), with no dashboard presence — unlike 'page' (dashboard nav).
+const TYPES = new Set(['integration', 'page', 'widget', 'trip-page']);
export class ManifestError extends Error {}
@@ -122,9 +144,47 @@ export function parseManifest(raw: unknown): PluginManifest {
egress,
settings: parseSettings(m.settings),
capabilities: parseCapabilities(m.capabilities),
+ requiredAddons: parseRequiredAddons(m.requiredAddons),
+ pluginDependencies: parsePluginDependencies(m.pluginDependencies, id),
};
}
+/** Validate `requiredAddons`: a de-duplicated list of well-formed addon-id slugs. */
+function parseRequiredAddons(raw: unknown): string[] {
+ const out: string[] = [];
+ for (const v of arr(raw)) {
+ if (typeof v !== 'string' || !ADDON_ID_RE.test(v)) throw new ManifestError(`invalid requiredAddons entry "${String(v)}"`);
+ if (!out.includes(v)) out.push(v);
+ }
+ return out;
+}
+
+/**
+ * Validate `pluginDependencies`: each `{ id, version }` must reference a valid,
+ * non-self, non-reserved plugin id and a parseable semver range. Duplicate ids
+ * are rejected so a dependency can't be declared with two conflicting ranges.
+ */
+function parsePluginDependencies(raw: unknown, selfId: string): PluginDependency[] {
+ const out: PluginDependency[] = [];
+ for (const v of arr(raw)) {
+ if (!v || typeof v !== 'object') throw new ManifestError('each pluginDependencies entry must be an object');
+ const d = v as Record<string, unknown>;
+ const id = str(d.id, 'pluginDependencies.id');
+ if (!ID_RE.test(id)) throw new ManifestError(`invalid pluginDependencies id "${id}"`);
+ if (RESERVED_IDS.has(id)) throw new ManifestError(`reserved pluginDependencies id "${id}"`);
+ if (id === selfId) throw new ManifestError(`plugin "${selfId}" cannot depend on itself`);
+ if (out.some((e) => e.id === id)) throw new ManifestError(`duplicate pluginDependencies id "${id}"`);
+ const version = str(d.version, 'pluginDependencies.version');
+ if (semver.validRange(version) === null) throw new ManifestError(`invalid pluginDependencies version range "${version}" for "${id}"`);
+ out.push({ id, version });
+ }
+ return out;
+}
+
+// Export function / event names exposed to other plugins. Kept to a safe
+// identifier shape (dots allowed for event names like `rate.updated`).
+const CAPABILITY_NAME_RE = /^[a-zA-Z][a-zA-Z0-9._-]{0,63}$/;
+
function parseCapabilities(raw: unknown): PluginCapabilities {
if (!raw || typeof raw !== 'object') return {};
const c = raw as Record<string, unknown>;
@@ -132,13 +192,29 @@ function parseCapabilities(raw: unknown): PluginCapabilities {
if (c.widget && typeof c.widget === 'object') {
const w = c.widget as Record<string, unknown>;
const slot = optStr(w.slot);
- if (slot && slot !== 'sidebar' && slot !== 'hero') throw new ManifestError(`invalid widget slot "${slot}"`);
+ if (slot && slot !== 'sidebar' && slot !== 'hero' && slot !== 'place-detail') throw new ManifestError(`invalid widget slot "${slot}"`);
out.widget = {
title: optStr(w.title),
defaultSize: optStr(w.defaultSize),
slot: (slot as WidgetCapability['slot']) ?? 'sidebar',
};
}
+ const provides = parseCapabilityNames(c.provides, 'provides');
+ if (provides.length) out.provides = provides;
+ const emits = parseCapabilityNames(c.emits, 'emits');
+ if (emits.length) out.emits = emits;
+ return out;
+}
+
+/** Validate a `provides`/`emits` array: de-duplicated, well-formed names. */
+function parseCapabilityNames(raw: unknown, field: string): string[] {
+ if (raw === undefined) return [];
+ if (!Array.isArray(raw)) throw new ManifestError(`capabilities.${field} must be an array of names`);
+ const out: string[] = [];
+ for (const v of raw) {
+ if (typeof v !== 'string' || !CAPABILITY_NAME_RE.test(v)) throw new ManifestError(`invalid capabilities.${field} entry "${String(v)}"`);
+ if (!out.includes(v)) out.push(v);
+ }
return out;
}
diff --git a/server/src/nest/plugins/place-details.controller.ts b/server/src/nest/plugins/place-details.controller.ts
new file mode 100644
index 000000000..df7646b7d
--- /dev/null
+++ b/server/src/nest/plugins/place-details.controller.ts
@@ -0,0 +1,52 @@
+import { Controller, Get, Param, Req, UseGuards } from '@nestjs/common';
+import type { Request } from 'express';
+import { db, canAccessTrip } from '../../db/database';
+import { JwtAuthGuard } from '../auth/jwt-auth.guard';
+import { pluginsEnabled } from './kill-switch';
+import { PluginRuntimeService } from './plugin-runtime.service';
+
+/**
+ * GET /api/place-details/:placeId — extra info for a place, contributed by plugins
+ * that implement the `placeDetailProvider` hook (#1429). Additive and fail-safe:
+ * the place must belong to a trip the caller can access, each provider is called
+ * host→plugin with a short timeout, and a provider that errors or times out is
+ * simply skipped — it never delays or breaks the place panel.
+ */
+interface ProviderResult {
+ pluginId: string;
+ items: unknown;
+}
+
+@Controller('api/place-details')
+@UseGuards(JwtAuthGuard)
+export class PlaceDetailsController {
+ constructor(private readonly runtime: PluginRuntimeService) {}
+
+ @Get(':placeId')
+ async get(
+ @Param('placeId') placeIdRaw: string,
+ @Req() req: Request & { user?: { id: number } },
+ ): Promise<{ providers: ProviderResult[] }> {
+ if (!pluginsEnabled()) return { providers: [] };
+ const placeId = Number(placeIdRaw);
+ const userId = req.user?.id;
+ if (!Number.isFinite(placeId) || userId == null) return { providers: [] };
+
+ // The place must belong to a trip the caller can access — same gate as a read.
+ const row = db.prepare('SELECT trip_id FROM places WHERE id = ?').get(placeId) as { trip_id: number } | undefined;
+ if (!row || !canAccessTrip(row.trip_id, userId)) return { providers: [] };
+
+ const ids = this.runtime.providersOf('placeDetailProvider');
+ const results = await Promise.all(
+ ids.map(async (id): Promise<ProviderResult | null> => {
+ try {
+ const items = await this.runtime.invokeHook(id, 'placeDetailProvider', 'getDetails', [placeId], userId, 5000);
+ return { pluginId: id, items };
+ } catch {
+ return null; // a slow / failing provider is skipped, never fatal
+ }
+ }),
+ );
+ return { providers: results.filter((r): r is ProviderResult => r !== null) };
+ }
+}
diff --git a/server/src/nest/plugins/plugin-runtime.service.ts b/server/src/nest/plugins/plugin-runtime.service.ts
index a25239432..002c1e32e 100644
--- a/server/src/nest/plugins/plugin-runtime.service.ts
+++ b/server/src/nest/plugins/plugin-runtime.service.ts
@@ -1,15 +1,22 @@
import { Injectable, type OnModuleInit, type OnModuleDestroy } from '@nestjs/common';
+import semver from 'semver';
import { db } from '../../db/database';
import { pluginsEnabled } from './kill-switch';
+import { setPluginEventSink } from '../../plugin-event-sink';
import { decrypt_api_key } from '../../services/apiKeyCrypto';
import { PluginSupervisor, type PluginRouteInfo } from './supervisor/plugin-supervisor';
import fs from 'node:fs';
import { createRealRpcHost, closePluginDataDb } from './host/create-rpc-host';
+import { ForbiddenResource } from './host/rpc-host';
import { removePluginData } from './host/plugin-data.service';
import { isKnownPermission } from './protocol/envelope';
import { discoverPlugins } from './install/discovery';
import { pluginCodeDir } from './paths';
import { PluginRegistryService } from './registry/registry.service';
+import { isAddonEnabled } from '../../services/adminService';
+import type { PluginDependency } from './install/manifest';
+import type { VersionMismatch, PluginDepRow } from './dependencies';
+import { parseDependencies, disabledRequiredAddons, resolveDependencyState, enableOrder, findDependentsTransitive, DependencyCycleError } from './dependencies';
const HTTP_OUTBOUND = 'http:outbound:';
@@ -20,6 +27,24 @@ export class PluginConsentRequired extends Error {
}
}
+export type PluginDependencyCode = 'ADDON_DISABLED' | 'DEPENDENCY_MISSING';
+
+/**
+ * Thrown when a plugin can't activate because a required addon is disabled or a
+ * declared plugin dependency is missing / version-mismatched. The controller maps
+ * it to a 409 carrying `code` + `detail` so the admin UI can offer the right fix.
+ */
+export class PluginDependencyError extends Error {
+ constructor(
+ message: string,
+ readonly code: PluginDependencyCode,
+ readonly detail: { addons?: string[]; missing?: PluginDependency[]; versionMismatch?: VersionMismatch[] } = {},
+ ) {
+ super(message);
+ this.name = 'PluginDependencyError';
+ }
+}
+
/**
* Owns the isolated-plugin runtime lifecycle inside NestJS (#plugins, M2).
* Bridges the DB registry (`plugins` rows) to the process supervisor: activate
@@ -28,17 +53,12 @@ export class PluginConsentRequired extends Error {
* `active` plugins on startup when the runtime is enabled.
*/
-interface PluginRow {
- id: string;
- status: string;
- permissions: string;
- granted_permissions: string;
- config: string;
-}
-
@Injectable()
export class PluginRuntimeService implements OnModuleInit, OnModuleDestroy {
- private readonly supervisor = new PluginSupervisor(createRealRpcHost, {
+ // The rpc-host factory is bound to `this` as the inter-plugin router, so a
+ // plugin's ctx.plugins.call / ctx.events.emit resolve through callPlugin/
+ // emitPluginEvent below (which own the dependency-edge authorization).
+ private readonly supervisor = new PluginSupervisor((id, granted) => createRealRpcHost(id, granted, this), {
onStatus: (id, status, error) => {
db.prepare('UPDATE plugins SET status = ?, last_error = ?, updated_at = CURRENT_TIMESTAMP WHERE id = ?').run(
status,
@@ -59,30 +79,67 @@ export class PluginRuntimeService implements OnModuleInit, OnModuleDestroy {
onModuleInit(): void {
if (!pluginsEnabled()) return;
+ // Forward core trip events to plugins that subscribed (events:subscribe). The
+ // sink is name-only + fire-and-forget, so it can never block a core broadcast.
+ setPluginEventSink((tripId, event) => this.supervisor.deliverEvent(tripId, event));
// Discover plugins placed on the volume (registers new ones inactive), then
- // boot the ones an admin had already activated.
+ // boot the ones an admin had already activated — in dependency order so a
+ // plugin's dependencies come up before it does. The whole block is defensive:
+ // boot must NEVER block app init, even in a context without plugin tables
+ // (e.g. a slimmed-down test app that only imports AdminModule).
try {
discoverPlugins(db);
+ const installed = this.installedDepRows();
+ const enabledIds = [...installed.values()].filter((r) => r.enabled).map((r) => r.id);
+ let order: string[];
+ try {
+ order = enableOrder(enabledIds, installed);
+ } catch {
+ // A cycle among enabled plugins — fall back to arbitrary order; each plugin's
+ // own gate still refuses to spawn, so nothing boots into a broken state.
+ order = enabledIds;
+ }
+ for (const id of order) {
+ this.activate(id).catch((e) => {
+ // A plugin whose required addon is off (or a dependency is missing) at boot
+ // must not stay marked enabled — reconcile the row so the UI reflects reality.
+ if (e instanceof PluginDependencyError || e instanceof DependencyCycleError) {
+ this.deactivate(id).catch(() => {});
+ }
+ /* other failures: status is persisted as error by the supervisor hook */
+ });
+ }
} catch {
- /* discovery must never block boot */
- }
- // Boot everything the admin left ENABLED, regardless of the last runtime
- // status — a crash or a bad deploy set status='error' but must not silently
- // keep the plugin down forever.
- const enabled = db.prepare('SELECT id FROM plugins WHERE enabled = 1').all() as Array<{ id: string }>;
- for (const { id } of enabled) {
- this.activate(id).catch(() => {
- /* status is persisted as error by the supervisor hook */
- });
+ /* discovery/boot must never block app init */
}
}
+ /**
+ * Disable every plugin that can no longer run now that `addonId` was turned off:
+ * plugins that require the addon, plus everything that (transitively) depends on
+ * them. Called from the admin addon-toggle handler. No-op for an addon no plugin
+ * requires. Returns the ids actually deactivated.
+ */
+ async deactivateForDisabledAddon(addonId: string): Promise<string[]> {
+ const rows = db.prepare('SELECT id, version, enabled, dependencies FROM plugins').all() as PluginDepRow[];
+ const directlyAffected = rows
+ .filter((r) => r.enabled && parseDependencies(r.dependencies).requiredAddons.includes(addonId))
+ .map((r) => r.id);
+ const affected = new Set<string>(directlyAffected);
+ for (const id of directlyAffected) for (const dep of findDependentsTransitive(id, rows)) affected.add(dep);
+ const enabledById = new Map(rows.map((r) => [r.id, r.enabled]));
+ const toDisable = [...affected].filter((id) => enabledById.get(id));
+ for (const id of toDisable) await this.deactivate(id).catch(() => {});
+ return toDisable;
+ }
+
/** Re-scan the plugins volume on demand (admin action). */
rescan(): { discovered: string[]; skipped: string[] } {
return discoverPlugins(db);
}
async onModuleDestroy(): Promise<void> {
+ setPluginEventSink(null);
await this.supervisor.shutdownAll();
}
@@ -97,8 +154,40 @@ export class PluginRuntimeService implements OnModuleInit, OnModuleDestroy {
* update consent dialog), and otherwise throws PluginConsentRequired.
*/
async activate(id: string, consentWiden = false): Promise<void> {
- const row = db.prepare('SELECT id, status, permissions, granted_permissions, config FROM plugins WHERE id = ?').get(id) as
- | PluginRow
+ const installed = this.installedDepRows();
+ // Deps-first order over the installed graph (throws DependencyCycleError on a
+ // cycle). Missing deps aren't in `installed` so they don't appear here — the
+ // per-node gate reports those separately.
+ const order = enableOrder([id], installed);
+ const rootInstalled = installed.has(id);
+
+ // Read-only pre-flight over the whole chain BEFORE mutating anything, so a
+ // blocked dependency never leaves the chain half-activated. Only the target
+ // may consent-widen; dependencies are auto-enabled at their existing grant.
+ const toCheck = rootInstalled ? order : [id];
+ for (const nodeId of toCheck) this.assertActivatable(nodeId, installed, nodeId === id ? consentWiden : false);
+
+ // Enable dependencies first (skip ones already enabled), then the target.
+ for (const nodeId of order) {
+ if (nodeId !== id && installed.get(nodeId)?.enabled) continue;
+ await this.spawnActivated(nodeId);
+ }
+ }
+
+ /** All plugin rows projected to what the dependency helpers reason over. */
+ private installedDepRows(): Map<string, PluginDepRow> {
+ const rows = db.prepare('SELECT id, version, enabled, dependencies FROM plugins').all() as PluginDepRow[];
+ return new Map(rows.map((r) => [r.id, r]));
+ }
+
+ /**
+ * Read-only activation gate for one plugin — throws (without mutating) if it may
+ * not activate. Checks run most- to least-severe: permission re-consent →
+ * required addon disabled → missing/mismatched plugin dependency.
+ */
+ private assertActivatable(id: string, installed: Map<string, PluginDepRow>, consentWiden: boolean): void {
+ const row = db.prepare('SELECT permissions, granted_permissions, dependencies FROM plugins WHERE id = ?').get(id) as
+ | { permissions: string; granted_permissions: string; dependencies: string | null }
| undefined;
if (!row) throw new Error(`plugin ${id} not found`);
@@ -114,10 +203,34 @@ export class PluginRuntimeService implements OnModuleInit, OnModuleDestroy {
const newPermissions = newGrants.filter((p) => !p.startsWith(HTTP_OUTBOUND));
throw new PluginConsentRequired(`plugin ${id} requests new permissions; explicit re-consent is required`, newPermissions, newEgress);
}
+
+ const deps = parseDependencies(row.dependencies);
+ const disabledAddons = disabledRequiredAddons(deps, isAddonEnabled);
+ if (disabledAddons.length) {
+ throw new PluginDependencyError(`plugin ${id} requires disabled addon(s): ${disabledAddons.join(', ')}`, 'ADDON_DISABLED', {
+ addons: disabledAddons,
+ });
+ }
+ const state = resolveDependencyState(deps, installed);
+ if (state.missing.length || state.versionMismatch.length) {
+ throw new PluginDependencyError(`plugin ${id} has unmet plugin dependencies`, 'DEPENDENCY_MISSING', {
+ missing: state.missing,
+ versionMismatch: state.versionMismatch,
+ });
+ }
+ }
+
+ /** Mark a (pre-validated) plugin enabled and spawn its child. */
+ private async spawnActivated(id: string): Promise<void> {
+ const row = db.prepare('SELECT permissions, config FROM plugins WHERE id = ?').get(id) as
+ | { permissions: string; config: string }
+ | undefined;
+ if (!row) throw new Error(`plugin ${id} not found`);
+ const declared = parseArray(row.permissions).filter(isKnownPermission);
// Mark it enabled (admin intent) so it reboots after restarts/crashes.
db.prepare('UPDATE plugins SET granted_permissions = ?, enabled = 1 WHERE id = ?').run(JSON.stringify(declared), id);
const config = decryptConfig(parseObject(row.config));
- const egress = declared.filter((p) => p.startsWith('http:outbound:')).map((p) => p.slice('http:outbound:'.length));
+ const egress = declared.filter((p) => p.startsWith(HTTP_OUTBOUND)).map((p) => p.slice(HTTP_OUTBOUND.length));
await this.supervisor.activate(id, new Set(declared), config, egress);
}
@@ -127,6 +240,26 @@ export class PluginRuntimeService implements OnModuleInit, OnModuleDestroy {
db.prepare("UPDATE plugins SET status = 'inactive', enabled = 0, updated_at = CURRENT_TIMESTAMP WHERE id = ?").run(id);
}
+ /**
+ * Admin-initiated deactivation: turn `id` off AND every plugin that (transitively)
+ * depends on it — a dependent can't run without its dependency (its ctx.plugins.call
+ * would fail), so it must not be left enabled. Dependents are stopped before the
+ * dependency. Returns every id actually deactivated (dependents first, then `id`).
+ *
+ * This is separate from the low-level `deactivate()` so the internal stop-then-
+ * restart of update()/sideload() never disables a plugin's dependents.
+ */
+ async deactivateWithDependents(id: string): Promise<string[]> {
+ const rows = db.prepare('SELECT id, version, enabled, dependencies FROM plugins').all() as PluginDepRow[];
+ const enabledById = new Map(rows.map((r) => [r.id, r.enabled]));
+ // findDependentsTransitive returns nearest-first; reverse so the deepest dependent
+ // (the furthest caller) stops before the plugin it depends on.
+ const dependents = findDependentsTransitive(id, rows).filter((d) => enabledById.get(d)).reverse();
+ const order = [...dependents, id];
+ for (const pid of order) await this.deactivate(pid).catch(() => {});
+ return order;
+ }
+
/**
* Update a plugin to the registry's latest version with a re-consent gate: the
* new version's declared permissions are diffed against what the admin already
@@ -166,6 +299,33 @@ export class PluginRuntimeService implements OnModuleInit, OnModuleDestroy {
return { version: res.version, activated: false, newPermissions, newEgress };
}
+ /**
+ * Sideload a plugin from an uploaded archive (admin "Upload plugin"). Extracts +
+ * validates into staging first, stops any running child of the same id (its code
+ * dir is about to be replaced, and on Windows the child holds file locks), then
+ * commits it as an INACTIVE sideloaded plugin. Never auto-activates — the admin
+ * re-activates (and re-consents to permissions) explicitly.
+ */
+ async sideload(bytes: Buffer): Promise<{ id: string; version: string; replaced: boolean }> {
+ if (!this.registry) throw new Error('registry service unavailable');
+ const staged = this.registry.stageUpload(bytes);
+ try {
+ const replaced = !!db.prepare('SELECT id FROM plugins WHERE id = ?').get(staged.id);
+ // Force any replaced plugin INACTIVE before the swap: stop a running child
+ // (it holds file locks and would keep executing stale code) AND clear the
+ // active flag, so replaced code can never keep running — or even show active
+ // — without a fresh activation + permission consent. deactivate() no-ops on
+ // a plugin that isn't running.
+ if (replaced) await this.deactivate(staged.id);
+ this.registry.commitUpload(staged); // moves code + registers INACTIVE, then clears staging
+ return { id: staged.id, version: staged.version, replaced };
+ } catch (e) {
+ // A failure before commitUpload leaves staging behind — clean it up.
+ try { fs.rmSync(staged.stagingDir, { recursive: true, force: true }); } catch {}
+ throw e;
+ }
+ }
+
/** Stop the plugin, remove its code, and optionally delete all its data. */
async uninstall(id: string, deleteData: boolean): Promise<void> {
await this.supervisor.disable(id);
@@ -178,6 +338,7 @@ export class PluginRuntimeService implements OnModuleInit, OnModuleDestroy {
removePluginData(id);
db.prepare('DELETE FROM plugin_error_log WHERE plugin_id = ?').run(id);
db.prepare("DELETE FROM settings WHERE key LIKE ?").run(`plugin:${id}:%`);
+ db.prepare('DELETE FROM plugin_entity_metadata WHERE plugin_id = ?').run(id);
}
}
@@ -202,6 +363,89 @@ export class PluginRuntimeService implements OnModuleInit, OnModuleDestroy {
invoke(id: string, method: string, params: Record<string, unknown>, actingUserId?: number): Promise<unknown> {
return this.supervisor.invoke(id, method, params, { actingUserId });
}
+ /** Ids of active plugins implementing a provider hook (e.g. 'placeDetailProvider'). */
+ providersOf(hook: string): string[] {
+ return this.supervisor.providersOf(hook);
+ }
+ /**
+ * Ask ONE plugin's provider hook for data (host→plugin). A tighter default
+ * timeout than a route call so a slow provider can't delay the core response;
+ * the acting user is host-bound so any trip read the hook makes is membership-checked.
+ */
+ invokeHook(id: string, hook: string, fn: string, args: unknown[], actingUserId?: number, timeoutMs = 5000): Promise<unknown> {
+ // Defense-in-depth: only a plugin that both implements the hook AND holds the
+ // hook:* grant (providersOf enforces both) may be invoked, even if a caller
+ // passes an id directly rather than one returned by providersOf.
+ if (!this.supervisor.providersOf(hook).includes(id)) {
+ return Promise.reject(new Error(`plugin ${id} is not a granted provider of ${hook}`));
+ }
+ return this.supervisor.invoke(id, 'invoke.hook', { hook, fn, args }, { actingUserId, timeoutMs });
+ }
+
+ // ── Inter-plugin router (implements PluginCallRouter; #plugins deps) ──────────
+
+ /**
+ * Route `caller`'s ctx.plugins.call to `target`'s export. Authorization is the
+ * dependency edge — the caller must declare `target` as a version-satisfied
+ * `pluginDependency` — plus the target must expose `fn` (declared in its manifest
+ * `capabilities.provides` AND implemented, as reported at load). The acting user
+ * is forwarded, so the target's export runs membership-checked as the caller's user.
+ */
+ callPlugin(callerId: string, targetId: string, fn: string, args: unknown, actingUserId: number | undefined): Promise<unknown> {
+ if (!this.supervisor.isActive(targetId)) {
+ return Promise.reject(new ForbiddenResource(`plugin ${targetId} is not active`));
+ }
+ if (!this.dependsOnSatisfied(callerId, targetId)) {
+ return Promise.reject(new ForbiddenResource(`plugin ${callerId} does not declare ${targetId} as a satisfied dependency`));
+ }
+ if (!this.capabilityList(targetId, 'provides').includes(fn) || !this.supervisor.exportsOf(targetId).includes(fn)) {
+ return Promise.reject(new ForbiddenResource(`plugin ${targetId} does not export "${fn}"`));
+ }
+ return this.supervisor.invoke(targetId, 'invoke.export', { fn, args }, { actingUserId, timeoutMs: 5000 });
+ }
+
+ /**
+ * Fan out an event emitted by `source` to every active plugin that (a) subscribed
+ * to `(source, event)` and (b) declares `source` as a satisfied dependency. The
+ * source must declare `event` in its manifest `capabilities.emits`. Fire-and-forget.
+ */
+ emitPluginEvent(sourceId: string, event: string, payload: unknown): void {
+ if (!this.capabilityList(sourceId, 'emits').includes(event)) {
+ throw new ForbiddenResource(`plugin ${sourceId} does not declare event "${event}"`);
+ }
+ for (const subscriberId of this.supervisor.subscribersOf(sourceId, event)) {
+ if (!this.dependsOnSatisfied(subscriberId, sourceId)) continue;
+ this.supervisor
+ .invoke(subscriberId, 'invoke.pluginEvent', { source: sourceId, event, payload }, { actingUserId: undefined, timeoutMs: 5000 })
+ .catch(() => {
+ /* a subscriber that throws/times out must not affect the emitter or peers */
+ });
+ }
+ }
+
+ /** True if `caller` declares `target` as a plugin dependency whose range the
+ * installed target version satisfies. */
+ private dependsOnSatisfied(callerId: string, targetId: string): boolean {
+ const caller = db.prepare('SELECT dependencies FROM plugins WHERE id = ?').get(callerId) as { dependencies: string | null } | undefined;
+ const target = db.prepare('SELECT version FROM plugins WHERE id = ?').get(targetId) as { version: string | null } | undefined;
+ if (!caller || !target) return false;
+ const dep = parseDependencies(caller.dependencies).pluginDependencies.find((d) => d.id === targetId);
+ if (!dep) return false;
+ return semver.satisfies(target.version ?? '0.0.0', dep.version, { includePrerelease: true });
+ }
+
+ /** A plugin's declared `capabilities.provides`/`capabilities.emits` (from the DB). */
+ private capabilityList(id: string, field: 'provides' | 'emits'): string[] {
+ const row = db.prepare('SELECT capabilities FROM plugins WHERE id = ?').get(id) as { capabilities: string } | undefined;
+ if (!row) return [];
+ try {
+ const c = JSON.parse(row.capabilities || '{}') as Record<string, unknown>;
+ const v = c[field];
+ return Array.isArray(v) ? v.filter((x): x is string => typeof x === 'string') : [];
+ } catch {
+ return [];
+ }
+ }
}
function parseArray(json: string): string[] {
diff --git a/server/src/nest/plugins/plugins-feed.controller.ts b/server/src/nest/plugins/plugins-feed.controller.ts
index 5d63d2d44..15a77637a 100644
--- a/server/src/nest/plugins/plugins-feed.controller.ts
+++ b/server/src/nest/plugins/plugins-feed.controller.ts
@@ -15,7 +15,7 @@ interface ActivePlugin {
name: string;
type: string;
icon: string | null;
- slot: 'sidebar' | 'hero';
+ slot: 'sidebar' | 'hero' | 'place-detail';
}
@Controller('api/plugins')
@@ -32,10 +32,11 @@ export class PluginsFeedController {
}
}
-function slotOf(capabilities: string): 'sidebar' | 'hero' {
+function slotOf(capabilities: string): 'sidebar' | 'hero' | 'place-detail' {
try {
const c = JSON.parse(capabilities || '{}') as { widget?: { slot?: string } };
- return c.widget?.slot === 'hero' ? 'hero' : 'sidebar';
+ const slot = c.widget?.slot;
+ return slot === 'hero' || slot === 'place-detail' ? slot : 'sidebar';
} catch {
return 'sidebar';
}
diff --git a/server/src/nest/plugins/plugins-proxy.controller.ts b/server/src/nest/plugins/plugins-proxy.controller.ts
index 5276c3655..b5d45b053 100644
--- a/server/src/nest/plugins/plugins-proxy.controller.ts
+++ b/server/src/nest/plugins/plugins-proxy.controller.ts
@@ -22,6 +22,30 @@ import { PluginRuntimeService } from './plugin-runtime.service';
// consumers (the plugin's own client) are unaffected — fetch ignores both.
const SAFE_RESPONSE_HEADERS = new Set(['content-type', 'cache-control']);
+// Origin used only to parse a plugin-supplied redirect target. Any host works as
+// long as it can never match a real one, so a target that stays "same-origin"
+// after WHATWG URL parsing is provably a relative in-app path.
+const REDIRECT_BASE = 'https://trek.invalid';
+
+/**
+ * Return a plugin redirect `Location` ONLY if it is a same-origin (relative)
+ * target, normalised to path+query+hash; otherwise `null`. Parsing (rather than
+ * regex-matching the raw string) is what makes this safe against the open-redirect
+ * bypasses browsers introduce for special schemes: `\` normalised to `/`, stripped
+ * tab/newline, protocol-relative `//host`, and fully-qualified/other-scheme URLs
+ * all resolve to a different origin and are rejected.
+ */
+function toRelativeLocation(loc: unknown): string | null {
+ if (typeof loc !== 'string' || loc === '') return null;
+ try {
+ const u = new URL(loc, REDIRECT_BASE);
+ if (u.origin !== REDIRECT_BASE) return null;
+ return u.pathname + u.search + u.hash;
+ } catch {
+ return null;
+ }
+}
+
@Controller('api/plugins/:pluginId')
export class PluginsProxyController {
constructor(private readonly runtime: PluginRuntimeService) {}
@@ -82,11 +106,17 @@ export class PluginsProxyController {
// redirects and fall through to the normal path.
if ([301, 302, 303, 307, 308].includes(status)) {
const loc = Object.entries(headers).find(([k]) => k.toLowerCase() === 'location')?.[1];
- if (typeof loc !== 'string' || !/^\/(?!\/)/.test(loc)) {
+ // Resolve against a throwaway origin and require the result to stay on it:
+ // only a same-origin (relative) target survives. A string check can't do
+ // this safely — browsers normalise `\` to `/` and strip tab/newline for
+ // http(s), so `/\evil.com`, `/<tab>/evil.com`, `//evil.com`, and any
+ // absolute URL all resolve off-origin and must be rejected.
+ const safeLoc = toRelativeLocation(loc);
+ if (!safeLoc) {
res.status(502).json({ error: 'Plugin error', detail: 'unsafe redirect target' });
return;
}
- res.status(status).setHeader('Location', loc);
+ res.status(status).setHeader('Location', safeLoc);
res.end();
return;
}
diff --git a/server/src/nest/plugins/plugins.controller.ts b/server/src/nest/plugins/plugins.controller.ts
index d61fc991e..38aa03abe 100644
--- a/server/src/nest/plugins/plugins.controller.ts
+++ b/server/src/nest/plugins/plugins.controller.ts
@@ -1,6 +1,8 @@
-import { Body, Controller, Delete, Get, HttpCode, HttpException, Param, Post, Put, UseGuards } from '@nestjs/common';
+import { Body, Controller, Delete, Get, HttpCode, HttpException, Param, Post, Put, Query, UploadedFile, UseGuards, UseInterceptors } from '@nestjs/common';
+import { FileInterceptor } from '@nestjs/platform-express';
import { PluginsService } from './plugins.service';
-import { PluginRuntimeService, PluginConsentRequired } from './plugin-runtime.service';
+import { PluginRuntimeService, PluginConsentRequired, PluginDependencyError } from './plugin-runtime.service';
+import { DependencyCycleError } from './dependencies';
import { PluginRegistryService } from './registry/registry.service';
import { JwtAuthGuard } from '../auth/jwt-auth.guard';
import { AdminGuard } from '../auth/admin.guard';
@@ -29,8 +31,8 @@ export class PluginsController {
}
@Get('registry')
- browse() {
- return this.registry.browse();
+ browse(@Query('refresh') refresh?: string) {
+ return this.registry.browse(refresh === '1' || refresh === 'true');
}
@Get('registry/:id')
@@ -44,16 +46,34 @@ export class PluginsController {
@Post('install')
@HttpCode(200)
- async install(@Body() body: { id?: string; version?: string }) {
+ async install(@Body() body: { id?: string; version?: string; constraint?: string; withDependencies?: boolean }) {
if (!pluginsEnabled()) throw new HttpException({ error: 'Plugins are disabled by server configuration' }, 503);
if (!body?.id) throw new HttpException({ error: 'id is required' }, 400);
try {
- return await this.registry.install(body.id, body.version);
+ // withDependencies (used by the "resolve missing dependency" admin flow) pulls
+ // the target + its transitive plugin deps, resolving each to its latest
+ // compatible version and reporting addons the admin still has to enable.
+ if (body.withDependencies) return await this.registry.installWithDependencies(body.id, body.constraint);
+ return await this.registry.install(body.id, { version: body.version, constraint: body.constraint });
} catch (e) {
throw new HttpException({ error: e instanceof Error ? e.message : 'install failed' }, 400);
}
}
+ /** Sideload a plugin from an uploaded .zip/.tar.gz (registers INACTIVE). */
+ @Post('upload')
+ @HttpCode(200)
+ @UseInterceptors(FileInterceptor('file', { limits: { fileSize: 50 * 1024 * 1024 + 4096 } }))
+ async upload(@UploadedFile() file?: Express.Multer.File) {
+ if (!pluginsEnabled()) throw new HttpException({ error: 'Plugins are disabled by server configuration' }, 503);
+ if (!file?.buffer?.length) throw new HttpException({ error: 'no file uploaded' }, 400);
+ try {
+ return await this.runtime.sideload(file.buffer);
+ } catch (e) {
+ throw new HttpException({ error: e instanceof Error ? e.message : 'upload failed' }, 400);
+ }
+ }
+
@Get(':id/config')
getConfig(@Param('id') id: string) {
return { config: this.plugins.getInstanceConfig(id) };
@@ -76,6 +96,14 @@ export class PluginsController {
if (e instanceof PluginConsentRequired) {
throw new HttpException({ error: e.message, code: 'CONSENT_REQUIRED', newPermissions: e.newPermissions, newEgress: e.newEgress }, 409);
}
+ // Unmet dependency (disabled addon / missing / version-mismatched plugin) —
+ // the UI offers the right fix (enable addon, or download the dependency).
+ if (e instanceof PluginDependencyError) {
+ throw new HttpException({ error: e.message, code: e.code, ...e.detail }, 409);
+ }
+ if (e instanceof DependencyCycleError) {
+ throw new HttpException({ error: e.message, code: 'DEPENDENCY_CYCLE', cyclePath: e.cyclePath }, 409);
+ }
throw new HttpException({ error: e instanceof Error ? e.message : 'activation failed' }, 400);
}
return { status: this.runtime.isActive(id) ? 'active' : 'error' };
@@ -84,7 +112,9 @@ export class PluginsController {
@Post(':id/deactivate')
@HttpCode(200)
async deactivate(@Param('id') id: string) {
- await this.runtime.deactivate(id);
+ // Cascade: disabling a plugin also disables everything that depends on it (a
+ // dependent can't run without its dependency). The client refresh reflects it.
+ await this.runtime.deactivateWithDependents(id);
return { status: 'inactive' };
}
diff --git a/server/src/nest/plugins/plugins.module.ts b/server/src/nest/plugins/plugins.module.ts
index c517778ff..8561b4342 100644
--- a/server/src/nest/plugins/plugins.module.ts
+++ b/server/src/nest/plugins/plugins.module.ts
@@ -3,6 +3,8 @@ import { PluginsController } from './plugins.controller';
import { PluginsFeedController } from './plugins-feed.controller';
import { PluginsProxyController } from './plugins-proxy.controller';
import { PluginFrameController } from './plugin-frame.controller';
+import { PlaceDetailsController } from './place-details.controller';
+import { TripWarningsController } from './trip-warnings.controller';
import { PluginsService } from './plugins.service';
import { PluginRuntimeService } from './plugin-runtime.service';
import { PluginRegistryService } from './registry/registry.service';
@@ -15,7 +17,10 @@ import { PluginRegistryService } from './registry/registry.service';
* widget assets at /plugin-frame/:id/*.
*/
@Module({
- controllers: [PluginsController, PluginsFeedController, PluginsProxyController, PluginFrameController],
+ controllers: [PluginsController, PluginsFeedController, PluginsProxyController, PluginFrameController, PlaceDetailsController, TripWarningsController],
providers: [PluginsService, PluginRuntimeService, PluginRegistryService],
+ // Exported so the admin addon-toggle handler can cascade-disable plugins whose
+ // required addon was just turned off (#plugins dependencies).
+ exports: [PluginRuntimeService],
})
export class PluginsModule {}
diff --git a/server/src/nest/plugins/plugins.service.ts b/server/src/nest/plugins/plugins.service.ts
index 0b7f87a68..e4a1cede3 100644
--- a/server/src/nest/plugins/plugins.service.ts
+++ b/server/src/nest/plugins/plugins.service.ts
@@ -3,9 +3,14 @@ import { db } from '../../db/database';
import { pluginsEnabled } from './kill-switch';
import { maybe_encrypt_api_key } from '../../services/apiKeyCrypto';
import { readAudit } from './host/plugin-audit';
+import { isAddonEnabled } from '../../services/adminService';
+import { parseDependencies, disabledRequiredAddons, resolveDependencyState, type PluginDepRow, type PluginDependencies, type VersionMismatch } from './dependencies';
+import type { PluginDependency } from './install/manifest';
const SECRET_MASK = '••••••••';
+export type PluginDependencyStatus = 'ok' | 'addonDisabled' | 'missingPlugin';
+
/**
* Read side of the plugin system (#plugins), M0 scaffold. Lists installed
* plugins from the `plugins` registry table and reports whether the runtime is
@@ -13,6 +18,23 @@ const SECRET_MASK = '••••••••';
* install pipeline and registry fetch land in later milestones.
*/
+interface PluginRawRow {
+ id: string;
+ name: string;
+ description: string | null;
+ type: string;
+ icon: string | null;
+ version: string | null;
+ status: string;
+ enabled: number;
+ last_error: string | null;
+ reviewed_at: string | null;
+ source_repo: string | null;
+ permissions: string;
+ capabilities: string;
+ dependencies: string | null;
+}
+
export interface PluginListItem {
id: string;
name: string;
@@ -29,19 +51,45 @@ export interface PluginListItem {
permissions: string;
/** Declared capabilities (JSON string) — e.g. widget slot. */
capabilities: string;
+ /** Declared dependencies (parsed) — required addons + plugin deps. */
+ dependencies: PluginDependencies;
+ /** Whether this plugin can currently activate, and why not if it can't. */
+ dependencyStatus: PluginDependencyStatus;
+ /** The concrete blockers, so the UI can render chips + the resolve dialog. */
+ dependencyIssues: { disabledAddons: string[]; missing: PluginDependency[]; versionMismatch: VersionMismatch[] };
}
@Injectable()
export class PluginsService {
list(): { enabled: boolean; plugins: PluginListItem[] } {
- const plugins = db
+ const rows = db
.prepare(
`SELECT id, name, description, type, icon, version, status, enabled, last_error, reviewed_at, source_repo,
- permissions, capabilities
+ permissions, capabilities, dependencies
FROM plugins
ORDER BY sort_order, name`,
)
- .all() as PluginListItem[];
+ .all() as PluginRawRow[];
+ const installed = new Map<string, PluginDepRow>(
+ rows.map((r) => [r.id, { id: r.id, version: r.version, enabled: r.enabled, dependencies: r.dependencies }]),
+ );
+ const plugins: PluginListItem[] = rows.map((r) => {
+ const deps = parseDependencies(r.dependencies);
+ const disabledAddons = disabledRequiredAddons(deps, isAddonEnabled);
+ const state = resolveDependencyState(deps, installed);
+ const dependencyStatus: PluginDependencyStatus = disabledAddons.length
+ ? 'addonDisabled'
+ : state.missing.length || state.versionMismatch.length
+ ? 'missingPlugin'
+ : 'ok';
+ const { dependencies: _raw, ...rest } = r;
+ return {
+ ...rest,
+ dependencies: deps,
+ dependencyStatus,
+ dependencyIssues: { disabledAddons, missing: state.missing, versionMismatch: state.versionMismatch },
+ };
+ });
return { enabled: pluginsEnabled(), plugins };
}
diff --git a/server/src/nest/plugins/protocol/envelope.ts b/server/src/nest/plugins/protocol/envelope.ts
index 9ab504937..e3eba1f85 100644
--- a/server/src/nest/plugins/protocol/envelope.ts
+++ b/server/src/nest/plugins/protocol/envelope.ts
@@ -53,6 +53,26 @@ export const KNOWN_METHODS = [
'trips.getById',
'trips.getPlaces',
'trips.getReservations',
+ 'packing.list',
+ 'files.list',
+ 'costs.getByTrip',
+ 'costs.listMine',
+ 'costs.create',
+ 'costs.update',
+ 'costs.delete',
+ 'places.create',
+ 'places.update',
+ 'places.delete',
+ 'days.create',
+ 'days.update',
+ 'days.delete',
+ 'itinerary.assign',
+ 'itinerary.unassign',
+ 'trips.update',
+ 'meta.get',
+ 'meta.set',
+ 'meta.list',
+ 'meta.delete',
'users.getById',
'ws.broadcastToTrip',
'ws.broadcastToUser',
@@ -67,6 +87,26 @@ export const METHOD_PERMISSION: Record<KnownMethod, string> = {
'trips.getById': 'db:read:trips',
'trips.getPlaces': 'db:read:trips',
'trips.getReservations': 'db:read:trips',
+ 'packing.list': 'db:read:packing',
+ 'files.list': 'db:read:files',
+ 'costs.getByTrip': 'db:read:costs',
+ 'costs.listMine': 'db:read:costs',
+ 'costs.create': 'db:write:costs',
+ 'costs.update': 'db:write:costs',
+ 'costs.delete': 'db:write:costs',
+ 'places.create': 'db:write:places',
+ 'places.update': 'db:write:places',
+ 'places.delete': 'db:write:places',
+ 'days.create': 'db:write:days',
+ 'days.update': 'db:write:days',
+ 'days.delete': 'db:write:days',
+ 'itinerary.assign': 'db:write:itinerary',
+ 'itinerary.unassign': 'db:write:itinerary',
+ 'trips.update': 'db:write:trips',
+ 'meta.get': 'db:meta',
+ 'meta.set': 'db:meta',
+ 'meta.list': 'db:meta',
+ 'meta.delete': 'db:meta',
'users.getById': 'db:read:users',
'ws.broadcastToTrip': 'ws:broadcast:trip',
'ws.broadcastToUser': 'ws:broadcast:user',
@@ -77,10 +117,22 @@ export const KNOWN_PERMISSIONS = [
'db:own',
'db:read:trips',
'db:read:users',
+ 'db:read:costs',
+ 'db:read:packing',
+ 'db:read:files',
+ 'db:write:costs',
+ 'db:write:places',
+ 'db:write:days',
+ 'db:write:itinerary',
+ 'db:write:trips',
+ 'db:meta',
'ws:broadcast:trip',
'ws:broadcast:user',
'hook:photo-provider',
'hook:calendar-source',
+ 'hook:place-detail-provider',
+ 'hook:trip-warning-provider',
+ 'events:subscribe',
'http:outbound',
] as const;
diff --git a/server/src/nest/plugins/registry/registry.service.ts b/server/src/nest/plugins/registry/registry.service.ts
index 7f87af3f5..815639401 100644
--- a/server/src/nest/plugins/registry/registry.service.ts
+++ b/server/src/nest/plugins/registry/registry.service.ts
@@ -1,7 +1,9 @@
import { Injectable } from '@nestjs/common';
+import semver from 'semver';
import fs from 'node:fs';
import path from 'node:path';
import { db } from '../../../db/database';
+import type { PluginDependency } from '../install/manifest';
import { pluginCodeDir, pluginsCodeRoot, pluginsDataRoot } from '../paths';
import { safeDownload, sha256Matches } from '../install/safe-fetch';
import { verifyAuthorSignature } from '../install/verify-signature';
@@ -24,6 +26,8 @@ const REGISTRY_URL =
'https://raw.githubusercontent.com/mauriceboe/TREK-Plugins/main/dist/index.json';
const CACHE_TTL = 30 * 60 * 1000;
const MANIFEST_MAX_BYTES = 256 * 1024;
+// Sideload upload ceiling — matches the SDK `pack` limit (50 MB) plus zip overhead.
+const MAX_UPLOAD_BYTES = 50 * 1024 * 1024 + 4096;
interface RegistryVersion {
version: string;
@@ -39,6 +43,10 @@ interface RegistryVersion {
publishedAt?: string;
/** base64 minisign signature (.minisig payload) over the artifact bytes. */
signature?: string;
+ /** Addon ids this version requires enabled (mirrors the manifest; #plugins deps). */
+ requiredAddons?: string[];
+ /** Other plugins this version depends on (mirrors the manifest). */
+ pluginDependencies?: PluginDependency[];
}
export interface RegistryEntry {
id: string;
@@ -67,6 +75,8 @@ export interface ManifestPreview {
settings: Array<{ key: string; label: string; inputType: string; scope: string; required: boolean }>;
license: string | null;
icon: string | null;
+ requiredAddons: string[];
+ pluginDependencies: PluginDependency[];
}
let _cache: { data: Registry; expiresAt: number } | null = null;
@@ -82,11 +92,20 @@ export class RegistryError extends Error {}
@Injectable()
export class PluginRegistryService {
- /** Fetch the aggregated registry (cached, soft-fail, stale-serve). */
- async fetchRegistry(): Promise<Registry> {
- if (_cache && Date.now() < _cache.expiresAt) return _cache.data;
+ /**
+ * Fetch the aggregated registry (cached, soft-fail, stale-serve). Pass
+ * force=true (the admin "rescan" button) to bypass the 30-min cache and also
+ * bust GitHub's raw CDN edge cache (max-age=300), so a just-merged registry
+ * entry shows up right away instead of up to ~35 min later.
+ */
+ async fetchRegistry(force = false): Promise<Registry> {
+ if (!force && _cache && Date.now() < _cache.expiresAt) return _cache.data;
+ if (force) _detailCache.clear();
try {
- const resp = await fetch(REGISTRY_URL, { headers: { 'User-Agent': 'TREK-Server' } });
+ const url = force ? `${REGISTRY_URL}${REGISTRY_URL.includes('?') ? '&' : '?'}_=${Date.now()}` : REGISTRY_URL;
+ const headers: Record<string, string> = { 'User-Agent': 'TREK-Server' };
+ if (force) { headers['Cache-Control'] = 'no-cache'; headers.Pragma = 'no-cache'; }
+ const resp = await fetch(url, { headers });
if (!resp.ok) throw new Error(`registry ${resp.status}`);
const data = (await resp.json()) as Registry;
if (!data || !Array.isArray(data.plugins)) throw new Error('malformed registry');
@@ -98,14 +117,15 @@ export class PluginRegistryService {
}
/** The browse list the admin UI renders (metadata only, no code). */
- async browse(): Promise<Array<Omit<RegistryEntry, 'versions'> & { latest: string | null; minTrekVersion: string | null; screenshotUrl: string | null }>> {
- const reg = await this.fetchRegistry();
+ async browse(force = false): Promise<Array<Omit<RegistryEntry, 'versions'> & { latest: string | null; minTrekVersion: string | null; requiredAddons: string[]; pluginDependencies: PluginDependency[]; screenshotUrl: string | null }>> {
+ const reg = await this.fetchRegistry(force);
return reg.plugins.map((p) => {
const latest = p.versions[0] ?? null;
return {
id: p.id, name: p.name, author: p.author, description: p.description, repo: p.repo,
homepage: p.homepage, tags: p.tags, type: p.type, reviewedAt: p.reviewedAt ?? null,
latest: latest?.version ?? null, minTrekVersion: latest?.minTrekVersion ?? null,
+ requiredAddons: latest?.requiredAddons ?? [], pluginDependencies: latest?.pluginDependencies ?? [],
screenshotUrl: latest ? rawFileUrl(p.repo, latest.commitSha, 'docs/screenshot.png') : null,
};
});
@@ -144,6 +164,7 @@ export class PluginRegistryService {
reviewedAt: entry.reviewedAt ?? null,
latest: latest?.version ?? null, minTrekVersion: latest?.minTrekVersion ?? null,
size: latest?.size ?? null, publishedAt: latest?.publishedAt ?? null,
+ requiredAddons: latest?.requiredAddons ?? [], pluginDependencies: latest?.pluginDependencies ?? [],
screenshotUrl: latest ? rawFileUrl(entry.repo, latest.commitSha, 'docs/screenshot.png') : null,
manifest,
};
@@ -153,13 +174,42 @@ export class PluginRegistryService {
return data;
}
- /** Install a pinned version from the registry. Returns the installed plugin id. */
- async install(id: string, version?: string): Promise<{ id: string; version: string }> {
+ /**
+ * Resolve which registry version of `id` to install: the highest that satisfies
+ * `constraint` (any version if omitted) AND is compatible with the running TREK
+ * version (`minTrekVersion`/`maxTrekVersion`). Throws if the plugin isn't in the
+ * registry or nothing qualifies. Backs "download the latest compatible version".
+ */
+ async resolveVersion(id: string, constraint?: string): Promise<RegistryVersion> {
const reg = await this.fetchRegistry();
const entry = reg.plugins.find((p) => p.id === id);
if (!entry) throw new RegistryError(`plugin ${id} not in registry`);
- const ver = version ? entry.versions.find((v) => v.version === version) : entry.versions[0];
- if (!ver) throw new RegistryError(`version ${version ?? 'latest'} not found for ${id}`);
+ const host = hostVersion();
+ const candidates = entry.versions.filter((v) => {
+ if (constraint && !semver.satisfies(v.version, constraint, { includePrerelease: true })) return false;
+ return hostCompatible(v, host);
+ });
+ if (!candidates.length) {
+ throw new RegistryError(
+ constraint
+ ? `no version of ${id} satisfies "${constraint}" and this TREK version`
+ : `no compatible version of ${id} for this TREK version`,
+ );
+ }
+ return [...candidates].sort((a, b) => semver.rcompare(a.version, b.version))[0];
+ }
+
+ /** Install a version from the registry. Returns the installed plugin id + version. */
+ async install(id: string, opts?: { version?: string; constraint?: string }): Promise<{ id: string; version: string }> {
+ const reg = await this.fetchRegistry();
+ const entry = reg.plugins.find((p) => p.id === id);
+ if (!entry) throw new RegistryError(`plugin ${id} not in registry`);
+ const ver = opts?.version
+ ? entry.versions.find((v) => v.version === opts.version)
+ : opts?.constraint
+ ? await this.resolveVersion(id, opts.constraint)
+ : entry.versions[0];
+ if (!ver) throw new RegistryError(`version ${opts?.version ?? opts?.constraint ?? 'latest'} not found for ${id}`);
// 1. SSRF-safe download + 2. sha256 verify
const { bytes, sha256 } = await safeDownload(ver.downloadUrl, (ver.size ?? 50 * 1024 * 1024) + 4096);
@@ -203,6 +253,85 @@ export class PluginRegistryService {
}
}
+ /**
+ * Install `id` (latest-compatible, or the newest matching `constraint`) together
+ * with any of its declared plugin dependencies that aren't installed yet — each
+ * resolved to the newest version satisfying its declared range. Required addons
+ * can't be installed; they're collected and returned so the caller can prompt the
+ * admin to enable them. Cycle-safe. Already-installed plugins are left untouched.
+ */
+ async installWithDependencies(id: string, constraint?: string): Promise<{ installed: string[]; requiredAddons: string[] }> {
+ const installedNow = new Set((db.prepare('SELECT id FROM plugins').all() as Array<{ id: string }>).map((r) => r.id));
+ const done = new Set<string>();
+ const installed: string[] = [];
+ const requiredAddons = new Set<string>();
+
+ const visit = async (pid: string, range: string | undefined, stack: string[]): Promise<void> => {
+ if (done.has(pid)) return;
+ if (stack.includes(pid)) throw new RegistryError(`plugin dependency cycle: ${[...stack, pid].join(' -> ')}`);
+ const ver = await this.resolveVersion(pid, range); // throws if not in registry / unsatisfiable
+ if (!installedNow.has(pid)) {
+ await this.install(pid, range ? { constraint: range } : undefined);
+ installed.push(pid);
+ installedNow.add(pid);
+ }
+ done.add(pid);
+ for (const a of ver.requiredAddons ?? []) requiredAddons.add(a);
+ for (const dep of ver.pluginDependencies ?? []) await visit(dep.id, dep.version, [...stack, pid]);
+ };
+ await visit(id, constraint, []);
+ return { installed, requiredAddons: [...requiredAddons] };
+ }
+
+ /**
+ * Sideload step 1: extract + validate an uploaded archive into a staging dir,
+ * WITHOUT touching the live plugin. Returns the manifest id/version + the staged
+ * path so the caller can stop a running child before the swap. Same hard guards
+ * as a registry install (slip/bomb-safe extract, strict manifest, no native
+ * binaries) — only the registry sha256/signature checks are absent, because a
+ * sideload has no registry entry. Throws (and self-cleans staging) on failure.
+ */
+ stageUpload(bytes: Buffer): { id: string; version: string; root: string; stagingDir: string } {
+ if (bytes.length > MAX_UPLOAD_BYTES) throw new RegistryError('archive exceeds the 50MB limit');
+ const stagingDir = path.join(pluginsDataRoot(), '.staging', `upload-${Date.now()}`);
+ try {
+ extractArchive(bytes, stagingDir);
+ const root = locateManifestDir(stagingDir);
+ if (!root) throw new RegistryError('archive contains no trek-plugin.json');
+ const manifest = parseManifest(parseJsonText(fs.readFileSync(path.join(root, 'trek-plugin.json'), 'utf8')));
+ if (scanForNativeBinaries(root).length) throw new RegistryError('artifact contains native binaries');
+ return { id: manifest.id, version: manifest.version, root, stagingDir };
+ } catch (e) {
+ fs.rmSync(stagingDir, { recursive: true, force: true });
+ throw e;
+ }
+ }
+
+ /**
+ * Sideload step 2: move a staged upload into place and register it INACTIVE as a
+ * sideloaded plugin — source "local:upload", unsigned, not registry-reviewed, so
+ * the UI flags it and offers no auto-update. The caller MUST have stopped any
+ * running child of this id first (the code dir is replaced).
+ */
+ commitUpload(staged: { id: string; root: string; stagingDir: string }): void {
+ try {
+ const dest = pluginCodeDir(staged.id);
+ fs.mkdirSync(pluginsCodeRoot(), { recursive: true });
+ fs.rmSync(dest, { recursive: true, force: true });
+ fs.renameSync(staged.root, dest);
+ discoverPlugins(db);
+ // Provenance for a sideload, plus a hard INACTIVE floor: discoverPlugins keeps
+ // an existing row's status, so replacing a plugin that was active must not
+ // leave the new code marked active — the admin re-activates (and re-consents
+ // to permissions) explicitly.
+ db.prepare("UPDATE plugins SET source_repo = ?, source_commit = ?, sha256 = ?, reviewed_at = ?, author_pubkey = NULL, status = 'inactive', enabled = 0 WHERE id = ?").run(
+ 'local:upload', null, null, null, staged.id,
+ );
+ } finally {
+ fs.rmSync(staged.stagingDir, { recursive: true, force: true });
+ }
+ }
+
/**
* Verify the author signature (if the entry declares a key + the version a
* signature) and enforce Trust-On-First-Use on the author key.
@@ -237,6 +366,20 @@ function rawFileUrl(repo: string, commitSha: string, file: string): string {
return `https://raw.githubusercontent.com/${repo}/${commitSha}/${file}`;
}
+/** The running TREK version (same source as the rest of the app). */
+function hostVersion(): string {
+ return process.env.APP_VERSION || (require('../../../../package.json') as { version: string }).version;
+}
+
+/** Whether a registry version's host-version bounds admit the running TREK. */
+function hostCompatible(v: RegistryVersion, host: string): boolean {
+ const h = semver.coerce(host)?.version ?? host;
+ if (!semver.valid(h)) return true; // unparseable host — don't block on compat
+ if (v.minTrekVersion && semver.valid(v.minTrekVersion) && semver.lt(h, v.minTrekVersion)) return false;
+ if (v.maxTrekVersion && semver.valid(v.maxTrekVersion) && semver.gt(h, v.maxTrekVersion)) return false;
+ return true;
+}
+
/**
* Tolerant projection of a live manifest for display. Unknown shapes degrade to
* empty lists instead of throwing — a future manifest field must never break
@@ -258,12 +401,20 @@ function previewManifest(raw: unknown): ManifestPreview {
}))
.filter((s) => s.key)
: [];
+ const pluginDependencies = Array.isArray(m.pluginDependencies)
+ ? m.pluginDependencies
+ .filter((d): d is Record<string, unknown> => !!d && typeof d === 'object')
+ .map((d) => ({ id: typeof d.id === 'string' ? d.id : '', version: typeof d.version === 'string' ? d.version : '' }))
+ .filter((d) => d.id && d.version)
+ : [];
return {
permissions: strings(m.permissions),
egress: strings(m.egress),
settings,
license: typeof m.license === 'string' ? m.license : null,
icon: typeof m.icon === 'string' ? m.icon : null,
+ requiredAddons: strings(m.requiredAddons),
+ pluginDependencies,
};
}
diff --git a/server/src/nest/plugins/runtime/plugin-host-entry.ts b/server/src/nest/plugins/runtime/plugin-host-entry.ts
index 4c06cec1c..719f53177 100644
--- a/server/src/nest/plugins/runtime/plugin-host-entry.ts
+++ b/server/src/nest/plugins/runtime/plugin-host-entry.ts
@@ -23,12 +23,20 @@ const pluginId = process.argv[2] || process.env.TREK_PLUGIN_ID || 'unknown';
const pluginDir = process.argv[3] || '';
let pluginConfig: Record<string, unknown> = {};
+// Guards `init` against re-entry (see the message handler). Set the first time a
+// legitimate `init` arrives from the host.
+let initialized = false;
const pending = new Map<string, { resolve: (v: unknown) => void; reject: (e: Error) => void }>();
let seq = 0;
+// Capture the raw IPC write ONCE, before installIpcGuard() locks `process.send`
+// to a throwing stub. The transport keeps sending through this closure; plugin
+// code no longer has any path to the channel. See installIpcGuard().
+const realSend: (msg: Envelope) => void =
+ typeof process.send === 'function' ? process.send.bind(process) : () => {};
function send(msg: Envelope): void {
- process.send?.(msg);
+ realSend(msg);
}
const transport: ChildTransport = {
@@ -73,6 +81,10 @@ function installSdkInjection(requirePlugin: NodeJS.Require): void {
async function boot(config: Record<string, unknown>): Promise<void> {
try {
+ // Seal the raw IPC surface BEFORE any plugin code is required — this is the
+ // first moment untrusted code runs (requirePlugin below). After this, the
+ // plugin can only reach the host through the capability-checked SDK.
+ installIpcGuard();
// createRequire works whether this bootstrap runs as CJS (prod dist) or ESM
// (tsx in tests), so `require` being undefined in ESM never bites us.
const entry = path.join(pluginDir, 'server', 'index.js');
@@ -86,7 +98,13 @@ async function boot(config: Record<string, unknown>): Promise<void> {
// host can proxy HTTP and schedule jobs without re-parsing the manifest.
const routes = (def.routes ?? []).map((r, i) => ({ i, method: r.method, path: r.path, auth: r.auth !== false }));
const jobs = (def.jobs ?? []).map((j) => j.id);
- send({ k: 'evt', topic: 'loaded', data: { routes, jobs } });
+ const hooks = Object.keys((def.hooks ?? {}) as Record<string, unknown>);
+ const events = (def.events ?? []).map((e) => e.on);
+ // Inter-plugin surface: the callable exports this plugin implements, and the
+ // other-plugin events it subscribes to (so the host can route fan-out).
+ const exportNames = Object.keys((def.exports ?? {}) as Record<string, unknown>);
+ const subscriptions = (def.subscriptions ?? []).map((s) => ({ plugin: s.plugin, event: s.event }));
+ send({ k: 'evt', topic: 'loaded', data: { routes, jobs, hooks, events, exports: exportNames, subscriptions } });
// An immediate first heartbeat confirms liveness without waiting a full interval.
send({ k: 'evt', topic: 'heartbeat', data: { rss: process.memoryUsage().rss } });
} catch (e) {
@@ -120,6 +138,50 @@ async function handleInvoke(req: { id: string; method: string; params: Record<st
if (!job) throw new Error(`no job ${jobId}`);
await job.handler(invCtx);
respond(true, { ok: true });
+ } else if (req.method === 'invoke.hook') {
+ // Host→plugin provider call: core asks a hook the plugin implements (e.g.
+ // placeDetailProvider) for data. The hook method gets its args + the per-
+ // invocation ctx (so any trip reads it makes bind to the authenticated user).
+ const hookName = req.params.hook as string;
+ const fnName = req.params.fn as string;
+ const args = (req.params.args as unknown[]) ?? [];
+ const hooks = def.hooks as Record<string, Record<string, (...a: unknown[]) => unknown> | undefined> | undefined;
+ const impl = hooks?.[hookName];
+ if (!impl || typeof impl[fnName] !== 'function') throw new Error(`no hook ${hookName}.${fnName}`);
+ const result = await impl[fnName](...args, invCtx);
+ respond(true, result);
+ } else if (req.method === 'invoke.event') {
+ // A core event fired for a trip. Run every matching subscription. invCtx carries
+ // NO user (delivered like a job), so trip reads are refused — the handler reacts
+ // to the fact of the event, using the plugin's own db / outbound / broadcasts.
+ const eventName = req.params.event as string;
+ const tripId = req.params.tripId as number;
+ const payload = { event: eventName, tripId };
+ for (const sub of def.events ?? []) {
+ if (sub.on === '*' || sub.on === eventName) await sub.handler(payload, invCtx);
+ }
+ respond(true, { ok: true });
+ } else if (req.method === 'invoke.export') {
+ // Another plugin (a declared dependent) called one of our exports. The host has
+ // already authorized the caller + the export name; run it with the per-invocation
+ // ctx so any trip reads bind to the CALLER's acting user (propagated by the host).
+ const fnName = req.params.fn as string;
+ const args = req.params.args;
+ const impl = (def.exports ?? {})[fnName];
+ if (typeof impl !== 'function') throw new Error(`no export ${fnName}`);
+ const result = await impl(args, invCtx);
+ respond(true, result);
+ } else if (req.method === 'invoke.pluginEvent') {
+ // Another plugin (a declared dependency of ours) emitted an event we subscribed
+ // to. Run every matching subscription. invCtx carries NO user (fire-and-forget),
+ // like a core event, but delivers the emitter's payload.
+ const source = req.params.source as string;
+ const eventName = req.params.event as string;
+ const payload = req.params.payload;
+ for (const sub of def.subscriptions ?? []) {
+ if (sub.plugin === source && sub.event === eventName) await sub.handler(payload, invCtx);
+ }
+ respond(true, { ok: true });
} else {
respond(false, `unknown invoke ${req.method}`);
}
@@ -160,6 +222,11 @@ process.on('message', (raw: unknown) => {
}
if (msg.k === 'evt') {
if (msg.topic === 'init') {
+ // One-shot: the host sends `init` exactly once. Refuse any second `init`
+ // so a forged one (e.g. a pre-seal race) can't re-run installEgressGuard
+ // with a widened egress list or re-boot the plugin.
+ if (initialized) return;
+ initialized = true;
const d = msg.data as { config?: Record<string, unknown>; egress?: string[] };
pluginConfig = d.config ?? {};
installEgressGuard(d.egress ?? []);
@@ -168,6 +235,82 @@ process.on('message', (raw: unknown) => {
}
});
+/**
+ * Sever the raw host<->child IPC surface from plugin code. The plugin runs in
+ * THIS process and shares the global `process`, so without this it could bypass
+ * the SDK entirely and talk to the host directly:
+ * - `process.send(...)` — forge lifecycle/RPC envelopes (fake `loaded`/`heartbeat`,
+ * or a `req` carrying another invocation's `_inv` to act as that user).
+ * - `process.on('message', ...)` — eavesdrop on every host→child `req`/`res`
+ * (other invocations' request bodies, user objects, DB results).
+ * - `process.removeAllListeners('message')` — kill the trusted handler and hijack.
+ *
+ * We do NOT override `process.emit`: Node delivers inbound IPC by calling
+ * `process.emit('message', ...)` internally, so a throwing override would break
+ * message delivery to the trusted listener. A plugin synthesizing
+ * `process.emit('message', forged)` is instead defanged elsewhere — a forged
+ * `init` is ignored by the one-shot `initialized` guard, and a forged `req`/`res`/
+ * `shutdown` only affects the plugin's own process (self-harm, no host impact).
+ *
+ * The transport keeps working because `send()` uses the captured `realSend`
+ * closure, and the trusted message listener + crash handlers are already
+ * registered at module-eval (before this runs). Mirrors the `process.binding`
+ * lock in installEgressGuard: same `Object.defineProperty(..., writable:false,
+ * configurable:false)` idiom, same "already locked" swallow. This is a JS-level
+ * defense-in-depth layer; in prod the OS `--permission` model is the real jail.
+ *
+ * MUST run once, before the plugin module is required.
+ */
+function installIpcGuard(): void {
+ const lock = (obj: object, key: string, value: unknown): void => {
+ try {
+ Object.defineProperty(obj, key, { value, writable: false, configurable: false });
+ } catch {
+ /* already locked / non-configurable */
+ }
+ };
+
+ // Outbound: kill the raw write and channel teardown. `realSend` (captured
+ // above) is unaffected — it holds the bound original, not `process.send`.
+ lock(process, 'send', () => {
+ throw new Error('ipc: process.send is disabled for plugins');
+ });
+ lock(process, 'disconnect', () => {
+ throw new Error('ipc: process.disconnect is disabled for plugins');
+ });
+ // NOTE: we intentionally do NOT lock `process.channel`/`process._channel`.
+ // Node's own outbound send (`realSend`, the bound original) reads the pipe
+ // handle back off `process`, so overriding it to `undefined` breaks the
+ // legitimate transport (verified: child→host RPC hangs). Without a working
+ // `process.send`, framing raw IPC through the handle directly is impractical,
+ // so leaving it readable costs nothing.
+
+ // Inbound: the trusted 'message' listener is already installed. Forbid the
+ // plugin adding/removing/replacing a 'message' listener so it can't eavesdrop
+ // on host→child traffic or unhook the trusted handler. Only 'message'/
+ // 'internalMessage' are gated — plugins may still use other process events
+ // (e.g. 'SIGTERM', 'beforeExit'). `emit` is deliberately NOT gated (Node uses
+ // it to deliver inbound IPC; see the header comment).
+ const GUARDED = new Set(['message', 'internalMessage']);
+ const ee = process as unknown as Record<string, (...a: unknown[]) => unknown>;
+ const emitterMethods = [
+ 'on', 'addListener', 'prependListener', 'once', 'prependOnceListener',
+ 'off', 'removeListener', 'removeAllListeners',
+ ] as const;
+ for (const m of emitterMethods) {
+ const real = ee[m].bind(process);
+ lock(process, m, (event: unknown, ...rest: unknown[]) => {
+ // `removeAllListeners()` with no event would also strip the trusted
+ // 'message' listener (and the crash handlers), so block the bare form.
+ const bareRemoveAll = m === 'removeAllListeners' && event === undefined;
+ if (bareRemoveAll || (typeof event === 'string' && GUARDED.has(event))) {
+ throw new Error(`ipc: process.${m}('${String(event)}') is disabled for plugins`);
+ }
+ return real(event, ...rest);
+ });
+ }
+}
+
/**
* Restrict the plugin's outbound network to its declared egress hosts. With no
* declared egress, ALL outbound is blocked. Wildcards like `*.host` match any
diff --git a/server/src/nest/plugins/runtime/plugin-sdk.ts b/server/src/nest/plugins/runtime/plugin-sdk.ts
index f26584f52..32265ff92 100644
--- a/server/src/nest/plugins/runtime/plugin-sdk.ts
+++ b/server/src/nest/plugins/runtime/plugin-sdk.ts
@@ -28,6 +28,54 @@ export interface PluginContext {
getById(tripId: number, asUserId?: number): Promise<unknown>;
getPlaces(tripId: number, asUserId?: number): Promise<unknown[]>;
getReservations(tripId: number, asUserId?: number): Promise<unknown[]>;
+ /** Update trip fields (title/dates/currency/reminder_days/...); needs 'db:write:trips' + the acting user's 'trip_edit' permission. */
+ update(tripId: number, input: Record<string, unknown>): Promise<unknown>;
+ };
+ // Read-only views of other trip subsystems (#1429 eco). Membership-checked like
+ // `trips`; each needs its own db:read:* scope.
+ packing: {
+ /** A trip's packing items (hydrated bags/assignees). Needs 'db:read:packing'. */
+ list(tripId: number): Promise<unknown[]>;
+ };
+ files: {
+ /** A trip's files, trash excluded. Needs 'db:read:files'. */
+ list(tripId: number): Promise<unknown[]>;
+ };
+ // "Costs" = budget items. Reads are membership-checked against the current
+ // invocation's user (like `trips`); `create` additionally needs the acting
+ // user's 'budget_edit' permission and the Costs addon enabled.
+ costs: {
+ getByTrip(tripId: number): Promise<unknown[]>;
+ listMine(): Promise<unknown[]>;
+ create(tripId: number, input: Record<string, unknown>): Promise<unknown>;
+ update(tripId: number, itemId: number, input: Record<string, unknown>): Promise<unknown>;
+ delete(tripId: number, itemId: number): Promise<{ deleted: boolean }>;
+ };
+ // Core planner writes (#1429). Each is membership-checked against the current
+ // invocation's user and needs the matching write scope + the app's edit
+ // permission (place_edit / day_edit / trip_edit). Route context only.
+ places: {
+ create(tripId: number, input: Record<string, unknown>): Promise<unknown>;
+ update(tripId: number, placeId: number, input: Record<string, unknown>): Promise<unknown>;
+ delete(tripId: number, placeId: number): Promise<{ deleted: boolean }>;
+ };
+ days: {
+ create(tripId: number, input: Record<string, unknown>): Promise<unknown>;
+ update(tripId: number, dayId: number, input: Record<string, unknown>): Promise<unknown>;
+ delete(tripId: number, dayId: number): Promise<{ deleted: boolean }>;
+ };
+ itinerary: {
+ assign(tripId: number, dayId: number, placeId: number, notes?: string | null): Promise<unknown>;
+ unassign(tripId: number, assignmentId: number): Promise<{ deleted: boolean }>;
+ };
+ // Your OWN namespaced key/value store attached to a trip/place/day (#1429), so
+ // you can enrich core entities without forking the schema. The entity must belong
+ // to a trip the current user can access. Values are JSON-serialisable.
+ meta: {
+ get(entityType: 'trip' | 'place' | 'day', entityId: number, key: string): Promise<unknown>;
+ set(entityType: 'trip' | 'place' | 'day', entityId: number, key: string, value: unknown): Promise<unknown>;
+ list(entityType: 'trip' | 'place' | 'day', entityId: number): Promise<Record<string, unknown>>;
+ delete(entityType: 'trip' | 'place' | 'day', entityId: number, key: string): Promise<{ deleted: boolean }>;
};
users: {
getById(id: number): Promise<unknown>;
@@ -41,6 +89,16 @@ export interface PluginContext {
warn(msg: string, meta?: Record<string, unknown>): void;
error(msg: string, meta?: Record<string, unknown>): void;
};
+ /** Call a function another plugin exposes (must be a declared, satisfied dependency
+ * that lists `fn` in its manifest `capabilities.provides`). Runs as the current user. */
+ plugins: {
+ call(pluginId: string, fn: string, args?: unknown): Promise<unknown>;
+ };
+ /** Publish an event to dependents that subscribed to it (must be declared in this
+ * plugin's manifest `capabilities.emits`). Fire-and-forget. */
+ events: {
+ emit(name: string, payload?: unknown): void;
+ };
}
export interface PluginRequest {
@@ -66,12 +124,64 @@ export interface PluginJob {
schedule: string;
handler(ctx: PluginContext): Promise<void>;
}
+// ── Provider hooks (host→plugin): core asks a hook the plugin implements for data,
+// gated by the matching hook:* permission. Each method also receives the per-
+// invocation ctx, so any trip reads it makes bind to the authenticated user. ──
+export interface Photo { id: string; title?: string; thumbnailUrl: string; fullUrl: string; takenAt?: string; }
+export interface PhotoProvider {
+ search(query: string, opts: { page: number; limit: number }): Promise<{ photos: Photo[]; total: number; hasMore: boolean }>;
+ getById(id: string): Promise<Photo | null>;
+}
+export interface CalendarEvent { id: string; title: string; start: string; end: string; allDay: boolean; }
+export interface CalendarSource {
+ getName(): string;
+ getEvents(userId: number, start: string, end: string): Promise<CalendarEvent[]>;
+}
+/** One row of extra place info TREK renders natively (reviews/ratings/links/…). */
+export interface PlaceDetailItem { label: string; value?: string; url?: string; }
+export interface PlaceDetailProvider {
+ getDetails(placeId: number, ctx: PluginContext): Promise<PlaceDetailItem[]>;
+}
+/** A validation/warning a plugin raises on a trip; TREK surfaces it in the planner. */
+export interface TripWarning { level: 'info' | 'warning' | 'error'; message: string; dayId?: number; placeId?: number; }
+export interface WarningProvider {
+ getWarnings(tripId: number, ctx: PluginContext): Promise<TripWarning[]>;
+}
+
+/** A core-event subscription (#1429 eco). Handlers run with NO user (like a job)
+ * and receive only the event name + tripId — never the payload. Needs 'events:subscribe'. */
+export interface PluginEventSubscription {
+ on: string; // a core event name (e.g. 'place:created', 'day:updated') or '*' for all
+ handler(payload: { event: string; tripId: number }, ctx: PluginContext): Promise<void> | void;
+}
+
+/** A function this plugin exposes to its dependents (declared in capabilities.provides). */
+export type PluginExport = (args: unknown, ctx: PluginContext) => Promise<unknown> | unknown;
+
+/** A subscription to another plugin's event. Authorized by declaring that plugin as a
+ * dependency; the handler runs with NO user and receives the emitter's payload. */
+export interface PluginSubscription {
+ plugin: string;
+ event: string;
+ handler(payload: unknown, ctx: PluginContext): Promise<void> | void;
+}
+
export interface PluginDefinition {
onLoad?(ctx: PluginContext): Promise<void> | void;
onUnload?(ctx: PluginContext): Promise<void> | void;
routes?: PluginRoute[];
jobs?: PluginJob[];
- // hooks (photo/calendar) land in M2
+ events?: PluginEventSubscription[];
+ hooks?: {
+ photoProvider?: PhotoProvider;
+ calendarSource?: CalendarSource;
+ placeDetailProvider?: PlaceDetailProvider;
+ warningProvider?: WarningProvider;
+ };
+ /** Functions exposed to dependents (names must match manifest capabilities.provides). */
+ exports?: Record<string, PluginExport>;
+ /** Subscriptions to other plugins' events (each `plugin` must be a declared dependency). */
+ subscriptions?: PluginSubscription[];
}
/** Identity helper: gives authors types + a stable shape. A plain object works too. */
@@ -110,9 +220,43 @@ export function createPluginContext(
getById: (tripId) => t.rpc('trips.getById', { tripId, _inv: invocationId }),
getPlaces: (tripId) => t.rpc('trips.getPlaces', { tripId, _inv: invocationId }) as Promise<unknown[]>,
getReservations: (tripId) => t.rpc('trips.getReservations', { tripId, _inv: invocationId }) as Promise<unknown[]>,
+ update: (tripId, input) => t.rpc('trips.update', { tripId, input, _inv: invocationId }),
+ },
+ packing: {
+ list: (tripId) => t.rpc('packing.list', { tripId, _inv: invocationId }) as Promise<unknown[]>,
+ },
+ files: {
+ list: (tripId) => t.rpc('files.list', { tripId, _inv: invocationId }) as Promise<unknown[]>,
+ },
+ costs: {
+ getByTrip: (tripId) => t.rpc('costs.getByTrip', { tripId, _inv: invocationId }) as Promise<unknown[]>,
+ listMine: () => t.rpc('costs.listMine', { _inv: invocationId }) as Promise<unknown[]>,
+ create: (tripId, input) => t.rpc('costs.create', { tripId, input, _inv: invocationId }),
+ update: (tripId, itemId, input) => t.rpc('costs.update', { tripId, itemId, input, _inv: invocationId }),
+ delete: (tripId, itemId) => t.rpc('costs.delete', { tripId, itemId, _inv: invocationId }) as Promise<{ deleted: boolean }>,
+ },
+ places: {
+ create: (tripId, input) => t.rpc('places.create', { tripId, input, _inv: invocationId }),
+ update: (tripId, placeId, input) => t.rpc('places.update', { tripId, placeId, input, _inv: invocationId }),
+ delete: (tripId, placeId) => t.rpc('places.delete', { tripId, placeId, _inv: invocationId }) as Promise<{ deleted: boolean }>,
+ },
+ days: {
+ create: (tripId, input) => t.rpc('days.create', { tripId, input, _inv: invocationId }),
+ update: (tripId, dayId, input) => t.rpc('days.update', { tripId, dayId, input, _inv: invocationId }),
+ delete: (tripId, dayId) => t.rpc('days.delete', { tripId, dayId, _inv: invocationId }) as Promise<{ deleted: boolean }>,
+ },
+ itinerary: {
+ assign: (tripId, dayId, placeId, notes) => t.rpc('itinerary.assign', { tripId, dayId, placeId, notes, _inv: invocationId }),
+ unassign: (tripId, assignmentId) => t.rpc('itinerary.unassign', { tripId, assignmentId, _inv: invocationId }) as Promise<{ deleted: boolean }>,
+ },
+ meta: {
+ get: (entityType, entityId, key) => t.rpc('meta.get', { entityType, entityId, key, _inv: invocationId }),
+ set: (entityType, entityId, key, value) => t.rpc('meta.set', { entityType, entityId, key, value, _inv: invocationId }),
+ list: (entityType, entityId) => t.rpc('meta.list', { entityType, entityId, _inv: invocationId }) as Promise<Record<string, unknown>>,
+ delete: (entityType, entityId, key) => t.rpc('meta.delete', { entityType, entityId, key, _inv: invocationId }) as Promise<{ deleted: boolean }>,
},
users: {
- getById: (uid) => t.rpc('users.getById', { id: uid }),
+ getById: (uid) => t.rpc('users.getById', { id: uid, _inv: invocationId }),
},
ws: {
broadcastToTrip: async (tripId, event, data) => {
@@ -127,5 +271,11 @@ export function createPluginContext(
warn: (msg, meta) => t.emit('log', { level: 'warn', msg, meta }),
error: (msg, meta) => t.emit('log', { level: 'error', msg, meta }),
},
+ plugins: {
+ call: (pluginId, fn, args) => t.rpc('plugins.call', { targetId: pluginId, fn, args, _inv: invocationId }),
+ },
+ events: {
+ emit: (name, payload) => { void t.rpc('events.emit', { event: name, payload }); },
+ },
};
}
diff --git a/server/src/nest/plugins/supervisor/plugin-supervisor.ts b/server/src/nest/plugins/supervisor/plugin-supervisor.ts
index e3c6bfac1..ac1930959 100644
--- a/server/src/nest/plugins/supervisor/plugin-supervisor.ts
+++ b/server/src/nest/plugins/supervisor/plugin-supervisor.ts
@@ -49,6 +49,10 @@ interface Supervised {
lastRss: number; // last reported resident set size (bytes)
routes: PluginRouteInfo[];
jobs: string[];
+ hooks: string[]; // provider hooks the plugin implements (e.g. 'placeDetailProvider')
+ events: string[]; // core events the plugin subscribes to (names or '*')
+ exports: string[]; // functions the plugin exposes to dependents (ctx.plugins.call)
+ subscriptions: Array<{ plugin: string; event: string }>; // other-plugin events it listens to
pending: Map<string, Pending>; // host→child invokes awaiting a response
invocations: Map<string, number | undefined>; // reqId -> acting user of that invoke (undefined = no user, e.g. a job)
activation?: { resolve: () => void; reject: (e: Error) => void };
@@ -80,6 +84,17 @@ const DEFAULTS: Required<SupervisorTuning> = {
maxRssBytes: (Number(process.env.TREK_PLUGIN_MAX_RSS_MB) || 300) * 1024 * 1024,
};
+// A plugin may only act as a provider for a hook it BOTH implements (reported by
+// the child at load) AND was granted the matching hook:* permission for. The child
+// reports Object.keys(def.hooks) with no knowledge of grants, so the grant check
+// must happen host-side here — otherwise the hook:* consent is never enforced.
+const HOOK_PERMISSION: Readonly<Record<string, string>> = {
+ photoProvider: 'hook:photo-provider',
+ calendarSource: 'hook:calendar-source',
+ placeDetailProvider: 'hook:place-detail-provider',
+ warningProvider: 'hook:trip-warning-provider',
+};
+
export class PluginSupervisor {
private running = new Map<string, Supervised>();
private sweep: ReturnType<typeof setInterval> | null = null;
@@ -109,6 +124,10 @@ export class PluginSupervisor {
lastRss: 0,
routes: [],
jobs: [],
+ hooks: [],
+ events: [],
+ exports: [],
+ subscriptions: [],
pending: new Map(),
invocations: new Map(),
};
@@ -164,6 +183,52 @@ export class PluginSupervisor {
return this.running.get(id)?.routes ?? [];
}
+ /**
+ * Ids of ACTIVE plugins that may act as a given provider hook — they implement it
+ * (reported at load) AND hold the matching hook:* grant the admin consented to.
+ * An unknown hook, or one with no permission mapping, resolves to nobody.
+ */
+ providersOf(hook: string): string[] {
+ const perm = HOOK_PERMISSION[hook];
+ if (!perm) return [];
+ const out: string[] = [];
+ for (const [id, sup] of this.running) {
+ if (sup.status === 'active' && sup.hooks.includes(hook) && sup.granted.has(perm)) out.push(id);
+ }
+ return out;
+ }
+
+ /** Callable export names an ACTIVE plugin reported at load (ctx.plugins.call target). */
+ exportsOf(id: string): string[] {
+ const sup = this.running.get(id);
+ return sup && sup.status === 'active' ? sup.exports : [];
+ }
+
+ /** Ids of ACTIVE plugins that subscribed to `event` emitted by `sourceId`. */
+ subscribersOf(sourceId: string, event: string): string[] {
+ const out: string[] = [];
+ for (const [id, sup] of this.running) {
+ if (sup.status === 'active' && sup.subscriptions.some((s) => s.plugin === sourceId && s.event === event)) out.push(id);
+ }
+ return out;
+ }
+
+ /**
+ * Announce a core event to every plugin that subscribed to it (or to '*') AND holds
+ * the 'events:subscribe' grant. Fire-and-forget: the invoke is NOT awaited (a core
+ * broadcast must never block on a plugin) and carries no user (trip reads refused).
+ * Only the event name + tripId are sent — never the payload.
+ */
+ deliverEvent(tripId: number, event: string): void {
+ for (const [id, sup] of this.running) {
+ if (sup.status !== 'active' || !sup.granted.has('events:subscribe')) continue;
+ if (!sup.events.includes(event) && !sup.events.includes('*')) continue;
+ this.invoke(id, 'invoke.event', { event, tripId }, { actingUserId: undefined, timeoutMs: 5000 }).catch(() => {
+ /* a subscriber that errors or times out is ignored — events are best-effort */
+ });
+ }
+ }
+
/**
* Send a host→child request (invoke a route or job) and await its response.
* `actingUserId` binds the authenticated user of this invocation on the HOST
@@ -279,10 +344,22 @@ export class PluginSupervisor {
break;
}
case 'loaded': {
+ // Ignore a duplicate/forged `loaded` after activation — a plugin must
+ // not be able to re-register its route table once it is live.
+ if (sup.status === 'active') break;
sup.lastBeat = Date.now();
- const d = msg.data as { routes?: PluginRouteInfo[]; jobs?: string[] };
+ const d = msg.data as {
+ routes?: PluginRouteInfo[]; jobs?: string[]; hooks?: string[]; events?: string[];
+ exports?: string[]; subscriptions?: Array<{ plugin: string; event: string }>;
+ };
sup.routes = d.routes ?? [];
sup.jobs = d.jobs ?? [];
+ sup.hooks = d.hooks ?? [];
+ sup.events = d.events ?? [];
+ sup.exports = Array.isArray(d.exports) ? d.exports.filter((e): e is string => typeof e === 'string') : [];
+ sup.subscriptions = Array.isArray(d.subscriptions)
+ ? d.subscriptions.filter((s): s is { plugin: string; event: string } => !!s && typeof s.plugin === 'string' && typeof s.event === 'string')
+ : [];
this.clearActivationTimer(sup);
this.setStatus(sup, 'active');
sup.activation?.resolve();
@@ -305,7 +382,13 @@ export class PluginSupervisor {
break;
}
default:
- this.hooks.onEvent?.(sup.id, msg.topic, msg.data);
+ // Strict inbound whitelist: the legitimate child→host `evt` topics all
+ // have explicit cases above. Anything else is a compromised/buggy child
+ // (or, historically, code that reached the raw channel) — drop it rather
+ // than forward it blindly. `onEvent` stays on SupervisorHooks, reserved
+ // for a future SDK-sanctioned custom-event channel, but is not invoked
+ // for arbitrary topics.
+ this.hooks.onLog?.(sup.id, 'warn', `dropped unknown plugin event topic: ${msg.topic}`);
}
}
}
diff --git a/server/src/nest/plugins/trip-warnings.controller.ts b/server/src/nest/plugins/trip-warnings.controller.ts
new file mode 100644
index 000000000..ec0aa504b
--- /dev/null
+++ b/server/src/nest/plugins/trip-warnings.controller.ts
@@ -0,0 +1,58 @@
+import { Controller, Get, Param, Req, UseGuards } from '@nestjs/common';
+import type { Request } from 'express';
+import { canAccessTrip } from '../../db/database';
+import { JwtAuthGuard } from '../auth/jwt-auth.guard';
+import { pluginsEnabled } from './kill-switch';
+import { PluginRuntimeService } from './plugin-runtime.service';
+
+/**
+ * GET /api/trip-warnings/:tripId — validation/warning contributions from plugins
+ * that implement the `warningProvider` hook (#1429). Additive and fail-safe: the
+ * caller must be able to access the trip, each provider is called host→plugin with
+ * a short timeout, and a provider that errors or times out contributes nothing.
+ */
+type Level = 'info' | 'warning' | 'error';
+interface Warning {
+ pluginId: string;
+ level: Level;
+ message: string;
+ dayId?: number;
+ placeId?: number;
+}
+
+@Controller('api/trip-warnings')
+@UseGuards(JwtAuthGuard)
+export class TripWarningsController {
+ constructor(private readonly runtime: PluginRuntimeService) {}
+
+ @Get(':tripId')
+ async get(
+ @Param('tripId') tripIdRaw: string,
+ @Req() req: Request & { user?: { id: number } },
+ ): Promise<{ warnings: Warning[] }> {
+ if (!pluginsEnabled()) return { warnings: [] };
+ const tripId = Number(tripIdRaw);
+ const userId = req.user?.id;
+ if (!Number.isFinite(tripId) || userId == null || !canAccessTrip(tripId, userId)) return { warnings: [] };
+
+ const ids = this.runtime.providersOf('warningProvider');
+ const perProvider = await Promise.all(
+ ids.map(async (id): Promise<Warning[]> => {
+ try {
+ const raw = (await this.runtime.invokeHook(id, 'warningProvider', 'getWarnings', [tripId], userId, 5000)) as unknown;
+ const list = Array.isArray(raw) ? (raw as Array<Record<string, unknown>>) : [];
+ return list.map((w) => ({
+ pluginId: id,
+ level: w.level === 'error' || w.level === 'info' ? (w.level as Level) : 'warning',
+ message: String(w.message ?? ''),
+ dayId: typeof w.dayId === 'number' ? w.dayId : undefined,
+ placeId: typeof w.placeId === 'number' ? w.placeId : undefined,
+ }));
+ } catch {
+ return []; // a slow / failing provider contributes nothing
+ }
+ }),
+ );
+ return { warnings: perProvider.flat().filter((w) => w.message) };
+ }
+}
diff --git a/server/src/nest/trips/trips.controller.ts b/server/src/nest/trips/trips.controller.ts
index cbe9844c9..f4d057bb0 100644
--- a/server/src/nest/trips/trips.controller.ts
+++ b/server/src/nest/trips/trips.controller.ts
@@ -73,9 +73,9 @@ export class TripsController {
}
@Get('cover-images/search')
- async coverImages(@Query('query') query?: string) {
+ async coverImages(@CurrentUser() user: User, @Query('query') query?: string) {
try {
- const result = await this.trips.searchCoverImages(query || '');
+ const result = await this.trips.searchCoverImages(query || '', user.id);
if ('error' in result) {
throw new HttpException({ error: result.error }, result.status);
}
diff --git a/server/src/nest/trips/trips.service.ts b/server/src/nest/trips/trips.service.ts
index d2be26ca6..9ecd26877 100644
--- a/server/src/nest/trips/trips.service.ts
+++ b/server/src/nest/trips/trips.service.ts
@@ -11,7 +11,7 @@ import { listItems as listTodoItems } from '../../services/todoService';
import { listBudgetItems } from '../../services/budgetService';
import { listReservations } from '../../services/reservationService';
import { listFiles } from '../../services/fileService';
-import { searchUnsplashPhotos } from '../../services/unsplashService';
+import { searchUnsplashPhotos, getUnsplashKey } from '../../services/unsplashService';
/**
* Thin Nest wrapper around the existing trip service + the per-domain list
@@ -50,8 +50,8 @@ export class TripsService {
return tripSvc.getTripRaw(tripId);
}
- searchCoverImages(query: string) {
- return searchUnsplashPhotos(query, 9);
+ searchCoverImages(query: string, userId: number) {
+ return searchUnsplashPhotos(query, 9, getUnsplashKey(userId));
}
getOwner(tripId: string) {
diff --git a/server/src/plugin-event-sink.ts b/server/src/plugin-event-sink.ts
new file mode 100644
index 000000000..126d304dc
--- /dev/null
+++ b/server/src/plugin-event-sink.ts
@@ -0,0 +1,19 @@
+// A tiny, dependency-free relay so the plugin runtime can receive core trip events
+// without the websocket module (which pulls in `ws`) importing the plugins layer —
+// and so tests that mock `./websocket` don't accidentally strip the sink. websocket
+// calls emitPluginEvent for every CORE broadcast; the plugin runtime registers the
+// sink in onModuleInit. Name-only + best-effort by design (see PluginSupervisor).
+let sink: ((tripId: number, event: string) => void) | null = null;
+
+export function setPluginEventSink(fn: ((tripId: number, event: string) => void) | null): void {
+ sink = fn;
+}
+
+export function emitPluginEvent(tripId: number, event: string): void {
+ if (!sink) return;
+ try {
+ sink(tripId, event);
+ } catch {
+ /* a plugin sink must never break a core broadcast */
+ }
+}
diff --git a/server/src/services/assignmentService.ts b/server/src/services/assignmentService.ts
index 56bd0f7c2..2301be7fa 100644
--- a/server/src/services/assignmentService.ts
+++ b/server/src/services/assignmentService.ts
@@ -26,7 +26,7 @@ export function getAssignmentWithPlace(assignmentId: number | bigint) {
`).all(a.place_id);
const participants = db.prepare(`
- SELECT ap.user_id, u.username, u.avatar
+ SELECT ap.user_id, COALESCE(u.display_name, u.username) AS username, u.avatar
FROM assignment_participants ap
JOIN users u ON ap.user_id = u.id
WHERE ap.assignment_id = ?
@@ -159,7 +159,7 @@ export function moveAssignment(id: string | number, newDayId: string | number, o
export function getParticipants(assignmentId: string | number) {
return db.prepare(`
- SELECT ap.user_id, u.username, u.avatar
+ SELECT ap.user_id, COALESCE(u.display_name, u.username) AS username, u.avatar
FROM assignment_participants ap
JOIN users u ON ap.user_id = u.id
WHERE ap.assignment_id = ?
@@ -208,7 +208,7 @@ export function setParticipants(assignmentId: string | number, userIds: number[]
}
return db.prepare(`
- SELECT ap.user_id, u.username, u.avatar
+ SELECT ap.user_id, COALESCE(u.display_name, u.username) AS username, u.avatar
FROM assignment_participants ap
JOIN users u ON ap.user_id = u.id
WHERE ap.assignment_id = ?
diff --git a/server/src/services/authService.ts b/server/src/services/authService.ts
index c726d1819..0fdb67f20 100644
--- a/server/src/services/authService.ts
+++ b/server/src/services/authService.ts
@@ -622,34 +622,35 @@ export function updateMapsKey(userId: number, maps_api_key: string | null | unde
export function updateApiKeys(
userId: number,
- body: { maps_api_key?: string; openweather_api_key?: string }
+ body: { maps_api_key?: string; openweather_api_key?: string; unsplash_api_key?: string }
) {
- const current = db.prepare('SELECT maps_api_key, openweather_api_key FROM users WHERE id = ?').get(userId) as Pick<User, 'maps_api_key' | 'openweather_api_key'> | undefined;
+ const current = db.prepare('SELECT maps_api_key, openweather_api_key, unsplash_api_key FROM users WHERE id = ?').get(userId) as Pick<User, 'maps_api_key' | 'openweather_api_key' | 'unsplash_api_key'> | undefined;
db.prepare(
- 'UPDATE users SET maps_api_key = ?, openweather_api_key = ?, updated_at = CURRENT_TIMESTAMP WHERE id = ?'
+ 'UPDATE users SET maps_api_key = ?, openweather_api_key = ?, unsplash_api_key = ?, updated_at = CURRENT_TIMESTAMP WHERE id = ?'
).run(
body.maps_api_key !== undefined ? maybe_encrypt_api_key(body.maps_api_key) : current!.maps_api_key,
body.openweather_api_key !== undefined ? maybe_encrypt_api_key(body.openweather_api_key) : current!.openweather_api_key,
+ body.unsplash_api_key !== undefined ? maybe_encrypt_api_key(body.unsplash_api_key) : current!.unsplash_api_key,
userId
);
const updated = db.prepare(
- 'SELECT id, username, email, role, maps_api_key, openweather_api_key, avatar, mfa_enabled FROM users WHERE id = ?'
- ).get(userId) as Pick<User, 'id' | 'username' | 'email' | 'role' | 'maps_api_key' | 'openweather_api_key' | 'avatar' | 'mfa_enabled'> | undefined;
+ 'SELECT id, username, email, role, maps_api_key, openweather_api_key, unsplash_api_key, avatar, mfa_enabled FROM users WHERE id = ?'
+ ).get(userId) as Pick<User, 'id' | 'username' | 'email' | 'role' | 'maps_api_key' | 'openweather_api_key' | 'unsplash_api_key' | 'avatar' | 'mfa_enabled'> | undefined;
const u = updated ? { ...updated, mfa_enabled: !!(updated.mfa_enabled === 1 || updated.mfa_enabled === true) } : undefined;
return {
success: true,
- user: { ...u, maps_api_key: mask_stored_api_key(u?.maps_api_key), openweather_api_key: mask_stored_api_key(u?.openweather_api_key), avatar_url: avatarUrl(updated || {}) },
+ user: { ...u, maps_api_key: mask_stored_api_key(u?.maps_api_key), openweather_api_key: mask_stored_api_key(u?.openweather_api_key), unsplash_api_key: mask_stored_api_key(u?.unsplash_api_key), avatar_url: avatarUrl(updated || {}) },
};
}
export function updateSettings(
userId: number,
- body: { maps_api_key?: string; openweather_api_key?: string; username?: string; email?: string }
+ body: { maps_api_key?: string; openweather_api_key?: string; unsplash_api_key?: string; username?: string; email?: string }
): { error?: string; status?: number; success?: boolean; user?: Record<string, unknown> } {
- const { maps_api_key, openweather_api_key, username, email } = body;
+ const { maps_api_key, openweather_api_key, unsplash_api_key, username, email } = body;
if (username !== undefined) {
const trimmed = username.trim();
@@ -677,6 +678,7 @@ export function updateSettings(
if (maps_api_key !== undefined) { updates.push('maps_api_key = ?'); params.push(maybe_encrypt_api_key(maps_api_key)); }
if (openweather_api_key !== undefined) { updates.push('openweather_api_key = ?'); params.push(maybe_encrypt_api_key(openweather_api_key)); }
+ if (unsplash_api_key !== undefined) { updates.push('unsplash_api_key = ?'); params.push(maybe_encrypt_api_key(unsplash_api_key)); }
if (username !== undefined) { updates.push('username = ?'); params.push(username.trim()); }
if (email !== undefined) { updates.push('email = ?'); params.push(email.trim()); }
@@ -687,26 +689,27 @@ export function updateSettings(
}
const updated = db.prepare(
- 'SELECT id, username, email, role, maps_api_key, openweather_api_key, avatar, mfa_enabled FROM users WHERE id = ?'
- ).get(userId) as Pick<User, 'id' | 'username' | 'email' | 'role' | 'maps_api_key' | 'openweather_api_key' | 'avatar' | 'mfa_enabled'> | undefined;
+ 'SELECT id, username, email, role, maps_api_key, openweather_api_key, unsplash_api_key, avatar, mfa_enabled FROM users WHERE id = ?'
+ ).get(userId) as Pick<User, 'id' | 'username' | 'email' | 'role' | 'maps_api_key' | 'openweather_api_key' | 'unsplash_api_key' | 'avatar' | 'mfa_enabled'> | undefined;
const u = updated ? { ...updated, mfa_enabled: !!(updated.mfa_enabled === 1 || updated.mfa_enabled === true) } : undefined;
return {
success: true,
- user: { ...u, maps_api_key: mask_stored_api_key(u?.maps_api_key), openweather_api_key: mask_stored_api_key(u?.openweather_api_key), avatar_url: avatarUrl(updated || {}) },
+ user: { ...u, maps_api_key: mask_stored_api_key(u?.maps_api_key), openweather_api_key: mask_stored_api_key(u?.openweather_api_key), unsplash_api_key: mask_stored_api_key(u?.unsplash_api_key), avatar_url: avatarUrl(updated || {}) },
};
}
export function getSettings(userId: number): { error?: string; status?: number; settings?: Record<string, unknown> } {
const user = db.prepare(
- 'SELECT role, maps_api_key, openweather_api_key FROM users WHERE id = ?'
- ).get(userId) as Pick<User, 'role' | 'maps_api_key' | 'openweather_api_key'> | undefined;
+ 'SELECT role, maps_api_key, openweather_api_key, unsplash_api_key FROM users WHERE id = ?'
+ ).get(userId) as Pick<User, 'role' | 'maps_api_key' | 'openweather_api_key' | 'unsplash_api_key'> | undefined;
if (user?.role !== 'admin') return { error: 'Admin access required', status: 403 };
return {
settings: {
maps_api_key: decrypt_api_key(user.maps_api_key),
openweather_api_key: decrypt_api_key(user.openweather_api_key),
+ unsplash_api_key: decrypt_api_key(user.unsplash_api_key),
},
};
}
diff --git a/server/src/services/budgetService.ts b/server/src/services/budgetService.ts
index f2a4ff189..367edcf9c 100644
--- a/server/src/services/budgetService.ts
+++ b/server/src/services/budgetService.ts
@@ -1,6 +1,7 @@
import { db } from '../db/database';
import { BudgetItem, BudgetItemMember, BudgetItemPayer } from '../types';
import { avatarUrl } from './avatarUrl';
+import { getRates } from './exchangeRateService';
// ---------------------------------------------------------------------------
// Helpers
@@ -11,7 +12,7 @@ export { verifyTripAccess } from './tripAccess';
function loadItemMembers(itemId: number | string) {
const rows = db.prepare(`
- SELECT bm.user_id, bm.paid, bm.amount, u.username, u.avatar
+ SELECT bm.user_id, bm.paid, bm.amount, COALESCE(u.display_name, u.username) AS username, u.avatar
FROM budget_item_members bm
JOIN users u ON bm.user_id = u.id
WHERE bm.budget_item_id = ?
@@ -21,7 +22,7 @@ function loadItemMembers(itemId: number | string) {
function loadItemPayers(itemId: number | string) {
const rows = db.prepare(`
- SELECT bp.user_id, bp.amount, u.username, u.avatar
+ SELECT bp.user_id, bp.amount, COALESCE(u.display_name, u.username) AS username, u.avatar
FROM budget_item_payers bp
JOIN users u ON bp.user_id = u.id
WHERE bp.budget_item_id = ?
@@ -60,7 +61,7 @@ export function listBudgetItems(tripId: string | number) {
if (itemIds.length > 0) {
const allMembers = db.prepare(`
- SELECT bm.budget_item_id, bm.user_id, bm.paid, bm.amount, u.username, u.avatar
+ SELECT bm.budget_item_id, bm.user_id, bm.paid, bm.amount, COALESCE(u.display_name, u.username) AS username, u.avatar
FROM budget_item_members bm
JOIN users u ON bm.user_id = u.id
WHERE bm.budget_item_id IN (${itemIds.map(() => '?').join(',')})
@@ -77,7 +78,7 @@ export function listBudgetItems(tripId: string | number) {
const payersByItem: Record<number, (BudgetItemPayer & { avatar_url: string | null })[]> = {};
if (itemIds.length > 0) {
const allPayers = db.prepare(`
- SELECT bp.budget_item_id, bp.user_id, bp.amount, u.username, u.avatar
+ SELECT bp.budget_item_id, bp.user_id, bp.amount, COALESCE(u.display_name, u.username) AS username, u.avatar
FROM budget_item_payers bp
JOIN users u ON bp.user_id = u.id
WHERE bp.budget_item_id IN (${itemIds.map(() => '?').join(',')})
@@ -98,6 +99,48 @@ export function listBudgetItems(tripId: string | number) {
return items;
}
+/**
+ * Freeze the live FX rate at entry time into `exchange_rate` so a settled position
+ * isn't re-opened when live rates drift later (#1335 / #1445). The stored rate is
+ * "units of the item/display currency per 1 trip currency" — the settlement
+ * converts with it via `amount / rate`.
+ *
+ * Only freezes for a foreign currency with no explicit rate; degrades to live
+ * rates if the fetch fails. On update it (re)freezes only when the currency
+ * changes (checked against `budget_items`), so an unrelated edit never moves
+ * money. Callers must invoke this *before* the (synchronous) DB write — the raw
+ * create/update stay sync because better-sqlite3 transactions can't await.
+ */
+export async function freezeForeignRate(
+ tripId: string | number,
+ data: { currency?: string | null; exchange_rate?: number },
+ existingItemId?: string | number,
+ existingCurrency?: string | null,
+): Promise<void> {
+ if (data.exchange_rate != null) return; // an explicit rate from the caller wins
+ const cur = (data.currency || '').toUpperCase();
+ if (!cur) return; // currency not being set in this request
+ // Skip the re-freeze when the currency isn't actually changing, so an unrelated
+ // edit never moves money. Items resolve the prior currency from budget_items; a
+ // settlement lives in a different table, so its caller passes it in directly.
+ let prior: string | undefined;
+ if (existingCurrency !== undefined) {
+ prior = (existingCurrency || '').toUpperCase();
+ } else if (existingItemId != null) {
+ const existing = db.prepare('SELECT currency FROM budget_items WHERE id = ?')
+ .get(existingItemId) as { currency?: string } | undefined;
+ if (existing) prior = (existing.currency || '').toUpperCase();
+ }
+ if (prior !== undefined && prior === cur) return; // currency unchanged
+ const trip = db.prepare('SELECT currency FROM trips WHERE id = ?')
+ .get(tripId) as { currency?: string } | undefined;
+ const tripCur = (trip?.currency || 'EUR').toUpperCase();
+ if (cur === tripCur) return; // same as the trip currency → no conversion to freeze
+ const rates = await getRates(tripCur);
+ const r = rates?.[cur];
+ if (r && r > 0) data.exchange_rate = r;
+}
+
export function createBudgetItem(
tripId: string | number,
data: {
@@ -318,7 +361,7 @@ export function toggleMemberPaid(id: string | number, tripId: string | number, u
.run(paid ? 1 : 0, id, userId);
const member = db.prepare(`
- SELECT bm.user_id, bm.paid, u.username, u.avatar
+ SELECT bm.user_id, bm.paid, COALESCE(u.display_name, u.username) AS username, u.avatar
FROM budget_item_members bm JOIN users u ON bm.user_id = u.id
WHERE bm.budget_item_id = ? AND bm.user_id = ?
`).get(id, userId) as BudgetItemMember | undefined;
@@ -332,7 +375,7 @@ export function toggleMemberPaid(id: string | number, tripId: string | number, u
export function getPerPersonSummary(tripId: string | number) {
const summary = db.prepare(`
- SELECT bm.user_id, u.username, u.avatar,
+ SELECT bm.user_id, COALESCE(u.display_name, u.username) AS username, u.avatar,
SUM(COALESCE(bm.amount, bi.total_price * 1.0 / (SELECT COUNT(*) FROM budget_item_members WHERE budget_item_id = bi.id))) as total_assigned,
SUM(CASE WHEN bm.paid = 1 THEN COALESCE(bm.amount, bi.total_price * 1.0 / (SELECT COUNT(*) FROM budget_item_members WHERE budget_item_id = bi.id)) ELSE 0 END) as total_paid,
COUNT(bi.id) as items_count
@@ -398,20 +441,37 @@ export function calculateSettlement(
// trip-currency → display currency, applied once to the final netted totals.
const toDisplay = (v: number): number =>
base === tripCurrency ? v : (rates && rates[tripCurrency] > 0 ? v / rates[tripCurrency] : v);
- // A recorded settle-up amount is entered in whatever display currency the payer was
- // viewing (the table has no currency column), so bring it into trip currency to net.
- const settleToTrip = (v: number): number =>
- base === tripCurrency ? v : (rates && rates[tripCurrency] > 0 ? v * rates[tripCurrency] : v);
+ // A recorded settle-up amount is entered in whatever display currency the payer
+ // was viewing. New rows capture that currency and the rate frozen at settle time
+ // (#1445), so a settled position stays balanced when live rates drift — mirroring
+ // toTrip for expenses. Legacy rows (currency = NULL) have no frozen rate, so fall
+ // back to the old behaviour: assume they were entered in the current display base
+ // and convert with live rates.
+ const settleToTrip = (amount: number, sCurrency?: string | null, sRate?: number | null): number => {
+ if (sCurrency) {
+ const cur = sCurrency.toUpperCase();
+ if (cur === tripCurrency) return amount;
+ if (sRate != null && sRate > 0 && sRate !== 1) return amount / sRate;
+ // Frozen currency but no usable rate (fetch failed at settle time): live fallback.
+ if (rates) {
+ const rCur = rates[cur];
+ const rTrip = rates[tripCurrency];
+ if (rCur && rCur > 0 && rTrip && rTrip > 0) return (amount / rCur) * rTrip;
+ }
+ return amount;
+ }
+ return base === tripCurrency ? amount : (rates && rates[tripCurrency] > 0 ? amount * rates[tripCurrency] : amount);
+ };
const items = db.prepare('SELECT * FROM budget_items WHERE trip_id = ?').all(tripId) as BudgetItem[];
const allMembers = db.prepare(`
- SELECT bm.budget_item_id, bm.user_id, u.username, u.avatar
+ SELECT bm.budget_item_id, bm.user_id, COALESCE(u.display_name, u.username) AS username, u.avatar
FROM budget_item_members bm
JOIN users u ON bm.user_id = u.id
WHERE bm.budget_item_id IN (SELECT id FROM budget_items WHERE trip_id = ?)
`).all(tripId) as (BudgetItemMember & { budget_item_id: number })[];
const allPayers = db.prepare(`
- SELECT bp.budget_item_id, bp.user_id, bp.amount, u.username, u.avatar
+ SELECT bp.budget_item_id, bp.user_id, bp.amount, COALESCE(u.display_name, u.username) AS username, u.avatar
FROM budget_item_payers bp
JOIN users u ON bp.user_id = u.id
WHERE bp.budget_item_id IN (SELECT id FROM budget_items WHERE trip_id = ?)
@@ -457,8 +517,9 @@ export function calculateSettlement(
return balances[id];
};
for (const s of settlements) {
- ensureSettled(s.from_user_id, s.from_username, s.from_avatar_url).balance += settleToTrip(s.amount);
- ensureSettled(s.to_user_id, s.to_username, s.to_avatar_url).balance -= settleToTrip(s.amount);
+ const inTrip = settleToTrip(s.amount, s.currency, s.exchange_rate);
+ ensureSettled(s.from_user_id, s.from_username, s.from_avatar_url).balance += inTrip;
+ ensureSettled(s.to_user_id, s.to_username, s.to_avatar_url).balance -= inTrip;
}
// Calculate optimized payment flows (greedy algorithm)
@@ -501,7 +562,7 @@ export function calculateSettlement(
export function listSettlements(tripId: string | number) {
const rows = db.prepare(`
- SELECT s.id, s.trip_id, s.from_user_id, s.to_user_id, s.amount, s.created_at, s.created_by_user_id,
+ SELECT s.id, s.trip_id, s.from_user_id, s.to_user_id, s.amount, s.currency, s.exchange_rate, s.created_at, s.created_by_user_id,
fu.username AS from_username, fu.avatar AS from_avatar,
tu.username AS to_username, tu.avatar AS to_avatar
FROM budget_settlements s
@@ -513,7 +574,8 @@ export function listSettlements(tripId: string | number) {
return rows.map(r => ({
id: r.id, trip_id: r.trip_id,
from_user_id: r.from_user_id, to_user_id: r.to_user_id,
- amount: r.amount, created_at: r.created_at, created_by_user_id: r.created_by_user_id,
+ amount: r.amount, currency: r.currency ?? null, exchange_rate: r.exchange_rate ?? 1,
+ created_at: r.created_at, created_by_user_id: r.created_by_user_id,
from_username: r.from_username, from_avatar_url: avatarUrl({ avatar: r.from_avatar }),
to_username: r.to_username, to_avatar_url: avatarUrl({ avatar: r.to_avatar }),
}));
@@ -521,25 +583,39 @@ export function listSettlements(tripId: string | number) {
export function createSettlement(
tripId: string | number,
- data: { from_user_id: number; to_user_id: number; amount: number },
+ data: { from_user_id: number; to_user_id: number; amount: number; currency?: string | null; exchange_rate?: number },
createdByUserId?: number,
) {
const result = db.prepare(
- 'INSERT INTO budget_settlements (trip_id, from_user_id, to_user_id, amount, created_by_user_id) VALUES (?, ?, ?, ?, ?)'
- ).run(tripId, data.from_user_id, data.to_user_id, Math.round(data.amount * 100) / 100, createdByUserId ?? null);
+ 'INSERT INTO budget_settlements (trip_id, from_user_id, to_user_id, amount, currency, exchange_rate, created_by_user_id) VALUES (?, ?, ?, ?, ?, ?, ?)'
+ ).run(
+ tripId, data.from_user_id, data.to_user_id, Math.round(data.amount * 100) / 100,
+ data.currency ? data.currency.toUpperCase() : null,
+ data.exchange_rate != null ? data.exchange_rate : 1,
+ createdByUserId ?? null,
+ );
return listSettlements(tripId).find(s => s.id === Number(result.lastInsertRowid)) || null;
}
export function updateSettlement(
id: string | number,
tripId: string | number,
- data: { from_user_id: number; to_user_id: number; amount: number },
+ data: { from_user_id: number; to_user_id: number; amount: number; currency?: string | null; exchange_rate?: number },
) {
const row = db.prepare('SELECT id FROM budget_settlements WHERE id = ? AND trip_id = ?').get(id, tripId);
if (!row) return null;
- db.prepare(
- 'UPDATE budget_settlements SET from_user_id = ?, to_user_id = ?, amount = ? WHERE id = ?'
- ).run(data.from_user_id, data.to_user_id, Math.round(data.amount * 100) / 100, id);
+ db.prepare(`
+ UPDATE budget_settlements SET
+ from_user_id = ?, to_user_id = ?, amount = ?,
+ currency = CASE WHEN ? THEN ? ELSE currency END,
+ exchange_rate = CASE WHEN ? IS NOT NULL THEN ? ELSE exchange_rate END
+ WHERE id = ?
+ `).run(
+ data.from_user_id, data.to_user_id, Math.round(data.amount * 100) / 100,
+ data.currency !== undefined ? 1 : 0, data.currency ? data.currency.toUpperCase() : null,
+ data.exchange_rate !== undefined ? 1 : null, data.exchange_rate !== undefined ? data.exchange_rate : 1,
+ id,
+ );
return listSettlements(tripId).find(s => s.id === Number(id)) || null;
}
diff --git a/server/src/services/fileService.ts b/server/src/services/fileService.ts
index e4fdc0068..13d6251d2 100644
--- a/server/src/services/fileService.ts
+++ b/server/src/services/fileService.ts
@@ -12,7 +12,7 @@ import { TripFile } from '../types';
// ---------------------------------------------------------------------------
export const MAX_FILE_SIZE = 50 * 1024 * 1024; // 50 MB
-export const DEFAULT_ALLOWED_EXTENSIONS = 'jpg,jpeg,png,gif,webp,heic,pdf,doc,docx,xls,xlsx,txt,csv,pkpass,md,markdown';
+export const DEFAULT_ALLOWED_EXTENSIONS = 'jpg,jpeg,png,gif,webp,heic,pdf,doc,docx,xls,xlsx,txt,csv,pkpass,pkpasses,md,markdown';
// Video support (#823). Gallery/media uploads accept these in addition to images,
// independent of the admin doc-types allowlist. Videos are stored as-is and
@@ -164,7 +164,7 @@ export function listFiles(tripId: string | number, showTrash: boolean) {
const files = db.prepare(`${FILE_SELECT} WHERE ${where} ORDER BY f.starred DESC, f.created_at DESC`).all(tripId) as TripFile[];
const fileIds = files.map(f => f.id);
- let linksMap: Record<number, FileLink[]> = {};
+ const linksMap: Record<number, FileLink[]> = {};
if (fileIds.length > 0) {
const placeholders = fileIds.map(() => '?').join(',');
const links = db.prepare(`SELECT file_id, reservation_id, place_id FROM file_links WHERE file_id IN (${placeholders})`).all(...fileIds) as FileLink[];
diff --git a/server/src/services/notifications.ts b/server/src/services/notifications.ts
index 42c7a0fe0..c256ce038 100644
--- a/server/src/services/notifications.ts
+++ b/server/src/services/notifications.ts
@@ -212,7 +212,7 @@ export async function sendPasswordResetEmail(
// No SMTP configured — log the link in a visually distinct block so
// the admin can relay it. Never log the associated user id/email
// content at a lower level, only what's needed.
- // eslint-disable-next-line no-console
+
console.log(
`\n===== PASSWORD RESET LINK =====\n` +
`to: ${to}\n` +
diff --git a/server/src/services/packingService.ts b/server/src/services/packingService.ts
index c512e62bf..848aab654 100644
--- a/server/src/services/packingService.ts
+++ b/server/src/services/packingService.ts
@@ -22,7 +22,7 @@ function enrichItems(items: any[]): any[] {
const ownerName = new Map(owners.map(o => [o.id, o.username]));
const recipientRows = db.prepare(`
- SELECT r.item_id, r.user_id, u.username
+ SELECT r.item_id, r.user_id, COALESCE(u.display_name, u.username) AS username
FROM packing_item_recipients r JOIN users u ON u.id = r.user_id
WHERE r.item_id IN (${placeholders})
`).all(...ids) as { item_id: number; user_id: number; username: string }[];
@@ -33,7 +33,7 @@ function enrichItems(items: any[]): any[] {
}
const contributorRows = db.prepare(`
- SELECT c.item_id, c.user_id, c.status, u.username
+ SELECT c.item_id, c.user_id, c.status, COALESCE(u.display_name, u.username) AS username
FROM packing_item_contributors c JOIN users u ON u.id = c.user_id
WHERE c.item_id IN (${placeholders})
`).all(...ids) as { item_id: number; user_id: number; status: string; username: string }[];
@@ -290,7 +290,7 @@ export function bulkImport(tripId: string | number, items: ImportItem[], ownerId
export function listBags(tripId: string | number) {
const bags = db.prepare('SELECT * FROM packing_bags WHERE trip_id = ? ORDER BY sort_order, id').all(tripId) as any[];
const members = db.prepare(`
- SELECT bm.bag_id, bm.user_id, u.username, u.avatar
+ SELECT bm.bag_id, bm.user_id, COALESCE(u.display_name, u.username) AS username, u.avatar
FROM packing_bag_members bm
JOIN users u ON bm.user_id = u.id
JOIN packing_bags b ON bm.bag_id = b.id
@@ -314,7 +314,7 @@ export function setBagMembers(tripId: string | number, bagId: string | number, u
const ins = db.prepare('INSERT OR IGNORE INTO packing_bag_members (bag_id, user_id) VALUES (?, ?)');
for (const uid of userIds) ins.run(bagId, uid);
const rows = db.prepare(`
- SELECT bm.user_id, u.username, u.avatar
+ SELECT bm.user_id, COALESCE(u.display_name, u.username) AS username, u.avatar
FROM packing_bag_members bm JOIN users u ON bm.user_id = u.id
WHERE bm.bag_id = ?
`).all(bagId) as { user_id: number; username: string; avatar: string | null }[];
@@ -351,7 +351,7 @@ export function updateBag(
data.user_id ?? null,
bagId
);
- return db.prepare('SELECT b.*, u.username as assigned_username FROM packing_bags b LEFT JOIN users u ON b.user_id = u.id WHERE b.id = ?').get(bagId);
+ return db.prepare('SELECT b.*, COALESCE(u.display_name, u.username) as assigned_username FROM packing_bags b LEFT JOIN users u ON b.user_id = u.id WHERE b.id = ?').get(bagId);
}
export function deleteBag(tripId: string | number, bagId: string | number) {
@@ -440,7 +440,7 @@ export function saveAsTemplate(tripId: string | number, userId: number, template
export function getCategoryAssignees(tripId: string | number) {
const rows = db.prepare(`
- SELECT pca.category_name, pca.user_id, u.username, u.avatar
+ SELECT pca.category_name, pca.user_id, COALESCE(u.display_name, u.username) AS username, u.avatar
FROM packing_category_assignees pca
JOIN users u ON pca.user_id = u.id
WHERE pca.trip_id = ?
@@ -465,7 +465,7 @@ export function updateCategoryAssignees(tripId: string | number, categoryName: s
}
const updated = db.prepare(`
- SELECT pca.user_id, u.username, u.avatar
+ SELECT pca.user_id, COALESCE(u.display_name, u.username) AS username, u.avatar
FROM packing_category_assignees pca
JOIN users u ON pca.user_id = u.id
WHERE pca.trip_id = ? AND pca.category_name = ?
diff --git a/server/src/services/placeService.ts b/server/src/services/placeService.ts
index c59ba2773..a0bb5c848 100644
--- a/server/src/services/placeService.ts
+++ b/server/src/services/placeService.ts
@@ -15,7 +15,7 @@ import {
} from './kmlImport';
import { enrichImportedPlaces, type EnrichablePlace } from './placeEnrichment';
import * as placePhotoCache from './placePhotoCache';
-import { searchUnsplashPhotos } from './unsplashService';
+import { searchUnsplashPhotos, getUnsplashKey } from './unsplashService';
import { type UpdateConflict, isUpdateConflict } from './conflictResult';
// Reclaim a deleted place's cached marker photo if nothing else references it.
@@ -977,9 +977,9 @@ export async function importNaverList(
// Search place image (Unsplash)
// ---------------------------------------------------------------------------
-export async function searchPlaceImage(tripId: string, placeId: string, _userId: number) {
+export async function searchPlaceImage(tripId: string, placeId: string, userId: number) {
const place = db.prepare('SELECT * FROM places WHERE id = ? AND trip_id = ?').get(placeId, tripId) as Place | undefined;
if (!place) return { error: 'Place not found', status: 404 };
- return searchUnsplashPhotos(place.name + (place.address ? ' ' + place.address : ''), 5);
+ return searchUnsplashPhotos(place.name + (place.address ? ' ' + place.address : ''), 5, getUnsplashKey(userId));
}
diff --git a/server/src/services/tripService.ts b/server/src/services/tripService.ts
index 8df373a69..9ef6f11a7 100644
--- a/server/src/services/tripService.ts
+++ b/server/src/services/tripService.ts
@@ -352,10 +352,10 @@ export function listMembers(tripId: string | number, tripOwnerId: number) {
// u.is_guest rides along (#1362) so guests stay assignable everywhere a member is,
// while the UI can badge them and suppress owner-only actions. The owner is never a guest.
const members = db.prepare(`
- SELECT u.id, u.username, u.email, u.avatar, u.is_guest,
+ SELECT u.id, COALESCE(u.display_name, u.username) AS username, u.email, u.avatar, u.is_guest,
CASE WHEN u.id = ? THEN 'owner' ELSE 'member' END as role,
m.added_at,
- ib.username as invited_by_username
+ COALESCE(ib.display_name, ib.username) as invited_by_username
FROM trip_members m
JOIN users u ON u.id = m.user_id
LEFT JOIN users ib ON ib.id = m.invited_by
@@ -473,37 +473,28 @@ export interface GuestMember {
/** username is UNIQUE across all users — keep the typed name but disambiguate guests
* that happen to share it (e.g. two "Anna"s) with a numeric suffix. */
-function uniqueGuestUsername(name: string, excludeId?: number): string {
- let candidate = name;
- let n = 2;
- const probe = excludeId != null
- ? db.prepare('SELECT id FROM users WHERE LOWER(username) = LOWER(?) AND id != ?')
- : db.prepare('SELECT id FROM users WHERE LOWER(username) = LOWER(?)');
- while (excludeId != null ? probe.get(candidate, excludeId) : probe.get(candidate)) {
- candidate = `${name} ${n++}`;
- }
- return candidate;
-}
-
export function createGuest(tripId: string | number, name: string, invitedByUserId: number): { member: GuestMember } {
const display = (name || '').trim();
if (!display) throw new ValidationError('Guest name is required');
if (display.length > 50) throw new ValidationError('Guest name must be 50 characters or fewer');
+ // The human name lives in display_name (not unique — two trips can each have a
+ // "Jake", #1446); username is a uuid handle only for the UNIQUE constraint and is
+ // never shown (member views COALESCE display_name over it).
const email = `guest-${randomUUID()}@guests.invalid`;
- const username = uniqueGuestUsername(display);
+ const username = `guest-${randomUUID()}`;
const create = db.transaction(() => {
const res = db.prepare(
- "INSERT INTO users (username, email, password_hash, role, is_guest) VALUES (?, ?, '', 'user', 1)"
- ).run(username, email);
+ "INSERT INTO users (username, email, password_hash, role, is_guest, display_name) VALUES (?, ?, '', 'user', 1, ?)"
+ ).run(username, email, display);
const guestId = Number(res.lastInsertRowid);
db.prepare('INSERT INTO trip_members (trip_id, user_id, invited_by) VALUES (?, ?, ?)').run(tripId, guestId, invitedByUserId);
return guestId;
});
const guestId = create();
- return { member: { id: guestId, username, email, role: 'member', is_guest: true, avatar_url: null } };
+ return { member: { id: guestId, username: display, email, role: 'member', is_guest: true, avatar_url: null } };
}
/** Confirms a user id is a guest of THIS trip, so guest mutations stay trip-scoped. */
@@ -519,8 +510,9 @@ export function renameGuest(tripId: string | number, guestUserId: number, name:
if (display.length > 50) throw new ValidationError('Guest name must be 50 characters or fewer');
if (!guestOfTrip(tripId, guestUserId)) return false;
- const username = uniqueGuestUsername(display, guestUserId);
- db.prepare('UPDATE users SET username = ?, updated_at = CURRENT_TIMESTAMP WHERE id = ? AND is_guest = 1').run(username, guestUserId);
+ // Rename only the display name — no global-uniqueness dedup, so a rename to a name
+ // another trip's guest already uses no longer produces "Name 2" (#1446).
+ db.prepare('UPDATE users SET display_name = ?, updated_at = CURRENT_TIMESTAMP WHERE id = ? AND is_guest = 1').run(display, guestUserId);
return true;
}
@@ -665,7 +657,7 @@ export function exportICS(tripId: string | number): { ics: string; filename: str
if (notes.length > 0) {
if (desc) desc += '\n\n';
desc += 'Notes:\n' + notes.map(n => {
- let line = n.time ? `${n.time} — ${n.text}` : `• ${n.text}`;
+ const line = n.time ? `${n.time} — ${n.text}` : `• ${n.text}`;
return line;
}).join('\n');
}
diff --git a/server/src/services/unsplashService.ts b/server/src/services/unsplashService.ts
index c9a6da001..4ba2bf5b5 100644
--- a/server/src/services/unsplashService.ts
+++ b/server/src/services/unsplashService.ts
@@ -2,6 +2,8 @@ import path from 'path';
import fs from 'fs';
import { v4 as uuidv4 } from 'uuid';
import { safeFetch } from '../utils/ssrfGuard';
+import { db } from '../db/database';
+import { decrypt_api_key } from './apiKeyCrypto';
interface UnsplashSearchResponse {
results?: {
@@ -25,7 +27,24 @@ export interface UnsplashPhoto {
link: string | null;
}
-export async function searchUnsplashPhotos(query: string, perPage = 9) {
+/**
+ * Resolve an Unsplash access key for a request, in precedence order:
+ * the `UNSPLASH_ACCESS_KEY` env var (instance-wide override, matching the
+ * SMTP/OIDC env-over-DB convention) → the caller's own stored key → any
+ * admin's stored key. Mirrors `getMapsKey`. Returns null when none is set,
+ * in which case the search falls back to the unauthenticated endpoint.
+ */
+export function getUnsplashKey(userId: number): string | null {
+ const env_key = process.env.UNSPLASH_ACCESS_KEY?.trim();
+ if (env_key) return env_key;
+ const user = db.prepare('SELECT unsplash_api_key FROM users WHERE id = ?').get(userId) as { unsplash_api_key: string | null } | undefined;
+ const user_key = decrypt_api_key(user?.unsplash_api_key);
+ if (user_key) return user_key;
+ const admin = db.prepare("SELECT unsplash_api_key FROM users WHERE role = 'admin' AND unsplash_api_key IS NOT NULL AND unsplash_api_key != '' LIMIT 1").get() as { unsplash_api_key: string } | undefined;
+ return decrypt_api_key(admin?.unsplash_api_key) || null;
+}
+
+export async function searchUnsplashPhotos(query: string, perPage = 9, accessKey?: string | null) {
const trimmed = query.trim();
if (!trimmed) {
return { error: 'Search query is required', status: 400 };
@@ -36,17 +55,27 @@ export async function searchUnsplashPhotos(query: string, perPage = 9) {
query: trimmed,
per_page: String(perPage),
});
- const response = await fetch(`https://unsplash.com/napi/search/photos?${params.toString()}`, {
- headers: {
- 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:152.0) Gecko/20100101 Firefox/152.0',
- Accept: '*/*',
- 'Accept-Language': 'en-US',
- Referer: `https://unsplash.com/s/photos/${encodeURIComponent(trimmed)}`,
- 'client-geo-region': 'global',
- 'Sec-Fetch-Dest': 'empty',
- 'Sec-Fetch-Site': 'same-origin',
- },
- });
+ // With an access key, use Unsplash's official, authenticated API — datacenter
+ // (VPS) IPs get blocked on the unauthenticated web endpoint (#1449). Without
+ // one, fall back to the web endpoint so zero-config search still works.
+ const response = accessKey
+ ? await fetch(`https://api.unsplash.com/search/photos?${params.toString()}`, {
+ headers: {
+ Authorization: `Client-ID ${accessKey}`,
+ 'Accept-Version': 'v1',
+ },
+ })
+ : await fetch(`https://unsplash.com/napi/search/photos?${params.toString()}`, {
+ headers: {
+ 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:152.0) Gecko/20100101 Firefox/152.0',
+ Accept: '*/*',
+ 'Accept-Language': 'en-US',
+ Referer: `https://unsplash.com/s/photos/${encodeURIComponent(trimmed)}`,
+ 'client-geo-region': 'global',
+ 'Sec-Fetch-Dest': 'empty',
+ 'Sec-Fetch-Site': 'same-origin',
+ },
+ });
let data: UnsplashSearchResponse;
try {
data = await response.json() as UnsplashSearchResponse;
diff --git a/server/src/websocket.ts b/server/src/websocket.ts
index 862743b30..505249a1e 100644
--- a/server/src/websocket.ts
+++ b/server/src/websocket.ts
@@ -1,6 +1,7 @@
import { WebSocketServer, WebSocket } from 'ws';
import { db, canAccessTrip } from './db/database';
import { consumeEphemeralTokenWithMeta } from './services/ephemeralTokens';
+import { emitPluginEvent } from './plugin-event-sink';
import { User } from './types';
import http from 'node:http';
@@ -192,6 +193,10 @@ function leaveRoom(ws: NomadWebSocket, tripId: number): void {
*/
function broadcast(tripId: number | string, eventType: string, payload: Record<string, unknown>, excludeSid?: number | string, onlyUserId?: number): void {
tripId = Number(tripId);
+ // Announce every CORE trip event (name only, never the payload) to subscribed
+ // plugins — before the room check so it fires even with no connected viewers, and
+ // skipping plugin:* re-broadcasts so a plugin's own events can't loop back.
+ if (!eventType.startsWith('plugin:')) emitPluginEvent(tripId, eventType);
const room = rooms.get(tripId);
if (!room || room.size === 0) return;
diff --git a/server/tests/e2e/budget.e2e.test.ts b/server/tests/e2e/budget.e2e.test.ts
index aaa81c42e..74e27cb07 100644
--- a/server/tests/e2e/budget.e2e.test.ts
+++ b/server/tests/e2e/budget.e2e.test.ts
@@ -30,8 +30,8 @@ const { svc } = vi.hoisted(() => ({
svc: {
verifyTripAccess: vi.fn(), listBudgetItems: vi.fn(), createBudgetItem: vi.fn(), updateBudgetItem: vi.fn(),
deleteBudgetItem: vi.fn(), updateMembers: vi.fn(), toggleMemberPaid: vi.fn(), getPerPersonSummary: vi.fn(),
- calculateSettlement: vi.fn(), reorderBudgetItems: vi.fn(), reorderBudgetCategories: vi.fn(),
- setItemPayers: vi.fn(), listSettlements: vi.fn(), createSettlement: vi.fn(), updateSettlement: vi.fn(), deleteSettlement: vi.fn(),
+ calculateSettlement: vi.fn(), freezeForeignRate: vi.fn(), reorderBudgetItems: vi.fn(), reorderBudgetCategories: vi.fn(),
+ setItemPayers: vi.fn(), listSettlements: vi.fn(() => []), createSettlement: vi.fn(), updateSettlement: vi.fn(), deleteSettlement: vi.fn(),
},
}));
vi.mock('../../src/services/budgetService', () => svc);
diff --git a/server/tests/e2e/collections.e2e.test.ts b/server/tests/e2e/collections.e2e.test.ts
index 2b0eccea9..e336a040b 100644
--- a/server/tests/e2e/collections.e2e.test.ts
+++ b/server/tests/e2e/collections.e2e.test.ts
@@ -129,6 +129,22 @@ describe('Collections e2e (real auth guard + real service + temp SQLite)', () =>
expect(placed.reservation_status).toBe('none'); // itinerary defaults
});
+ // Regression for #1437: editing a place (PATCH without a status field) must NOT
+ // reset a 'want'/'visited' place back to 'idea'.
+ it('COLLECTIONS-E2E-012: PATCH without status leaves the saved status unchanged', async () => {
+ const col = (await request(server).post('/api/addons/collections').set('Cookie', sessionCookie(ownerId)).send({ name: 'Statuses' })).body;
+ const saved = await request(server).post('/api/addons/collections/places')
+ .set('Cookie', sessionCookie(ownerId)).send({ collection_id: col.id, name: 'Colosseum', status: 'want' });
+ expect(saved.status).toBe(200);
+ const placeId = saved.body.place.id;
+ expect(db.prepare('SELECT status FROM collection_places WHERE id = ?').get(placeId)).toEqual({ status: 'want' });
+
+ const patched = await request(server).patch(`/api/addons/collections/places/${placeId}`)
+ .set('Cookie', sessionCookie(ownerId)).send({ name: 'Colosseo' });
+ expect(patched.status).toBe(200);
+ expect(db.prepare('SELECT status FROM collection_places WHERE id = ?').get(placeId)).toEqual({ status: 'want' });
+ });
+
// ── Cross-user isolation ─────────────────────────────────────────────────
it('COLLECTIONS-E2E-020: a stranger gets 404 on someone else’s collection', async () => {
const col = (await request(server).post('/api/addons/collections').set('Cookie', sessionCookie(ownerId)).send({ name: 'Private' })).body;
diff --git a/server/tests/integration/plugins/plugin-runtime.test.ts b/server/tests/integration/plugins/plugin-runtime.test.ts
index 88d3b1d4e..f4acb6ffb 100644
--- a/server/tests/integration/plugins/plugin-runtime.test.ts
+++ b/server/tests/integration/plugins/plugin-runtime.test.ts
@@ -12,17 +12,20 @@ const { testDb } = vi.hoisted(() => {
const Database = require('better-sqlite3');
const db = new Database(':memory:');
db.exec(`CREATE TABLE plugins (
- id TEXT PRIMARY KEY, status TEXT, enabled INTEGER DEFAULT 0, permissions TEXT DEFAULT '[]', granted_permissions TEXT DEFAULT '',
- config TEXT DEFAULT '{}', last_error TEXT, updated_at TEXT);
+ id TEXT PRIMARY KEY, status TEXT, enabled INTEGER DEFAULT 0, version TEXT, permissions TEXT DEFAULT '[]', granted_permissions TEXT DEFAULT '',
+ config TEXT DEFAULT '{}', dependencies TEXT DEFAULT '{}', capabilities TEXT DEFAULT '{}', last_error TEXT, updated_at TEXT);
CREATE TABLE plugin_error_log (id INTEGER PRIMARY KEY AUTOINCREMENT, plugin_id TEXT, level TEXT, message TEXT, ts TEXT);
CREATE TABLE plugin_settings_fields (plugin_id TEXT, field_key TEXT, scope TEXT, secret INTEGER);
- CREATE TABLE settings (user_id INTEGER, key TEXT, value TEXT);`);
+ CREATE TABLE settings (user_id INTEGER, key TEXT, value TEXT);
+ CREATE TABLE plugin_entity_metadata (id INTEGER PRIMARY KEY AUTOINCREMENT, plugin_id TEXT, entity_type TEXT, entity_id INTEGER, key TEXT, value TEXT, updated_at TEXT);
+ CREATE TABLE addons (id TEXT PRIMARY KEY, enabled INTEGER DEFAULT 0);`);
return { testDb: db };
});
vi.mock('../../../src/db/database', () => ({ db: testDb, canAccessTrip: () => undefined }));
vi.mock('../../../src/websocket', () => ({ broadcast: vi.fn(), broadcastToUser: vi.fn() }));
-import { PluginRuntimeService } from '../../../src/nest/plugins/plugin-runtime.service';
+import { PluginRuntimeService, PluginDependencyError } from '../../../src/nest/plugins/plugin-runtime.service';
+import { DependencyCycleError } from '../../../src/nest/plugins/dependencies';
let codeRoot: string;
let dataRoot: string;
@@ -266,3 +269,130 @@ describe('PluginRuntimeService.update (re-consent gate)', () => {
await expect(new PluginRuntimeService().update('upd-noreg')).rejects.toThrow(/registry service unavailable/);
});
});
+
+describe('PluginRuntimeService dependency gating', () => {
+ const deps = (d: { requiredAddons?: string[]; pluginDependencies?: { id: string; version: string }[] }) =>
+ JSON.stringify({ requiredAddons: d.requiredAddons ?? [], pluginDependencies: d.pluginDependencies ?? [] });
+ const insertPlugin = (id: string, dependencies: string, enabled = 0, version = '1.0.0') =>
+ testDb.prepare("INSERT INTO plugins (id, status, enabled, version, permissions, granted_permissions, config, dependencies) VALUES (?, 'inactive', ?, ?, '[]', '[]', '{}', ?)")
+ .run(id, enabled, version, dependencies);
+ const cleanup = (...ids: string[]) => { for (const id of ids) testDb.prepare('DELETE FROM plugins WHERE id = ?').run(id); };
+
+ it('blocks activation when a required addon is disabled', async () => {
+ testDb.prepare("INSERT OR REPLACE INTO addons (id, enabled) VALUES ('budget', 0)").run();
+ insertPlugin('needs-budget', deps({ requiredAddons: ['budget'] }));
+ await expect(runtime.activate('needs-budget')).rejects.toMatchObject({ code: 'ADDON_DISABLED' });
+ expect((testDb.prepare('SELECT enabled FROM plugins WHERE id = ?').get('needs-budget') as { enabled: number }).enabled).toBe(0);
+ cleanup('needs-budget');
+ });
+
+ it('activates once the required addon is enabled', async () => {
+ testDb.prepare("INSERT OR REPLACE INTO addons (id, enabled) VALUES ('budget', 1)").run();
+ insertPlugin('needs-budget2', deps({ requiredAddons: ['budget'] }));
+ // No code on disk → the supervisor spawn fails, but the addon gate passed (it did
+ // not throw PluginDependencyError). Assert it got past the gate to the spawn.
+ await expect(runtime.activate('needs-budget2')).rejects.not.toBeInstanceOf(PluginDependencyError);
+ cleanup('needs-budget2');
+ });
+
+ it('blocks activation when a plugin dependency is missing', async () => {
+ insertPlugin('needs-ghost', deps({ pluginDependencies: [{ id: 'ghost', version: '*' }] }));
+ await expect(runtime.activate('needs-ghost')).rejects.toMatchObject({ code: 'DEPENDENCY_MISSING' });
+ cleanup('needs-ghost');
+ });
+
+ it('blocks activation when a dependency version does not satisfy the range', async () => {
+ insertPlugin('dep-lib', deps({}), 1, '1.0.0');
+ insertPlugin('needs-v2', deps({ pluginDependencies: [{ id: 'dep-lib', version: '>=2.0.0' }] }));
+ const err = await runtime.activate('needs-v2').catch((e) => e);
+ expect(err).toBeInstanceOf(PluginDependencyError);
+ expect(err.detail.versionMismatch).toEqual([{ id: 'dep-lib', wanted: '>=2.0.0', installed: '1.0.0' }]);
+ cleanup('needs-v2', 'dep-lib');
+ });
+
+ it('refuses a dependency cycle', async () => {
+ insertPlugin('cyc-a', deps({ pluginDependencies: [{ id: 'cyc-b', version: '*' }] }));
+ insertPlugin('cyc-b', deps({ pluginDependencies: [{ id: 'cyc-a', version: '*' }] }));
+ await expect(runtime.activate('cyc-a')).rejects.toBeInstanceOf(DependencyCycleError);
+ cleanup('cyc-a', 'cyc-b');
+ });
+
+ it('deactivateForDisabledAddon disables plugins requiring the addon and their dependents', async () => {
+ insertPlugin('base-b', deps({ requiredAddons: ['budget'] }), 1);
+ insertPlugin('dependent-b', deps({ pluginDependencies: [{ id: 'base-b', version: '*' }] }), 1);
+ insertPlugin('unrelated-b', deps({}), 1);
+ const disabled = await runtime.deactivateForDisabledAddon('budget');
+ expect(disabled.sort()).toEqual(['base-b', 'dependent-b']);
+ expect((testDb.prepare('SELECT enabled FROM plugins WHERE id = ?').get('base-b') as { enabled: number }).enabled).toBe(0);
+ expect((testDb.prepare('SELECT enabled FROM plugins WHERE id = ?').get('unrelated-b') as { enabled: number }).enabled).toBe(1);
+ cleanup('base-b', 'dependent-b', 'unrelated-b');
+ });
+
+ it('deactivateWithDependents cascades to (transitive) dependents, dependents first', async () => {
+ insertPlugin('lib-x', deps({}), 1);
+ insertPlugin('mid-x', deps({ pluginDependencies: [{ id: 'lib-x', version: '*' }] }), 1);
+ insertPlugin('top-x', deps({ pluginDependencies: [{ id: 'mid-x', version: '*' }] }), 1);
+ insertPlugin('other-x', deps({}), 1);
+ const disabled = await runtime.deactivateWithDependents('lib-x');
+ expect(disabled).toEqual(['top-x', 'mid-x', 'lib-x']); // deepest dependent first, root last
+ for (const id of ['lib-x', 'mid-x', 'top-x']) {
+ expect((testDb.prepare('SELECT enabled FROM plugins WHERE id = ?').get(id) as { enabled: number }).enabled).toBe(0);
+ }
+ expect((testDb.prepare('SELECT enabled FROM plugins WHERE id = ?').get('other-x') as { enabled: number }).enabled).toBe(1);
+ cleanup('lib-x', 'mid-x', 'top-x', 'other-x');
+ });
+});
+
+describe('PluginRuntimeService inter-plugin (exports + events)', () => {
+ beforeAll(async () => {
+ fs.mkdirSync(path.join(codeRoot, 'lib', 'server'), { recursive: true });
+ fs.writeFileSync(
+ path.join(codeRoot, 'lib', 'server', 'index.js'),
+ `module.exports = {
+ async onLoad(ctx) { ctx.events.emit('ping', { hi: true }); },
+ exports: { async greet(args) { return { greeting: 'hi ' + (args && args.who), from: 'lib' }; } },
+ routes: [],
+ };`,
+ );
+ fs.mkdirSync(path.join(codeRoot, 'consumer', 'server'), { recursive: true });
+ fs.writeFileSync(
+ path.join(codeRoot, 'consumer', 'server', 'index.js'),
+ `module.exports = {
+ subscriptions: [{ plugin: 'lib', event: 'ping', async handler(payload, ctx) { ctx.log.info('got ping', payload); } }],
+ routes: [{ method: 'GET', path: '/call', auth: false, async handler(_req, ctx) {
+ const r = await ctx.plugins.call('lib', 'greet', { who: 'consumer' });
+ return { status: 200, headers: { 'content-type': 'application/json' }, body: JSON.stringify(r) };
+ } }],
+ };`,
+ );
+ testDb.prepare("INSERT INTO plugins (id, status, version, permissions, config, capabilities, dependencies) VALUES ('lib','inactive','1.5.0','[]','{}',?,'{}')")
+ .run(JSON.stringify({ provides: ['greet'], emits: ['ping'] }));
+ testDb.prepare("INSERT INTO plugins (id, status, version, permissions, config, capabilities, dependencies) VALUES ('consumer','inactive','1.0.0','[]','{}','{}',?)")
+ .run(JSON.stringify({ requiredAddons: [], pluginDependencies: [{ id: 'lib', version: '>=1.0.0 <2.0.0' }] }));
+ await runtime.activate('lib');
+ await runtime.activate('consumer');
+ });
+ afterAll(async () => {
+ await runtime.deactivate('consumer').catch(() => {});
+ await runtime.deactivate('lib').catch(() => {});
+ });
+
+ it('routes ctx.plugins.call through the host to the dependency export', async () => {
+ const res = (await runtime.invoke('consumer', 'invoke.route', {
+ routeId: 0,
+ req: { method: 'GET', path: '/call', query: {}, body: null, user: { id: 7, username: 'x', isAdmin: false } },
+ })) as { status: number; body: string };
+ expect(res.status).toBe(200);
+ expect(JSON.parse(res.body)).toEqual({ greeting: 'hi consumer', from: 'lib' });
+ });
+
+ it('refuses a call from a non-dependent and to an undeclared export', async () => {
+ await expect(runtime.callPlugin('lib', 'consumer', 'anything', {}, 7)).rejects.toThrow(/does not declare|not active|does not export/);
+ await expect(runtime.callPlugin('consumer', 'lib', 'nope', {}, 7)).rejects.toThrow(/does not export/);
+ });
+
+ it('emitPluginEvent validates the declared event and fans out without throwing', () => {
+ expect(() => runtime.emitPluginEvent('lib', 'ping', { x: 1 })).not.toThrow();
+ expect(() => runtime.emitPluginEvent('lib', 'not-declared', {})).toThrow(/does not declare event/);
+ });
+});
diff --git a/server/tests/integration/plugins/registry.test.ts b/server/tests/integration/plugins/registry.test.ts
index a8d2e7058..22f702ae6 100644
--- a/server/tests/integration/plugins/registry.test.ts
+++ b/server/tests/integration/plugins/registry.test.ts
@@ -21,7 +21,7 @@ const { testDb } = vi.hoisted(() => {
const db = new Database(':memory:');
db.exec(`
CREATE TABLE plugins (id TEXT PRIMARY KEY, name TEXT, description TEXT, type TEXT, icon TEXT, version TEXT,
- api_version INTEGER, min_trek_version TEXT, permissions TEXT, capabilities TEXT DEFAULT '{}', granted_permissions TEXT, status TEXT, config TEXT,
+ api_version INTEGER, min_trek_version TEXT, permissions TEXT, capabilities TEXT DEFAULT '{}', dependencies TEXT DEFAULT '{}', granted_permissions TEXT, status TEXT, enabled INTEGER DEFAULT 0, config TEXT,
source_repo TEXT, source_commit TEXT, sha256 TEXT, reviewed_at TEXT, author_pubkey TEXT, updated_at TEXT);
CREATE TABLE plugin_settings_fields (plugin_id TEXT, field_key TEXT, label TEXT, input_type TEXT, placeholder TEXT, hint TEXT, required INTEGER, secret INTEGER, scope TEXT, options TEXT, oauth_config TEXT, sort_order INTEGER);
CREATE TABLE plugin_error_log (id INTEGER PRIMARY KEY AUTOINCREMENT, plugin_id TEXT, level TEXT, message TEXT, ts TEXT);`);
@@ -230,6 +230,56 @@ describe('PluginRegistryService', () => {
expect(spy).toHaveBeenCalledTimes(1);
});
+ it('force refresh bypasses the cache and busts the CDN', async () => {
+ const spy = vi.fn(async () => ({ ok: true, json: async () => REGISTRY }) as unknown as Response);
+ vi.stubGlobal('fetch', spy);
+ __clearRegistryCacheForTests();
+ await svc.fetchRegistry(); // primes the 30-min cache (fetch #1)
+ await svc.fetchRegistry(true); // force → refetches despite the warm cache
+ expect(spy).toHaveBeenCalledTimes(2);
+ const [url, opts] = spy.mock.calls[1] as unknown as [string | URL, { headers?: Record<string, string> }];
+ expect(String(url)).toMatch(/[?&]_=\d+/); // cache-buster query
+ expect(opts.headers?.['Cache-Control']).toBe('no-cache');
+ });
+
+ // ── Sideload (upload your own plugin) ────────────────────────────────────────
+ it('sideload: stage + commit installs an uploaded plugin INACTIVE as local:upload', () => {
+ const zip = makeArtifact({ id: 'my-upload', name: 'Uploaded', version: '2.0.0', type: 'widget', permissions: ['db:own'] });
+ const staged = svc.stageUpload(zip);
+ expect(staged.id).toBe('my-upload');
+ expect(staged.version).toBe('2.0.0');
+
+ svc.commitUpload(staged);
+
+ const row = testDb.prepare('SELECT status, source_repo, reviewed_at, version FROM plugins WHERE id = ?').get('my-upload') as
+ { status: string; source_repo: string | null; reviewed_at: string | null; version: string } | undefined;
+ expect(row?.status).toBe('inactive'); // never auto-activates
+ expect(row?.source_repo).toBe('local:upload');
+ expect(row?.reviewed_at).toBeNull(); // unsigned + unreviewed → flagged in the UI
+ expect(row?.version).toBe('2.0.0');
+ expect(fs.existsSync(path.join(codeRoot, 'my-upload', 'trek-plugin.json'))).toBe(true);
+ expect(fs.existsSync(staged.stagingDir)).toBe(false); // staging cleaned up
+ });
+
+ it('sideload: rejects an oversized archive', () => {
+ expect(() => svc.stageUpload(Buffer.alloc(50 * 1024 * 1024 + 8192))).toThrow(/50MB|exceed/i);
+ });
+
+ it('sideload: rejects an archive without a manifest', () => {
+ const empty = zlib.gzipSync(Buffer.alloc(1024, 0)); // valid gzip, empty tar
+ expect(() => svc.stageUpload(empty)).toThrow(/trek-plugin\.json/);
+ });
+
+ it('sideload: forces INACTIVE even when replacing a plugin that was active', () => {
+ const zip = () => makeArtifact({ id: 'my-upload', name: 'Uploaded', version: '2.0.0', type: 'widget', permissions: ['db:own'] });
+ svc.commitUpload(svc.stageUpload(zip())); // first install
+ testDb.prepare("UPDATE plugins SET status = 'active', enabled = 1 WHERE id = 'my-upload'").run(); // admin activated it
+ svc.commitUpload(svc.stageUpload(zip())); // re-upload replaces the code
+ const row = testDb.prepare('SELECT status, enabled FROM plugins WHERE id = ?').get('my-upload') as { status: string; enabled: number };
+ expect(row.status).toBe('inactive'); // discoverPlugins keeps the old status; commitUpload floors it back to inactive
+ expect(row.enabled).toBe(0);
+ });
+
it('soft-fails on a non-ok registry response', async () => {
__clearRegistryCacheForTests();
vi.stubGlobal('fetch', vi.fn(async () => ({ ok: false, status: 500 }) as unknown as Response));
@@ -237,7 +287,7 @@ describe('PluginRegistryService', () => {
});
it('rejects a version that is not listed', async () => {
- await expect(svc.install('flight-tracker', '9.9.9')).rejects.toThrow(/not found/);
+ await expect(svc.install('flight-tracker', { version: '9.9.9' })).rejects.toThrow(/not found/);
});
it('rejects an archive without a manifest', async () => {
@@ -299,3 +349,38 @@ describe('PluginRegistryService', () => {
await expect(svc.install('flight-tracker')).rejects.toThrow(/unsigned/);
});
});
+
+describe('PluginRegistryService.resolveVersion (latest compatible)', () => {
+ const MULTI = {
+ schemaVersion: 1,
+ plugins: [{
+ id: 'multi', name: 'Multi', author: 'a', description: 'many versions', repo: 'a/b', type: 'integration',
+ versions: [
+ { version: '2.1.0', gitTag: 'v2.1.0', commitSha: 'a'.repeat(40), downloadUrl: 'https://codeload.github.com/a/b/tar.gz/x', sha256: '', minTrekVersion: '3.4.0' },
+ { version: '2.0.0', gitTag: 'v2.0.0', commitSha: 'a'.repeat(40), downloadUrl: 'https://codeload.github.com/a/b/tar.gz/y', sha256: '', minTrekVersion: '3.2.0' },
+ { version: '1.5.0', gitTag: 'v1.5.0', commitSha: 'a'.repeat(40), downloadUrl: 'https://codeload.github.com/a/b/tar.gz/z', sha256: '', minTrekVersion: '3.0.0' },
+ ],
+ }],
+ };
+ const stub = () => { __clearRegistryCacheForTests(); vi.stubGlobal('fetch', vi.fn(async () => ({ ok: true, json: async () => MULTI }) as unknown as Response)); };
+
+ it('picks the highest version compatible with the running TREK', async () => {
+ process.env.APP_VERSION = '3.3.0'; stub();
+ expect((await svc.resolveVersion('multi')).version).toBe('2.0.0'); // 2.1.0 needs 3.4.0 > host
+ delete process.env.APP_VERSION;
+ });
+ it('picks the highest version satisfying a semver range', async () => {
+ process.env.APP_VERSION = '3.3.0'; stub();
+ expect((await svc.resolveVersion('multi', '>=1.0.0 <2.0.0')).version).toBe('1.5.0');
+ delete process.env.APP_VERSION;
+ });
+ it('throws when nothing satisfies the constraint', async () => {
+ process.env.APP_VERSION = '3.3.0'; stub();
+ await expect(svc.resolveVersion('multi', '>=9.0.0')).rejects.toThrow(RegistryError);
+ delete process.env.APP_VERSION;
+ });
+ it('throws for a plugin not in the registry', async () => {
+ stub();
+ await expect(svc.resolveVersion('nope')).rejects.toThrow(/not in registry/);
+ });
+});
diff --git a/server/tests/integration/plugins/supervisor.test.ts b/server/tests/integration/plugins/supervisor.test.ts
index 74ef53a48..5da759e74 100644
--- a/server/tests/integration/plugins/supervisor.test.ts
+++ b/server/tests/integration/plugins/supervisor.test.ts
@@ -40,11 +40,21 @@ function makeSupervisor(events: Array<{ topic: string; data: unknown }>, tuning:
};
const hooks: SupervisorHooks = {
onEvent: (_id, topic, data) => events.push({ topic, data }),
- onLog: (_id, level, msg) => events.push({ topic: '__log', data: { level, msg } }),
+ onLog: (_id, level, msg, meta) => events.push({ topic: '__log', data: { level, msg, meta } }),
};
return new PluginSupervisor(createRpcHost, hooks, tuning);
}
+/**
+ * Pull the `meta` of a named `ctx.log.info(msg, meta)` call. Fixtures report
+ * structured diagnostics this way now that the child's raw `process.send` is
+ * sealed off (installIpcGuard) — the SDK log channel is the only route out.
+ */
+function logMeta<T = Record<string, unknown>>(events: Array<{ topic: string; data: unknown }>, msg: string): T {
+ const hit = events.find((e) => e.topic === '__log' && (e.data as { msg?: string }).msg === msg);
+ return (hit && (hit.data as { meta?: unknown }).meta) as T;
+}
+
beforeAll(() => {
codeRoot = fs.mkdtempSync(path.join(os.tmpdir(), 'trekplug-code-'));
dataRoot = fs.mkdtempSync(path.join(os.tmpdir(), 'trekplug-pdata-'));
@@ -76,7 +86,7 @@ describe('PluginSupervisor — isolated runtime', () => {
let tripsDenied = false;
try { await ctx.trips.getById(1, 42); } catch (e) { tripsDenied = /PERMISSION_DENIED/.test(e.message); }
ctx.log.info('selftest complete');
- process.send({ k: 'evt', topic: 'diag', data: { value: rows[0] && rows[0].v, tripsDenied } });
+ ctx.log.info('diag', { value: rows[0] && rows[0].v, tripsDenied });
}
};`,
);
@@ -84,7 +94,7 @@ describe('PluginSupervisor — isolated runtime', () => {
await sup.activate('hello', new Set(['db:own']), { greeting: 'hi there' });
expect(sup.isActive('hello')).toBe(true);
- const diag = events.find((e) => e.topic === 'diag')?.data as { value: string; tripsDenied: boolean };
+ const diag = logMeta<{ value: string; tripsDenied: boolean }>(events, 'diag');
expect(diag).toBeTruthy();
expect(diag.value).toBe('hi there'); // instance config reached the child, db round-trip worked
expect(diag.tripsDenied).toBe(true); // ungranted db:read:trips was refused across the fork boundary
@@ -92,6 +102,113 @@ describe('PluginSupervisor — isolated runtime', () => {
expect(events.some((e) => e.topic === '__log')).toBe(true);
});
+ it('dispatches invoke.hook + invoke.event across the fork (provider hooks + event subscriptions)', async () => {
+ const events: Array<{ topic: string; data: unknown }> = [];
+ sup = makeSupervisor(events);
+ writePlugin(
+ 'provider',
+ `module.exports = {
+ hooks: {
+ placeDetailProvider: { async getDetails(placeId, ctx) { return [{ label: 'placeId', value: String(placeId) }]; } },
+ },
+ events: [
+ { on: 'place:created', async handler(e, ctx) { ctx.log.info('got-event', e); } },
+ { on: 'other:thing', handler() { throw new Error('non-matching subscription must not run'); } },
+ ],
+ };`,
+ );
+ await sup.activate('provider', new Set(['hook:place-detail-provider', 'events:subscribe']), {});
+
+ // host->plugin hook: the child runs getDetails(7, ctx) and returns its result
+ const hookRes = await sup.invoke('provider', 'invoke.hook', { hook: 'placeDetailProvider', fn: 'getDetails', args: [7] }, { actingUserId: 5 });
+ expect(hookRes).toEqual([{ label: 'placeId', value: '7' }]);
+
+ // host->plugin event: ONLY the matching subscription runs (the 'other:thing' one throws if hit)
+ await sup.invoke('provider', 'invoke.event', { event: 'place:created', tripId: 3 }, { actingUserId: undefined });
+ const got = logMeta<{ event: string; tripId: number }>(events, 'got-event');
+ expect(got).toEqual({ event: 'place:created', tripId: 3 });
+ });
+
+ it('seals the raw IPC surface: a plugin cannot forge/sniff over process.send/on(message), and a forged init cannot reopen egress', async () => {
+ const events: Array<{ topic: string; data: unknown }> = [];
+ sup = makeSupervisor(events);
+
+ // The plugin runs each raw-IPC attack in try/catch and reports the outcome
+ // over the ONLY channel it still has — the SDK log (ctx.log → realSend).
+ // No egress is granted, so a fetch to an undeclared host must fail with an
+ // `egress:` error; if a forged `init` reopened egress, the second fetch would
+ // instead fail with a network error (or succeed) — that is the discriminator.
+ writePlugin(
+ 'attacker',
+ `module.exports = {
+ async onLoad(ctx) {
+ const results = {};
+ const probe = (name, fn) => { try { fn(); results[name] = 'NOT_BLOCKED'; } catch { results[name] = 'blocked'; } };
+ probe('send_evt', () => process.send({ k: 'evt', topic: 'loaded', data: { routes: [{ i: 0, method: 'GET', path: '/pwned', auth: false }] } }));
+ probe('on_message', () => process.on('message', () => {}));
+ probe('once_message', () => process.once('message', () => {}));
+ probe('prepend_message', () => process.prependListener('message', () => {}));
+ probe('removeAll_message', () => process.removeAllListeners('message'));
+ probe('removeAll_bare', () => process.removeAllListeners());
+ probe('forged_req', () => process.send({ k: 'req', method: 'trips.getById', params: { tripId: 1, _inv: 'forged' } }));
+ probe('disconnect', () => process.disconnect());
+
+ const fetchOutcome = async () => {
+ try { await fetch('https://blocked.example/x'); return 'NO_ERROR'; }
+ catch (e) { return /egress/.test(e.message) ? 'egress' : 'other'; }
+ };
+ const egressBefore = await fetchOutcome();
+ // process.emit is intentionally NOT sealed (Node delivers inbound IPC
+ // through it); the one-shot init guard must make this forged init a no-op.
+ let emitThrew = false;
+ try { process.emit('message', { k: 'evt', topic: 'init', data: { egress: ['*'] } }); }
+ catch { emitThrew = true; }
+ const egressAfter = await fetchOutcome();
+
+ // the legit SDK channel must still round-trip through the captured realSend
+ const legit = await ctx.db.query('SELECT 1 AS ok');
+
+ ctx.log.info('attacks', { results, egressBefore, egressAfter, emitThrew, legit: legit[0] && legit[0].ok });
+ },
+ };`,
+ );
+
+ await sup.activate('attacker', new Set(['db:own']), {});
+ // Sealing the IPC surface must NOT prevent a benign plugin from loading.
+ expect(sup.isActive('attacker')).toBe(true);
+
+ const a = logMeta<{
+ results: Record<string, string>;
+ egressBefore: string;
+ egressAfter: string;
+ emitThrew: boolean;
+ legit: number;
+ }>(events, 'attacks');
+ expect(a).toBeTruthy();
+
+ // Every raw-IPC operation is blocked.
+ expect(a.results.send_evt).toBe('blocked'); // can't forge lifecycle/evt envelopes
+ expect(a.results.on_message).toBe('blocked'); // can't add a 'message' listener to eavesdrop
+ expect(a.results.once_message).toBe('blocked');
+ expect(a.results.prepend_message).toBe('blocked');
+ expect(a.results.removeAll_message).toBe('blocked'); // can't unhook the trusted handler
+ expect(a.results.removeAll_bare).toBe('blocked');
+ expect(a.results.forged_req).toBe('blocked'); // can't forge a req with someone else's _inv
+ expect(a.results.disconnect).toBe('blocked');
+
+ // The forged `init` (via the un-sealed process.emit) is a no-op: egress stays sealed.
+ expect(a.egressBefore).toBe('egress');
+ expect(a.egressAfter).toBe('egress');
+ expect(a.emitThrew).toBe(false);
+
+ // The legitimate transport still works — the seal (incl. the channel lock)
+ // did not break realSend.
+ expect(a.legit).toBe(1);
+
+ // The host never registered the forged route table (the real plugin declares none).
+ expect(sup.routesOf('attacker').some((r) => r.path === '/pwned')).toBe(false);
+ });
+
it('injects require(trek-plugin-sdk) — a scaffold-style plugin loads with no node_modules', async () => {
const events: Array<{ topic: string; data: unknown }> = [];
sup = makeSupervisor(events);
@@ -102,8 +219,8 @@ describe('PluginSupervisor — isolated runtime', () => {
let testingError = '';
try { require('trek-plugin-sdk/testing'); } catch (e) { testingError = e.message; }
module.exports = definePlugin({
- async onLoad() {
- process.send({ k: 'evt', topic: 'diag', data: { api: PLUGIN_API_VERSION, fn: typeof definePlugin, testingError } });
+ async onLoad(ctx) {
+ ctx.log.info('diag', { api: PLUGIN_API_VERSION, fn: typeof definePlugin, testingError });
},
routes: [{ method: 'GET', path: '/hello', auth: true, async handler() { return { status: 200 }; } }],
});`,
@@ -112,7 +229,7 @@ describe('PluginSupervisor — isolated runtime', () => {
await sup.activate('scaffolded', new Set(['db:own']), {});
expect(sup.isActive('scaffolded')).toBe(true);
- const diag = events.find((e) => e.topic === 'diag')?.data as { api: number; fn: string; testingError: string };
+ const diag = logMeta<{ api: number; fn: string; testingError: string }>(events, 'diag');
expect(diag).toBeTruthy();
expect(diag.api).toBe(1); // the injected shim, not a vendored copy
expect(diag.fn).toBe('function');
diff --git a/server/tests/integration/trips.test.ts b/server/tests/integration/trips.test.ts
index f7c325db8..869ee1c6b 100644
--- a/server/tests/integration/trips.test.ts
+++ b/server/tests/integration/trips.test.ts
@@ -813,6 +813,28 @@ describe('Trip members', () => {
expect(login.status).toBe(401);
});
+ it('TRIP-GUEST-004 — the same guest name is allowed on two trips (no "Name 2", #1446)', async () => {
+ const { user: owner } = createUser(testDb);
+ const tripA = createTrip(testDb, owner.id, { title: 'Trip A' });
+ const tripB = createTrip(testDb, owner.id, { title: 'Trip B' });
+
+ const addJake = (tripId: number) => request(app)
+ .post(`/api/trips/${tripId}/guests`).set('Cookie', authCookie(owner.id)).send({ name: 'Jake' });
+
+ const a = await addJake(tripA.id);
+ const b = await addJake(tripB.id);
+ expect(a.status).toBe(201);
+ expect(b.status).toBe(201);
+ // both keep the plain name — the second is NOT auto-renamed to "Jake 2"
+ expect(a.body.member.username).toBe('Jake');
+ expect(b.body.member.username).toBe('Jake');
+ expect(b.body.member.id).not.toBe(a.body.member.id);
+
+ // and each trip's member list shows "Jake" (not the internal uuid handle)
+ const membersB = await request(app).get(`/api/trips/${tripB.id}/members`).set('Cookie', authCookie(owner.id));
+ expect(membersB.body.members.find((m: any) => m.id === b.body.member.id).username).toBe('Jake');
+ });
+
it('TRIP-GUEST-002 — guest CRUD is owner-only', async () => {
const { user: owner } = createUser(testDb);
const { user: member } = createUser(testDb);
@@ -838,7 +860,8 @@ describe('Trip members', () => {
.set('Cookie', authCookie(owner.id))
.send({ name: 'Junior' });
expect(renamed.status).toBe(200);
- expect((testDb.prepare('SELECT username FROM users WHERE id = ?').get(guestId) as any).username).toBe('Junior');
+ // #1446: the human name lives in display_name now (username is a non-shown uuid handle)
+ expect((testDb.prepare('SELECT display_name FROM users WHERE id = ?').get(guestId) as any).display_name).toBe('Junior');
const removed = await request(app)
.delete(`/api/trips/${trip.id}/guests/${guestId}`)
diff --git a/server/tests/unit/nest/admin.controller.test.ts b/server/tests/unit/nest/admin.controller.test.ts
index ced103673..2884de67d 100644
--- a/server/tests/unit/nest/admin.controller.test.ts
+++ b/server/tests/unit/nest/admin.controller.test.ts
@@ -7,6 +7,7 @@ vi.mock('../../../src/services/notificationService', () => ({ send: vi.fn().mock
import { AdminController } from '../../../src/nest/admin/admin.controller';
import type { AdminService } from '../../../src/nest/admin/admin.service';
+import type { PluginRuntimeService } from '../../../src/nest/plugins/plugin-runtime.service';
import { writeAudit } from '../../../src/services/auditLog';
import { send as sendNotification } from '../../../src/services/notificationService';
import type { User } from '../../../src/types';
@@ -105,17 +106,25 @@ describe('AdminController packing templates', () => {
});
describe('AdminController addons + sessions + jwt + defaults', () => {
- it('addon update audits + invalidates MCP sessions only when the MCP surface changed (#1414)', () => {
+ it('addon update audits + invalidates MCP sessions only when the MCP surface changed (#1414)', async () => {
const invalidateMcpSessions = vi.fn();
- const c = new AdminController(svc({ updateAddon: vi.fn().mockReturnValue({ addon: { id: 'mcp', enabled: true }, mcpAffected: true, auditDetails: {} }), invalidateMcpSessions } as Partial<AdminService>));
- expect(c.updateAddon(user, 'mcp', { enabled: true }, req)).toEqual({ addon: { id: 'mcp', enabled: true } });
+ const runtime = { deactivateForDisabledAddon: vi.fn() } as unknown as PluginRuntimeService;
+ const c = new AdminController(svc({ updateAddon: vi.fn().mockReturnValue({ addon: { id: 'mcp', enabled: true }, mcpAffected: true, auditDetails: {} }), invalidateMcpSessions } as Partial<AdminService>), runtime);
+ expect(await c.updateAddon(user, 'mcp', { enabled: true }, req)).toEqual({ addon: { id: 'mcp', enabled: true } });
expect(invalidateMcpSessions).toHaveBeenCalled();
+ expect(runtime.deactivateForDisabledAddon).not.toHaveBeenCalled();
// Config-only saves / MCP-irrelevant addons keep live sessions alive.
const noopInvalidate = vi.fn();
- const noop = new AdminController(svc({ updateAddon: vi.fn().mockReturnValue({ addon: { id: 'llm_parsing', enabled: true }, mcpAffected: false, auditDetails: {} }), invalidateMcpSessions: noopInvalidate } as Partial<AdminService>));
- expect(noop.updateAddon(user, 'llm_parsing', { config: { model: 'x' } }, req)).toEqual({ addon: { id: 'llm_parsing', enabled: true } });
+ const noop = new AdminController(svc({ updateAddon: vi.fn().mockReturnValue({ addon: { id: 'llm_parsing', enabled: true }, mcpAffected: false, auditDetails: {} }), invalidateMcpSessions: noopInvalidate } as Partial<AdminService>), runtime);
+ expect(await noop.updateAddon(user, 'llm_parsing', { config: { model: 'x' } }, req)).toEqual({ addon: { id: 'llm_parsing', enabled: true } });
expect(noopInvalidate).not.toHaveBeenCalled();
+
+ // Disabling an addon cascades to the plugin runtime.
+ const runtime2 = { deactivateForDisabledAddon: vi.fn().mockResolvedValue(['p1']) } as unknown as PluginRuntimeService;
+ const disable = new AdminController(svc({ updateAddon: vi.fn().mockReturnValue({ addon: { id: 'budget', enabled: false }, mcpAffected: true, auditDetails: {} }), invalidateMcpSessions: vi.fn() } as Partial<AdminService>), runtime2);
+ await disable.updateAddon(user, 'budget', { enabled: false }, req);
+ expect(runtime2.deactivateForDisabledAddon).toHaveBeenCalledWith('budget');
});
it('oauth-sessions revoke audits; rotate-jwt maps error', () => {
diff --git a/server/tests/unit/nest/budget.controller.test.ts b/server/tests/unit/nest/budget.controller.test.ts
index 6e2dd0e18..df5d0bfcc 100644
--- a/server/tests/unit/nest/budget.controller.test.ts
+++ b/server/tests/unit/nest/budget.controller.test.ts
@@ -79,33 +79,33 @@ describe('BudgetController (parity with the legacy /api/trips/:tripId/budget rou
expect(new BudgetController(svc).listSettlements(user, '5')).toEqual({ settlements: [{ id: 1 }] });
});
- it('POST /settlements 403 without budget_edit', () => {
+ it('POST /settlements 403 without budget_edit', async () => {
const svc = makeService({ canEdit: vi.fn().mockReturnValue(false) });
- expect(thrown(() => new BudgetController(svc).createSettlement(user, '5', { from_user_id: 1, to_user_id: 2, amount: 10 }))).toEqual({
+ expect(await thrownAsync(() => new BudgetController(svc).createSettlement(user, '5', { from_user_id: 1, to_user_id: 2, amount: 10 }))).toEqual({
status: 403, body: { error: 'No permission' },
});
});
- it('POST /settlements 400 when a field is missing', () => {
+ it('POST /settlements 400 when a field is missing', async () => {
const svc = makeService();
- expect(thrown(() => new BudgetController(svc).createSettlement(user, '5', { from_user_id: 1, to_user_id: 2 }))).toEqual({
+ expect(await thrownAsync(() => new BudgetController(svc).createSettlement(user, '5', { from_user_id: 1, to_user_id: 2 }))).toEqual({
status: 400, body: { error: 'from_user_id, to_user_id and amount are required' },
});
- expect(thrown(() => new BudgetController(svc).createSettlement(user, '5', { from_user_id: 1, amount: 5 }))).toEqual({
+ expect(await thrownAsync(() => new BudgetController(svc).createSettlement(user, '5', { from_user_id: 1, amount: 5 }))).toEqual({
status: 400, body: { error: 'from_user_id, to_user_id and amount are required' },
});
- expect(thrown(() => new BudgetController(svc).createSettlement(user, '5', { to_user_id: 2, amount: 5 }))).toEqual({
+ expect(await thrownAsync(() => new BudgetController(svc).createSettlement(user, '5', { to_user_id: 2, amount: 5 }))).toEqual({
status: 400, body: { error: 'from_user_id, to_user_id and amount are required' },
});
});
- it('POST /settlements creates and broadcasts (amount 0 is allowed)', () => {
- const createSettlement = vi.fn().mockReturnValue({ id: 3, amount: 0 });
+ it('POST /settlements creates and broadcasts (amount 0 is allowed), forwarding the display currency', async () => {
+ const createSettlement = vi.fn().mockResolvedValue({ id: 3, amount: 0 });
const broadcast = vi.fn();
const svc = makeService({ createSettlement, broadcast } as Partial<BudgetService>);
- const res = new BudgetController(svc).createSettlement(user, '5', { from_user_id: 1, to_user_id: 2, amount: 0 }, 'sock');
+ const res = await new BudgetController(svc).createSettlement(user, '5', { from_user_id: 1, to_user_id: 2, amount: 0, currency: 'USD' }, 'sock');
expect(res).toEqual({ settlement: { id: 3, amount: 0 } });
- expect(createSettlement).toHaveBeenCalledWith('5', { from_user_id: 1, to_user_id: 2, amount: 0 }, user.id);
+ expect(createSettlement).toHaveBeenCalledWith('5', { from_user_id: 1, to_user_id: 2, amount: 0, currency: 'USD' }, user.id);
expect(broadcast).toHaveBeenCalledWith('5', 'budget:settlement-created', { settlement: { id: 3, amount: 0 } }, 'sock');
});
@@ -123,34 +123,34 @@ describe('BudgetController (parity with the legacy /api/trips/:tripId/budget rou
expect(broadcast).toHaveBeenCalledWith('5', 'budget:settlement-deleted', { settlementId: 7 }, 'sock');
});
- it('PUT /settlements/:id 403 without budget_edit', () => {
+ it('PUT /settlements/:id 403 without budget_edit', async () => {
const svc = makeService({ canEdit: vi.fn().mockReturnValue(false) });
- expect(thrown(() => new BudgetController(svc).updateSettlement(user, '5', '7', { from_user_id: 1, to_user_id: 2, amount: 10 }))).toEqual({
+ expect(await thrownAsync(() => new BudgetController(svc).updateSettlement(user, '5', '7', { from_user_id: 1, to_user_id: 2, amount: 10 }))).toEqual({
status: 403, body: { error: 'No permission' },
});
});
- it('PUT /settlements/:id 400 when a field is missing', () => {
+ it('PUT /settlements/:id 400 when a field is missing', async () => {
const svc = makeService();
- expect(thrown(() => new BudgetController(svc).updateSettlement(user, '5', '7', { from_user_id: 1, to_user_id: 2 }))).toEqual({
+ expect(await thrownAsync(() => new BudgetController(svc).updateSettlement(user, '5', '7', { from_user_id: 1, to_user_id: 2 }))).toEqual({
status: 400, body: { error: 'from_user_id, to_user_id and amount are required' },
});
});
- it('PUT /settlements/:id 404 when missing', () => {
- const svc = makeService({ updateSettlement: vi.fn().mockReturnValue(null) } as Partial<BudgetService>);
- expect(thrown(() => new BudgetController(svc).updateSettlement(user, '5', '7', { from_user_id: 1, to_user_id: 2, amount: 10 }))).toEqual({
+ it('PUT /settlements/:id 404 when missing', async () => {
+ const svc = makeService({ updateSettlement: vi.fn().mockResolvedValue(null) } as Partial<BudgetService>);
+ expect(await thrownAsync(() => new BudgetController(svc).updateSettlement(user, '5', '7', { from_user_id: 1, to_user_id: 2, amount: 10 }))).toEqual({
status: 404, body: { error: 'Settlement not found' },
});
});
- it('PUT /settlements/:id updates and broadcasts', () => {
- const updateSettlement = vi.fn().mockReturnValue({ id: 7, from_user_id: 2, to_user_id: 1, amount: 15 });
+ it('PUT /settlements/:id updates and broadcasts, forwarding the display currency', async () => {
+ const updateSettlement = vi.fn().mockResolvedValue({ id: 7, from_user_id: 2, to_user_id: 1, amount: 15 });
const broadcast = vi.fn();
const svc = makeService({ updateSettlement, broadcast } as Partial<BudgetService>);
- const res = new BudgetController(svc).updateSettlement(user, '5', '7', { from_user_id: 2, to_user_id: 1, amount: 15 }, 'sock');
+ const res = await new BudgetController(svc).updateSettlement(user, '5', '7', { from_user_id: 2, to_user_id: 1, amount: 15, currency: 'USD' }, 'sock');
expect(res).toEqual({ settlement: { id: 7, from_user_id: 2, to_user_id: 1, amount: 15 } });
- expect(updateSettlement).toHaveBeenCalledWith('7', '5', { from_user_id: 2, to_user_id: 1, amount: 15 });
+ expect(updateSettlement).toHaveBeenCalledWith('7', '5', { from_user_id: 2, to_user_id: 1, amount: 15, currency: 'USD' });
expect(broadcast).toHaveBeenCalledWith('5', 'budget:settlement-updated', { settlement: { id: 7, from_user_id: 2, to_user_id: 1, amount: 15 } }, 'sock');
});
});
diff --git a/server/tests/unit/nest/budget.service.test.ts b/server/tests/unit/nest/budget.service.test.ts
index bb0ffce59..566825525 100644
--- a/server/tests/unit/nest/budget.service.test.ts
+++ b/server/tests/unit/nest/budget.service.test.ts
@@ -22,14 +22,16 @@ const { budget } = vi.hoisted(() => ({
listBudgetItems: vi.fn(),
getPerPersonSummary: vi.fn(),
calculateSettlement: vi.fn(),
+ freezeForeignRate: vi.fn(),
createBudgetItem: vi.fn(),
updateBudgetItem: vi.fn(),
deleteBudgetItem: vi.fn(),
updateMembers: vi.fn(),
toggleMemberPaid: vi.fn(),
setItemPayers: vi.fn(),
- listSettlements: vi.fn(),
+ listSettlements: vi.fn(() => []),
createSettlement: vi.fn(),
+ updateSettlement: vi.fn(),
deleteSettlement: vi.fn(),
reorderBudgetItems: vi.fn(),
reorderBudgetCategories: vi.fn(),
@@ -118,11 +120,18 @@ describe('BudgetService', () => {
expect(budget.setItemPayers).toHaveBeenCalledWith('9', '5', [{ user_id: 2, amount: 10 }]);
});
- it('settlement ledger + reorder delegate', () => {
+ it('settlement ledger + reorder delegate', async () => {
svc().listSettlements('5');
expect(budget.listSettlements).toHaveBeenCalledWith('5');
- svc().createSettlement('5', { from_user_id: 1, to_user_id: 2, amount: 10 }, 3);
+ // createSettlement freezes the FX rate (await) before delegating.
+ await svc().createSettlement('5', { from_user_id: 1, to_user_id: 2, amount: 10 }, 3);
+ expect(budget.freezeForeignRate).toHaveBeenCalledWith('5', { from_user_id: 1, to_user_id: 2, amount: 10 });
expect(budget.createSettlement).toHaveBeenCalledWith('5', { from_user_id: 1, to_user_id: 2, amount: 10 }, 3);
+ budget.listSettlements.mockReturnValue([{ id: 7, currency: 'USD' }] as never);
+ await svc().updateSettlement('7', '5', { from_user_id: 1, to_user_id: 2, amount: 12, currency: 'USD' });
+ // the settlement's stored currency is threaded through so an unchanged-currency edit keeps the frozen rate (#1445)
+ expect(budget.freezeForeignRate).toHaveBeenCalledWith('5', { from_user_id: 1, to_user_id: 2, amount: 12, currency: 'USD' }, undefined, 'USD');
+ expect(budget.updateSettlement).toHaveBeenCalledWith('7', '5', { from_user_id: 1, to_user_id: 2, amount: 12, currency: 'USD' });
svc().deleteSettlement('7', '5');
expect(budget.deleteSettlement).toHaveBeenCalledWith('7', '5');
svc().reorderItems('5', [3, 1]);
diff --git a/server/tests/unit/nest/files.controller.test.ts b/server/tests/unit/nest/files.controller.test.ts
index e9f071a5e..ffdc15cb2 100644
--- a/server/tests/unit/nest/files.controller.test.ts
+++ b/server/tests/unit/nest/files.controller.test.ts
@@ -218,6 +218,24 @@ describe('FilesDownloadController', () => {
}
});
+ it('serves a .pkpasses bundle inline with its own Wallet MIME type', () => {
+ const real = path.join(os.tmpdir(), `trek-pass-${Date.now()}.pkpasses`);
+ fs.writeFileSync(real, 'x');
+ try {
+ const setHeader = vi.fn();
+ const localRes = { setHeader, sendFile: vi.fn() } as unknown as Response;
+ const s = dsvc({
+ getFileById: vi.fn().mockReturnValue({ filename: 'passes.pkpasses', original_name: 'BoardingPasses.pkpasses' }),
+ resolveFilePath: vi.fn().mockReturnValue({ resolved: real, safe: true }),
+ });
+ new FilesDownloadController(s).download(req, localRes, '5', '9');
+ expect(setHeader).toHaveBeenCalledWith('Content-Type', 'application/vnd.apple.pkpasses');
+ expect(setHeader).toHaveBeenCalledWith('Content-Disposition', 'inline; filename="BoardingPasses.pkpasses"');
+ } finally {
+ fs.unlinkSync(real);
+ }
+ });
+
it('falls back to the resolved basename when a .pkpass has no original name', () => {
const real = path.join(os.tmpdir(), `trek-pass-${Date.now()}.pkpass`);
fs.writeFileSync(real, 'x');
diff --git a/server/tests/unit/plugins/create-rpc-host.test.ts b/server/tests/unit/plugins/create-rpc-host.test.ts
index 1a032cc0e..2cd3eddfe 100644
--- a/server/tests/unit/plugins/create-rpc-host.test.ts
+++ b/server/tests/unit/plugins/create-rpc-host.test.ts
@@ -4,17 +4,89 @@
* a granted db:own call works through the wired host, and trip broadcasts are
* force-namespaced to plugin:{id}:{event}.
*/
-import { describe, it, expect, beforeAll, afterAll, vi } from 'vitest';
+import { describe, it, expect, beforeAll, beforeEach, afterAll, vi } from 'vitest';
import fs from 'node:fs';
import os from 'node:os';
import path from 'node:path';
const { broadcast, broadcastToUser } = vi.hoisted(() => ({ broadcast: vi.fn(), broadcastToUser: vi.fn() }));
-vi.mock('../../../src/db/database', () => ({
- db: { prepare: () => ({ all: () => [], get: () => null }) },
- canAccessTrip: (tripId: number, userId: number) => (tripId === 1 && userId === 5 ? { id: 1 } : undefined),
-}));
+// A real in-memory core db so the metadata deps (inline SQL) and metaEntityTrip
+// resolution run for real; trip 1 is owned by user 5. canAccessTrip is stubbed so
+// user 5 (owner) can access trip 1 and user 6 cannot.
+vi.mock('../../../src/db/database', () => {
+ const Database = require('better-sqlite3');
+ const d = new Database(':memory:');
+ d.exec(`
+ CREATE TABLE trips (id INTEGER PRIMARY KEY, user_id INTEGER);
+ CREATE TABLE places (id INTEGER PRIMARY KEY, trip_id INTEGER);
+ CREATE TABLE days (id INTEGER PRIMARY KEY, trip_id INTEGER);
+ CREATE TABLE users (id INTEGER PRIMARY KEY, role TEXT, username TEXT, display_name TEXT, avatar TEXT);
+ CREATE TABLE trip_members (trip_id INTEGER, user_id INTEGER);
+ CREATE TABLE plugin_entity_metadata (id INTEGER PRIMARY KEY AUTOINCREMENT, plugin_id TEXT, entity_type TEXT, entity_id INTEGER, key TEXT, value TEXT, updated_at TEXT, UNIQUE(plugin_id, entity_type, entity_id, key));
+ `);
+ d.prepare('INSERT INTO trips (id, user_id) VALUES (1, 5)').run();
+ d.prepare('INSERT INTO places (id, trip_id) VALUES (7, 1)').run();
+ d.prepare('INSERT INTO days (id, trip_id) VALUES (3, 1)').run();
+ d.prepare('INSERT INTO users (id, role) VALUES (5, ?)').run('trip_owner');
+ d.prepare('INSERT INTO users (id, role) VALUES (6, ?)').run('user');
+ d.prepare('INSERT INTO trip_members (trip_id, user_id) VALUES (1, 6)').run(); // user 6 shares trip 1 with owner 5
+ return { db: d, canAccessTrip: (tripId: number, userId: number) => (tripId === 1 && (userId === 5 || userId === 6) ? { id: 1, user_id: 5 } : undefined) };
+});
vi.mock('../../../src/websocket', () => ({ broadcast, broadcastToUser }));
+vi.mock('../../../src/services/adminService', () => ({ isAddonEnabled: () => true }));
+vi.mock('../../../src/nest/budget/budget.service', () => ({
+ BudgetService: class {
+ async create(tid: string, input: Record<string, unknown>) { return { id: 1, trip_id: Number(tid), ...input }; }
+ async update(id: string, tid: string, input: Record<string, unknown>) {
+ return id === '404' ? null : { id: Number(id), trip_id: Number(tid), ...input };
+ }
+ remove(id: string, _tid: string) { return id !== '404'; }
+ },
+}));
+
+// Edit permission — flip per test to exercise the gates.
+// eslint-disable-next-line @typescript-eslint/no-explicit-any
+const { checkPermission } = vi.hoisted(() => ({ checkPermission: vi.fn((..._a: any[]) => true as boolean) }));
+vi.mock('../../../src/services/permissions', () => ({ checkPermission }));
+
+// The core write services are delegated to; mock them so the create-rpc-host deps'
+// wiring + error branches run without the full core schema. The error classes must
+// be defined INSIDE the factory (vi.mock is hoisted above module-scope code).
+vi.mock('../../../src/services/tripService', () => {
+ class NotFoundError extends Error {}
+ class ValidationError extends Error {}
+ return {
+ updateTrip: (tripId: number, _u: number, input: Record<string, unknown>) => {
+ if (input.title === 'boom') throw new ValidationError('bad dates');
+ if (input.title === 'gone') throw new NotFoundError('no trip');
+ if (input.title === 'crash') throw new Error('unexpected');
+ return { updatedTrip: { id: tripId, ...input } };
+ },
+ listTrips: () => [],
+ NotFoundError, ValidationError,
+ };
+});
+vi.mock('../../../src/services/placeService', () => ({
+ createPlace: vi.fn((tid: string, body: Record<string, unknown>) => ({ id: 10, trip_id: Number(tid), ...body })),
+ updatePlace: vi.fn((_tid: string, pid: string) => (pid === '99' ? null : { id: Number(pid) })),
+ deletePlace: vi.fn((_tid: string, pid: string) => pid !== '99'),
+}));
+vi.mock('../../../src/services/dayService', () => ({
+ createDay: vi.fn((tid: number) => ({ id: 20, trip_id: tid, assignments: [] })),
+ getDay: vi.fn((id: number) => (id === 99 ? undefined : { id, title: null })),
+ updateDay: vi.fn((id: number) => ({ id, assignments: [] })),
+ deleteDay: vi.fn(),
+}));
+vi.mock('../../../src/services/assignmentService', () => ({
+ createAssignment: vi.fn((dayId: number, placeId: number, notes: string | null) => ({ id: 30, day_id: dayId, place_id: placeId, notes })),
+ deleteAssignment: vi.fn(),
+ dayExists: vi.fn((dayId: number) => dayId === 3),
+ placeExists: vi.fn((placeId: number) => placeId === 7),
+ getAssignmentForTrip: vi.fn((id: number) => (id === 99 ? undefined : { id })),
+}));
+vi.mock('../../../src/services/budgetService', () => ({ listBudgetItems: vi.fn(() => []) }));
+vi.mock('../../../src/services/packingService', () => ({ listItems: vi.fn((tid: number, userId: number) => [{ id: 1, trip_id: tid, name: 'Socks', _uid: userId }]) }));
+vi.mock('../../../src/services/fileService', () => ({ listFiles: vi.fn((tid: number, trash: boolean) => [{ id: 2, trip_id: tid, trash }]) }));
import { createRealRpcHost, getPluginDataDb, closePluginDataDb } from '../../../src/nest/plugins/host/create-rpc-host';
@@ -62,3 +134,106 @@ describe('create-rpc-host wiring', () => {
closePluginDataDb('transient');
});
});
+
+describe('create-rpc-host — planner write + metadata deps', () => {
+ const host = (...perms: string[]) => createRealRpcHost('writer', new Set(perms));
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
+ const call = async (h: ReturnType<typeof host>, method: string, params: Record<string, unknown>, uid = 5): Promise<any> =>
+ h.dispatch({ k: 'req', id: 'x', method, params }, uid);
+ beforeEach(() => { checkPermission.mockReset(); checkPermission.mockReturnValue(true); });
+ afterAll(() => closePluginDataDb('writer'));
+
+ it('places.create/update/delete delegate + broadcast; a missing place is RESOURCE_FORBIDDEN', async () => {
+ const h = host('db:write:places');
+ expect((await call(h, 'places.create', { tripId: 1, input: { name: 'P' } })).ok).toBe(true);
+ // Write deps re-emit the SAME core event the controllers do (not the plugin: namespace).
+ expect(broadcast).toHaveBeenCalledWith(1, 'place:created', expect.anything());
+ expect((await call(h, 'places.update', { tripId: 1, placeId: 5, input: { name: 'Q' } })).ok).toBe(true);
+ expect((await call(h, 'places.update', { tripId: 1, placeId: 99, input: {} })).error.code).toBe('RESOURCE_FORBIDDEN');
+ expect((await call(h, 'places.delete', { tripId: 1, placeId: 5 })).ok).toBe(true);
+ expect((await call(h, 'places.delete', { tripId: 1, placeId: 99 })).error.code).toBe('RESOURCE_FORBIDDEN');
+ });
+
+ it('days + itinerary delegate; a day/place/assignment outside the trip is refused', async () => {
+ const h = host('db:write:days', 'db:write:itinerary');
+ expect((await call(h, 'days.create', { tripId: 1, input: { notes: 'n' } })).ok).toBe(true);
+ expect((await call(h, 'days.update', { tripId: 1, dayId: 3, input: { notes: 'x' } })).ok).toBe(true);
+ expect((await call(h, 'days.delete', { tripId: 1, dayId: 3 })).ok).toBe(true);
+ expect((await call(h, 'days.update', { tripId: 1, dayId: 99, input: {} })).error.code).toBe('RESOURCE_FORBIDDEN');
+ expect((await call(h, 'itinerary.assign', { tripId: 1, dayId: 3, placeId: 7 })).ok).toBe(true);
+ expect((await call(h, 'itinerary.assign', { tripId: 1, dayId: 99, placeId: 7 })).error.code).toBe('RESOURCE_FORBIDDEN');
+ expect((await call(h, 'itinerary.assign', { tripId: 1, dayId: 3, placeId: 99 })).error.code).toBe('RESOURCE_FORBIDDEN');
+ expect((await call(h, 'itinerary.unassign', { tripId: 1, assignmentId: 30 })).ok).toBe(true);
+ expect((await call(h, 'itinerary.unassign', { tripId: 1, assignmentId: 99 })).error.code).toBe('RESOURCE_FORBIDDEN');
+ });
+
+ it('trips.update: archive/cover need their own permission; service errors map to RPC codes', async () => {
+ const h = host('db:write:trips');
+ expect((await call(h, 'trips.update', { tripId: 1, input: { title: 'T' } })).ok).toBe(true);
+ checkPermission.mockImplementation((action: string) => action !== 'trip_archive');
+ expect((await call(h, 'trips.update', { tripId: 1, input: { is_archived: 1 } })).error.code).toBe('RESOURCE_FORBIDDEN');
+ checkPermission.mockImplementation((action: string) => action !== 'trip_cover_upload');
+ expect((await call(h, 'trips.update', { tripId: 1, input: { cover_image: '/x.jpg' } })).error.code).toBe('RESOURCE_FORBIDDEN');
+ checkPermission.mockReturnValue(true);
+ expect((await call(h, 'trips.update', { tripId: 1, input: { title: 'boom' } })).error.code).toBe('BAD_PARAMS');
+ expect((await call(h, 'trips.update', { tripId: 1, input: { title: 'gone' } })).error.code).toBe('RESOURCE_FORBIDDEN');
+ expect((await call(h, 'trips.update', { tripId: 1, input: { title: 'crash' } })).error.code).toBe('HOST_ERROR'); // rethrow of an unknown error
+ });
+
+ it('metadata: round-trips and enforces the key/value/access limits', async () => {
+ const h = host('db:meta');
+ expect((await call(h, 'meta.set', { entityType: 'trip', entityId: 1, key: 'k', value: { a: 1 } })).ok).toBe(true);
+ expect((await call(h, 'meta.get', { entityType: 'trip', entityId: 1, key: 'k' })).result).toEqual({ a: 1 });
+ expect((await call(h, 'meta.set', { entityType: 'trip', entityId: 1, key: 'k', value: 2 })).ok).toBe(true); // upsert path
+ expect((await call(h, 'meta.list', { entityType: 'place', entityId: 7 })).ok).toBe(true); // place → trip 1
+ expect((await call(h, 'meta.delete', { entityType: 'trip', entityId: 1, key: 'k' })).result).toEqual({ deleted: true });
+ expect((await call(h, 'meta.set', { entityType: 'trip', entityId: 1, key: 'x'.repeat(300), value: 1 })).error.code).toBe('BAD_PARAMS');
+ expect((await call(h, 'meta.set', { entityType: 'trip', entityId: 1, key: 'big', value: 'y'.repeat(70000) })).error.code).toBe('BAD_PARAMS');
+ expect((await call(h, 'meta.set', { entityType: 'trip', entityId: 2, key: 'k', value: 1 })).error.code).toBe('RESOURCE_FORBIDDEN');
+ });
+
+ it('costs deps: create + reads wired through the budget service and addon gate', async () => {
+ const h = host('db:read:costs', 'db:write:costs');
+ expect((await call(h, 'costs.create', { tripId: 1, input: { name: 'Hotel' } })).ok).toBe(true);
+ expect(broadcast).toHaveBeenCalledWith(1, 'budget:created', expect.anything());
+ expect((await call(h, 'costs.getByTrip', { tripId: 1 })).ok).toBe(true);
+ expect((await call(h, 'costs.listMine', {})).ok).toBe(true);
+ });
+
+ it('costs deps: update wired through BudgetService.update + broadcasts budget:updated', async () => {
+ const h = host('db:write:costs');
+ expect((await call(h, 'costs.update', { tripId: 1, itemId: 9, input: { name: 'Hostel' } })).ok).toBe(true);
+ expect(broadcast).toHaveBeenCalledWith(1, 'budget:updated', expect.anything());
+ });
+
+ it('costs deps: update of a missing item is RESOURCE_FORBIDDEN', async () => {
+ const h = host('db:write:costs');
+ expect((await call(h, 'costs.update', { tripId: 1, itemId: 404, input: { name: 'X' } })).error.code).toBe('RESOURCE_FORBIDDEN');
+ });
+
+ it('costs deps: delete wired through BudgetService.remove + broadcasts budget:deleted', async () => {
+ const h = host('db:write:costs');
+ const res = await call(h, 'costs.delete', { tripId: 1, itemId: 9 });
+ expect(res.ok).toBe(true);
+ expect(res.result).toMatchObject({ deleted: true });
+ expect(broadcast).toHaveBeenCalledWith(1, 'budget:deleted', { itemId: 9 });
+ });
+
+ it('costs deps: delete of a missing item is RESOURCE_FORBIDDEN', async () => {
+ const h = host('db:write:costs');
+ expect((await call(h, 'costs.delete', { tripId: 1, itemId: 404 })).error.code).toBe('RESOURCE_FORBIDDEN');
+ });
+
+ it('packing/files read deps delegate to their services (trash excluded for files)', async () => {
+ const h = host('db:read:packing', 'db:read:files');
+ // acting user 5 is threaded to the packing service (#858 private-item filter); _uid proves it
+ expect((await call(h, 'packing.list', { tripId: 1 })).result).toEqual([{ id: 1, trip_id: 1, name: 'Socks', _uid: 5 }]);
+ expect((await call(h, 'files.list', { tripId: 1 })).result).toEqual([{ id: 2, trip_id: 1, trash: false }]);
+ });
+
+ it('users.getById is scoped to people the acting user shares a trip with', async () => {
+ const h = host('db:read:users');
+ expect((await call(h, 'users.getById', { id: 6 }, 5)).ok).toBe(true); // 5 (owner) + 6 (member) share trip 1
+ expect((await call(h, 'users.getById', { id: 999 }, 5)).error.code).toBe('RESOURCE_FORBIDDEN');
+ });
+});
diff --git a/server/tests/unit/plugins/dependencies.test.ts b/server/tests/unit/plugins/dependencies.test.ts
new file mode 100644
index 000000000..47d186f61
--- /dev/null
+++ b/server/tests/unit/plugins/dependencies.test.ts
@@ -0,0 +1,107 @@
+/**
+ * Pure dependency-reasoning helpers (#plugins). Parsing, addon/plugin gating,
+ * dependent lookup, and cycle-safe enable ordering.
+ */
+import { describe, it, expect } from 'vitest';
+import {
+ parseDependencies,
+ disabledRequiredAddons,
+ resolveDependencyState,
+ findDependents,
+ findDependentsTransitive,
+ enableOrder,
+ DependencyCycleError,
+ type PluginDepRow,
+} from '../../../src/nest/plugins/dependencies';
+
+const row = (id: string, opts: Partial<PluginDepRow> & { deps?: { requiredAddons?: string[]; pluginDependencies?: { id: string; version: string }[] } } = {}): PluginDepRow => ({
+ id,
+ version: opts.version ?? '1.0.0',
+ enabled: opts.enabled ?? 0,
+ dependencies: opts.deps ? JSON.stringify({ requiredAddons: opts.deps.requiredAddons ?? [], pluginDependencies: opts.deps.pluginDependencies ?? [] }) : (opts.dependencies ?? '{}'),
+});
+const map = (...rows: PluginDepRow[]) => new Map(rows.map((r) => [r.id, r]));
+
+describe('parseDependencies', () => {
+ it('returns empty lists for null/garbage/legacy blobs', () => {
+ expect(parseDependencies(null)).toEqual({ requiredAddons: [], pluginDependencies: [] });
+ expect(parseDependencies('not json')).toEqual({ requiredAddons: [], pluginDependencies: [] });
+ expect(parseDependencies('{}')).toEqual({ requiredAddons: [], pluginDependencies: [] });
+ });
+ it('filters non-string addons and malformed deps', () => {
+ const d = parseDependencies(JSON.stringify({ requiredAddons: ['budget', 5], pluginDependencies: [{ id: 'koffi', version: '^1' }, { id: 'x' }] }));
+ expect(d.requiredAddons).toEqual(['budget']);
+ expect(d.pluginDependencies).toEqual([{ id: 'koffi', version: '^1' }]);
+ });
+});
+
+describe('disabledRequiredAddons', () => {
+ it('lists only the disabled required addons', () => {
+ const deps = parseDependencies(JSON.stringify({ requiredAddons: ['budget', 'journey'], pluginDependencies: [] }));
+ expect(disabledRequiredAddons(deps, (a) => a === 'budget')).toEqual(['journey']);
+ expect(disabledRequiredAddons(deps, () => true)).toEqual([]);
+ });
+});
+
+describe('resolveDependencyState', () => {
+ const deps = parseDependencies(JSON.stringify({ requiredAddons: [], pluginDependencies: [{ id: 'a', version: '>=1.0.0' }, { id: 'b', version: '^2.0.0' }, { id: 'c', version: '^1.0.0' }] }));
+ it('classifies missing / mismatch / satisfied (active + disabled)', () => {
+ const installed = map(
+ row('a', { version: '1.5.0', enabled: 1 }), // satisfied + active
+ row('b', { version: '1.0.0', enabled: 0 }), // installed but ^2 not satisfied → mismatch
+ // c missing
+ );
+ const s = resolveDependencyState(deps, installed);
+ expect(s.satisfiedActive).toEqual(['a']);
+ expect(s.versionMismatch).toEqual([{ id: 'b', wanted: '^2.0.0', installed: '1.0.0' }]);
+ expect(s.missing.map((m) => m.id)).toEqual(['c']);
+ expect(s.satisfiedDisabled).toEqual([]);
+ });
+ it('reports a satisfied-but-disabled dep as an auto-enable candidate', () => {
+ const s = resolveDependencyState(parseDependencies(JSON.stringify({ requiredAddons: [], pluginDependencies: [{ id: 'a', version: '^1.0.0' }] })), map(row('a', { version: '1.2.0', enabled: 0 })));
+ expect(s.satisfiedDisabled).toEqual(['a']);
+ });
+});
+
+describe('findDependents', () => {
+ it('finds direct + transitive dependents', () => {
+ const rows = [
+ row('base'),
+ row('mid', { deps: { pluginDependencies: [{ id: 'base', version: '*' }] } }),
+ row('top', { deps: { pluginDependencies: [{ id: 'mid', version: '*' }] } }),
+ row('unrelated'),
+ ];
+ expect(findDependents('base', rows)).toEqual(['mid']);
+ expect(findDependentsTransitive('base', rows).sort()).toEqual(['mid', 'top']);
+ });
+});
+
+describe('enableOrder', () => {
+ it('orders dependencies before dependents', () => {
+ const installed = map(
+ row('base'),
+ row('mid', { deps: { pluginDependencies: [{ id: 'base', version: '*' }] } }),
+ row('top', { deps: { pluginDependencies: [{ id: 'mid', version: '*' }] } }),
+ );
+ expect(enableOrder(['top'], installed)).toEqual(['base', 'mid', 'top']);
+ });
+ it('ignores edges to uninstalled deps', () => {
+ const installed = map(row('top', { deps: { pluginDependencies: [{ id: 'ghost', version: '*' }] } }));
+ expect(enableOrder(['top'], installed)).toEqual(['top']);
+ });
+ it('dedupes across multiple roots', () => {
+ const installed = map(
+ row('base'),
+ row('a', { deps: { pluginDependencies: [{ id: 'base', version: '*' }] } }),
+ row('b', { deps: { pluginDependencies: [{ id: 'base', version: '*' }] } }),
+ );
+ expect(enableOrder(['a', 'b'], installed)).toEqual(['base', 'a', 'b']);
+ });
+ it('throws DependencyCycleError on a cycle', () => {
+ const installed = map(
+ row('a', { deps: { pluginDependencies: [{ id: 'b', version: '*' }] } }),
+ row('b', { deps: { pluginDependencies: [{ id: 'a', version: '*' }] } }),
+ );
+ expect(() => enableOrder(['a'], installed)).toThrow(DependencyCycleError);
+ });
+});
diff --git a/server/tests/unit/plugins/discovery.test.ts b/server/tests/unit/plugins/discovery.test.ts
index 3ae2a7ab2..32256482f 100644
--- a/server/tests/unit/plugins/discovery.test.ts
+++ b/server/tests/unit/plugins/discovery.test.ts
@@ -27,7 +27,7 @@ beforeEach(() => {
db = new Database(':memory:');
db.exec(`
CREATE TABLE plugins (id TEXT PRIMARY KEY, name TEXT, description TEXT, type TEXT, icon TEXT, version TEXT,
- api_version INTEGER, min_trek_version TEXT, permissions TEXT, capabilities TEXT DEFAULT '{}', granted_permissions TEXT, status TEXT, config TEXT, updated_at TEXT);
+ api_version INTEGER, min_trek_version TEXT, permissions TEXT, capabilities TEXT DEFAULT '{}', dependencies TEXT DEFAULT '{}', granted_permissions TEXT, status TEXT, config TEXT, updated_at TEXT);
CREATE TABLE plugin_settings_fields (plugin_id TEXT, field_key TEXT, label TEXT, input_type TEXT, placeholder TEXT, hint TEXT,
required INTEGER, secret INTEGER, scope TEXT, options TEXT, oauth_config TEXT, sort_order INTEGER);
CREATE TABLE plugin_error_log (id INTEGER PRIMARY KEY AUTOINCREMENT, plugin_id TEXT, level TEXT, message TEXT, ts TEXT);`);
diff --git a/server/tests/unit/plugins/event-subscriptions.test.ts b/server/tests/unit/plugins/event-subscriptions.test.ts
new file mode 100644
index 000000000..8a8c61311
--- /dev/null
+++ b/server/tests/unit/plugins/event-subscriptions.test.ts
@@ -0,0 +1,52 @@
+/**
+ * Core event subscriptions (#1429 eco). Two enforcement points:
+ * 1. the websocket broadcast tap announces every CORE event (name only) to the
+ * sink, but never plugin:* re-broadcasts (loop guard);
+ * 2. supervisor.deliverEvent only invokes plugins that are active, hold
+ * 'events:subscribe', AND subscribed to the event (or '*').
+ */
+import { describe, it, expect, afterEach } from 'vitest';
+import { PluginSupervisor } from '../../../src/nest/plugins/supervisor/plugin-supervisor';
+import { broadcast } from '../../../src/websocket';
+import { setPluginEventSink } from '../../../src/plugin-event-sink';
+
+function makeSupervisor(): PluginSupervisor {
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
+ return new PluginSupervisor((() => ({})) as any, {}, {});
+}
+function put(s: PluginSupervisor, id: string, status: string, events: string[], granted: string[]): void {
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
+ (s as any).running.set(id, { id, status, hooks: [], events, granted: new Set(granted) });
+}
+
+describe('supervisor.deliverEvent gating', () => {
+ it('invokes only active, granted, subscribed plugins (name + tripId only, fire-and-forget)', () => {
+ const s = makeSupervisor();
+ put(s, 'sub', 'active', ['place:created'], ['events:subscribe']);
+ put(s, 'star', 'active', ['*'], ['events:subscribe']);
+ put(s, 'nogrant', 'active', ['place:created'], ['db:own']); // subscribed but no grant
+ put(s, 'otherEvent', 'active', ['day:updated'], ['events:subscribe']); // different event
+ put(s, 'notactive', 'starting', ['place:created'], ['events:subscribe']);
+ const calls: Array<[string, string, Record<string, unknown>]> = [];
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
+ (s as any).invoke = (id: string, method: string, params: Record<string, unknown>) => { calls.push([id, method, params]); return Promise.resolve(); };
+
+ s.deliverEvent(7, 'place:created');
+ expect(calls.map((c) => c[0]).sort()).toEqual(['star', 'sub']);
+ expect(calls[0][1]).toBe('invoke.event');
+ expect(calls.every((c) => c[2].event === 'place:created' && c[2].tripId === 7)).toBe(true);
+ });
+});
+
+describe('websocket broadcast → plugin event sink', () => {
+ afterEach(() => setPluginEventSink(null));
+
+ it('announces core events by name, and never plugin:* re-broadcasts', () => {
+ const seen: Array<[number, string]> = [];
+ setPluginEventSink((tripId, event) => seen.push([tripId, event]));
+ // fires even with no connected sockets (announced before the room check)
+ broadcast(42, 'place:created', { place: { id: 1 } });
+ broadcast(42, 'plugin:trip-doctor:rechecked', { count: 3 }); // must be skipped
+ expect(seen).toEqual([[42, 'place:created']]);
+ });
+});
diff --git a/server/tests/unit/plugins/manifest.test.ts b/server/tests/unit/plugins/manifest.test.ts
index 3003f31cc..24852eae5 100644
--- a/server/tests/unit/plugins/manifest.test.ts
+++ b/server/tests/unit/plugins/manifest.test.ts
@@ -20,6 +20,10 @@ describe('parseManifest', () => {
expect(parseManifest({ ...base, trek: '>=3.2.0 <4.0.0' }).minTrekVersion).toBe('3.2.0');
});
+ it('accepts the trip-page type (mounts as a tab inside the trip planner)', () => {
+ expect(parseManifest({ ...base, type: 'trip-page' }).type).toBe('trip-page');
+ });
+
it('keeps known permissions + parses settings', () => {
const m = parseManifest({
...base,
@@ -69,7 +73,44 @@ describe('parseManifest capabilities', () => {
expect(parseManifest(base).capabilities).toEqual({});
});
+ it('accepts the place-detail widget slot (mounts in the place inspector)', () => {
+ const pd = parseManifest({ ...base, capabilities: { widget: { slot: 'place-detail' } } });
+ expect(pd.capabilities.widget?.slot).toBe('place-detail');
+ });
+
it('rejects an unknown widget slot', () => {
expect(() => parseManifest({ ...base, capabilities: { widget: { slot: 'floating' } } })).toThrow(ManifestError);
});
});
+
+describe('parseManifest dependencies', () => {
+ it('defaults to empty dependency lists', () => {
+ const m = parseManifest({ ...base });
+ expect(m.requiredAddons).toEqual([]);
+ expect(m.pluginDependencies).toEqual([]);
+ });
+
+ it('parses + de-duplicates requiredAddons', () => {
+ const m = parseManifest({ ...base, requiredAddons: ['budget', 'journey', 'budget'] });
+ expect(m.requiredAddons).toEqual(['budget', 'journey']);
+ });
+
+ it('rejects a malformed addon id', () => {
+ expect(() => parseManifest({ ...base, requiredAddons: ['Budget!'] })).toThrow(ManifestError);
+ });
+
+ it('parses pluginDependencies with semver ranges', () => {
+ const m = parseManifest({ ...base, pluginDependencies: [{ id: 'koffi', version: '>=1.2.0 <2.0.0' }] });
+ expect(m.pluginDependencies).toEqual([{ id: 'koffi', version: '>=1.2.0 <2.0.0' }]);
+ });
+
+ it('rejects an invalid dependency version range', () => {
+ expect(() => parseManifest({ ...base, pluginDependencies: [{ id: 'koffi', version: 'not-a-range' }] })).toThrow(ManifestError);
+ });
+
+ it('rejects a self dependency, a reserved id, and duplicates', () => {
+ expect(() => parseManifest({ ...base, pluginDependencies: [{ id: base.id, version: '*' }] })).toThrow(/itself/);
+ expect(() => parseManifest({ ...base, pluginDependencies: [{ id: 'registry', version: '*' }] })).toThrow(/reserved/);
+ expect(() => parseManifest({ ...base, pluginDependencies: [{ id: 'koffi', version: '*' }, { id: 'koffi', version: '^1' }] })).toThrow(/duplicate/);
+ });
+});
diff --git a/server/tests/unit/plugins/place-details.controller.test.ts b/server/tests/unit/plugins/place-details.controller.test.ts
new file mode 100644
index 000000000..cb34a6c1e
--- /dev/null
+++ b/server/tests/unit/plugins/place-details.controller.test.ts
@@ -0,0 +1,61 @@
+import { describe, it, expect, vi, beforeEach } from 'vitest';
+
+const { canAccessTrip, placeTrip, pluginsEnabled } = vi.hoisted(() => ({
+ canAccessTrip: vi.fn((tripId: number, userId: number) => (tripId === 1 && userId === 5 ? { id: 1 } : undefined)),
+ placeTrip: vi.fn((placeId: number) => (placeId === 7 ? { trip_id: 1 } : undefined)),
+ pluginsEnabled: vi.fn(() => true),
+}));
+vi.mock('../../../src/db/database', () => ({
+ db: { prepare: () => ({ get: (placeId: number) => placeTrip(placeId) }) },
+ canAccessTrip,
+}));
+vi.mock('../../../src/nest/plugins/kill-switch', () => ({ pluginsEnabled }));
+
+import { PlaceDetailsController } from '../../../src/nest/plugins/place-details.controller';
+import type { PluginRuntimeService } from '../../../src/nest/plugins/plugin-runtime.service';
+
+// eslint-disable-next-line @typescript-eslint/no-explicit-any
+const req = (id?: number) => ({ user: id === undefined ? undefined : { id } }) as any;
+function controller(over: Partial<PluginRuntimeService> = {}) {
+ const runtime = {
+ providersOf: vi.fn(() => ['p1', 'p2']),
+ invokeHook: vi.fn(async (id: string) => (id === 'p2' ? [{ label: 'Rating', value: '4.5' }] : [{ label: 'Reviews', value: '12', url: 'https://x' }])),
+ ...over,
+ } as unknown as PluginRuntimeService;
+ return { c: new PlaceDetailsController(runtime), runtime };
+}
+
+describe('PlaceDetailsController', () => {
+ beforeEach(() => { pluginsEnabled.mockReturnValue(true); canAccessTrip.mockReturnValue({ id: 1 } as never); });
+
+ it('returns [] when the runtime is disabled (no plugin calls)', async () => {
+ pluginsEnabled.mockReturnValue(false);
+ const { c, runtime } = controller();
+ expect(await c.get('7', req(5))).toEqual({ providers: [] });
+ expect(runtime.providersOf).not.toHaveBeenCalled();
+ });
+
+ it('returns [] for an unknown place or a place the caller cannot access', async () => {
+ const { c } = controller();
+ expect(await c.get('999', req(5))).toEqual({ providers: [] }); // place not found
+ canAccessTrip.mockReturnValue(undefined as never);
+ expect(await c.get('7', req(5))).toEqual({ providers: [] }); // no access
+ });
+
+ it('returns [] without an authenticated user', async () => {
+ const { c } = controller();
+ expect(await c.get('7', req(undefined))).toEqual({ providers: [] });
+ });
+
+ it('merges every provider that returns items and skips one that throws (graceful)', async () => {
+ const { c, runtime } = controller({
+ invokeHook: vi.fn(async (id: string) => {
+ if (id === 'p2') throw new Error('slow provider');
+ return [{ label: 'Reviews', value: '12' }];
+ }) as unknown as PluginRuntimeService['invokeHook'],
+ });
+ const res = await c.get('7', req(5));
+ expect(res.providers).toEqual([{ pluginId: 'p1', items: [{ label: 'Reviews', value: '12' }] }]);
+ expect(runtime.invokeHook).toHaveBeenCalledWith('p1', 'placeDetailProvider', 'getDetails', [7], 5, 5000);
+ });
+});
diff --git a/server/tests/unit/plugins/plugin-audit.test.ts b/server/tests/unit/plugins/plugin-audit.test.ts
index 94ad52ebe..26d71afeb 100644
--- a/server/tests/unit/plugins/plugin-audit.test.ts
+++ b/server/tests/unit/plugins/plugin-audit.test.ts
@@ -27,10 +27,17 @@ describe('auditResource + isAuditable', () => {
it('audits core-data + ws, not a plugin own-db call', () => {
expect(isAuditable('trips.getReservations')).toBe(true);
expect(isAuditable('users.getById')).toBe(true);
+ expect(isAuditable('packing.list')).toBe(true);
+ expect(isAuditable('files.list')).toBe(true);
expect(isAuditable('ws.broadcastToTrip')).toBe(true);
expect(isAuditable('db.query')).toBe(false);
expect(isAuditable('db.migrate')).toBe(false);
});
+
+ it('resolves packing/files reads to their trip resource', () => {
+ expect(auditResource('packing.list', { tripId: 3 })).toBe('trip:3');
+ expect(auditResource('files.list', { tripId: 3 })).toBe('trip:3');
+ });
});
describe('appendAudit hash chain', () => {
diff --git a/server/tests/unit/plugins/plugin-sdk.test.ts b/server/tests/unit/plugins/plugin-sdk.test.ts
index 14da01e19..fe0826ad3 100644
--- a/server/tests/unit/plugins/plugin-sdk.test.ts
+++ b/server/tests/unit/plugins/plugin-sdk.test.ts
@@ -33,7 +33,7 @@ describe('createPluginContext', () => {
expect(rpc).toHaveBeenCalledWith('ws.broadcastToTrip', { tripId: 1, event: 'ping', data: { a: 1 } });
await ctx.users.getById(3);
- expect(rpc).toHaveBeenCalledWith('users.getById', { id: 3 });
+ expect(rpc).toHaveBeenCalledWith('users.getById', { id: 3, _inv: 'inv-1' });
await ctx.db.exec('DELETE FROM t');
expect(rpc).toHaveBeenCalledWith('db.exec', { sql: 'DELETE FROM t', args: [] });
@@ -44,6 +44,21 @@ describe('createPluginContext', () => {
await ctx.trips.getReservations(1);
expect(rpc).toHaveBeenCalledWith('trips.getReservations', { tripId: 1, _inv: 'inv-1' });
+ await ctx.costs.getByTrip(1);
+ expect(rpc).toHaveBeenCalledWith('costs.getByTrip', { tripId: 1, _inv: 'inv-1' });
+
+ await ctx.costs.listMine();
+ expect(rpc).toHaveBeenCalledWith('costs.listMine', { _inv: 'inv-1' });
+
+ await ctx.costs.create(1, { name: 'Hotel' });
+ expect(rpc).toHaveBeenCalledWith('costs.create', { tripId: 1, input: { name: 'Hotel' }, _inv: 'inv-1' });
+
+ await ctx.costs.update(1, 5, { name: 'Hostel' });
+ expect(rpc).toHaveBeenCalledWith('costs.update', { tripId: 1, itemId: 5, input: { name: 'Hostel' }, _inv: 'inv-1' });
+
+ await ctx.costs.delete(1, 5);
+ expect(rpc).toHaveBeenCalledWith('costs.delete', { tripId: 1, itemId: 5, _inv: 'inv-1' });
+
await ctx.ws.broadcastToUser(9, 'poke', { x: 2 });
expect(rpc).toHaveBeenCalledWith('ws.broadcastToUser', { userId: 9, event: 'poke', data: { x: 2 } });
});
diff --git a/server/tests/unit/plugins/plugins-proxy.test.ts b/server/tests/unit/plugins/plugins-proxy.test.ts
index 36e402182..31a8e8165 100644
--- a/server/tests/unit/plugins/plugins-proxy.test.ts
+++ b/server/tests/unit/plugins/plugins-proxy.test.ts
@@ -25,6 +25,7 @@ function fakeRes() {
setHeader(k: string, v: string) { res.headers[k] = v; },
json(b: unknown) { res.body = b; return res; },
send(b: unknown) { res.body = b; return res; },
+ end() { return res; },
};
return res;
}
@@ -117,4 +118,45 @@ describe('PluginsProxyController', () => {
await new PluginsProxyController(runtime).proxy('p', fakeReq('GET', '/status'), res as never);
expect(res.statusCode).toBe(502);
});
+
+ it('follows a relative in-app redirect', async () => {
+ const runtime = makeRuntime({
+ invoke: vi.fn(async () => ({ status: 302, headers: { location: '/trips/5?tab=plan' } })),
+ } as never);
+ const res = fakeRes();
+ await new PluginsProxyController(runtime).proxy('p', fakeReq('GET', '/status'), res as never);
+ expect(res.statusCode).toBe(302);
+ // normalised to path+query, still same-origin
+ expect(res.headers['Location']).toBe('/trips/5?tab=plan');
+ });
+
+ // Every one of these is an open-redirect target a naive `starts with / but not
+ // //` check would let through; each must be rejected as 502.
+ it.each([
+ ['//evil.com', 'protocol-relative'],
+ ['/\\evil.com', 'backslash normalised to / by browsers'],
+ ['/\t/evil.com', 'tab stripped by browsers'],
+ ['https://evil.com', 'absolute url'],
+ ['http:/evil.com', 'scheme-relative'],
+ ['javascript:alert(1)', 'javascript scheme'],
+ ['', 'empty'],
+ ])('502 on an unsafe redirect target (%s — %s)', async (loc) => {
+ const runtime = makeRuntime({
+ invoke: vi.fn(async () => ({ status: 302, headers: { location: loc } })),
+ } as never);
+ const res = fakeRes();
+ await new PluginsProxyController(runtime).proxy('p', fakeReq('GET', '/status'), res as never);
+ expect(res.statusCode).toBe(502);
+ expect(res.body).toMatchObject({ detail: 'unsafe redirect target' });
+ expect(res.headers['Location']).toBeUndefined();
+ });
+
+ it('502 on a redirect status with no Location header', async () => {
+ const runtime = makeRuntime({
+ invoke: vi.fn(async () => ({ status: 301, headers: {} })),
+ } as never);
+ const res = fakeRes();
+ await new PluginsProxyController(runtime).proxy('p', fakeReq('GET', '/status'), res as never);
+ expect(res.statusCode).toBe(502);
+ });
});
diff --git a/server/tests/unit/plugins/plugins-service.test.ts b/server/tests/unit/plugins/plugins-service.test.ts
index a93917c17..0feee5fab 100644
--- a/server/tests/unit/plugins/plugins-service.test.ts
+++ b/server/tests/unit/plugins/plugins-service.test.ts
@@ -9,7 +9,7 @@ const { testDb } = vi.hoisted(() => {
const db = new Database(':memory:');
db.exec(`CREATE TABLE plugins (
id TEXT PRIMARY KEY, name TEXT, description TEXT, type TEXT, icon TEXT, version TEXT,
- status TEXT, enabled INTEGER DEFAULT 0, last_error TEXT, reviewed_at TEXT, source_repo TEXT, config TEXT DEFAULT '{}', permissions TEXT DEFAULT '[]', capabilities TEXT DEFAULT '{}', updated_at TEXT,
+ status TEXT, enabled INTEGER DEFAULT 0, last_error TEXT, reviewed_at TEXT, source_repo TEXT, config TEXT DEFAULT '{}', permissions TEXT DEFAULT '[]', capabilities TEXT DEFAULT '{}', dependencies TEXT DEFAULT '{}', updated_at TEXT,
sort_order INTEGER DEFAULT 0);
CREATE TABLE plugin_settings_fields (plugin_id TEXT, field_key TEXT, scope TEXT, secret INTEGER);
CREATE TABLE plugin_error_log (id INTEGER PRIMARY KEY AUTOINCREMENT, plugin_id TEXT, level TEXT, message TEXT, ts TEXT DEFAULT '2026-01-01');`);
@@ -129,9 +129,11 @@ describe('PluginsController M2 endpoints', () => {
await expect(new PluginsController(svc, rt, {} as never).activate('x')).rejects.toMatchObject({ status: 400 });
});
- it('deactivate stops the plugin', async () => {
- const rt = { deactivate: vi.fn(async () => {}) } as never;
+ it('deactivate stops the plugin (and cascades to dependents)', async () => {
+ const deactivateWithDependents = vi.fn(async () => ['x']);
+ const rt = { deactivateWithDependents } as never;
expect(await new PluginsController(svc, rt, {} as never).deactivate('x')).toEqual({ status: 'inactive' });
+ expect(deactivateWithDependents).toHaveBeenCalledWith('x');
});
});
diff --git a/server/tests/unit/plugins/provider-hook-grant.test.ts b/server/tests/unit/plugins/provider-hook-grant.test.ts
new file mode 100644
index 000000000..4aa8058ee
--- /dev/null
+++ b/server/tests/unit/plugins/provider-hook-grant.test.ts
@@ -0,0 +1,51 @@
+/**
+ * Audit fix (#1429 provider hooks): a plugin may only be dispatched a provider hook
+ * if it BOTH implements it (reported by the child at load) AND holds the matching
+ * hook:* grant the admin consented to. providersOf() is the enforcement point; the
+ * child reports Object.keys(def.hooks) with no knowledge of grants, so without this
+ * host-side intersection the hook:* consent would be dead code.
+ *
+ * providersOf only reads status/hooks/granted, so we inject bare Supervised entries
+ * into the private running map rather than spawning real children.
+ */
+import { describe, it, expect } from 'vitest';
+import { PluginSupervisor } from '../../../src/nest/plugins/supervisor/plugin-supervisor';
+import { PluginRuntimeService } from '../../../src/nest/plugins/plugin-runtime.service';
+
+function makeSupervisor(): PluginSupervisor {
+ // createRpcHost is never called on the providersOf path (no spawn).
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
+ return new PluginSupervisor((() => ({})) as any, {}, {});
+}
+function put(s: PluginSupervisor, id: string, status: string, hooks: string[], granted: string[]): void {
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
+ (s as any).running.set(id, { id, status, hooks, granted: new Set(granted) });
+}
+
+describe('providersOf enforces the hook:* grant', () => {
+ it('returns a plugin only when it implements the hook AND holds the matching grant', () => {
+ const s = makeSupervisor();
+ put(s, 'granted', 'active', ['placeDetailProvider'], ['hook:place-detail-provider']);
+ put(s, 'ungranted', 'active', ['placeDetailProvider'], ['db:write:places']); // implements it, but hook not granted
+ put(s, 'notactive', 'starting', ['placeDetailProvider'], ['hook:place-detail-provider']); // granted, but not active
+ put(s, 'warner', 'active', ['warningProvider'], ['hook:trip-warning-provider']);
+ expect(s.providersOf('placeDetailProvider')).toEqual(['granted']);
+ expect(s.providersOf('warningProvider')).toEqual(['warner']);
+ });
+
+ it('a hook name with no permission mapping resolves to nobody', () => {
+ const s = makeSupervisor();
+ put(s, 'x', 'active', ['mysteryProvider'], ['hook:mystery', 'db:own']);
+ expect(s.providersOf('mysteryProvider')).toEqual([]);
+ });
+});
+
+describe('runtime.invokeHook defense-in-depth', () => {
+ it('refuses a plugin id that is not a granted provider of the hook, even if passed directly', async () => {
+ const rt = new PluginRuntimeService();
+ // one legitimate granted provider exists, so providersOf('placeDetailProvider') = ['ok']
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
+ (rt as any).supervisor.running.set('ok', { id: 'ok', status: 'active', hooks: ['placeDetailProvider'], events: [], granted: new Set(['hook:place-detail-provider']) });
+ await expect(rt.invokeHook('other', 'placeDetailProvider', 'getDetails', [1])).rejects.toThrow(/not a granted provider/);
+ });
+});
diff --git a/server/tests/unit/plugins/rpc-host.test.ts b/server/tests/unit/plugins/rpc-host.test.ts
index 3f7cbd6b3..fa9e568bf 100644
--- a/server/tests/unit/plugins/rpc-host.test.ts
+++ b/server/tests/unit/plugins/rpc-host.test.ts
@@ -32,6 +32,39 @@ function makeDeps(): HostDeps {
canSeeUser: vi.fn((actingUserId: number, targetUserId: number) => actingUserId === 42 && targetUserId === 3),
broadcastToTrip: vi.fn(),
broadcastToUser: vi.fn(),
+ // Costs (budget) — addon on; user 42 may edit trip 1's costs.
+ budgetAddonEnabled: vi.fn(() => true),
+ canEditCosts: vi.fn((tripId: number, userId: number) => tripId === 1 && userId === 42),
+ listPackingItems: vi.fn((tripId: number, _userId: number) => [{ id: 1, trip_id: tripId, name: 'Socks' }]),
+ listTripFiles: vi.fn((tripId: number) => [{ id: 2, trip_id: tripId, filename: 'visa.pdf' }]),
+ listCostsForTrip: vi.fn((tripId: number) => [{ id: 5, trip_id: tripId, name: 'Hotel', total_price: 100 }]),
+ listCostsForUser: vi.fn(() => [
+ { id: 5, trip_id: 1, name: 'Hotel' },
+ { id: 6, trip_id: 2, name: 'Food' },
+ ]),
+ createCost: vi.fn((tripId: number, input: unknown) => ({ id: 9, trip_id: tripId, ...(input as object) })),
+ updateCost: vi.fn((tripId: number, itemId: number, input: unknown) => ({ id: itemId, trip_id: tripId, ...(input as object) })),
+ deleteCost: vi.fn(() => ({ deleted: true })),
+ // Planner writes — user 42 may edit trip 1 only (mirrors canAccessTrip).
+ canEditPlaces: vi.fn((tripId: number, userId: number) => tripId === 1 && userId === 42),
+ createPlace: vi.fn((tripId: number, input: unknown) => ({ id: 10, trip_id: tripId, ...(input as object) })),
+ updatePlace: vi.fn((tripId: number, placeId: number, input: unknown) => ({ id: placeId, trip_id: tripId, ...(input as object) })),
+ deletePlace: vi.fn(() => ({ deleted: true })),
+ canEditDays: vi.fn((tripId: number, userId: number) => tripId === 1 && userId === 42),
+ createDay: vi.fn((tripId: number, input: unknown) => ({ id: 20, trip_id: tripId, ...(input as object) })),
+ updateDay: vi.fn((tripId: number, dayId: number, input: unknown) => ({ id: dayId, trip_id: tripId, ...(input as object) })),
+ deleteDay: vi.fn(() => ({ deleted: true })),
+ assignPlaceToDay: vi.fn((tripId: number, dayId: number, placeId: number, notes: string | null) => ({ id: 30, day_id: dayId, place_id: placeId, notes })),
+ unassignPlace: vi.fn(() => ({ deleted: true })),
+ canEditTrip: vi.fn((tripId: number, userId: number) => tripId === 1 && userId === 42),
+ updateTrip: vi.fn((tripId: number, _userId: number, input: unknown) => ({ id: tripId, ...(input as object) })),
+ // Metadata — trip 1 and place 7 resolve to trip 1 (accessible to 42); else undefined.
+ metaEntityTrip: vi.fn((entityType: string, entityId: number) =>
+ (entityType === 'trip' && entityId === 1) || (entityType === 'place' && entityId === 7) || (entityType === 'day' && entityId === 3) ? 1 : undefined),
+ metaGet: vi.fn(() => ({ hello: 'world' })),
+ metaSet: vi.fn((_et: string, _eid: number, key: string, value: unknown) => ({ key, value })),
+ metaList: vi.fn(() => ({ a: 1 })),
+ metaDelete: vi.fn(() => ({ deleted: true })),
};
}
@@ -99,6 +132,23 @@ describe('PluginRpcHost — capability enforcement', () => {
expect((allowed as RpcResponse).result).toEqual([{ id: 7, name: 'Place' }]);
});
+ it('db:read:packing / db:read:files delegate to the service, membership-checked, and stay separate scopes', async () => {
+ const packing = new PluginRpcHost('p', new Set(['db:read:packing']), deps);
+ // no access to trip 2 → refused before the service is called
+ expect(((await packing.dispatch(req('packing.list', { tripId: 2 }), 42)) as RpcError).error.code).toBe('RESOURCE_FORBIDDEN');
+ expect(deps.listPackingItems).not.toHaveBeenCalled();
+ const okP = await packing.dispatch(req('packing.list', { tripId: 1 }), 42);
+ expect(ok(okP)).toBe(true);
+ // the acting user is threaded through so packing's #858 private-item filter applies
+ expect(deps.listPackingItems).toHaveBeenCalledWith(1, 42);
+ // the packing scope does NOT unlock files
+ expect(((await packing.dispatch(req('files.list', { tripId: 1 }), 42)) as RpcError).error.code).toBe('PERMISSION_DENIED');
+
+ const files = new PluginRpcHost('p', new Set(['db:read:files']), deps);
+ const okF = await files.dispatch(req('files.list', { tripId: 1 }), 42);
+ expect((okF as RpcResponse).result).toEqual([{ id: 2, trip_id: 1, filename: 'visa.pdf' }]);
+ });
+
it('db:read:users returns only the public projection for a visible user', async () => {
const host = new PluginRpcHost('p', new Set(['db:read:users']), deps);
const res = await host.dispatch(req('users.getById', { id: 3 }), 42);
@@ -209,4 +259,285 @@ describe('PluginRpcHost — capability enforcement', () => {
const noParams = await host.dispatch({ k: 'req', id: 'y', method: 'db.query', params: undefined });
expect((noParams as RpcError).error.code).toBe('BAD_PARAMS');
});
+
+ // ── Costs (budget items): db:read:costs / db:write:costs ────────────────────
+
+ it('db:read:costs reads a trip the acting user can access', async () => {
+ const host = new PluginRpcHost('p', new Set(['db:read:costs']), deps);
+ const res = await host.dispatch(req('costs.getByTrip', { tripId: 1 }), 42);
+ expect(ok(res)).toBe(true);
+ expect((res as RpcResponse).result).toEqual([{ id: 5, trip_id: 1, name: 'Hotel', total_price: 100 }]);
+ expect(deps.listCostsForTrip).toHaveBeenCalledWith(1);
+ });
+
+ it('db:read:costs is membership-checked before the read (non-member → RESOURCE_FORBIDDEN)', async () => {
+ const host = new PluginRpcHost('p', new Set(['db:read:costs']), deps);
+ const res = await host.dispatch(req('costs.getByTrip', { tripId: 1 }), 99);
+ expect((res as RpcError).error.code).toBe('RESOURCE_FORBIDDEN');
+ expect(deps.listCostsForTrip).not.toHaveBeenCalled();
+ });
+
+ it('costs are RESOURCE_FORBIDDEN when the Costs addon is disabled', async () => {
+ (deps.budgetAddonEnabled as ReturnType<typeof vi.fn>).mockReturnValue(false);
+ const host = new PluginRpcHost('p', new Set(['db:read:costs']), deps);
+ const res = await host.dispatch(req('costs.getByTrip', { tripId: 1 }), 42);
+ expect((res as RpcError).error.code).toBe('RESOURCE_FORBIDDEN');
+ expect(deps.listCostsForTrip).not.toHaveBeenCalled();
+ });
+
+ it('costs.listMine returns costs across every accessible trip', async () => {
+ const host = new PluginRpcHost('p', new Set(['db:read:costs']), deps);
+ const res = await host.dispatch(req('costs.listMine', {}), 42);
+ expect(ok(res)).toBe(true);
+ expect((res as RpcResponse).result).toEqual([
+ { id: 5, trip_id: 1, name: 'Hotel' },
+ { id: 6, trip_id: 2, name: 'Food' },
+ ]);
+ expect(deps.listCostsForUser).toHaveBeenCalledWith(42);
+ });
+
+ it('costs.listMine with no bound acting user is RESOURCE_FORBIDDEN (jobs / forged calls)', async () => {
+ const host = new PluginRpcHost('p', new Set(['db:read:costs']), deps);
+ const res = await host.dispatch(req('costs.listMine', {}), undefined);
+ expect((res as RpcError).error.code).toBe('RESOURCE_FORBIDDEN');
+ expect(deps.listCostsForUser).not.toHaveBeenCalled();
+ });
+
+ it('costs.getByTrip is PERMISSION_DENIED without db:read:costs', async () => {
+ const host = new PluginRpcHost('p', new Set(['db:read:trips']), deps);
+ const res = await host.dispatch(req('costs.getByTrip', { tripId: 1 }), 42);
+ expect((res as RpcError).error.code).toBe('PERMISSION_DENIED');
+ });
+
+ it('db:write:costs creates a cost when the user may edit the trip', async () => {
+ const host = new PluginRpcHost('p', new Set(['db:write:costs']), deps);
+ const res = await host.dispatch(req('costs.create', { tripId: 1, input: { name: 'Hotel', total_price: 120 } }), 42);
+ expect(ok(res)).toBe(true);
+ expect((res as RpcResponse).result).toMatchObject({ id: 9, trip_id: 1, name: 'Hotel', total_price: 120 });
+ expect(deps.createCost).toHaveBeenCalledWith(1, expect.objectContaining({ name: 'Hotel', total_price: 120 }));
+ });
+
+ it('db:write:costs is RESOURCE_FORBIDDEN without the budget_edit permission', async () => {
+ (deps.canEditCosts as ReturnType<typeof vi.fn>).mockReturnValue(false);
+ const host = new PluginRpcHost('p', new Set(['db:write:costs']), deps);
+ const res = await host.dispatch(req('costs.create', { tripId: 1, input: { name: 'Hotel' } }), 42);
+ expect((res as RpcError).error.code).toBe('RESOURCE_FORBIDDEN');
+ expect(deps.createCost).not.toHaveBeenCalled();
+ });
+
+ it('db:write:costs on a trip the user cannot access is RESOURCE_FORBIDDEN', async () => {
+ const host = new PluginRpcHost('p', new Set(['db:write:costs']), deps);
+ const res = await host.dispatch(req('costs.create', { tripId: 1, input: { name: 'Hotel' } }), 99);
+ expect((res as RpcError).error.code).toBe('RESOURCE_FORBIDDEN');
+ expect(deps.createCost).not.toHaveBeenCalled();
+ });
+
+ it('db:write:costs with an invalid payload is BAD_PARAMS', async () => {
+ const host = new PluginRpcHost('p', new Set(['db:write:costs']), deps);
+ // name is required (min length 1) by budgetCreateItemRequestSchema
+ const res = await host.dispatch(req('costs.create', { tripId: 1, input: { total_price: 5 } }), 42);
+ expect((res as RpcError).error.code).toBe('BAD_PARAMS');
+ expect(deps.createCost).not.toHaveBeenCalled();
+ });
+
+ it('db:write:costs with no bound acting user is RESOURCE_FORBIDDEN', async () => {
+ const host = new PluginRpcHost('p', new Set(['db:write:costs']), deps);
+ const res = await host.dispatch(req('costs.create', { tripId: 1, input: { name: 'Hotel' } }), undefined);
+ expect((res as RpcError).error.code).toBe('RESOURCE_FORBIDDEN');
+ expect(deps.createCost).not.toHaveBeenCalled();
+ });
+
+ it('costs.create is PERMISSION_DENIED without db:write:costs', async () => {
+ const host = new PluginRpcHost('p', new Set(['db:read:costs']), deps);
+ const res = await host.dispatch(req('costs.create', { tripId: 1, input: { name: 'Hotel' } }), 42);
+ expect((res as RpcError).error.code).toBe('PERMISSION_DENIED');
+ });
+
+ it('db:write:costs updates a cost when the user may edit the trip', async () => {
+ const host = new PluginRpcHost('p', new Set(['db:write:costs']), deps);
+ const res = await host.dispatch(req('costs.update', { tripId: 1, itemId: 5, input: { name: 'Hostel' } }), 42);
+ expect(ok(res)).toBe(true);
+ expect((res as RpcResponse).result).toMatchObject({ id: 5, trip_id: 1, name: 'Hostel' });
+ expect(deps.updateCost).toHaveBeenCalledWith(1, 5, expect.objectContaining({ name: 'Hostel' }));
+ });
+
+ it('costs.update is RESOURCE_FORBIDDEN without the budget_edit permission', async () => {
+ (deps.canEditCosts as ReturnType<typeof vi.fn>).mockReturnValue(false);
+ const host = new PluginRpcHost('p', new Set(['db:write:costs']), deps);
+ const res = await host.dispatch(req('costs.update', { tripId: 1, itemId: 5, input: { name: 'X' } }), 42);
+ expect((res as RpcError).error.code).toBe('RESOURCE_FORBIDDEN');
+ expect(deps.updateCost).not.toHaveBeenCalled();
+ });
+
+ it('costs.update on a trip the user cannot access is RESOURCE_FORBIDDEN', async () => {
+ const host = new PluginRpcHost('p', new Set(['db:write:costs']), deps);
+ const res = await host.dispatch(req('costs.update', { tripId: 1, itemId: 5, input: { name: 'X' } }), 99);
+ expect((res as RpcError).error.code).toBe('RESOURCE_FORBIDDEN');
+ expect(deps.updateCost).not.toHaveBeenCalled();
+ });
+
+ it('costs.update with an invalid payload is BAD_PARAMS', async () => {
+ const host = new PluginRpcHost('p', new Set(['db:write:costs']), deps);
+ // total_price must be a number per budgetUpdateItemRequestSchema.
+ const res = await host.dispatch(req('costs.update', { tripId: 1, itemId: 5, input: { total_price: 'nope' } }), 42);
+ expect((res as RpcError).error.code).toBe('BAD_PARAMS');
+ expect(deps.updateCost).not.toHaveBeenCalled();
+ });
+
+ it('costs.update with no bound acting user is RESOURCE_FORBIDDEN', async () => {
+ const host = new PluginRpcHost('p', new Set(['db:write:costs']), deps);
+ const res = await host.dispatch(req('costs.update', { tripId: 1, itemId: 5, input: { name: 'X' } }), undefined);
+ expect((res as RpcError).error.code).toBe('RESOURCE_FORBIDDEN');
+ expect(deps.updateCost).not.toHaveBeenCalled();
+ });
+
+ it('costs.update is PERMISSION_DENIED without db:write:costs', async () => {
+ const host = new PluginRpcHost('p', new Set(['db:read:costs']), deps);
+ const res = await host.dispatch(req('costs.update', { tripId: 1, itemId: 5, input: { name: 'X' } }), 42);
+ expect((res as RpcError).error.code).toBe('PERMISSION_DENIED');
+ });
+
+ it('db:write:costs deletes a cost when the user may edit the trip', async () => {
+ const host = new PluginRpcHost('p', new Set(['db:write:costs']), deps);
+ const res = await host.dispatch(req('costs.delete', { tripId: 1, itemId: 5 }), 42);
+ expect(ok(res)).toBe(true);
+ expect((res as RpcResponse).result).toMatchObject({ deleted: true });
+ expect(deps.deleteCost).toHaveBeenCalledWith(1, 5);
+ });
+
+ it('costs.delete is RESOURCE_FORBIDDEN without the budget_edit permission', async () => {
+ (deps.canEditCosts as ReturnType<typeof vi.fn>).mockReturnValue(false);
+ const host = new PluginRpcHost('p', new Set(['db:write:costs']), deps);
+ const res = await host.dispatch(req('costs.delete', { tripId: 1, itemId: 5 }), 42);
+ expect((res as RpcError).error.code).toBe('RESOURCE_FORBIDDEN');
+ expect(deps.deleteCost).not.toHaveBeenCalled();
+ });
+
+ it('costs.delete on a trip the user cannot access is RESOURCE_FORBIDDEN', async () => {
+ const host = new PluginRpcHost('p', new Set(['db:write:costs']), deps);
+ const res = await host.dispatch(req('costs.delete', { tripId: 1, itemId: 5 }), 99);
+ expect((res as RpcError).error.code).toBe('RESOURCE_FORBIDDEN');
+ expect(deps.deleteCost).not.toHaveBeenCalled();
+ });
+
+ it('costs.delete with no bound acting user is RESOURCE_FORBIDDEN', async () => {
+ const host = new PluginRpcHost('p', new Set(['db:write:costs']), deps);
+ const res = await host.dispatch(req('costs.delete', { tripId: 1, itemId: 5 }), undefined);
+ expect((res as RpcError).error.code).toBe('RESOURCE_FORBIDDEN');
+ expect(deps.deleteCost).not.toHaveBeenCalled();
+ });
+
+ it('costs.delete is PERMISSION_DENIED without db:write:costs', async () => {
+ const host = new PluginRpcHost('p', new Set(['db:read:costs']), deps);
+ const res = await host.dispatch(req('costs.delete', { tripId: 1, itemId: 5 }), 42);
+ expect((res as RpcError).error.code).toBe('PERMISSION_DENIED');
+ });
+
+ // --- Planner writes (#1429) ---
+ it('db:write:places creates a place on a trip the acting user may edit', async () => {
+ const host = new PluginRpcHost('p', new Set(['db:write:places']), deps);
+ const res = await host.dispatch(req('places.create', { tripId: 1, input: { name: 'Fushimi Inari' } }), 42);
+ expect(ok(res)).toBe(true);
+ expect(deps.createPlace).toHaveBeenCalledWith(1, expect.objectContaining({ name: 'Fushimi Inari' }));
+ });
+
+ it('places.create rejects an over-long string field (mirrors the REST STRING_LIMITS)', async () => {
+ const host = new PluginRpcHost('p', new Set(['db:write:places']), deps);
+ const res = await host.dispatch(req('places.create', { tripId: 1, input: { name: 'A'.repeat(201) } }), 42);
+ expect((res as RpcError).error.code).toBe('BAD_PARAMS');
+ expect(deps.createPlace).not.toHaveBeenCalled();
+ });
+
+ it('places.create is PERMISSION_DENIED without db:write:places', async () => {
+ const host = new PluginRpcHost('p', new Set(['db:read:trips']), deps);
+ const res = await host.dispatch(req('places.create', { tripId: 1, input: { name: 'X' } }), 42);
+ expect((res as RpcError).error.code).toBe('PERMISSION_DENIED');
+ });
+
+ it('places.create is RESOURCE_FORBIDDEN on a trip the acting user cannot edit', async () => {
+ const host = new PluginRpcHost('p', new Set(['db:write:places']), deps);
+ const res = await host.dispatch(req('places.create', { tripId: 2, input: { name: 'X' } }), 42);
+ expect((res as RpcError).error.code).toBe('RESOURCE_FORBIDDEN');
+ expect(deps.createPlace).not.toHaveBeenCalled();
+ });
+
+ it('places.create with no bound acting user is RESOURCE_FORBIDDEN (jobs / forged calls)', async () => {
+ const host = new PluginRpcHost('p', new Set(['db:write:places']), deps);
+ const res = await host.dispatch(req('places.create', { tripId: 1, input: { name: 'X' } }), undefined);
+ expect((res as RpcError).error.code).toBe('RESOURCE_FORBIDDEN');
+ });
+
+ it('places.create with an invalid payload (no name) is BAD_PARAMS', async () => {
+ const host = new PluginRpcHost('p', new Set(['db:write:places']), deps);
+ const res = await host.dispatch(req('places.create', { tripId: 1, input: {} }), 42);
+ expect((res as RpcError).error.code).toBe('BAD_PARAMS');
+ expect(deps.createPlace).not.toHaveBeenCalled();
+ });
+
+ it('db:write:itinerary assigns a place to a day (day_edit gated)', async () => {
+ const host = new PluginRpcHost('p', new Set(['db:write:itinerary']), deps);
+ const res = await host.dispatch(req('itinerary.assign', { tripId: 1, dayId: 3, placeId: 10 }), 42);
+ expect(ok(res)).toBe(true);
+ expect(deps.assignPlaceToDay).toHaveBeenCalledWith(1, 3, 10, null);
+ });
+
+ it('db:write:trips updates a trip the acting user may edit', async () => {
+ const host = new PluginRpcHost('p', new Set(['db:write:trips']), deps);
+ const res = await host.dispatch(req('trips.update', { tripId: 1, input: { title: 'Renamed' } }), 42);
+ expect(ok(res)).toBe(true);
+ expect(deps.updateTrip).toHaveBeenCalledWith(1, 42, expect.objectContaining({ title: 'Renamed' }));
+ });
+
+ // --- Plugin metadata (db:meta) ---
+ it('db:meta stores and reads namespaced metadata on an accessible entity', async () => {
+ const host = new PluginRpcHost('p', new Set(['db:meta']), deps);
+ const set = await host.dispatch(req('meta.set', { entityType: 'trip', entityId: 1, key: 'rating', value: 5 }), 42);
+ expect(ok(set)).toBe(true);
+ expect(deps.metaSet).toHaveBeenCalledWith('trip', 1, 'rating', 5);
+ const placeOk = await host.dispatch(req('meta.get', { entityType: 'place', entityId: 7, key: 'x' }), 42);
+ expect(ok(placeOk)).toBe(true); // place 7 resolves to accessible trip 1
+ });
+
+ it('meta.set is PERMISSION_DENIED without db:meta', async () => {
+ const host = new PluginRpcHost('p', new Set(['db:read:trips']), deps);
+ const res = await host.dispatch(req('meta.set', { entityType: 'trip', entityId: 1, key: 'x', value: 1 }), 42);
+ expect((res as RpcError).error.code).toBe('PERMISSION_DENIED');
+ });
+
+ it('meta is RESOURCE_FORBIDDEN on an entity the acting user cannot access', async () => {
+ const host = new PluginRpcHost('p', new Set(['db:meta']), deps);
+ const res = await host.dispatch(req('meta.set', { entityType: 'trip', entityId: 2, key: 'x', value: 1 }), 42);
+ expect((res as RpcError).error.code).toBe('RESOURCE_FORBIDDEN');
+ expect(deps.metaSet).not.toHaveBeenCalled();
+ });
+
+ it('meta with an unknown entityType is BAD_PARAMS', async () => {
+ const host = new PluginRpcHost('p', new Set(['db:meta']), deps);
+ const res = await host.dispatch(req('meta.set', { entityType: 'user', entityId: 1, key: 'x', value: 1 }), 42);
+ expect((res as RpcError).error.code).toBe('BAD_PARAMS');
+ });
+
+ it('meta writes resolve the entity edit permission per type (place→place_edit, day→day_edit) and refuse no-user', async () => {
+ const host = new PluginRpcHost('p', new Set(['db:meta']), deps);
+ expect(ok(await host.dispatch(req('meta.set', { entityType: 'place', entityId: 7, key: 'k', value: 1 }), 42))).toBe(true);
+ expect(deps.canEditPlaces).toHaveBeenCalled();
+ expect(ok(await host.dispatch(req('meta.set', { entityType: 'day', entityId: 3, key: 'k', value: 1 }), 42))).toBe(true);
+ expect(deps.canEditDays).toHaveBeenCalled();
+ // no host-bound acting user (a job / forged call) → refused
+ const noUser = await host.dispatch(req('meta.get', { entityType: 'trip', entityId: 1, key: 'k' }), undefined);
+ expect((noUser as RpcError).error.code).toBe('RESOURCE_FORBIDDEN');
+ });
+
+ it('meta WRITES need the entity edit permission — a read-only member is RESOURCE_FORBIDDEN', async () => {
+ // Member can access the trip but not edit it (viewer role).
+ (deps.canEditTrip as ReturnType<typeof vi.fn>).mockReturnValue(false);
+ const host = new PluginRpcHost('p', new Set(['db:meta']), deps);
+ const write = await host.dispatch(req('meta.set', { entityType: 'trip', entityId: 1, key: 'x', value: 1 }), 42);
+ expect((write as RpcError).error.code).toBe('RESOURCE_FORBIDDEN');
+ expect(deps.metaSet).not.toHaveBeenCalled();
+ // …but a READ is only access-gated, so it still works.
+ const read = await host.dispatch(req('meta.get', { entityType: 'trip', entityId: 1, key: 'x' }), 42);
+ expect(ok(read)).toBe(true);
+ expect(deps.metaGet).toHaveBeenCalled();
+ });
});
diff --git a/server/tests/unit/plugins/trip-warnings.controller.test.ts b/server/tests/unit/plugins/trip-warnings.controller.test.ts
new file mode 100644
index 000000000..0554dabf1
--- /dev/null
+++ b/server/tests/unit/plugins/trip-warnings.controller.test.ts
@@ -0,0 +1,57 @@
+import { describe, it, expect, vi, beforeEach } from 'vitest';
+
+const { canAccessTrip, pluginsEnabled } = vi.hoisted(() => ({
+ canAccessTrip: vi.fn((tripId: number, userId: number) => (tripId === 1 && userId === 5 ? { id: 1 } : undefined)),
+ pluginsEnabled: vi.fn(() => true),
+}));
+vi.mock('../../../src/db/database', () => ({ db: {}, canAccessTrip }));
+vi.mock('../../../src/nest/plugins/kill-switch', () => ({ pluginsEnabled }));
+
+import { TripWarningsController } from '../../../src/nest/plugins/trip-warnings.controller';
+import type { PluginRuntimeService } from '../../../src/nest/plugins/plugin-runtime.service';
+
+// eslint-disable-next-line @typescript-eslint/no-explicit-any
+const req = (id?: number) => ({ user: id === undefined ? undefined : { id } }) as any;
+function controller(over: Partial<PluginRuntimeService> = {}) {
+ const runtime = {
+ providersOf: vi.fn(() => ['p1', 'p2']),
+ invokeHook: vi.fn(async (id: string) =>
+ id === 'p2' ? [{ level: 'error', message: 'Day 3 is overpacked', dayId: 3 }] : [{ level: 'warning', message: 'Museum closed Mon', placeId: 7 }]),
+ ...over,
+ } as unknown as PluginRuntimeService;
+ return { c: new TripWarningsController(runtime), runtime };
+}
+
+describe('TripWarningsController', () => {
+ beforeEach(() => { pluginsEnabled.mockReturnValue(true); canAccessTrip.mockReturnValue({ id: 1 } as never); });
+
+ it('returns [] when disabled / no user / no access', async () => {
+ pluginsEnabled.mockReturnValue(false);
+ expect(await controller().c.get('1', req(5))).toEqual({ warnings: [] });
+ pluginsEnabled.mockReturnValue(true);
+ expect(await controller().c.get('1', req(undefined))).toEqual({ warnings: [] });
+ canAccessTrip.mockReturnValue(undefined as never);
+ expect(await controller().c.get('1', req(5))).toEqual({ warnings: [] });
+ });
+
+ it('merges provider warnings, tags each with the plugin id, defaults an odd level to warning', async () => {
+ const { c } = controller({
+ invokeHook: vi.fn(async (id: string) =>
+ id === 'p1' ? [{ level: 'bogus', message: 'Check timings' }, { message: '' }] : [{ level: 'info', message: 'Rainy week' }]) as unknown as PluginRuntimeService['invokeHook'],
+ });
+ const res = await c.get('1', req(5));
+ expect(res.warnings).toEqual([
+ { pluginId: 'p1', level: 'warning', message: 'Check timings', dayId: undefined, placeId: undefined }, // unknown level → warning; empty-message row dropped
+ { pluginId: 'p2', level: 'info', message: 'Rainy week', dayId: undefined, placeId: undefined },
+ ]);
+ });
+
+ it('skips a provider that throws (graceful) and calls the hook with the trip + acting user', async () => {
+ const { c, runtime } = controller({
+ invokeHook: vi.fn(async (id: string) => { if (id === 'p2') throw new Error('slow'); return [{ level: 'warning', message: 'ok' }]; }) as unknown as PluginRuntimeService['invokeHook'],
+ });
+ const res = await c.get('1', req(5));
+ expect(res.warnings).toEqual([{ pluginId: 'p1', level: 'warning', message: 'ok', dayId: undefined, placeId: undefined }]);
+ expect(runtime.invokeHook).toHaveBeenCalledWith('p1', 'warningProvider', 'getWarnings', [1], 5, 5000);
+ });
+});
diff --git a/server/tests/unit/services/authServiceDb.test.ts b/server/tests/unit/services/authServiceDb.test.ts
index 962071fe1..3173c19ee 100644
--- a/server/tests/unit/services/authServiceDb.test.ts
+++ b/server/tests/unit/services/authServiceDb.test.ts
@@ -73,6 +73,7 @@ import { resetTestDb } from '../../helpers/test-db';
import { createUser, createAdmin, createInviteToken } from '../../helpers/factories';
import {
updateSettings,
+ updateApiKeys,
getSettings,
listUsers,
getAppSettings,
@@ -222,6 +223,15 @@ describe('getSettings', () => {
expect(result.settings).toHaveProperty('maps_api_key');
expect(result.settings).toHaveProperty('openweather_api_key');
});
+
+ it('AUTH-DB-010b: round-trips unsplash_api_key through updateApiKeys — masked to the client, readable via getSettings', () => {
+ const { user } = createAdmin(testDb);
+ const result = updateApiKeys(user.id, { unsplash_api_key: 'unsplash-secret-key' });
+ // Returned to the client masked, never in plaintext.
+ expect(result.user.unsplash_api_key).toBe('-----key');
+ // getSettings returns the stored key to the admin.
+ expect(getSettings(user.id).settings?.unsplash_api_key).toBe('unsplash-secret-key');
+ });
});
// ---------------------------------------------------------------------------
diff --git a/server/tests/unit/services/budgetService.test.ts b/server/tests/unit/services/budgetService.test.ts
index 12e2b7faa..7e29b8591 100644
--- a/server/tests/unit/services/budgetService.test.ts
+++ b/server/tests/unit/services/budgetService.test.ts
@@ -17,7 +17,10 @@ const mockDb = vi.hoisted(() => {
vi.mock('../../../src/db/database', () => mockDb);
-import { calculateSettlement, updateSettlement } from '../../../src/services/budgetService';
+const mockRates = vi.hoisted(() => ({ getRates: vi.fn() }));
+vi.mock('../../../src/services/exchangeRateService', () => mockRates);
+
+import { calculateSettlement, updateSettlement, freezeForeignRate } from '../../../src/services/budgetService';
import type { BudgetItem, BudgetItemMember, BudgetItemPayer } from '../../../src/types';
// ── Helpers ──────────────────────────────────────────────────────────────────
@@ -36,10 +39,24 @@ function makePayer(budget_item_id: number, user_id: number, amount: number, user
return { budget_item_id, user_id, amount, username, avatar: null } as BudgetItemPayer & { budget_item_id: number };
}
+// A raw budget_settlements row as listSettlements reads it (joined usernames/avatars).
+function makeSettlementRow(
+ id: number, from_user_id: number, to_user_id: number, amount: number,
+ currency: string | null = null, exchange_rate = 1,
+) {
+ return {
+ id, trip_id: 1, from_user_id, to_user_id, amount, currency, exchange_rate,
+ created_at: '2026-01-01', created_by_user_id: from_user_id,
+ from_username: `u${from_user_id}`, from_avatar: null,
+ to_username: `u${to_user_id}`, to_avatar: null,
+ };
+}
+
function setupDb(
items: BudgetItem[],
members: (BudgetItemMember & { budget_item_id: number })[],
payers: (BudgetItemPayer & { budget_item_id: number })[] = [],
+ settlements: ReturnType<typeof makeSettlementRow>[] = [],
) {
mockDb.db.prepare.mockImplementation((sql: string) => {
if (sql.includes('SELECT * FROM budget_items')) {
@@ -51,7 +68,9 @@ function setupDb(
if (sql.includes('budget_item_payers')) {
return { all: vi.fn(() => payers), get: vi.fn(), run: vi.fn() };
}
- // budget_settlements and anything else → empty
+ if (sql.includes('budget_settlements')) {
+ return { all: vi.fn(() => settlements), get: vi.fn(), run: vi.fn() };
+ }
return { all: vi.fn(() => []), get: vi.fn(), run: vi.fn() };
});
}
@@ -236,6 +255,114 @@ describe('calculateSettlement', () => {
// 120 / 1.2 (live) = 100 EUR; Bob owes 50 — unchanged behaviour for pre-#1335 rows.
expect(bob.balance).toBeCloseTo(-50, 2);
});
+
+ it('#1445 a settle-up transfer with a frozen currency+rate keeps the position balanced when rates drift', () => {
+ // Trip currency EUR; Bob viewed in USD (display) and owes Alice 50 EUR = 62.50 USD
+ // at the settle-time rate of 1.25 USD/EUR. He records that 62.50 USD transfer, which
+ // freezes currency=USD, exchange_rate=1.25. Live rates have since drifted (now the
+ // recompute passes EUR=0.5 per 1 USD), but the frozen transfer still nets to -50+50=0.
+ setupDb(
+ [makeItem(1, 100)], // trip-currency expense (currency NULL)
+ [makeMember(1, 1, 'alice'), makeMember(1, 2, 'bob')],
+ [makePayer(1, 1, 100, 'alice')],
+ [makeSettlementRow(1, 2, 1, 62.5, 'USD', 1.25)],
+ );
+ const result = calculateSettlement(1, { base: 'USD', tripCurrency: 'EUR', rates: { USD: 1, EUR: 0.5 } });
+ const bob = result.balances.find(b => b.user_id === 2)!;
+ expect(bob.balance).toBeCloseTo(0, 2); // settled — no residual re-opens
+ });
+
+ it('#1445 a legacy settle-up transfer (currency NULL) still converts with live rates', () => {
+ // Same shape, but the transfer predates the fix (currency NULL). It is re-converted
+ // to trip currency with live rates, so a drift re-opens the position — unchanged
+ // legacy behaviour that normalises once the row is re-edited.
+ setupDb(
+ [makeItem(1, 100)],
+ [makeMember(1, 1, 'alice'), makeMember(1, 2, 'bob')],
+ [makePayer(1, 1, 100, 'alice')],
+ [makeSettlementRow(1, 2, 1, 62.5, null, 1)],
+ );
+ const result = calculateSettlement(1, { base: 'USD', tripCurrency: 'EUR', rates: { USD: 1, EUR: 0.5 } });
+ const bob = result.balances.find(b => b.user_id === 2)!;
+ // settleToTrip(62.5) = 62.5 * 0.5 = 31.25 EUR; balance -50 + 31.25 = -18.75 EUR → reopens.
+ expect(Math.abs(bob.balance)).toBeGreaterThan(1);
+ });
+});
+
+// ── freezeForeignRate (write-path FX freeze, #1445) ───────────────────────────
+
+describe('freezeForeignRate', () => {
+ const tripRow = (currency: string) => ({
+ get: vi.fn(() => ({ currency })), all: vi.fn(), run: vi.fn(),
+ });
+
+ it('freezes the live rate for a foreign currency into exchange_rate', async () => {
+ mockDb.db.prepare.mockImplementation((sql: string) => {
+ if (sql.includes('FROM trips')) return tripRow('EUR');
+ return { get: vi.fn(), all: vi.fn(() => []), run: vi.fn() };
+ });
+ mockRates.getRates.mockResolvedValue({ EUR: 1, USD: 1.25 });
+ const data: { currency?: string | null; exchange_rate?: number } = { currency: 'usd' };
+ await freezeForeignRate(1, data);
+ expect(mockRates.getRates).toHaveBeenCalledWith('EUR');
+ expect(data.exchange_rate).toBe(1.25);
+ });
+
+ it('leaves the rate unset when the currency equals the trip currency', async () => {
+ mockDb.db.prepare.mockImplementation((sql: string) =>
+ sql.includes('FROM trips') ? tripRow('EUR') : { get: vi.fn(), all: vi.fn(() => []), run: vi.fn() });
+ const data: { currency?: string | null; exchange_rate?: number } = { currency: 'EUR' };
+ await freezeForeignRate(1, data);
+ expect(mockRates.getRates).not.toHaveBeenCalled();
+ expect(data.exchange_rate).toBeUndefined();
+ });
+
+ it('respects an explicit exchange_rate from the caller', async () => {
+ const data: { currency?: string | null; exchange_rate?: number } = { currency: 'USD', exchange_rate: 2 };
+ await freezeForeignRate(1, data);
+ expect(mockRates.getRates).not.toHaveBeenCalled();
+ expect(data.exchange_rate).toBe(2);
+ });
+
+ it('degrades to live rates (no freeze) when the rate fetch fails', async () => {
+ mockDb.db.prepare.mockImplementation((sql: string) =>
+ sql.includes('FROM trips') ? tripRow('EUR') : { get: vi.fn(), all: vi.fn(() => []), run: vi.fn() });
+ mockRates.getRates.mockResolvedValue(null);
+ const data: { currency?: string | null; exchange_rate?: number } = { currency: 'USD' };
+ await freezeForeignRate(1, data);
+ expect(data.exchange_rate).toBeUndefined();
+ });
+
+ it('does not re-freeze on update when the currency is unchanged', async () => {
+ mockDb.db.prepare.mockImplementation((sql: string) => {
+ if (sql.includes('FROM budget_items')) return { get: vi.fn(() => ({ currency: 'USD' })), all: vi.fn(), run: vi.fn() };
+ if (sql.includes('FROM trips')) return tripRow('EUR');
+ return { get: vi.fn(), all: vi.fn(() => []), run: vi.fn() };
+ });
+ const data: { currency?: string | null; exchange_rate?: number } = { currency: 'USD' };
+ await freezeForeignRate(1, data, 9);
+ expect(mockRates.getRates).not.toHaveBeenCalled();
+ expect(data.exchange_rate).toBeUndefined();
+ });
+
+ it('does not re-freeze a settlement edit when its stored currency is unchanged (#1445)', async () => {
+ mockDb.db.prepare.mockImplementation((sql: string) =>
+ sql.includes('FROM trips') ? tripRow('EUR') : { get: vi.fn(), all: vi.fn(() => []), run: vi.fn() });
+ const data: { currency?: string | null; exchange_rate?: number } = { currency: 'USD' };
+ // the settlement already holds USD — pass it as existingCurrency → keep the frozen rate
+ await freezeForeignRate(1, data, undefined, 'USD');
+ expect(mockRates.getRates).not.toHaveBeenCalled();
+ expect(data.exchange_rate).toBeUndefined();
+ });
+
+ it('re-freezes a settlement edit when its currency actually changes', async () => {
+ mockDb.db.prepare.mockImplementation((sql: string) =>
+ sql.includes('FROM trips') ? tripRow('EUR') : { get: vi.fn(), all: vi.fn(() => []), run: vi.fn() });
+ mockRates.getRates.mockResolvedValue({ EUR: 1, USD: 1.25 });
+ const data: { currency?: string | null; exchange_rate?: number } = { currency: 'USD' };
+ await freezeForeignRate(1, data, undefined, 'GBP'); // was GBP → now USD → re-freeze
+ expect(data.exchange_rate).toBe(1.25);
+ });
});
// ── updateSettlement ──────────────────────────────────────────────────────────
@@ -269,7 +396,9 @@ describe('updateSettlement', () => {
});
const res = updateSettlement(7, 1, { from_user_id: 2, to_user_id: 1, amount: 10.126 });
- expect(run).toHaveBeenCalledWith(2, 1, 10.13, 7);
+ // from, to, rounded amount, currency-flag(0)/value(null), rate-flag(null)/value(1), id.
+ // No currency/exchange_rate passed → both CASE guards keep the existing columns.
+ expect(run).toHaveBeenCalledWith(2, 1, 10.13, 0, null, null, 1, 7);
expect(res).toMatchObject({ id: 7, from_user_id: 2, to_user_id: 1, amount: 10.13 });
});
});
diff --git a/server/tests/unit/services/tripService.test.ts b/server/tests/unit/services/tripService.test.ts
index 3cab34561..0dc78294b 100644
--- a/server/tests/unit/services/tripService.test.ts
+++ b/server/tests/unit/services/tripService.test.ts
@@ -576,13 +576,17 @@ describe('guest members (#1362)', () => {
expect(guest.is_guest).toBe(true);
});
- it('TRIP-SVC-031: a duplicate guest name is disambiguated with a numeric suffix', () => {
+ it('TRIP-SVC-031: the same guest name is allowed, not suffixed (#1446)', () => {
const { user: owner } = createUser(testDb);
const trip = createTrip(testDb, owner.id);
const a = createGuest(trip.id, 'Sam', owner.id);
const b = createGuest(trip.id, 'Sam', owner.id);
+ // both keep the plain display name; only the internal (uuid) username differs
expect(a.member.username).toBe('Sam');
- expect(b.member.username).toBe('Sam 2');
+ expect(b.member.username).toBe('Sam');
+ expect(b.member.id).not.toBe(a.member.id);
+ const usernames = testDb.prepare('SELECT username FROM users WHERE id IN (?, ?)').all(a.member.id, b.member.id) as { username: string }[];
+ expect(usernames[0].username).not.toBe(usernames[1].username);
});
it('TRIP-SVC-032: renameGuest updates the display name (trip-scoped, guest-only)', () => {
@@ -593,7 +597,7 @@ describe('guest members (#1362)', () => {
const { member } = createGuest(trip.id, 'Bob', owner.id);
expect(renameGuest(trip.id, member.id, 'Robert')).toBe(true);
- expect((testDb.prepare('SELECT username FROM users WHERE id = ?').get(member.id) as any).username).toBe('Robert');
+ expect((testDb.prepare('SELECT display_name FROM users WHERE id = ?').get(member.id) as any).display_name).toBe('Robert');
// A real user cannot be renamed through the guest path…
expect(renameGuest(trip.id, owner.id, 'Hacked')).toBe(false);
diff --git a/server/tests/unit/services/unsplashService.test.ts b/server/tests/unit/services/unsplashService.test.ts
index 964a3ce6e..bf4c90879 100644
--- a/server/tests/unit/services/unsplashService.test.ts
+++ b/server/tests/unit/services/unsplashService.test.ts
@@ -4,14 +4,25 @@ import fs from 'fs';
import path from 'path';
// safeFetch is mocked so saveUnsplashCover never hits the network.
-const { safeFetch } = vi.hoisted(() => ({ safeFetch: vi.fn() }));
+// db is mocked so getUnsplashKey resolves from a controllable stub, and
+// decrypt_api_key is a passthrough so stored values compare as plaintext.
+const { safeFetch, mockDbGet } = vi.hoisted(() => ({ safeFetch: vi.fn(), mockDbGet: vi.fn(() => undefined as unknown) }));
vi.mock('../../../src/utils/ssrfGuard', () => ({ safeFetch }));
+vi.mock('../../../src/db/database', () => ({
+ db: { prepare: () => ({ get: mockDbGet, all: vi.fn(() => []), run: vi.fn() }) },
+}));
+vi.mock('../../../src/services/apiKeyCrypto', () => ({ decrypt_api_key: (v: string | null) => v }));
-import { searchUnsplashPhotos, saveUnsplashCover, isUnsplashCoverUrl } from '../../../src/services/unsplashService';
+import { searchUnsplashPhotos, getUnsplashKey, saveUnsplashCover, isUnsplashCoverUrl } from '../../../src/services/unsplashService';
+
+const ORIGINAL_UNSPLASH_ENV = process.env.UNSPLASH_ACCESS_KEY;
afterEach(() => {
vi.clearAllMocks();
vi.unstubAllGlobals();
+ mockDbGet.mockReturnValue(undefined);
+ if (ORIGINAL_UNSPLASH_ENV === undefined) delete process.env.UNSPLASH_ACCESS_KEY;
+ else process.env.UNSPLASH_ACCESS_KEY = ORIGINAL_UNSPLASH_ENV;
});
function fakeRes(init: { ok: boolean; status?: number; type?: string; bytes?: number; json?: unknown }): Response {
@@ -59,6 +70,53 @@ describe('unsplashService.searchUnsplashPhotos', () => {
expect(res.photos).toHaveLength(1);
expect(res.photos[0]).toMatchObject({ id: 'a', photographer: 'Alice', link: 'https://unsplash.com/a' });
});
+
+ it('UNSPLASH-010: hits the unauthenticated web endpoint when no access key is given', async () => {
+ const fetchMock = vi.fn().mockResolvedValue(fakeRes({ ok: true, type: 'application/json', json: { results: [] } }));
+ vi.stubGlobal('fetch', fetchMock);
+ await searchUnsplashPhotos('paris');
+ const [url, init] = fetchMock.mock.calls[0];
+ expect(url).toContain('unsplash.com/napi/search/photos');
+ expect((init.headers as Record<string, string>).Authorization).toBeUndefined();
+ });
+
+ it('UNSPLASH-011: hits the official API with a Client-ID header when an access key is given', async () => {
+ const fetchMock = vi.fn().mockResolvedValue(fakeRes({ ok: true, type: 'application/json', json: { results: [] } }));
+ vi.stubGlobal('fetch', fetchMock);
+ await searchUnsplashPhotos('paris', 9, 'my-access-key');
+ const [url, init] = fetchMock.mock.calls[0];
+ expect(url).toContain('api.unsplash.com/search/photos');
+ expect((init.headers as Record<string, string>).Authorization).toBe('Client-ID my-access-key');
+ expect((init.headers as Record<string, string>)['Accept-Version']).toBe('v1');
+ });
+});
+
+describe('unsplashService.getUnsplashKey', () => {
+ it('UNSPLASH-012: prefers the UNSPLASH_ACCESS_KEY env var over any stored key', () => {
+ process.env.UNSPLASH_ACCESS_KEY = 'env-key';
+ mockDbGet.mockReturnValue({ unsplash_api_key: 'user-key' });
+ expect(getUnsplashKey(1)).toBe('env-key');
+ expect(mockDbGet).not.toHaveBeenCalled();
+ });
+
+ it('UNSPLASH-013: returns the user key when set and no env var', () => {
+ delete process.env.UNSPLASH_ACCESS_KEY;
+ mockDbGet.mockReturnValueOnce({ unsplash_api_key: 'user-key' });
+ expect(getUnsplashKey(1)).toBe('user-key');
+ });
+
+ it('UNSPLASH-014: falls back to the admin key when the user has none', () => {
+ delete process.env.UNSPLASH_ACCESS_KEY;
+ mockDbGet.mockReturnValueOnce({ unsplash_api_key: null });
+ mockDbGet.mockReturnValueOnce({ unsplash_api_key: 'admin-key' });
+ expect(getUnsplashKey(1)).toBe('admin-key');
+ });
+
+ it('UNSPLASH-015: returns null when neither env, user, nor admin has a key', () => {
+ delete process.env.UNSPLASH_ACCESS_KEY;
+ mockDbGet.mockReturnValue(undefined);
+ expect(getUnsplashKey(1)).toBeNull();
+ });
});
describe('unsplashService.saveUnsplashCover', () => {
diff --git a/shared/src/appearance/appearance.schema.spec.ts b/shared/src/appearance/appearance.schema.spec.ts
index bc14c3db6..d77660690 100644
--- a/shared/src/appearance/appearance.schema.spec.ts
+++ b/shared/src/appearance/appearance.schema.spec.ts
@@ -1,4 +1,3 @@
-import { describe, expect, it } from 'vitest';
import {
APPEARANCE_SCALE_MAX,
APPEARANCE_SCALE_MIN,
@@ -6,6 +5,8 @@ import {
normalizeAppearance,
} from './appearance.schema';
+import { describe, expect, it } from 'vitest';
+
describe('normalizeAppearance', () => {
it('returns the neutral default for undefined / null / non-objects', () => {
expect(normalizeAppearance(undefined)).toEqual(DEFAULT_APPEARANCE);
diff --git a/shared/src/budget/budget.schema.ts b/shared/src/budget/budget.schema.ts
index fac2e4a79..80dbf04d9 100644
--- a/shared/src/budget/budget.schema.ts
+++ b/shared/src/budget/budget.schema.ts
@@ -179,8 +179,11 @@ export type BudgetUpdatePayersRequest = z.infer<typeof budgetUpdatePayersRequest
/**
* A persisted settle-up transfer (budget_settlements row): "from paid to" a
- * given amount in the trip base currency. Creating one marks a suggested flow as
- * paid; deleting it (undo) brings the flow back. Names joined for display.
+ * given amount, entered in the payer's display `currency`. `exchange_rate` is the
+ * live rate frozen at settle time (units of that currency per 1 trip currency), so
+ * a settled position stays balanced when live rates drift (#1445). Legacy rows
+ * have currency = null / exchange_rate = 1 and convert with live rates. Creating
+ * one marks a suggested flow as paid; deleting it (undo) brings the flow back.
*/
export const budgetSettlementSchema = z.object({
id: z.number(),
@@ -188,6 +191,8 @@ export const budgetSettlementSchema = z.object({
from_user_id: z.number(),
to_user_id: z.number(),
amount: z.number(),
+ currency: z.string().nullable().optional(),
+ exchange_rate: z.number().optional(),
created_at: z.string().optional(),
created_by_user_id: z.number().nullable().optional(),
from_username: z.string().optional(),
@@ -201,6 +206,8 @@ export const budgetCreateSettlementRequestSchema = z.object({
from_user_id: z.number(),
to_user_id: z.number(),
amount: z.number(),
+ // The display currency the amount was entered in; the server freezes its FX rate.
+ currency: z.string().nullable().optional(),
});
export type BudgetCreateSettlementRequest = z.infer<typeof budgetCreateSettlementRequestSchema>;
@@ -209,6 +216,7 @@ export const budgetUpdateSettlementRequestSchema = z.object({
from_user_id: z.number(),
to_user_id: z.number(),
amount: z.number(),
+ currency: z.string().nullable().optional(),
});
export type BudgetUpdateSettlementRequest = z.infer<typeof budgetUpdateSettlementRequestSchema>;
diff --git a/shared/src/collection/collection.schema.spec.ts b/shared/src/collection/collection.schema.spec.ts
new file mode 100644
index 000000000..689359515
--- /dev/null
+++ b/shared/src/collection/collection.schema.spec.ts
@@ -0,0 +1,22 @@
+import { collectionPlaceUpdateRequestSchema } from './collection.schema';
+
+import { describe, expect, it } from 'vitest';
+
+describe('collectionPlaceUpdateRequestSchema', () => {
+ // Regression for #1437: an update that omits `status` must NOT inject a default
+ // of 'idea', otherwise the server overwrites the stored status on every edit-save.
+ it('does not inject a status when the field is absent', () => {
+ const parsed = collectionPlaceUpdateRequestSchema.parse({ name: 'Trevi Fountain' });
+ expect('status' in parsed).toBe(false);
+ expect(parsed.status).toBeUndefined();
+ });
+
+ it('passes through an explicitly provided status', () => {
+ expect(collectionPlaceUpdateRequestSchema.parse({ status: 'want' }).status).toBe('want');
+ expect(collectionPlaceUpdateRequestSchema.parse({ status: 'visited' }).status).toBe('visited');
+ });
+
+ it('catches an invalid status back to idea rather than throwing', () => {
+ expect(collectionPlaceUpdateRequestSchema.parse({ status: 'bogus' as never }).status).toBe('idea');
+ });
+});
diff --git a/shared/src/collection/collection.schema.ts b/shared/src/collection/collection.schema.ts
index 09955b43d..acdec68c3 100644
--- a/shared/src/collection/collection.schema.ts
+++ b/shared/src/collection/collection.schema.ts
@@ -1,7 +1,8 @@
-import { z } from 'zod';
import { placeCategorySchema } from '../place/place.schema';
import { tagSchema } from '../tag/tag.schema';
+import { z } from 'zod';
+
export const COLLECTION_STATUSES = ['idea', 'want', 'visited'] as const;
export const collectionStatusSchema = z.enum(COLLECTION_STATUSES).catch('idea').default('idea');
export type CollectionStatus = (typeof COLLECTION_STATUSES)[number];
@@ -17,7 +18,11 @@ export type CollectionRole = (typeof COLLECTION_ROLES)[number];
export const collectionLinkSchema = z.object({
label: z.string().max(120).optional(),
// http/https only — blocks javascript:/data: hrefs and forces an absolute link.
- url: z.string().trim().max(2000).regex(/^https?:\/\/.+/i),
+ url: z
+ .string()
+ .trim()
+ .max(2000)
+ .regex(/^https?:\/\/.+/i),
});
export type CollectionLink = z.infer<typeof collectionLinkSchema>;
export const collectionLinksSchema = z.array(collectionLinkSchema).max(30);
@@ -104,7 +109,10 @@ export type Collection = z.infer<typeof collectionSchema>;
export const collectionCreateRequestSchema = z.object({
name: z.string().min(1).max(120),
description: z.string().max(2000).nullable().optional(),
- color: z.string().regex(/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/).optional(),
+ color: z
+ .string()
+ .regex(/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/)
+ .optional(),
icon: z.string().max(40).optional(),
cover_image: z.string().max(500).nullable().optional(),
links: collectionLinksSchema.optional(),
@@ -165,7 +173,10 @@ export const collectionPlaceUpdateRequestSchema = z.object({
name: z.string().min(1).optional(),
description: z.string().nullable().optional(),
notes: z.string().nullable().optional(),
- status: collectionStatusSchema.optional(),
+ // .removeDefault() strips the inner .default('idea') so an ABSENT status parses to
+ // undefined (left unchanged) instead of being injected as 'idea' (see #1437). The
+ // .catch('idea') guard against invalid values is preserved.
+ status: collectionStatusSchema.removeDefault().optional(),
category_id: z.number().nullable().optional(),
collection_id: z.number().optional(), // move to another list
links: collectionLinksSchema.optional(),
diff --git a/shared/src/i18n/ar/admin.ts b/shared/src/i18n/ar/admin.ts
index 7ad92ea09..efff7077c 100644
--- a/shared/src/i18n/ar/admin.ts
+++ b/shared/src/i18n/ar/admin.ts
@@ -116,6 +116,8 @@ const admin: TranslationStrings = {
'admin.recommended': 'مُوصى به',
'admin.weatherKey': 'مفتاح OpenWeatherMap API',
'admin.weatherKeyHint': 'لبيانات الطقس. مجاني من openweathermap.org',
+ 'admin.unsplashKey': 'مفتاح واجهة برمجة تطبيقات Unsplash',
+ 'admin.unsplashKeyHint': 'للبحث عن الصور. مجاني من unsplash.com/developers',
'admin.validateKey': 'اختبار',
'admin.keyValid': 'متصل',
'admin.keyInvalid': 'غير صالح',
@@ -180,6 +182,11 @@ const admin: TranslationStrings = {
'admin.tabs.plugins': 'الإضافات الخارجية',
'admin.plugins.rescan': 'إعادة الفحص',
'admin.plugins.rescanned': 'تمت إعادة فحص مجلد الإضافات',
+ 'admin.plugins.upload': 'رفع إضافة',
+ 'admin.plugins.dropToUpload': 'أفلت ملف .zip لتثبيت الإضافة',
+ 'admin.plugins.uploaded': 'تم رفع الإضافة “{name}” — فعّلها لتشغيلها',
+ 'admin.plugins.sideloaded': 'محمّلة يدويًا',
+ 'admin.plugins.sideloadedHint': 'تم رفعها يدويًا — ليست من السجل، غير موقّعة وغير مراجَعة',
'admin.plugins.browse': 'تصفح الإضافات',
'admin.plugins.installed': 'مثبّتة',
'admin.plugins.install': 'تثبيت',
@@ -194,11 +201,13 @@ const admin: TranslationStrings = {
'admin.plugins.noErrors': 'لا توجد أخطاء مسجّلة.',
'admin.plugins.uninstalled': 'تمت إزالة الإضافة',
'admin.plugins.uninstallTitle': 'إزالة الإضافة؟',
- 'admin.plugins.uninstallBody': 'سيؤدي هذا إلى إيقاف الإضافة وإزالة تعليماتها البرمجية وحذف جميع بياناتها. لا يمكن التراجع عن هذا الإجراء.',
+ 'admin.plugins.uninstallBody':
+ 'سيؤدي هذا إلى إيقاف الإضافة وإزالة تعليماتها البرمجية وحذف جميع بياناتها. لا يمكن التراجع عن هذا الإجراء.',
'admin.plugins.status.starting': 'جارٍ البدء…',
'admin.plugins.type.widget': 'Widget',
'admin.plugins.type.page': 'صفحة',
'admin.plugins.type.integration': 'تكامل',
+ 'admin.plugins.type.trip-page': 'صفحة الرحلة',
'admin.plugins.reviewed': 'تمت مراجعتها',
'admin.plugins.unreviewed': 'لم تتم مراجعتها',
'admin.plugins.updated': 'تم تحديث الإضافة',
@@ -208,10 +217,12 @@ const admin: TranslationStrings = {
'admin.plugins.title': 'الإضافات الخارجية',
'admin.plugins.subtitle': 'ثبّت وأدر إضافات الجهات الخارجية على خادمك.',
'admin.plugins.disabledTitle': 'الإضافات الخارجية معطّلة',
- 'admin.plugins.disabledBody': 'بيئة تشغيل الإضافات متوقفة (TREK_PLUGINS_ENABLED). لا يمكن تشغيل أي إضافة حتى يقوم مسؤول بتفعيلها في إعدادات الخادم.',
+ 'admin.plugins.disabledBody':
+ 'بيئة تشغيل الإضافات متوقفة (TREK_PLUGINS_ENABLED). لا يمكن تشغيل أي إضافة حتى يقوم مسؤول بتفعيلها في إعدادات الخادم.',
'admin.plugins.empty': 'لم يتم تثبيت أي إضافات بعد.',
'admin.plugins.loadError': 'تعذّر تحميل الإضافات.',
- 'admin.plugins.scaffoldNote': 'سيتوفر تثبيت الإضافات وتفعيلها في تحديث لاحق. تعرض هذه اللوحة حاليًا الإضافات المثبّتة فقط.',
+ 'admin.plugins.scaffoldNote':
+ 'سيتوفر تثبيت الإضافات وتفعيلها في تحديث لاحق. تعرض هذه اللوحة حاليًا الإضافات المثبّتة فقط.',
'admin.plugins.status.active': 'نشطة',
'admin.plugins.status.inactive': 'غير نشطة',
'admin.plugins.status.disabled': 'معطّلة',
@@ -233,33 +244,55 @@ const admin: TranslationStrings = {
'admin.plugins.reviewedOn': 'تمت المراجعة {date}',
'admin.plugins.perm.db:own': 'تخزين بياناتها الخاصة في قاعدة بيانات معزولة',
'admin.plugins.perm.db:read:trips': 'قراءة الرحلات التي يمكن للمستخدم الحالي الوصول إليها',
- 'admin.plugins.perm.db:read:users': 'قراءة معلومات الملف الشخصي الأساسية (الاسم والصورة الرمزية — وليس بيانات الاعتماد أبدًا)',
+ 'admin.plugins.perm.db:read:users':
+ 'قراءة معلومات الملف الشخصي الأساسية (الاسم والصورة الرمزية — وليس بيانات الاعتماد أبدًا)',
+ 'admin.plugins.perm.db:read:costs': 'قراءة المصروفات (بنود الميزانية) التي يمكن للمستخدم الحالي الوصول إليها',
+ 'admin.plugins.perm.db:read:packing': 'قراءة قوائم الأمتعة للرحلات التي يمكن للمستخدم الحالي الوصول إليها',
+ 'admin.plugins.perm.db:read:files': 'قراءة ملفات الرحلات التي يمكن للمستخدم الحالي الوصول إليها',
+ 'admin.plugins.perm.db:write:costs': 'إنشاء مصروفات (بنود الميزانية) على الرحلات التي يمكن للمستخدم الحالي تعديلها',
+ 'admin.plugins.perm.db:write:places': 'إضافة الأماكن وتعديلها وحذفها في الرحلات التي يمكن للمستخدم الحالي تعديلها',
+ 'admin.plugins.perm.db:write:days': 'إضافة الأيام وتعديلها وحذفها في الرحلات التي يمكن للمستخدم الحالي تعديلها',
+ 'admin.plugins.perm.db:write:itinerary': 'إسناد الأماكن وإزالتها من أيام الرحلات التي يمكن للمستخدم الحالي تعديلها',
+ 'admin.plugins.perm.db:write:trips':
+ 'تعديل تفاصيل الرحلة (العنوان، التواريخ، العملة…) في الرحلات التي يمكن للمستخدم الحالي تعديلها',
+ 'admin.plugins.perm.db:meta': 'إرفاق بياناته الخاصة بالرحلات والأماكن والأيام التي يمكن للمستخدم الحالي الوصول إليها',
'admin.plugins.perm.ws:broadcast:trip': 'إرسال تحديثات فورية إلى أعضاء الرحلة',
'admin.plugins.perm.ws:broadcast:user': 'إرسال تحديثات فورية إلى مستخدمين بعينهم',
'admin.plugins.perm.hook:photo-provider': 'توفير الصور لميزة الذكريات',
'admin.plugins.perm.hook:calendar-source': 'توفير الأحداث للتقويم',
+ 'admin.plugins.perm.hook:place-detail-provider': 'المساهمة بتفاصيل إضافية (مراجعات، تقييمات، روابط) لمكان ما',
+ 'admin.plugins.perm.hook:trip-warning-provider': 'إظهار تحذيرات التحقق على الرحلة (تظهر في المخطط)',
+ 'admin.plugins.perm.events:subscribe': 'التفاعل مع أحداث النشاط الأساسية (اسم الحدث والرحلة فقط، دون المحتوى مطلقًا)',
'admin.plugins.perm.http:outbound': 'إجراء طلبات صادرة إلى المضيفات المُعلنة الخاصة بها',
'admin.plugins.updateConsentTitle': 'يتطلب هذا التحديث أذونات جديدة',
- 'admin.plugins.updateConsentBody': '{name} v{version} يطلب أذونات لم تمنحها بعد. تم تثبيت الإصدار الجديد لكنه يبقى متوقفًا حتى توافق عليه.',
+ 'admin.plugins.updateConsentBody':
+ '{name} v{version} يطلب أذونات لم تمنحها بعد. تم تثبيت الإصدار الجديد لكنه يبقى متوقفًا حتى توافق عليه.',
'admin.plugins.updateNewPermissions': 'الأذونات المطلوبة حديثًا',
'admin.plugins.updateNewEgress': 'اتصالات صادرة جديدة',
'admin.plugins.updateApprove': 'الموافقة والتفعيل',
'admin.plugins.updateLater': 'إبقاؤه متوقفًا الآن',
'admin.plugins.updateKeptOff': 'تم تثبيت التحديث — يبقى متوقفًا حتى توافق على الأذونات الجديدة',
- 'admin.plugins.reviewedMeaning': '"تمت مراجعتها" تعني أن أحد القائمين على TREK فحص هذه الإضافة بحثًا عن البرمجيات الخبيثة في كل إصدار — وليس من حيث الجودة أو ما إذا كانت تعمل. وهي ليست ضمانًا بأن الإضافة غير ضارة.',
+ 'admin.plugins.reviewedMeaning':
+ '"تمت مراجعتها" تعني أن أحد القائمين على TREK فحص هذه الإضافة بحثًا عن البرمجيات الخبيثة في كل إصدار — وليس من حيث الجودة أو ما إذا كانت تعمل. وهي ليست ضمانًا بأن الإضافة غير ضارة.',
'admin.plugins.security.title': 'كيف يتم احتواء الإضافات — وحدود ذلك',
'admin.plugins.security.isolationTitle': 'كل إضافة تعمل في بيئة معزولة',
- 'admin.plugins.security.isolationBody': 'تعمل الإضافة كعملية معزولة خاصة بها لا يمكنها قراءة سوى ملفاتها الخاصة. لا يمكنها قراءة قاعدة بياناتك أو سر تسجيل دخولك أو مفتاح التشفير الخاص بك، ولا يمكنها تشغيل برامج أخرى، ولا يمكنها كتابة ملفات في أي مكان. تعمل واجهتها داخل إطار متصفح محكم لا يمكنه قراءة ملف تعريف ارتباط جلستك أو المساس بصفحة TREK المحيطة به.',
+ 'admin.plugins.security.isolationBody':
+ 'تعمل الإضافة كعملية معزولة خاصة بها لا يمكنها قراءة سوى ملفاتها الخاصة. لا يمكنها قراءة قاعدة بياناتك أو سر تسجيل دخولك أو مفتاح التشفير الخاص بك، ولا يمكنها تشغيل برامج أخرى، ولا يمكنها كتابة ملفات في أي مكان. تعمل واجهتها داخل إطار متصفح محكم لا يمكنه قراءة ملف تعريف ارتباط جلستك أو المساس بصفحة TREK المحيطة به.',
'admin.plugins.security.permsTitle': 'ماذا تعني الأذونات',
- 'admin.plugins.security.permsBody': 'الأذونات المعروضة قبل التثبيت هي حد صارم يفرضه TREK أثناء تشغيل الإضافة — فهي لا تستطيع فعليًا القيام بأي شيء ليس على القائمة. لكنها تخبرك بما يمكن للإضافة فعله، لا بما تفعله بالفعل. الإضافة المسموح لها بقراءة رحلاتك والوصول إلى خادم يمكنها إرسال رحلاتك إلى ذلك الخادم، لذا اقرأ الأذونات والمضيفات الصادرة، وليس الوصف فقط.',
+ 'admin.plugins.security.permsBody':
+ 'الأذونات المعروضة قبل التثبيت هي حد صارم يفرضه TREK أثناء تشغيل الإضافة — فهي لا تستطيع فعليًا القيام بأي شيء ليس على القائمة. لكنها تخبرك بما يمكن للإضافة فعله، لا بما تفعله بالفعل. الإضافة المسموح لها بقراءة رحلاتك والوصول إلى خادم يمكنها إرسال رحلاتك إلى ذلك الخادم، لذا اقرأ الأذونات والمضيفات الصادرة، وليس الوصف فقط.',
'admin.plugins.security.limitsTitle': 'ما لا يمكننا ضمانه',
- 'admin.plugins.security.limitsBody': 'العزل هو حدّ برمجي قوي، لكنه ليس مطلقًا. تعمل الإضافة بالأذونات التي توافق عليها تمامًا، لذا يمكنها ضمن تلك الأذونات أن تتصرف بشكل مختلف عمّا يوحي به وصفها، ويمكنها إرسال البيانات التي تملكها بشكل مشروع إلى المضيفات التي أعلنتها. لا يقرأ TREK ولا يحكم على ما تفعله شيفرة الإضافة فعليًا.',
+ 'admin.plugins.security.limitsBody':
+ 'العزل هو حدّ برمجي قوي، لكنه ليس مطلقًا. تعمل الإضافة بالأذونات التي توافق عليها تمامًا، لذا يمكنها ضمن تلك الأذونات أن تتصرف بشكل مختلف عمّا يوحي به وصفها، ويمكنها إرسال البيانات التي تملكها بشكل مشروع إلى المضيفات التي أعلنتها. لا يقرأ TREK ولا يحكم على ما تفعله شيفرة الإضافة فعليًا.',
'admin.plugins.security.worstTitle': 'أسوأ الحالات',
- 'admin.plugins.security.worstBody': 'الإضافة الضارة التي تُفعّلها يمكنها إساءة استخدام البيانات والاتصالات التي منحتها إياها — على سبيل المثال، تسريب الرحلات المسموح لها بقراءتها. لا يمكنها سرقة كلمات المرور، أو تزوير تسجيل دخول مسؤول، أو تنفيذ أوامر على خادمك، أو الوصول إلى بيانات لم تمنحها. يبقى الضرر ضمن ما وافقت عليه، وإيقاف الإضافة يوقفه.',
+ 'admin.plugins.security.worstBody':
+ 'الإضافة الضارة التي تُفعّلها يمكنها إساءة استخدام البيانات والاتصالات التي منحتها إياها — على سبيل المثال، تسريب الرحلات المسموح لها بقراءتها. لا يمكنها سرقة كلمات المرور، أو تزوير تسجيل دخول مسؤول، أو تنفيذ أوامر على خادمك، أو الوصول إلى بيانات لم تمنحها. يبقى الضرر ضمن ما وافقت عليه، وإيقاف الإضافة يوقفه.',
'admin.plugins.security.reviewedTitle': 'ماذا تعني "تمت مراجعتها"',
- 'admin.plugins.security.reviewedBody': 'الإضافة التي تمت مراجعتها فُحصت يدويًا بحثًا عن البرمجيات الخبيثة بواسطة أحد القائمين على TREK في كل إصدار — جرى فحصها بحثًا عن شيفرة ضارة، لا لمعرفة ما إذا كانت تعمل جيدًا. وهي ليست وعدًا بأن الإضافة غير ضارة.',
+ 'admin.plugins.security.reviewedBody':
+ 'الإضافة التي تمت مراجعتها فُحصت يدويًا بحثًا عن البرمجيات الخبيثة بواسطة أحد القائمين على TREK في كل إصدار — جرى فحصها بحثًا عن شيفرة ضارة، لا لمعرفة ما إذا كانت تعمل جيدًا. وهي ليست وعدًا بأن الإضافة غير ضارة.',
'admin.plugins.security.trustTitle': 'الخلاصة',
- 'admin.plugins.security.trustBody': 'تثبيت إضافة يشبه تثبيت أي تطبيق من جهة خارجية: لا تُضِف سوى شيفرة من مطورين تثق بهم، وعند الشك، افحصها بنفسك أولًا. لا يتحمل TREK أي مسؤولية عن إضافات الجهات الخارجية.',
+ 'admin.plugins.security.trustBody':
+ 'تثبيت إضافة يشبه تثبيت أي تطبيق من جهة خارجية: لا تُضِف سوى شيفرة من مطورين تثق بهم، وعند الشك، افحصها بنفسك أولًا. لا يتحمل TREK أي مسؤولية عن إضافات الجهات الخارجية.',
'admin.plugins.runtimeOn': 'بيئة التشغيل مفعّلة',
'admin.plugins.tabDiscover': 'اكتشاف',
'admin.plugins.searchPlaceholder': 'ابحث عن الإضافات…',
@@ -281,11 +314,36 @@ const admin: TranslationStrings = {
'admin.plugins.restarted': 'تمت إعادة تشغيل الإضافة',
'admin.plugins.cap.readsTrips': 'يقرأ رحلاتك',
'admin.plugins.cap.readsUsers': 'يقرأ الملفات الشخصية الأساسية',
+ 'admin.plugins.cap.readsCosts': 'يقرأ مصروفاتك',
+ 'admin.plugins.cap.readsPacking': 'يقرأ قوائم الأمتعة',
+ 'admin.plugins.cap.readsFiles': 'يقرأ ملفات الرحلة',
+ 'admin.plugins.cap.writesCosts': 'يضيف مصروفات',
+ 'admin.plugins.cap.writesPlaces': 'يعدّل الأماكن',
+ 'admin.plugins.cap.writesDays': 'يعدّل الأيام',
+ 'admin.plugins.cap.writesItinerary': 'يعدّل خط السير',
+ 'admin.plugins.cap.writesTrips': 'يعدّل الرحلات',
+ 'admin.plugins.cap.metadata': 'يضيف بيانات وصفية',
'admin.plugins.cap.widget': 'أداة لوحة التحكم',
'admin.plugins.cap.heroWidget': 'أداة بطاقة الصعود',
+ 'admin.plugins.cap.placeSlot': 'تفاصيل المكان',
'admin.plugins.cap.realtime': 'تحديثات فورية',
'admin.plugins.cap.photos': 'يوفّر الصور',
'admin.plugins.cap.calendar': 'يوفّر أحداث التقويم',
+ 'admin.plugins.cap.placeDetails': 'يُثري الأماكن',
+ 'admin.plugins.cap.warnings': 'يرصد المشكلات',
+ 'admin.plugins.cap.events': 'يتفاعل مع النشاط',
+ 'admin.plugins.cap.requiresAddon': 'يتطلب {addon}',
+ 'admin.plugins.cap.dependsOn': 'يحتاج إلى {id} {version}',
+ 'admin.plugins.dep.addonDisabledToast': 'فعّل الإضافات المطلوبة أولاً: {addons}',
+ 'admin.plugins.dep.autoEnabled': 'تم تفعيل الإضافات المطلوبة أولاً: {plugins}',
+ 'admin.plugins.dep.downloaded': 'تم تنزيل {id}',
+ 'admin.plugins.dep.resolveTitle': 'تبعيات مفقودة',
+ 'admin.plugins.dep.resolveBody': 'يحتاج “{name}” إلى تثبيت هذه الإضافات قبل تفعيله.',
+ 'admin.plugins.dep.requires': 'يتطلب {version}',
+ 'admin.plugins.dep.mismatch': 'يحتاج إلى {wanted} — المثبَّت هو {installed}',
+ 'admin.plugins.dep.download': 'تنزيل',
+ 'admin.plugins.dep.update': 'تحديث',
+ 'admin.plugins.dep.resolveHint': 'ينزّل أحدث إصدار متوافق، بما في ذلك تبعياته الخاصة.',
'admin.plugins.accessTitle': 'ما الذي يمكنها الوصول إليه',
'admin.plugins.connectsTitle': 'يتصل بـ',
'admin.plugins.detailsTitle': 'التفاصيل',
diff --git a/shared/src/i18n/ar/budget.ts b/shared/src/i18n/ar/budget.ts
index 5820661bd..be9e961c4 100644
--- a/shared/src/i18n/ar/budget.ts
+++ b/shared/src/i18n/ar/budget.ts
@@ -52,6 +52,9 @@ const budget: TranslationStrings = {
'costs.nothingOwed': 'لا شيء مستحق لك',
'costs.yourShare': 'حصتك',
'costs.youPaid': 'أنت دفعت',
+ 'costs.outstanding': 'مبلغ غير مسدَّد',
+ 'costs.outstandingSub': 'مصاريف بلا دافع بعد',
+ 'costs.outstandingItems': 'مصاريف بحاجة إلى دافع',
'costs.expenses': 'المصروفات',
'costs.entries': '{count} إدخالات',
'costs.searchPlaceholder': 'ابحث في المصروفات…',
@@ -116,10 +119,10 @@ const budget: TranslationStrings = {
'costs.unfinishedHint': 'في الإجمالي فقط — لم تتم التسوية بعد',
'costs.tapToInclude': 'اضغط للتضمين',
'costs.amount': 'المبلغ',
- 'costs.split': "Split",
- 'costs.splitEqually': "Equally",
- 'costs.splitCustom': "Custom",
- 'costs.splitTicket': "Ticket",
+ 'costs.split': 'Split',
+ 'costs.splitEqually': 'Equally',
+ 'costs.splitCustom': 'Custom',
+ 'costs.splitTicket': 'Ticket',
'costs.filter.allCategories': 'كل الفئات',
'costs.filter.allDays': 'كل الأيام',
'costs.expensesCount': '{count} مصروف',
diff --git a/shared/src/i18n/ar/collection.ts b/shared/src/i18n/ar/collection.ts
index 938124f7e..4ffc921f0 100644
--- a/shared/src/i18n/ar/collection.ts
+++ b/shared/src/i18n/ar/collection.ts
@@ -49,7 +49,8 @@ const collection: TranslationStrings = {
'collections.editList': 'إعادة تسمية',
'collections.listMenu': 'خيارات القائمة',
'collections.deleteList': 'حذف القائمة',
- 'collections.deleteListConfirm': 'سيؤدي هذا إلى حذف القائمة وجميع الأماكن المحفوظة فيها نهائيًا. لا يمكن التراجع عن ذلك.',
+ 'collections.deleteListConfirm':
+ 'سيؤدي هذا إلى حذف القائمة وجميع الأماكن المحفوظة فيها نهائيًا. لا يمكن التراجع عن ذلك.',
'collections.listName': 'اسم القائمة',
'collections.listNamePlaceholder': 'مثال: طوكيو 2025',
'collections.listColor': 'اللون',
@@ -127,7 +128,8 @@ const collection: TranslationStrings = {
'collections.share.memberHint': 'يمكن لمالك القائمة فقط دعوة الأشخاص أو إزالتهم.',
'collections.share.cancel': 'إلغاء',
'collections.share.leave': 'مغادرة القائمة',
- 'collections.share.leaveConfirm': 'هل تريد مغادرة هذه القائمة المشتركة؟ ستفقد إمكانية الوصول إليها حتى تتم دعوتك مرة أخرى.',
+ 'collections.share.leaveConfirm':
+ 'هل تريد مغادرة هذه القائمة المشتركة؟ ستفقد إمكانية الوصول إليها حتى تتم دعوتك مرة أخرى.',
'collections.share.left': 'لقد غادرت القائمة',
'collections.share.remove': 'إزالة',
diff --git a/shared/src/i18n/ar/help.ts b/shared/src/i18n/ar/help.ts
index d3d420d0f..5c27093ed 100644
--- a/shared/src/i18n/ar/help.ts
+++ b/shared/src/i18n/ar/help.ts
@@ -2,12 +2,12 @@ import type { TranslationStrings } from '../types';
// English fallback until 'ar' is translated.
const help: TranslationStrings = {
- 'help.title': "Help & Docs",
- 'help.search': "Search docs…",
- 'help.contents': "Contents",
- 'help.noResults': "No matching pages.",
+ 'help.title': 'Help & Docs',
+ 'help.search': 'Search docs…',
+ 'help.contents': 'Contents',
+ 'help.noResults': 'No matching pages.',
'help.errorTitle': "Couldn't load this page",
- 'help.errorBody': "The help content is fetched from the TREK wiki. Check your connection and try again.",
+ 'help.errorBody': 'The help content is fetched from the TREK wiki. Check your connection and try again.',
};
export default help;
diff --git a/shared/src/i18n/ar/index.ts b/shared/src/i18n/ar/index.ts
index b9af5461f..eef4c74aa 100644
--- a/shared/src/i18n/ar/index.ts
+++ b/shared/src/i18n/ar/index.ts
@@ -5,11 +5,13 @@ import backup from './backup';
import budget from './budget';
import categories from './categories';
import collab from './collab';
+import collection from './collection';
import common from './common';
import dashboard from './dashboard';
import day from './day';
import dayplan from './dayplan';
import files from './files';
+import help from './help';
import inspector from './inspector';
import journey from './journey';
import login from './login';
@@ -39,8 +41,6 @@ import trip from './trip';
import trips from './trips';
import undo from './undo';
import vacay from './vacay';
-import collection from './collection';
-import help from './help';
const locale = {
...common,
diff --git a/shared/src/i18n/ar/login.ts b/shared/src/i18n/ar/login.ts
index d3e3ff124..18c8c305a 100644
--- a/shared/src/i18n/ar/login.ts
+++ b/shared/src/i18n/ar/login.ts
@@ -86,7 +86,8 @@ const login: TranslationStrings = {
'login.passkey.signIn': 'تسجيل الدخول باستخدام مفتاح المرور',
'login.passkey.failed': 'فشل تسجيل الدخول بمفتاح المرور. يرجى المحاولة مرة أخرى.',
'login.insecureCookie.title': "Login won't stick over HTTP",
- 'login.insecureCookie.body': "You’re connecting over plain HTTP, so your browser drops TREK’s secure session cookie — the next request fails with \"Access token required\". Fix: use HTTPS, or for a home-lab set COOKIE_SECURE=false.",
- 'login.insecureCookie.link': "Open the Troubleshooting guide",
+ 'login.insecureCookie.body':
+ 'You’re connecting over plain HTTP, so your browser drops TREK’s secure session cookie — the next request fails with "Access token required". Fix: use HTTPS, or for a home-lab set COOKIE_SECURE=false.',
+ 'login.insecureCookie.link': 'Open the Troubleshooting guide',
};
export default login;
diff --git a/shared/src/i18n/ar/places.ts b/shared/src/i18n/ar/places.ts
index 1c1da8aa1..8547ca902 100644
--- a/shared/src/i18n/ar/places.ts
+++ b/shared/src/i18n/ar/places.ts
@@ -24,8 +24,8 @@ const places: TranslationStrings = {
'places.kmlImportNoneSelected': 'اختر نوعًا واحدًا على الأقل.',
'places.selectionCount': '{count} محدد',
'places.deleteSelected': 'حذف المحدد',
- 'places.changeCategory': "Change category",
- 'places.categoryChanged': "{count} places updated",
+ 'places.changeCategory': 'Change category',
+ 'places.categoryChanged': '{count} places updated',
'places.kmlKmzImported': 'تم استيراد {count} مكان من KMZ/KML',
'places.urlResolved': 'تم استيراد المكان من الرابط',
'places.importList': 'استيراد قائمة',
diff --git a/shared/src/i18n/ar/settings.ts b/shared/src/i18n/ar/settings.ts
index 7083442d2..9f86e7877 100644
--- a/shared/src/i18n/ar/settings.ts
+++ b/shared/src/i18n/ar/settings.ts
@@ -318,7 +318,8 @@ const settings: TranslationStrings = {
'settings.airtrail.test.success': 'متصل — تم العثور على {count} رحلة/رحلات',
'settings.airtrail.test.failed': 'فشل الاتصال',
'settings.aiParsing.title': 'التحليل بالذكاء الاصطناعي',
- 'settings.aiParsing.hint': 'استخدم نموذج الذكاء الاصطناعي الخاص بك لاستخراج الحجوزات من الملفات المرفوعة. لا يسري هذا إلا عندما لا يكون المسؤول قد أعدّ نموذجًا للنظام بأكمله.',
+ 'settings.aiParsing.hint':
+ 'استخدم نموذج الذكاء الاصطناعي الخاص بك لاستخراج الحجوزات من الملفات المرفوعة. لا يسري هذا إلا عندما لا يكون المسؤول قد أعدّ نموذجًا للنظام بأكمله.',
'settings.aiParsing.provider': 'المزوّد',
'settings.aiParsing.providerLocal': 'محلي (Ollama)',
'settings.aiParsing.providerOpenai': 'OpenAI',
@@ -348,7 +349,8 @@ const settings: TranslationStrings = {
'settings.appearance.contrastLow': 'Low contrast',
'settings.appearance.readability': 'Readability',
'settings.appearance.transparency': 'Transparency',
- 'settings.appearance.transparencyHint': 'Glassy translucent surfaces. Turn off for solid, higher-contrast backgrounds.',
+ 'settings.appearance.transparencyHint':
+ 'Glassy translucent surfaces. Turn off for solid, higher-contrast backgrounds.',
'settings.appearance.reduceMotion': 'Reduce motion',
'settings.appearance.reduceMotionHint': 'Minimize animations and transitions.',
'settings.appearance.density': 'Density',
@@ -378,7 +380,8 @@ const settings: TranslationStrings = {
'settings.appearance.group.belowHero': 'Below the hero',
'settings.appearance.group.bottomOfPage': 'Bottom of page',
'settings.appearance.sidebarHint': 'The whole right column. Turn off and the dashboard centers.',
- 'settings.appearance.densityHint': 'Compact tightens spacing and padding for a denser layout that fits more on screen.',
+ 'settings.appearance.densityHint':
+ 'Compact tightens spacing and padding for a denser layout that fits more on screen.',
'settings.appearance.textSizeAll': 'Everything',
'settings.appearance.perSize': 'Adjust each size separately',
'settings.appearance.size.large': 'Large',
@@ -401,10 +404,12 @@ const settings: TranslationStrings = {
'settings.offline.cache.title': 'ذاكرة التخزين المؤقت دون اتصال',
'settings.offline.mode.title': 'وضع عدم الاتصال',
'settings.offline.mode.force': 'فرض وضع عدم الاتصال',
- 'settings.offline.mode.forceHint': 'اعمل من البيانات المخزّنة مؤقتًا فقط وضع تغييراتك في قائمة الانتظار. أوقفه لإعادة الاتصال والمزامنة.',
+ 'settings.offline.mode.forceHint':
+ 'اعمل من البيانات المخزّنة مؤقتًا فقط وضع تغييراتك في قائمة الانتظار. أوقفه لإعادة الاتصال والمزامنة.',
'settings.offline.mode.active': 'وضع عدم الاتصال مفعّل — تغييراتك في قائمة الانتظار وستتم مزامنتها عند إيقافه.',
'settings.offline.prepare.title': 'التحضير للعمل دون اتصال',
- 'settings.offline.prepare.hint': 'نزّل كل ما تحتاجه — بيانات الرحلة والمستندات وبلاطات الخريطة — قبل أن تفقد الاتصال.',
+ 'settings.offline.prepare.hint':
+ 'نزّل كل ما تحتاجه — بيانات الرحلة والمستندات وبلاطات الخريطة — قبل أن تفقد الاتصال.',
'settings.offline.prepare.button': 'تنزيل للاستخدام دون اتصال',
'settings.offline.prepare.running': 'جارٍ التنزيل…',
'settings.offline.prepare.done': 'جاهز للاستخدام دون اتصال',
@@ -415,12 +420,14 @@ const settings: TranslationStrings = {
'settings.offline.resyncing': 'جارٍ المزامنة…',
'settings.offline.storage.title': 'ما يتم تخزينه دون اتصال',
'settings.offline.storage.tiles': 'تخزين بلاطات الخريطة دون اتصال',
- 'settings.offline.storage.tilesHint': 'تستهلك بلاطات الخريطة أكبر مساحة تخزين. أوقف هذا للاحتفاظ ببيانات الرحلة والمستندات فقط دون اتصال.',
+ 'settings.offline.storage.tilesHint':
+ 'تستهلك بلاطات الخريطة أكبر مساحة تخزين. أوقف هذا للاحتفاظ ببيانات الرحلة والمستندات فقط دون اتصال.',
'settings.offline.storage.tripsTitle': 'الرحلات',
'settings.offline.storage.tripOn': 'مخزّن دون اتصال',
'settings.offline.storage.tripOff': 'غير مخزّن',
'settings.offline.clear': 'مسح ذاكرة التخزين المؤقت',
- 'settings.offline.clearConfirm': 'هل تريد مسح جميع بيانات الرحلة المخزّنة دون اتصال؟ يمكنك إعادة المزامنة في أي وقت أثناء الاتصال.',
+ 'settings.offline.clearConfirm':
+ 'هل تريد مسح جميع بيانات الرحلة المخزّنة دون اتصال؟ يمكنك إعادة المزامنة في أي وقت أثناء الاتصال.',
'settings.offline.stats.trips': 'الرحلات المخزّنة مؤقتًا',
'settings.offline.stats.pending': 'تغييرات معلّقة',
'settings.offline.stats.failed': 'تغييرات فاشلة',
@@ -428,7 +435,8 @@ const settings: TranslationStrings = {
'settings.offline.empty': 'لا توجد رحلات مخزّنة بعد. اتصل بالإنترنت للمزامنة.',
'settings.offline.loading': 'جارٍ التحميل…',
'settings.offline.conflicts.title': 'تعارضات المزامنة',
- 'settings.offline.conflicts.hint': 'تتعارض التغييرات التي أجريتها دون اتصال مع تغييرات أحدث على الخادم. اختر الإصدار الذي تريد الاحتفاظ به.',
+ 'settings.offline.conflicts.hint':
+ 'تتعارض التغييرات التي أجريتها دون اتصال مع تغييرات أحدث على الخادم. اختر الإصدار الذي تريد الاحتفاظ به.',
'settings.offline.conflicts.keepMine': 'الاحتفاظ بنسختي',
'settings.offline.conflicts.keepServer': 'الاحتفاظ بنسخة الخادم',
'settings.offline.conflicts.mine': 'نسختك',
diff --git a/shared/src/i18n/ar/trip.ts b/shared/src/i18n/ar/trip.ts
index 2c7529c1c..2a87ef2eb 100644
--- a/shared/src/i18n/ar/trip.ts
+++ b/shared/src/i18n/ar/trip.ts
@@ -28,7 +28,8 @@ const trip: TranslationStrings = {
'trip.confirm.deletePlaces': 'حذف {count} أماكن؟',
'trip.toast.placesDeleted': 'تم حذف {count} أماكن',
'trip.invite.linkTitle': 'رابط دعوة الرحلة',
- 'trip.invite.linkHint': 'أي شخص لديه حساب TREK ويفتح هذا الرابط ينضم إلى الرحلة كعضو. أعد الإنشاء لإبطال الرابط القديم.',
+ 'trip.invite.linkHint':
+ 'أي شخص لديه حساب TREK ويفتح هذا الرابط ينضم إلى الرحلة كعضو. أعد الإنشاء لإبطال الرابط القديم.',
'trip.invite.create': 'إنشاء رابط دعوة',
'trip.invite.regenerate': 'إعادة الإنشاء',
'trip.invite.disable': 'تعطيل',
diff --git a/shared/src/i18n/ar/undo.ts b/shared/src/i18n/ar/undo.ts
index 52a665c32..f3cefcac2 100644
--- a/shared/src/i18n/ar/undo.ts
+++ b/shared/src/i18n/ar/undo.ts
@@ -9,7 +9,7 @@ const undo: TranslationStrings = {
'undo.optimize': 'تم تحسين المسار',
'undo.deletePlace': 'تم حذف المكان',
'undo.deletePlaces': 'تم حذف الأماكن',
- 'undo.changeCategory': "Category changed",
+ 'undo.changeCategory': 'Category changed',
'undo.moveDay': 'تم نقل المكان إلى يوم آخر',
'undo.lock': 'تم تبديل قفل المكان',
'undo.importGpx': 'استيراد GPX',
diff --git a/shared/src/i18n/br/admin.ts b/shared/src/i18n/br/admin.ts
index 5bd0b41e6..42b5bcf58 100644
--- a/shared/src/i18n/br/admin.ts
+++ b/shared/src/i18n/br/admin.ts
@@ -94,6 +94,8 @@ const admin: TranslationStrings = {
'admin.recommended': 'Recomendado',
'admin.weatherKey': 'Chave OpenWeatherMap',
'admin.weatherKeyHint': 'Para dados meteorológicos. Grátis em openweathermap.org',
+ 'admin.unsplashKey': 'Chave de API do Unsplash',
+ 'admin.unsplashKeyHint': 'Para busca de imagens. Grátis em unsplash.com/developers',
'admin.validateKey': 'Testar',
'admin.keyValid': 'Conectado',
'admin.keyInvalid': 'Inválida',
@@ -159,6 +161,11 @@ const admin: TranslationStrings = {
'admin.tabs.plugins': 'Plugins',
'admin.plugins.rescan': 'Reescanear',
'admin.plugins.rescanned': 'Pasta de plugins reescaneada',
+ 'admin.plugins.upload': 'Enviar plugin',
+ 'admin.plugins.dropToUpload': 'Solte um .zip de plugin para instalar',
+ 'admin.plugins.uploaded': 'Plugin “{name}” enviado — ative para executar',
+ 'admin.plugins.sideloaded': 'Carregado manualmente',
+ 'admin.plugins.sideloadedHint': 'Enviado manualmente — não é do registro, sem assinatura e sem revisão',
'admin.plugins.browse': 'Explorar plugins',
'admin.plugins.installed': 'Instalado',
'admin.plugins.install': 'Instalar',
@@ -173,11 +180,13 @@ const admin: TranslationStrings = {
'admin.plugins.noErrors': 'Nenhum erro registrado.',
'admin.plugins.uninstalled': 'Plugin desinstalado',
'admin.plugins.uninstallTitle': 'Desinstalar plugin?',
- 'admin.plugins.uninstallBody': 'Isso interrompe o plugin, remove seu código e exclui todos os dados dele. Esta ação não pode ser desfeita.',
+ 'admin.plugins.uninstallBody':
+ 'Isso interrompe o plugin, remove seu código e exclui todos os dados dele. Esta ação não pode ser desfeita.',
'admin.plugins.status.starting': 'Iniciando…',
'admin.plugins.type.widget': 'Widget',
'admin.plugins.type.page': 'Página',
'admin.plugins.type.integration': 'Integração',
+ 'admin.plugins.type.trip-page': 'Página da viagem',
'admin.plugins.reviewed': 'Revisado',
'admin.plugins.unreviewed': 'Não revisado',
'admin.plugins.updated': 'Plugin atualizado',
@@ -187,10 +196,12 @@ const admin: TranslationStrings = {
'admin.plugins.title': 'Plugins',
'admin.plugins.subtitle': 'Instale e gerencie plugins de terceiros na sua instância.',
'admin.plugins.disabledTitle': 'Os plugins estão desativados',
- 'admin.plugins.disabledBody': 'O runtime de plugins está desligado (TREK_PLUGINS_ENABLED). Nenhum plugin pode ser executado até que um admin o ative na configuração do servidor.',
+ 'admin.plugins.disabledBody':
+ 'O runtime de plugins está desligado (TREK_PLUGINS_ENABLED). Nenhum plugin pode ser executado até que um admin o ative na configuração do servidor.',
'admin.plugins.empty': 'Nenhum plugin instalado ainda.',
'admin.plugins.loadError': 'Não foi possível carregar os plugins.',
- 'admin.plugins.scaffoldNote': 'A instalação e ativação de plugins chegarão em uma atualização futura. Este painel atualmente lista apenas os plugins instalados.',
+ 'admin.plugins.scaffoldNote':
+ 'A instalação e ativação de plugins chegarão em uma atualização futura. Este painel atualmente lista apenas os plugins instalados.',
'admin.plugins.status.active': 'Ativo',
'admin.plugins.status.inactive': 'Inativo',
'admin.plugins.status.disabled': 'Desativado',
@@ -213,10 +224,27 @@ const admin: TranslationStrings = {
'admin.plugins.perm.db:own': 'Armazenar seus próprios dados em um banco de dados isolado',
'admin.plugins.perm.db:read:trips': 'Ler viagens às quais o usuário atual tem acesso',
'admin.plugins.perm.db:read:users': 'Ler informações básicas de perfil (nome, avatar — nunca credenciais)',
+ 'admin.plugins.perm.db:read:costs': 'Ler despesas (itens de orçamento) às quais o usuário atual tem acesso',
+ 'admin.plugins.perm.db:read:packing': 'Ler listas de bagagem de viagens às quais o usuário atual tem acesso',
+ 'admin.plugins.perm.db:read:files': 'Ler arquivos de viagens às quais o usuário atual tem acesso',
+ 'admin.plugins.perm.db:write:costs': 'Criar despesas (itens de orçamento) em viagens que o usuário atual pode editar',
+ 'admin.plugins.perm.db:write:places': 'Adicionar, editar e remover locais em viagens que o usuário atual pode editar',
+ 'admin.plugins.perm.db:write:days': 'Adicionar, editar e remover dias em viagens que o usuário atual pode editar',
+ 'admin.plugins.perm.db:write:itinerary':
+ 'Atribuir e remover locais em dias de viagens que o usuário atual pode editar',
+ 'admin.plugins.perm.db:write:trips':
+ 'Editar detalhes da viagem (título, datas, moeda…) em viagens que o usuário atual pode editar',
+ 'admin.plugins.perm.db:meta':
+ 'Anexar seus próprios dados privados a viagens, locais e dias que o usuário atual pode acessar',
'admin.plugins.perm.ws:broadcast:trip': 'Enviar atualizações em tempo real aos membros da viagem',
'admin.plugins.perm.ws:broadcast:user': 'Enviar atualizações em tempo real a usuários individuais',
'admin.plugins.perm.hook:photo-provider': 'Fornecer fotos para as Memórias',
'admin.plugins.perm.hook:calendar-source': 'Fornecer eventos para o calendário',
+ 'admin.plugins.perm.hook:place-detail-provider':
+ 'Contribuir com detalhes extras (avaliações, notas, links) para um local',
+ 'admin.plugins.perm.hook:trip-warning-provider': 'Emitir avisos de validação em uma viagem (exibidos no planejador)',
+ 'admin.plugins.perm.events:subscribe':
+ 'Reagir a eventos de atividade do núcleo (apenas nome do evento + viagem, nunca o conteúdo)',
'admin.plugins.perm.http:outbound': 'Fazer requisições de saída para os hosts declarados',
'admin.plugins.updateConsentTitle': 'Esta atualização precisa de novas permissões',
'admin.plugins.updateConsentBody':
@@ -268,11 +296,36 @@ const admin: TranslationStrings = {
'admin.plugins.restarted': 'Plugin reiniciado',
'admin.plugins.cap.readsTrips': 'Lê suas viagens',
'admin.plugins.cap.readsUsers': 'Lê perfis básicos',
+ 'admin.plugins.cap.readsCosts': 'Lê suas despesas',
+ 'admin.plugins.cap.readsPacking': 'Lê listas de bagagem',
+ 'admin.plugins.cap.readsFiles': 'Lê arquivos de viagem',
+ 'admin.plugins.cap.writesCosts': 'Adiciona despesas',
+ 'admin.plugins.cap.writesPlaces': 'Edita locais',
+ 'admin.plugins.cap.writesDays': 'Edita dias',
+ 'admin.plugins.cap.writesItinerary': 'Edita o itinerário',
+ 'admin.plugins.cap.writesTrips': 'Edita viagens',
+ 'admin.plugins.cap.metadata': 'Adiciona metadados',
'admin.plugins.cap.widget': 'Widget do painel',
'admin.plugins.cap.heroWidget': 'Widget de cartão de embarque',
+ 'admin.plugins.cap.placeSlot': 'Detalhe do local',
'admin.plugins.cap.realtime': 'Atualizações em tempo real',
'admin.plugins.cap.photos': 'Fornece fotos',
'admin.plugins.cap.calendar': 'Fornece eventos de calendário',
+ 'admin.plugins.cap.placeDetails': 'Enriquece locais',
+ 'admin.plugins.cap.warnings': 'Sinaliza problemas',
+ 'admin.plugins.cap.events': 'Reage a atividades',
+ 'admin.plugins.cap.requiresAddon': 'Requer {addon}',
+ 'admin.plugins.cap.dependsOn': 'Requer {id} {version}',
+ 'admin.plugins.dep.addonDisabledToast': 'Ative primeiro os complementos necessários: {addons}',
+ 'admin.plugins.dep.autoEnabled': 'Plugins necessários ativados primeiro: {plugins}',
+ 'admin.plugins.dep.downloaded': '{id} baixado',
+ 'admin.plugins.dep.resolveTitle': 'Dependências ausentes',
+ 'admin.plugins.dep.resolveBody': '“{name}” precisa que estes plugins estejam instalados antes de ser ativado.',
+ 'admin.plugins.dep.requires': 'Requer {version}',
+ 'admin.plugins.dep.mismatch': 'Requer {wanted} — {installed} está instalado',
+ 'admin.plugins.dep.download': 'Baixar',
+ 'admin.plugins.dep.update': 'Atualizar',
+ 'admin.plugins.dep.resolveHint': 'Baixa a versão compatível mais recente, incluindo suas próprias dependências.',
'admin.plugins.accessTitle': 'O que ele pode acessar',
'admin.plugins.connectsTitle': 'Conecta-se a',
'admin.plugins.detailsTitle': 'Detalhes',
diff --git a/shared/src/i18n/br/budget.ts b/shared/src/i18n/br/budget.ts
index 4926a5750..828bab14c 100644
--- a/shared/src/i18n/br/budget.ts
+++ b/shared/src/i18n/br/budget.ts
@@ -52,6 +52,9 @@ const budget: TranslationStrings = {
'costs.nothingOwed': 'Ninguém deve nada a você',
'costs.yourShare': 'Sua parte',
'costs.youPaid': 'Você pagou',
+ 'costs.outstanding': 'Valor pendente',
+ 'costs.outstandingSub': 'Despesas sem pagador',
+ 'costs.outstandingItems': 'despesas sem pagador',
'costs.expenses': 'Despesas',
'costs.entries': '{count} lançamentos',
'costs.searchPlaceholder': 'Buscar despesas…',
@@ -116,10 +119,10 @@ const budget: TranslationStrings = {
'costs.unfinishedHint': 'Apenas no total — ainda não acertado',
'costs.tapToInclude': 'Toque para incluir',
'costs.amount': 'Valor',
- 'costs.split': "Split",
- 'costs.splitEqually': "Equally",
- 'costs.splitCustom': "Custom",
- 'costs.splitTicket': "Ticket",
+ 'costs.split': 'Split',
+ 'costs.splitEqually': 'Equally',
+ 'costs.splitCustom': 'Custom',
+ 'costs.splitTicket': 'Ticket',
'costs.filter.allCategories': 'Todas as categorias',
'costs.filter.allDays': 'Todos os dias',
'costs.expensesCount': '{count} despesas',
diff --git a/shared/src/i18n/br/collection.ts b/shared/src/i18n/br/collection.ts
index 14490572e..ae3745d2d 100644
--- a/shared/src/i18n/br/collection.ts
+++ b/shared/src/i18n/br/collection.ts
@@ -49,7 +49,8 @@ const collection: TranslationStrings = {
'collections.editList': 'Renomear',
'collections.listMenu': 'Opções da lista',
'collections.deleteList': 'Excluir lista',
- 'collections.deleteListConfirm': 'Isso exclui permanentemente a lista e todos os lugares salvos nela. Não é possível desfazer.',
+ 'collections.deleteListConfirm':
+ 'Isso exclui permanentemente a lista e todos os lugares salvos nela. Não é possível desfazer.',
'collections.listName': 'Nome da lista',
'collections.listNamePlaceholder': 'ex.: Tóquio 2025',
'collections.listColor': 'Cor',
@@ -127,7 +128,8 @@ const collection: TranslationStrings = {
'collections.share.memberHint': 'Apenas o proprietário da lista pode convidar ou remover pessoas.',
'collections.share.cancel': 'Cancelar',
'collections.share.leave': 'Sair da lista',
- 'collections.share.leaveConfirm': 'Sair desta lista compartilhada? Você perderá o acesso até ser convidado novamente.',
+ 'collections.share.leaveConfirm':
+ 'Sair desta lista compartilhada? Você perderá o acesso até ser convidado novamente.',
'collections.share.left': 'Você saiu da lista',
'collections.share.remove': 'Remover',
diff --git a/shared/src/i18n/br/help.ts b/shared/src/i18n/br/help.ts
index fd3ccd2f4..5fcb8a386 100644
--- a/shared/src/i18n/br/help.ts
+++ b/shared/src/i18n/br/help.ts
@@ -2,12 +2,12 @@ import type { TranslationStrings } from '../types';
// English fallback until 'br' is translated.
const help: TranslationStrings = {
- 'help.title': "Help & Docs",
- 'help.search': "Search docs…",
- 'help.contents': "Contents",
- 'help.noResults': "No matching pages.",
+ 'help.title': 'Help & Docs',
+ 'help.search': 'Search docs…',
+ 'help.contents': 'Contents',
+ 'help.noResults': 'No matching pages.',
'help.errorTitle': "Couldn't load this page",
- 'help.errorBody': "The help content is fetched from the TREK wiki. Check your connection and try again.",
+ 'help.errorBody': 'The help content is fetched from the TREK wiki. Check your connection and try again.',
};
export default help;
diff --git a/shared/src/i18n/br/index.ts b/shared/src/i18n/br/index.ts
index 34cccd9b9..54ae72ed6 100644
--- a/shared/src/i18n/br/index.ts
+++ b/shared/src/i18n/br/index.ts
@@ -5,11 +5,13 @@ import backup from './backup';
import budget from './budget';
import categories from './categories';
import collab from './collab';
+import collection from './collection';
import common from './common';
import dashboard from './dashboard';
import day from './day';
import dayplan from './dayplan';
import files from './files';
+import help from './help';
import inspector from './inspector';
import journey from './journey';
import login from './login';
@@ -39,8 +41,6 @@ import trip from './trip';
import trips from './trips';
import undo from './undo';
import vacay from './vacay';
-import collection from './collection';
-import help from './help';
const locale = {
...common,
diff --git a/shared/src/i18n/br/login.ts b/shared/src/i18n/br/login.ts
index 20d4161aa..443d44408 100644
--- a/shared/src/i18n/br/login.ts
+++ b/shared/src/i18n/br/login.ts
@@ -85,7 +85,8 @@ const login: TranslationStrings = {
'login.passkey.signIn': 'Entrar com uma passkey',
'login.passkey.failed': 'Falha ao entrar com passkey. Tente novamente.',
'login.insecureCookie.title': "Login won't stick over HTTP",
- 'login.insecureCookie.body': "You’re connecting over plain HTTP, so your browser drops TREK’s secure session cookie — the next request fails with \"Access token required\". Fix: use HTTPS, or for a home-lab set COOKIE_SECURE=false.",
- 'login.insecureCookie.link': "Open the Troubleshooting guide",
+ 'login.insecureCookie.body':
+ 'You’re connecting over plain HTTP, so your browser drops TREK’s secure session cookie — the next request fails with "Access token required". Fix: use HTTPS, or for a home-lab set COOKIE_SECURE=false.',
+ 'login.insecureCookie.link': 'Open the Troubleshooting guide',
};
export default login;
diff --git a/shared/src/i18n/br/places.ts b/shared/src/i18n/br/places.ts
index 73c90e25f..ca597bf1e 100644
--- a/shared/src/i18n/br/places.ts
+++ b/shared/src/i18n/br/places.ts
@@ -24,8 +24,8 @@ const places: TranslationStrings = {
'places.kmlImportNoneSelected': 'Selecione pelo menos um tipo.',
'places.selectionCount': '{count} selecionado(s)',
'places.deleteSelected': 'Excluir seleção',
- 'places.changeCategory': "Change category",
- 'places.categoryChanged': "{count} places updated",
+ 'places.changeCategory': 'Change category',
+ 'places.categoryChanged': '{count} places updated',
'places.kmlKmzImported': '{count} lugares importados de KMZ/KML',
'places.urlResolved': 'Lugar importado da URL',
'places.importList': 'Importar lista',
diff --git a/shared/src/i18n/br/settings.ts b/shared/src/i18n/br/settings.ts
index 94834c616..074648f06 100644
--- a/shared/src/i18n/br/settings.ts
+++ b/shared/src/i18n/br/settings.ts
@@ -29,7 +29,8 @@ const settings: TranslationStrings = {
'settings.mapStylePlaceholder': 'Selecionar um estilo Mapbox',
'settings.mapStyleHint': 'Preset ou sua própria URL mapbox://styles/USER/ID',
'settings.mapOpenFreeMapStylePlaceholder': 'Selecionar um estilo OpenFreeMap',
- 'settings.mapOpenFreeMapStyleHint': 'Preset ou URL de estilo OpenFreeMap. Os estilos OpenFreeMap funcionam sem token.',
+ 'settings.mapOpenFreeMapStyleHint':
+ 'Preset ou URL de estilo OpenFreeMap. Os estilos OpenFreeMap funcionam sem token.',
'settings.map3dBuildings': 'Prédios 3D & terreno',
'settings.map3dHint': 'Inclinação + extrusões 3D reais de prédios — funciona em todo estilo, incluindo satélite.',
'settings.mapHighQuality': 'Modo alta qualidade',
@@ -328,18 +329,21 @@ const settings: TranslationStrings = {
'settings.airtrail.test.success': 'Conectado — {count} voo(s) encontrado(s)',
'settings.airtrail.test.failed': 'Falha na conexão',
'settings.aiParsing.title': 'Análise por IA',
- 'settings.aiParsing.hint': 'Use seu próprio modelo de IA para extrair reservas dos arquivos enviados. Isso se aplica apenas quando o administrador não configurou um modelo para toda a instância.',
+ 'settings.aiParsing.hint':
+ 'Use seu próprio modelo de IA para extrair reservas dos arquivos enviados. Isso se aplica apenas quando o administrador não configurou um modelo para toda a instância.',
'settings.aiParsing.provider': 'Provedor',
'settings.aiParsing.providerLocal': 'Local (Ollama)',
'settings.aiParsing.providerOpenai': 'OpenAI',
'settings.aiParsing.providerAnthropic': 'Anthropic',
'settings.aiParsing.model': 'Modelo',
'settings.aiParsing.baseUrl': 'URL base',
- 'settings.aiParsing.baseUrlHint': 'Onde o modelo é executado — um servidor Ollama local ou um endpoint compatível com OpenAI.',
+ 'settings.aiParsing.baseUrlHint':
+ 'Onde o modelo é executado — um servidor Ollama local ou um endpoint compatível com OpenAI.',
'settings.aiParsing.apiKey': 'Chave de API',
'settings.aiParsing.apiKeyHint': 'Armazenada de forma criptografada. Deixe em branco para manter a chave atual.',
'settings.aiParsing.multimodal': 'Enviar documentos como imagens',
- 'settings.aiParsing.multimodalHint': 'Para modelos com capacidade de visão — envia o PDF original em vez do texto extraído.',
+ 'settings.aiParsing.multimodalHint':
+ 'Para modelos com capacidade de visão — envia o PDF original em vez do texto extraído.',
'settings.aiParsing.toast.saved': 'Configurações de IA salvas',
'settings.aiParsing.toast.saveError': 'Não foi possível salvar as configurações de IA',
'settings.tabs.appearance': 'Appearance',
@@ -358,7 +362,8 @@ const settings: TranslationStrings = {
'settings.appearance.contrastLow': 'Low contrast',
'settings.appearance.readability': 'Readability',
'settings.appearance.transparency': 'Transparency',
- 'settings.appearance.transparencyHint': 'Glassy translucent surfaces. Turn off for solid, higher-contrast backgrounds.',
+ 'settings.appearance.transparencyHint':
+ 'Glassy translucent surfaces. Turn off for solid, higher-contrast backgrounds.',
'settings.appearance.reduceMotion': 'Reduce motion',
'settings.appearance.reduceMotionHint': 'Minimize animations and transitions.',
'settings.appearance.density': 'Density',
@@ -388,7 +393,8 @@ const settings: TranslationStrings = {
'settings.appearance.group.belowHero': 'Below the hero',
'settings.appearance.group.bottomOfPage': 'Bottom of page',
'settings.appearance.sidebarHint': 'The whole right column. Turn off and the dashboard centers.',
- 'settings.appearance.densityHint': 'Compact tightens spacing and padding for a denser layout that fits more on screen.',
+ 'settings.appearance.densityHint':
+ 'Compact tightens spacing and padding for a denser layout that fits more on screen.',
'settings.appearance.textSizeAll': 'Everything',
'settings.appearance.perSize': 'Adjust each size separately',
'settings.appearance.size.large': 'Large',
@@ -411,10 +417,13 @@ const settings: TranslationStrings = {
'settings.offline.cache.title': 'Cache offline',
'settings.offline.mode.title': 'Modo offline',
'settings.offline.mode.force': 'Forçar modo offline',
- 'settings.offline.mode.forceHint': 'Trabalhe apenas com os dados em cache e enfileire suas alterações. Desative para reconectar e sincronizar.',
- 'settings.offline.mode.active': 'O modo offline está ligado — suas alterações estão na fila e serão sincronizadas quando você o desativar.',
+ 'settings.offline.mode.forceHint':
+ 'Trabalhe apenas com os dados em cache e enfileire suas alterações. Desative para reconectar e sincronizar.',
+ 'settings.offline.mode.active':
+ 'O modo offline está ligado — suas alterações estão na fila e serão sincronizadas quando você o desativar.',
'settings.offline.prepare.title': 'Preparar para uso offline',
- 'settings.offline.prepare.hint': 'Baixe tudo o que você precisa — dados da viagem, documentos e blocos do mapa — antes de perder a conexão.',
+ 'settings.offline.prepare.hint':
+ 'Baixe tudo o que você precisa — dados da viagem, documentos e blocos do mapa — antes de perder a conexão.',
'settings.offline.prepare.button': 'Baixar para uso offline',
'settings.offline.prepare.running': 'Baixando…',
'settings.offline.prepare.done': 'Pronto para uso offline',
@@ -425,12 +434,14 @@ const settings: TranslationStrings = {
'settings.offline.resyncing': 'Sincronizando…',
'settings.offline.storage.title': 'O que armazenar offline',
'settings.offline.storage.tiles': 'Armazenar blocos do mapa offline',
- 'settings.offline.storage.tilesHint': 'Os blocos do mapa usam mais armazenamento. Desative para manter offline apenas os dados da viagem e os documentos.',
+ 'settings.offline.storage.tilesHint':
+ 'Os blocos do mapa usam mais armazenamento. Desative para manter offline apenas os dados da viagem e os documentos.',
'settings.offline.storage.tripsTitle': 'Viagens',
'settings.offline.storage.tripOn': 'Armazenada offline',
'settings.offline.storage.tripOff': 'Não armazenada',
'settings.offline.clear': 'Limpar cache',
- 'settings.offline.clearConfirm': 'Limpar todos os dados de viagem offline? Você pode sincronizar novamente a qualquer momento quando estiver online.',
+ 'settings.offline.clearConfirm':
+ 'Limpar todos os dados de viagem offline? Você pode sincronizar novamente a qualquer momento quando estiver online.',
'settings.offline.stats.trips': 'Viagens em cache',
'settings.offline.stats.pending': 'Alterações pendentes',
'settings.offline.stats.failed': 'Alterações com falha',
@@ -438,7 +449,8 @@ const settings: TranslationStrings = {
'settings.offline.empty': 'Nenhuma viagem em cache ainda. Conecte-se à internet para sincronizar.',
'settings.offline.loading': 'Carregando…',
'settings.offline.conflicts.title': 'Conflitos de sincronização',
- 'settings.offline.conflicts.hint': 'As alterações que você fez offline conflitam com alterações mais recentes no servidor. Escolha qual versão manter.',
+ 'settings.offline.conflicts.hint':
+ 'As alterações que você fez offline conflitam com alterações mais recentes no servidor. Escolha qual versão manter.',
'settings.offline.conflicts.keepMine': 'Manter a minha',
'settings.offline.conflicts.keepServer': 'Manter a do servidor',
'settings.offline.conflicts.mine': 'Sua versão',
diff --git a/shared/src/i18n/br/trip.ts b/shared/src/i18n/br/trip.ts
index d809e84f5..2b632482e 100644
--- a/shared/src/i18n/br/trip.ts
+++ b/shared/src/i18n/br/trip.ts
@@ -28,7 +28,8 @@ const trip: TranslationStrings = {
'trip.toast.placesDeleted': '{count} lugares excluídos',
'trip.loadingPhotos': 'Carregando fotos dos lugares...',
'trip.invite.linkTitle': 'Link de convite da viagem',
- 'trip.invite.linkHint': 'Qualquer pessoa com uma conta TREK que abrir este link entra na viagem como membro. Gere novamente para invalidar o link antigo.',
+ 'trip.invite.linkHint':
+ 'Qualquer pessoa com uma conta TREK que abrir este link entra na viagem como membro. Gere novamente para invalidar o link antigo.',
'trip.invite.create': 'Criar link de convite',
'trip.invite.regenerate': 'Gerar novamente',
'trip.invite.disable': 'Desativar',
diff --git a/shared/src/i18n/br/undo.ts b/shared/src/i18n/br/undo.ts
index e9a8696d9..b6fd2d796 100644
--- a/shared/src/i18n/br/undo.ts
+++ b/shared/src/i18n/br/undo.ts
@@ -9,7 +9,7 @@ const undo: TranslationStrings = {
'undo.optimize': 'Rota otimizada',
'undo.deletePlace': 'Local excluído',
'undo.deletePlaces': 'Lugares excluídos',
- 'undo.changeCategory': "Category changed",
+ 'undo.changeCategory': 'Category changed',
'undo.moveDay': 'Local movido para outro dia',
'undo.lock': 'Bloqueio do local alternado',
'undo.importGpx': 'Importação de GPX',
diff --git a/shared/src/i18n/cs/admin.ts b/shared/src/i18n/cs/admin.ts
index efcfc345a..3e835ee0b 100644
--- a/shared/src/i18n/cs/admin.ts
+++ b/shared/src/i18n/cs/admin.ts
@@ -94,6 +94,8 @@ const admin: TranslationStrings = {
'admin.recommended': 'Doporučeno',
'admin.weatherKey': 'OpenWeatherMap API klíč',
'admin.weatherKeyHint': 'Pro data o počasí. Zdarma na openweathermap.org',
+ 'admin.unsplashKey': 'Klíč API Unsplash',
+ 'admin.unsplashKeyHint': 'Pro vyhledávání obrázků. Zdarma na unsplash.com/developers',
'admin.validateKey': 'Testovat',
'admin.keyValid': 'Připojeno',
'admin.keyInvalid': 'Neplatný',
@@ -160,6 +162,11 @@ const admin: TranslationStrings = {
'admin.tabs.plugins': 'Pluginy',
'admin.plugins.rescan': 'Znovu prohledat',
'admin.plugins.rescanned': 'Složka pluginů byla znovu prohledána',
+ 'admin.plugins.upload': 'Nahrát plugin',
+ 'admin.plugins.dropToUpload': 'Přetáhněte sem .zip pluginu pro instalaci',
+ 'admin.plugins.uploaded': 'Plugin “{name}” nahrán — aktivujte jej pro spuštění',
+ 'admin.plugins.sideloaded': 'Načteno ručně',
+ 'admin.plugins.sideloadedHint': 'Nahráno ručně — není z registru, nepodepsané a nezkontrolované',
'admin.plugins.browse': 'Procházet pluginy',
'admin.plugins.installed': 'Nainstalováno',
'admin.plugins.install': 'Instalovat',
@@ -174,11 +181,13 @@ const admin: TranslationStrings = {
'admin.plugins.noErrors': 'Žádné zaznamenané chyby.',
'admin.plugins.uninstalled': 'Plugin odinstalován',
'admin.plugins.uninstallTitle': 'Odinstalovat plugin?',
- 'admin.plugins.uninstallBody': 'Tím se plugin zastaví, odstraní se jeho kód a smažou se všechna jeho data. Tuto akci nelze vrátit zpět.',
+ 'admin.plugins.uninstallBody':
+ 'Tím se plugin zastaví, odstraní se jeho kód a smažou se všechna jeho data. Tuto akci nelze vrátit zpět.',
'admin.plugins.status.starting': 'Spouští se…',
'admin.plugins.type.widget': 'Widget',
'admin.plugins.type.page': 'Stránka',
'admin.plugins.type.integration': 'Integrace',
+ 'admin.plugins.type.trip-page': 'Stránka cesty',
'admin.plugins.reviewed': 'Zkontrolováno',
'admin.plugins.unreviewed': 'Nezkontrolováno',
'admin.plugins.updated': 'Plugin aktualizován',
@@ -188,10 +197,12 @@ const admin: TranslationStrings = {
'admin.plugins.title': 'Pluginy',
'admin.plugins.subtitle': 'Instalujte a spravujte pluginy třetích stran na své instanci.',
'admin.plugins.disabledTitle': 'Pluginy jsou zakázány',
- 'admin.plugins.disabledBody': 'Běhové prostředí pluginů je vypnuté (TREK_PLUGINS_ENABLED). Dokud jej administrátor nepovolí v konfiguraci serveru, nemůže běžet žádný plugin.',
+ 'admin.plugins.disabledBody':
+ 'Běhové prostředí pluginů je vypnuté (TREK_PLUGINS_ENABLED). Dokud jej administrátor nepovolí v konfiguraci serveru, nemůže běžet žádný plugin.',
'admin.plugins.empty': 'Zatím nejsou nainstalovány žádné pluginy.',
'admin.plugins.loadError': 'Nepodařilo se načíst pluginy.',
- 'admin.plugins.scaffoldNote': 'Instalace a aktivace pluginů přijdou v pozdější aktualizaci. Tento panel zatím pouze zobrazuje nainstalované pluginy.',
+ 'admin.plugins.scaffoldNote':
+ 'Instalace a aktivace pluginů přijdou v pozdější aktualizaci. Tento panel zatím pouze zobrazuje nainstalované pluginy.',
'admin.plugins.status.active': 'Aktivní',
'admin.plugins.status.inactive': 'Neaktivní',
'admin.plugins.status.disabled': 'Zakázán',
@@ -214,10 +225,29 @@ const admin: TranslationStrings = {
'admin.plugins.perm.db:own': 'Ukládat vlastní data v izolované databázi',
'admin.plugins.perm.db:read:trips': 'Číst cesty, ke kterým má aktuální uživatel přístup',
'admin.plugins.perm.db:read:users': 'Číst základní údaje profilu (jméno, avatar — nikdy přihlašovací údaje)',
+ 'admin.plugins.perm.db:read:costs': 'Číst výdaje (položky rozpočtu), ke kterým má aktuální uživatel přístup',
+ 'admin.plugins.perm.db:read:packing': 'Číst seznamy věcí k zabalení u cest, ke kterým má aktuální uživatel přístup',
+ 'admin.plugins.perm.db:read:files': 'Číst soubory cest, ke kterým má aktuální uživatel přístup',
+ 'admin.plugins.perm.db:write:costs':
+ 'Vytvářet výdaje (položky rozpočtu) na cestách, které může aktuální uživatel upravovat',
+ 'admin.plugins.perm.db:write:places':
+ 'Přidávat, upravovat a odebírat místa na cestách, které může aktuální uživatel upravovat',
+ 'admin.plugins.perm.db:write:days':
+ 'Přidávat, upravovat a odebírat dny na cestách, které může aktuální uživatel upravovat',
+ 'admin.plugins.perm.db:write:itinerary':
+ 'Přiřazovat a odebírat místa ke dnům cest, které může aktuální uživatel upravovat',
+ 'admin.plugins.perm.db:write:trips':
+ 'Upravovat podrobnosti cesty (název, data, měnu…) na cestách, které může aktuální uživatel upravovat',
+ 'admin.plugins.perm.db:meta':
+ 'Připojovat vlastní soukromá data k cestám, místům a dnům, ke kterým má aktuální uživatel přístup',
'admin.plugins.perm.ws:broadcast:trip': 'Odesílat aktualizace v reálném čase členům cesty',
'admin.plugins.perm.ws:broadcast:user': 'Odesílat aktualizace v reálném čase jednotlivým uživatelům',
'admin.plugins.perm.hook:photo-provider': 'Poskytovat fotky do sekce Fotky',
'admin.plugins.perm.hook:calendar-source': 'Poskytovat události do kalendáře',
+ 'admin.plugins.perm.hook:place-detail-provider': 'Přidávat další podrobnosti (recenze, hodnocení, odkazy) k místu',
+ 'admin.plugins.perm.hook:trip-warning-provider': 'Vyvolávat ověřovací upozornění u cesty (zobrazená v plánovači)',
+ 'admin.plugins.perm.events:subscribe':
+ 'Reagovat na základní události aktivity (pouze název události a cesta, nikdy obsah)',
'admin.plugins.perm.http:outbound': 'Odesílat odchozí požadavky na deklarované hostitele',
'admin.plugins.updateConsentTitle': 'Tato aktualizace vyžaduje nová oprávnění',
'admin.plugins.updateConsentBody':
@@ -269,11 +299,36 @@ const admin: TranslationStrings = {
'admin.plugins.restarted': 'Plugin restartován',
'admin.plugins.cap.readsTrips': 'Čte vaše cesty',
'admin.plugins.cap.readsUsers': 'Čte základní profily',
+ 'admin.plugins.cap.readsCosts': 'Čte vaše výdaje',
+ 'admin.plugins.cap.readsPacking': 'Čte seznamy věcí k zabalení',
+ 'admin.plugins.cap.readsFiles': 'Čte soubory cest',
+ 'admin.plugins.cap.writesCosts': 'Přidává výdaje',
+ 'admin.plugins.cap.writesPlaces': 'Upravuje místa',
+ 'admin.plugins.cap.writesDays': 'Upravuje dny',
+ 'admin.plugins.cap.writesItinerary': 'Upravuje itinerář',
+ 'admin.plugins.cap.writesTrips': 'Upravuje cesty',
+ 'admin.plugins.cap.metadata': 'Přidává metadata',
'admin.plugins.cap.widget': 'Widget na nástěnce',
'admin.plugins.cap.heroWidget': 'Widget palubní vstupenky',
+ 'admin.plugins.cap.placeSlot': 'Detail místa',
'admin.plugins.cap.realtime': 'Aktualizace v reálném čase',
'admin.plugins.cap.photos': 'Poskytuje fotky',
'admin.plugins.cap.calendar': 'Poskytuje události kalendáře',
+ 'admin.plugins.cap.placeDetails': 'Obohacuje místa',
+ 'admin.plugins.cap.warnings': 'Označuje problémy',
+ 'admin.plugins.cap.events': 'Reaguje na aktivitu',
+ 'admin.plugins.cap.requiresAddon': 'Vyžaduje {addon}',
+ 'admin.plugins.cap.dependsOn': 'Vyžaduje {id} {version}',
+ 'admin.plugins.dep.addonDisabledToast': 'Nejprve povolte potřebné doplňky: {addons}',
+ 'admin.plugins.dep.autoEnabled': 'Nejprve povoleny potřebné pluginy: {plugins}',
+ 'admin.plugins.dep.downloaded': 'Staženo {id}',
+ 'admin.plugins.dep.resolveTitle': 'Chybějící závislosti',
+ 'admin.plugins.dep.resolveBody': '„{name}“ před povolením potřebuje nainstalovat tyto pluginy.',
+ 'admin.plugins.dep.requires': 'Vyžaduje {version}',
+ 'admin.plugins.dep.mismatch': 'Vyžaduje {wanted} — nainstalováno je {installed}',
+ 'admin.plugins.dep.download': 'Stáhnout',
+ 'admin.plugins.dep.update': 'Aktualizovat',
+ 'admin.plugins.dep.resolveHint': 'Stáhne nejnovější kompatibilní verzi včetně jejích vlastních závislostí.',
'admin.plugins.accessTitle': 'K čemu má přístup',
'admin.plugins.connectsTitle': 'Připojuje se k',
'admin.plugins.detailsTitle': 'Podrobnosti',
diff --git a/shared/src/i18n/cs/budget.ts b/shared/src/i18n/cs/budget.ts
index 14cf35a7b..2a6d9244b 100644
--- a/shared/src/i18n/cs/budget.ts
+++ b/shared/src/i18n/cs/budget.ts
@@ -52,6 +52,9 @@ const budget: TranslationStrings = {
'costs.nothingOwed': 'Nikdo vám nic nedluží',
'costs.yourShare': 'Váš podíl',
'costs.youPaid': 'Zaplatili jste',
+ 'costs.outstanding': 'Nevyřízená částka',
+ 'costs.outstandingSub': 'Výdaje zatím bez plátce',
+ 'costs.outstandingItems': 'výdajů potřebuje plátce',
'costs.expenses': 'Výdaje',
'costs.entries': '{count} položek',
'costs.searchPlaceholder': 'Hledat výdaje…',
@@ -116,10 +119,10 @@ const budget: TranslationStrings = {
'costs.unfinishedHint': 'Jen v součtu — zatím nevyrovnáno',
'costs.tapToInclude': 'Klepnutím zahrnout',
'costs.amount': 'Částka',
- 'costs.split': "Split",
- 'costs.splitEqually': "Equally",
- 'costs.splitCustom': "Custom",
- 'costs.splitTicket': "Ticket",
+ 'costs.split': 'Split',
+ 'costs.splitEqually': 'Equally',
+ 'costs.splitCustom': 'Custom',
+ 'costs.splitTicket': 'Ticket',
'costs.filter.allCategories': 'Všechny kategorie',
'costs.filter.allDays': 'Všechny dny',
'costs.expensesCount': '{count} výdajů',
diff --git a/shared/src/i18n/cs/help.ts b/shared/src/i18n/cs/help.ts
index 26bb0a774..bbaca6ea4 100644
--- a/shared/src/i18n/cs/help.ts
+++ b/shared/src/i18n/cs/help.ts
@@ -2,12 +2,12 @@ import type { TranslationStrings } from '../types';
// English fallback until 'cs' is translated.
const help: TranslationStrings = {
- 'help.title': "Help & Docs",
- 'help.search': "Search docs…",
- 'help.contents': "Contents",
- 'help.noResults': "No matching pages.",
+ 'help.title': 'Help & Docs',
+ 'help.search': 'Search docs…',
+ 'help.contents': 'Contents',
+ 'help.noResults': 'No matching pages.',
'help.errorTitle': "Couldn't load this page",
- 'help.errorBody': "The help content is fetched from the TREK wiki. Check your connection and try again.",
+ 'help.errorBody': 'The help content is fetched from the TREK wiki. Check your connection and try again.',
};
export default help;
diff --git a/shared/src/i18n/cs/index.ts b/shared/src/i18n/cs/index.ts
index b9af5461f..eef4c74aa 100644
--- a/shared/src/i18n/cs/index.ts
+++ b/shared/src/i18n/cs/index.ts
@@ -5,11 +5,13 @@ import backup from './backup';
import budget from './budget';
import categories from './categories';
import collab from './collab';
+import collection from './collection';
import common from './common';
import dashboard from './dashboard';
import day from './day';
import dayplan from './dayplan';
import files from './files';
+import help from './help';
import inspector from './inspector';
import journey from './journey';
import login from './login';
@@ -39,8 +41,6 @@ import trip from './trip';
import trips from './trips';
import undo from './undo';
import vacay from './vacay';
-import collection from './collection';
-import help from './help';
const locale = {
...common,
diff --git a/shared/src/i18n/cs/login.ts b/shared/src/i18n/cs/login.ts
index a553e6e33..90816f3ac 100644
--- a/shared/src/i18n/cs/login.ts
+++ b/shared/src/i18n/cs/login.ts
@@ -85,7 +85,8 @@ const login: TranslationStrings = {
'login.passkey.signIn': 'Přihlásit se pomocí přístupového klíče',
'login.passkey.failed': 'Přihlášení přístupovým klíčem se nezdařilo. Zkuste to prosím znovu.',
'login.insecureCookie.title': "Login won't stick over HTTP",
- 'login.insecureCookie.body': "You’re connecting over plain HTTP, so your browser drops TREK’s secure session cookie — the next request fails with \"Access token required\". Fix: use HTTPS, or for a home-lab set COOKIE_SECURE=false.",
- 'login.insecureCookie.link': "Open the Troubleshooting guide",
+ 'login.insecureCookie.body':
+ 'You’re connecting over plain HTTP, so your browser drops TREK’s secure session cookie — the next request fails with "Access token required". Fix: use HTTPS, or for a home-lab set COOKIE_SECURE=false.',
+ 'login.insecureCookie.link': 'Open the Troubleshooting guide',
};
export default login;
diff --git a/shared/src/i18n/cs/places.ts b/shared/src/i18n/cs/places.ts
index 3538b869c..09dbd7d7f 100644
--- a/shared/src/i18n/cs/places.ts
+++ b/shared/src/i18n/cs/places.ts
@@ -24,8 +24,8 @@ const places: TranslationStrings = {
'places.kmlImportNoneSelected': 'Vyberte alespoň jeden typ.',
'places.selectionCount': '{count} vybráno',
'places.deleteSelected': 'Smazat vybrané',
- 'places.changeCategory': "Change category",
- 'places.categoryChanged': "{count} places updated",
+ 'places.changeCategory': 'Change category',
+ 'places.categoryChanged': '{count} places updated',
'places.kmlKmzImported': 'Importováno {count} míst z KMZ/KML',
'places.urlResolved': 'Místo importováno z URL',
'places.importList': 'Import seznamu',
diff --git a/shared/src/i18n/cs/settings.ts b/shared/src/i18n/cs/settings.ts
index a43427fc0..64fca9f3e 100644
--- a/shared/src/i18n/cs/settings.ts
+++ b/shared/src/i18n/cs/settings.ts
@@ -325,7 +325,8 @@ const settings: TranslationStrings = {
'settings.airtrail.test.success': 'Připojeno – nalezeno letů: {count}',
'settings.airtrail.test.failed': 'Připojení selhalo',
'settings.aiParsing.title': 'Zpracování pomocí AI',
- 'settings.aiParsing.hint': 'Použijte vlastní model AI k získání rezervací z nahraných souborů. Platí pouze tehdy, když správce nenastavil model pro celou instanci.',
+ 'settings.aiParsing.hint':
+ 'Použijte vlastní model AI k získání rezervací z nahraných souborů. Platí pouze tehdy, když správce nenastavil model pro celou instanci.',
'settings.aiParsing.provider': 'Poskytovatel',
'settings.aiParsing.providerLocal': 'Místní (Ollama)',
'settings.aiParsing.providerOpenai': 'OpenAI',
@@ -336,7 +337,8 @@ const settings: TranslationStrings = {
'settings.aiParsing.apiKey': 'Klíč API',
'settings.aiParsing.apiKeyHint': 'Ukládá se šifrovaně. Ponechte prázdné pro zachování aktuálního klíče.',
'settings.aiParsing.multimodal': 'Odesílat dokumenty jako obrázky',
- 'settings.aiParsing.multimodalHint': 'Pro modely se schopností zpracovat obraz — odešle původní PDF místo extrahovaného textu.',
+ 'settings.aiParsing.multimodalHint':
+ 'Pro modely se schopností zpracovat obraz — odešle původní PDF místo extrahovaného textu.',
'settings.aiParsing.toast.saved': 'Nastavení AI uloženo',
'settings.aiParsing.toast.saveError': 'Nastavení AI se nepodařilo uložit',
'settings.tabs.appearance': 'Appearance',
@@ -355,7 +357,8 @@ const settings: TranslationStrings = {
'settings.appearance.contrastLow': 'Low contrast',
'settings.appearance.readability': 'Readability',
'settings.appearance.transparency': 'Transparency',
- 'settings.appearance.transparencyHint': 'Glassy translucent surfaces. Turn off for solid, higher-contrast backgrounds.',
+ 'settings.appearance.transparencyHint':
+ 'Glassy translucent surfaces. Turn off for solid, higher-contrast backgrounds.',
'settings.appearance.reduceMotion': 'Reduce motion',
'settings.appearance.reduceMotionHint': 'Minimize animations and transitions.',
'settings.appearance.density': 'Density',
@@ -385,7 +388,8 @@ const settings: TranslationStrings = {
'settings.appearance.group.belowHero': 'Below the hero',
'settings.appearance.group.bottomOfPage': 'Bottom of page',
'settings.appearance.sidebarHint': 'The whole right column. Turn off and the dashboard centers.',
- 'settings.appearance.densityHint': 'Compact tightens spacing and padding for a denser layout that fits more on screen.',
+ 'settings.appearance.densityHint':
+ 'Compact tightens spacing and padding for a denser layout that fits more on screen.',
'settings.appearance.textSizeAll': 'Everything',
'settings.appearance.perSize': 'Adjust each size separately',
'settings.appearance.size.large': 'Large',
@@ -408,10 +412,13 @@ const settings: TranslationStrings = {
'settings.offline.cache.title': 'Offline mezipaměť',
'settings.offline.mode.title': 'Offline režim',
'settings.offline.mode.force': 'Vynutit offline režim',
- 'settings.offline.mode.forceHint': 'Pracujte pouze s daty z mezipaměti a změny se zařadí do fronty. Vypnutím se znovu připojíte a synchronizujete.',
- 'settings.offline.mode.active': 'Offline režim je zapnutý — vaše změny jsou ve frontě a synchronizují se, jakmile jej vypnete.',
+ 'settings.offline.mode.forceHint':
+ 'Pracujte pouze s daty z mezipaměti a změny se zařadí do fronty. Vypnutím se znovu připojíte a synchronizujete.',
+ 'settings.offline.mode.active':
+ 'Offline režim je zapnutý — vaše změny jsou ve frontě a synchronizují se, jakmile jej vypnete.',
'settings.offline.prepare.title': 'Příprava na offline',
- 'settings.offline.prepare.hint': 'Stáhněte si vše potřebné — data cest, dokumenty a mapové dlaždice — než ztratíte připojení.',
+ 'settings.offline.prepare.hint':
+ 'Stáhněte si vše potřebné — data cest, dokumenty a mapové dlaždice — než ztratíte připojení.',
'settings.offline.prepare.button': 'Stáhnout pro offline použití',
'settings.offline.prepare.running': 'Stahování…',
'settings.offline.prepare.done': 'Připraveno pro offline použití',
@@ -422,7 +429,8 @@ const settings: TranslationStrings = {
'settings.offline.resyncing': 'Synchronizace…',
'settings.offline.storage.title': 'Co ukládat offline',
'settings.offline.storage.tiles': 'Ukládat mapové dlaždice offline',
- 'settings.offline.storage.tilesHint': 'Mapové dlaždice zabírají nejvíce místa. Vypnutím ponecháte offline pouze data cest a dokumenty.',
+ 'settings.offline.storage.tilesHint':
+ 'Mapové dlaždice zabírají nejvíce místa. Vypnutím ponecháte offline pouze data cest a dokumenty.',
'settings.offline.storage.tripsTitle': 'Cesty',
'settings.offline.storage.tripOn': 'Uloženo offline',
'settings.offline.storage.tripOff': 'Neuloženo',
@@ -435,7 +443,8 @@ const settings: TranslationStrings = {
'settings.offline.empty': 'Zatím žádné cesty v mezipaměti. Pro synchronizaci se připojte k internetu.',
'settings.offline.loading': 'Načítání…',
'settings.offline.conflicts.title': 'Konflikty synchronizace',
- 'settings.offline.conflicts.hint': 'Změny, které jste provedli offline, se střetávají s novějšími změnami na serveru. Vyberte, kterou verzi zachovat.',
+ 'settings.offline.conflicts.hint':
+ 'Změny, které jste provedli offline, se střetávají s novějšími změnami na serveru. Vyberte, kterou verzi zachovat.',
'settings.offline.conflicts.keepMine': 'Zachovat moji',
'settings.offline.conflicts.keepServer': 'Zachovat serverovou',
'settings.offline.conflicts.mine': 'Vaše verze',
diff --git a/shared/src/i18n/cs/trip.ts b/shared/src/i18n/cs/trip.ts
index 8e1876643..04275d73e 100644
--- a/shared/src/i18n/cs/trip.ts
+++ b/shared/src/i18n/cs/trip.ts
@@ -28,7 +28,8 @@ const trip: TranslationStrings = {
'trip.confirm.deletePlaces': 'Smazat {count} míst?',
'trip.toast.placesDeleted': '{count} míst smazáno',
'trip.invite.linkTitle': 'Odkaz pro pozvání na cestu',
- 'trip.invite.linkHint': 'Kdokoli s účtem TREK, kdo otevře tento odkaz, se připojí k cestě jako člen. Vygenerováním nového odkazu zneplatníte ten starý.',
+ 'trip.invite.linkHint':
+ 'Kdokoli s účtem TREK, kdo otevře tento odkaz, se připojí k cestě jako člen. Vygenerováním nového odkazu zneplatníte ten starý.',
'trip.invite.create': 'Vytvořit odkaz pro pozvání',
'trip.invite.regenerate': 'Vygenerovat znovu',
'trip.invite.disable': 'Deaktivovat',
diff --git a/shared/src/i18n/cs/undo.ts b/shared/src/i18n/cs/undo.ts
index b1524b087..50cf5deed 100644
--- a/shared/src/i18n/cs/undo.ts
+++ b/shared/src/i18n/cs/undo.ts
@@ -9,7 +9,7 @@ const undo: TranslationStrings = {
'undo.optimize': 'Trasa optimalizována',
'undo.deletePlace': 'Místo smazáno',
'undo.deletePlaces': 'Místa smazána',
- 'undo.changeCategory': "Category changed",
+ 'undo.changeCategory': 'Category changed',
'undo.moveDay': 'Místo přesunuto na jiný den',
'undo.lock': 'Zámek místa přepnut',
'undo.importGpx': 'Import GPX',
diff --git a/shared/src/i18n/de/admin.ts b/shared/src/i18n/de/admin.ts
index c9102b9b4..a4efcc048 100644
--- a/shared/src/i18n/de/admin.ts
+++ b/shared/src/i18n/de/admin.ts
@@ -96,6 +96,8 @@ const admin: TranslationStrings = {
'admin.recommended': 'Empfohlen',
'admin.weatherKey': 'OpenWeatherMap API-Schlüssel',
'admin.weatherKeyHint': 'Für Wetterdaten. Kostenlos unter openweathermap.org',
+ 'admin.unsplashKey': 'Unsplash-API-Schlüssel',
+ 'admin.unsplashKeyHint': 'Für die Bildsuche. Kostenlos unter unsplash.com/developers',
'admin.validateKey': 'Test',
'admin.keyValid': 'Verbunden',
'admin.keyInvalid': 'Ungültig',
@@ -162,6 +164,11 @@ const admin: TranslationStrings = {
'admin.tabs.plugins': 'Plugins',
'admin.plugins.rescan': 'Neu scannen',
'admin.plugins.rescanned': 'Plugin-Ordner neu gescannt',
+ 'admin.plugins.upload': 'Plugin hochladen',
+ 'admin.plugins.dropToUpload': 'Plugin-.zip zum Installieren hier ablegen',
+ 'admin.plugins.uploaded': 'Plugin „{name}“ hochgeladen — zum Ausführen aktivieren',
+ 'admin.plugins.sideloaded': 'Manuell geladen',
+ 'admin.plugins.sideloadedHint': 'Manuell hochgeladen — nicht aus der Registry, unsigniert und ungeprüft',
'admin.plugins.browse': 'Plugins durchsuchen',
'admin.plugins.installed': 'Installiert',
'admin.plugins.install': 'Installieren',
@@ -176,11 +183,13 @@ const admin: TranslationStrings = {
'admin.plugins.noErrors': 'Keine Fehler protokolliert.',
'admin.plugins.uninstalled': 'Plugin deinstalliert',
'admin.plugins.uninstallTitle': 'Plugin deinstallieren?',
- 'admin.plugins.uninstallBody': 'Das stoppt das Plugin, entfernt seinen Code und löscht alle seine Daten. Das kann nicht rückgängig gemacht werden.',
+ 'admin.plugins.uninstallBody':
+ 'Das stoppt das Plugin, entfernt seinen Code und löscht alle seine Daten. Das kann nicht rückgängig gemacht werden.',
'admin.plugins.status.starting': 'Startet…',
'admin.plugins.type.widget': 'Widget',
'admin.plugins.type.page': 'Seite',
'admin.plugins.type.integration': 'Integration',
+ 'admin.plugins.type.trip-page': 'Reise-Seite',
'admin.plugins.reviewed': 'Geprüft',
'admin.plugins.unreviewed': 'Ungeprüft',
'admin.plugins.updated': 'Plugin aktualisiert',
@@ -190,10 +199,12 @@ const admin: TranslationStrings = {
'admin.plugins.title': 'Plugins',
'admin.plugins.subtitle': 'Plugins von Drittanbietern auf deiner Instanz installieren und verwalten.',
'admin.plugins.disabledTitle': 'Plugins sind deaktiviert',
- 'admin.plugins.disabledBody': 'Die Plugin-Laufzeit ist ausgeschaltet (TREK_PLUGINS_ENABLED). Es kann kein Plugin laufen, bis ein Admin sie in der Serverkonfiguration aktiviert.',
+ 'admin.plugins.disabledBody':
+ 'Die Plugin-Laufzeit ist ausgeschaltet (TREK_PLUGINS_ENABLED). Es kann kein Plugin laufen, bis ein Admin sie in der Serverkonfiguration aktiviert.',
'admin.plugins.empty': 'Noch keine Plugins installiert.',
'admin.plugins.loadError': 'Plugins konnten nicht geladen werden.',
- 'admin.plugins.scaffoldNote': 'Installation und Aktivierung von Plugins folgen in einem späteren Update. Dieses Panel zeigt derzeit nur installierte Plugins an.',
+ 'admin.plugins.scaffoldNote':
+ 'Installation und Aktivierung von Plugins folgen in einem späteren Update. Dieses Panel zeigt derzeit nur installierte Plugins an.',
'admin.plugins.status.active': 'Aktiv',
'admin.plugins.status.inactive': 'Inaktiv',
'admin.plugins.status.disabled': 'Deaktiviert',
@@ -216,32 +227,61 @@ const admin: TranslationStrings = {
'admin.plugins.perm.db:own': 'Eigene Daten in einer isolierten Datenbank speichern',
'admin.plugins.perm.db:read:trips': 'Reisen lesen, auf die der handelnde Nutzer Zugriff hat',
'admin.plugins.perm.db:read:users': 'Grundlegende Profilinfos lesen (Name, Avatar — nie Zugangsdaten)',
+ 'admin.plugins.perm.db:read:costs': 'Ausgaben (Budgetposten) lesen, auf die der handelnde Nutzer Zugriff hat',
+ 'admin.plugins.perm.db:read:packing': 'Packlisten von Reisen lesen, auf die der handelnde Nutzer Zugriff hat',
+ 'admin.plugins.perm.db:read:files': 'Dateien von Reisen lesen, auf die der handelnde Nutzer Zugriff hat',
+ 'admin.plugins.perm.db:write:costs':
+ 'Ausgaben (Budgetposten) auf Reisen erstellen, die der handelnde Nutzer bearbeiten kann',
+ 'admin.plugins.perm.db:write:places':
+ 'Orte auf Reisen anlegen, bearbeiten und löschen, die der handelnde Nutzer bearbeiten kann',
+ 'admin.plugins.perm.db:write:days':
+ 'Tage auf Reisen anlegen, bearbeiten und löschen, die der handelnde Nutzer bearbeiten kann',
+ 'admin.plugins.perm.db:write:itinerary':
+ 'Orte den Tagen von Reisen zuordnen und entfernen, die der handelnde Nutzer bearbeiten kann',
+ 'admin.plugins.perm.db:write:trips':
+ 'Reisedetails (Titel, Daten, Währung …) auf Reisen bearbeiten, die der handelnde Nutzer bearbeiten kann',
+ 'admin.plugins.perm.db:meta':
+ 'Eigene private Daten an Reisen, Orte und Tage anhängen, auf die der handelnde Nutzer Zugriff hat',
'admin.plugins.perm.ws:broadcast:trip': 'Echtzeit-Updates an Reisemitglieder senden',
'admin.plugins.perm.ws:broadcast:user': 'Echtzeit-Updates an einzelne Nutzer senden',
'admin.plugins.perm.hook:photo-provider': 'Fotos für Erinnerungen bereitstellen',
'admin.plugins.perm.hook:calendar-source': 'Termine für den Kalender bereitstellen',
+ 'admin.plugins.perm.hook:place-detail-provider':
+ 'Zusatzdetails (Bewertungen, Ratings, Links) zu einem Ort beisteuern',
+ 'admin.plugins.perm.hook:trip-warning-provider':
+ 'Validierungswarnungen zu einer Reise ausgeben (im Planer angezeigt)',
+ 'admin.plugins.perm.events:subscribe':
+ 'Auf Kern-Aktivitäts-Events reagieren (nur Event-Name + Reise, nie der Inhalt)',
'admin.plugins.perm.http:outbound': 'Ausgehende Anfragen an deklarierte Hosts stellen',
'admin.plugins.updateConsentTitle': 'Dieses Update braucht neue Berechtigungen',
- 'admin.plugins.updateConsentBody': '{name} v{version} verlangt Rechte, die du bisher nicht freigegeben hast. Die neue Version ist installiert, bleibt aber aus, bis du sie freigibst.',
+ 'admin.plugins.updateConsentBody':
+ '{name} v{version} verlangt Rechte, die du bisher nicht freigegeben hast. Die neue Version ist installiert, bleibt aber aus, bis du sie freigibst.',
'admin.plugins.updateNewPermissions': 'Neu verlangte Berechtigungen',
'admin.plugins.updateNewEgress': 'Neue ausgehende Verbindungen',
'admin.plugins.updateApprove': 'Freigeben & einschalten',
'admin.plugins.updateLater': 'Vorerst aus lassen',
'admin.plugins.updateKeptOff': 'Update installiert — bleibt aus, bis du die neuen Berechtigungen freigibst',
- 'admin.plugins.reviewedMeaning': '„Geprüft" heißt: Ein TREK-Maintainer hat den Code dieses Plugins bei jeder Version manuell auf Schadsoftware gescannt — nicht auf Qualität oder Funktion. Es ist keine Garantie, dass ein Plugin harmlos ist.',
+ 'admin.plugins.reviewedMeaning':
+ '„Geprüft" heißt: Ein TREK-Maintainer hat den Code dieses Plugins bei jeder Version manuell auf Schadsoftware gescannt — nicht auf Qualität oder Funktion. Es ist keine Garantie, dass ein Plugin harmlos ist.',
'admin.plugins.security.title': 'Wie Plugins eingesperrt werden — und wo die Grenzen liegen',
'admin.plugins.security.isolationTitle': 'Jedes Plugin läuft abgeschottet',
- 'admin.plugins.security.isolationBody': 'Ein Plugin läuft als eigener, abgeriegelter Prozess, der nur seine eigenen Dateien lesen darf. Es kann weder deine Datenbank noch deinen Login-Schlüssel oder deinen Verschlüsselungsschlüssel lesen, keine anderen Programme starten und nirgends Dateien schreiben. Seine Oberfläche läuft in einem versiegelten Browser-Rahmen, der dein Sitzungs-Cookie nicht lesen und die TREK-Seite drumherum nicht anfassen kann.',
+ 'admin.plugins.security.isolationBody':
+ 'Ein Plugin läuft als eigener, abgeriegelter Prozess, der nur seine eigenen Dateien lesen darf. Es kann weder deine Datenbank noch deinen Login-Schlüssel oder deinen Verschlüsselungsschlüssel lesen, keine anderen Programme starten und nirgends Dateien schreiben. Seine Oberfläche läuft in einem versiegelten Browser-Rahmen, der dein Sitzungs-Cookie nicht lesen und die TREK-Seite drumherum nicht anfassen kann.',
'admin.plugins.security.permsTitle': 'Was die Berechtigungen bedeuten',
- 'admin.plugins.security.permsBody': 'Die Berechtigungen, die dir vor der Installation angezeigt werden, sind eine harte Obergrenze, die TREK zur Laufzeit durchsetzt — ein Plugin kann buchstäblich nichts tun, was nicht auf der Liste steht. Aber sie sagen dir, was ein Plugin kann, nicht was es tatsächlich tut. Ein Plugin, das deine Reisen lesen und einen Server erreichen darf, kann deine Reisen an diesen Server schicken — lies also die Berechtigungen und die Zielhosts, nicht nur die Beschreibung.',
+ 'admin.plugins.security.permsBody':
+ 'Die Berechtigungen, die dir vor der Installation angezeigt werden, sind eine harte Obergrenze, die TREK zur Laufzeit durchsetzt — ein Plugin kann buchstäblich nichts tun, was nicht auf der Liste steht. Aber sie sagen dir, was ein Plugin kann, nicht was es tatsächlich tut. Ein Plugin, das deine Reisen lesen und einen Server erreichen darf, kann deine Reisen an diesen Server schicken — lies also die Berechtigungen und die Zielhosts, nicht nur die Beschreibung.',
'admin.plugins.security.limitsTitle': 'Was wir nicht garantieren können',
- 'admin.plugins.security.limitsBody': 'Die Isolation ist eine starke Software-Grenze, keine absolute. Ein Plugin handelt mit genau den Rechten, die du freigibst — innerhalb dieser Rechte kann es sich anders verhalten als seine Beschreibung nahelegt, und es kann Daten, die es legitim hat, an die von ihm deklarierten Hosts senden. TREK liest oder bewertet nicht, was der Code eines Plugins tatsächlich tut.',
+ 'admin.plugins.security.limitsBody':
+ 'Die Isolation ist eine starke Software-Grenze, keine absolute. Ein Plugin handelt mit genau den Rechten, die du freigibst — innerhalb dieser Rechte kann es sich anders verhalten als seine Beschreibung nahelegt, und es kann Daten, die es legitim hat, an die von ihm deklarierten Hosts senden. TREK liest oder bewertet nicht, was der Code eines Plugins tatsächlich tut.',
'admin.plugins.security.worstTitle': 'Der schlimmste Fall',
- 'admin.plugins.security.worstBody': 'Ein bösartiges Plugin, das du einschaltest, kann die Daten und Verbindungen missbrauchen, die du ihm gegeben hast — etwa die Reisen abgreifen, die es lesen darf. Es kann keine Passwörter stehlen, keinen Admin-Login fälschen, keine Befehle auf deinem Server ausführen und keine Daten erreichen, die du nicht freigegeben hast. Der Schaden bleibt in dem, was du freigegeben hast, und das Ausschalten des Plugins stoppt ihn.',
+ 'admin.plugins.security.worstBody':
+ 'Ein bösartiges Plugin, das du einschaltest, kann die Daten und Verbindungen missbrauchen, die du ihm gegeben hast — etwa die Reisen abgreifen, die es lesen darf. Es kann keine Passwörter stehlen, keinen Admin-Login fälschen, keine Befehle auf deinem Server ausführen und keine Daten erreichen, die du nicht freigegeben hast. Der Schaden bleibt in dem, was du freigegeben hast, und das Ausschalten des Plugins stoppt ihn.',
'admin.plugins.security.reviewedTitle': 'Was „Geprüft" bedeutet',
- 'admin.plugins.security.reviewedBody': 'Ein geprüftes Plugin wurde bei jeder Version von einem TREK-Maintainer manuell auf Schadsoftware gescannt — geprüft auf feindlichen Code, nicht darauf, ob es gut funktioniert. Es ist kein Versprechen, dass das Plugin harmlos ist.',
+ 'admin.plugins.security.reviewedBody':
+ 'Ein geprüftes Plugin wurde bei jeder Version von einem TREK-Maintainer manuell auf Schadsoftware gescannt — geprüft auf feindlichen Code, nicht darauf, ob es gut funktioniert. Es ist kein Versprechen, dass das Plugin harmlos ist.',
'admin.plugins.security.trustTitle': 'Das Fazit',
- 'admin.plugins.security.trustBody': 'Ein Plugin zu installieren ist wie jede fremde App zu installieren: Füge nur Code von Autoren hinzu, denen du vertraust, und prüfe ihn im Zweifel zuerst selbst. TREK übernimmt keine Verantwortung für Plugins von Drittanbietern.',
+ 'admin.plugins.security.trustBody':
+ 'Ein Plugin zu installieren ist wie jede fremde App zu installieren: Füge nur Code von Autoren hinzu, denen du vertraust, und prüfe ihn im Zweifel zuerst selbst. TREK übernimmt keine Verantwortung für Plugins von Drittanbietern.',
'admin.plugins.runtimeOn': 'Laufzeit aktiv',
'admin.plugins.tabDiscover': 'Entdecken',
'admin.plugins.searchPlaceholder': 'Plugins durchsuchen…',
@@ -263,11 +303,36 @@ const admin: TranslationStrings = {
'admin.plugins.restarted': 'Plugin neu gestartet',
'admin.plugins.cap.readsTrips': 'Liest deine Reisen',
'admin.plugins.cap.readsUsers': 'Liest Basis-Profile',
+ 'admin.plugins.cap.readsCosts': 'Liest deine Ausgaben',
+ 'admin.plugins.cap.readsPacking': 'Liest Packlisten',
+ 'admin.plugins.cap.readsFiles': 'Liest Reise-Dateien',
+ 'admin.plugins.cap.writesCosts': 'Fügt Ausgaben hinzu',
+ 'admin.plugins.cap.writesPlaces': 'Bearbeitet Orte',
+ 'admin.plugins.cap.writesDays': 'Bearbeitet Tage',
+ 'admin.plugins.cap.writesItinerary': 'Bearbeitet Reiseplan',
+ 'admin.plugins.cap.writesTrips': 'Bearbeitet Reisen',
+ 'admin.plugins.cap.metadata': 'Ergänzt Metadaten',
'admin.plugins.cap.widget': 'Dashboard-Widget',
'admin.plugins.cap.heroWidget': 'Boarding-Pass-Widget',
+ 'admin.plugins.cap.placeSlot': 'Ortsdetails',
'admin.plugins.cap.realtime': 'Echtzeit-Updates',
'admin.plugins.cap.photos': 'Liefert Fotos',
'admin.plugins.cap.calendar': 'Liefert Kalender-Events',
+ 'admin.plugins.cap.placeDetails': 'Reichert Orte an',
+ 'admin.plugins.cap.warnings': 'Meldet Probleme',
+ 'admin.plugins.cap.events': 'Reagiert auf Aktivität',
+ 'admin.plugins.cap.requiresAddon': 'Benötigt {addon}',
+ 'admin.plugins.cap.dependsOn': 'Benötigt {id} {version}',
+ 'admin.plugins.dep.addonDisabledToast': 'Aktiviere zuerst die benötigten Addons: {addons}',
+ 'admin.plugins.dep.autoEnabled': 'Benötigte Plugins zuerst aktiviert: {plugins}',
+ 'admin.plugins.dep.downloaded': '{id} heruntergeladen',
+ 'admin.plugins.dep.resolveTitle': 'Fehlende Abhängigkeiten',
+ 'admin.plugins.dep.resolveBody': '„{name}“ benötigt diese Plugins, bevor es aktiviert werden kann.',
+ 'admin.plugins.dep.requires': 'Benötigt {version}',
+ 'admin.plugins.dep.mismatch': 'Benötigt {wanted} — installiert ist {installed}',
+ 'admin.plugins.dep.download': 'Herunterladen',
+ 'admin.plugins.dep.update': 'Aktualisieren',
+ 'admin.plugins.dep.resolveHint': 'Lädt die neueste kompatible Version samt eigener Abhängigkeiten herunter.',
'admin.plugins.accessTitle': 'Worauf es zugreift',
'admin.plugins.connectsTitle': 'Verbindet sich mit',
'admin.plugins.detailsTitle': 'Details',
@@ -440,7 +505,8 @@ const admin: TranslationStrings = {
'admin.addons.catalog.journey.name': 'Journey',
'admin.addons.catalog.journey.description': 'Reise-Tracking & Tagebuch mit Check-ins, Fotos und Tagesberichten',
'admin.addons.catalog.collections.name': 'Sammlungen',
- 'admin.addons.catalog.collections.description': 'Persönliche Orte-Bibliothek — speichere Orte aus Reisen in benannten Listen, kopiere sie in jede Reise, teile sie mit anderen',
+ 'admin.addons.catalog.collections.description':
+ 'Persönliche Orte-Bibliothek — speichere Orte aus Reisen in benannten Listen, kopiere sie in jede Reise, teile sie mit anderen',
'admin.passkey.title': 'Passkey-Anmeldung',
'admin.passkey.cardHint': 'Erlaube Benutzern die Anmeldung mit Passkeys (WebAuthn). Standardmäßig deaktiviert.',
'admin.passkey.login': 'Passkey-Anmeldung aktivieren',
@@ -478,7 +544,8 @@ const admin: TranslationStrings = {
'admin.group.maintenance': 'Wartung',
'admin.invite.tripLabel': 'Zu Trip hinzufügen (optional)',
'admin.invite.tripNone': 'Kein Trip',
- 'admin.invite.tripHint': 'Der neue Nutzer wird automatisch zu diesem Trip hinzugefügt, wenn er sich über den Link registriert.',
+ 'admin.invite.tripHint':
+ 'Der neue Nutzer wird automatisch zu diesem Trip hinzugefügt, wenn er sich über den Link registriert.',
'admin.invite.boundTo': 'fügt zu {trip} hinzu',
};
export default admin;
diff --git a/shared/src/i18n/de/budget.ts b/shared/src/i18n/de/budget.ts
index 0cac170b4..a314a0ed7 100644
--- a/shared/src/i18n/de/budget.ts
+++ b/shared/src/i18n/de/budget.ts
@@ -52,6 +52,9 @@ const budget: TranslationStrings = {
'costs.nothingOwed': 'Dir wird nichts geschuldet',
'costs.yourShare': 'Dein Anteil',
'costs.youPaid': 'Du zahltest',
+ 'costs.outstanding': 'Ausstehender Betrag',
+ 'costs.outstandingSub': 'Ausgaben noch ohne Zahler',
+ 'costs.outstandingItems': 'Ausgaben ohne Zahler',
'costs.expenses': 'Ausgaben',
'costs.entries': '{count} Einträge',
'costs.searchPlaceholder': 'Ausgaben suchen…',
@@ -119,9 +122,9 @@ const budget: TranslationStrings = {
'costs.unfinishedHint': 'Nur Gesamtsumme — noch nicht abgerechnet',
'costs.tapToInclude': 'Zum Einbeziehen tippen',
'costs.amount': 'Betrag',
- 'costs.split': "Aufteilen",
- 'costs.splitEqually': "Gleichmäßig",
- 'costs.splitCustom': "Individuell",
- 'costs.splitTicket': "Beleg",
+ 'costs.split': 'Aufteilen',
+ 'costs.splitEqually': 'Gleichmäßig',
+ 'costs.splitCustom': 'Individuell',
+ 'costs.splitTicket': 'Beleg',
};
export default budget;
diff --git a/shared/src/i18n/de/collection.ts b/shared/src/i18n/de/collection.ts
index 0ed133dc6..a10065cd4 100644
--- a/shared/src/i18n/de/collection.ts
+++ b/shared/src/i18n/de/collection.ts
@@ -49,7 +49,8 @@ const collection: TranslationStrings = {
'collections.editList': 'Umbenennen',
'collections.listMenu': 'Listenoptionen',
'collections.deleteList': 'Liste löschen',
- 'collections.deleteListConfirm': 'Dies löscht die Liste und alle gespeicherten Orte endgültig. Das kann nicht rückgängig gemacht werden.',
+ 'collections.deleteListConfirm':
+ 'Dies löscht die Liste und alle gespeicherten Orte endgültig. Das kann nicht rückgängig gemacht werden.',
'collections.listName': 'Listenname',
'collections.listNamePlaceholder': 'z. B. Tokio 2025',
'collections.listColor': 'Farbe',
@@ -61,7 +62,8 @@ const collection: TranslationStrings = {
'collections.empty.noMatchTitle': 'Keine Treffer',
'collections.empty.noMatchText': 'Keine gespeicherten Orte passen zu deinem Filter oder deiner Suche.',
'collections.empty.firstTitle': 'Starte deine erste Sammlung',
- 'collections.empty.firstText': 'Erstelle eine Liste, um Orte zu speichern, die du dir über Reisen hinweg merken willst.',
+ 'collections.empty.firstText':
+ 'Erstelle eine Liste, um Orte zu speichern, die du dir über Reisen hinweg merken willst.',
'collections.view.grid': 'Raster',
'collections.view.list': 'Liste',
@@ -127,7 +129,8 @@ const collection: TranslationStrings = {
'collections.share.memberHint': 'Nur der Listenbesitzer kann Personen einladen oder entfernen.',
'collections.share.cancel': 'Abbrechen',
'collections.share.leave': 'Liste verlassen',
- 'collections.share.leaveConfirm': 'Diese geteilte Liste verlassen? Du verlierst den Zugriff, bis du erneut eingeladen wirst.',
+ 'collections.share.leaveConfirm':
+ 'Diese geteilte Liste verlassen? Du verlierst den Zugriff, bis du erneut eingeladen wirst.',
'collections.share.left': 'Du hast die Liste verlassen',
'collections.share.remove': 'Entfernen',
diff --git a/shared/src/i18n/de/help.ts b/shared/src/i18n/de/help.ts
index 12af967ca..7655797b4 100644
--- a/shared/src/i18n/de/help.ts
+++ b/shared/src/i18n/de/help.ts
@@ -6,8 +6,7 @@ const help: TranslationStrings = {
'help.contents': 'Inhalt',
'help.noResults': 'Keine passenden Seiten.',
'help.errorTitle': 'Seite konnte nicht geladen werden',
- 'help.errorBody':
- 'Die Hilfe-Inhalte kommen aus dem TREK-Wiki. Prüfe deine Verbindung und versuch es erneut.',
+ 'help.errorBody': 'Die Hilfe-Inhalte kommen aus dem TREK-Wiki. Prüfe deine Verbindung und versuch es erneut.',
};
export default help;
diff --git a/shared/src/i18n/de/index.ts b/shared/src/i18n/de/index.ts
index b9af5461f..eef4c74aa 100644
--- a/shared/src/i18n/de/index.ts
+++ b/shared/src/i18n/de/index.ts
@@ -5,11 +5,13 @@ import backup from './backup';
import budget from './budget';
import categories from './categories';
import collab from './collab';
+import collection from './collection';
import common from './common';
import dashboard from './dashboard';
import day from './day';
import dayplan from './dayplan';
import files from './files';
+import help from './help';
import inspector from './inspector';
import journey from './journey';
import login from './login';
@@ -39,8 +41,6 @@ import trip from './trip';
import trips from './trips';
import undo from './undo';
import vacay from './vacay';
-import collection from './collection';
-import help from './help';
const locale = {
...common,
diff --git a/shared/src/i18n/de/login.ts b/shared/src/i18n/de/login.ts
index 56ca80ba1..d4046d256 100644
--- a/shared/src/i18n/de/login.ts
+++ b/shared/src/i18n/de/login.ts
@@ -86,8 +86,9 @@ const login: TranslationStrings = {
'login.resetPasswordFailed': 'Zurücksetzen fehlgeschlagen. Der Link ist möglicherweise abgelaufen.',
'login.passkey.signIn': 'Mit Passkey anmelden',
'login.passkey.failed': 'Anmeldung mit Passkey fehlgeschlagen. Bitte erneut versuchen.',
- 'login.insecureCookie.title': "Login hält über HTTP nicht",
- 'login.insecureCookie.body': "Du verbindest dich über reines HTTP, daher verwirft dein Browser TREKs sicheren Session-Cookie — die nächste Anfrage scheitert mit „Access token required\". Lösung: HTTPS nutzen, oder für ein Heim-Setup COOKIE_SECURE=false setzen.",
- 'login.insecureCookie.link': "Zur Troubleshooting-Anleitung",
+ 'login.insecureCookie.title': 'Login hält über HTTP nicht',
+ 'login.insecureCookie.body':
+ 'Du verbindest dich über reines HTTP, daher verwirft dein Browser TREKs sicheren Session-Cookie — die nächste Anfrage scheitert mit „Access token required". Lösung: HTTPS nutzen, oder für ein Heim-Setup COOKIE_SECURE=false setzen.',
+ 'login.insecureCookie.link': 'Zur Troubleshooting-Anleitung',
};
export default login;
diff --git a/shared/src/i18n/de/members.ts b/shared/src/i18n/de/members.ts
index ea47e217b..37fee68e1 100644
--- a/shared/src/i18n/de/members.ts
+++ b/shared/src/i18n/de/members.ts
@@ -25,7 +25,8 @@ const members: TranslationStrings = {
'members.transferError': 'Übertragung fehlgeschlagen',
'members.guests': 'Gäste',
'members.guest': 'Gast',
- 'members.guestsHint': 'Personen ohne Account. Sie können Kosten, Gepäck und Aufgaben zugewiesen bekommen, sich aber nicht anmelden.',
+ 'members.guestsHint':
+ 'Personen ohne Account. Sie können Kosten, Gepäck und Aufgaben zugewiesen bekommen, sich aber nicht anmelden.',
'members.addGuest': 'Gast hinzufügen',
'members.guestNamePlaceholder': 'Name des Gasts',
'members.guestAdded': 'Gast hinzugefügt',
diff --git a/shared/src/i18n/de/places.ts b/shared/src/i18n/de/places.ts
index b48ca438c..2abf2b4cd 100644
--- a/shared/src/i18n/de/places.ts
+++ b/shared/src/i18n/de/places.ts
@@ -24,8 +24,8 @@ const places: TranslationStrings = {
'places.kmlImportNoneSelected': 'Wähle mindestens einen Typ aus.',
'places.selectionCount': '{count} ausgewählt',
'places.deleteSelected': 'Auswahl löschen',
- 'places.changeCategory': "Kategorie ändern",
- 'places.categoryChanged': "{count} Orte aktualisiert",
+ 'places.changeCategory': 'Kategorie ändern',
+ 'places.categoryChanged': '{count} Orte aktualisiert',
'places.kmlKmzImported': '{count} Orte aus KMZ/KML importiert',
'places.urlResolved': 'Ort aus URL importiert',
'places.importList': 'Listenimport',
diff --git a/shared/src/i18n/de/settings.ts b/shared/src/i18n/de/settings.ts
index acbb3567a..bcc201521 100644
--- a/shared/src/i18n/de/settings.ts
+++ b/shared/src/i18n/de/settings.ts
@@ -339,11 +339,13 @@ const settings: TranslationStrings = {
'settings.aiParsing.providerAnthropic': 'Anthropic',
'settings.aiParsing.model': 'Modell',
'settings.aiParsing.baseUrl': 'Basis-URL',
- 'settings.aiParsing.baseUrlHint': 'Wo das Modell läuft — ein lokaler Ollama-Server oder ein OpenAI-kompatibler Endpunkt.',
+ 'settings.aiParsing.baseUrlHint':
+ 'Wo das Modell läuft — ein lokaler Ollama-Server oder ein OpenAI-kompatibler Endpunkt.',
'settings.aiParsing.apiKey': 'API-Schlüssel',
'settings.aiParsing.apiKeyHint': 'Verschlüsselt gespeichert. Leer lassen, um den aktuellen Schlüssel zu behalten.',
'settings.aiParsing.multimodal': 'Dokumente als Bilder senden',
- 'settings.aiParsing.multimodalHint': 'Für Modelle mit Bildverständnis — sendet das Original-PDF statt extrahiertem Text.',
+ 'settings.aiParsing.multimodalHint':
+ 'Für Modelle mit Bildverständnis — sendet das Original-PDF statt extrahiertem Text.',
'settings.aiParsing.toast.saved': 'KI-Einstellungen gespeichert',
'settings.aiParsing.toast.saveError': 'KI-Einstellungen konnten nicht gespeichert werden',
'settings.tabs.appearance': 'Erscheinungsbild',
@@ -362,7 +364,8 @@ const settings: TranslationStrings = {
'settings.appearance.contrastLow': 'Niedriger Kontrast',
'settings.appearance.readability': 'Lesbarkeit',
'settings.appearance.transparency': 'Transparenz',
- 'settings.appearance.transparencyHint': 'Glasige, durchscheinende Flächen. Aus = solide, kontrastreichere Hintergründe.',
+ 'settings.appearance.transparencyHint':
+ 'Glasige, durchscheinende Flächen. Aus = solide, kontrastreichere Hintergründe.',
'settings.appearance.reduceMotion': 'Bewegung reduzieren',
'settings.appearance.reduceMotionHint': 'Animationen und Übergänge minimieren.',
'settings.appearance.density': 'Dichte',
@@ -415,10 +418,13 @@ const settings: TranslationStrings = {
'settings.offline.cache.title': 'Offline-Cache',
'settings.offline.mode.title': 'Offline-Modus',
'settings.offline.mode.force': 'Offline-Modus erzwingen',
- 'settings.offline.mode.forceHint': 'Nur mit zwischengespeicherten Daten arbeiten und Änderungen in die Warteschlange legen. Zum Verbinden und Synchronisieren ausschalten.',
- 'settings.offline.mode.active': 'Offline-Modus ist an — deine Änderungen werden gesammelt und beim Ausschalten synchronisiert.',
+ 'settings.offline.mode.forceHint':
+ 'Nur mit zwischengespeicherten Daten arbeiten und Änderungen in die Warteschlange legen. Zum Verbinden und Synchronisieren ausschalten.',
+ 'settings.offline.mode.active':
+ 'Offline-Modus ist an — deine Änderungen werden gesammelt und beim Ausschalten synchronisiert.',
'settings.offline.prepare.title': 'Für Offline vorbereiten',
- 'settings.offline.prepare.hint': 'Lade alles Nötige herunter — Reisedaten, Dokumente und Kartenkacheln — bevor du die Verbindung verlierst.',
+ 'settings.offline.prepare.hint':
+ 'Lade alles Nötige herunter — Reisedaten, Dokumente und Kartenkacheln — bevor du die Verbindung verlierst.',
'settings.offline.prepare.button': 'Für Offline-Nutzung herunterladen',
'settings.offline.prepare.running': 'Lädt herunter…',
'settings.offline.prepare.done': 'Bereit für die Offline-Nutzung',
@@ -429,20 +435,24 @@ const settings: TranslationStrings = {
'settings.offline.resyncing': 'Synchronisiert…',
'settings.offline.storage.title': 'Was offline gespeichert wird',
'settings.offline.storage.tiles': 'Kartenkacheln offline speichern',
- 'settings.offline.storage.tilesHint': 'Kartenkacheln brauchen den meisten Speicher. Schalte dies aus, um nur Reisedaten und Dokumente offline zu behalten.',
+ 'settings.offline.storage.tilesHint':
+ 'Kartenkacheln brauchen den meisten Speicher. Schalte dies aus, um nur Reisedaten und Dokumente offline zu behalten.',
'settings.offline.storage.tripsTitle': 'Reisen',
'settings.offline.storage.tripOn': 'Offline gespeichert',
'settings.offline.storage.tripOff': 'Nicht gespeichert',
'settings.offline.clear': 'Cache leeren',
- 'settings.offline.clearConfirm': 'Alle offline gespeicherten Reisedaten löschen? Du kannst jederzeit online neu synchronisieren.',
+ 'settings.offline.clearConfirm':
+ 'Alle offline gespeicherten Reisedaten löschen? Du kannst jederzeit online neu synchronisieren.',
'settings.offline.stats.trips': 'Zwischengespeicherte Reisen',
'settings.offline.stats.pending': 'Ausstehende Änderungen',
'settings.offline.stats.failed': 'Fehlgeschlagene Änderungen',
'settings.offline.stats.conflicts': 'Konflikte',
- 'settings.offline.empty': 'Noch keine Reisen zwischengespeichert. Verbinde dich mit dem Internet zum Synchronisieren.',
+ 'settings.offline.empty':
+ 'Noch keine Reisen zwischengespeichert. Verbinde dich mit dem Internet zum Synchronisieren.',
'settings.offline.loading': 'Lädt…',
'settings.offline.conflicts.title': 'Synchronisierungskonflikte',
- 'settings.offline.conflicts.hint': 'Offline vorgenommene Änderungen kollidieren mit neueren Änderungen auf dem Server. Wähle, welche Version behalten werden soll.',
+ 'settings.offline.conflicts.hint':
+ 'Offline vorgenommene Änderungen kollidieren mit neueren Änderungen auf dem Server. Wähle, welche Version behalten werden soll.',
'settings.offline.conflicts.keepMine': 'Meine behalten',
'settings.offline.conflicts.keepServer': 'Server behalten',
'settings.offline.conflicts.mine': 'Deine Version',
diff --git a/shared/src/i18n/de/trip.ts b/shared/src/i18n/de/trip.ts
index bb0dd26a4..cf7d3a3e7 100644
--- a/shared/src/i18n/de/trip.ts
+++ b/shared/src/i18n/de/trip.ts
@@ -28,7 +28,8 @@ const trip: TranslationStrings = {
'trip.confirm.deletePlaces': '{count} Orte löschen?',
'trip.toast.placesDeleted': '{count} Orte gelöscht',
'trip.invite.linkTitle': 'Trip-Einladungslink',
- 'trip.invite.linkHint': 'Wer einen TREK-Account hat und diesen Link öffnet, tritt dem Trip als Mitglied bei. Neu generieren macht den alten Link ungültig.',
+ 'trip.invite.linkHint':
+ 'Wer einen TREK-Account hat und diesen Link öffnet, tritt dem Trip als Mitglied bei. Neu generieren macht den alten Link ungültig.',
'trip.invite.create': 'Einladungslink erstellen',
'trip.invite.regenerate': 'Neu generieren',
'trip.invite.disable': 'Deaktivieren',
diff --git a/shared/src/i18n/de/undo.ts b/shared/src/i18n/de/undo.ts
index bc38f15ce..f78b2967e 100644
--- a/shared/src/i18n/de/undo.ts
+++ b/shared/src/i18n/de/undo.ts
@@ -9,7 +9,7 @@ const undo: TranslationStrings = {
'undo.optimize': 'Route optimiert',
'undo.deletePlace': 'Ort gelöscht',
'undo.deletePlaces': 'Orte gelöscht',
- 'undo.changeCategory': "Kategorie geändert",
+ 'undo.changeCategory': 'Kategorie geändert',
'undo.moveDay': 'Ort zu anderem Tag verschoben',
'undo.lock': 'Ortssperre umgeschaltet',
'undo.importGpx': 'GPX-Import',
diff --git a/shared/src/i18n/en/admin.ts b/shared/src/i18n/en/admin.ts
index 1b7ddb72e..2d09d6238 100644
--- a/shared/src/i18n/en/admin.ts
+++ b/shared/src/i18n/en/admin.ts
@@ -136,6 +136,8 @@ const admin: TranslationStrings = {
'admin.recommended': 'Recommended',
'admin.weatherKey': 'OpenWeatherMap API Key',
'admin.weatherKeyHint': 'For weather data. Free at openweathermap.org',
+ 'admin.unsplashKey': 'Unsplash API Key',
+ 'admin.unsplashKeyHint': 'For image search. Free at unsplash.com/developers',
'admin.validateKey': 'Test',
'admin.keyValid': 'Connected',
'admin.keyInvalid': 'Invalid',
@@ -214,6 +216,11 @@ const admin: TranslationStrings = {
'admin.tabs.plugins': 'Plugins',
'admin.plugins.rescan': 'Rescan',
'admin.plugins.rescanned': 'Rescanned the plugins folder',
+ 'admin.plugins.upload': 'Upload plugin',
+ 'admin.plugins.dropToUpload': 'Drop a plugin .zip to install',
+ 'admin.plugins.uploaded': 'Plugin “{name}” uploaded — activate it to run',
+ 'admin.plugins.sideloaded': 'Sideloaded',
+ 'admin.plugins.sideloadedHint': 'Uploaded manually — not from the registry, unsigned and unreviewed',
'admin.plugins.browse': 'Browse plugins',
'admin.plugins.installed': 'Installed',
'admin.plugins.install': 'Install',
@@ -228,11 +235,13 @@ const admin: TranslationStrings = {
'admin.plugins.noErrors': 'No errors logged.',
'admin.plugins.uninstalled': 'Plugin uninstalled',
'admin.plugins.uninstallTitle': 'Uninstall plugin?',
- 'admin.plugins.uninstallBody': 'This stops the plugin, removes its code, and deletes all of its data. This cannot be undone.',
+ 'admin.plugins.uninstallBody':
+ 'This stops the plugin, removes its code, and deletes all of its data. This cannot be undone.',
'admin.plugins.status.starting': 'Starting…',
'admin.plugins.type.widget': 'Widget',
'admin.plugins.type.page': 'Page',
'admin.plugins.type.integration': 'Integration',
+ 'admin.plugins.type.trip-page': 'Trip page',
'admin.plugins.reviewed': 'Reviewed',
'admin.plugins.unreviewed': 'Not reviewed',
'admin.plugins.updated': 'Plugin updated',
@@ -242,10 +251,12 @@ const admin: TranslationStrings = {
'admin.plugins.title': 'Plugins',
'admin.plugins.subtitle': 'Install and manage third-party plugins on your instance.',
'admin.plugins.disabledTitle': 'Plugins are disabled',
- 'admin.plugins.disabledBody': 'The plugin runtime is turned off (TREK_PLUGINS_ENABLED). No plugin can run until an admin enables it in the server configuration.',
+ 'admin.plugins.disabledBody':
+ 'The plugin runtime is turned off (TREK_PLUGINS_ENABLED). No plugin can run until an admin enables it in the server configuration.',
'admin.plugins.empty': 'No plugins installed yet.',
'admin.plugins.loadError': 'Could not load plugins.',
- 'admin.plugins.scaffoldNote': 'Plugin installation and activation are coming in a later update. This panel currently lists installed plugins only.',
+ 'admin.plugins.scaffoldNote':
+ 'Plugin installation and activation are coming in a later update. This panel currently lists installed plugins only.',
'admin.plugins.status.active': 'Active',
'admin.plugins.status.inactive': 'Inactive',
'admin.plugins.status.disabled': 'Disabled',
@@ -268,32 +279,52 @@ const admin: TranslationStrings = {
'admin.plugins.perm.db:own': 'Store its own data in an isolated database',
'admin.plugins.perm.db:read:trips': 'Read trips the acting user can access',
'admin.plugins.perm.db:read:users': 'Read basic profile info (name, avatar — never credentials)',
+ 'admin.plugins.perm.db:read:costs': 'Read costs (budget items) the acting user can access',
+ 'admin.plugins.perm.db:read:packing': 'Read packing lists of trips the acting user can access',
+ 'admin.plugins.perm.db:read:files': 'Read files of trips the acting user can access',
+ 'admin.plugins.perm.db:write:costs': 'Create costs (budget items) on trips the acting user can edit',
+ 'admin.plugins.perm.db:write:places': 'Add, edit and remove places on trips the acting user can edit',
+ 'admin.plugins.perm.db:write:days': 'Add, edit and remove days on trips the acting user can edit',
+ 'admin.plugins.perm.db:write:itinerary': 'Assign and remove places on days of trips the acting user can edit',
+ 'admin.plugins.perm.db:write:trips': 'Edit trip details (title, dates, currency…) on trips the acting user can edit',
+ 'admin.plugins.perm.db:meta': 'Attach its own private data to trips, places and days the acting user can access',
'admin.plugins.perm.ws:broadcast:trip': 'Send real-time updates to trip members',
'admin.plugins.perm.ws:broadcast:user': 'Send real-time updates to individual users',
'admin.plugins.perm.hook:photo-provider': 'Provide photos to Memories',
'admin.plugins.perm.hook:calendar-source': 'Provide events to the calendar',
+ 'admin.plugins.perm.hook:place-detail-provider': 'Contribute extra details (reviews, ratings, links) to a place',
+ 'admin.plugins.perm.hook:trip-warning-provider': 'Raise validation warnings on a trip (shown in the planner)',
+ 'admin.plugins.perm.events:subscribe': 'React to core activity events (event name + trip only, never the content)',
'admin.plugins.perm.http:outbound': 'Make outbound requests to its declared hosts',
'admin.plugins.updateConsentTitle': 'This update needs new permissions',
- 'admin.plugins.updateConsentBody': '{name} v{version} is asking for rights you haven\'t granted yet. The new version is installed but stays off until you approve it.',
+ 'admin.plugins.updateConsentBody':
+ "{name} v{version} is asking for rights you haven't granted yet. The new version is installed but stays off until you approve it.",
'admin.plugins.updateNewPermissions': 'Newly requested permissions',
'admin.plugins.updateNewEgress': 'New outbound connections',
'admin.plugins.updateApprove': 'Approve & turn on',
'admin.plugins.updateLater': 'Keep off for now',
'admin.plugins.updateKeptOff': 'Update installed — left off until you approve the new permissions',
- 'admin.plugins.reviewedMeaning': '"Reviewed" means a TREK maintainer scanned this plugin for malware on each version — not for quality or whether it works. It is not a guarantee that a plugin is harmless.',
+ 'admin.plugins.reviewedMeaning':
+ '"Reviewed" means a TREK maintainer scanned this plugin for malware on each version — not for quality or whether it works. It is not a guarantee that a plugin is harmless.',
'admin.plugins.security.title': 'How plugins are contained — and the limits',
'admin.plugins.security.isolationTitle': 'Every plugin runs boxed in',
- 'admin.plugins.security.isolationBody': 'A plugin runs as its own locked-down process that can only read its own files. It cannot read your database, your login secret or your encryption key, cannot start other programs, and cannot write files anywhere. Its interface runs in a sealed browser frame that can\'t read your session cookie or touch the TREK page around it.',
+ 'admin.plugins.security.isolationBody':
+ "A plugin runs as its own locked-down process that can only read its own files. It cannot read your database, your login secret or your encryption key, cannot start other programs, and cannot write files anywhere. Its interface runs in a sealed browser frame that can't read your session cookie or touch the TREK page around it.",
'admin.plugins.security.permsTitle': 'What the permissions mean',
- 'admin.plugins.security.permsBody': 'The permissions shown before you install are a hard limit that TREK enforces while the plugin runs — it literally cannot do anything that isn\'t on the list. But they tell you what a plugin can do, not what it actually does. A plugin allowed to read your trips and reach a server can send your trips to that server, so read the permissions and the outbound hosts, not just the description.',
- 'admin.plugins.security.limitsTitle': 'What we can\'t promise',
- 'admin.plugins.security.limitsBody': 'The isolation is a strong software boundary, not an absolute one. A plugin acts with exactly the rights you approve, so within those rights it can behave differently than its description suggests, and it can send data it legitimately holds to the hosts it declared. TREK does not read or judge what a plugin\'s code actually does.',
+ 'admin.plugins.security.permsBody':
+ "The permissions shown before you install are a hard limit that TREK enforces while the plugin runs — it literally cannot do anything that isn't on the list. But they tell you what a plugin can do, not what it actually does. A plugin allowed to read your trips and reach a server can send your trips to that server, so read the permissions and the outbound hosts, not just the description.",
+ 'admin.plugins.security.limitsTitle': "What we can't promise",
+ 'admin.plugins.security.limitsBody':
+ "The isolation is a strong software boundary, not an absolute one. A plugin acts with exactly the rights you approve, so within those rights it can behave differently than its description suggests, and it can send data it legitimately holds to the hosts it declared. TREK does not read or judge what a plugin's code actually does.",
'admin.plugins.security.worstTitle': 'The worst case',
- 'admin.plugins.security.worstBody': 'A hostile plugin you turn on can misuse the data and connections you granted it — for example, leak the trips it is allowed to read. It cannot steal passwords, forge an admin login, run commands on your server, or reach data you didn\'t grant. The damage stays inside what you approved, and turning the plugin off stops it.',
+ 'admin.plugins.security.worstBody':
+ "A hostile plugin you turn on can misuse the data and connections you granted it — for example, leak the trips it is allowed to read. It cannot steal passwords, forge an admin login, run commands on your server, or reach data you didn't grant. The damage stays inside what you approved, and turning the plugin off stops it.",
'admin.plugins.security.reviewedTitle': 'What "Reviewed" means',
- 'admin.plugins.security.reviewedBody': 'A reviewed plugin was manually scanned for malware by a TREK maintainer on each version — checked for hostile code, not for whether it works well. It is not a promise that the plugin is harmless.',
+ 'admin.plugins.security.reviewedBody':
+ 'A reviewed plugin was manually scanned for malware by a TREK maintainer on each version — checked for hostile code, not for whether it works well. It is not a promise that the plugin is harmless.',
'admin.plugins.security.trustTitle': 'The bottom line',
- 'admin.plugins.security.trustBody': 'Installing a plugin is like installing any third-party app: only add code from authors you trust, and when in doubt, inspect it yourself first. TREK takes no responsibility for third-party plugins.',
+ 'admin.plugins.security.trustBody':
+ 'Installing a plugin is like installing any third-party app: only add code from authors you trust, and when in doubt, inspect it yourself first. TREK takes no responsibility for third-party plugins.',
'admin.plugins.runtimeOn': 'Runtime on',
'admin.plugins.tabDiscover': 'Discover',
'admin.plugins.searchPlaceholder': 'Search plugins…',
@@ -315,11 +346,36 @@ const admin: TranslationStrings = {
'admin.plugins.restarted': 'Plugin restarted',
'admin.plugins.cap.readsTrips': 'Reads your trips',
'admin.plugins.cap.readsUsers': 'Reads basic profiles',
+ 'admin.plugins.cap.readsCosts': 'Reads your costs',
+ 'admin.plugins.cap.readsPacking': 'Reads packing lists',
+ 'admin.plugins.cap.readsFiles': 'Reads trip files',
+ 'admin.plugins.cap.writesCosts': 'Adds costs',
+ 'admin.plugins.cap.writesPlaces': 'Edits places',
+ 'admin.plugins.cap.writesDays': 'Edits days',
+ 'admin.plugins.cap.writesItinerary': 'Edits itinerary',
+ 'admin.plugins.cap.writesTrips': 'Edits trips',
+ 'admin.plugins.cap.metadata': 'Adds metadata',
'admin.plugins.cap.widget': 'Dashboard widget',
'admin.plugins.cap.heroWidget': 'Boarding-pass widget',
+ 'admin.plugins.cap.placeSlot': 'Place detail',
'admin.plugins.cap.realtime': 'Real-time updates',
'admin.plugins.cap.photos': 'Provides photos',
'admin.plugins.cap.calendar': 'Provides calendar events',
+ 'admin.plugins.cap.placeDetails': 'Enriches places',
+ 'admin.plugins.cap.warnings': 'Flags issues',
+ 'admin.plugins.cap.events': 'Reacts to activity',
+ 'admin.plugins.cap.requiresAddon': 'Requires {addon}',
+ 'admin.plugins.cap.dependsOn': 'Needs {id} {version}',
+ 'admin.plugins.dep.addonDisabledToast': 'Enable the required addon(s) first: {addons}',
+ 'admin.plugins.dep.autoEnabled': 'Enabled required plugin(s) first: {plugins}',
+ 'admin.plugins.dep.downloaded': 'Downloaded {id}',
+ 'admin.plugins.dep.resolveTitle': 'Missing dependencies',
+ 'admin.plugins.dep.resolveBody': '“{name}” needs these plugins installed before it can be enabled.',
+ 'admin.plugins.dep.requires': 'Requires {version}',
+ 'admin.plugins.dep.mismatch': 'Needs {wanted} — {installed} is installed',
+ 'admin.plugins.dep.download': 'Download',
+ 'admin.plugins.dep.update': 'Update',
+ 'admin.plugins.dep.resolveHint': 'Downloads the latest compatible version, including its own dependencies.',
'admin.plugins.accessTitle': 'What it can access',
'admin.plugins.connectsTitle': 'Connects to',
'admin.plugins.detailsTitle': 'Details',
diff --git a/shared/src/i18n/en/budget.ts b/shared/src/i18n/en/budget.ts
index b4513bf6d..05b6e01f6 100644
--- a/shared/src/i18n/en/budget.ts
+++ b/shared/src/i18n/en/budget.ts
@@ -52,6 +52,9 @@ const budget: TranslationStrings = {
'costs.nothingOwed': 'Nothing owed to you',
'costs.yourShare': 'Your share',
'costs.youPaid': 'You paid',
+ 'costs.outstanding': 'Outstanding amount',
+ 'costs.outstandingSub': 'Expenses with no payer yet',
+ 'costs.outstandingItems': 'expenses need a payer',
'costs.expenses': 'Expenses',
'costs.entries': '{count} entries',
'costs.searchPlaceholder': 'Search expenses…',
diff --git a/shared/src/i18n/en/collection.ts b/shared/src/i18n/en/collection.ts
index 1b93e0a3c..fde23df32 100644
--- a/shared/src/i18n/en/collection.ts
+++ b/shared/src/i18n/en/collection.ts
@@ -49,7 +49,8 @@ const collection: TranslationStrings = {
'collections.editList': 'Rename',
'collections.listMenu': 'List options',
'collections.deleteList': 'Delete list',
- 'collections.deleteListConfirm': 'This permanently deletes the list and all of its saved places. This cannot be undone.',
+ 'collections.deleteListConfirm':
+ 'This permanently deletes the list and all of its saved places. This cannot be undone.',
'collections.listName': 'List name',
'collections.listNamePlaceholder': 'e.g. Tokyo 2025',
'collections.listColor': 'Colour',
diff --git a/shared/src/i18n/en/help.ts b/shared/src/i18n/en/help.ts
index 06521ae51..f2a41ea02 100644
--- a/shared/src/i18n/en/help.ts
+++ b/shared/src/i18n/en/help.ts
@@ -6,8 +6,7 @@ const help: TranslationStrings = {
'help.contents': 'Contents',
'help.noResults': 'No matching pages.',
'help.errorTitle': "Couldn't load this page",
- 'help.errorBody':
- 'The help content is fetched from the TREK wiki. Check your connection and try again.',
+ 'help.errorBody': 'The help content is fetched from the TREK wiki. Check your connection and try again.',
};
export default help;
diff --git a/shared/src/i18n/en/index.ts b/shared/src/i18n/en/index.ts
index b9af5461f..eef4c74aa 100644
--- a/shared/src/i18n/en/index.ts
+++ b/shared/src/i18n/en/index.ts
@@ -5,11 +5,13 @@ import backup from './backup';
import budget from './budget';
import categories from './categories';
import collab from './collab';
+import collection from './collection';
import common from './common';
import dashboard from './dashboard';
import day from './day';
import dayplan from './dayplan';
import files from './files';
+import help from './help';
import inspector from './inspector';
import journey from './journey';
import login from './login';
@@ -39,8 +41,6 @@ import trip from './trip';
import trips from './trips';
import undo from './undo';
import vacay from './vacay';
-import collection from './collection';
-import help from './help';
const locale = {
...common,
diff --git a/shared/src/i18n/en/login.ts b/shared/src/i18n/en/login.ts
index 398a1ab37..734cf324d 100644
--- a/shared/src/i18n/en/login.ts
+++ b/shared/src/i18n/en/login.ts
@@ -86,7 +86,8 @@ const login: TranslationStrings = {
'login.passkey.signIn': 'Sign in with a passkey',
'login.passkey.failed': 'Passkey sign-in failed. Please try again.',
'login.insecureCookie.title': "Login won't stick over HTTP",
- 'login.insecureCookie.body': "You’re connecting over plain HTTP, so your browser drops TREK’s secure session cookie — the next request fails with \"Access token required\". Fix: use HTTPS, or for a home-lab set COOKIE_SECURE=false.",
- 'login.insecureCookie.link': "Open the Troubleshooting guide",
+ 'login.insecureCookie.body':
+ 'You’re connecting over plain HTTP, so your browser drops TREK’s secure session cookie — the next request fails with "Access token required". Fix: use HTTPS, or for a home-lab set COOKIE_SECURE=false.',
+ 'login.insecureCookie.link': 'Open the Troubleshooting guide',
};
export default login;
diff --git a/shared/src/i18n/en/members.ts b/shared/src/i18n/en/members.ts
index 5d4aa898d..dffb45ed8 100644
--- a/shared/src/i18n/en/members.ts
+++ b/shared/src/i18n/en/members.ts
@@ -25,7 +25,8 @@ const members: TranslationStrings = {
'members.transferError': 'Failed to transfer ownership',
'members.guests': 'Guests',
'members.guest': 'Guest',
- 'members.guestsHint': 'People without an account. They can be assigned to costs, packing and tasks, but cannot sign in.',
+ 'members.guestsHint':
+ 'People without an account. They can be assigned to costs, packing and tasks, but cannot sign in.',
'members.addGuest': 'Add guest',
'members.guestNamePlaceholder': 'Guest name',
'members.guestAdded': 'Guest added',
diff --git a/shared/src/i18n/en/places.ts b/shared/src/i18n/en/places.ts
index 9e7e8ab85..a893c51df 100644
--- a/shared/src/i18n/en/places.ts
+++ b/shared/src/i18n/en/places.ts
@@ -24,8 +24,8 @@ const places: TranslationStrings = {
'places.kmlImportNoneSelected': 'Select at least one type to import.',
'places.selectionCount': '{count} selected',
'places.deleteSelected': 'Delete selected',
- 'places.changeCategory': "Change category",
- 'places.categoryChanged': "{count} places updated",
+ 'places.changeCategory': 'Change category',
+ 'places.categoryChanged': '{count} places updated',
'places.kmlKmzImported': '{count} places imported from KMZ/KML',
'places.urlResolved': 'Place imported from URL',
'places.importList': 'List Import',
diff --git a/shared/src/i18n/en/settings.ts b/shared/src/i18n/en/settings.ts
index ee35a5799..7d3001d74 100644
--- a/shared/src/i18n/en/settings.ts
+++ b/shared/src/i18n/en/settings.ts
@@ -356,7 +356,8 @@ const settings: TranslationStrings = {
'settings.appearance.contrastLow': 'Low contrast',
'settings.appearance.readability': 'Readability',
'settings.appearance.transparency': 'Transparency',
- 'settings.appearance.transparencyHint': 'Glassy translucent surfaces. Turn off for solid, higher-contrast backgrounds.',
+ 'settings.appearance.transparencyHint':
+ 'Glassy translucent surfaces. Turn off for solid, higher-contrast backgrounds.',
'settings.appearance.reduceMotion': 'Reduce motion',
'settings.appearance.reduceMotionHint': 'Minimize animations and transitions.',
'settings.appearance.density': 'Density',
@@ -386,7 +387,8 @@ const settings: TranslationStrings = {
'settings.appearance.group.belowHero': 'Below the hero',
'settings.appearance.group.bottomOfPage': 'Bottom of page',
'settings.appearance.sidebarHint': 'The whole right column. Turn off and the dashboard centers.',
- 'settings.appearance.densityHint': 'Compact tightens spacing and padding for a denser layout that fits more on screen.',
+ 'settings.appearance.densityHint':
+ 'Compact tightens spacing and padding for a denser layout that fits more on screen.',
'settings.appearance.textSizeAll': 'Everything',
'settings.appearance.perSize': 'Adjust each size separately',
'settings.appearance.size.large': 'Large',
@@ -409,10 +411,12 @@ const settings: TranslationStrings = {
'settings.offline.cache.title': 'Offline cache',
'settings.offline.mode.title': 'Offline mode',
'settings.offline.mode.force': 'Force offline mode',
- 'settings.offline.mode.forceHint': 'Work from cached data only and queue your changes. Turn off to reconnect and sync.',
+ 'settings.offline.mode.forceHint':
+ 'Work from cached data only and queue your changes. Turn off to reconnect and sync.',
'settings.offline.mode.active': 'Offline mode is on — your changes are queued and will sync when you turn it off.',
'settings.offline.prepare.title': 'Prepare for offline',
- 'settings.offline.prepare.hint': 'Download everything you need — trip data, documents and map tiles — before you lose connection.',
+ 'settings.offline.prepare.hint':
+ 'Download everything you need — trip data, documents and map tiles — before you lose connection.',
'settings.offline.prepare.button': 'Download for offline use',
'settings.offline.prepare.running': 'Downloading…',
'settings.offline.prepare.done': 'Ready for offline use',
@@ -423,7 +427,8 @@ const settings: TranslationStrings = {
'settings.offline.resyncing': 'Syncing…',
'settings.offline.storage.title': 'What to store offline',
'settings.offline.storage.tiles': 'Store map tiles offline',
- 'settings.offline.storage.tilesHint': 'Map tiles use the most storage. Turn this off to keep only trip data and documents offline.',
+ 'settings.offline.storage.tilesHint':
+ 'Map tiles use the most storage. Turn this off to keep only trip data and documents offline.',
'settings.offline.storage.tripsTitle': 'Trips',
'settings.offline.storage.tripOn': 'Stored offline',
'settings.offline.storage.tripOff': 'Not stored',
@@ -436,7 +441,8 @@ const settings: TranslationStrings = {
'settings.offline.empty': 'No trips cached yet. Connect to the internet to sync.',
'settings.offline.loading': 'Loading…',
'settings.offline.conflicts.title': 'Sync conflicts',
- 'settings.offline.conflicts.hint': 'Changes you made offline clash with newer changes on the server. Choose which version to keep.',
+ 'settings.offline.conflicts.hint':
+ 'Changes you made offline clash with newer changes on the server. Choose which version to keep.',
'settings.offline.conflicts.keepMine': 'Keep mine',
'settings.offline.conflicts.keepServer': 'Keep theirs',
'settings.offline.conflicts.mine': 'Your version',
diff --git a/shared/src/i18n/en/trip.ts b/shared/src/i18n/en/trip.ts
index eb17e54ca..8952c1248 100644
--- a/shared/src/i18n/en/trip.ts
+++ b/shared/src/i18n/en/trip.ts
@@ -28,7 +28,8 @@ const trip: TranslationStrings = {
'trip.confirm.deletePlaces': 'Delete {count} places?',
'trip.toast.placesDeleted': '{count} places deleted',
'trip.invite.linkTitle': 'Trip invite link',
- 'trip.invite.linkHint': 'Anyone with a TREK account who opens this link joins the trip as a member. Regenerate to invalidate the old link.',
+ 'trip.invite.linkHint':
+ 'Anyone with a TREK account who opens this link joins the trip as a member. Regenerate to invalidate the old link.',
'trip.invite.create': 'Create invite link',
'trip.invite.regenerate': 'Regenerate',
'trip.invite.disable': 'Disable',
diff --git a/shared/src/i18n/en/undo.ts b/shared/src/i18n/en/undo.ts
index 52d94aacf..ad3420201 100644
--- a/shared/src/i18n/en/undo.ts
+++ b/shared/src/i18n/en/undo.ts
@@ -9,7 +9,7 @@ const undo: TranslationStrings = {
'undo.optimize': 'Route optimized',
'undo.deletePlace': 'Place deleted',
'undo.deletePlaces': 'Places deleted',
- 'undo.changeCategory': "Category changed",
+ 'undo.changeCategory': 'Category changed',
'undo.moveDay': 'Place moved to another day',
'undo.lock': 'Place lock toggled',
'undo.importGpx': 'GPX import',
diff --git a/shared/src/i18n/es/admin.ts b/shared/src/i18n/es/admin.ts
index 0fe85b63c..b1d7de4f2 100644
--- a/shared/src/i18n/es/admin.ts
+++ b/shared/src/i18n/es/admin.ts
@@ -96,6 +96,8 @@ const admin: TranslationStrings = {
'admin.recommended': 'Recomendado',
'admin.weatherKey': 'Clave API de OpenWeatherMap',
'admin.weatherKeyHint': 'Para datos meteorológicos. Gratis en openweathermap.org',
+ 'admin.unsplashKey': 'Clave de API de Unsplash',
+ 'admin.unsplashKeyHint': 'Para la búsqueda de imágenes. Gratis en unsplash.com/developers',
'admin.validateKey': 'Probar',
'admin.keyValid': 'Conectado',
'admin.keyInvalid': 'No válida',
@@ -161,6 +163,11 @@ const admin: TranslationStrings = {
'admin.tabs.plugins': 'Plugins',
'admin.plugins.rescan': 'Volver a escanear',
'admin.plugins.rescanned': 'Carpeta de plugins reescaneada',
+ 'admin.plugins.upload': 'Subir plugin',
+ 'admin.plugins.dropToUpload': 'Suelta un .zip de plugin para instalar',
+ 'admin.plugins.uploaded': 'Plugin “{name}” subido — actívalo para ejecutarlo',
+ 'admin.plugins.sideloaded': 'Cargado manualmente',
+ 'admin.plugins.sideloadedHint': 'Subido manualmente — no proviene del registro, sin firmar ni revisar',
'admin.plugins.browse': 'Explorar plugins',
'admin.plugins.installed': 'Instalado',
'admin.plugins.install': 'Instalar',
@@ -175,11 +182,13 @@ const admin: TranslationStrings = {
'admin.plugins.noErrors': 'No hay errores registrados.',
'admin.plugins.uninstalled': 'Plugin desinstalado',
'admin.plugins.uninstallTitle': '¿Desinstalar el plugin?',
- 'admin.plugins.uninstallBody': 'Esto detiene el plugin, elimina su código y borra todos sus datos. No se puede deshacer.',
+ 'admin.plugins.uninstallBody':
+ 'Esto detiene el plugin, elimina su código y borra todos sus datos. No se puede deshacer.',
'admin.plugins.status.starting': 'Iniciando…',
'admin.plugins.type.widget': 'Widget',
'admin.plugins.type.page': 'Página',
'admin.plugins.type.integration': 'Integración',
+ 'admin.plugins.type.trip-page': 'Página de viaje',
'admin.plugins.reviewed': 'Revisado',
'admin.plugins.unreviewed': 'No revisado',
'admin.plugins.updated': 'Plugin actualizado',
@@ -189,10 +198,12 @@ const admin: TranslationStrings = {
'admin.plugins.title': 'Plugins',
'admin.plugins.subtitle': 'Instala y gestiona plugins de terceros en tu instancia.',
'admin.plugins.disabledTitle': 'Los plugins están desactivados',
- 'admin.plugins.disabledBody': 'El entorno de ejecución de plugins está apagado (TREK_PLUGINS_ENABLED). Ningún plugin puede ejecutarse hasta que un administrador lo active en la configuración del servidor.',
+ 'admin.plugins.disabledBody':
+ 'El entorno de ejecución de plugins está apagado (TREK_PLUGINS_ENABLED). Ningún plugin puede ejecutarse hasta que un administrador lo active en la configuración del servidor.',
'admin.plugins.empty': 'Aún no hay plugins instalados.',
'admin.plugins.loadError': 'No se pudieron cargar los plugins.',
- 'admin.plugins.scaffoldNote': 'La instalación y activación de plugins llegarán en una actualización posterior. Por ahora este panel solo muestra los plugins instalados.',
+ 'admin.plugins.scaffoldNote':
+ 'La instalación y activación de plugins llegarán en una actualización posterior. Por ahora este panel solo muestra los plugins instalados.',
'admin.plugins.status.active': 'Activo',
'admin.plugins.status.inactive': 'Inactivo',
'admin.plugins.status.disabled': 'Desactivado',
@@ -215,10 +226,32 @@ const admin: TranslationStrings = {
'admin.plugins.perm.db:own': 'Almacenar sus propios datos en una base de datos aislada',
'admin.plugins.perm.db:read:trips': 'Leer los viajes a los que el usuario activo tiene acceso',
'admin.plugins.perm.db:read:users': 'Leer información básica del perfil (nombre, avatar — nunca credenciales)',
+ 'admin.plugins.perm.db:read:costs':
+ 'Leer los gastos (partidas de presupuesto) a los que el usuario activo tiene acceso',
+ 'admin.plugins.perm.db:read:packing':
+ 'Leer las listas de equipaje de los viajes a los que el usuario activo tiene acceso',
+ 'admin.plugins.perm.db:read:files': 'Leer los archivos de los viajes a los que el usuario activo tiene acceso',
+ 'admin.plugins.perm.db:write:costs':
+ 'Crear gastos (partidas de presupuesto) en los viajes que el usuario activo puede editar',
+ 'admin.plugins.perm.db:write:places':
+ 'Añadir, editar y eliminar lugares en los viajes que el usuario activo puede editar',
+ 'admin.plugins.perm.db:write:days': 'Añadir, editar y eliminar días en los viajes que el usuario activo puede editar',
+ 'admin.plugins.perm.db:write:itinerary':
+ 'Asignar y quitar lugares en los días de los viajes que el usuario activo puede editar',
+ 'admin.plugins.perm.db:write:trips':
+ 'Editar los detalles del viaje (título, fechas, moneda…) en los viajes que el usuario activo puede editar',
+ 'admin.plugins.perm.db:meta':
+ 'Adjuntar sus propios datos privados a los viajes, lugares y días a los que el usuario activo tiene acceso',
'admin.plugins.perm.ws:broadcast:trip': 'Enviar actualizaciones en tiempo real a los miembros del viaje',
'admin.plugins.perm.ws:broadcast:user': 'Enviar actualizaciones en tiempo real a usuarios individuales',
'admin.plugins.perm.hook:photo-provider': 'Proporcionar fotos a la sección Fotos',
'admin.plugins.perm.hook:calendar-source': 'Proporcionar eventos al calendario',
+ 'admin.plugins.perm.hook:place-detail-provider':
+ 'Aportar detalles adicionales (reseñas, valoraciones, enlaces) a un lugar',
+ 'admin.plugins.perm.hook:trip-warning-provider':
+ 'Generar advertencias de validación en un viaje (mostradas en el planificador)',
+ 'admin.plugins.perm.events:subscribe':
+ 'Reaccionar a eventos de actividad del núcleo (solo el nombre del evento y el viaje, nunca el contenido)',
'admin.plugins.perm.http:outbound': 'Realizar solicitudes salientes a sus hosts declarados',
'admin.plugins.updateConsentTitle': 'Esta actualización necesita nuevos permisos',
'admin.plugins.updateConsentBody':
@@ -270,11 +303,36 @@ const admin: TranslationStrings = {
'admin.plugins.restarted': 'Plugin reiniciado',
'admin.plugins.cap.readsTrips': 'Lee tus viajes',
'admin.plugins.cap.readsUsers': 'Lee perfiles básicos',
+ 'admin.plugins.cap.readsCosts': 'Lee tus gastos',
+ 'admin.plugins.cap.readsPacking': 'Lee las listas de equipaje',
+ 'admin.plugins.cap.readsFiles': 'Lee los archivos del viaje',
+ 'admin.plugins.cap.writesCosts': 'Añade gastos',
+ 'admin.plugins.cap.writesPlaces': 'Edita lugares',
+ 'admin.plugins.cap.writesDays': 'Edita días',
+ 'admin.plugins.cap.writesItinerary': 'Edita itinerario',
+ 'admin.plugins.cap.writesTrips': 'Edita viajes',
+ 'admin.plugins.cap.metadata': 'Añade metadatos',
'admin.plugins.cap.widget': 'Widget del panel',
'admin.plugins.cap.heroWidget': 'Widget de tarjeta de embarque',
+ 'admin.plugins.cap.placeSlot': 'Detalle del lugar',
'admin.plugins.cap.realtime': 'Actualizaciones en tiempo real',
'admin.plugins.cap.photos': 'Proporciona fotos',
'admin.plugins.cap.calendar': 'Proporciona eventos de calendario',
+ 'admin.plugins.cap.placeDetails': 'Enriquece lugares',
+ 'admin.plugins.cap.warnings': 'Marca problemas',
+ 'admin.plugins.cap.events': 'Reacciona a la actividad',
+ 'admin.plugins.cap.requiresAddon': 'Requiere {addon}',
+ 'admin.plugins.cap.dependsOn': 'Necesita {id} {version}',
+ 'admin.plugins.dep.addonDisabledToast': 'Activa primero los complementos necesarios: {addons}',
+ 'admin.plugins.dep.autoEnabled': 'Se activaron primero los plugins necesarios: {plugins}',
+ 'admin.plugins.dep.downloaded': '{id} descargado',
+ 'admin.plugins.dep.resolveTitle': 'Dependencias faltantes',
+ 'admin.plugins.dep.resolveBody': '«{name}» necesita que estos plugins estén instalados antes de poder activarse.',
+ 'admin.plugins.dep.requires': 'Requiere {version}',
+ 'admin.plugins.dep.mismatch': 'Necesita {wanted}: {installed} está instalado',
+ 'admin.plugins.dep.download': 'Descargar',
+ 'admin.plugins.dep.update': 'Actualizar',
+ 'admin.plugins.dep.resolveHint': 'Descarga la última versión compatible, incluidas sus propias dependencias.',
'admin.plugins.accessTitle': 'A qué puede acceder',
'admin.plugins.connectsTitle': 'Se conecta a',
'admin.plugins.detailsTitle': 'Detalles',
@@ -493,7 +551,8 @@ const admin: TranslationStrings = {
'admin.group.maintenance': 'Maintenance',
'admin.invite.tripLabel': 'Añadir a un viaje (opcional)',
'admin.invite.tripNone': 'Sin viaje',
- 'admin.invite.tripHint': 'El nuevo usuario se añade automáticamente a este viaje cuando se registra mediante el enlace.',
+ 'admin.invite.tripHint':
+ 'El nuevo usuario se añade automáticamente a este viaje cuando se registra mediante el enlace.',
'admin.invite.boundTo': 'se añade a {trip}',
};
export default admin;
diff --git a/shared/src/i18n/es/budget.ts b/shared/src/i18n/es/budget.ts
index e2fe4c672..66e78f2dd 100644
--- a/shared/src/i18n/es/budget.ts
+++ b/shared/src/i18n/es/budget.ts
@@ -52,6 +52,9 @@ const budget: TranslationStrings = {
'costs.nothingOwed': 'Nadie te debe nada',
'costs.yourShare': 'Tu parte',
'costs.youPaid': 'Pagaste',
+ 'costs.outstanding': 'Importe pendiente',
+ 'costs.outstandingSub': 'Gastos sin pagador aún',
+ 'costs.outstandingItems': 'gastos sin pagador',
'costs.expenses': 'Gastos',
'costs.entries': '{count} entradas',
'costs.searchPlaceholder': 'Buscar gastos…',
@@ -116,10 +119,10 @@ const budget: TranslationStrings = {
'costs.unfinishedHint': 'Solo en el total — aún sin saldar',
'costs.tapToInclude': 'Toca para incluir',
'costs.amount': 'Importe',
- 'costs.split': "Split",
- 'costs.splitEqually': "Equally",
- 'costs.splitCustom': "Custom",
- 'costs.splitTicket': "Ticket",
+ 'costs.split': 'Split',
+ 'costs.splitEqually': 'Equally',
+ 'costs.splitCustom': 'Custom',
+ 'costs.splitTicket': 'Ticket',
'costs.filter.allCategories': 'Todas las categorías',
'costs.filter.allDays': 'Todos los días',
'costs.expensesCount': '{count} gastos',
diff --git a/shared/src/i18n/es/collection.ts b/shared/src/i18n/es/collection.ts
index 7caa549e9..ab6dc0e96 100644
--- a/shared/src/i18n/es/collection.ts
+++ b/shared/src/i18n/es/collection.ts
@@ -49,7 +49,8 @@ const collection: TranslationStrings = {
'collections.editList': 'Renombrar',
'collections.listMenu': 'Opciones de la lista',
'collections.deleteList': 'Eliminar lista',
- 'collections.deleteListConfirm': 'Esto elimina de forma permanente la lista y todos sus lugares guardados. No se puede deshacer.',
+ 'collections.deleteListConfirm':
+ 'Esto elimina de forma permanente la lista y todos sus lugares guardados. No se puede deshacer.',
'collections.listName': 'Nombre de la lista',
'collections.listNamePlaceholder': 'p. ej. Tokio 2025',
'collections.listColor': 'Color',
@@ -127,7 +128,8 @@ const collection: TranslationStrings = {
'collections.share.memberHint': 'Solo el propietario de la lista puede invitar o quitar personas.',
'collections.share.cancel': 'Cancelar',
'collections.share.leave': 'Salir de la lista',
- 'collections.share.leaveConfirm': '¿Salir de esta lista compartida? Perderás el acceso hasta que vuelvan a invitarte.',
+ 'collections.share.leaveConfirm':
+ '¿Salir de esta lista compartida? Perderás el acceso hasta que vuelvan a invitarte.',
'collections.share.left': 'Has salido de la lista',
'collections.share.remove': 'Quitar',
diff --git a/shared/src/i18n/es/help.ts b/shared/src/i18n/es/help.ts
index 9b6e9316f..782bf0e44 100644
--- a/shared/src/i18n/es/help.ts
+++ b/shared/src/i18n/es/help.ts
@@ -2,12 +2,12 @@ import type { TranslationStrings } from '../types';
// English fallback until 'es' is translated.
const help: TranslationStrings = {
- 'help.title': "Help & Docs",
- 'help.search': "Search docs…",
- 'help.contents': "Contents",
- 'help.noResults': "No matching pages.",
+ 'help.title': 'Help & Docs',
+ 'help.search': 'Search docs…',
+ 'help.contents': 'Contents',
+ 'help.noResults': 'No matching pages.',
'help.errorTitle': "Couldn't load this page",
- 'help.errorBody': "The help content is fetched from the TREK wiki. Check your connection and try again.",
+ 'help.errorBody': 'The help content is fetched from the TREK wiki. Check your connection and try again.',
};
export default help;
diff --git a/shared/src/i18n/es/index.ts b/shared/src/i18n/es/index.ts
index 2b9ef6f0a..61e5dbc6b 100644
--- a/shared/src/i18n/es/index.ts
+++ b/shared/src/i18n/es/index.ts
@@ -5,11 +5,13 @@ import backup from './backup';
import budget from './budget';
import categories from './categories';
import collab from './collab';
+import collection from './collection';
import common from './common';
import dashboard from './dashboard';
import day from './day';
import dayplan from './dayplan';
import files from './files';
+import help from './help';
import inspector from './inspector';
import journey from './journey';
import login from './login';
@@ -39,8 +41,6 @@ import trip from './trip';
import trips from './trips';
import undo from './undo';
import vacay from './vacay';
-import collection from './collection';
-import help from './help';
const locale = {
...common,
diff --git a/shared/src/i18n/es/login.ts b/shared/src/i18n/es/login.ts
index 94e48bf8a..ac4123ee4 100644
--- a/shared/src/i18n/es/login.ts
+++ b/shared/src/i18n/es/login.ts
@@ -87,7 +87,8 @@ const login: TranslationStrings = {
'login.passkey.signIn': 'Iniciar sesión con una passkey',
'login.passkey.failed': 'Error al iniciar sesión con la passkey. Inténtalo de nuevo.',
'login.insecureCookie.title': "Login won't stick over HTTP",
- 'login.insecureCookie.body': "You’re connecting over plain HTTP, so your browser drops TREK’s secure session cookie — the next request fails with \"Access token required\". Fix: use HTTPS, or for a home-lab set COOKIE_SECURE=false.",
- 'login.insecureCookie.link': "Open the Troubleshooting guide",
+ 'login.insecureCookie.body':
+ 'You’re connecting over plain HTTP, so your browser drops TREK’s secure session cookie — the next request fails with "Access token required". Fix: use HTTPS, or for a home-lab set COOKIE_SECURE=false.',
+ 'login.insecureCookie.link': 'Open the Troubleshooting guide',
};
export default login;
diff --git a/shared/src/i18n/es/members.ts b/shared/src/i18n/es/members.ts
index 470cf902b..43d0443b1 100644
--- a/shared/src/i18n/es/members.ts
+++ b/shared/src/i18n/es/members.ts
@@ -25,7 +25,8 @@ const members: TranslationStrings = {
'members.transferError': 'Error al transferir la propiedad',
'members.guests': 'Invitados',
'members.guest': 'Invitado',
- 'members.guestsHint': 'Personas sin cuenta. Se les pueden asignar gastos, equipaje y tareas, pero no pueden iniciar sesión.',
+ 'members.guestsHint':
+ 'Personas sin cuenta. Se les pueden asignar gastos, equipaje y tareas, pero no pueden iniciar sesión.',
'members.addGuest': 'Añadir invitado',
'members.guestNamePlaceholder': 'Nombre del invitado',
'members.guestAdded': 'Invitado añadido',
diff --git a/shared/src/i18n/es/places.ts b/shared/src/i18n/es/places.ts
index f74d450d2..996e1d84c 100644
--- a/shared/src/i18n/es/places.ts
+++ b/shared/src/i18n/es/places.ts
@@ -24,8 +24,8 @@ const places: TranslationStrings = {
'places.kmlImportNoneSelected': 'Selecciona al menos un tipo.',
'places.selectionCount': '{count} seleccionado(s)',
'places.deleteSelected': 'Eliminar selección',
- 'places.changeCategory': "Change category",
- 'places.categoryChanged': "{count} places updated",
+ 'places.changeCategory': 'Change category',
+ 'places.categoryChanged': '{count} places updated',
'places.kmlKmzImported': '{count} lugares importados desde KMZ/KML',
'places.urlResolved': 'Lugar importado desde URL',
'places.importList': 'Importar lista',
diff --git a/shared/src/i18n/es/settings.ts b/shared/src/i18n/es/settings.ts
index f11bb7dda..fb791393e 100644
--- a/shared/src/i18n/es/settings.ts
+++ b/shared/src/i18n/es/settings.ts
@@ -29,7 +29,8 @@ const settings: TranslationStrings = {
'settings.mapStylePlaceholder': 'Seleccionar un estilo de Mapbox',
'settings.mapStyleHint': 'Preset o tu propia URL mapbox://styles/USER/ID',
'settings.mapOpenFreeMapStylePlaceholder': 'Seleccionar un estilo de OpenFreeMap',
- 'settings.mapOpenFreeMapStyleHint': 'Preset o URL de estilo de OpenFreeMap. Los estilos de OpenFreeMap funcionan sin token.',
+ 'settings.mapOpenFreeMapStyleHint':
+ 'Preset o URL de estilo de OpenFreeMap. Los estilos de OpenFreeMap funcionan sin token.',
'settings.map3dBuildings': 'Edificios 3D y terreno',
'settings.map3dHint':
'Inclinación + extrusiones 3D reales de edificios — funciona con todos los estilos, incluyendo satélite.',
@@ -331,14 +332,16 @@ const settings: TranslationStrings = {
'settings.airtrail.test.success': 'Conectado: {count} vuelo(s) encontrado(s)',
'settings.airtrail.test.failed': 'Error de conexión',
'settings.aiParsing.title': 'Análisis con IA',
- 'settings.aiParsing.hint': 'Usa tu propio modelo de IA para extraer reservas de los archivos subidos. Esto solo se aplica cuando tu administrador no ha configurado un modelo para toda la instancia.',
+ 'settings.aiParsing.hint':
+ 'Usa tu propio modelo de IA para extraer reservas de los archivos subidos. Esto solo se aplica cuando tu administrador no ha configurado un modelo para toda la instancia.',
'settings.aiParsing.provider': 'Proveedor',
'settings.aiParsing.providerLocal': 'Local (Ollama)',
'settings.aiParsing.providerOpenai': 'OpenAI',
'settings.aiParsing.providerAnthropic': 'Anthropic',
'settings.aiParsing.model': 'Modelo',
'settings.aiParsing.baseUrl': 'URL base',
- 'settings.aiParsing.baseUrlHint': 'Donde se ejecuta el modelo: un servidor Ollama local o un endpoint compatible con OpenAI.',
+ 'settings.aiParsing.baseUrlHint':
+ 'Donde se ejecuta el modelo: un servidor Ollama local o un endpoint compatible con OpenAI.',
'settings.aiParsing.apiKey': 'Clave de API',
'settings.aiParsing.apiKeyHint': 'Se almacena cifrada. Déjalo en blanco para mantener la clave actual.',
'settings.aiParsing.multimodal': 'Enviar documentos como imágenes',
@@ -361,7 +364,8 @@ const settings: TranslationStrings = {
'settings.appearance.contrastLow': 'Low contrast',
'settings.appearance.readability': 'Readability',
'settings.appearance.transparency': 'Transparency',
- 'settings.appearance.transparencyHint': 'Glassy translucent surfaces. Turn off for solid, higher-contrast backgrounds.',
+ 'settings.appearance.transparencyHint':
+ 'Glassy translucent surfaces. Turn off for solid, higher-contrast backgrounds.',
'settings.appearance.reduceMotion': 'Reduce motion',
'settings.appearance.reduceMotionHint': 'Minimize animations and transitions.',
'settings.appearance.density': 'Density',
@@ -391,7 +395,8 @@ const settings: TranslationStrings = {
'settings.appearance.group.belowHero': 'Below the hero',
'settings.appearance.group.bottomOfPage': 'Bottom of page',
'settings.appearance.sidebarHint': 'The whole right column. Turn off and the dashboard centers.',
- 'settings.appearance.densityHint': 'Compact tightens spacing and padding for a denser layout that fits more on screen.',
+ 'settings.appearance.densityHint':
+ 'Compact tightens spacing and padding for a denser layout that fits more on screen.',
'settings.appearance.textSizeAll': 'Everything',
'settings.appearance.perSize': 'Adjust each size separately',
'settings.appearance.size.large': 'Large',
@@ -414,10 +419,13 @@ const settings: TranslationStrings = {
'settings.offline.cache.title': 'Caché offline',
'settings.offline.mode.title': 'Modo offline',
'settings.offline.mode.force': 'Forzar el modo offline',
- 'settings.offline.mode.forceHint': 'Trabaja solo con los datos en caché y pon tus cambios en cola. Desactívalo para reconectar y sincronizar.',
- 'settings.offline.mode.active': 'El modo offline está activado: tus cambios están en cola y se sincronizarán cuando lo desactives.',
+ 'settings.offline.mode.forceHint':
+ 'Trabaja solo con los datos en caché y pon tus cambios en cola. Desactívalo para reconectar y sincronizar.',
+ 'settings.offline.mode.active':
+ 'El modo offline está activado: tus cambios están en cola y se sincronizarán cuando lo desactives.',
'settings.offline.prepare.title': 'Prepárate para estar offline',
- 'settings.offline.prepare.hint': 'Descarga todo lo que necesitas —datos del viaje, documentos y mosaicos del mapa— antes de perder la conexión.',
+ 'settings.offline.prepare.hint':
+ 'Descarga todo lo que necesitas —datos del viaje, documentos y mosaicos del mapa— antes de perder la conexión.',
'settings.offline.prepare.button': 'Descargar para uso offline',
'settings.offline.prepare.running': 'Descargando…',
'settings.offline.prepare.done': 'Listo para usar offline',
@@ -428,12 +436,14 @@ const settings: TranslationStrings = {
'settings.offline.resyncing': 'Sincronizando…',
'settings.offline.storage.title': 'Qué almacenar offline',
'settings.offline.storage.tiles': 'Almacenar mosaicos del mapa offline',
- 'settings.offline.storage.tilesHint': 'Los mosaicos del mapa ocupan más almacenamiento. Desactívalo para conservar offline solo los datos del viaje y los documentos.',
+ 'settings.offline.storage.tilesHint':
+ 'Los mosaicos del mapa ocupan más almacenamiento. Desactívalo para conservar offline solo los datos del viaje y los documentos.',
'settings.offline.storage.tripsTitle': 'Viajes',
'settings.offline.storage.tripOn': 'Almacenado offline',
'settings.offline.storage.tripOff': 'No almacenado',
'settings.offline.clear': 'Vaciar caché',
- 'settings.offline.clearConfirm': '¿Vaciar todos los datos de viaje offline? Puedes volver a sincronizar en cualquier momento con conexión.',
+ 'settings.offline.clearConfirm':
+ '¿Vaciar todos los datos de viaje offline? Puedes volver a sincronizar en cualquier momento con conexión.',
'settings.offline.stats.trips': 'Viajes en caché',
'settings.offline.stats.pending': 'Cambios pendientes',
'settings.offline.stats.failed': 'Cambios fallidos',
@@ -441,7 +451,8 @@ const settings: TranslationStrings = {
'settings.offline.empty': 'Aún no hay viajes en caché. Conéctate a internet para sincronizar.',
'settings.offline.loading': 'Cargando…',
'settings.offline.conflicts.title': 'Conflictos de sincronización',
- 'settings.offline.conflicts.hint': 'Los cambios que hiciste offline chocan con cambios más recientes en el servidor. Elige qué versión conservar.',
+ 'settings.offline.conflicts.hint':
+ 'Los cambios que hiciste offline chocan con cambios más recientes en el servidor. Elige qué versión conservar.',
'settings.offline.conflicts.keepMine': 'Conservar la mía',
'settings.offline.conflicts.keepServer': 'Conservar la del servidor',
'settings.offline.conflicts.mine': 'Tu versión',
diff --git a/shared/src/i18n/es/trip.ts b/shared/src/i18n/es/trip.ts
index 2aafcca96..c616431ce 100644
--- a/shared/src/i18n/es/trip.ts
+++ b/shared/src/i18n/es/trip.ts
@@ -28,7 +28,8 @@ const trip: TranslationStrings = {
'trip.confirm.deletePlaces': '¿Eliminar {count} lugares?',
'trip.toast.placesDeleted': '{count} lugares eliminados',
'trip.invite.linkTitle': 'Enlace de invitación al viaje',
- 'trip.invite.linkHint': 'Cualquier persona con una cuenta de TREK que abra este enlace se unirá al viaje como miembro. Regenéralo para invalidar el enlace anterior.',
+ 'trip.invite.linkHint':
+ 'Cualquier persona con una cuenta de TREK que abra este enlace se unirá al viaje como miembro. Regenéralo para invalidar el enlace anterior.',
'trip.invite.create': 'Crear enlace de invitación',
'trip.invite.regenerate': 'Regenerar',
'trip.invite.disable': 'Desactivar',
diff --git a/shared/src/i18n/es/undo.ts b/shared/src/i18n/es/undo.ts
index bc6bd4fb9..d7e5d3129 100644
--- a/shared/src/i18n/es/undo.ts
+++ b/shared/src/i18n/es/undo.ts
@@ -9,7 +9,7 @@ const undo: TranslationStrings = {
'undo.optimize': 'Ruta optimizada',
'undo.deletePlace': 'Lugar eliminado',
'undo.deletePlaces': 'Lugares eliminados',
- 'undo.changeCategory': "Category changed",
+ 'undo.changeCategory': 'Category changed',
'undo.moveDay': 'Lugar movido a otro día',
'undo.lock': 'Bloqueo de lugar activado/desactivado',
'undo.importGpx': 'Importación GPX',
diff --git a/shared/src/i18n/fr/admin.ts b/shared/src/i18n/fr/admin.ts
index d49f41e28..2f24c673b 100644
--- a/shared/src/i18n/fr/admin.ts
+++ b/shared/src/i18n/fr/admin.ts
@@ -95,6 +95,8 @@ const admin: TranslationStrings = {
'admin.recommended': 'Recommandé',
'admin.weatherKey': 'Clé API OpenWeatherMap',
'admin.weatherKeyHint': 'Pour les données météo. Gratuit sur openweathermap.org',
+ 'admin.unsplashKey': 'Clé API Unsplash',
+ 'admin.unsplashKeyHint': 'Pour la recherche d’images. Gratuit sur unsplash.com/developers',
'admin.validateKey': 'Tester',
'admin.keyValid': 'Connecté',
'admin.keyInvalid': 'Invalide',
@@ -163,6 +165,11 @@ const admin: TranslationStrings = {
'admin.tabs.plugins': 'Plugins',
'admin.plugins.rescan': 'Réanalyser',
'admin.plugins.rescanned': 'Dossier des plugins réanalysé',
+ 'admin.plugins.upload': 'Téléverser un plugin',
+ 'admin.plugins.dropToUpload': "Déposez un .zip de plugin pour l'installer",
+ 'admin.plugins.uploaded': "Plugin “{name}” téléversé — activez-le pour l'exécuter",
+ 'admin.plugins.sideloaded': 'Chargé manuellement',
+ 'admin.plugins.sideloadedHint': 'Téléversé manuellement — pas depuis le registre, non signé et non vérifié',
'admin.plugins.browse': 'Parcourir les plugins',
'admin.plugins.installed': 'Installé',
'admin.plugins.install': 'Installer',
@@ -177,11 +184,13 @@ const admin: TranslationStrings = {
'admin.plugins.noErrors': 'Aucune erreur enregistrée.',
'admin.plugins.uninstalled': 'Plugin désinstallé',
'admin.plugins.uninstallTitle': 'Désinstaller le plugin ?',
- 'admin.plugins.uninstallBody': 'Cela arrête le plugin, supprime son code et efface toutes ses données. Cette action est irréversible.',
+ 'admin.plugins.uninstallBody':
+ 'Cela arrête le plugin, supprime son code et efface toutes ses données. Cette action est irréversible.',
'admin.plugins.status.starting': 'Démarrage…',
'admin.plugins.type.widget': 'Widget',
'admin.plugins.type.page': 'Page',
'admin.plugins.type.integration': 'Intégration',
+ 'admin.plugins.type.trip-page': 'Page de voyage',
'admin.plugins.reviewed': 'Vérifié',
'admin.plugins.unreviewed': 'Non vérifié',
'admin.plugins.updated': 'Plugin mis à jour',
@@ -191,10 +200,12 @@ const admin: TranslationStrings = {
'admin.plugins.title': 'Plugins',
'admin.plugins.subtitle': 'Installez et gérez des plugins tiers sur votre instance.',
'admin.plugins.disabledTitle': 'Les plugins sont désactivés',
- 'admin.plugins.disabledBody': "L'environnement d'exécution des plugins est désactivé (TREK_PLUGINS_ENABLED). Aucun plugin ne peut fonctionner tant qu'un administrateur ne l'active pas dans la configuration du serveur.",
+ 'admin.plugins.disabledBody':
+ "L'environnement d'exécution des plugins est désactivé (TREK_PLUGINS_ENABLED). Aucun plugin ne peut fonctionner tant qu'un administrateur ne l'active pas dans la configuration du serveur.",
'admin.plugins.empty': 'Aucun plugin installé pour le moment.',
'admin.plugins.loadError': 'Impossible de charger les plugins.',
- 'admin.plugins.scaffoldNote': "L'installation et l'activation des plugins arriveront dans une mise à jour ultérieure. Ce panneau liste actuellement uniquement les plugins installés.",
+ 'admin.plugins.scaffoldNote':
+ "L'installation et l'activation des plugins arriveront dans une mise à jour ultérieure. Ce panneau liste actuellement uniquement les plugins installés.",
'admin.plugins.status.active': 'Actif',
'admin.plugins.status.inactive': 'Inactif',
'admin.plugins.status.disabled': 'Désactivé',
@@ -217,10 +228,30 @@ const admin: TranslationStrings = {
'admin.plugins.perm.db:own': 'Stocker ses propres données dans une base de données isolée',
'admin.plugins.perm.db:read:trips': "Lire les voyages accessibles à l'utilisateur actif",
'admin.plugins.perm.db:read:users': 'Lire les informations de profil de base (nom, avatar — jamais les identifiants)',
+ 'admin.plugins.perm.db:read:costs': "Lire les dépenses (postes de budget) accessibles à l'utilisateur actif",
+ 'admin.plugins.perm.db:read:packing': "Lire les listes de bagages des voyages accessibles à l'utilisateur actif",
+ 'admin.plugins.perm.db:read:files': "Lire les fichiers des voyages accessibles à l'utilisateur actif",
+ 'admin.plugins.perm.db:write:costs':
+ "Créer des dépenses (postes de budget) sur les voyages que l'utilisateur actif peut modifier",
+ 'admin.plugins.perm.db:write:places':
+ "Ajouter, modifier et supprimer des lieux sur les voyages que l'utilisateur actif peut modifier",
+ 'admin.plugins.perm.db:write:days':
+ "Ajouter, modifier et supprimer des jours sur les voyages que l'utilisateur actif peut modifier",
+ 'admin.plugins.perm.db:write:itinerary':
+ "Attribuer et retirer des lieux aux jours des voyages que l'utilisateur actif peut modifier",
+ 'admin.plugins.perm.db:write:trips':
+ "Modifier les détails du voyage (titre, dates, devise…) sur les voyages que l'utilisateur actif peut modifier",
+ 'admin.plugins.perm.db:meta':
+ "Associer ses propres données privées aux voyages, lieux et jours auxquels l'utilisateur actif a accès",
'admin.plugins.perm.ws:broadcast:trip': 'Envoyer des mises à jour en temps réel aux membres du voyage',
'admin.plugins.perm.ws:broadcast:user': 'Envoyer des mises à jour en temps réel à des utilisateurs individuels',
'admin.plugins.perm.hook:photo-provider': 'Fournir des photos à Photos',
'admin.plugins.perm.hook:calendar-source': 'Fournir des événements au calendrier',
+ 'admin.plugins.perm.hook:place-detail-provider': 'Ajouter des détails supplémentaires (avis, notes, liens) à un lieu',
+ 'admin.plugins.perm.hook:trip-warning-provider':
+ 'Émettre des avertissements de validation sur un voyage (affichés dans le planificateur)',
+ 'admin.plugins.perm.events:subscribe':
+ 'Réagir aux événements d’activité principaux (nom de l’événement et voyage uniquement, jamais le contenu)',
'admin.plugins.perm.http:outbound': 'Effectuer des requêtes sortantes vers ses hôtes déclarés',
'admin.plugins.updateConsentTitle': 'Cette mise à jour nécessite de nouvelles permissions',
'admin.plugins.updateConsentBody':
@@ -273,11 +304,36 @@ const admin: TranslationStrings = {
'admin.plugins.restarted': 'Plugin redémarré',
'admin.plugins.cap.readsTrips': 'Lit vos voyages',
'admin.plugins.cap.readsUsers': 'Lit les profils de base',
+ 'admin.plugins.cap.readsCosts': 'Lit vos dépenses',
+ 'admin.plugins.cap.readsPacking': 'Lit les listes de bagages',
+ 'admin.plugins.cap.readsFiles': 'Lit les fichiers du voyage',
+ 'admin.plugins.cap.writesCosts': 'Ajoute des dépenses',
+ 'admin.plugins.cap.writesPlaces': 'Modifie les lieux',
+ 'admin.plugins.cap.writesDays': 'Modifie les jours',
+ 'admin.plugins.cap.writesItinerary': "Modifie l'itinéraire",
+ 'admin.plugins.cap.writesTrips': 'Modifie les voyages',
+ 'admin.plugins.cap.metadata': 'Ajoute des métadonnées',
'admin.plugins.cap.widget': 'Widget de tableau de bord',
'admin.plugins.cap.heroWidget': "Widget carte d'embarquement",
+ 'admin.plugins.cap.placeSlot': 'Détail du lieu',
'admin.plugins.cap.realtime': 'Mises à jour en temps réel',
'admin.plugins.cap.photos': 'Fournit des photos',
'admin.plugins.cap.calendar': 'Fournit des événements de calendrier',
+ 'admin.plugins.cap.placeDetails': 'Enrichit les lieux',
+ 'admin.plugins.cap.warnings': 'Signale les problèmes',
+ 'admin.plugins.cap.events': 'Réagit à l’activité',
+ 'admin.plugins.cap.requiresAddon': 'Nécessite {addon}',
+ 'admin.plugins.cap.dependsOn': 'Requiert {id} {version}',
+ 'admin.plugins.dep.addonDisabledToast': 'Activez d’abord le ou les modules requis : {addons}',
+ 'admin.plugins.dep.autoEnabled': 'Plugin(s) requis activé(s) au préalable : {plugins}',
+ 'admin.plugins.dep.downloaded': '{id} téléchargé',
+ 'admin.plugins.dep.resolveTitle': 'Dépendances manquantes',
+ 'admin.plugins.dep.resolveBody': '« {name} » nécessite l’installation de ces plugins avant de pouvoir être activé.',
+ 'admin.plugins.dep.requires': 'Nécessite {version}',
+ 'admin.plugins.dep.mismatch': 'Nécessite {wanted} — {installed} est installé',
+ 'admin.plugins.dep.download': 'Télécharger',
+ 'admin.plugins.dep.update': 'Mettre à jour',
+ 'admin.plugins.dep.resolveHint': 'Télécharge la dernière version compatible, y compris ses propres dépendances.',
'admin.plugins.accessTitle': 'Ce à quoi il peut accéder',
'admin.plugins.connectsTitle': 'Se connecte à',
'admin.plugins.detailsTitle': 'Détails',
@@ -491,7 +547,8 @@ const admin: TranslationStrings = {
'admin.group.maintenance': 'Maintenance',
'admin.invite.tripLabel': 'Ajouter à un voyage (facultatif)',
'admin.invite.tripNone': 'Aucun voyage',
- 'admin.invite.tripHint': 'Le nouvel utilisateur est automatiquement ajouté à ce voyage lorsqu\'il s\'inscrit via le lien.',
+ 'admin.invite.tripHint':
+ "Le nouvel utilisateur est automatiquement ajouté à ce voyage lorsqu'il s'inscrit via le lien.",
'admin.invite.boundTo': 'ajoute à {trip}',
};
export default admin;
diff --git a/shared/src/i18n/fr/budget.ts b/shared/src/i18n/fr/budget.ts
index f6110abf2..ba0c76d50 100644
--- a/shared/src/i18n/fr/budget.ts
+++ b/shared/src/i18n/fr/budget.ts
@@ -52,6 +52,9 @@ const budget: TranslationStrings = {
'costs.nothingOwed': 'On ne vous doit rien',
'costs.yourShare': 'Votre part',
'costs.youPaid': 'Vous avez payé',
+ 'costs.outstanding': 'Montant en attente',
+ 'costs.outstandingSub': 'Dépenses sans payeur',
+ 'costs.outstandingItems': 'dépenses sans payeur',
'costs.expenses': 'Dépenses',
'costs.entries': '{count} entrées',
'costs.searchPlaceholder': 'Rechercher des dépenses…',
@@ -116,10 +119,10 @@ const budget: TranslationStrings = {
'costs.unfinishedHint': 'Total seulement — pas encore réglé',
'costs.tapToInclude': 'Toucher pour inclure',
'costs.amount': 'Montant',
- 'costs.split': "Split",
- 'costs.splitEqually': "Equally",
- 'costs.splitCustom': "Custom",
- 'costs.splitTicket': "Ticket",
+ 'costs.split': 'Split',
+ 'costs.splitEqually': 'Equally',
+ 'costs.splitCustom': 'Custom',
+ 'costs.splitTicket': 'Ticket',
'costs.filter.allCategories': 'Toutes les catégories',
'costs.filter.allDays': 'Tous les jours',
'costs.expensesCount': '{count} dépenses',
diff --git a/shared/src/i18n/fr/collection.ts b/shared/src/i18n/fr/collection.ts
index 66fb98b22..ca174510e 100644
--- a/shared/src/i18n/fr/collection.ts
+++ b/shared/src/i18n/fr/collection.ts
@@ -3,7 +3,7 @@ import type { TranslationStrings } from '../types';
const collection: TranslationStrings = {
'collections.saveNToList': 'Enregistrer {count} dans une liste',
'collections.addedNToList': '{count} enregistrés dans {name}',
- 'collections.noOwnLists': 'Vous n\'avez pas encore de listes',
+ 'collections.noOwnLists': "Vous n'avez pas encore de listes",
'collections.saveToListHint': 'Les doublons sont ignorés automatiquement',
'collections.role.label': 'Rôle',
'collections.role.viewer': 'Lecteur',
@@ -49,7 +49,8 @@ const collection: TranslationStrings = {
'collections.editList': 'Renommer',
'collections.listMenu': 'Options de la liste',
'collections.deleteList': 'Supprimer la liste',
- 'collections.deleteListConfirm': 'Cela supprime définitivement la liste et tous ses lieux enregistrés. Cette action est irréversible.',
+ 'collections.deleteListConfirm':
+ 'Cela supprime définitivement la liste et tous ses lieux enregistrés. Cette action est irréversible.',
'collections.listName': 'Nom de la liste',
'collections.listNamePlaceholder': 'p. ex. Tokyo 2025',
'collections.listColor': 'Couleur',
@@ -127,7 +128,8 @@ const collection: TranslationStrings = {
'collections.share.memberHint': 'Seul le propriétaire de la liste peut inviter ou retirer des personnes.',
'collections.share.cancel': 'Annuler',
'collections.share.leave': 'Quitter la liste',
- 'collections.share.leaveConfirm': 'Quitter cette liste partagée ? Vous perdrez l’accès jusqu’à ce que vous soyez réinvité.',
+ 'collections.share.leaveConfirm':
+ 'Quitter cette liste partagée ? Vous perdrez l’accès jusqu’à ce que vous soyez réinvité.',
'collections.share.left': 'Vous avez quitté la liste',
'collections.share.remove': 'Retirer',
diff --git a/shared/src/i18n/fr/dashboard.ts b/shared/src/i18n/fr/dashboard.ts
index 57c0d48ea..432e99033 100644
--- a/shared/src/i18n/fr/dashboard.ts
+++ b/shared/src/i18n/fr/dashboard.ts
@@ -42,8 +42,7 @@ const dashboard: TranslationStrings = {
'dashboard.status.past': 'Passé',
'dashboard.status.daysLeft': '{count} jours restants',
'dashboard.toast.loadError': 'Impossible de charger les voyages',
- 'dashboard.loadErrorBanner':
- "Impossible de joindre le serveur. Vos voyages sont en sécurité — veuillez réessayer.",
+ 'dashboard.loadErrorBanner': 'Impossible de joindre le serveur. Vos voyages sont en sécurité — veuillez réessayer.',
'dashboard.retry': 'Réessayer',
'dashboard.toast.created': 'Voyage créé avec succès !',
'dashboard.toast.createError': 'Impossible de créer le voyage',
diff --git a/shared/src/i18n/fr/help.ts b/shared/src/i18n/fr/help.ts
index 5097d1d55..56a52549a 100644
--- a/shared/src/i18n/fr/help.ts
+++ b/shared/src/i18n/fr/help.ts
@@ -2,12 +2,12 @@ import type { TranslationStrings } from '../types';
// English fallback until 'fr' is translated.
const help: TranslationStrings = {
- 'help.title': "Help & Docs",
- 'help.search': "Search docs…",
- 'help.contents': "Contents",
- 'help.noResults': "No matching pages.",
+ 'help.title': 'Help & Docs',
+ 'help.search': 'Search docs…',
+ 'help.contents': 'Contents',
+ 'help.noResults': 'No matching pages.',
'help.errorTitle': "Couldn't load this page",
- 'help.errorBody': "The help content is fetched from the TREK wiki. Check your connection and try again.",
+ 'help.errorBody': 'The help content is fetched from the TREK wiki. Check your connection and try again.',
};
export default help;
diff --git a/shared/src/i18n/fr/index.ts b/shared/src/i18n/fr/index.ts
index b9af5461f..eef4c74aa 100644
--- a/shared/src/i18n/fr/index.ts
+++ b/shared/src/i18n/fr/index.ts
@@ -5,11 +5,13 @@ import backup from './backup';
import budget from './budget';
import categories from './categories';
import collab from './collab';
+import collection from './collection';
import common from './common';
import dashboard from './dashboard';
import day from './day';
import dayplan from './dayplan';
import files from './files';
+import help from './help';
import inspector from './inspector';
import journey from './journey';
import login from './login';
@@ -39,8 +41,6 @@ import trip from './trip';
import trips from './trips';
import undo from './undo';
import vacay from './vacay';
-import collection from './collection';
-import help from './help';
const locale = {
...common,
diff --git a/shared/src/i18n/fr/login.ts b/shared/src/i18n/fr/login.ts
index 9c2961458..b7fa008fd 100644
--- a/shared/src/i18n/fr/login.ts
+++ b/shared/src/i18n/fr/login.ts
@@ -89,7 +89,8 @@ const login: TranslationStrings = {
'login.passkey.signIn': 'Se connecter avec une passkey',
'login.passkey.failed': 'Échec de la connexion par passkey. Veuillez réessayer.',
'login.insecureCookie.title': "Login won't stick over HTTP",
- 'login.insecureCookie.body': "You’re connecting over plain HTTP, so your browser drops TREK’s secure session cookie — the next request fails with \"Access token required\". Fix: use HTTPS, or for a home-lab set COOKIE_SECURE=false.",
- 'login.insecureCookie.link': "Open the Troubleshooting guide",
+ 'login.insecureCookie.body':
+ 'You’re connecting over plain HTTP, so your browser drops TREK’s secure session cookie — the next request fails with "Access token required". Fix: use HTTPS, or for a home-lab set COOKIE_SECURE=false.',
+ 'login.insecureCookie.link': 'Open the Troubleshooting guide',
};
export default login;
diff --git a/shared/src/i18n/fr/members.ts b/shared/src/i18n/fr/members.ts
index 7999fd9ac..6f4a9992c 100644
--- a/shared/src/i18n/fr/members.ts
+++ b/shared/src/i18n/fr/members.ts
@@ -25,12 +25,13 @@ const members: TranslationStrings = {
'members.transferError': 'Échec du transfert de propriété',
'members.guests': 'Invités',
'members.guest': 'Invité',
- 'members.guestsHint': 'Personnes sans compte. On peut leur attribuer des dépenses, des bagages et des tâches, mais elles ne peuvent pas se connecter.',
+ 'members.guestsHint':
+ 'Personnes sans compte. On peut leur attribuer des dépenses, des bagages et des tâches, mais elles ne peuvent pas se connecter.',
'members.addGuest': 'Ajouter un invité',
- 'members.guestNamePlaceholder': 'Nom de l\'invité',
+ 'members.guestNamePlaceholder': "Nom de l'invité",
'members.guestAdded': 'Invité ajouté',
- 'members.guestAddError': 'Échec de l\'ajout de l\'invité',
- 'members.guestRenameError': 'Échec du renommage de l\'invité',
+ 'members.guestAddError': "Échec de l'ajout de l'invité",
+ 'members.guestRenameError': "Échec du renommage de l'invité",
'members.guestRemoved': 'Invité supprimé',
'members.confirmRemoveGuest': 'Supprimer cet invité ? Ses affectations et parts de dépenses seront aussi supprimées.',
};
diff --git a/shared/src/i18n/fr/packing.ts b/shared/src/i18n/fr/packing.ts
index a33ceded4..710159d5f 100644
--- a/shared/src/i18n/fr/packing.ts
+++ b/shared/src/i18n/fr/packing.ts
@@ -189,12 +189,12 @@ const packing: TranslationStrings = {
'packing.tierPersonal': 'Personnel',
'packing.tierPersonalHint': 'Privé — vous seul le voyez',
'packing.tierShared': 'Partager avec…',
- 'packing.noOneToShare': 'Personne d\'autre sur ce voyage pour l\'instant',
+ 'packing.noOneToShare': "Personne d'autre sur ce voyage pour l'instant",
'packing.takenCareOf': 'par {name}',
'packing.sharedWithCount': 'partagé avec {count}',
'packing.broughtBy': 'apporté par {name}',
- 'packing.alsoBring': 'Je peux l\'apporter aussi',
- 'packing.alsoBringingStop': 'Je ne l\'apporte pas',
+ 'packing.alsoBring': "Je peux l'apporter aussi",
+ 'packing.alsoBringingStop': "Je ne l'apporte pas",
'packing.cloneToMine': 'Copier dans ma liste',
};
export default packing;
diff --git a/shared/src/i18n/fr/places.ts b/shared/src/i18n/fr/places.ts
index eeaa8bd4d..11bbcce66 100644
--- a/shared/src/i18n/fr/places.ts
+++ b/shared/src/i18n/fr/places.ts
@@ -24,8 +24,8 @@ const places: TranslationStrings = {
'places.kmlImportNoneSelected': 'Sélectionnez au moins un type.',
'places.selectionCount': '{count} sélectionné(s)',
'places.deleteSelected': 'Supprimer la sélection',
- 'places.changeCategory': "Change category",
- 'places.categoryChanged': "{count} places updated",
+ 'places.changeCategory': 'Change category',
+ 'places.categoryChanged': '{count} places updated',
'places.kmlKmzImported': '{count} lieux importés depuis KMZ/KML',
'places.urlResolved': "Lieu importé depuis l'URL",
'places.importList': 'Import de liste',
diff --git a/shared/src/i18n/fr/settings.ts b/shared/src/i18n/fr/settings.ts
index 64310c4db..3e1f95399 100644
--- a/shared/src/i18n/fr/settings.ts
+++ b/shared/src/i18n/fr/settings.ts
@@ -29,7 +29,8 @@ const settings: TranslationStrings = {
'settings.mapStylePlaceholder': 'Sélectionner un style Mapbox',
'settings.mapStyleHint': 'Preset ou votre propre URL mapbox://styles/USER/ID',
'settings.mapOpenFreeMapStylePlaceholder': 'Sélectionner un style OpenFreeMap',
- 'settings.mapOpenFreeMapStyleHint': 'Preset ou URL de style OpenFreeMap. Les styles OpenFreeMap fonctionnent sans jeton.',
+ 'settings.mapOpenFreeMapStyleHint':
+ 'Preset ou URL de style OpenFreeMap. Les styles OpenFreeMap fonctionnent sans jeton.',
'settings.map3dBuildings': 'Bâtiments 3D & terrain',
'settings.map3dHint':
'Inclinaison + extrusions 3D réelles des bâtiments — fonctionne avec tous les styles, y compris satellite.',
@@ -336,20 +337,23 @@ const settings: TranslationStrings = {
'settings.airtrail.test.success': 'Connecté — {count} vol(s) trouvé(s)',
'settings.airtrail.test.failed': 'Échec de la connexion',
'settings.aiParsing.title': 'Analyse par IA',
- 'settings.aiParsing.hint': 'Utilisez votre propre modèle d\'IA pour extraire les réservations des fichiers importés. Cela ne s\'applique que si votre administrateur n\'a pas configuré de modèle pour l\'ensemble de l\'instance.',
+ 'settings.aiParsing.hint':
+ "Utilisez votre propre modèle d'IA pour extraire les réservations des fichiers importés. Cela ne s'applique que si votre administrateur n'a pas configuré de modèle pour l'ensemble de l'instance.",
'settings.aiParsing.provider': 'Fournisseur',
'settings.aiParsing.providerLocal': 'Local (Ollama)',
'settings.aiParsing.providerOpenai': 'OpenAI',
'settings.aiParsing.providerAnthropic': 'Anthropic',
'settings.aiParsing.model': 'Modèle',
'settings.aiParsing.baseUrl': 'URL de base',
- 'settings.aiParsing.baseUrlHint': 'Emplacement d\'exécution du modèle — un serveur Ollama local ou un point de terminaison compatible OpenAI.',
+ 'settings.aiParsing.baseUrlHint':
+ "Emplacement d'exécution du modèle — un serveur Ollama local ou un point de terminaison compatible OpenAI.",
'settings.aiParsing.apiKey': 'Clé API',
'settings.aiParsing.apiKeyHint': 'Stockée de façon chiffrée. Laissez vide pour conserver la clé actuelle.',
- 'settings.aiParsing.multimodal': 'Envoyer les documents sous forme d\'images',
- 'settings.aiParsing.multimodalHint': 'Pour les modèles capables d\'analyser des images — envoie le PDF d\'origine au lieu du texte extrait.',
- 'settings.aiParsing.toast.saved': 'Paramètres d\'IA enregistrés',
- 'settings.aiParsing.toast.saveError': 'Impossible d\'enregistrer les paramètres d\'IA',
+ 'settings.aiParsing.multimodal': "Envoyer les documents sous forme d'images",
+ 'settings.aiParsing.multimodalHint':
+ "Pour les modèles capables d'analyser des images — envoie le PDF d'origine au lieu du texte extrait.",
+ 'settings.aiParsing.toast.saved': "Paramètres d'IA enregistrés",
+ 'settings.aiParsing.toast.saveError': "Impossible d'enregistrer les paramètres d'IA",
'settings.tabs.appearance': 'Appearance',
'settings.appearance.theme': 'Theme',
'settings.appearance.scheme': 'Color scheme',
@@ -366,7 +370,8 @@ const settings: TranslationStrings = {
'settings.appearance.contrastLow': 'Low contrast',
'settings.appearance.readability': 'Readability',
'settings.appearance.transparency': 'Transparency',
- 'settings.appearance.transparencyHint': 'Glassy translucent surfaces. Turn off for solid, higher-contrast backgrounds.',
+ 'settings.appearance.transparencyHint':
+ 'Glassy translucent surfaces. Turn off for solid, higher-contrast backgrounds.',
'settings.appearance.reduceMotion': 'Reduce motion',
'settings.appearance.reduceMotionHint': 'Minimize animations and transitions.',
'settings.appearance.density': 'Density',
@@ -396,7 +401,8 @@ const settings: TranslationStrings = {
'settings.appearance.group.belowHero': 'Below the hero',
'settings.appearance.group.bottomOfPage': 'Bottom of page',
'settings.appearance.sidebarHint': 'The whole right column. Turn off and the dashboard centers.',
- 'settings.appearance.densityHint': 'Compact tightens spacing and padding for a denser layout that fits more on screen.',
+ 'settings.appearance.densityHint':
+ 'Compact tightens spacing and padding for a denser layout that fits more on screen.',
'settings.appearance.textSizeAll': 'Everything',
'settings.appearance.perSize': 'Adjust each size separately',
'settings.appearance.size.large': 'Large',
@@ -419,10 +425,13 @@ const settings: TranslationStrings = {
'settings.offline.cache.title': 'Cache hors ligne',
'settings.offline.mode.title': 'Mode hors ligne',
'settings.offline.mode.force': 'Forcer le mode hors ligne',
- 'settings.offline.mode.forceHint': "Travaillez uniquement à partir des données en cache et mettez vos modifications en file d'attente. Désactivez pour vous reconnecter et synchroniser.",
- 'settings.offline.mode.active': "Le mode hors ligne est activé — vos modifications sont en file d'attente et seront synchronisées lorsque vous le désactiverez.",
+ 'settings.offline.mode.forceHint':
+ "Travaillez uniquement à partir des données en cache et mettez vos modifications en file d'attente. Désactivez pour vous reconnecter et synchroniser.",
+ 'settings.offline.mode.active':
+ "Le mode hors ligne est activé — vos modifications sont en file d'attente et seront synchronisées lorsque vous le désactiverez.",
'settings.offline.prepare.title': 'Préparer le mode hors ligne',
- 'settings.offline.prepare.hint': 'Téléchargez tout ce dont vous avez besoin — données de voyage, documents et tuiles de carte — avant de perdre la connexion.',
+ 'settings.offline.prepare.hint':
+ 'Téléchargez tout ce dont vous avez besoin — données de voyage, documents et tuiles de carte — avant de perdre la connexion.',
'settings.offline.prepare.button': 'Télécharger pour une utilisation hors ligne',
'settings.offline.prepare.running': 'Téléchargement…',
'settings.offline.prepare.done': 'Prêt pour une utilisation hors ligne',
@@ -433,12 +442,14 @@ const settings: TranslationStrings = {
'settings.offline.resyncing': 'Synchronisation…',
'settings.offline.storage.title': 'Que stocker hors ligne',
'settings.offline.storage.tiles': 'Stocker les tuiles de carte hors ligne',
- 'settings.offline.storage.tilesHint': 'Les tuiles de carte utilisent le plus de stockage. Désactivez cette option pour ne conserver hors ligne que les données de voyage et les documents.',
+ 'settings.offline.storage.tilesHint':
+ 'Les tuiles de carte utilisent le plus de stockage. Désactivez cette option pour ne conserver hors ligne que les données de voyage et les documents.',
'settings.offline.storage.tripsTitle': 'Voyages',
'settings.offline.storage.tripOn': 'Stocké hors ligne',
'settings.offline.storage.tripOff': 'Non stocké',
'settings.offline.clear': 'Vider le cache',
- 'settings.offline.clearConfirm': 'Vider toutes les données de voyage hors ligne ? Vous pourrez resynchroniser à tout moment lorsque vous serez en ligne.',
+ 'settings.offline.clearConfirm':
+ 'Vider toutes les données de voyage hors ligne ? Vous pourrez resynchroniser à tout moment lorsque vous serez en ligne.',
'settings.offline.stats.trips': 'Voyages en cache',
'settings.offline.stats.pending': 'Modifications en attente',
'settings.offline.stats.failed': 'Modifications échouées',
@@ -446,7 +457,8 @@ const settings: TranslationStrings = {
'settings.offline.empty': "Aucun voyage en cache pour l'instant. Connectez-vous à Internet pour synchroniser.",
'settings.offline.loading': 'Chargement…',
'settings.offline.conflicts.title': 'Conflits de synchronisation',
- 'settings.offline.conflicts.hint': 'Les modifications que vous avez faites hors ligne entrent en conflit avec des modifications plus récentes sur le serveur. Choisissez la version à conserver.',
+ 'settings.offline.conflicts.hint':
+ 'Les modifications que vous avez faites hors ligne entrent en conflit avec des modifications plus récentes sur le serveur. Choisissez la version à conserver.',
'settings.offline.conflicts.keepMine': 'Conserver la mienne',
'settings.offline.conflicts.keepServer': 'Conserver la leur',
'settings.offline.conflicts.mine': 'Votre version',
diff --git a/shared/src/i18n/fr/trip.ts b/shared/src/i18n/fr/trip.ts
index 5b1f9a2df..f95daa5d5 100644
--- a/shared/src/i18n/fr/trip.ts
+++ b/shared/src/i18n/fr/trip.ts
@@ -27,9 +27,10 @@ const trip: TranslationStrings = {
'trip.confirm.deletePlace': 'Voulez-vous vraiment supprimer ce lieu ?',
'trip.confirm.deletePlaces': 'Supprimer {count} lieux?',
'trip.toast.placesDeleted': '{count} lieux supprimés',
- 'trip.invite.linkTitle': 'Lien d\'invitation au voyage',
- 'trip.invite.linkHint': 'Toute personne disposant d\'un compte TREK qui ouvre ce lien rejoint le voyage en tant que membre. Régénérez le lien pour invalider l\'ancien.',
- 'trip.invite.create': 'Créer un lien d\'invitation',
+ 'trip.invite.linkTitle': "Lien d'invitation au voyage",
+ 'trip.invite.linkHint':
+ "Toute personne disposant d'un compte TREK qui ouvre ce lien rejoint le voyage en tant que membre. Régénérez le lien pour invalider l'ancien.",
+ 'trip.invite.create': "Créer un lien d'invitation",
'trip.invite.regenerate': 'Régénérer',
'trip.invite.disable': 'Désactiver',
'trip.invite.joinHeading': 'Rejoindre ce voyage',
@@ -37,7 +38,7 @@ const trip: TranslationStrings = {
'trip.invite.joinCta': 'Rejoindre le voyage',
'trip.invite.joining': 'Ajout en cours…',
'trip.invite.invalidTitle': 'Invitation indisponible',
- 'trip.invite.invalid': 'Ce lien d\'invitation est invalide ou a expiré.',
+ 'trip.invite.invalid': "Ce lien d'invitation est invalide ou a expiré.",
'trip.invite.backToDashboard': 'Retour au tableau de bord',
'transit.title': 'Transports en commun',
'transit.from': 'Départ',
@@ -57,25 +58,26 @@ const trip: TranslationStrings = {
'transit.pref.walking': 'Moins de marche',
'transit.search': 'Rechercher',
'transit.searching': 'Recherche…',
- 'transit.searchError': 'Échec de la recherche d\'itinéraire. Veuillez réessayer.',
- 'transit.noResults': 'Aucune connexion trouvée. Essayez un autre horaire ou d\'autres filtres.',
+ 'transit.searchError': "Échec de la recherche d'itinéraire. Veuillez réessayer.",
+ 'transit.noResults': "Aucune connexion trouvée. Essayez un autre horaire ou d'autres filtres.",
'transit.direct': 'Direct',
'transit.transfers': '{count} correspondances',
'transit.min': '{count} min',
'transit.stops': '{count} arrêts',
- 'transit.walkTo': 'Marcher jusqu\'à {name}',
+ 'transit.walkTo': "Marcher jusqu'à {name}",
'transit.platform': 'Voie {track}',
'transit.adding': 'Ajout…',
'transit.addToDay': 'Ajouter au jour',
'transit.itinerary': 'Itinéraire',
- 'transit.attribution': 'Données d\'itinéraire via',
+ 'transit.attribution': "Données d'itinéraire via",
'transport.modeManual': 'Transport manuel',
'transport.modeAutomated': 'Transport automatisé',
'transit.sectionTitle': 'Transports en commun automatisés',
- 'transit.changeRoute': 'Modifier l\'itinéraire',
+ 'transit.changeRoute': "Modifier l'itinéraire",
'transit.journey': 'Trajet en transports en commun',
'transit.pickDay': 'Choisissez un jour pour rechercher des connexions.',
- 'transit.noItinerary': 'Cette entrée n\'a aucun itinéraire enregistré — utilisez « Modifier l\'itinéraire » pour en rechercher un.',
+ 'transit.noItinerary':
+ "Cette entrée n'a aucun itinéraire enregistré — utilisez « Modifier l'itinéraire » pour en rechercher un.",
'transit.durationLabel': 'Durée',
'transit.transfersLabel': 'Correspondances',
'transit.walkLabel': 'Marche',
diff --git a/shared/src/i18n/fr/undo.ts b/shared/src/i18n/fr/undo.ts
index 1fb41aa15..b0d2dc57b 100644
--- a/shared/src/i18n/fr/undo.ts
+++ b/shared/src/i18n/fr/undo.ts
@@ -9,7 +9,7 @@ const undo: TranslationStrings = {
'undo.optimize': 'Itinéraire optimisé',
'undo.deletePlace': 'Lieu supprimé',
'undo.deletePlaces': 'Lieux supprimés',
- 'undo.changeCategory': "Category changed",
+ 'undo.changeCategory': 'Category changed',
'undo.moveDay': 'Lieu déplacé vers un autre jour',
'undo.lock': 'Verrouillage du lieu modifié',
'undo.importGpx': 'Import GPX',
diff --git a/shared/src/i18n/gr/admin.ts b/shared/src/i18n/gr/admin.ts
index 0fed964e0..93efa5896 100644
--- a/shared/src/i18n/gr/admin.ts
+++ b/shared/src/i18n/gr/admin.ts
@@ -141,6 +141,8 @@ const admin: TranslationStrings = {
'admin.recommended': 'Συνιστάται',
'admin.weatherKey': 'OpenWeatherMap API Key',
'admin.weatherKeyHint': 'Για δεδομένα καιρού. Δωρεάν στο openweathermap.org',
+ 'admin.unsplashKey': 'Κλειδί API Unsplash',
+ 'admin.unsplashKeyHint': 'Για αναζήτηση εικόνων. Δωρεάν στο unsplash.com/developers',
'admin.validateKey': 'Δοκιμή',
'admin.keyValid': 'Συνδέθηκε',
'admin.keyInvalid': 'Μη έγκυρο',
@@ -208,6 +210,11 @@ const admin: TranslationStrings = {
'admin.tabs.plugins': 'Plugins',
'admin.plugins.rescan': 'Επανασάρωση',
'admin.plugins.rescanned': 'Ο φάκελος plugins σαρώθηκε ξανά',
+ 'admin.plugins.upload': 'Μεταφόρτωση plugin',
+ 'admin.plugins.dropToUpload': 'Αποθέστε ένα .zip plugin για εγκατάσταση',
+ 'admin.plugins.uploaded': 'Το plugin “{name}” μεταφορτώθηκε — ενεργοποιήστε το για εκτέλεση',
+ 'admin.plugins.sideloaded': 'Φορτώθηκε χειροκίνητα',
+ 'admin.plugins.sideloadedHint': 'Μεταφορτώθηκε χειροκίνητα — όχι από το μητρώο, χωρίς υπογραφή και έλεγχο',
'admin.plugins.browse': 'Περιήγηση σε plugins',
'admin.plugins.installed': 'Εγκατεστημένο',
'admin.plugins.install': 'Εγκατάσταση',
@@ -222,11 +229,13 @@ const admin: TranslationStrings = {
'admin.plugins.noErrors': 'Δεν έχουν καταγραφεί σφάλματα.',
'admin.plugins.uninstalled': 'Το plugin απεγκαταστάθηκε',
'admin.plugins.uninstallTitle': 'Απεγκατάσταση plugin;',
- 'admin.plugins.uninstallBody': 'Αυτό σταματά το plugin, αφαιρεί τον κώδικά του και διαγράφει όλα τα δεδομένα του. Αυτή η ενέργεια δεν μπορεί να αναιρεθεί.',
+ 'admin.plugins.uninstallBody':
+ 'Αυτό σταματά το plugin, αφαιρεί τον κώδικά του και διαγράφει όλα τα δεδομένα του. Αυτή η ενέργεια δεν μπορεί να αναιρεθεί.',
'admin.plugins.status.starting': 'Εκκίνηση…',
'admin.plugins.type.widget': 'Widget',
'admin.plugins.type.page': 'Σελίδα',
'admin.plugins.type.integration': 'Ενσωμάτωση',
+ 'admin.plugins.type.trip-page': 'Σελίδα ταξιδιού',
'admin.plugins.reviewed': 'Ελεγμένο',
'admin.plugins.unreviewed': 'Μη ελεγμένο',
'admin.plugins.updated': 'Το plugin ενημερώθηκε',
@@ -236,10 +245,12 @@ const admin: TranslationStrings = {
'admin.plugins.title': 'Plugins',
'admin.plugins.subtitle': 'Εγκαταστήστε και διαχειριστείτε plugins τρίτων στην εγκατάστασή σας.',
'admin.plugins.disabledTitle': 'Τα plugins είναι απενεργοποιημένα',
- 'admin.plugins.disabledBody': 'Το περιβάλλον εκτέλεσης plugins είναι απενεργοποιημένο (TREK_PLUGINS_ENABLED). Κανένα plugin δεν μπορεί να εκτελεστεί μέχρι ένας διαχειριστής να το ενεργοποιήσει στη διαμόρφωση του server.',
+ 'admin.plugins.disabledBody':
+ 'Το περιβάλλον εκτέλεσης plugins είναι απενεργοποιημένο (TREK_PLUGINS_ENABLED). Κανένα plugin δεν μπορεί να εκτελεστεί μέχρι ένας διαχειριστής να το ενεργοποιήσει στη διαμόρφωση του server.',
'admin.plugins.empty': 'Δεν έχουν εγκατασταθεί plugins ακόμη.',
'admin.plugins.loadError': 'Δεν ήταν δυνατή η φόρτωση των plugins.',
- 'admin.plugins.scaffoldNote': 'Η εγκατάσταση και ενεργοποίηση plugins έρχονται σε μελλοντική ενημέρωση. Αυτός ο πίνακας εμφανίζει προς το παρόν μόνο τα εγκατεστημένα plugins.',
+ 'admin.plugins.scaffoldNote':
+ 'Η εγκατάσταση και ενεργοποίηση plugins έρχονται σε μελλοντική ενημέρωση. Αυτός ο πίνακας εμφανίζει προς το παρόν μόνο τα εγκατεστημένα plugins.',
'admin.plugins.status.active': 'Ενεργό',
'admin.plugins.status.inactive': 'Ανενεργό',
'admin.plugins.status.disabled': 'Απενεργοποιημένο',
@@ -262,10 +273,32 @@ const admin: TranslationStrings = {
'admin.plugins.perm.db:own': 'Αποθήκευση των δικών του δεδομένων σε απομονωμένη βάση δεδομένων',
'admin.plugins.perm.db:read:trips': 'Ανάγνωση ταξιδιών στα οποία έχει πρόσβαση ο ενεργός χρήστης',
'admin.plugins.perm.db:read:users': 'Ανάγνωση βασικών στοιχείων προφίλ (όνομα, avatar — ποτέ διαπιστευτήρια)',
+ 'admin.plugins.perm.db:read:costs':
+ 'Ανάγνωση εξόδων (στοιχεία προϋπολογισμού) στα οποία έχει πρόσβαση ο ενεργός χρήστης',
+ 'admin.plugins.perm.db:read:packing': 'Ανάγνωση λιστών αποσκευών ταξιδιών στα οποία έχει πρόσβαση ο ενεργός χρήστης',
+ 'admin.plugins.perm.db:read:files': 'Ανάγνωση αρχείων ταξιδιών στα οποία έχει πρόσβαση ο ενεργός χρήστης',
+ 'admin.plugins.perm.db:write:costs':
+ 'Δημιουργία εξόδων (στοιχεία προϋπολογισμού) σε ταξίδια που μπορεί να επεξεργαστεί ο ενεργός χρήστης',
+ 'admin.plugins.perm.db:write:places':
+ 'Προσθήκη, επεξεργασία και αφαίρεση τοποθεσιών σε ταξίδια που μπορεί να επεξεργαστεί ο ενεργός χρήστης',
+ 'admin.plugins.perm.db:write:days':
+ 'Προσθήκη, επεξεργασία και αφαίρεση ημερών σε ταξίδια που μπορεί να επεξεργαστεί ο ενεργός χρήστης',
+ 'admin.plugins.perm.db:write:itinerary':
+ 'Ανάθεση και αφαίρεση τοποθεσιών σε ημέρες ταξιδιών που μπορεί να επεξεργαστεί ο ενεργός χρήστης',
+ 'admin.plugins.perm.db:write:trips':
+ 'Επεξεργασία στοιχείων ταξιδιού (τίτλος, ημερομηνίες, νόμισμα…) σε ταξίδια που μπορεί να επεξεργαστεί ο ενεργός χρήστης',
+ 'admin.plugins.perm.db:meta':
+ 'Επισύναψη των δικών του ιδιωτικών δεδομένων σε ταξίδια, τοποθεσίες και ημέρες στις οποίες έχει πρόσβαση ο ενεργός χρήστης',
'admin.plugins.perm.ws:broadcast:trip': 'Αποστολή ενημερώσεων σε πραγματικό χρόνο στα μέλη του ταξιδιού',
'admin.plugins.perm.ws:broadcast:user': 'Αποστολή ενημερώσεων σε πραγματικό χρόνο σε μεμονωμένους χρήστες',
'admin.plugins.perm.hook:photo-provider': 'Παροχή φωτογραφιών στις Αναμνήσεις',
'admin.plugins.perm.hook:calendar-source': 'Παροχή συμβάντων στο ημερολόγιο',
+ 'admin.plugins.perm.hook:place-detail-provider':
+ 'Συνεισφορά επιπλέον λεπτομερειών (κριτικές, βαθμολογίες, σύνδεσμοι) σε ένα μέρος',
+ 'admin.plugins.perm.hook:trip-warning-provider':
+ 'Εμφάνιση προειδοποιήσεων επικύρωσης σε ένα ταξίδι (εμφανίζονται στον σχεδιαστή)',
+ 'admin.plugins.perm.events:subscribe':
+ 'Αντιδρά σε βασικά συμβάντα δραστηριότητας (όνομα συμβάντος + ταξίδι μόνο, ποτέ το περιεχόμενο)',
'admin.plugins.perm.http:outbound': 'Εκτέλεση εξερχόμενων αιτημάτων προς τους δηλωμένους hosts του',
'admin.plugins.updateConsentTitle': 'Αυτή η ενημέρωση χρειάζεται νέα δικαιώματα',
'admin.plugins.updateConsentBody':
@@ -317,11 +350,36 @@ const admin: TranslationStrings = {
'admin.plugins.restarted': 'Το plugin επανεκκινήθηκε',
'admin.plugins.cap.readsTrips': 'Διαβάζει τα ταξίδια σας',
'admin.plugins.cap.readsUsers': 'Διαβάζει βασικά προφίλ',
+ 'admin.plugins.cap.readsCosts': 'Διαβάζει τα έξοδά σας',
+ 'admin.plugins.cap.readsPacking': 'Διαβάζει λίστες αποσκευών',
+ 'admin.plugins.cap.readsFiles': 'Διαβάζει αρχεία ταξιδιού',
+ 'admin.plugins.cap.writesCosts': 'Προσθέτει έξοδα',
+ 'admin.plugins.cap.writesPlaces': 'Επεξεργάζεται τοποθεσίες',
+ 'admin.plugins.cap.writesDays': 'Επεξεργάζεται ημέρες',
+ 'admin.plugins.cap.writesItinerary': 'Επεξεργάζεται δρομολόγιο',
+ 'admin.plugins.cap.writesTrips': 'Επεξεργάζεται ταξίδια',
+ 'admin.plugins.cap.metadata': 'Προσθέτει μεταδεδομένα',
'admin.plugins.cap.widget': 'Widget πίνακα',
'admin.plugins.cap.heroWidget': 'Widget κάρτας επιβίβασης',
+ 'admin.plugins.cap.placeSlot': 'Λεπτομέρειες τόπου',
'admin.plugins.cap.realtime': 'Ενημερώσεις σε πραγματικό χρόνο',
'admin.plugins.cap.photos': 'Παρέχει φωτογραφίες',
'admin.plugins.cap.calendar': 'Παρέχει συμβάντα ημερολογίου',
+ 'admin.plugins.cap.placeDetails': 'Εμπλουτίζει μέρη',
+ 'admin.plugins.cap.warnings': 'Επισημαίνει ζητήματα',
+ 'admin.plugins.cap.events': 'Αντιδρά σε δραστηριότητα',
+ 'admin.plugins.cap.requiresAddon': 'Απαιτεί {addon}',
+ 'admin.plugins.cap.dependsOn': 'Χρειάζεται {id} {version}',
+ 'admin.plugins.dep.addonDisabledToast': 'Ενεργοποιήστε πρώτα τα απαιτούμενα πρόσθετα: {addons}',
+ 'admin.plugins.dep.autoEnabled': 'Ενεργοποιήθηκαν πρώτα τα απαιτούμενα πρόσθετα: {plugins}',
+ 'admin.plugins.dep.downloaded': 'Λήφθηκε το {id}',
+ 'admin.plugins.dep.resolveTitle': 'Λείπουν εξαρτήσεις',
+ 'admin.plugins.dep.resolveBody': 'Το «{name}» χρειάζεται να εγκατασταθούν αυτά τα πρόσθετα πριν ενεργοποιηθεί.',
+ 'admin.plugins.dep.requires': 'Απαιτεί {version}',
+ 'admin.plugins.dep.mismatch': 'Χρειάζεται {wanted} — είναι εγκατεστημένο το {installed}',
+ 'admin.plugins.dep.download': 'Λήψη',
+ 'admin.plugins.dep.update': 'Ενημέρωση',
+ 'admin.plugins.dep.resolveHint': 'Λαμβάνει την πιο πρόσφατη συμβατή έκδοση, μαζί με τις δικές της εξαρτήσεις.',
'admin.plugins.accessTitle': 'Σε τι έχει πρόσβαση',
'admin.plugins.connectsTitle': 'Συνδέεται σε',
'admin.plugins.detailsTitle': 'Λεπτομέρειες',
diff --git a/shared/src/i18n/gr/budget.ts b/shared/src/i18n/gr/budget.ts
index aa4396e1d..9f759af3c 100644
--- a/shared/src/i18n/gr/budget.ts
+++ b/shared/src/i18n/gr/budget.ts
@@ -53,6 +53,9 @@ const budget: TranslationStrings = {
'costs.nothingOwed': 'Δεν σας χρωστάει κανείς',
'costs.yourShare': 'Το μερίδιό σας',
'costs.youPaid': 'Πληρώσατε',
+ 'costs.outstanding': 'Εκκρεμές ποσό',
+ 'costs.outstandingSub': 'Έξοδα χωρίς πληρωτή ακόμη',
+ 'costs.outstandingItems': 'έξοδα χρειάζονται πληρωτή',
'costs.expenses': 'Έξοδα',
'costs.entries': '{count} εγγραφές',
'costs.searchPlaceholder': 'Αναζήτηση εξόδων…',
@@ -117,10 +120,10 @@ const budget: TranslationStrings = {
'costs.unfinishedHint': 'Μόνο στο σύνολο — δεν έχει διακανονιστεί',
'costs.tapToInclude': 'Πατήστε για προσθήκη',
'costs.amount': 'Ποσό',
- 'costs.split': "Split",
- 'costs.splitEqually': "Equally",
- 'costs.splitCustom': "Custom",
- 'costs.splitTicket': "Ticket",
+ 'costs.split': 'Split',
+ 'costs.splitEqually': 'Equally',
+ 'costs.splitCustom': 'Custom',
+ 'costs.splitTicket': 'Ticket',
'costs.filter.allCategories': 'Όλες οι κατηγορίες',
'costs.filter.allDays': 'Όλες οι ημέρες',
'costs.expensesCount': '{count} έξοδα',
diff --git a/shared/src/i18n/gr/collection.ts b/shared/src/i18n/gr/collection.ts
index 23fc84a82..26f68255c 100644
--- a/shared/src/i18n/gr/collection.ts
+++ b/shared/src/i18n/gr/collection.ts
@@ -49,7 +49,8 @@ const collection: TranslationStrings = {
'collections.editList': 'Μετονομασία',
'collections.listMenu': 'Επιλογές λίστας',
'collections.deleteList': 'Διαγραφή λίστας',
- 'collections.deleteListConfirm': 'Αυτό διαγράφει οριστικά τη λίστα και όλα τα αποθηκευμένα μέρη της. Δεν είναι δυνατή η αναίρεση.',
+ 'collections.deleteListConfirm':
+ 'Αυτό διαγράφει οριστικά τη λίστα και όλα τα αποθηκευμένα μέρη της. Δεν είναι δυνατή η αναίρεση.',
'collections.listName': 'Όνομα λίστας',
'collections.listNamePlaceholder': 'π.χ. Τόκιο 2025',
'collections.listColor': 'Χρώμα',
@@ -127,7 +128,8 @@ const collection: TranslationStrings = {
'collections.share.memberHint': 'Μόνο ο ιδιοκτήτης της λίστας μπορεί να προσκαλεί ή να αφαιρεί άτομα.',
'collections.share.cancel': 'Άκυρο',
'collections.share.leave': 'Αποχώρηση από τη λίστα',
- 'collections.share.leaveConfirm': 'Αποχώρηση από αυτή την κοινόχρηστη λίστα; Θα χάσεις την πρόσβαση μέχρι να προσκληθείς ξανά.',
+ 'collections.share.leaveConfirm':
+ 'Αποχώρηση από αυτή την κοινόχρηστη λίστα; Θα χάσεις την πρόσβαση μέχρι να προσκληθείς ξανά.',
'collections.share.left': 'Αποχώρησες από τη λίστα',
'collections.share.remove': 'Αφαίρεση',
diff --git a/shared/src/i18n/gr/help.ts b/shared/src/i18n/gr/help.ts
index caf2778ce..99421210b 100644
--- a/shared/src/i18n/gr/help.ts
+++ b/shared/src/i18n/gr/help.ts
@@ -2,12 +2,12 @@ import type { TranslationStrings } from '../types';
// English fallback until 'gr' is translated.
const help: TranslationStrings = {
- 'help.title': "Help & Docs",
- 'help.search': "Search docs…",
- 'help.contents': "Contents",
- 'help.noResults': "No matching pages.",
+ 'help.title': 'Help & Docs',
+ 'help.search': 'Search docs…',
+ 'help.contents': 'Contents',
+ 'help.noResults': 'No matching pages.',
'help.errorTitle': "Couldn't load this page",
- 'help.errorBody': "The help content is fetched from the TREK wiki. Check your connection and try again.",
+ 'help.errorBody': 'The help content is fetched from the TREK wiki. Check your connection and try again.',
};
export default help;
diff --git a/shared/src/i18n/gr/index.ts b/shared/src/i18n/gr/index.ts
index b9af5461f..eef4c74aa 100644
--- a/shared/src/i18n/gr/index.ts
+++ b/shared/src/i18n/gr/index.ts
@@ -5,11 +5,13 @@ import backup from './backup';
import budget from './budget';
import categories from './categories';
import collab from './collab';
+import collection from './collection';
import common from './common';
import dashboard from './dashboard';
import day from './day';
import dayplan from './dayplan';
import files from './files';
+import help from './help';
import inspector from './inspector';
import journey from './journey';
import login from './login';
@@ -39,8 +41,6 @@ import trip from './trip';
import trips from './trips';
import undo from './undo';
import vacay from './vacay';
-import collection from './collection';
-import help from './help';
const locale = {
...common,
diff --git a/shared/src/i18n/gr/login.ts b/shared/src/i18n/gr/login.ts
index 1938a6592..50c7a346f 100644
--- a/shared/src/i18n/gr/login.ts
+++ b/shared/src/i18n/gr/login.ts
@@ -89,7 +89,8 @@ const login: TranslationStrings = {
'login.passkey.signIn': 'Σύνδεση με passkey',
'login.passkey.failed': 'Η σύνδεση με passkey απέτυχε. Παρακαλώ δοκιμάστε ξανά.',
'login.insecureCookie.title': "Login won't stick over HTTP",
- 'login.insecureCookie.body': "You’re connecting over plain HTTP, so your browser drops TREK’s secure session cookie — the next request fails with \"Access token required\". Fix: use HTTPS, or for a home-lab set COOKIE_SECURE=false.",
- 'login.insecureCookie.link': "Open the Troubleshooting guide",
+ 'login.insecureCookie.body':
+ 'You’re connecting over plain HTTP, so your browser drops TREK’s secure session cookie — the next request fails with "Access token required". Fix: use HTTPS, or for a home-lab set COOKIE_SECURE=false.',
+ 'login.insecureCookie.link': 'Open the Troubleshooting guide',
};
export default login;
diff --git a/shared/src/i18n/gr/members.ts b/shared/src/i18n/gr/members.ts
index f32456f01..8f8becf86 100644
--- a/shared/src/i18n/gr/members.ts
+++ b/shared/src/i18n/gr/members.ts
@@ -25,13 +25,15 @@ const members: TranslationStrings = {
'members.transferError': 'Αποτυχία μεταβίβασης ιδιοκτησίας',
'members.guests': 'Επισκέπτες',
'members.guest': 'Επισκέπτης',
- 'members.guestsHint': 'Άτομα χωρίς λογαριασμό. Μπορούν να ανατεθούν σε έξοδα, αποσκευές και εργασίες, αλλά δεν μπορούν να συνδεθούν.',
+ 'members.guestsHint':
+ 'Άτομα χωρίς λογαριασμό. Μπορούν να ανατεθούν σε έξοδα, αποσκευές και εργασίες, αλλά δεν μπορούν να συνδεθούν.',
'members.addGuest': 'Προσθήκη επισκέπτη',
'members.guestNamePlaceholder': 'Όνομα επισκέπτη',
'members.guestAdded': 'Ο επισκέπτης προστέθηκε',
'members.guestAddError': 'Αποτυχία προσθήκης επισκέπτη',
'members.guestRenameError': 'Αποτυχία μετονομασίας επισκέπτη',
'members.guestRemoved': 'Ο επισκέπτης αφαιρέθηκε',
- 'members.confirmRemoveGuest': 'Αφαίρεση αυτού του επισκέπτη; Θα αφαιρεθούν επίσης οι αναθέσεις και τα μερίδια εξόδων του.',
+ 'members.confirmRemoveGuest':
+ 'Αφαίρεση αυτού του επισκέπτη; Θα αφαιρεθούν επίσης οι αναθέσεις και τα μερίδια εξόδων του.',
};
export default members;
diff --git a/shared/src/i18n/gr/places.ts b/shared/src/i18n/gr/places.ts
index 0a15e87c3..171637ae6 100644
--- a/shared/src/i18n/gr/places.ts
+++ b/shared/src/i18n/gr/places.ts
@@ -24,8 +24,8 @@ const places: TranslationStrings = {
'places.kmlImportNoneSelected': 'Επιλέξτε τουλάχιστον έναν τύπο για εισαγωγή.',
'places.selectionCount': '{count} επιλεγμένα',
'places.deleteSelected': 'Διαγραφή επιλεγμένων',
- 'places.changeCategory': "Change category",
- 'places.categoryChanged': "{count} places updated",
+ 'places.changeCategory': 'Change category',
+ 'places.categoryChanged': '{count} places updated',
'places.kmlKmzImported': '{count} μέρη εισήχθησαν από KMZ/KML',
'places.urlResolved': 'Το μέρος εισήχθη από URL',
'places.importList': 'Εισαγωγή Λίστας',
diff --git a/shared/src/i18n/gr/settings.ts b/shared/src/i18n/gr/settings.ts
index 67bc16307..f0ef67639 100644
--- a/shared/src/i18n/gr/settings.ts
+++ b/shared/src/i18n/gr/settings.ts
@@ -30,7 +30,8 @@ const settings: TranslationStrings = {
'settings.mapStylePlaceholder': 'Επιλέξτε ένα στυλ Mapbox',
'settings.mapStyleHint': 'Προκαθορισμένο ή δικό σας mapbox://styles/USER/ID URL',
'settings.mapOpenFreeMapStylePlaceholder': 'Επιλέξτε ένα στυλ OpenFreeMap',
- 'settings.mapOpenFreeMapStyleHint': 'Προκαθορισμένο ή URL στυλ OpenFreeMap. Τα στυλ OpenFreeMap λειτουργούν χωρίς token.',
+ 'settings.mapOpenFreeMapStyleHint':
+ 'Προκαθορισμένο ή URL στυλ OpenFreeMap. Τα στυλ OpenFreeMap λειτουργούν χωρίς token.',
'settings.map3dBuildings': '3D Κτίρια & Ανάγλυφο',
'settings.map3dHint':
'Κλίση + πραγματικές 3D προεξοχές κτιρίων — λειτουργεί σε κάθε στυλ, συμπεριλαμβανομένου του δορυφορικού.',
@@ -337,18 +338,21 @@ const settings: TranslationStrings = {
'settings.airtrail.test.success': 'Συνδέθηκε — βρέθηκαν {count} πτήση/πτήσεις',
'settings.airtrail.test.failed': 'Η σύνδεση απέτυχε',
'settings.aiParsing.title': 'Ανάλυση με AI',
- 'settings.aiParsing.hint': 'Χρησιμοποιήστε το δικό σας μοντέλο AI για την εξαγωγή κρατήσεων από τα αρχεία που ανεβάζετε. Ισχύει μόνο όταν ο διαχειριστής σας δεν έχει ρυθμίσει μοντέλο για ολόκληρη την εγκατάσταση.',
+ 'settings.aiParsing.hint':
+ 'Χρησιμοποιήστε το δικό σας μοντέλο AI για την εξαγωγή κρατήσεων από τα αρχεία που ανεβάζετε. Ισχύει μόνο όταν ο διαχειριστής σας δεν έχει ρυθμίσει μοντέλο για ολόκληρη την εγκατάσταση.',
'settings.aiParsing.provider': 'Πάροχος',
'settings.aiParsing.providerLocal': 'Τοπικό (Ollama)',
'settings.aiParsing.providerOpenai': 'OpenAI',
'settings.aiParsing.providerAnthropic': 'Anthropic',
'settings.aiParsing.model': 'Μοντέλο',
'settings.aiParsing.baseUrl': 'Βασικό URL',
- 'settings.aiParsing.baseUrlHint': 'Πού εκτελείται το μοντέλο — ένας τοπικός διακομιστής Ollama ή ένα τελικό σημείο συμβατό με OpenAI.',
+ 'settings.aiParsing.baseUrlHint':
+ 'Πού εκτελείται το μοντέλο — ένας τοπικός διακομιστής Ollama ή ένα τελικό σημείο συμβατό με OpenAI.',
'settings.aiParsing.apiKey': 'Κλειδί API',
'settings.aiParsing.apiKeyHint': 'Αποθηκεύεται κρυπτογραφημένο. Αφήστε το κενό για να διατηρήσετε το τρέχον κλειδί.',
'settings.aiParsing.multimodal': 'Αποστολή εγγράφων ως εικόνες',
- 'settings.aiParsing.multimodalHint': 'Για μοντέλα με δυνατότητα όρασης — στέλνει το αρχικό PDF αντί για το εξαγόμενο κείμενο.',
+ 'settings.aiParsing.multimodalHint':
+ 'Για μοντέλα με δυνατότητα όρασης — στέλνει το αρχικό PDF αντί για το εξαγόμενο κείμενο.',
'settings.aiParsing.toast.saved': 'Οι ρυθμίσεις AI αποθηκεύτηκαν',
'settings.aiParsing.toast.saveError': 'Δεν ήταν δυνατή η αποθήκευση των ρυθμίσεων AI',
'settings.tabs.appearance': 'Appearance',
@@ -367,7 +371,8 @@ const settings: TranslationStrings = {
'settings.appearance.contrastLow': 'Low contrast',
'settings.appearance.readability': 'Readability',
'settings.appearance.transparency': 'Transparency',
- 'settings.appearance.transparencyHint': 'Glassy translucent surfaces. Turn off for solid, higher-contrast backgrounds.',
+ 'settings.appearance.transparencyHint':
+ 'Glassy translucent surfaces. Turn off for solid, higher-contrast backgrounds.',
'settings.appearance.reduceMotion': 'Reduce motion',
'settings.appearance.reduceMotionHint': 'Minimize animations and transitions.',
'settings.appearance.density': 'Density',
@@ -397,7 +402,8 @@ const settings: TranslationStrings = {
'settings.appearance.group.belowHero': 'Below the hero',
'settings.appearance.group.bottomOfPage': 'Bottom of page',
'settings.appearance.sidebarHint': 'The whole right column. Turn off and the dashboard centers.',
- 'settings.appearance.densityHint': 'Compact tightens spacing and padding for a denser layout that fits more on screen.',
+ 'settings.appearance.densityHint':
+ 'Compact tightens spacing and padding for a denser layout that fits more on screen.',
'settings.appearance.textSizeAll': 'Everything',
'settings.appearance.perSize': 'Adjust each size separately',
'settings.appearance.size.large': 'Large',
@@ -420,10 +426,13 @@ const settings: TranslationStrings = {
'settings.offline.cache.title': 'Προσωρινή μνήμη εκτός σύνδεσης',
'settings.offline.mode.title': 'Λειτουργία εκτός σύνδεσης',
'settings.offline.mode.force': 'Εξαναγκασμός λειτουργίας εκτός σύνδεσης',
- 'settings.offline.mode.forceHint': 'Εργαστείτε μόνο με τα αποθηκευμένα δεδομένα και τοποθετήστε τις αλλαγές σας σε ουρά. Απενεργοποιήστε το για επανασύνδεση και συγχρονισμό.',
- 'settings.offline.mode.active': 'Η λειτουργία εκτός σύνδεσης είναι ενεργή — οι αλλαγές σας βρίσκονται σε ουρά και θα συγχρονιστούν όταν την απενεργοποιήσετε.',
+ 'settings.offline.mode.forceHint':
+ 'Εργαστείτε μόνο με τα αποθηκευμένα δεδομένα και τοποθετήστε τις αλλαγές σας σε ουρά. Απενεργοποιήστε το για επανασύνδεση και συγχρονισμό.',
+ 'settings.offline.mode.active':
+ 'Η λειτουργία εκτός σύνδεσης είναι ενεργή — οι αλλαγές σας βρίσκονται σε ουρά και θα συγχρονιστούν όταν την απενεργοποιήσετε.',
'settings.offline.prepare.title': 'Προετοιμασία για εκτός σύνδεσης',
- 'settings.offline.prepare.hint': 'Κατεβάστε όλα όσα χρειάζεστε — δεδομένα ταξιδιού, έγγραφα και πλακίδια χάρτη — πριν χάσετε τη σύνδεση.',
+ 'settings.offline.prepare.hint':
+ 'Κατεβάστε όλα όσα χρειάζεστε — δεδομένα ταξιδιού, έγγραφα και πλακίδια χάρτη — πριν χάσετε τη σύνδεση.',
'settings.offline.prepare.button': 'Λήψη για χρήση εκτός σύνδεσης',
'settings.offline.prepare.running': 'Λήψη…',
'settings.offline.prepare.done': 'Έτοιμο για χρήση εκτός σύνδεσης',
@@ -434,12 +443,14 @@ const settings: TranslationStrings = {
'settings.offline.resyncing': 'Συγχρονισμός…',
'settings.offline.storage.title': 'Τι να αποθηκεύεται εκτός σύνδεσης',
'settings.offline.storage.tiles': 'Αποθήκευση πλακιδίων χάρτη εκτός σύνδεσης',
- 'settings.offline.storage.tilesHint': 'Τα πλακίδια χάρτη καταναλώνουν τον περισσότερο χώρο αποθήκευσης. Απενεργοποιήστε το για να διατηρείτε εκτός σύνδεσης μόνο δεδομένα ταξιδιού και έγγραφα.',
+ 'settings.offline.storage.tilesHint':
+ 'Τα πλακίδια χάρτη καταναλώνουν τον περισσότερο χώρο αποθήκευσης. Απενεργοποιήστε το για να διατηρείτε εκτός σύνδεσης μόνο δεδομένα ταξιδιού και έγγραφα.',
'settings.offline.storage.tripsTitle': 'Ταξίδια',
'settings.offline.storage.tripOn': 'Αποθηκευμένο εκτός σύνδεσης',
'settings.offline.storage.tripOff': 'Μη αποθηκευμένο',
'settings.offline.clear': 'Εκκαθάριση προσωρινής μνήμης',
- 'settings.offline.clearConfirm': 'Εκκαθάριση όλων των δεδομένων ταξιδιού εκτός σύνδεσης; Μπορείτε να επανασυγχρονίσετε ανά πάσα στιγμή όσο είστε συνδεδεμένοι.',
+ 'settings.offline.clearConfirm':
+ 'Εκκαθάριση όλων των δεδομένων ταξιδιού εκτός σύνδεσης; Μπορείτε να επανασυγχρονίσετε ανά πάσα στιγμή όσο είστε συνδεδεμένοι.',
'settings.offline.stats.trips': 'Ταξίδια σε προσωρινή μνήμη',
'settings.offline.stats.pending': 'Εκκρεμείς αλλαγές',
'settings.offline.stats.failed': 'Αποτυχημένες αλλαγές',
@@ -447,7 +458,8 @@ const settings: TranslationStrings = {
'settings.offline.empty': 'Δεν υπάρχουν ταξίδια σε προσωρινή μνήμη ακόμη. Συνδεθείτε στο διαδίκτυο για συγχρονισμό.',
'settings.offline.loading': 'Φόρτωση…',
'settings.offline.conflicts.title': 'Διενέξεις συγχρονισμού',
- 'settings.offline.conflicts.hint': 'Οι αλλαγές που κάνατε εκτός σύνδεσης συγκρούονται με νεότερες αλλαγές στον διακομιστή. Επιλέξτε ποια έκδοση να διατηρήσετε.',
+ 'settings.offline.conflicts.hint':
+ 'Οι αλλαγές που κάνατε εκτός σύνδεσης συγκρούονται με νεότερες αλλαγές στον διακομιστή. Επιλέξτε ποια έκδοση να διατηρήσετε.',
'settings.offline.conflicts.keepMine': 'Διατήρηση της δικής μου',
'settings.offline.conflicts.keepServer': 'Διατήρηση του διακομιστή',
'settings.offline.conflicts.mine': 'Η έκδοσή σας',
diff --git a/shared/src/i18n/gr/trip.ts b/shared/src/i18n/gr/trip.ts
index f61ecd600..dd5d5f6c7 100644
--- a/shared/src/i18n/gr/trip.ts
+++ b/shared/src/i18n/gr/trip.ts
@@ -28,7 +28,8 @@ const trip: TranslationStrings = {
'trip.confirm.deletePlaces': 'Διαγραφή {count} μερών;',
'trip.toast.placesDeleted': '{count} μέρη διαγράφηκαν',
'trip.invite.linkTitle': 'Σύνδεσμος πρόσκλησης ταξιδιού',
- 'trip.invite.linkHint': 'Όποιος έχει λογαριασμό TREK και ανοίξει αυτόν τον σύνδεσμο, εντάσσεται στο ταξίδι ως μέλος. Δημιουργήστε ξανά τον σύνδεσμο για να ακυρώσετε τον παλιό.',
+ 'trip.invite.linkHint':
+ 'Όποιος έχει λογαριασμό TREK και ανοίξει αυτόν τον σύνδεσμο, εντάσσεται στο ταξίδι ως μέλος. Δημιουργήστε ξανά τον σύνδεσμο για να ακυρώσετε τον παλιό.',
'trip.invite.create': 'Δημιουργία συνδέσμου πρόσκλησης',
'trip.invite.regenerate': 'Δημιουργία ξανά',
'trip.invite.disable': 'Απενεργοποίηση',
@@ -75,10 +76,12 @@ const trip: TranslationStrings = {
'transit.changeRoute': 'Αλλαγή διαδρομής',
'transit.journey': 'Διαδρομή με δημόσιες συγκοινωνίες',
'transit.pickDay': 'Επιλέξτε μια ημέρα για αναζήτηση συνδέσεων.',
- 'transit.noItinerary': 'Αυτή η καταχώριση δεν έχει αποθηκευμένο δρομολόγιο — χρησιμοποιήστε την «Αλλαγή διαδρομής» για να αναζητήσετε ένα.',
+ 'transit.noItinerary':
+ 'Αυτή η καταχώριση δεν έχει αποθηκευμένο δρομολόγιο — χρησιμοποιήστε την «Αλλαγή διαδρομής» για να αναζητήσετε ένα.',
'transit.durationLabel': 'Διάρκεια',
'transit.transfersLabel': 'Μετεπιβιβάσεις',
'transit.walkLabel': 'Περπάτημα',
- 'transit.searchHint': 'Αναζητήστε πραγματικές συνδέσεις και προσθέστε τις απευθείας στην ημέρα — δεδομένα μέσω Transitous.',
+ 'transit.searchHint':
+ 'Αναζητήστε πραγματικές συνδέσεις και προσθέστε τις απευθείας στην ημέρα — δεδομένα μέσω Transitous.',
};
export default trip;
diff --git a/shared/src/i18n/gr/undo.ts b/shared/src/i18n/gr/undo.ts
index 30d4048b6..0de153f41 100644
--- a/shared/src/i18n/gr/undo.ts
+++ b/shared/src/i18n/gr/undo.ts
@@ -9,7 +9,7 @@ const undo: TranslationStrings = {
'undo.optimize': 'Η διαδρομή βελτιστοποιήθηκε',
'undo.deletePlace': 'Η τοποθεσία διαγράφηκε',
'undo.deletePlaces': 'Οι τοποθεσίες διαγράφηκαν',
- 'undo.changeCategory': "Category changed",
+ 'undo.changeCategory': 'Category changed',
'undo.moveDay': 'Η τοποθεσία μεταφέρθηκε σε άλλη ημέρα',
'undo.lock': 'Το κλείδωμα τοποθεσίας εναλλάχθηκε',
'undo.importGpx': 'Εισαγωγή GPX',
diff --git a/shared/src/i18n/hu/admin.ts b/shared/src/i18n/hu/admin.ts
index 0efa840cd..3fce4cafd 100644
--- a/shared/src/i18n/hu/admin.ts
+++ b/shared/src/i18n/hu/admin.ts
@@ -95,6 +95,8 @@ const admin: TranslationStrings = {
'admin.recommended': 'Ajánlott',
'admin.weatherKey': 'OpenWeatherMap API kulcs',
'admin.weatherKeyHint': 'Időjárás adatokhoz. Ingyenes: openweathermap.org',
+ 'admin.unsplashKey': 'Unsplash API-kulcs',
+ 'admin.unsplashKeyHint': 'Képkereséshez. Ingyenes: unsplash.com/developers',
'admin.validateKey': 'Teszt',
'admin.keyValid': 'Csatlakozva',
'admin.keyInvalid': 'Érvénytelen',
@@ -162,6 +164,11 @@ const admin: TranslationStrings = {
'admin.tabs.plugins': 'Pluginok',
'admin.plugins.rescan': 'Újraszkennelés',
'admin.plugins.rescanned': 'Plugin mappa újraszkennelve',
+ 'admin.plugins.upload': 'Plugin feltöltése',
+ 'admin.plugins.dropToUpload': 'Húzz ide egy plugin .zip fájlt a telepítéshez',
+ 'admin.plugins.uploaded': 'A(z) “{name}” plugin feltöltve — aktiváld a futtatáshoz',
+ 'admin.plugins.sideloaded': 'Manuálisan betöltve',
+ 'admin.plugins.sideloadedHint': 'Manuálisan feltöltve — nem a tárból, aláíratlan és ellenőrizetlen',
'admin.plugins.browse': 'Pluginok böngészése',
'admin.plugins.installed': 'Telepítve',
'admin.plugins.install': 'Telepítés',
@@ -176,11 +183,13 @@ const admin: TranslationStrings = {
'admin.plugins.noErrors': 'Nincsenek naplózott hibák.',
'admin.plugins.uninstalled': 'Plugin eltávolítva',
'admin.plugins.uninstallTitle': 'Plugin eltávolítása?',
- 'admin.plugins.uninstallBody': 'Ez leállítja a plugint, eltávolítja a kódját, és törli az összes adatát. Ez nem vonható vissza.',
+ 'admin.plugins.uninstallBody':
+ 'Ez leállítja a plugint, eltávolítja a kódját, és törli az összes adatát. Ez nem vonható vissza.',
'admin.plugins.status.starting': 'Indítás…',
'admin.plugins.type.widget': 'Widget',
'admin.plugins.type.page': 'Oldal',
'admin.plugins.type.integration': 'Integráció',
+ 'admin.plugins.type.trip-page': 'Útvonal-oldal',
'admin.plugins.reviewed': 'Ellenőrizve',
'admin.plugins.unreviewed': 'Nem ellenőrzött',
'admin.plugins.updated': 'Plugin frissítve',
@@ -190,10 +199,12 @@ const admin: TranslationStrings = {
'admin.plugins.title': 'Pluginok',
'admin.plugins.subtitle': 'Harmadik féltől származó pluginok telepítése és kezelése a példányodon.',
'admin.plugins.disabledTitle': 'A pluginok le vannak tiltva',
- 'admin.plugins.disabledBody': 'A plugin futtatókörnyezet ki van kapcsolva (TREK_PLUGINS_ENABLED). Egyetlen plugin sem futhat, amíg egy admin nem engedélyezi a szerverkonfigurációban.',
+ 'admin.plugins.disabledBody':
+ 'A plugin futtatókörnyezet ki van kapcsolva (TREK_PLUGINS_ENABLED). Egyetlen plugin sem futhat, amíg egy admin nem engedélyezi a szerverkonfigurációban.',
'admin.plugins.empty': 'Még nincsenek telepített pluginok.',
'admin.plugins.loadError': 'Nem sikerült betölteni a pluginokat.',
- 'admin.plugins.scaffoldNote': 'A pluginok telepítése és aktiválása egy későbbi frissítésben érkezik. Ez a panel jelenleg csak a telepített pluginokat listázza.',
+ 'admin.plugins.scaffoldNote':
+ 'A pluginok telepítése és aktiválása egy későbbi frissítésben érkezik. Ez a panel jelenleg csak a telepített pluginokat listázza.',
'admin.plugins.status.active': 'Aktív',
'admin.plugins.status.inactive': 'Inaktív',
'admin.plugins.status.disabled': 'Letiltva',
@@ -216,10 +227,32 @@ const admin: TranslationStrings = {
'admin.plugins.perm.db:own': 'Saját adatok tárolása elkülönített adatbázisban',
'admin.plugins.perm.db:read:trips': 'Az aktuális felhasználó számára elérhető utazások olvasása',
'admin.plugins.perm.db:read:users': 'Alapvető profiladatok olvasása (név, profilkép — hitelesítő adatok soha)',
+ 'admin.plugins.perm.db:read:costs': 'Az aktuális felhasználó számára elérhető költségek (költségtételek) olvasása',
+ 'admin.plugins.perm.db:read:packing':
+ 'Az aktuális felhasználó számára elérhető utazások csomagolási listáinak olvasása',
+ 'admin.plugins.perm.db:read:files': 'Az aktuális felhasználó számára elérhető utazások fájljainak olvasása',
+ 'admin.plugins.perm.db:write:costs':
+ 'Költségek (költségtételek) létrehozása az aktuális felhasználó által szerkeszthető utazásokon',
+ 'admin.plugins.perm.db:write:places':
+ 'Helyek hozzáadása, szerkesztése és eltávolítása az aktuális felhasználó által szerkeszthető utazásokon',
+ 'admin.plugins.perm.db:write:days':
+ 'Napok hozzáadása, szerkesztése és eltávolítása az aktuális felhasználó által szerkeszthető utazásokon',
+ 'admin.plugins.perm.db:write:itinerary':
+ 'Helyek hozzárendelése és eltávolítása az aktuális felhasználó által szerkeszthető utazások napjain',
+ 'admin.plugins.perm.db:write:trips':
+ 'Utazás adatainak szerkesztése (cím, dátumok, pénznem…) az aktuális felhasználó által szerkeszthető utazásokon',
+ 'admin.plugins.perm.db:meta':
+ 'Saját privát adatok csatolása az aktuális felhasználó által elérhető utazásokhoz, helyekhez és napokhoz',
'admin.plugins.perm.ws:broadcast:trip': 'Valós idejű frissítések küldése az utazás tagjainak',
'admin.plugins.perm.ws:broadcast:user': 'Valós idejű frissítések küldése egyes felhasználóknak',
'admin.plugins.perm.hook:photo-provider': 'Fotók biztosítása az Emlékek funkcióhoz',
'admin.plugins.perm.hook:calendar-source': 'Események biztosítása a naptárhoz',
+ 'admin.plugins.perm.hook:place-detail-provider':
+ 'További részletek (értékelések, minősítések, hivatkozások) hozzáadása egy helyhez',
+ 'admin.plugins.perm.hook:trip-warning-provider':
+ 'Ellenőrzési figyelmeztetések megjelenítése egy utazáson (a tervezőben látható)',
+ 'admin.plugins.perm.events:subscribe':
+ 'Reagál az alapvető tevékenységi eseményekre (csak eseménynév + utazás, soha nem a tartalom)',
'admin.plugins.perm.http:outbound': 'Kimenő kérések küldése a bejelentett kiszolgálók felé',
'admin.plugins.updateConsentTitle': 'Ez a frissítés új engedélyeket igényel',
'admin.plugins.updateConsentBody':
@@ -271,11 +304,36 @@ const admin: TranslationStrings = {
'admin.plugins.restarted': 'Plugin újraindítva',
'admin.plugins.cap.readsTrips': 'Olvassa az utazásaidat',
'admin.plugins.cap.readsUsers': 'Olvassa az alapprofilokat',
+ 'admin.plugins.cap.readsCosts': 'Olvassa a költségeidet',
+ 'admin.plugins.cap.readsPacking': 'Csomagolási listákat olvas',
+ 'admin.plugins.cap.readsFiles': 'Utazási fájlokat olvas',
+ 'admin.plugins.cap.writesCosts': 'Költségeket ad hozzá',
+ 'admin.plugins.cap.writesPlaces': 'Helyeket szerkeszt',
+ 'admin.plugins.cap.writesDays': 'Napokat szerkeszt',
+ 'admin.plugins.cap.writesItinerary': 'Útitervet szerkeszt',
+ 'admin.plugins.cap.writesTrips': 'Utazásokat szerkeszt',
+ 'admin.plugins.cap.metadata': 'Metaadatot ad',
'admin.plugins.cap.widget': 'Irányítópult-widget',
'admin.plugins.cap.heroWidget': 'Beszállókártya-widget',
+ 'admin.plugins.cap.placeSlot': 'Hely részletei',
'admin.plugins.cap.realtime': 'Valós idejű frissítések',
'admin.plugins.cap.photos': 'Fotókat biztosít',
'admin.plugins.cap.calendar': 'Naptáreseményeket biztosít',
+ 'admin.plugins.cap.placeDetails': 'Helyeket gazdagít',
+ 'admin.plugins.cap.warnings': 'Problémákat jelez',
+ 'admin.plugins.cap.events': 'Reagál a tevékenységre',
+ 'admin.plugins.cap.requiresAddon': '{addon} szükséges',
+ 'admin.plugins.cap.dependsOn': '{id} {version} szükséges',
+ 'admin.plugins.dep.addonDisabledToast': 'Előbb engedélyezze a szükséges bővítmény(eke)t: {addons}',
+ 'admin.plugins.dep.autoEnabled': 'Előbb engedélyezett szükséges pluginek: {plugins}',
+ 'admin.plugins.dep.downloaded': '{id} letöltve',
+ 'admin.plugins.dep.resolveTitle': 'Hiányzó függőségek',
+ 'admin.plugins.dep.resolveBody': 'A(z) „{name}” engedélyezéséhez előbb telepíteni kell ezeket a plugineket.',
+ 'admin.plugins.dep.requires': '{version} szükséges',
+ 'admin.plugins.dep.mismatch': '{wanted} szükséges — {installed} van telepítve',
+ 'admin.plugins.dep.download': 'Letöltés',
+ 'admin.plugins.dep.update': 'Frissítés',
+ 'admin.plugins.dep.resolveHint': 'Letölti a legújabb kompatibilis verziót a saját függőségeivel együtt.',
'admin.plugins.accessTitle': 'Mihez fér hozzá',
'admin.plugins.connectsTitle': 'Kapcsolódik ehhez',
'admin.plugins.detailsTitle': 'Részletek',
@@ -489,7 +547,8 @@ const admin: TranslationStrings = {
'admin.group.maintenance': 'Maintenance',
'admin.invite.tripLabel': 'Hozzáadás utazáshoz (opcionális)',
'admin.invite.tripNone': 'Nincs utazás',
- 'admin.invite.tripHint': 'Az új felhasználó automatikusan hozzáadódik ehhez az utazáshoz, amikor a linken keresztül regisztrál.',
+ 'admin.invite.tripHint':
+ 'Az új felhasználó automatikusan hozzáadódik ehhez az utazáshoz, amikor a linken keresztül regisztrál.',
'admin.invite.boundTo': 'hozzáadja a következőhöz: {trip}',
};
export default admin;
diff --git a/shared/src/i18n/hu/budget.ts b/shared/src/i18n/hu/budget.ts
index 3152ff8f2..dbcc600b4 100644
--- a/shared/src/i18n/hu/budget.ts
+++ b/shared/src/i18n/hu/budget.ts
@@ -52,6 +52,9 @@ const budget: TranslationStrings = {
'costs.nothingOwed': 'Senki sem tartozik neked',
'costs.yourShare': 'A te részed',
'costs.youPaid': 'Te fizettél',
+ 'costs.outstanding': 'Rendezetlen összeg',
+ 'costs.outstandingSub': 'Fizető nélküli költségek',
+ 'costs.outstandingItems': 'költség fizetőre vár',
'costs.expenses': 'Költségek',
'costs.entries': '{count} bejegyzés',
'costs.searchPlaceholder': 'Költségek keresése…',
@@ -116,10 +119,10 @@ const budget: TranslationStrings = {
'costs.unfinishedHint': 'Csak az összegben — még nincs rendezve',
'costs.tapToInclude': 'Koppintson a hozzáadáshoz',
'costs.amount': 'Összeg',
- 'costs.split': "Split",
- 'costs.splitEqually': "Equally",
- 'costs.splitCustom': "Custom",
- 'costs.splitTicket': "Ticket",
+ 'costs.split': 'Split',
+ 'costs.splitEqually': 'Equally',
+ 'costs.splitCustom': 'Custom',
+ 'costs.splitTicket': 'Ticket',
'costs.filter.allCategories': 'Összes kategória',
'costs.filter.allDays': 'Összes nap',
'costs.expensesCount': '{count} kiadás',
diff --git a/shared/src/i18n/hu/collection.ts b/shared/src/i18n/hu/collection.ts
index d6722065c..d589a76d1 100644
--- a/shared/src/i18n/hu/collection.ts
+++ b/shared/src/i18n/hu/collection.ts
@@ -49,7 +49,8 @@ const collection: TranslationStrings = {
'collections.editList': 'Átnevezés',
'collections.listMenu': 'Lista beállításai',
'collections.deleteList': 'Lista törlése',
- 'collections.deleteListConfirm': 'Ez véglegesen törli a listát és az összes benne mentett helyet. Ez nem vonható vissza.',
+ 'collections.deleteListConfirm':
+ 'Ez véglegesen törli a listát és az összes benne mentett helyet. Ez nem vonható vissza.',
'collections.listName': 'Lista neve',
'collections.listNamePlaceholder': 'pl. Tokió 2025',
'collections.listColor': 'Szín',
@@ -61,7 +62,8 @@ const collection: TranslationStrings = {
'collections.empty.noMatchTitle': 'Nincs találat',
'collections.empty.noMatchText': 'Egyetlen mentett hely sem felel meg a szűrőnek vagy a keresésnek.',
'collections.empty.firstTitle': 'Kezdd el az első gyűjteményed',
- 'collections.empty.firstText': 'Hozz létre egy listát, hogy elmenthesd a helyeket, amelyekre utazásokon átívelően emlékezni szeretnél.',
+ 'collections.empty.firstText':
+ 'Hozz létre egy listát, hogy elmenthesd a helyeket, amelyekre utazásokon átívelően emlékezni szeretnél.',
'collections.view.grid': 'Rács',
'collections.view.list': 'Lista',
@@ -127,7 +129,8 @@ const collection: TranslationStrings = {
'collections.share.memberHint': 'Csak a lista tulajdonosa hívhat meg vagy távolíthat el embereket.',
'collections.share.cancel': 'Mégse',
'collections.share.leave': 'Lista elhagyása',
- 'collections.share.leaveConfirm': 'Elhagyod ezt a megosztott listát? Elveszíted a hozzáférést, amíg újra meg nem hívnak.',
+ 'collections.share.leaveConfirm':
+ 'Elhagyod ezt a megosztott listát? Elveszíted a hozzáférést, amíg újra meg nem hívnak.',
'collections.share.left': 'Elhagytad a listát',
'collections.share.remove': 'Eltávolítás',
diff --git a/shared/src/i18n/hu/dashboard.ts b/shared/src/i18n/hu/dashboard.ts
index f601e1332..5ba0bef1f 100644
--- a/shared/src/i18n/hu/dashboard.ts
+++ b/shared/src/i18n/hu/dashboard.ts
@@ -43,7 +43,8 @@ const dashboard: TranslationStrings = {
'dashboard.status.past': 'Múlt',
'dashboard.status.daysLeft': 'Még {count} nap',
'dashboard.toast.loadError': 'Nem sikerült betölteni az utazásokat',
- 'dashboard.loadErrorBanner': 'Nem sikerült elérni a kiszolgálót. Az utazásaid biztonságban vannak — kérlek, próbáld újra.',
+ 'dashboard.loadErrorBanner':
+ 'Nem sikerült elérni a kiszolgálót. Az utazásaid biztonságban vannak — kérlek, próbáld újra.',
'dashboard.retry': 'Újra',
'dashboard.toast.created': 'Utazás sikeresen létrehozva!',
'dashboard.toast.createError': 'Nem sikerült létrehozni',
diff --git a/shared/src/i18n/hu/help.ts b/shared/src/i18n/hu/help.ts
index b9f2e9745..b2f7c054b 100644
--- a/shared/src/i18n/hu/help.ts
+++ b/shared/src/i18n/hu/help.ts
@@ -2,12 +2,12 @@ import type { TranslationStrings } from '../types';
// English fallback until 'hu' is translated.
const help: TranslationStrings = {
- 'help.title': "Help & Docs",
- 'help.search': "Search docs…",
- 'help.contents': "Contents",
- 'help.noResults': "No matching pages.",
+ 'help.title': 'Help & Docs',
+ 'help.search': 'Search docs…',
+ 'help.contents': 'Contents',
+ 'help.noResults': 'No matching pages.',
'help.errorTitle': "Couldn't load this page",
- 'help.errorBody': "The help content is fetched from the TREK wiki. Check your connection and try again.",
+ 'help.errorBody': 'The help content is fetched from the TREK wiki. Check your connection and try again.',
};
export default help;
diff --git a/shared/src/i18n/hu/index.ts b/shared/src/i18n/hu/index.ts
index 34cccd9b9..54ae72ed6 100644
--- a/shared/src/i18n/hu/index.ts
+++ b/shared/src/i18n/hu/index.ts
@@ -5,11 +5,13 @@ import backup from './backup';
import budget from './budget';
import categories from './categories';
import collab from './collab';
+import collection from './collection';
import common from './common';
import dashboard from './dashboard';
import day from './day';
import dayplan from './dayplan';
import files from './files';
+import help from './help';
import inspector from './inspector';
import journey from './journey';
import login from './login';
@@ -39,8 +41,6 @@ import trip from './trip';
import trips from './trips';
import undo from './undo';
import vacay from './vacay';
-import collection from './collection';
-import help from './help';
const locale = {
...common,
diff --git a/shared/src/i18n/hu/login.ts b/shared/src/i18n/hu/login.ts
index ab1e2c22b..bdb2e8695 100644
--- a/shared/src/i18n/hu/login.ts
+++ b/shared/src/i18n/hu/login.ts
@@ -87,7 +87,8 @@ const login: TranslationStrings = {
'login.passkey.signIn': 'Bejelentkezés passkey-jel',
'login.passkey.failed': 'A passkey-bejelentkezés sikertelen. Kérjük, próbáld újra.',
'login.insecureCookie.title': "Login won't stick over HTTP",
- 'login.insecureCookie.body': "You’re connecting over plain HTTP, so your browser drops TREK’s secure session cookie — the next request fails with \"Access token required\". Fix: use HTTPS, or for a home-lab set COOKIE_SECURE=false.",
- 'login.insecureCookie.link': "Open the Troubleshooting guide",
+ 'login.insecureCookie.body':
+ 'You’re connecting over plain HTTP, so your browser drops TREK’s secure session cookie — the next request fails with "Access token required". Fix: use HTTPS, or for a home-lab set COOKIE_SECURE=false.',
+ 'login.insecureCookie.link': 'Open the Troubleshooting guide',
};
export default login;
diff --git a/shared/src/i18n/hu/members.ts b/shared/src/i18n/hu/members.ts
index 6c3926851..18fec507e 100644
--- a/shared/src/i18n/hu/members.ts
+++ b/shared/src/i18n/hu/members.ts
@@ -25,7 +25,8 @@ const members: TranslationStrings = {
'members.transferError': 'A tulajdonjog átruházása sikertelen',
'members.guests': 'Vendégek',
'members.guest': 'Vendég',
- 'members.guestsHint': 'Fiók nélküli személyek. Hozzárendelhetők költségekhez, csomagoláshoz és feladatokhoz, de nem tudnak bejelentkezni.',
+ 'members.guestsHint':
+ 'Fiók nélküli személyek. Hozzárendelhetők költségekhez, csomagoláshoz és feladatokhoz, de nem tudnak bejelentkezni.',
'members.addGuest': 'Vendég hozzáadása',
'members.guestNamePlaceholder': 'Vendég neve',
'members.guestAdded': 'Vendég hozzáadva',
diff --git a/shared/src/i18n/hu/places.ts b/shared/src/i18n/hu/places.ts
index 5802754a0..595232fe2 100644
--- a/shared/src/i18n/hu/places.ts
+++ b/shared/src/i18n/hu/places.ts
@@ -24,8 +24,8 @@ const places: TranslationStrings = {
'places.kmlImportNoneSelected': 'Válassz legalább egy típust.',
'places.selectionCount': '{count} kiválasztva',
'places.deleteSelected': 'Kijelöltek törlése',
- 'places.changeCategory': "Change category",
- 'places.categoryChanged': "{count} places updated",
+ 'places.changeCategory': 'Change category',
+ 'places.categoryChanged': '{count} places updated',
'places.kmlKmzImported': '{count} hely importálva KMZ/KML-ből',
'places.urlResolved': 'Hely importálva URL-ből',
'places.importList': 'Lista importálás',
diff --git a/shared/src/i18n/hu/settings.ts b/shared/src/i18n/hu/settings.ts
index 3760b3ec9..cd0e291dd 100644
--- a/shared/src/i18n/hu/settings.ts
+++ b/shared/src/i18n/hu/settings.ts
@@ -29,7 +29,8 @@ const settings: TranslationStrings = {
'settings.mapStylePlaceholder': 'Válassz Mapbox stílust',
'settings.mapStyleHint': 'Preset vagy saját mapbox://styles/USER/ID URL',
'settings.mapOpenFreeMapStylePlaceholder': 'Válassz OpenFreeMap stílust',
- 'settings.mapOpenFreeMapStyleHint': 'Preset vagy OpenFreeMap stílus URL. Az OpenFreeMap stílusok token nélkül működnek.',
+ 'settings.mapOpenFreeMapStyleHint':
+ 'Preset vagy OpenFreeMap stílus URL. Az OpenFreeMap stílusok token nélkül működnek.',
'settings.map3dBuildings': '3D épületek és terep',
'settings.map3dHint': 'Dőlés + valódi 3D épület-kiemelés — minden stílussal működik, beleértve a műholdast.',
'settings.mapHighQuality': 'Magas minőség mód',
@@ -330,7 +331,8 @@ const settings: TranslationStrings = {
'settings.airtrail.test.success': 'Csatlakoztatva — {count} járat található',
'settings.airtrail.test.failed': 'A kapcsolat sikertelen',
'settings.aiParsing.title': 'AI-feldolgozás',
- 'settings.aiParsing.hint': 'Használd a saját AI-modelledet a foglalások kinyeréséhez a feltöltött fájlokból. Ez csak akkor érvényes, ha a rendszergazda nem állított be modellt az egész példányhoz.',
+ 'settings.aiParsing.hint':
+ 'Használd a saját AI-modelledet a foglalások kinyeréséhez a feltöltött fájlokból. Ez csak akkor érvényes, ha a rendszergazda nem állított be modellt az egész példányhoz.',
'settings.aiParsing.provider': 'Szolgáltató',
'settings.aiParsing.providerLocal': 'Helyi (Ollama)',
'settings.aiParsing.providerOpenai': 'OpenAI',
@@ -341,7 +343,8 @@ const settings: TranslationStrings = {
'settings.aiParsing.apiKey': 'API-kulcs',
'settings.aiParsing.apiKeyHint': 'Titkosítva tárolva. Hagyd üresen a jelenlegi kulcs megtartásához.',
'settings.aiParsing.multimodal': 'Dokumentumok küldése képként',
- 'settings.aiParsing.multimodalHint': 'Képfelismerésre képes modellekhez — az eredeti PDF-et küldi a kinyert szöveg helyett.',
+ 'settings.aiParsing.multimodalHint':
+ 'Képfelismerésre képes modellekhez — az eredeti PDF-et küldi a kinyert szöveg helyett.',
'settings.aiParsing.toast.saved': 'AI-beállítások elmentve',
'settings.aiParsing.toast.saveError': 'Az AI-beállítások mentése nem sikerült',
'settings.tabs.appearance': 'Appearance',
@@ -360,7 +363,8 @@ const settings: TranslationStrings = {
'settings.appearance.contrastLow': 'Low contrast',
'settings.appearance.readability': 'Readability',
'settings.appearance.transparency': 'Transparency',
- 'settings.appearance.transparencyHint': 'Glassy translucent surfaces. Turn off for solid, higher-contrast backgrounds.',
+ 'settings.appearance.transparencyHint':
+ 'Glassy translucent surfaces. Turn off for solid, higher-contrast backgrounds.',
'settings.appearance.reduceMotion': 'Reduce motion',
'settings.appearance.reduceMotionHint': 'Minimize animations and transitions.',
'settings.appearance.density': 'Density',
@@ -390,7 +394,8 @@ const settings: TranslationStrings = {
'settings.appearance.group.belowHero': 'Below the hero',
'settings.appearance.group.bottomOfPage': 'Bottom of page',
'settings.appearance.sidebarHint': 'The whole right column. Turn off and the dashboard centers.',
- 'settings.appearance.densityHint': 'Compact tightens spacing and padding for a denser layout that fits more on screen.',
+ 'settings.appearance.densityHint':
+ 'Compact tightens spacing and padding for a denser layout that fits more on screen.',
'settings.appearance.textSizeAll': 'Everything',
'settings.appearance.perSize': 'Adjust each size separately',
'settings.appearance.size.large': 'Large',
@@ -413,10 +418,13 @@ const settings: TranslationStrings = {
'settings.offline.cache.title': 'Offline gyorsítótár',
'settings.offline.mode.title': 'Offline mód',
'settings.offline.mode.force': 'Offline mód kényszerítése',
- 'settings.offline.mode.forceHint': 'Csak a gyorsítótárazott adatokból dolgozik, a módosításaidat pedig sorba állítja. Kapcsold ki az újracsatlakozáshoz és szinkronizáláshoz.',
- 'settings.offline.mode.active': 'Az offline mód be van kapcsolva — a módosításaid sorban állnak, és szinkronizálódnak, amikor kikapcsolod.',
+ 'settings.offline.mode.forceHint':
+ 'Csak a gyorsítótárazott adatokból dolgozik, a módosításaidat pedig sorba állítja. Kapcsold ki az újracsatlakozáshoz és szinkronizáláshoz.',
+ 'settings.offline.mode.active':
+ 'Az offline mód be van kapcsolva — a módosításaid sorban állnak, és szinkronizálódnak, amikor kikapcsolod.',
'settings.offline.prepare.title': 'Felkészülés offline használatra',
- 'settings.offline.prepare.hint': 'Tölts le mindent, amire szükséged van — utazási adatok, dokumentumok és térképcsempék —, mielőtt megszakad a kapcsolat.',
+ 'settings.offline.prepare.hint':
+ 'Tölts le mindent, amire szükséged van — utazási adatok, dokumentumok és térképcsempék —, mielőtt megszakad a kapcsolat.',
'settings.offline.prepare.button': 'Letöltés offline használatra',
'settings.offline.prepare.running': 'Letöltés…',
'settings.offline.prepare.done': 'Kész az offline használatra',
@@ -427,12 +435,14 @@ const settings: TranslationStrings = {
'settings.offline.resyncing': 'Szinkronizálás…',
'settings.offline.storage.title': 'Mit tároljon offline',
'settings.offline.storage.tiles': 'Térképcsempék offline tárolása',
- 'settings.offline.storage.tilesHint': 'A térképcsempék foglalják a legtöbb tárhelyet. Kapcsold ki, hogy csak az utazási adatokat és a dokumentumokat tárold offline.',
+ 'settings.offline.storage.tilesHint':
+ 'A térképcsempék foglalják a legtöbb tárhelyet. Kapcsold ki, hogy csak az utazási adatokat és a dokumentumokat tárold offline.',
'settings.offline.storage.tripsTitle': 'Utazások',
'settings.offline.storage.tripOn': 'Offline tárolva',
'settings.offline.storage.tripOff': 'Nincs tárolva',
'settings.offline.clear': 'Gyorsítótár törlése',
- 'settings.offline.clearConfirm': 'Törlöd az összes offline utazási adatot? Online állapotban bármikor újraszinkronizálhatsz.',
+ 'settings.offline.clearConfirm':
+ 'Törlöd az összes offline utazási adatot? Online állapotban bármikor újraszinkronizálhatsz.',
'settings.offline.stats.trips': 'Gyorsítótárazott utazások',
'settings.offline.stats.pending': 'Függőben lévő módosítások',
'settings.offline.stats.failed': 'Sikertelen módosítások',
@@ -440,7 +450,8 @@ const settings: TranslationStrings = {
'settings.offline.empty': 'Még nincsenek gyorsítótárazott utazások. Csatlakozz az internethez a szinkronizáláshoz.',
'settings.offline.loading': 'Betöltés…',
'settings.offline.conflicts.title': 'Szinkronizálási ütközések',
- 'settings.offline.conflicts.hint': 'Az offline végzett módosításaid ütköznek a szerveren lévő újabb módosításokkal. Válaszd ki, melyik verziót szeretnéd megtartani.',
+ 'settings.offline.conflicts.hint':
+ 'Az offline végzett módosításaid ütköznek a szerveren lévő újabb módosításokkal. Válaszd ki, melyik verziót szeretnéd megtartani.',
'settings.offline.conflicts.keepMine': 'Az enyém megtartása',
'settings.offline.conflicts.keepServer': 'A szerveré megtartása',
'settings.offline.conflicts.mine': 'A te verziód',
diff --git a/shared/src/i18n/hu/trip.ts b/shared/src/i18n/hu/trip.ts
index 5511d9f79..bc3860078 100644
--- a/shared/src/i18n/hu/trip.ts
+++ b/shared/src/i18n/hu/trip.ts
@@ -28,7 +28,8 @@ const trip: TranslationStrings = {
'trip.toast.placesDeleted': '{count} hely törölve',
'trip.loadingPhotos': 'Helyek fotóinak betöltése...',
'trip.invite.linkTitle': 'Meghívó link az utazáshoz',
- 'trip.invite.linkHint': 'Bárki, akinek van TREK-fiókja és megnyitja ezt a linket, tagként csatlakozik az utazáshoz. A régi link érvénytelenítéséhez hozz létre újat.',
+ 'trip.invite.linkHint':
+ 'Bárki, akinek van TREK-fiókja és megnyitja ezt a linket, tagként csatlakozik az utazáshoz. A régi link érvénytelenítéséhez hozz létre újat.',
'trip.invite.create': 'Meghívó link létrehozása',
'trip.invite.regenerate': 'Újragenerálás',
'trip.invite.disable': 'Letiltás',
@@ -75,10 +76,12 @@ const trip: TranslationStrings = {
'transit.changeRoute': 'Útvonal módosítása',
'transit.journey': 'Tömegközlekedési útvonal',
'transit.pickDay': 'Válassz egy napot a kapcsolatok kereséséhez.',
- 'transit.noItinerary': 'Ehhez a bejegyzéshez nincs mentett útiterv – az „Útvonal módosítása” gombbal kereshetsz egyet.',
+ 'transit.noItinerary':
+ 'Ehhez a bejegyzéshez nincs mentett útiterv – az „Útvonal módosítása” gombbal kereshetsz egyet.',
'transit.durationLabel': 'Időtartam',
'transit.transfersLabel': 'Átszállások',
'transit.walkLabel': 'Gyaloglás',
- 'transit.searchHint': 'Keress valós összeköttetéseket, és add hozzá őket közvetlenül a naphoz – adatok a Transitous révén.',
+ 'transit.searchHint':
+ 'Keress valós összeköttetéseket, és add hozzá őket közvetlenül a naphoz – adatok a Transitous révén.',
};
export default trip;
diff --git a/shared/src/i18n/hu/undo.ts b/shared/src/i18n/hu/undo.ts
index 5487f1da9..2dc889096 100644
--- a/shared/src/i18n/hu/undo.ts
+++ b/shared/src/i18n/hu/undo.ts
@@ -9,7 +9,7 @@ const undo: TranslationStrings = {
'undo.optimize': 'Útvonal optimalizálva',
'undo.deletePlace': 'Hely törölve',
'undo.deletePlaces': 'Helyek törölve',
- 'undo.changeCategory': "Category changed",
+ 'undo.changeCategory': 'Category changed',
'undo.moveDay': 'Hely áthelyezve másik napra',
'undo.lock': 'Hely zárolása váltva',
'undo.importGpx': 'GPX importálás',
diff --git a/shared/src/i18n/id/admin.ts b/shared/src/i18n/id/admin.ts
index 0e8c54ca7..a16a2b63b 100644
--- a/shared/src/i18n/id/admin.ts
+++ b/shared/src/i18n/id/admin.ts
@@ -137,6 +137,8 @@ const admin: TranslationStrings = {
'admin.recommended': 'Direkomendasikan',
'admin.weatherKey': 'Kunci API OpenWeatherMap',
'admin.weatherKeyHint': 'Untuk data cuaca. Gratis di openweathermap.org',
+ 'admin.unsplashKey': 'Kunci API Unsplash',
+ 'admin.unsplashKeyHint': 'Untuk pencarian gambar. Gratis di unsplash.com/developers',
'admin.validateKey': 'Uji',
'admin.keyValid': 'Terhubung',
'admin.keyInvalid': 'Tidak valid',
@@ -204,6 +206,11 @@ const admin: TranslationStrings = {
'admin.tabs.plugins': 'Plugins',
'admin.plugins.rescan': 'Pindai ulang',
'admin.plugins.rescanned': 'Folder plugin dipindai ulang',
+ 'admin.plugins.upload': 'Unggah plugin',
+ 'admin.plugins.dropToUpload': 'Lepaskan .zip plugin untuk memasang',
+ 'admin.plugins.uploaded': 'Plugin “{name}” diunggah — aktifkan untuk menjalankan',
+ 'admin.plugins.sideloaded': 'Dimuat manual',
+ 'admin.plugins.sideloadedHint': 'Diunggah manual — bukan dari registri, tanpa tanda tangan dan tinjauan',
'admin.plugins.browse': 'Jelajahi plugin',
'admin.plugins.installed': 'Terpasang',
'admin.plugins.install': 'Pasang',
@@ -218,11 +225,13 @@ const admin: TranslationStrings = {
'admin.plugins.noErrors': 'Tidak ada error yang tercatat.',
'admin.plugins.uninstalled': 'Plugin dihapus',
'admin.plugins.uninstallTitle': 'Hapus plugin?',
- 'admin.plugins.uninstallBody': 'Ini akan menghentikan plugin, menghapus kodenya, dan menghapus semua datanya. Tindakan ini tidak bisa dibatalkan.',
+ 'admin.plugins.uninstallBody':
+ 'Ini akan menghentikan plugin, menghapus kodenya, dan menghapus semua datanya. Tindakan ini tidak bisa dibatalkan.',
'admin.plugins.status.starting': 'Memulai…',
'admin.plugins.type.widget': 'Widget',
'admin.plugins.type.page': 'Halaman',
'admin.plugins.type.integration': 'Integrasi',
+ 'admin.plugins.type.trip-page': 'Halaman perjalanan',
'admin.plugins.reviewed': 'Ditinjau',
'admin.plugins.unreviewed': 'Belum ditinjau',
'admin.plugins.updated': 'Plugin diperbarui',
@@ -232,10 +241,12 @@ const admin: TranslationStrings = {
'admin.plugins.title': 'Plugins',
'admin.plugins.subtitle': 'Pasang dan kelola plugin pihak ketiga di instans kamu.',
'admin.plugins.disabledTitle': 'Plugin dinonaktifkan',
- 'admin.plugins.disabledBody': 'Runtime plugin sedang dimatikan (TREK_PLUGINS_ENABLED). Tidak ada plugin yang bisa berjalan sampai admin mengaktifkannya di konfigurasi server.',
+ 'admin.plugins.disabledBody':
+ 'Runtime plugin sedang dimatikan (TREK_PLUGINS_ENABLED). Tidak ada plugin yang bisa berjalan sampai admin mengaktifkannya di konfigurasi server.',
'admin.plugins.empty': 'Belum ada plugin yang terpasang.',
'admin.plugins.loadError': 'Tidak dapat memuat plugin.',
- 'admin.plugins.scaffoldNote': 'Pemasangan dan aktivasi plugin akan hadir di pembaruan mendatang. Saat ini panel ini hanya menampilkan plugin yang terpasang.',
+ 'admin.plugins.scaffoldNote':
+ 'Pemasangan dan aktivasi plugin akan hadir di pembaruan mendatang. Saat ini panel ini hanya menampilkan plugin yang terpasang.',
'admin.plugins.status.active': 'Aktif',
'admin.plugins.status.inactive': 'Tidak aktif',
'admin.plugins.status.disabled': 'Nonaktif',
@@ -258,32 +269,64 @@ const admin: TranslationStrings = {
'admin.plugins.perm.db:own': 'Menyimpan datanya sendiri di database terisolasi',
'admin.plugins.perm.db:read:trips': 'Membaca perjalanan yang dapat diakses oleh pengguna yang bersangkutan',
'admin.plugins.perm.db:read:users': 'Membaca info profil dasar (nama, avatar — tidak pernah kredensial)',
+ 'admin.plugins.perm.db:read:costs':
+ 'Membaca pengeluaran (item anggaran) yang dapat diakses oleh pengguna yang bersangkutan',
+ 'admin.plugins.perm.db:read:packing':
+ 'Membaca daftar barang bawaan dari perjalanan yang dapat diakses oleh pengguna yang bersangkutan',
+ 'admin.plugins.perm.db:read:files':
+ 'Membaca berkas dari perjalanan yang dapat diakses oleh pengguna yang bersangkutan',
+ 'admin.plugins.perm.db:write:costs':
+ 'Membuat pengeluaran (item anggaran) pada perjalanan yang dapat diedit oleh pengguna yang bersangkutan',
+ 'admin.plugins.perm.db:write:places':
+ 'Menambah, mengedit, dan menghapus tempat pada perjalanan yang dapat diedit oleh pengguna yang bersangkutan',
+ 'admin.plugins.perm.db:write:days':
+ 'Menambah, mengedit, dan menghapus hari pada perjalanan yang dapat diedit oleh pengguna yang bersangkutan',
+ 'admin.plugins.perm.db:write:itinerary':
+ 'Menetapkan dan menghapus tempat pada hari-hari perjalanan yang dapat diedit oleh pengguna yang bersangkutan',
+ 'admin.plugins.perm.db:write:trips':
+ 'Mengedit detail perjalanan (judul, tanggal, mata uang…) pada perjalanan yang dapat diedit oleh pengguna yang bersangkutan',
+ 'admin.plugins.perm.db:meta':
+ 'Melampirkan data pribadinya sendiri ke perjalanan, tempat, dan hari yang dapat diakses oleh pengguna yang bersangkutan',
'admin.plugins.perm.ws:broadcast:trip': 'Mengirim pembaruan real-time ke anggota perjalanan',
'admin.plugins.perm.ws:broadcast:user': 'Mengirim pembaruan real-time ke pengguna tertentu',
'admin.plugins.perm.hook:photo-provider': 'Menyediakan foto untuk Memories',
'admin.plugins.perm.hook:calendar-source': 'Menyediakan acara untuk kalender',
+ 'admin.plugins.perm.hook:place-detail-provider':
+ 'Menyumbangkan detail tambahan (ulasan, peringkat, tautan) untuk suatu tempat',
+ 'admin.plugins.perm.hook:trip-warning-provider':
+ 'Munculkan peringatan validasi pada perjalanan (ditampilkan di perencana)',
+ 'admin.plugins.perm.events:subscribe':
+ 'Bereaksi terhadap peristiwa aktivitas inti (hanya nama peristiwa + perjalanan, tidak pernah kontennya)',
'admin.plugins.perm.http:outbound': 'Membuat permintaan keluar ke host yang telah dideklarasikannya',
'admin.plugins.updateConsentTitle': 'Pembaruan ini memerlukan izin baru',
- 'admin.plugins.updateConsentBody': '{name} v{version} meminta hak akses yang belum kamu berikan. Versi baru sudah terpasang tetapi tetap nonaktif sampai kamu menyetujuinya.',
+ 'admin.plugins.updateConsentBody':
+ '{name} v{version} meminta hak akses yang belum kamu berikan. Versi baru sudah terpasang tetapi tetap nonaktif sampai kamu menyetujuinya.',
'admin.plugins.updateNewPermissions': 'Izin yang baru diminta',
'admin.plugins.updateNewEgress': 'Koneksi keluar baru',
'admin.plugins.updateApprove': 'Setujui & aktifkan',
'admin.plugins.updateLater': 'Biarkan nonaktif dulu',
'admin.plugins.updateKeptOff': 'Pembaruan terpasang — dibiarkan nonaktif sampai kamu menyetujui izin baru',
- 'admin.plugins.reviewedMeaning': '"Ditinjau" berarti seorang maintainer TREK memindai plugin ini dari malware pada setiap versi — bukan untuk kualitas atau apakah plugin ini berfungsi. Ini bukan jaminan bahwa sebuah plugin tidak berbahaya.',
+ 'admin.plugins.reviewedMeaning':
+ '"Ditinjau" berarti seorang maintainer TREK memindai plugin ini dari malware pada setiap versi — bukan untuk kualitas atau apakah plugin ini berfungsi. Ini bukan jaminan bahwa sebuah plugin tidak berbahaya.',
'admin.plugins.security.title': 'Bagaimana plugin dikungkung — dan batasannya',
'admin.plugins.security.isolationTitle': 'Setiap plugin berjalan dalam kotak terisolasi',
- 'admin.plugins.security.isolationBody': 'Sebuah plugin berjalan sebagai prosesnya sendiri yang terkunci dan hanya bisa membaca file-nya sendiri. Ia tidak bisa membaca database kamu, rahasia login kamu, atau kunci enkripsi kamu, tidak bisa menjalankan program lain, dan tidak bisa menulis file di mana pun. Antarmukanya berjalan dalam frame browser tersegel yang tidak bisa membaca cookie sesi kamu atau menyentuh halaman TREK di sekitarnya.',
+ 'admin.plugins.security.isolationBody':
+ 'Sebuah plugin berjalan sebagai prosesnya sendiri yang terkunci dan hanya bisa membaca file-nya sendiri. Ia tidak bisa membaca database kamu, rahasia login kamu, atau kunci enkripsi kamu, tidak bisa menjalankan program lain, dan tidak bisa menulis file di mana pun. Antarmukanya berjalan dalam frame browser tersegel yang tidak bisa membaca cookie sesi kamu atau menyentuh halaman TREK di sekitarnya.',
'admin.plugins.security.permsTitle': 'Apa arti izin-izin ini',
- 'admin.plugins.security.permsBody': 'Izin yang ditampilkan sebelum kamu memasang adalah batas keras yang diberlakukan TREK selama plugin berjalan — secara harfiah plugin tidak bisa melakukan apa pun yang tidak ada dalam daftar. Namun izin itu memberitahumu apa yang bisa dilakukan sebuah plugin, bukan apa yang sebenarnya dilakukannya. Plugin yang diizinkan membaca perjalananmu dan menjangkau sebuah server bisa mengirimkan perjalananmu ke server itu, jadi baca izin dan host keluarnya, bukan hanya deskripsinya.',
+ 'admin.plugins.security.permsBody':
+ 'Izin yang ditampilkan sebelum kamu memasang adalah batas keras yang diberlakukan TREK selama plugin berjalan — secara harfiah plugin tidak bisa melakukan apa pun yang tidak ada dalam daftar. Namun izin itu memberitahumu apa yang bisa dilakukan sebuah plugin, bukan apa yang sebenarnya dilakukannya. Plugin yang diizinkan membaca perjalananmu dan menjangkau sebuah server bisa mengirimkan perjalananmu ke server itu, jadi baca izin dan host keluarnya, bukan hanya deskripsinya.',
'admin.plugins.security.limitsTitle': 'Apa yang tidak bisa kami janjikan',
- 'admin.plugins.security.limitsBody': 'Isolasi ini adalah batas perangkat lunak yang kuat, bukan batas yang mutlak. Sebuah plugin bertindak persis dengan hak yang kamu setujui, jadi dalam batas hak itu ia bisa berperilaku berbeda dari yang disiratkan deskripsinya, dan ia bisa mengirim data yang memang dimilikinya secara sah ke host yang telah dideklarasikannya. TREK tidak membaca atau menilai apa yang sebenarnya dilakukan oleh kode sebuah plugin.',
+ 'admin.plugins.security.limitsBody':
+ 'Isolasi ini adalah batas perangkat lunak yang kuat, bukan batas yang mutlak. Sebuah plugin bertindak persis dengan hak yang kamu setujui, jadi dalam batas hak itu ia bisa berperilaku berbeda dari yang disiratkan deskripsinya, dan ia bisa mengirim data yang memang dimilikinya secara sah ke host yang telah dideklarasikannya. TREK tidak membaca atau menilai apa yang sebenarnya dilakukan oleh kode sebuah plugin.',
'admin.plugins.security.worstTitle': 'Skenario terburuk',
- 'admin.plugins.security.worstBody': 'Plugin berbahaya yang kamu aktifkan bisa menyalahgunakan data dan koneksi yang kamu berikan padanya — misalnya, membocorkan perjalanan yang boleh dibacanya. Ia tidak bisa mencuri kata sandi, memalsukan login admin, menjalankan perintah di servermu, atau menjangkau data yang tidak kamu berikan. Kerusakannya tetap dalam batas yang kamu setujui, dan menonaktifkan plugin akan menghentikannya.',
+ 'admin.plugins.security.worstBody':
+ 'Plugin berbahaya yang kamu aktifkan bisa menyalahgunakan data dan koneksi yang kamu berikan padanya — misalnya, membocorkan perjalanan yang boleh dibacanya. Ia tidak bisa mencuri kata sandi, memalsukan login admin, menjalankan perintah di servermu, atau menjangkau data yang tidak kamu berikan. Kerusakannya tetap dalam batas yang kamu setujui, dan menonaktifkan plugin akan menghentikannya.',
'admin.plugins.security.reviewedTitle': 'Apa arti "Ditinjau"',
- 'admin.plugins.security.reviewedBody': 'Plugin yang ditinjau telah dipindai secara manual dari malware oleh seorang maintainer TREK pada setiap versi — diperiksa untuk kode berbahaya, bukan untuk apakah plugin berfungsi dengan baik. Ini bukan janji bahwa plugin tidak berbahaya.',
+ 'admin.plugins.security.reviewedBody':
+ 'Plugin yang ditinjau telah dipindai secara manual dari malware oleh seorang maintainer TREK pada setiap versi — diperiksa untuk kode berbahaya, bukan untuk apakah plugin berfungsi dengan baik. Ini bukan janji bahwa plugin tidak berbahaya.',
'admin.plugins.security.trustTitle': 'Intinya',
- 'admin.plugins.security.trustBody': 'Memasang plugin sama seperti memasang aplikasi pihak ketiga mana pun: hanya tambahkan kode dari pembuat yang kamu percaya, dan jika ragu, periksa sendiri terlebih dahulu. TREK tidak bertanggung jawab atas plugin pihak ketiga.',
+ 'admin.plugins.security.trustBody':
+ 'Memasang plugin sama seperti memasang aplikasi pihak ketiga mana pun: hanya tambahkan kode dari pembuat yang kamu percaya, dan jika ragu, periksa sendiri terlebih dahulu. TREK tidak bertanggung jawab atas plugin pihak ketiga.',
'admin.plugins.runtimeOn': 'Runtime aktif',
'admin.plugins.tabDiscover': 'Jelajahi',
'admin.plugins.searchPlaceholder': 'Cari plugin…',
@@ -305,11 +348,36 @@ const admin: TranslationStrings = {
'admin.plugins.restarted': 'Plugin dimulai ulang',
'admin.plugins.cap.readsTrips': 'Membaca perjalananmu',
'admin.plugins.cap.readsUsers': 'Membaca profil dasar',
+ 'admin.plugins.cap.readsCosts': 'Membaca pengeluaranmu',
+ 'admin.plugins.cap.readsPacking': 'Membaca daftar barang bawaan',
+ 'admin.plugins.cap.readsFiles': 'Membaca berkas perjalanan',
+ 'admin.plugins.cap.writesCosts': 'Menambahkan pengeluaran',
+ 'admin.plugins.cap.writesPlaces': 'Mengedit tempat',
+ 'admin.plugins.cap.writesDays': 'Mengedit hari',
+ 'admin.plugins.cap.writesItinerary': 'Mengedit itinerari',
+ 'admin.plugins.cap.writesTrips': 'Mengedit perjalanan',
+ 'admin.plugins.cap.metadata': 'Menambahkan metadata',
'admin.plugins.cap.widget': 'Widget dasbor',
'admin.plugins.cap.heroWidget': 'Widget boarding pass',
+ 'admin.plugins.cap.placeSlot': 'Detail tempat',
'admin.plugins.cap.realtime': 'Pembaruan real-time',
'admin.plugins.cap.photos': 'Menyediakan foto',
'admin.plugins.cap.calendar': 'Menyediakan acara kalender',
+ 'admin.plugins.cap.placeDetails': 'Memperkaya tempat',
+ 'admin.plugins.cap.warnings': 'Tandai masalah',
+ 'admin.plugins.cap.events': 'Bereaksi terhadap aktivitas',
+ 'admin.plugins.cap.requiresAddon': 'Membutuhkan {addon}',
+ 'admin.plugins.cap.dependsOn': 'Membutuhkan {id} {version}',
+ 'admin.plugins.dep.addonDisabledToast': 'Aktifkan dulu addon yang diperlukan: {addons}',
+ 'admin.plugins.dep.autoEnabled': 'Mengaktifkan dulu plugin yang diperlukan: {plugins}',
+ 'admin.plugins.dep.downloaded': '{id} berhasil diunduh',
+ 'admin.plugins.dep.resolveTitle': 'Dependensi tidak ada',
+ 'admin.plugins.dep.resolveBody': '“{name}” membutuhkan plugin berikut terpasang sebelum dapat diaktifkan.',
+ 'admin.plugins.dep.requires': 'Membutuhkan {version}',
+ 'admin.plugins.dep.mismatch': 'Membutuhkan {wanted} — {installed} yang terpasang',
+ 'admin.plugins.dep.download': 'Unduh',
+ 'admin.plugins.dep.update': 'Perbarui',
+ 'admin.plugins.dep.resolveHint': 'Mengunduh versi kompatibel terbaru, termasuk dependensinya sendiri.',
'admin.plugins.accessTitle': 'Yang bisa diaksesnya',
'admin.plugins.connectsTitle': 'Terhubung ke',
'admin.plugins.detailsTitle': 'Detail',
diff --git a/shared/src/i18n/id/budget.ts b/shared/src/i18n/id/budget.ts
index 257477df3..31f688311 100644
--- a/shared/src/i18n/id/budget.ts
+++ b/shared/src/i18n/id/budget.ts
@@ -52,6 +52,9 @@ const budget: TranslationStrings = {
'costs.nothingOwed': 'Tidak ada yang berhutang padamu',
'costs.yourShare': 'Bagianmu',
'costs.youPaid': 'Kamu membayar',
+ 'costs.outstanding': 'Jumlah tertunda',
+ 'costs.outstandingSub': 'Pengeluaran belum ada pembayar',
+ 'costs.outstandingItems': 'pengeluaran perlu pembayar',
'costs.expenses': 'Pengeluaran',
'costs.entries': '{count} entri',
'costs.searchPlaceholder': 'Cari pengeluaran…',
@@ -116,10 +119,10 @@ const budget: TranslationStrings = {
'costs.unfinishedHint': 'Hanya total — belum diselesaikan',
'costs.tapToInclude': 'Ketuk untuk menyertakan',
'costs.amount': 'Jumlah',
- 'costs.split': "Split",
- 'costs.splitEqually': "Equally",
- 'costs.splitCustom': "Custom",
- 'costs.splitTicket': "Ticket",
+ 'costs.split': 'Split',
+ 'costs.splitEqually': 'Equally',
+ 'costs.splitCustom': 'Custom',
+ 'costs.splitTicket': 'Ticket',
'costs.filter.allCategories': 'Semua kategori',
'costs.filter.allDays': 'Semua hari',
'costs.expensesCount': '{count} pengeluaran',
diff --git a/shared/src/i18n/id/collection.ts b/shared/src/i18n/id/collection.ts
index d58774b33..8dc492e62 100644
--- a/shared/src/i18n/id/collection.ts
+++ b/shared/src/i18n/id/collection.ts
@@ -49,7 +49,8 @@ const collection: TranslationStrings = {
'collections.editList': 'Ganti nama',
'collections.listMenu': 'Opsi daftar',
'collections.deleteList': 'Hapus daftar',
- 'collections.deleteListConfirm': 'Ini menghapus daftar dan semua tempat tersimpan di dalamnya secara permanen. Tindakan ini tidak dapat dibatalkan.',
+ 'collections.deleteListConfirm':
+ 'Ini menghapus daftar dan semua tempat tersimpan di dalamnya secara permanen. Tindakan ini tidak dapat dibatalkan.',
'collections.listName': 'Nama daftar',
'collections.listNamePlaceholder': 'mis. Tokyo 2025',
'collections.listColor': 'Warna',
diff --git a/shared/src/i18n/id/help.ts b/shared/src/i18n/id/help.ts
index b1884b712..96ca6cc5a 100644
--- a/shared/src/i18n/id/help.ts
+++ b/shared/src/i18n/id/help.ts
@@ -2,12 +2,12 @@ import type { TranslationStrings } from '../types';
// English fallback until 'id' is translated.
const help: TranslationStrings = {
- 'help.title': "Help & Docs",
- 'help.search': "Search docs…",
- 'help.contents': "Contents",
- 'help.noResults': "No matching pages.",
+ 'help.title': 'Help & Docs',
+ 'help.search': 'Search docs…',
+ 'help.contents': 'Contents',
+ 'help.noResults': 'No matching pages.',
'help.errorTitle': "Couldn't load this page",
- 'help.errorBody': "The help content is fetched from the TREK wiki. Check your connection and try again.",
+ 'help.errorBody': 'The help content is fetched from the TREK wiki. Check your connection and try again.',
};
export default help;
diff --git a/shared/src/i18n/id/index.ts b/shared/src/i18n/id/index.ts
index b9af5461f..eef4c74aa 100644
--- a/shared/src/i18n/id/index.ts
+++ b/shared/src/i18n/id/index.ts
@@ -5,11 +5,13 @@ import backup from './backup';
import budget from './budget';
import categories from './categories';
import collab from './collab';
+import collection from './collection';
import common from './common';
import dashboard from './dashboard';
import day from './day';
import dayplan from './dayplan';
import files from './files';
+import help from './help';
import inspector from './inspector';
import journey from './journey';
import login from './login';
@@ -39,8 +41,6 @@ import trip from './trip';
import trips from './trips';
import undo from './undo';
import vacay from './vacay';
-import collection from './collection';
-import help from './help';
const locale = {
...common,
diff --git a/shared/src/i18n/id/login.ts b/shared/src/i18n/id/login.ts
index a81957aa2..15c474270 100644
--- a/shared/src/i18n/id/login.ts
+++ b/shared/src/i18n/id/login.ts
@@ -84,7 +84,8 @@ const login: TranslationStrings = {
'login.passkey.signIn': 'Masuk dengan passkey',
'login.passkey.failed': 'Masuk dengan passkey gagal. Silakan coba lagi.',
'login.insecureCookie.title': "Login won't stick over HTTP",
- 'login.insecureCookie.body': "You’re connecting over plain HTTP, so your browser drops TREK’s secure session cookie — the next request fails with \"Access token required\". Fix: use HTTPS, or for a home-lab set COOKIE_SECURE=false.",
- 'login.insecureCookie.link': "Open the Troubleshooting guide",
+ 'login.insecureCookie.body':
+ 'You’re connecting over plain HTTP, so your browser drops TREK’s secure session cookie — the next request fails with "Access token required". Fix: use HTTPS, or for a home-lab set COOKIE_SECURE=false.',
+ 'login.insecureCookie.link': 'Open the Troubleshooting guide',
};
export default login;
diff --git a/shared/src/i18n/id/members.ts b/shared/src/i18n/id/members.ts
index 8b8ad7471..197b911d2 100644
--- a/shared/src/i18n/id/members.ts
+++ b/shared/src/i18n/id/members.ts
@@ -25,7 +25,8 @@ const members: TranslationStrings = {
'members.transferError': 'Gagal mengalihkan kepemilikan',
'members.guests': 'Tamu',
'members.guest': 'Tamu',
- 'members.guestsHint': 'Orang tanpa akun. Mereka dapat ditugaskan ke biaya, kemasan, dan tugas, tetapi tidak dapat masuk.',
+ 'members.guestsHint':
+ 'Orang tanpa akun. Mereka dapat ditugaskan ke biaya, kemasan, dan tugas, tetapi tidak dapat masuk.',
'members.addGuest': 'Tambah tamu',
'members.guestNamePlaceholder': 'Nama tamu',
'members.guestAdded': 'Tamu ditambahkan',
diff --git a/shared/src/i18n/id/places.ts b/shared/src/i18n/id/places.ts
index e749ad5b2..ed75c370f 100644
--- a/shared/src/i18n/id/places.ts
+++ b/shared/src/i18n/id/places.ts
@@ -23,8 +23,8 @@ const places: TranslationStrings = {
'places.kmlImportNoneSelected': 'Pilih setidaknya satu jenis.',
'places.selectionCount': '{count} dipilih',
'places.deleteSelected': 'Hapus yang dipilih',
- 'places.changeCategory': "Change category",
- 'places.categoryChanged': "{count} places updated",
+ 'places.changeCategory': 'Change category',
+ 'places.categoryChanged': '{count} places updated',
'places.kmlKmzImported': '{count} tempat diimpor dari KMZ/KML',
'places.urlResolved': 'Tempat diimpor dari URL',
'places.importList': 'Impor Daftar',
diff --git a/shared/src/i18n/id/settings.ts b/shared/src/i18n/id/settings.ts
index aec70ead8..ca88dba7d 100644
--- a/shared/src/i18n/id/settings.ts
+++ b/shared/src/i18n/id/settings.ts
@@ -329,18 +329,21 @@ const settings: TranslationStrings = {
'settings.airtrail.test.success': 'Terhubung — {count} penerbangan ditemukan',
'settings.airtrail.test.failed': 'Koneksi gagal',
'settings.aiParsing.title': 'Penguraian AI',
- 'settings.aiParsing.hint': 'Gunakan model AI milikmu sendiri untuk mengekstrak pemesanan dari file yang diunggah. Ini hanya berlaku jika administrator belum mengonfigurasi model untuk seluruh instance.',
+ 'settings.aiParsing.hint':
+ 'Gunakan model AI milikmu sendiri untuk mengekstrak pemesanan dari file yang diunggah. Ini hanya berlaku jika administrator belum mengonfigurasi model untuk seluruh instance.',
'settings.aiParsing.provider': 'Penyedia',
'settings.aiParsing.providerLocal': 'Lokal (Ollama)',
'settings.aiParsing.providerOpenai': 'OpenAI',
'settings.aiParsing.providerAnthropic': 'Anthropic',
'settings.aiParsing.model': 'Model',
'settings.aiParsing.baseUrl': 'URL Dasar',
- 'settings.aiParsing.baseUrlHint': 'Tempat model berjalan — server Ollama lokal atau endpoint yang kompatibel dengan OpenAI.',
+ 'settings.aiParsing.baseUrlHint':
+ 'Tempat model berjalan — server Ollama lokal atau endpoint yang kompatibel dengan OpenAI.',
'settings.aiParsing.apiKey': 'Kunci API',
'settings.aiParsing.apiKeyHint': 'Disimpan secara terenkripsi. Biarkan kosong untuk mempertahankan kunci saat ini.',
'settings.aiParsing.multimodal': 'Kirim dokumen sebagai gambar',
- 'settings.aiParsing.multimodalHint': 'Untuk model yang mendukung visi — mengirim PDF asli alih-alih teks yang diekstrak.',
+ 'settings.aiParsing.multimodalHint':
+ 'Untuk model yang mendukung visi — mengirim PDF asli alih-alih teks yang diekstrak.',
'settings.aiParsing.toast.saved': 'Pengaturan AI disimpan',
'settings.aiParsing.toast.saveError': 'Tidak dapat menyimpan pengaturan AI',
'settings.tabs.appearance': 'Appearance',
@@ -359,7 +362,8 @@ const settings: TranslationStrings = {
'settings.appearance.contrastLow': 'Low contrast',
'settings.appearance.readability': 'Readability',
'settings.appearance.transparency': 'Transparency',
- 'settings.appearance.transparencyHint': 'Glassy translucent surfaces. Turn off for solid, higher-contrast backgrounds.',
+ 'settings.appearance.transparencyHint':
+ 'Glassy translucent surfaces. Turn off for solid, higher-contrast backgrounds.',
'settings.appearance.reduceMotion': 'Reduce motion',
'settings.appearance.reduceMotionHint': 'Minimize animations and transitions.',
'settings.appearance.density': 'Density',
@@ -389,7 +393,8 @@ const settings: TranslationStrings = {
'settings.appearance.group.belowHero': 'Below the hero',
'settings.appearance.group.bottomOfPage': 'Bottom of page',
'settings.appearance.sidebarHint': 'The whole right column. Turn off and the dashboard centers.',
- 'settings.appearance.densityHint': 'Compact tightens spacing and padding for a denser layout that fits more on screen.',
+ 'settings.appearance.densityHint':
+ 'Compact tightens spacing and padding for a denser layout that fits more on screen.',
'settings.appearance.textSizeAll': 'Everything',
'settings.appearance.perSize': 'Adjust each size separately',
'settings.appearance.size.large': 'Large',
@@ -412,10 +417,13 @@ const settings: TranslationStrings = {
'settings.offline.cache.title': 'Cache offline',
'settings.offline.mode.title': 'Mode offline',
'settings.offline.mode.force': 'Paksa mode offline',
- 'settings.offline.mode.forceHint': 'Bekerja hanya dari data cache dan antrekan perubahanmu. Matikan untuk terhubung kembali dan menyinkronkan.',
- 'settings.offline.mode.active': 'Mode offline aktif — perubahanmu diantrekan dan akan disinkronkan saat kamu mematikannya.',
+ 'settings.offline.mode.forceHint':
+ 'Bekerja hanya dari data cache dan antrekan perubahanmu. Matikan untuk terhubung kembali dan menyinkronkan.',
+ 'settings.offline.mode.active':
+ 'Mode offline aktif — perubahanmu diantrekan dan akan disinkronkan saat kamu mematikannya.',
'settings.offline.prepare.title': 'Persiapkan untuk offline',
- 'settings.offline.prepare.hint': 'Unduh semua yang kamu perlukan — data perjalanan, dokumen, dan tile peta — sebelum kehilangan koneksi.',
+ 'settings.offline.prepare.hint':
+ 'Unduh semua yang kamu perlukan — data perjalanan, dokumen, dan tile peta — sebelum kehilangan koneksi.',
'settings.offline.prepare.button': 'Unduh untuk penggunaan offline',
'settings.offline.prepare.running': 'Mengunduh…',
'settings.offline.prepare.done': 'Siap untuk penggunaan offline',
@@ -426,12 +434,14 @@ const settings: TranslationStrings = {
'settings.offline.resyncing': 'Menyinkronkan…',
'settings.offline.storage.title': 'Apa yang disimpan offline',
'settings.offline.storage.tiles': 'Simpan tile peta offline',
- 'settings.offline.storage.tilesHint': 'Tile peta menggunakan penyimpanan paling banyak. Matikan ini untuk hanya menyimpan data perjalanan dan dokumen secara offline.',
+ 'settings.offline.storage.tilesHint':
+ 'Tile peta menggunakan penyimpanan paling banyak. Matikan ini untuk hanya menyimpan data perjalanan dan dokumen secara offline.',
'settings.offline.storage.tripsTitle': 'Perjalanan',
'settings.offline.storage.tripOn': 'Disimpan offline',
'settings.offline.storage.tripOff': 'Tidak disimpan',
'settings.offline.clear': 'Hapus cache',
- 'settings.offline.clearConfirm': 'Hapus semua data perjalanan offline? Kamu bisa menyinkronkan ulang kapan saja saat online.',
+ 'settings.offline.clearConfirm':
+ 'Hapus semua data perjalanan offline? Kamu bisa menyinkronkan ulang kapan saja saat online.',
'settings.offline.stats.trips': 'Perjalanan di cache',
'settings.offline.stats.pending': 'Perubahan tertunda',
'settings.offline.stats.failed': 'Perubahan gagal',
@@ -439,7 +449,8 @@ const settings: TranslationStrings = {
'settings.offline.empty': 'Belum ada perjalanan di cache. Sambungkan ke internet untuk menyinkronkan.',
'settings.offline.loading': 'Memuat…',
'settings.offline.conflicts.title': 'Konflik sinkronisasi',
- 'settings.offline.conflicts.hint': 'Perubahan yang kamu buat secara offline bentrok dengan perubahan yang lebih baru di server. Pilih versi mana yang ingin disimpan.',
+ 'settings.offline.conflicts.hint':
+ 'Perubahan yang kamu buat secara offline bentrok dengan perubahan yang lebih baru di server. Pilih versi mana yang ingin disimpan.',
'settings.offline.conflicts.keepMine': 'Simpan punyaku',
'settings.offline.conflicts.keepServer': 'Simpan punya server',
'settings.offline.conflicts.mine': 'Versimu',
diff --git a/shared/src/i18n/id/trip.ts b/shared/src/i18n/id/trip.ts
index eee274577..9cab57021 100644
--- a/shared/src/i18n/id/trip.ts
+++ b/shared/src/i18n/id/trip.ts
@@ -28,7 +28,8 @@ const trip: TranslationStrings = {
'trip.confirm.deletePlaces': 'Hapus {count} tempat?',
'trip.toast.placesDeleted': '{count} tempat dihapus',
'trip.invite.linkTitle': 'Tautan undangan perjalanan',
- 'trip.invite.linkHint': 'Siapa pun yang punya akun TREK dan membuka tautan ini akan bergabung ke perjalanan sebagai anggota. Buat ulang untuk membatalkan tautan lama.',
+ 'trip.invite.linkHint':
+ 'Siapa pun yang punya akun TREK dan membuka tautan ini akan bergabung ke perjalanan sebagai anggota. Buat ulang untuk membatalkan tautan lama.',
'trip.invite.create': 'Buat tautan undangan',
'trip.invite.regenerate': 'Buat ulang',
'trip.invite.disable': 'Nonaktifkan',
@@ -75,7 +76,8 @@ const trip: TranslationStrings = {
'transit.changeRoute': 'Ubah rute',
'transit.journey': 'Perjalanan transportasi umum',
'transit.pickDay': 'Pilih hari untuk mencari koneksi.',
- 'transit.noItinerary': 'Entri ini tidak memiliki rencana perjalanan tersimpan — gunakan "Ubah rute" untuk mencarinya.',
+ 'transit.noItinerary':
+ 'Entri ini tidak memiliki rencana perjalanan tersimpan — gunakan "Ubah rute" untuk mencarinya.',
'transit.durationLabel': 'Durasi',
'transit.transfersLabel': 'Transit',
'transit.walkLabel': 'Jalan kaki',
diff --git a/shared/src/i18n/id/undo.ts b/shared/src/i18n/id/undo.ts
index b2d66defd..5ff9844fd 100644
--- a/shared/src/i18n/id/undo.ts
+++ b/shared/src/i18n/id/undo.ts
@@ -9,7 +9,7 @@ const undo: TranslationStrings = {
'undo.optimize': 'Rute dioptimalkan',
'undo.deletePlace': 'Tempat dihapus',
'undo.deletePlaces': 'Tempat dihapus',
- 'undo.changeCategory': "Category changed",
+ 'undo.changeCategory': 'Category changed',
'undo.moveDay': 'Tempat dipindah ke hari lain',
'undo.lock': 'Kunci tempat diubah',
'undo.importGpx': 'Impor GPX',
diff --git a/shared/src/i18n/it/admin.ts b/shared/src/i18n/it/admin.ts
index 88716683f..a4e30caee 100644
--- a/shared/src/i18n/it/admin.ts
+++ b/shared/src/i18n/it/admin.ts
@@ -95,6 +95,8 @@ const admin: TranslationStrings = {
'admin.recommended': 'Consigliato',
'admin.weatherKey': 'Chiave API OpenWeatherMap',
'admin.weatherKeyHint': 'Per i dati meteo. Gratuita su openweathermap.org',
+ 'admin.unsplashKey': 'Chiave API Unsplash',
+ 'admin.unsplashKeyHint': 'Per la ricerca di immagini. Gratuita su unsplash.com/developers',
'admin.validateKey': 'Testa',
'admin.keyValid': 'Connessa',
'admin.keyInvalid': 'Non valida',
@@ -161,6 +163,11 @@ const admin: TranslationStrings = {
'admin.tabs.plugins': 'Plugin',
'admin.plugins.rescan': 'Riscansiona',
'admin.plugins.rescanned': 'Cartella dei plugin riscansionata',
+ 'admin.plugins.upload': 'Carica plugin',
+ 'admin.plugins.dropToUpload': 'Trascina qui uno .zip del plugin per installarlo',
+ 'admin.plugins.uploaded': 'Plugin “{name}” caricato — attivalo per eseguirlo',
+ 'admin.plugins.sideloaded': 'Caricato manualmente',
+ 'admin.plugins.sideloadedHint': 'Caricato manualmente — non dal registro, non firmato e non verificato',
'admin.plugins.browse': 'Sfoglia i plugin',
'admin.plugins.installed': 'Installato',
'admin.plugins.install': 'Installa',
@@ -175,11 +182,13 @@ const admin: TranslationStrings = {
'admin.plugins.noErrors': 'Nessun errore registrato.',
'admin.plugins.uninstalled': 'Plugin disinstallato',
'admin.plugins.uninstallTitle': 'Disinstallare il plugin?',
- 'admin.plugins.uninstallBody': 'Il plugin verrà arrestato, il suo codice rimosso e tutti i suoi dati eliminati. Questa operazione non può essere annullata.',
+ 'admin.plugins.uninstallBody':
+ 'Il plugin verrà arrestato, il suo codice rimosso e tutti i suoi dati eliminati. Questa operazione non può essere annullata.',
'admin.plugins.status.starting': 'Avvio in corso…',
'admin.plugins.type.widget': 'Widget',
'admin.plugins.type.page': 'Pagina',
'admin.plugins.type.integration': 'Integrazione',
+ 'admin.plugins.type.trip-page': 'Pagina viaggio',
'admin.plugins.reviewed': 'Verificato',
'admin.plugins.unreviewed': 'Non verificato',
'admin.plugins.updated': 'Plugin aggiornato',
@@ -189,10 +198,12 @@ const admin: TranslationStrings = {
'admin.plugins.title': 'Plugin',
'admin.plugins.subtitle': 'Installa e gestisci plugin di terze parti sulla tua istanza.',
'admin.plugins.disabledTitle': 'I plugin sono disabilitati',
- 'admin.plugins.disabledBody': 'Il runtime dei plugin è disattivato (TREK_PLUGINS_ENABLED). Nessun plugin può essere eseguito finché un amministratore non lo abilita nella configurazione del server.',
+ 'admin.plugins.disabledBody':
+ 'Il runtime dei plugin è disattivato (TREK_PLUGINS_ENABLED). Nessun plugin può essere eseguito finché un amministratore non lo abilita nella configurazione del server.',
'admin.plugins.empty': 'Nessun plugin ancora installato.',
'admin.plugins.loadError': 'Impossibile caricare i plugin.',
- 'admin.plugins.scaffoldNote': "L'installazione e l'attivazione dei plugin arriveranno in un aggiornamento futuro. Al momento questo pannello elenca solo i plugin installati.",
+ 'admin.plugins.scaffoldNote':
+ "L'installazione e l'attivazione dei plugin arriveranno in un aggiornamento futuro. Al momento questo pannello elenca solo i plugin installati.",
'admin.plugins.status.active': 'Attivo',
'admin.plugins.status.inactive': 'Inattivo',
'admin.plugins.status.disabled': 'Disabilitato',
@@ -215,10 +226,30 @@ const admin: TranslationStrings = {
'admin.plugins.perm.db:own': 'Salvare i propri dati in un database isolato',
'admin.plugins.perm.db:read:trips': "Leggere i viaggi a cui l'utente attivo ha accesso",
'admin.plugins.perm.db:read:users': 'Leggere le informazioni di base del profilo (nome, avatar — mai le credenziali)',
+ 'admin.plugins.perm.db:read:costs': "Leggere le spese (voci di budget) a cui l'utente attivo ha accesso",
+ 'admin.plugins.perm.db:read:packing': "Leggere le liste dei bagagli dei viaggi a cui l'utente attivo ha accesso",
+ 'admin.plugins.perm.db:read:files': "Leggere i file dei viaggi a cui l'utente attivo ha accesso",
+ 'admin.plugins.perm.db:write:costs': "Creare spese (voci di budget) sui viaggi che l'utente attivo può modificare",
+ 'admin.plugins.perm.db:write:places':
+ "Aggiungere, modificare e rimuovere luoghi sui viaggi che l'utente attivo può modificare",
+ 'admin.plugins.perm.db:write:days':
+ "Aggiungere, modificare e rimuovere giorni sui viaggi che l'utente attivo può modificare",
+ 'admin.plugins.perm.db:write:itinerary':
+ "Assegnare e rimuovere luoghi nei giorni dei viaggi che l'utente attivo può modificare",
+ 'admin.plugins.perm.db:write:trips':
+ "Modificare i dettagli del viaggio (titolo, date, valuta…) sui viaggi che l'utente attivo può modificare",
+ 'admin.plugins.perm.db:meta':
+ "Allegare i propri dati privati a viaggi, luoghi e giorni a cui l'utente attivo può accedere",
'admin.plugins.perm.ws:broadcast:trip': 'Inviare aggiornamenti in tempo reale ai membri del viaggio',
'admin.plugins.perm.ws:broadcast:user': 'Inviare aggiornamenti in tempo reale a singoli utenti',
'admin.plugins.perm.hook:photo-provider': 'Fornire foto alla sezione Foto',
'admin.plugins.perm.hook:calendar-source': 'Fornire eventi al calendario',
+ 'admin.plugins.perm.hook:place-detail-provider':
+ 'Fornire dettagli aggiuntivi (recensioni, valutazioni, link) a un luogo',
+ 'admin.plugins.perm.hook:trip-warning-provider':
+ 'Segnala avvisi di validazione su un viaggio (mostrati nel pianificatore)',
+ 'admin.plugins.perm.events:subscribe':
+ "Reagisce agli eventi principali dell'attività (solo nome evento e viaggio, mai il contenuto)",
'admin.plugins.perm.http:outbound': 'Effettuare richieste in uscita verso gli host dichiarati',
'admin.plugins.updateConsentTitle': 'Questo aggiornamento richiede nuovi permessi',
'admin.plugins.updateConsentBody':
@@ -270,11 +301,36 @@ const admin: TranslationStrings = {
'admin.plugins.restarted': 'Plugin riavviato',
'admin.plugins.cap.readsTrips': 'Legge i tuoi viaggi',
'admin.plugins.cap.readsUsers': 'Legge i profili di base',
+ 'admin.plugins.cap.readsCosts': 'Legge le tue spese',
+ 'admin.plugins.cap.readsPacking': 'Legge le liste bagagli',
+ 'admin.plugins.cap.readsFiles': 'Legge i file del viaggio',
+ 'admin.plugins.cap.writesCosts': 'Aggiunge spese',
+ 'admin.plugins.cap.writesPlaces': 'Modifica luoghi',
+ 'admin.plugins.cap.writesDays': 'Modifica giorni',
+ 'admin.plugins.cap.writesItinerary': 'Modifica itinerario',
+ 'admin.plugins.cap.writesTrips': 'Modifica viaggi',
+ 'admin.plugins.cap.metadata': 'Aggiunge metadati',
'admin.plugins.cap.widget': 'Widget dashboard',
'admin.plugins.cap.heroWidget': "Widget carta d'imbarco",
+ 'admin.plugins.cap.placeSlot': 'Dettaglio luogo',
'admin.plugins.cap.realtime': 'Aggiornamenti in tempo reale',
'admin.plugins.cap.photos': 'Fornisce foto',
'admin.plugins.cap.calendar': 'Fornisce eventi calendario',
+ 'admin.plugins.cap.placeDetails': 'Arricchisce luoghi',
+ 'admin.plugins.cap.warnings': 'Segnala problemi',
+ 'admin.plugins.cap.events': "Reagisce all'attività",
+ 'admin.plugins.cap.requiresAddon': 'Richiede {addon}',
+ 'admin.plugins.cap.dependsOn': 'Richiede {id} {version}',
+ 'admin.plugins.dep.addonDisabledToast': 'Abilita prima gli addon richiesti: {addons}',
+ 'admin.plugins.dep.autoEnabled': 'Abilitati prima i plugin richiesti: {plugins}',
+ 'admin.plugins.dep.downloaded': 'Scaricato {id}',
+ 'admin.plugins.dep.resolveTitle': 'Dipendenze mancanti',
+ 'admin.plugins.dep.resolveBody': '“{name}” richiede questi plugin installati prima di poter essere abilitato.',
+ 'admin.plugins.dep.requires': 'Richiede {version}',
+ 'admin.plugins.dep.mismatch': 'Richiede {wanted} — è installato {installed}',
+ 'admin.plugins.dep.download': 'Scarica',
+ 'admin.plugins.dep.update': 'Aggiorna',
+ 'admin.plugins.dep.resolveHint': 'Scarica la versione compatibile più recente, incluse le sue dipendenze.',
'admin.plugins.accessTitle': 'A cosa può accedere',
'admin.plugins.connectsTitle': 'Si connette a',
'admin.plugins.detailsTitle': 'Dettagli',
@@ -488,7 +544,8 @@ const admin: TranslationStrings = {
'admin.group.maintenance': 'Maintenance',
'admin.invite.tripLabel': 'Aggiungi a un viaggio (opzionale)',
'admin.invite.tripNone': 'Nessun viaggio',
- 'admin.invite.tripHint': 'Il nuovo utente viene aggiunto automaticamente a questo viaggio quando si registra tramite il link.',
+ 'admin.invite.tripHint':
+ 'Il nuovo utente viene aggiunto automaticamente a questo viaggio quando si registra tramite il link.',
'admin.invite.boundTo': 'aggiunge a {trip}',
};
export default admin;
diff --git a/shared/src/i18n/it/budget.ts b/shared/src/i18n/it/budget.ts
index b94aedcf5..8651090be 100644
--- a/shared/src/i18n/it/budget.ts
+++ b/shared/src/i18n/it/budget.ts
@@ -52,6 +52,9 @@ const budget: TranslationStrings = {
'costs.nothingOwed': 'Nessuno ti deve nulla',
'costs.yourShare': 'La tua quota',
'costs.youPaid': 'Hai pagato',
+ 'costs.outstanding': 'Importo in sospeso',
+ 'costs.outstandingSub': 'Spese senza pagante',
+ 'costs.outstandingItems': 'spese senza pagante',
'costs.expenses': 'Spese',
'costs.entries': '{count} voci',
'costs.searchPlaceholder': 'Cerca spese…',
@@ -116,10 +119,10 @@ const budget: TranslationStrings = {
'costs.unfinishedHint': 'Solo nel totale — non ancora saldato',
'costs.tapToInclude': 'Tocca per includere',
'costs.amount': 'Importo',
- 'costs.split': "Split",
- 'costs.splitEqually': "Equally",
- 'costs.splitCustom': "Custom",
- 'costs.splitTicket': "Ticket",
+ 'costs.split': 'Split',
+ 'costs.splitEqually': 'Equally',
+ 'costs.splitCustom': 'Custom',
+ 'costs.splitTicket': 'Ticket',
'costs.filter.allCategories': 'Tutte le categorie',
'costs.filter.allDays': 'Tutti i giorni',
'costs.expensesCount': '{count} spese',
diff --git a/shared/src/i18n/it/collection.ts b/shared/src/i18n/it/collection.ts
index 11daaef34..6bbab9973 100644
--- a/shared/src/i18n/it/collection.ts
+++ b/shared/src/i18n/it/collection.ts
@@ -15,9 +15,9 @@ const collection: TranslationStrings = {
'collections.deselectAll': 'Deseleziona tutto',
'collections.moveToList': 'Sposta in lista',
'collections.duplicateToList': 'Duplica in lista',
- 'collections.moveToListTitle': 'Sposta {count} in un\'altra lista',
- 'collections.duplicateToListTitle': 'Duplica {count} in un\'altra lista',
- 'collections.noOtherLists': 'Nessun\'altra lista',
+ 'collections.moveToListTitle': "Sposta {count} in un'altra lista",
+ 'collections.duplicateToListTitle': "Duplica {count} in un'altra lista",
+ 'collections.noOtherLists': "Nessun'altra lista",
'collections.movedCount': 'Spostati {count} luoghi',
'collections.duplicatedCount': 'Duplicati {count} luoghi',
'collections.placeCount': '{count} luoghi',
@@ -49,7 +49,8 @@ const collection: TranslationStrings = {
'collections.editList': 'Rinomina',
'collections.listMenu': 'Opzioni della lista',
'collections.deleteList': 'Elimina lista',
- 'collections.deleteListConfirm': 'Questa azione elimina definitivamente la lista e tutti i luoghi salvati. Non può essere annullata.',
+ 'collections.deleteListConfirm':
+ 'Questa azione elimina definitivamente la lista e tutti i luoghi salvati. Non può essere annullata.',
'collections.listName': 'Nome della lista',
'collections.listNamePlaceholder': 'es. Tokyo 2025',
'collections.listColor': 'Colore',
@@ -127,7 +128,8 @@ const collection: TranslationStrings = {
'collections.share.memberHint': 'Solo il proprietario della lista può invitare o rimuovere persone.',
'collections.share.cancel': 'Annulla',
'collections.share.leave': 'Abbandona lista',
- 'collections.share.leaveConfirm': 'Abbandonare questa lista condivisa? Perderai l’accesso finché non verrai invitato di nuovo.',
+ 'collections.share.leaveConfirm':
+ 'Abbandonare questa lista condivisa? Perderai l’accesso finché non verrai invitato di nuovo.',
'collections.share.left': 'Hai abbandonato la lista',
'collections.share.remove': 'Rimuovi',
@@ -154,7 +156,7 @@ const collection: TranslationStrings = {
'collections.labels.assignN': 'Aggiungi etichette a {count} luoghi',
'collections.labels.assignedCount': 'Etichettati {count} luoghi',
'collections.labels.empty': 'Ancora nessuna etichetta',
- 'collections.labels.emptyHint': 'Crea prima un\'etichetta per raggruppare i luoghi in questa lista.',
+ 'collections.labels.emptyHint': "Crea prima un'etichetta per raggruppare i luoghi in questa lista.",
};
export default collection;
diff --git a/shared/src/i18n/it/dashboard.ts b/shared/src/i18n/it/dashboard.ts
index 5c94b7a8b..428d78862 100644
--- a/shared/src/i18n/it/dashboard.ts
+++ b/shared/src/i18n/it/dashboard.ts
@@ -42,8 +42,7 @@ const dashboard: TranslationStrings = {
'dashboard.status.past': 'Passato',
'dashboard.status.daysLeft': '-{count} giorni',
'dashboard.toast.loadError': 'Impossibile caricare i viaggi',
- 'dashboard.loadErrorBanner':
- "Impossibile raggiungere il server. I tuoi viaggi sono al sicuro — riprova.",
+ 'dashboard.loadErrorBanner': 'Impossibile raggiungere il server. I tuoi viaggi sono al sicuro — riprova.',
'dashboard.retry': 'Riprova',
'dashboard.toast.created': 'Viaggio creato con successo!',
'dashboard.toast.createError': 'Impossibile creare il viaggio',
diff --git a/shared/src/i18n/it/help.ts b/shared/src/i18n/it/help.ts
index fd9df01c8..b0ecca341 100644
--- a/shared/src/i18n/it/help.ts
+++ b/shared/src/i18n/it/help.ts
@@ -2,12 +2,12 @@ import type { TranslationStrings } from '../types';
// English fallback until 'it' is translated.
const help: TranslationStrings = {
- 'help.title': "Help & Docs",
- 'help.search': "Search docs…",
- 'help.contents': "Contents",
- 'help.noResults': "No matching pages.",
+ 'help.title': 'Help & Docs',
+ 'help.search': 'Search docs…',
+ 'help.contents': 'Contents',
+ 'help.noResults': 'No matching pages.',
'help.errorTitle': "Couldn't load this page",
- 'help.errorBody': "The help content is fetched from the TREK wiki. Check your connection and try again.",
+ 'help.errorBody': 'The help content is fetched from the TREK wiki. Check your connection and try again.',
};
export default help;
diff --git a/shared/src/i18n/it/index.ts b/shared/src/i18n/it/index.ts
index b9af5461f..eef4c74aa 100644
--- a/shared/src/i18n/it/index.ts
+++ b/shared/src/i18n/it/index.ts
@@ -5,11 +5,13 @@ import backup from './backup';
import budget from './budget';
import categories from './categories';
import collab from './collab';
+import collection from './collection';
import common from './common';
import dashboard from './dashboard';
import day from './day';
import dayplan from './dayplan';
import files from './files';
+import help from './help';
import inspector from './inspector';
import journey from './journey';
import login from './login';
@@ -39,8 +41,6 @@ import trip from './trip';
import trips from './trips';
import undo from './undo';
import vacay from './vacay';
-import collection from './collection';
-import help from './help';
const locale = {
...common,
diff --git a/shared/src/i18n/it/login.ts b/shared/src/i18n/it/login.ts
index 2c648beab..174349e5b 100644
--- a/shared/src/i18n/it/login.ts
+++ b/shared/src/i18n/it/login.ts
@@ -86,7 +86,8 @@ const login: TranslationStrings = {
'login.passkey.signIn': 'Accedi con una passkey',
'login.passkey.failed': 'Accesso con passkey non riuscito. Riprova.',
'login.insecureCookie.title': "Login won't stick over HTTP",
- 'login.insecureCookie.body': "You’re connecting over plain HTTP, so your browser drops TREK’s secure session cookie — the next request fails with \"Access token required\". Fix: use HTTPS, or for a home-lab set COOKIE_SECURE=false.",
- 'login.insecureCookie.link': "Open the Troubleshooting guide",
+ 'login.insecureCookie.body':
+ 'You’re connecting over plain HTTP, so your browser drops TREK’s secure session cookie — the next request fails with "Access token required". Fix: use HTTPS, or for a home-lab set COOKIE_SECURE=false.',
+ 'login.insecureCookie.link': 'Open the Troubleshooting guide',
};
export default login;
diff --git a/shared/src/i18n/it/members.ts b/shared/src/i18n/it/members.ts
index f90746ba9..4409e631b 100644
--- a/shared/src/i18n/it/members.ts
+++ b/shared/src/i18n/it/members.ts
@@ -25,12 +25,13 @@ const members: TranslationStrings = {
'members.transferError': 'Trasferimento della proprietà non riuscito',
'members.guests': 'Ospiti',
'members.guest': 'Ospite',
- 'members.guestsHint': 'Persone senza account. Possono essere assegnate a spese, bagagli e attività, ma non possono accedere.',
+ 'members.guestsHint':
+ 'Persone senza account. Possono essere assegnate a spese, bagagli e attività, ma non possono accedere.',
'members.addGuest': 'Aggiungi ospite',
'members.guestNamePlaceholder': 'Nome ospite',
'members.guestAdded': 'Ospite aggiunto',
- 'members.guestAddError': 'Impossibile aggiungere l\'ospite',
- 'members.guestRenameError': 'Impossibile rinominare l\'ospite',
+ 'members.guestAddError': "Impossibile aggiungere l'ospite",
+ 'members.guestRenameError': "Impossibile rinominare l'ospite",
'members.guestRemoved': 'Ospite rimosso',
'members.confirmRemoveGuest': 'Rimuovere questo ospite? Verranno rimosse anche le sue assegnazioni e quote di spesa.',
};
diff --git a/shared/src/i18n/it/packing.ts b/shared/src/i18n/it/packing.ts
index b6e875433..11d9b50e1 100644
--- a/shared/src/i18n/it/packing.ts
+++ b/shared/src/i18n/it/packing.ts
@@ -194,7 +194,7 @@ const packing: TranslationStrings = {
'packing.takenCareOf': 'da {name}',
'packing.sharedWithCount': 'condiviso con {count}',
'packing.broughtBy': 'lo porta {name}',
- 'packing.alsoBring': 'Posso portarlo anch\'io',
+ 'packing.alsoBring': "Posso portarlo anch'io",
'packing.alsoBringingStop': 'Non lo porto',
'packing.cloneToMine': 'Copia nella mia lista',
};
diff --git a/shared/src/i18n/it/places.ts b/shared/src/i18n/it/places.ts
index 41d0b6d78..c8cf49702 100644
--- a/shared/src/i18n/it/places.ts
+++ b/shared/src/i18n/it/places.ts
@@ -24,8 +24,8 @@ const places: TranslationStrings = {
'places.kmlImportNoneSelected': 'Seleziona almeno un tipo.',
'places.selectionCount': '{count} selezionato/i',
'places.deleteSelected': 'Elimina selezionati',
- 'places.changeCategory': "Change category",
- 'places.categoryChanged': "{count} places updated",
+ 'places.changeCategory': 'Change category',
+ 'places.categoryChanged': '{count} places updated',
'places.kmlKmzImported': '{count} luoghi importati da KMZ/KML',
'places.urlResolved': "Luogo importato dall'URL",
'places.importList': 'Importa lista',
diff --git a/shared/src/i18n/it/settings.ts b/shared/src/i18n/it/settings.ts
index e416f1862..9154111a8 100644
--- a/shared/src/i18n/it/settings.ts
+++ b/shared/src/i18n/it/settings.ts
@@ -29,7 +29,8 @@ const settings: TranslationStrings = {
'settings.mapStylePlaceholder': 'Seleziona uno stile Mapbox',
'settings.mapStyleHint': 'Preset o il tuo URL mapbox://styles/USER/ID',
'settings.mapOpenFreeMapStylePlaceholder': 'Seleziona uno stile OpenFreeMap',
- 'settings.mapOpenFreeMapStyleHint': 'Preset o URL di stile OpenFreeMap. Gli stili OpenFreeMap funzionano senza token.',
+ 'settings.mapOpenFreeMapStyleHint':
+ 'Preset o URL di stile OpenFreeMap. Gli stili OpenFreeMap funzionano senza token.',
'settings.map3dBuildings': 'Edifici 3D e terreno',
'settings.map3dHint':
'Inclinazione + estrusioni 3D reali degli edifici — funziona con ogni stile, incluso satellite.',
@@ -329,18 +330,21 @@ const settings: TranslationStrings = {
'settings.airtrail.test.success': 'Connesso — {count} volo/i trovato/i',
'settings.airtrail.test.failed': 'Connessione fallita',
'settings.aiParsing.title': 'Analisi AI',
- 'settings.aiParsing.hint': 'Usa il tuo modello AI per estrarre le prenotazioni dai file caricati. Vale solo se l\'amministratore non ha configurato un modello per l\'intera istanza.',
+ 'settings.aiParsing.hint':
+ "Usa il tuo modello AI per estrarre le prenotazioni dai file caricati. Vale solo se l'amministratore non ha configurato un modello per l'intera istanza.",
'settings.aiParsing.provider': 'Provider',
'settings.aiParsing.providerLocal': 'Locale (Ollama)',
'settings.aiParsing.providerOpenai': 'OpenAI',
'settings.aiParsing.providerAnthropic': 'Anthropic',
'settings.aiParsing.model': 'Modello',
'settings.aiParsing.baseUrl': 'URL di base',
- 'settings.aiParsing.baseUrlHint': 'Dove gira il modello: un server Ollama locale o un endpoint compatibile con OpenAI.',
+ 'settings.aiParsing.baseUrlHint':
+ 'Dove gira il modello: un server Ollama locale o un endpoint compatibile con OpenAI.',
'settings.aiParsing.apiKey': 'Chiave API',
'settings.aiParsing.apiKeyHint': 'Memorizzata in forma cifrata. Lascia vuoto per mantenere la chiave attuale.',
'settings.aiParsing.multimodal': 'Invia i documenti come immagini',
- 'settings.aiParsing.multimodalHint': 'Per i modelli con capacità visive: invia il PDF originale invece del testo estratto.',
+ 'settings.aiParsing.multimodalHint':
+ 'Per i modelli con capacità visive: invia il PDF originale invece del testo estratto.',
'settings.aiParsing.toast.saved': 'Impostazioni AI salvate',
'settings.aiParsing.toast.saveError': 'Impossibile salvare le impostazioni AI',
'settings.tabs.appearance': 'Appearance',
@@ -359,7 +363,8 @@ const settings: TranslationStrings = {
'settings.appearance.contrastLow': 'Low contrast',
'settings.appearance.readability': 'Readability',
'settings.appearance.transparency': 'Transparency',
- 'settings.appearance.transparencyHint': 'Glassy translucent surfaces. Turn off for solid, higher-contrast backgrounds.',
+ 'settings.appearance.transparencyHint':
+ 'Glassy translucent surfaces. Turn off for solid, higher-contrast backgrounds.',
'settings.appearance.reduceMotion': 'Reduce motion',
'settings.appearance.reduceMotionHint': 'Minimize animations and transitions.',
'settings.appearance.density': 'Density',
@@ -389,7 +394,8 @@ const settings: TranslationStrings = {
'settings.appearance.group.belowHero': 'Below the hero',
'settings.appearance.group.bottomOfPage': 'Bottom of page',
'settings.appearance.sidebarHint': 'The whole right column. Turn off and the dashboard centers.',
- 'settings.appearance.densityHint': 'Compact tightens spacing and padding for a denser layout that fits more on screen.',
+ 'settings.appearance.densityHint':
+ 'Compact tightens spacing and padding for a denser layout that fits more on screen.',
'settings.appearance.textSizeAll': 'Everything',
'settings.appearance.perSize': 'Adjust each size separately',
'settings.appearance.size.large': 'Large',
@@ -412,10 +418,13 @@ const settings: TranslationStrings = {
'settings.offline.cache.title': 'Cache offline',
'settings.offline.mode.title': 'Modalità offline',
'settings.offline.mode.force': 'Forza la modalità offline',
- 'settings.offline.mode.forceHint': 'Lavora solo con i dati in cache e metti in coda le tue modifiche. Disattiva per riconnetterti e sincronizzare.',
- 'settings.offline.mode.active': 'La modalità offline è attiva — le tue modifiche sono in coda e verranno sincronizzate quando la disattivi.',
+ 'settings.offline.mode.forceHint':
+ 'Lavora solo con i dati in cache e metti in coda le tue modifiche. Disattiva per riconnetterti e sincronizzare.',
+ 'settings.offline.mode.active':
+ 'La modalità offline è attiva — le tue modifiche sono in coda e verranno sincronizzate quando la disattivi.',
'settings.offline.prepare.title': "Prepara per l'offline",
- 'settings.offline.prepare.hint': 'Scarica tutto ciò che ti serve — dati del viaggio, documenti e tile della mappa — prima di perdere la connessione.',
+ 'settings.offline.prepare.hint':
+ 'Scarica tutto ciò che ti serve — dati del viaggio, documenti e tile della mappa — prima di perdere la connessione.',
'settings.offline.prepare.button': "Scarica per l'uso offline",
'settings.offline.prepare.running': 'Download in corso…',
'settings.offline.prepare.done': "Pronto per l'uso offline",
@@ -426,12 +435,14 @@ const settings: TranslationStrings = {
'settings.offline.resyncing': 'Sincronizzazione…',
'settings.offline.storage.title': 'Cosa archiviare offline',
'settings.offline.storage.tiles': 'Archivia i tile della mappa offline',
- 'settings.offline.storage.tilesHint': 'I tile della mappa usano più spazio di archiviazione. Disattiva questa opzione per conservare offline solo i dati del viaggio e i documenti.',
+ 'settings.offline.storage.tilesHint':
+ 'I tile della mappa usano più spazio di archiviazione. Disattiva questa opzione per conservare offline solo i dati del viaggio e i documenti.',
'settings.offline.storage.tripsTitle': 'Viaggi',
'settings.offline.storage.tripOn': 'Archiviato offline',
'settings.offline.storage.tripOff': 'Non archiviato',
'settings.offline.clear': 'Svuota la cache',
- 'settings.offline.clearConfirm': 'Cancellare tutti i dati di viaggio offline? Puoi risincronizzare in qualsiasi momento quando sei online.',
+ 'settings.offline.clearConfirm':
+ 'Cancellare tutti i dati di viaggio offline? Puoi risincronizzare in qualsiasi momento quando sei online.',
'settings.offline.stats.trips': 'Viaggi in cache',
'settings.offline.stats.pending': 'Modifiche in sospeso',
'settings.offline.stats.failed': 'Modifiche non riuscite',
@@ -439,7 +450,8 @@ const settings: TranslationStrings = {
'settings.offline.empty': 'Nessun viaggio ancora in cache. Connettiti a internet per sincronizzare.',
'settings.offline.loading': 'Caricamento…',
'settings.offline.conflicts.title': 'Conflitti di sincronizzazione',
- 'settings.offline.conflicts.hint': 'Le modifiche fatte offline sono in conflitto con modifiche più recenti sul server. Scegli quale versione mantenere.',
+ 'settings.offline.conflicts.hint':
+ 'Le modifiche fatte offline sono in conflitto con modifiche più recenti sul server. Scegli quale versione mantenere.',
'settings.offline.conflicts.keepMine': 'Mantieni le mie',
'settings.offline.conflicts.keepServer': 'Mantieni le loro',
'settings.offline.conflicts.mine': 'La tua versione',
diff --git a/shared/src/i18n/it/trip.ts b/shared/src/i18n/it/trip.ts
index 0e6597c71..8ba55ab01 100644
--- a/shared/src/i18n/it/trip.ts
+++ b/shared/src/i18n/it/trip.ts
@@ -28,7 +28,8 @@ const trip: TranslationStrings = {
'trip.toast.placesDeleted': '{count} luoghi eliminati',
'trip.loadingPhotos': 'Caricamento foto dei luoghi...',
'trip.invite.linkTitle': 'Link di invito al viaggio',
- 'trip.invite.linkHint': 'Chiunque abbia un account TREK e apra questo link entra nel viaggio come membro. Rigenera per invalidare il vecchio link.',
+ 'trip.invite.linkHint':
+ 'Chiunque abbia un account TREK e apra questo link entra nel viaggio come membro. Rigenera per invalidare il vecchio link.',
'trip.invite.create': 'Crea link di invito',
'trip.invite.regenerate': 'Rigenera',
'trip.invite.disable': 'Disattiva',
diff --git a/shared/src/i18n/it/undo.ts b/shared/src/i18n/it/undo.ts
index ba5150e87..3394fba28 100644
--- a/shared/src/i18n/it/undo.ts
+++ b/shared/src/i18n/it/undo.ts
@@ -9,7 +9,7 @@ const undo: TranslationStrings = {
'undo.optimize': 'Percorso ottimizzato',
'undo.deletePlace': 'Luogo eliminato',
'undo.deletePlaces': 'Luoghi eliminati',
- 'undo.changeCategory': "Category changed",
+ 'undo.changeCategory': 'Category changed',
'undo.moveDay': 'Luogo spostato in altro giorno',
'undo.lock': 'Blocco luogo modificato',
'undo.importGpx': 'Importazione GPX',
diff --git a/shared/src/i18n/ja/admin.ts b/shared/src/i18n/ja/admin.ts
index d04d71201..11b1b8d50 100644
--- a/shared/src/i18n/ja/admin.ts
+++ b/shared/src/i18n/ja/admin.ts
@@ -129,6 +129,8 @@ const admin: TranslationStrings = {
'admin.recommended': '推奨',
'admin.weatherKey': 'OpenWeatherMap APIキー',
'admin.weatherKeyHint': '天気データ用。openweathermap.org で無料',
+ 'admin.unsplashKey': 'Unsplash APIキー',
+ 'admin.unsplashKeyHint': '画像検索用。unsplash.com/developers で無料',
'admin.validateKey': 'テスト',
'admin.keyValid': '接続済み',
'admin.keyInvalid': '無効',
@@ -193,6 +195,11 @@ const admin: TranslationStrings = {
'admin.tabs.plugins': 'プラグイン',
'admin.plugins.rescan': '再スキャン',
'admin.plugins.rescanned': 'プラグインフォルダを再スキャンしました',
+ 'admin.plugins.upload': 'プラグインをアップロード',
+ 'admin.plugins.dropToUpload': 'プラグインの .zip をドロップしてインストール',
+ 'admin.plugins.uploaded': 'プラグイン「{name}」をアップロードしました — 実行するには有効化してください',
+ 'admin.plugins.sideloaded': '手動読み込み',
+ 'admin.plugins.sideloadedHint': '手動でアップロード — レジストリ経由ではなく、署名・審査なし',
'admin.plugins.browse': 'プラグインを探す',
'admin.plugins.installed': 'インストール済み',
'admin.plugins.install': 'インストール',
@@ -207,11 +214,13 @@ const admin: TranslationStrings = {
'admin.plugins.noErrors': '記録されたエラーはありません。',
'admin.plugins.uninstalled': 'プラグインをアンインストールしました',
'admin.plugins.uninstallTitle': 'プラグインをアンインストールしますか?',
- 'admin.plugins.uninstallBody': 'プラグインを停止してコードを削除し、そのすべてのデータを消去します。この操作は元に戻せません。',
+ 'admin.plugins.uninstallBody':
+ 'プラグインを停止してコードを削除し、そのすべてのデータを消去します。この操作は元に戻せません。',
'admin.plugins.status.starting': '起動中…',
'admin.plugins.type.widget': 'ウィジェット',
'admin.plugins.type.page': 'ページ',
'admin.plugins.type.integration': '連携',
+ 'admin.plugins.type.trip-page': '旅程ページ',
'admin.plugins.reviewed': 'レビュー済み',
'admin.plugins.unreviewed': '未レビュー',
'admin.plugins.updated': 'プラグインを更新しました',
@@ -221,10 +230,12 @@ const admin: TranslationStrings = {
'admin.plugins.title': 'プラグイン',
'admin.plugins.subtitle': 'サードパーティ製プラグインをインスタンスにインストール・管理します。',
'admin.plugins.disabledTitle': 'プラグインは無効になっています',
- 'admin.plugins.disabledBody': 'プラグインランタイムがオフになっています(TREK_PLUGINS_ENABLED)。管理者がサーバー設定で有効にするまで、プラグインは実行できません。',
+ 'admin.plugins.disabledBody':
+ 'プラグインランタイムがオフになっています(TREK_PLUGINS_ENABLED)。管理者がサーバー設定で有効にするまで、プラグインは実行できません。',
'admin.plugins.empty': 'インストール済みのプラグインはまだありません。',
'admin.plugins.loadError': 'プラグインを読み込めませんでした。',
- 'admin.plugins.scaffoldNote': 'プラグインのインストールと有効化は今後のアップデートで提供予定です。現在このパネルにはインストール済みのプラグインのみが表示されます。',
+ 'admin.plugins.scaffoldNote':
+ 'プラグインのインストールと有効化は今後のアップデートで提供予定です。現在このパネルにはインストール済みのプラグインのみが表示されます。',
'admin.plugins.status.active': '有効',
'admin.plugins.status.inactive': '停止中',
'admin.plugins.status.disabled': '無効',
@@ -247,10 +258,24 @@ const admin: TranslationStrings = {
'admin.plugins.perm.db:own': '専用の分離データベースに独自データを保存',
'admin.plugins.perm.db:read:trips': '操作中のユーザーがアクセスできる旅行の読み取り',
'admin.plugins.perm.db:read:users': '基本プロフィール情報の読み取り(名前・アバターのみ — 認証情報は含まれません)',
+ 'admin.plugins.perm.db:read:costs': '操作中のユーザーがアクセスできる支出(予算項目)の読み取り',
+ 'admin.plugins.perm.db:read:packing': '操作中のユーザーがアクセスできる旅行の持ち物リストの読み取り',
+ 'admin.plugins.perm.db:read:files': '操作中のユーザーがアクセスできる旅行のファイルの読み取り',
+ 'admin.plugins.perm.db:write:costs': '操作中のユーザーが編集できる旅行への支出(予算項目)の作成',
+ 'admin.plugins.perm.db:write:places': '操作中のユーザーが編集できる旅行の場所の追加・編集・削除',
+ 'admin.plugins.perm.db:write:days': '操作中のユーザーが編集できる旅行の日程の追加・編集・削除',
+ 'admin.plugins.perm.db:write:itinerary': '操作中のユーザーが編集できる旅行の各日への場所の割り当てと解除',
+ 'admin.plugins.perm.db:write:trips': '操作中のユーザーが編集できる旅行の詳細(タイトル・日付・通貨など)の編集',
+ 'admin.plugins.perm.db:meta':
+ '操作中のユーザーがアクセスできる旅行・場所・日程に、プラグイン独自の非公開データを付加',
'admin.plugins.perm.ws:broadcast:trip': '旅行メンバーへのリアルタイム更新の送信',
'admin.plugins.perm.ws:broadcast:user': '個々のユーザーへのリアルタイム更新の送信',
'admin.plugins.perm.hook:photo-provider': '「写真」機能への写真の提供',
'admin.plugins.perm.hook:calendar-source': 'カレンダーへの予定の提供',
+ 'admin.plugins.perm.hook:place-detail-provider': '場所に追加の詳細情報(レビュー、評価、リンク)を提供',
+ 'admin.plugins.perm.hook:trip-warning-provider': '旅程に検証警告を表示(プランナー内に表示)',
+ 'admin.plugins.perm.events:subscribe':
+ 'コアのアクティビティイベントに反応(イベント名と旅程のみで、内容には一切アクセスしません)',
'admin.plugins.perm.http:outbound': '宣言済みホストへの外部リクエストの送信',
'admin.plugins.updateConsentTitle': 'このアップデートには新しい権限が必要です',
'admin.plugins.updateConsentBody':
@@ -302,11 +327,36 @@ const admin: TranslationStrings = {
'admin.plugins.restarted': 'プラグインを再起動しました',
'admin.plugins.cap.readsTrips': '旅行を読み取り',
'admin.plugins.cap.readsUsers': '基本プロフィールを読み取り',
+ 'admin.plugins.cap.readsCosts': '支出を読み取り',
+ 'admin.plugins.cap.readsPacking': '持ち物リストを読み取り',
+ 'admin.plugins.cap.readsFiles': '旅行ファイルを読み取り',
+ 'admin.plugins.cap.writesCosts': '支出を追加',
+ 'admin.plugins.cap.writesPlaces': '場所を編集',
+ 'admin.plugins.cap.writesDays': '日程を編集',
+ 'admin.plugins.cap.writesItinerary': '旅程を編集',
+ 'admin.plugins.cap.writesTrips': '旅行を編集',
+ 'admin.plugins.cap.metadata': 'メタデータを追加',
'admin.plugins.cap.widget': 'ダッシュボードウィジェット',
'admin.plugins.cap.heroWidget': '搭乗券ウィジェット',
+ 'admin.plugins.cap.placeSlot': '場所詳細',
'admin.plugins.cap.realtime': 'リアルタイム更新',
'admin.plugins.cap.photos': '写真を提供',
'admin.plugins.cap.calendar': 'カレンダー予定を提供',
+ 'admin.plugins.cap.placeDetails': '場所を充実',
+ 'admin.plugins.cap.warnings': '問題を検出',
+ 'admin.plugins.cap.events': 'アクティビティに反応',
+ 'admin.plugins.cap.requiresAddon': '{addon}が必要',
+ 'admin.plugins.cap.dependsOn': '{id} {version}が必要',
+ 'admin.plugins.dep.addonDisabledToast': '先に必要なアドオンを有効にしてください:{addons}',
+ 'admin.plugins.dep.autoEnabled': '必要なプラグインを先に有効にしました:{plugins}',
+ 'admin.plugins.dep.downloaded': '{id}をダウンロードしました',
+ 'admin.plugins.dep.resolveTitle': '依存関係が不足しています',
+ 'admin.plugins.dep.resolveBody': '「{name}」を有効にするには、これらのプラグインのインストールが必要です。',
+ 'admin.plugins.dep.requires': '{version}が必要',
+ 'admin.plugins.dep.mismatch': '{wanted}が必要 — 現在{installed}',
+ 'admin.plugins.dep.download': 'ダウンロード',
+ 'admin.plugins.dep.update': '更新',
+ 'admin.plugins.dep.resolveHint': '独自の依存関係を含め、最新の互換バージョンをダウンロードします。',
'admin.plugins.accessTitle': 'アクセスできるもの',
'admin.plugins.connectsTitle': '接続先',
'admin.plugins.detailsTitle': '詳細',
diff --git a/shared/src/i18n/ja/budget.ts b/shared/src/i18n/ja/budget.ts
index b1e953fea..136e11559 100644
--- a/shared/src/i18n/ja/budget.ts
+++ b/shared/src/i18n/ja/budget.ts
@@ -52,6 +52,9 @@ const budget: TranslationStrings = {
'costs.nothingOwed': '受け取る額はありません',
'costs.yourShare': 'あなたの負担分',
'costs.youPaid': 'あなたが支払った額',
+ 'costs.outstanding': '未精算の金額',
+ 'costs.outstandingSub': '支払者が未設定の支出',
+ 'costs.outstandingItems': '件の支出に支払者が必要',
'costs.expenses': '支出',
'costs.entries': '{count}件',
'costs.searchPlaceholder': '支出を検索…',
@@ -116,10 +119,10 @@ const budget: TranslationStrings = {
'costs.unfinishedHint': '合計のみ — 未精算',
'costs.tapToInclude': 'タップして追加',
'costs.amount': '金額',
- 'costs.split': "Split",
- 'costs.splitEqually': "Equally",
- 'costs.splitCustom': "Custom",
- 'costs.splitTicket': "Ticket",
+ 'costs.split': 'Split',
+ 'costs.splitEqually': 'Equally',
+ 'costs.splitCustom': 'Custom',
+ 'costs.splitTicket': 'Ticket',
'costs.filter.allCategories': 'すべてのカテゴリー',
'costs.filter.allDays': 'すべての日',
'costs.expensesCount': '{count}件の支出',
diff --git a/shared/src/i18n/ja/dashboard.ts b/shared/src/i18n/ja/dashboard.ts
index 79855b738..410dc1bd4 100644
--- a/shared/src/i18n/ja/dashboard.ts
+++ b/shared/src/i18n/ja/dashboard.ts
@@ -42,7 +42,8 @@ const dashboard: TranslationStrings = {
'dashboard.status.past': '過去',
'dashboard.status.daysLeft': '残り{count}日',
'dashboard.toast.loadError': '旅行の読み込みに失敗しました',
- 'dashboard.loadErrorBanner': 'サーバーに接続できませんでした。旅行のデータは安全に保存されています — もう一度お試しください。',
+ 'dashboard.loadErrorBanner':
+ 'サーバーに接続できませんでした。旅行のデータは安全に保存されています — もう一度お試しください。',
'dashboard.retry': '再試行',
'dashboard.toast.created': '旅行を作成しました!',
'dashboard.toast.createError': '旅行の作成に失敗しました',
diff --git a/shared/src/i18n/ja/help.ts b/shared/src/i18n/ja/help.ts
index 9f282d544..8101a11a3 100644
--- a/shared/src/i18n/ja/help.ts
+++ b/shared/src/i18n/ja/help.ts
@@ -2,12 +2,12 @@ import type { TranslationStrings } from '../types';
// English fallback until 'ja' is translated.
const help: TranslationStrings = {
- 'help.title': "Help & Docs",
- 'help.search': "Search docs…",
- 'help.contents': "Contents",
- 'help.noResults': "No matching pages.",
+ 'help.title': 'Help & Docs',
+ 'help.search': 'Search docs…',
+ 'help.contents': 'Contents',
+ 'help.noResults': 'No matching pages.',
'help.errorTitle': "Couldn't load this page",
- 'help.errorBody': "The help content is fetched from the TREK wiki. Check your connection and try again.",
+ 'help.errorBody': 'The help content is fetched from the TREK wiki. Check your connection and try again.',
};
export default help;
diff --git a/shared/src/i18n/ja/index.ts b/shared/src/i18n/ja/index.ts
index b9af5461f..eef4c74aa 100644
--- a/shared/src/i18n/ja/index.ts
+++ b/shared/src/i18n/ja/index.ts
@@ -5,11 +5,13 @@ import backup from './backup';
import budget from './budget';
import categories from './categories';
import collab from './collab';
+import collection from './collection';
import common from './common';
import dashboard from './dashboard';
import day from './day';
import dayplan from './dayplan';
import files from './files';
+import help from './help';
import inspector from './inspector';
import journey from './journey';
import login from './login';
@@ -39,8 +41,6 @@ import trip from './trip';
import trips from './trips';
import undo from './undo';
import vacay from './vacay';
-import collection from './collection';
-import help from './help';
const locale = {
...common,
diff --git a/shared/src/i18n/ja/login.ts b/shared/src/i18n/ja/login.ts
index 2905846cb..ffdc7fe1b 100644
--- a/shared/src/i18n/ja/login.ts
+++ b/shared/src/i18n/ja/login.ts
@@ -86,7 +86,8 @@ const login: TranslationStrings = {
'login.passkey.signIn': 'パスキーでサインイン',
'login.passkey.failed': 'パスキーでのサインインに失敗しました。もう一度お試しください。',
'login.insecureCookie.title': "Login won't stick over HTTP",
- 'login.insecureCookie.body': "You’re connecting over plain HTTP, so your browser drops TREK’s secure session cookie — the next request fails with \"Access token required\". Fix: use HTTPS, or for a home-lab set COOKIE_SECURE=false.",
- 'login.insecureCookie.link': "Open the Troubleshooting guide",
+ 'login.insecureCookie.body':
+ 'You’re connecting over plain HTTP, so your browser drops TREK’s secure session cookie — the next request fails with "Access token required". Fix: use HTTPS, or for a home-lab set COOKIE_SECURE=false.',
+ 'login.insecureCookie.link': 'Open the Troubleshooting guide',
};
export default login;
diff --git a/shared/src/i18n/ja/places.ts b/shared/src/i18n/ja/places.ts
index 85aa6773b..4b1af954b 100644
--- a/shared/src/i18n/ja/places.ts
+++ b/shared/src/i18n/ja/places.ts
@@ -24,8 +24,8 @@ const places: TranslationStrings = {
'places.kmlImportNoneSelected': '少なくとも1つ選択してください。',
'places.selectionCount': '{count} 件選択中',
'places.deleteSelected': '選択を削除',
- 'places.changeCategory': "Change category",
- 'places.categoryChanged': "{count} places updated",
+ 'places.changeCategory': 'Change category',
+ 'places.categoryChanged': '{count} places updated',
'places.kmlKmzImported': 'KMZ/KMLから {count} 件の場所をインポートしました',
'places.urlResolved': 'URLから場所をインポートしました',
'places.importList': 'リストをインポート',
diff --git a/shared/src/i18n/ja/settings.ts b/shared/src/i18n/ja/settings.ts
index 3e20f47b2..afe27c5e4 100644
--- a/shared/src/i18n/ja/settings.ts
+++ b/shared/src/i18n/ja/settings.ts
@@ -29,7 +29,8 @@ const settings: TranslationStrings = {
'settings.mapStylePlaceholder': 'Mapboxスタイルを選択',
'settings.mapStyleHint': 'プリセットまたは mapbox://styles/USER/ID のURL',
'settings.mapOpenFreeMapStylePlaceholder': 'OpenFreeMapスタイルを選択',
- 'settings.mapOpenFreeMapStyleHint': 'プリセットまたは OpenFreeMap スタイルのURL。OpenFreeMap スタイルはトークンなしで動作します。',
+ 'settings.mapOpenFreeMapStyleHint':
+ 'プリセットまたは OpenFreeMap スタイルのURL。OpenFreeMap スタイルはトークンなしで動作します。',
'settings.map3dBuildings': '3D建物・地形',
'settings.map3dHint': 'ピッチ+実際の3D押し出し表示。衛星含む全スタイルで動作。',
'settings.mapHighQuality': '高品質モード',
@@ -306,7 +307,8 @@ const settings: TranslationStrings = {
'settings.airtrail.test.success': '接続成功 — {count} 件のフライトが見つかりました',
'settings.airtrail.test.failed': '接続に失敗しました',
'settings.aiParsing.title': 'AI解析',
- 'settings.aiParsing.hint': 'アップロードしたファイルから予約情報を抽出するために、自分のAIモデルを使用します。これは、管理者がインスタンス全体のモデルを設定していない場合にのみ適用されます。',
+ 'settings.aiParsing.hint':
+ 'アップロードしたファイルから予約情報を抽出するために、自分のAIモデルを使用します。これは、管理者がインスタンス全体のモデルを設定していない場合にのみ適用されます。',
'settings.aiParsing.provider': 'プロバイダー',
'settings.aiParsing.providerLocal': 'ローカル (Ollama)',
'settings.aiParsing.providerOpenai': 'OpenAI',
@@ -336,7 +338,8 @@ const settings: TranslationStrings = {
'settings.appearance.contrastLow': 'Low contrast',
'settings.appearance.readability': 'Readability',
'settings.appearance.transparency': 'Transparency',
- 'settings.appearance.transparencyHint': 'Glassy translucent surfaces. Turn off for solid, higher-contrast backgrounds.',
+ 'settings.appearance.transparencyHint':
+ 'Glassy translucent surfaces. Turn off for solid, higher-contrast backgrounds.',
'settings.appearance.reduceMotion': 'Reduce motion',
'settings.appearance.reduceMotionHint': 'Minimize animations and transitions.',
'settings.appearance.density': 'Density',
@@ -366,7 +369,8 @@ const settings: TranslationStrings = {
'settings.appearance.group.belowHero': 'Below the hero',
'settings.appearance.group.bottomOfPage': 'Bottom of page',
'settings.appearance.sidebarHint': 'The whole right column. Turn off and the dashboard centers.',
- 'settings.appearance.densityHint': 'Compact tightens spacing and padding for a denser layout that fits more on screen.',
+ 'settings.appearance.densityHint':
+ 'Compact tightens spacing and padding for a denser layout that fits more on screen.',
'settings.appearance.textSizeAll': 'Everything',
'settings.appearance.perSize': 'Adjust each size separately',
'settings.appearance.size.large': 'Large',
@@ -389,10 +393,12 @@ const settings: TranslationStrings = {
'settings.offline.cache.title': 'オフラインキャッシュ',
'settings.offline.mode.title': 'オフラインモード',
'settings.offline.mode.force': 'オフラインモードを強制',
- 'settings.offline.mode.forceHint': 'キャッシュ済みのデータのみで作業し、変更はキューに保存します。オフにすると再接続して同期します。',
+ 'settings.offline.mode.forceHint':
+ 'キャッシュ済みのデータのみで作業し、変更はキューに保存します。オフにすると再接続して同期します。',
'settings.offline.mode.active': 'オフラインモードがオンです — 変更はキューに保存され、オフにすると同期されます。',
'settings.offline.prepare.title': 'オフラインの準備',
- 'settings.offline.prepare.hint': '接続が切れる前に、必要なもの — 旅行データ、ドキュメント、地図タイル — をすべてダウンロードします。',
+ 'settings.offline.prepare.hint':
+ '接続が切れる前に、必要なもの — 旅行データ、ドキュメント、地図タイル — をすべてダウンロードします。',
'settings.offline.prepare.button': 'オフライン用にダウンロード',
'settings.offline.prepare.running': 'ダウンロード中…',
'settings.offline.prepare.done': 'オフラインで利用できます',
@@ -403,7 +409,8 @@ const settings: TranslationStrings = {
'settings.offline.resyncing': '同期中…',
'settings.offline.storage.title': 'オフラインで保存する内容',
'settings.offline.storage.tiles': '地図タイルをオフラインで保存',
- 'settings.offline.storage.tilesHint': '地図タイルは最も多くのストレージを使用します。これをオフにすると、旅行データとドキュメントのみをオフラインで保存します。',
+ 'settings.offline.storage.tilesHint':
+ '地図タイルは最も多くのストレージを使用します。これをオフにすると、旅行データとドキュメントのみをオフラインで保存します。',
'settings.offline.storage.tripsTitle': '旅行',
'settings.offline.storage.tripOn': 'オフラインで保存済み',
'settings.offline.storage.tripOff': '未保存',
@@ -416,7 +423,8 @@ const settings: TranslationStrings = {
'settings.offline.empty': 'キャッシュされた旅行はまだありません。インターネットに接続して同期してください。',
'settings.offline.loading': '読み込み中…',
'settings.offline.conflicts.title': '同期の競合',
- 'settings.offline.conflicts.hint': 'オフラインで行った変更が、サーバー上の新しい変更と競合しています。どちらのバージョンを保持するか選択してください。',
+ 'settings.offline.conflicts.hint':
+ 'オフラインで行った変更が、サーバー上の新しい変更と競合しています。どちらのバージョンを保持するか選択してください。',
'settings.offline.conflicts.keepMine': '自分の変更を保持',
'settings.offline.conflicts.keepServer': 'サーバーの変更を保持',
'settings.offline.conflicts.mine': 'あなたのバージョン',
diff --git a/shared/src/i18n/ja/trip.ts b/shared/src/i18n/ja/trip.ts
index 5abdcd416..71576a0bd 100644
--- a/shared/src/i18n/ja/trip.ts
+++ b/shared/src/i18n/ja/trip.ts
@@ -28,7 +28,8 @@ const trip: TranslationStrings = {
'trip.confirm.deletePlaces': '{count}件の場所を削除してもよろしいですか?',
'trip.toast.placesDeleted': '{count}件の場所を削除しました',
'trip.invite.linkTitle': '旅行の招待リンク',
- 'trip.invite.linkHint': 'TREKアカウントを持っている人がこのリンクを開くと、メンバーとして旅行に参加します。古いリンクを無効にするには再生成してください。',
+ 'trip.invite.linkHint':
+ 'TREKアカウントを持っている人がこのリンクを開くと、メンバーとして旅行に参加します。古いリンクを無効にするには再生成してください。',
'trip.invite.create': '招待リンクを作成',
'trip.invite.regenerate': '再生成',
'trip.invite.disable': '無効にする',
diff --git a/shared/src/i18n/ja/undo.ts b/shared/src/i18n/ja/undo.ts
index 5ef9e24f9..2b458a8ac 100644
--- a/shared/src/i18n/ja/undo.ts
+++ b/shared/src/i18n/ja/undo.ts
@@ -9,7 +9,7 @@ const undo: TranslationStrings = {
'undo.optimize': 'ルートを最適化',
'undo.deletePlace': '場所を削除',
'undo.deletePlaces': '場所を削除',
- 'undo.changeCategory': "Category changed",
+ 'undo.changeCategory': 'Category changed',
'undo.moveDay': '場所を別の日に移動',
'undo.lock': '場所のロックを切り替え',
'undo.importGpx': 'GPXをインポート',
diff --git a/shared/src/i18n/ko/admin.ts b/shared/src/i18n/ko/admin.ts
index 7f2b6839c..5ba7aa361 100644
--- a/shared/src/i18n/ko/admin.ts
+++ b/shared/src/i18n/ko/admin.ts
@@ -134,6 +134,8 @@ const admin: TranslationStrings = {
'admin.recommended': '권장',
'admin.weatherKey': 'OpenWeatherMap API 키',
'admin.weatherKeyHint': '날씨 데이터용. openweathermap.org에서 무료 발급',
+ 'admin.unsplashKey': 'Unsplash API 키',
+ 'admin.unsplashKeyHint': '이미지 검색용. unsplash.com/developers에서 무료 발급',
'admin.validateKey': '테스트',
'admin.keyValid': '연결됨',
'admin.keyInvalid': '유효하지 않음',
@@ -199,6 +201,11 @@ const admin: TranslationStrings = {
'admin.tabs.plugins': '플러그인',
'admin.plugins.rescan': '다시 스캔',
'admin.plugins.rescanned': '플러그인 폴더를 다시 스캔했습니다',
+ 'admin.plugins.upload': '플러그인 업로드',
+ 'admin.plugins.dropToUpload': '플러그인 .zip을 여기에 놓아 설치',
+ 'admin.plugins.uploaded': '플러그인 “{name}” 업로드됨 — 실행하려면 활성화하세요',
+ 'admin.plugins.sideloaded': '수동 로드',
+ 'admin.plugins.sideloadedHint': '수동으로 업로드됨 — 레지스트리가 아니며 서명·검토되지 않음',
'admin.plugins.browse': '플러그인 둘러보기',
'admin.plugins.installed': '설치됨',
'admin.plugins.install': '설치',
@@ -213,11 +220,13 @@ const admin: TranslationStrings = {
'admin.plugins.noErrors': '기록된 오류가 없습니다.',
'admin.plugins.uninstalled': '플러그인이 제거되었습니다',
'admin.plugins.uninstallTitle': '플러그인을 제거할까요?',
- 'admin.plugins.uninstallBody': '플러그인이 중지되고 코드가 제거되며 모든 데이터가 삭제됩니다. 이 작업은 되돌릴 수 없습니다.',
+ 'admin.plugins.uninstallBody':
+ '플러그인이 중지되고 코드가 제거되며 모든 데이터가 삭제됩니다. 이 작업은 되돌릴 수 없습니다.',
'admin.plugins.status.starting': '시작 중…',
'admin.plugins.type.widget': '위젯',
'admin.plugins.type.page': '페이지',
'admin.plugins.type.integration': '통합',
+ 'admin.plugins.type.trip-page': '여행 페이지',
'admin.plugins.reviewed': '검토됨',
'admin.plugins.unreviewed': '검토되지 않음',
'admin.plugins.updated': '플러그인이 업데이트되었습니다',
@@ -227,10 +236,12 @@ const admin: TranslationStrings = {
'admin.plugins.title': '플러그인',
'admin.plugins.subtitle': '인스턴스에 서드파티 플러그인을 설치하고 관리하세요.',
'admin.plugins.disabledTitle': '플러그인이 비활성화되어 있습니다',
- 'admin.plugins.disabledBody': '플러그인 런타임이 꺼져 있습니다 (TREK_PLUGINS_ENABLED). 관리자가 서버 설정에서 활성화하기 전까지 어떤 플러그인도 실행할 수 없습니다.',
+ 'admin.plugins.disabledBody':
+ '플러그인 런타임이 꺼져 있습니다 (TREK_PLUGINS_ENABLED). 관리자가 서버 설정에서 활성화하기 전까지 어떤 플러그인도 실행할 수 없습니다.',
'admin.plugins.empty': '아직 설치된 플러그인이 없습니다.',
'admin.plugins.loadError': '플러그인을 불러올 수 없습니다.',
- 'admin.plugins.scaffoldNote': '플러그인 설치 및 활성화는 이후 업데이트에서 제공됩니다. 현재 이 패널은 설치된 플러그인만 표시합니다.',
+ 'admin.plugins.scaffoldNote':
+ '플러그인 설치 및 활성화는 이후 업데이트에서 제공됩니다. 현재 이 패널은 설치된 플러그인만 표시합니다.',
'admin.plugins.status.active': '활성',
'admin.plugins.status.inactive': '비활성',
'admin.plugins.status.disabled': '비활성화됨',
@@ -253,10 +264,22 @@ const admin: TranslationStrings = {
'admin.plugins.perm.db:own': '격리된 데이터베이스에 자체 데이터 저장',
'admin.plugins.perm.db:read:trips': '현재 사용자가 접근할 수 있는 여행 읽기',
'admin.plugins.perm.db:read:users': '기본 프로필 정보 읽기 (이름, 아바타 — 자격 증명은 제외)',
+ 'admin.plugins.perm.db:read:costs': '현재 사용자가 접근할 수 있는 지출(예산 항목) 읽기',
+ 'admin.plugins.perm.db:read:packing': '현재 사용자가 접근할 수 있는 여행의 짐 목록 읽기',
+ 'admin.plugins.perm.db:read:files': '현재 사용자가 접근할 수 있는 여행의 파일 읽기',
+ 'admin.plugins.perm.db:write:costs': '현재 사용자가 편집할 수 있는 여행에 지출(예산 항목) 만들기',
+ 'admin.plugins.perm.db:write:places': '현재 사용자가 편집할 수 있는 여행에서 장소 추가, 편집 및 삭제',
+ 'admin.plugins.perm.db:write:days': '현재 사용자가 편집할 수 있는 여행에서 날짜 추가, 편집 및 삭제',
+ 'admin.plugins.perm.db:write:itinerary': '현재 사용자가 편집할 수 있는 여행의 날짜에 장소 지정 및 삭제',
+ 'admin.plugins.perm.db:write:trips': '현재 사용자가 편집할 수 있는 여행의 세부 정보(제목, 날짜, 통화…) 편집',
+ 'admin.plugins.perm.db:meta': '현재 사용자가 접근할 수 있는 여행, 장소, 날짜에 플러그인 고유의 비공개 데이터 첨부',
'admin.plugins.perm.ws:broadcast:trip': '여행 멤버에게 실시간 업데이트 전송',
'admin.plugins.perm.ws:broadcast:user': '개별 사용자에게 실시간 업데이트 전송',
'admin.plugins.perm.hook:photo-provider': '사진 기능에 사진 제공',
'admin.plugins.perm.hook:calendar-source': '캘린더에 일정 제공',
+ 'admin.plugins.perm.hook:place-detail-provider': '장소에 추가 정보(리뷰, 평점, 링크)를 제공',
+ 'admin.plugins.perm.hook:trip-warning-provider': '여행에 검증 경고를 표시 (플래너에 표시됨)',
+ 'admin.plugins.perm.events:subscribe': '핵심 활동 이벤트에 반응 (이벤트 이름과 여행만, 내용은 절대 표시 안 함)',
'admin.plugins.perm.http:outbound': '선언된 호스트로 아웃바운드 요청 전송',
'admin.plugins.updateConsentTitle': '이 업데이트에는 새로운 권한이 필요합니다',
'admin.plugins.updateConsentBody':
@@ -308,11 +331,36 @@ const admin: TranslationStrings = {
'admin.plugins.restarted': '플러그인이 다시 시작되었습니다',
'admin.plugins.cap.readsTrips': '여행 읽기',
'admin.plugins.cap.readsUsers': '기본 프로필 읽기',
+ 'admin.plugins.cap.readsCosts': '지출 읽기',
+ 'admin.plugins.cap.readsPacking': '짐 목록 읽기',
+ 'admin.plugins.cap.readsFiles': '여행 파일 읽기',
+ 'admin.plugins.cap.writesCosts': '지출 추가',
+ 'admin.plugins.cap.writesPlaces': '장소 편집',
+ 'admin.plugins.cap.writesDays': '날짜 편집',
+ 'admin.plugins.cap.writesItinerary': '일정 편집',
+ 'admin.plugins.cap.writesTrips': '여행 편집',
+ 'admin.plugins.cap.metadata': '메타데이터 추가',
'admin.plugins.cap.widget': '대시보드 위젯',
'admin.plugins.cap.heroWidget': '탑승권 위젯',
+ 'admin.plugins.cap.placeSlot': '장소 상세',
'admin.plugins.cap.realtime': '실시간 업데이트',
'admin.plugins.cap.photos': '사진 제공',
'admin.plugins.cap.calendar': '캘린더 일정 제공',
+ 'admin.plugins.cap.placeDetails': '장소 정보 강화',
+ 'admin.plugins.cap.warnings': '문제 표시',
+ 'admin.plugins.cap.events': '활동에 반응',
+ 'admin.plugins.cap.requiresAddon': '{addon} 필요',
+ 'admin.plugins.cap.dependsOn': '{id} {version} 필요',
+ 'admin.plugins.dep.addonDisabledToast': '필요한 애드온을 먼저 활성화하세요: {addons}',
+ 'admin.plugins.dep.autoEnabled': '필요한 플러그인을 먼저 활성화했습니다: {plugins}',
+ 'admin.plugins.dep.downloaded': '{id} 다운로드 완료',
+ 'admin.plugins.dep.resolveTitle': '누락된 종속성',
+ 'admin.plugins.dep.resolveBody': '“{name}”을(를) 활성화하려면 다음 플러그인을 먼저 설치해야 합니다.',
+ 'admin.plugins.dep.requires': '{version} 필요',
+ 'admin.plugins.dep.mismatch': '{wanted} 필요 — 현재 {installed} 설치됨',
+ 'admin.plugins.dep.download': '다운로드',
+ 'admin.plugins.dep.update': '업데이트',
+ 'admin.plugins.dep.resolveHint': '자체 종속성을 포함하여 호환되는 최신 버전을 다운로드합니다.',
'admin.plugins.accessTitle': '접근할 수 있는 항목',
'admin.plugins.connectsTitle': '연결 대상',
'admin.plugins.detailsTitle': '상세 정보',
diff --git a/shared/src/i18n/ko/budget.ts b/shared/src/i18n/ko/budget.ts
index 8a8d9d67d..93e93d00a 100644
--- a/shared/src/i18n/ko/budget.ts
+++ b/shared/src/i18n/ko/budget.ts
@@ -52,6 +52,9 @@ const budget: TranslationStrings = {
'costs.nothingOwed': '받을 돈이 없습니다',
'costs.yourShare': '내 몫',
'costs.youPaid': '내가 지불함',
+ 'costs.outstanding': '미정산 금액',
+ 'costs.outstandingSub': '아직 지불자가 없는 지출',
+ 'costs.outstandingItems': '개 지출에 지불자 필요',
'costs.expenses': '지출',
'costs.entries': '{count}개 항목',
'costs.searchPlaceholder': '지출 검색…',
@@ -116,10 +119,10 @@ const budget: TranslationStrings = {
'costs.unfinishedHint': '합계에만 반영 — 아직 미정산',
'costs.tapToInclude': '탭하여 포함',
'costs.amount': '금액',
- 'costs.split': "Split",
- 'costs.splitEqually': "Equally",
- 'costs.splitCustom': "Custom",
- 'costs.splitTicket': "Ticket",
+ 'costs.split': 'Split',
+ 'costs.splitEqually': 'Equally',
+ 'costs.splitCustom': 'Custom',
+ 'costs.splitTicket': 'Ticket',
'costs.filter.allCategories': '모든 카테고리',
'costs.filter.allDays': '모든 날짜',
'costs.expensesCount': '지출 {count}건',
diff --git a/shared/src/i18n/ko/dashboard.ts b/shared/src/i18n/ko/dashboard.ts
index 86e37225a..793a28435 100644
--- a/shared/src/i18n/ko/dashboard.ts
+++ b/shared/src/i18n/ko/dashboard.ts
@@ -42,7 +42,8 @@ const dashboard: TranslationStrings = {
'dashboard.status.past': '지난 여행',
'dashboard.status.daysLeft': '{count}일 남음',
'dashboard.toast.loadError': '여행 불러오기 실패',
- 'dashboard.loadErrorBanner': '서버에 연결할 수 없습니다. 여행 정보는 안전하게 보관되어 있으니 잠시 후 다시 시도해 주세요.',
+ 'dashboard.loadErrorBanner':
+ '서버에 연결할 수 없습니다. 여행 정보는 안전하게 보관되어 있으니 잠시 후 다시 시도해 주세요.',
'dashboard.retry': '다시 시도',
'dashboard.toast.created': '여행이 생성되었습니다!',
'dashboard.toast.createError': '여행 생성 실패',
diff --git a/shared/src/i18n/ko/help.ts b/shared/src/i18n/ko/help.ts
index 719ee080e..0b5d7bebf 100644
--- a/shared/src/i18n/ko/help.ts
+++ b/shared/src/i18n/ko/help.ts
@@ -2,12 +2,12 @@ import type { TranslationStrings } from '../types';
// English fallback until 'ko' is translated.
const help: TranslationStrings = {
- 'help.title': "Help & Docs",
- 'help.search': "Search docs…",
- 'help.contents': "Contents",
- 'help.noResults': "No matching pages.",
+ 'help.title': 'Help & Docs',
+ 'help.search': 'Search docs…',
+ 'help.contents': 'Contents',
+ 'help.noResults': 'No matching pages.',
'help.errorTitle': "Couldn't load this page",
- 'help.errorBody': "The help content is fetched from the TREK wiki. Check your connection and try again.",
+ 'help.errorBody': 'The help content is fetched from the TREK wiki. Check your connection and try again.',
};
export default help;
diff --git a/shared/src/i18n/ko/index.ts b/shared/src/i18n/ko/index.ts
index b9af5461f..eef4c74aa 100644
--- a/shared/src/i18n/ko/index.ts
+++ b/shared/src/i18n/ko/index.ts
@@ -5,11 +5,13 @@ import backup from './backup';
import budget from './budget';
import categories from './categories';
import collab from './collab';
+import collection from './collection';
import common from './common';
import dashboard from './dashboard';
import day from './day';
import dayplan from './dayplan';
import files from './files';
+import help from './help';
import inspector from './inspector';
import journey from './journey';
import login from './login';
@@ -39,8 +41,6 @@ import trip from './trip';
import trips from './trips';
import undo from './undo';
import vacay from './vacay';
-import collection from './collection';
-import help from './help';
const locale = {
...common,
diff --git a/shared/src/i18n/ko/login.ts b/shared/src/i18n/ko/login.ts
index 705818a87..582d74084 100644
--- a/shared/src/i18n/ko/login.ts
+++ b/shared/src/i18n/ko/login.ts
@@ -84,7 +84,8 @@ const login: TranslationStrings = {
'login.passkey.signIn': '패스키로 로그인',
'login.passkey.failed': '패스키 로그인에 실패했습니다. 다시 시도하세요.',
'login.insecureCookie.title': "Login won't stick over HTTP",
- 'login.insecureCookie.body': "You’re connecting over plain HTTP, so your browser drops TREK’s secure session cookie — the next request fails with \"Access token required\". Fix: use HTTPS, or for a home-lab set COOKIE_SECURE=false.",
- 'login.insecureCookie.link': "Open the Troubleshooting guide",
+ 'login.insecureCookie.body':
+ 'You’re connecting over plain HTTP, so your browser drops TREK’s secure session cookie — the next request fails with "Access token required". Fix: use HTTPS, or for a home-lab set COOKIE_SECURE=false.',
+ 'login.insecureCookie.link': 'Open the Troubleshooting guide',
};
export default login;
diff --git a/shared/src/i18n/ko/places.ts b/shared/src/i18n/ko/places.ts
index 7fd2871ef..6b59a04b3 100644
--- a/shared/src/i18n/ko/places.ts
+++ b/shared/src/i18n/ko/places.ts
@@ -23,8 +23,8 @@ const places: TranslationStrings = {
'places.kmlImportNoneSelected': '가져올 유형을 하나 이상 선택하세요.',
'places.selectionCount': '{count}개 선택됨',
'places.deleteSelected': '선택 항목 삭제',
- 'places.changeCategory': "Change category",
- 'places.categoryChanged': "{count} places updated",
+ 'places.changeCategory': 'Change category',
+ 'places.categoryChanged': '{count} places updated',
'places.kmlKmzImported': 'KMZ/KML에서 {count}개 장소를 가져왔습니다',
'places.urlResolved': 'URL에서 장소를 가져왔습니다',
'places.importList': '목록 가져오기',
diff --git a/shared/src/i18n/ko/settings.ts b/shared/src/i18n/ko/settings.ts
index a783e716e..9d5157c18 100644
--- a/shared/src/i18n/ko/settings.ts
+++ b/shared/src/i18n/ko/settings.ts
@@ -321,7 +321,8 @@ const settings: TranslationStrings = {
'settings.airtrail.test.success': '연결됨 — {count}개 항공편을 찾았습니다',
'settings.airtrail.test.failed': '연결에 실패했습니다',
'settings.aiParsing.title': 'AI 분석',
- 'settings.aiParsing.hint': '업로드한 파일에서 예약 정보를 추출할 때 직접 지정한 AI 모델을 사용하세요. 이 설정은 관리자가 인스턴스 전체에 모델을 설정하지 않은 경우에만 적용됩니다.',
+ 'settings.aiParsing.hint':
+ '업로드한 파일에서 예약 정보를 추출할 때 직접 지정한 AI 모델을 사용하세요. 이 설정은 관리자가 인스턴스 전체에 모델을 설정하지 않은 경우에만 적용됩니다.',
'settings.aiParsing.provider': '제공자',
'settings.aiParsing.providerLocal': '로컬 (Ollama)',
'settings.aiParsing.providerOpenai': 'OpenAI',
@@ -351,7 +352,8 @@ const settings: TranslationStrings = {
'settings.appearance.contrastLow': 'Low contrast',
'settings.appearance.readability': 'Readability',
'settings.appearance.transparency': 'Transparency',
- 'settings.appearance.transparencyHint': 'Glassy translucent surfaces. Turn off for solid, higher-contrast backgrounds.',
+ 'settings.appearance.transparencyHint':
+ 'Glassy translucent surfaces. Turn off for solid, higher-contrast backgrounds.',
'settings.appearance.reduceMotion': 'Reduce motion',
'settings.appearance.reduceMotionHint': 'Minimize animations and transitions.',
'settings.appearance.density': 'Density',
@@ -381,7 +383,8 @@ const settings: TranslationStrings = {
'settings.appearance.group.belowHero': 'Below the hero',
'settings.appearance.group.bottomOfPage': 'Bottom of page',
'settings.appearance.sidebarHint': 'The whole right column. Turn off and the dashboard centers.',
- 'settings.appearance.densityHint': 'Compact tightens spacing and padding for a denser layout that fits more on screen.',
+ 'settings.appearance.densityHint':
+ 'Compact tightens spacing and padding for a denser layout that fits more on screen.',
'settings.appearance.textSizeAll': 'Everything',
'settings.appearance.perSize': 'Adjust each size separately',
'settings.appearance.size.large': 'Large',
@@ -404,10 +407,13 @@ const settings: TranslationStrings = {
'settings.offline.cache.title': '오프라인 캐시',
'settings.offline.mode.title': '오프라인 모드',
'settings.offline.mode.force': '오프라인 모드 강제 사용',
- 'settings.offline.mode.forceHint': '캐시된 데이터만 사용하고 변경 사항을 대기열에 넣습니다. 다시 연결하여 동기화하려면 끄세요.',
- 'settings.offline.mode.active': '오프라인 모드가 켜져 있습니다 — 변경 사항이 대기열에 있으며 모드를 끄면 동기화됩니다.',
+ 'settings.offline.mode.forceHint':
+ '캐시된 데이터만 사용하고 변경 사항을 대기열에 넣습니다. 다시 연결하여 동기화하려면 끄세요.',
+ 'settings.offline.mode.active':
+ '오프라인 모드가 켜져 있습니다 — 변경 사항이 대기열에 있으며 모드를 끄면 동기화됩니다.',
'settings.offline.prepare.title': '오프라인 준비',
- 'settings.offline.prepare.hint': '연결이 끊기기 전에 필요한 모든 것 — 여행 데이터, 문서, 지도 타일 — 을 다운로드하세요.',
+ 'settings.offline.prepare.hint':
+ '연결이 끊기기 전에 필요한 모든 것 — 여행 데이터, 문서, 지도 타일 — 을 다운로드하세요.',
'settings.offline.prepare.button': '오프라인 사용을 위해 다운로드',
'settings.offline.prepare.running': '다운로드 중…',
'settings.offline.prepare.done': '오프라인 사용 준비 완료',
@@ -418,12 +424,14 @@ const settings: TranslationStrings = {
'settings.offline.resyncing': '동기화 중…',
'settings.offline.storage.title': '오프라인에 저장할 항목',
'settings.offline.storage.tiles': '지도 타일을 오프라인에 저장',
- 'settings.offline.storage.tilesHint': '지도 타일은 저장 공간을 가장 많이 사용합니다. 끄면 여행 데이터와 문서만 오프라인에 저장합니다.',
+ 'settings.offline.storage.tilesHint':
+ '지도 타일은 저장 공간을 가장 많이 사용합니다. 끄면 여행 데이터와 문서만 오프라인에 저장합니다.',
'settings.offline.storage.tripsTitle': '여행',
'settings.offline.storage.tripOn': '오프라인에 저장됨',
'settings.offline.storage.tripOff': '저장 안 됨',
'settings.offline.clear': '캐시 지우기',
- 'settings.offline.clearConfirm': '모든 오프라인 여행 데이터를 지울까요? 온라인일 때 언제든지 다시 동기화할 수 있습니다.',
+ 'settings.offline.clearConfirm':
+ '모든 오프라인 여행 데이터를 지울까요? 온라인일 때 언제든지 다시 동기화할 수 있습니다.',
'settings.offline.stats.trips': '캐시된 여행',
'settings.offline.stats.pending': '대기 중인 변경 사항',
'settings.offline.stats.failed': '실패한 변경 사항',
@@ -431,7 +439,8 @@ const settings: TranslationStrings = {
'settings.offline.empty': '아직 캐시된 여행이 없습니다. 인터넷에 연결하여 동기화하세요.',
'settings.offline.loading': '불러오는 중…',
'settings.offline.conflicts.title': '동기화 충돌',
- 'settings.offline.conflicts.hint': '오프라인에서 변경한 내용이 서버의 최신 변경 내용과 충돌합니다. 보관할 버전을 선택하세요.',
+ 'settings.offline.conflicts.hint':
+ '오프라인에서 변경한 내용이 서버의 최신 변경 내용과 충돌합니다. 보관할 버전을 선택하세요.',
'settings.offline.conflicts.keepMine': '내 버전 유지',
'settings.offline.conflicts.keepServer': '상대 버전 유지',
'settings.offline.conflicts.mine': '내 버전',
diff --git a/shared/src/i18n/ko/trip.ts b/shared/src/i18n/ko/trip.ts
index 0899194c8..854d57c0e 100644
--- a/shared/src/i18n/ko/trip.ts
+++ b/shared/src/i18n/ko/trip.ts
@@ -28,7 +28,8 @@ const trip: TranslationStrings = {
'trip.confirm.deletePlaces': '{count}개 장소를 삭제할까요?',
'trip.toast.placesDeleted': '{count}개 장소가 삭제되었습니다',
'trip.invite.linkTitle': '여행 초대 링크',
- 'trip.invite.linkHint': 'TREK 계정이 있는 사람이 이 링크를 열면 여행에 멤버로 참여합니다. 기존 링크를 무효화하려면 다시 생성하세요.',
+ 'trip.invite.linkHint':
+ 'TREK 계정이 있는 사람이 이 링크를 열면 여행에 멤버로 참여합니다. 기존 링크를 무효화하려면 다시 생성하세요.',
'trip.invite.create': '초대 링크 만들기',
'trip.invite.regenerate': '다시 생성',
'trip.invite.disable': '비활성화',
diff --git a/shared/src/i18n/ko/undo.ts b/shared/src/i18n/ko/undo.ts
index d85acfa63..3ac8128bd 100644
--- a/shared/src/i18n/ko/undo.ts
+++ b/shared/src/i18n/ko/undo.ts
@@ -9,7 +9,7 @@ const undo: TranslationStrings = {
'undo.optimize': '경로가 최적화되었습니다',
'undo.deletePlace': '장소가 삭제되었습니다',
'undo.deletePlaces': '장소들이 삭제되었습니다',
- 'undo.changeCategory': "Category changed",
+ 'undo.changeCategory': 'Category changed',
'undo.moveDay': '장소가 다른 날로 이동되었습니다',
'undo.lock': '장소 잠금이 변경되었습니다',
'undo.importGpx': 'GPX 가져오기',
diff --git a/shared/src/i18n/nl/admin.ts b/shared/src/i18n/nl/admin.ts
index 1505284fe..97d326890 100644
--- a/shared/src/i18n/nl/admin.ts
+++ b/shared/src/i18n/nl/admin.ts
@@ -96,6 +96,8 @@ const admin: TranslationStrings = {
'admin.recommended': 'Aanbevolen',
'admin.weatherKey': 'OpenWeatherMap API-sleutel',
'admin.weatherKeyHint': 'Voor weergegevens. Gratis op openweathermap.org',
+ 'admin.unsplashKey': 'Unsplash API-sleutel',
+ 'admin.unsplashKeyHint': 'Voor het zoeken naar afbeeldingen. Gratis op unsplash.com/developers',
'admin.validateKey': 'Testen',
'admin.keyValid': 'Verbonden',
'admin.keyInvalid': 'Ongeldig',
@@ -162,6 +164,11 @@ const admin: TranslationStrings = {
'admin.tabs.plugins': 'Plugins',
'admin.plugins.rescan': 'Opnieuw scannen',
'admin.plugins.rescanned': 'Pluginmap opnieuw gescand',
+ 'admin.plugins.upload': 'Plugin uploaden',
+ 'admin.plugins.dropToUpload': 'Zet een plugin-.zip neer om te installeren',
+ 'admin.plugins.uploaded': 'Plugin “{name}” geüpload — activeer om uit te voeren',
+ 'admin.plugins.sideloaded': 'Handmatig geladen',
+ 'admin.plugins.sideloadedHint': 'Handmatig geüpload — niet uit het register, niet ondertekend en niet gecontroleerd',
'admin.plugins.browse': 'Plugins verkennen',
'admin.plugins.installed': 'Geïnstalleerd',
'admin.plugins.install': 'Installeren',
@@ -176,11 +183,13 @@ const admin: TranslationStrings = {
'admin.plugins.noErrors': 'Geen fouten geregistreerd.',
'admin.plugins.uninstalled': 'Plugin verwijderd',
'admin.plugins.uninstallTitle': 'Plugin verwijderen?',
- 'admin.plugins.uninstallBody': 'Dit stopt de plugin, verwijdert de code en wist alle bijbehorende gegevens. Dit kan niet ongedaan worden gemaakt.',
+ 'admin.plugins.uninstallBody':
+ 'Dit stopt de plugin, verwijdert de code en wist alle bijbehorende gegevens. Dit kan niet ongedaan worden gemaakt.',
'admin.plugins.status.starting': 'Wordt gestart…',
'admin.plugins.type.widget': 'Widget',
'admin.plugins.type.page': 'Pagina',
'admin.plugins.type.integration': 'Integratie',
+ 'admin.plugins.type.trip-page': 'Reispagina',
'admin.plugins.reviewed': 'Beoordeeld',
'admin.plugins.unreviewed': 'Niet beoordeeld',
'admin.plugins.updated': 'Plugin bijgewerkt',
@@ -190,10 +199,12 @@ const admin: TranslationStrings = {
'admin.plugins.title': 'Plugins',
'admin.plugins.subtitle': 'Installeer en beheer plugins van derden op je instantie.',
'admin.plugins.disabledTitle': 'Plugins zijn uitgeschakeld',
- 'admin.plugins.disabledBody': 'De plugin-runtime staat uit (TREK_PLUGINS_ENABLED). Er kan geen plugin draaien totdat een beheerder dit inschakelt in de serverconfiguratie.',
+ 'admin.plugins.disabledBody':
+ 'De plugin-runtime staat uit (TREK_PLUGINS_ENABLED). Er kan geen plugin draaien totdat een beheerder dit inschakelt in de serverconfiguratie.',
'admin.plugins.empty': 'Nog geen plugins geïnstalleerd.',
'admin.plugins.loadError': 'Plugins konden niet worden geladen.',
- 'admin.plugins.scaffoldNote': 'Plugininstallatie en -activatie volgen in een latere update. Dit paneel toont momenteel alleen geïnstalleerde plugins.',
+ 'admin.plugins.scaffoldNote':
+ 'Plugininstallatie en -activatie volgen in een latere update. Dit paneel toont momenteel alleen geïnstalleerde plugins.',
'admin.plugins.status.active': 'Actief',
'admin.plugins.status.inactive': 'Inactief',
'admin.plugins.status.disabled': 'Uitgeschakeld',
@@ -216,10 +227,31 @@ const admin: TranslationStrings = {
'admin.plugins.perm.db:own': 'Eigen gegevens opslaan in een geïsoleerde database',
'admin.plugins.perm.db:read:trips': 'Reizen lezen waartoe de actieve gebruiker toegang heeft',
'admin.plugins.perm.db:read:users': 'Basisprofielgegevens lezen (naam, avatar — nooit inloggegevens)',
+ 'admin.plugins.perm.db:read:costs': 'Uitgaven (budgetposten) lezen waartoe de actieve gebruiker toegang heeft',
+ 'admin.plugins.perm.db:read:packing': 'Paklijsten lezen van reizen waartoe de actieve gebruiker toegang heeft',
+ 'admin.plugins.perm.db:read:files': 'Bestanden lezen van reizen waartoe de actieve gebruiker toegang heeft',
+ 'admin.plugins.perm.db:write:costs':
+ 'Uitgaven (budgetposten) aanmaken op reizen die de actieve gebruiker mag bewerken',
+ 'admin.plugins.perm.db:write:places':
+ 'Plaatsen toevoegen, bewerken en verwijderen op reizen die de actieve gebruiker mag bewerken',
+ 'admin.plugins.perm.db:write:days':
+ 'Dagen toevoegen, bewerken en verwijderen op reizen die de actieve gebruiker mag bewerken',
+ 'admin.plugins.perm.db:write:itinerary':
+ 'Plaatsen toewijzen aan en verwijderen uit dagen van reizen die de actieve gebruiker mag bewerken',
+ 'admin.plugins.perm.db:write:trips':
+ 'Reisgegevens bewerken (titel, datums, valuta…) op reizen die de actieve gebruiker mag bewerken',
+ 'admin.plugins.perm.db:meta':
+ 'Eigen privégegevens koppelen aan reizen, plaatsen en dagen waartoe de actieve gebruiker toegang heeft',
'admin.plugins.perm.ws:broadcast:trip': 'Realtime updates sturen naar reisleden',
'admin.plugins.perm.ws:broadcast:user': 'Realtime updates sturen naar individuele gebruikers',
'admin.plugins.perm.hook:photo-provider': "Foto's aanleveren voor de Foto's-sectie",
'admin.plugins.perm.hook:calendar-source': 'Evenementen aanleveren voor de kalender',
+ 'admin.plugins.perm.hook:place-detail-provider':
+ 'Extra details (reviews, beoordelingen, links) aan een plek toevoegen',
+ 'admin.plugins.perm.hook:trip-warning-provider':
+ 'Validatiewaarschuwingen tonen bij een reis (zichtbaar in de planner)',
+ 'admin.plugins.perm.events:subscribe':
+ 'Reageert op kernactiviteitsgebeurtenissen (alleen gebeurtenisnaam + reis, nooit de inhoud)',
'admin.plugins.perm.http:outbound': 'Uitgaande verzoeken doen naar de opgegeven hosts',
'admin.plugins.updateConsentTitle': 'Deze update vereist nieuwe machtigingen',
'admin.plugins.updateConsentBody':
@@ -271,11 +303,36 @@ const admin: TranslationStrings = {
'admin.plugins.restarted': 'Plugin opnieuw gestart',
'admin.plugins.cap.readsTrips': 'Leest je reizen',
'admin.plugins.cap.readsUsers': 'Leest basisprofielen',
+ 'admin.plugins.cap.readsCosts': 'Leest je uitgaven',
+ 'admin.plugins.cap.readsPacking': 'Leest paklijsten',
+ 'admin.plugins.cap.readsFiles': 'Leest reisbestanden',
+ 'admin.plugins.cap.writesCosts': 'Voegt uitgaven toe',
+ 'admin.plugins.cap.writesPlaces': 'Bewerkt plaatsen',
+ 'admin.plugins.cap.writesDays': 'Bewerkt dagen',
+ 'admin.plugins.cap.writesItinerary': 'Bewerkt reisschema',
+ 'admin.plugins.cap.writesTrips': 'Bewerkt reizen',
+ 'admin.plugins.cap.metadata': 'Voegt metadata toe',
'admin.plugins.cap.widget': 'Dashboardwidget',
'admin.plugins.cap.heroWidget': 'Instapkaartwidget',
+ 'admin.plugins.cap.placeSlot': 'Plaatsdetail',
'admin.plugins.cap.realtime': 'Realtime updates',
'admin.plugins.cap.photos': "Levert foto's",
'admin.plugins.cap.calendar': 'Levert kalenderevenementen',
+ 'admin.plugins.cap.placeDetails': 'Verrijkt plekken',
+ 'admin.plugins.cap.warnings': 'Signaleert problemen',
+ 'admin.plugins.cap.events': 'Reageert op activiteit',
+ 'admin.plugins.cap.requiresAddon': 'Vereist {addon}',
+ 'admin.plugins.cap.dependsOn': 'Vereist {id} {version}',
+ 'admin.plugins.dep.addonDisabledToast': 'Schakel eerst de vereiste add-on(s) in: {addons}',
+ 'admin.plugins.dep.autoEnabled': 'Eerst vereiste plug-in(s) ingeschakeld: {plugins}',
+ 'admin.plugins.dep.downloaded': '{id} gedownload',
+ 'admin.plugins.dep.resolveTitle': 'Ontbrekende afhankelijkheden',
+ 'admin.plugins.dep.resolveBody': '“{name}” heeft deze plug-ins nodig voordat het kan worden ingeschakeld.',
+ 'admin.plugins.dep.requires': 'Vereist {version}',
+ 'admin.plugins.dep.mismatch': 'Vereist {wanted} — {installed} is geïnstalleerd',
+ 'admin.plugins.dep.download': 'Downloaden',
+ 'admin.plugins.dep.update': 'Bijwerken',
+ 'admin.plugins.dep.resolveHint': 'Downloadt de nieuwste compatibele versie, inclusief de eigen afhankelijkheden.',
'admin.plugins.accessTitle': 'Waartoe hij toegang heeft',
'admin.plugins.connectsTitle': 'Maakt verbinding met',
'admin.plugins.detailsTitle': 'Details',
@@ -488,7 +545,8 @@ const admin: TranslationStrings = {
'admin.group.maintenance': 'Maintenance',
'admin.invite.tripLabel': 'Toevoegen aan reis (optioneel)',
'admin.invite.tripNone': 'Geen reis',
- 'admin.invite.tripHint': 'De nieuwe gebruiker wordt automatisch aan deze reis toegevoegd wanneer hij zich via de link registreert.',
+ 'admin.invite.tripHint':
+ 'De nieuwe gebruiker wordt automatisch aan deze reis toegevoegd wanneer hij zich via de link registreert.',
'admin.invite.boundTo': 'voegt toe aan {trip}',
};
export default admin;
diff --git a/shared/src/i18n/nl/budget.ts b/shared/src/i18n/nl/budget.ts
index e1cd11b81..811c84199 100644
--- a/shared/src/i18n/nl/budget.ts
+++ b/shared/src/i18n/nl/budget.ts
@@ -52,6 +52,9 @@ const budget: TranslationStrings = {
'costs.nothingOwed': 'Niemand is jou iets verschuldigd',
'costs.yourShare': 'Jouw aandeel',
'costs.youPaid': 'Jij hebt betaald',
+ 'costs.outstanding': 'Openstaand bedrag',
+ 'costs.outstandingSub': 'Uitgaven zonder betaler',
+ 'costs.outstandingItems': 'uitgaven zonder betaler',
'costs.expenses': 'Uitgaven',
'costs.entries': '{count} invoeren',
'costs.searchPlaceholder': 'Uitgaven zoeken…',
@@ -116,10 +119,10 @@ const budget: TranslationStrings = {
'costs.unfinishedHint': 'Alleen in totaal — nog niet verrekend',
'costs.tapToInclude': 'Tik om toe te voegen',
'costs.amount': 'Bedrag',
- 'costs.split': "Split",
- 'costs.splitEqually': "Equally",
- 'costs.splitCustom': "Custom",
- 'costs.splitTicket': "Ticket",
+ 'costs.split': 'Split',
+ 'costs.splitEqually': 'Equally',
+ 'costs.splitCustom': 'Custom',
+ 'costs.splitTicket': 'Ticket',
'costs.filter.allCategories': 'Alle categorieën',
'costs.filter.allDays': 'Alle dagen',
'costs.expensesCount': '{count} uitgaven',
diff --git a/shared/src/i18n/nl/collection.ts b/shared/src/i18n/nl/collection.ts
index 2fcc14d94..80840b5e8 100644
--- a/shared/src/i18n/nl/collection.ts
+++ b/shared/src/i18n/nl/collection.ts
@@ -49,7 +49,8 @@ const collection: TranslationStrings = {
'collections.editList': 'Hernoemen',
'collections.listMenu': 'Lijstopties',
'collections.deleteList': 'Lijst verwijderen',
- 'collections.deleteListConfirm': 'Hiermee worden de lijst en alle opgeslagen plekken definitief verwijderd. Dit kan niet ongedaan worden gemaakt.',
+ 'collections.deleteListConfirm':
+ 'Hiermee worden de lijst en alle opgeslagen plekken definitief verwijderd. Dit kan niet ongedaan worden gemaakt.',
'collections.listName': 'Lijstnaam',
'collections.listNamePlaceholder': 'bijv. Tokio 2025',
'collections.listColor': 'Kleur',
@@ -127,7 +128,8 @@ const collection: TranslationStrings = {
'collections.share.memberHint': 'Alleen de eigenaar van de lijst kan personen uitnodigen of verwijderen.',
'collections.share.cancel': 'Annuleren',
'collections.share.leave': 'Lijst verlaten',
- 'collections.share.leaveConfirm': 'Deze gedeelde lijst verlaten? Je verliest de toegang totdat je opnieuw wordt uitgenodigd.',
+ 'collections.share.leaveConfirm':
+ 'Deze gedeelde lijst verlaten? Je verliest de toegang totdat je opnieuw wordt uitgenodigd.',
'collections.share.left': 'Je hebt de lijst verlaten',
'collections.share.remove': 'Verwijderen',
diff --git a/shared/src/i18n/nl/help.ts b/shared/src/i18n/nl/help.ts
index 6530c20e9..3ae06c12a 100644
--- a/shared/src/i18n/nl/help.ts
+++ b/shared/src/i18n/nl/help.ts
@@ -2,12 +2,12 @@ import type { TranslationStrings } from '../types';
// English fallback until 'nl' is translated.
const help: TranslationStrings = {
- 'help.title': "Help & Docs",
- 'help.search': "Search docs…",
- 'help.contents': "Contents",
- 'help.noResults': "No matching pages.",
+ 'help.title': 'Help & Docs',
+ 'help.search': 'Search docs…',
+ 'help.contents': 'Contents',
+ 'help.noResults': 'No matching pages.',
'help.errorTitle': "Couldn't load this page",
- 'help.errorBody': "The help content is fetched from the TREK wiki. Check your connection and try again.",
+ 'help.errorBody': 'The help content is fetched from the TREK wiki. Check your connection and try again.',
};
export default help;
diff --git a/shared/src/i18n/nl/index.ts b/shared/src/i18n/nl/index.ts
index b9af5461f..eef4c74aa 100644
--- a/shared/src/i18n/nl/index.ts
+++ b/shared/src/i18n/nl/index.ts
@@ -5,11 +5,13 @@ import backup from './backup';
import budget from './budget';
import categories from './categories';
import collab from './collab';
+import collection from './collection';
import common from './common';
import dashboard from './dashboard';
import day from './day';
import dayplan from './dayplan';
import files from './files';
+import help from './help';
import inspector from './inspector';
import journey from './journey';
import login from './login';
@@ -39,8 +41,6 @@ import trip from './trip';
import trips from './trips';
import undo from './undo';
import vacay from './vacay';
-import collection from './collection';
-import help from './help';
const locale = {
...common,
diff --git a/shared/src/i18n/nl/login.ts b/shared/src/i18n/nl/login.ts
index 1636d7acc..396c82eb9 100644
--- a/shared/src/i18n/nl/login.ts
+++ b/shared/src/i18n/nl/login.ts
@@ -86,7 +86,8 @@ const login: TranslationStrings = {
'login.passkey.signIn': 'Inloggen met een passkey',
'login.passkey.failed': 'Inloggen met passkey mislukt. Probeer het opnieuw.',
'login.insecureCookie.title': "Login won't stick over HTTP",
- 'login.insecureCookie.body': "You’re connecting over plain HTTP, so your browser drops TREK’s secure session cookie — the next request fails with \"Access token required\". Fix: use HTTPS, or for a home-lab set COOKIE_SECURE=false.",
- 'login.insecureCookie.link': "Open the Troubleshooting guide",
+ 'login.insecureCookie.body':
+ 'You’re connecting over plain HTTP, so your browser drops TREK’s secure session cookie — the next request fails with "Access token required". Fix: use HTTPS, or for a home-lab set COOKIE_SECURE=false.',
+ 'login.insecureCookie.link': 'Open the Troubleshooting guide',
};
export default login;
diff --git a/shared/src/i18n/nl/members.ts b/shared/src/i18n/nl/members.ts
index eff7301e6..06c867064 100644
--- a/shared/src/i18n/nl/members.ts
+++ b/shared/src/i18n/nl/members.ts
@@ -25,7 +25,8 @@ const members: TranslationStrings = {
'members.transferError': 'Overdracht van eigenaarschap mislukt',
'members.guests': 'Gasten',
'members.guest': 'Gast',
- 'members.guestsHint': 'Mensen zonder account. Ze kunnen worden toegewezen aan kosten, bagage en taken, maar kunnen niet inloggen.',
+ 'members.guestsHint':
+ 'Mensen zonder account. Ze kunnen worden toegewezen aan kosten, bagage en taken, maar kunnen niet inloggen.',
'members.addGuest': 'Gast toevoegen',
'members.guestNamePlaceholder': 'Naam van gast',
'members.guestAdded': 'Gast toegevoegd',
diff --git a/shared/src/i18n/nl/places.ts b/shared/src/i18n/nl/places.ts
index ab17c43c3..1609175fe 100644
--- a/shared/src/i18n/nl/places.ts
+++ b/shared/src/i18n/nl/places.ts
@@ -24,8 +24,8 @@ const places: TranslationStrings = {
'places.kmlImportNoneSelected': 'Selecteer minstens één type.',
'places.selectionCount': '{count} geselecteerd',
'places.deleteSelected': 'Selectie verwijderen',
- 'places.changeCategory': "Change category",
- 'places.categoryChanged': "{count} places updated",
+ 'places.changeCategory': 'Change category',
+ 'places.categoryChanged': '{count} places updated',
'places.kmlKmzImported': '{count} plaatsen geïmporteerd uit KMZ/KML',
'places.urlResolved': 'Plaats geïmporteerd van URL',
'places.importList': 'Lijst importeren',
diff --git a/shared/src/i18n/nl/settings.ts b/shared/src/i18n/nl/settings.ts
index a82010296..211cb94c9 100644
--- a/shared/src/i18n/nl/settings.ts
+++ b/shared/src/i18n/nl/settings.ts
@@ -329,18 +329,21 @@ const settings: TranslationStrings = {
'settings.airtrail.test.success': 'Verbonden — {count} vlucht(en) gevonden',
'settings.airtrail.test.failed': 'Verbinding mislukt',
'settings.aiParsing.title': 'AI-verwerking',
- 'settings.aiParsing.hint': 'Gebruik je eigen AI-model om boekingen uit geüploade bestanden te halen. Dit geldt alleen als je beheerder geen model voor de hele instantie heeft ingesteld.',
+ 'settings.aiParsing.hint':
+ 'Gebruik je eigen AI-model om boekingen uit geüploade bestanden te halen. Dit geldt alleen als je beheerder geen model voor de hele instantie heeft ingesteld.',
'settings.aiParsing.provider': 'Provider',
'settings.aiParsing.providerLocal': 'Lokaal (Ollama)',
'settings.aiParsing.providerOpenai': 'OpenAI',
'settings.aiParsing.providerAnthropic': 'Anthropic',
'settings.aiParsing.model': 'Model',
'settings.aiParsing.baseUrl': 'Basis-URL',
- 'settings.aiParsing.baseUrlHint': 'Waar het model draait — een lokale Ollama-server of een OpenAI-compatibel endpoint.',
+ 'settings.aiParsing.baseUrlHint':
+ 'Waar het model draait — een lokale Ollama-server of een OpenAI-compatibel endpoint.',
'settings.aiParsing.apiKey': 'API-sleutel',
'settings.aiParsing.apiKeyHint': 'Versleuteld opgeslagen. Laat leeg om de huidige sleutel te behouden.',
'settings.aiParsing.multimodal': 'Documenten als afbeeldingen versturen',
- 'settings.aiParsing.multimodalHint': 'Voor modellen met beeldherkenning — verstuurt de originele PDF in plaats van geëxtraheerde tekst.',
+ 'settings.aiParsing.multimodalHint':
+ 'Voor modellen met beeldherkenning — verstuurt de originele PDF in plaats van geëxtraheerde tekst.',
'settings.aiParsing.toast.saved': 'AI-instellingen opgeslagen',
'settings.aiParsing.toast.saveError': 'AI-instellingen konden niet worden opgeslagen',
'settings.tabs.appearance': 'Appearance',
@@ -359,7 +362,8 @@ const settings: TranslationStrings = {
'settings.appearance.contrastLow': 'Low contrast',
'settings.appearance.readability': 'Readability',
'settings.appearance.transparency': 'Transparency',
- 'settings.appearance.transparencyHint': 'Glassy translucent surfaces. Turn off for solid, higher-contrast backgrounds.',
+ 'settings.appearance.transparencyHint':
+ 'Glassy translucent surfaces. Turn off for solid, higher-contrast backgrounds.',
'settings.appearance.reduceMotion': 'Reduce motion',
'settings.appearance.reduceMotionHint': 'Minimize animations and transitions.',
'settings.appearance.density': 'Density',
@@ -389,7 +393,8 @@ const settings: TranslationStrings = {
'settings.appearance.group.belowHero': 'Below the hero',
'settings.appearance.group.bottomOfPage': 'Bottom of page',
'settings.appearance.sidebarHint': 'The whole right column. Turn off and the dashboard centers.',
- 'settings.appearance.densityHint': 'Compact tightens spacing and padding for a denser layout that fits more on screen.',
+ 'settings.appearance.densityHint':
+ 'Compact tightens spacing and padding for a denser layout that fits more on screen.',
'settings.appearance.textSizeAll': 'Everything',
'settings.appearance.perSize': 'Adjust each size separately',
'settings.appearance.size.large': 'Large',
@@ -412,10 +417,13 @@ const settings: TranslationStrings = {
'settings.offline.cache.title': 'Offline cache',
'settings.offline.mode.title': 'Offlinemodus',
'settings.offline.mode.force': 'Offlinemodus forceren',
- 'settings.offline.mode.forceHint': 'Werk alleen met gecachte gegevens en zet je wijzigingen in de wachtrij. Schakel uit om opnieuw te verbinden en te synchroniseren.',
- 'settings.offline.mode.active': 'Offlinemodus staat aan — je wijzigingen staan in de wachtrij en worden gesynchroniseerd zodra je hem uitschakelt.',
+ 'settings.offline.mode.forceHint':
+ 'Werk alleen met gecachte gegevens en zet je wijzigingen in de wachtrij. Schakel uit om opnieuw te verbinden en te synchroniseren.',
+ 'settings.offline.mode.active':
+ 'Offlinemodus staat aan — je wijzigingen staan in de wachtrij en worden gesynchroniseerd zodra je hem uitschakelt.',
'settings.offline.prepare.title': 'Voorbereiden op offline',
- 'settings.offline.prepare.hint': 'Download alles wat je nodig hebt — reisgegevens, documenten en kaarttegels — voordat je je verbinding verliest.',
+ 'settings.offline.prepare.hint':
+ 'Download alles wat je nodig hebt — reisgegevens, documenten en kaarttegels — voordat je je verbinding verliest.',
'settings.offline.prepare.button': 'Downloaden voor offline gebruik',
'settings.offline.prepare.running': 'Downloaden…',
'settings.offline.prepare.done': 'Klaar voor offline gebruik',
@@ -426,12 +434,14 @@ const settings: TranslationStrings = {
'settings.offline.resyncing': 'Synchroniseren…',
'settings.offline.storage.title': 'Wat offline opslaan',
'settings.offline.storage.tiles': 'Kaarttegels offline opslaan',
- 'settings.offline.storage.tilesHint': 'Kaarttegels gebruiken de meeste opslag. Schakel dit uit om alleen reisgegevens en documenten offline te bewaren.',
+ 'settings.offline.storage.tilesHint':
+ 'Kaarttegels gebruiken de meeste opslag. Schakel dit uit om alleen reisgegevens en documenten offline te bewaren.',
'settings.offline.storage.tripsTitle': 'Reizen',
'settings.offline.storage.tripOn': 'Offline opgeslagen',
'settings.offline.storage.tripOff': 'Niet opgeslagen',
'settings.offline.clear': 'Cache wissen',
- 'settings.offline.clearConfirm': 'Alle offline reisgegevens wissen? Je kunt altijd opnieuw synchroniseren wanneer je online bent.',
+ 'settings.offline.clearConfirm':
+ 'Alle offline reisgegevens wissen? Je kunt altijd opnieuw synchroniseren wanneer je online bent.',
'settings.offline.stats.trips': 'Gecachte reizen',
'settings.offline.stats.pending': 'Wijzigingen in afwachting',
'settings.offline.stats.failed': 'Mislukte wijzigingen',
@@ -439,7 +449,8 @@ const settings: TranslationStrings = {
'settings.offline.empty': 'Nog geen reizen gecacht. Maak verbinding met internet om te synchroniseren.',
'settings.offline.loading': 'Laden…',
'settings.offline.conflicts.title': 'Synchronisatieconflicten',
- 'settings.offline.conflicts.hint': 'Wijzigingen die je offline hebt gemaakt botsen met nieuwere wijzigingen op de server. Kies welke versie je wilt behouden.',
+ 'settings.offline.conflicts.hint':
+ 'Wijzigingen die je offline hebt gemaakt botsen met nieuwere wijzigingen op de server. Kies welke versie je wilt behouden.',
'settings.offline.conflicts.keepMine': 'Die van mij behouden',
'settings.offline.conflicts.keepServer': 'Die van de server behouden',
'settings.offline.conflicts.mine': 'Jouw versie',
diff --git a/shared/src/i18n/nl/system_notice.ts b/shared/src/i18n/nl/system_notice.ts
index 9ca85d09c..f05417df2 100644
--- a/shared/src/i18n/nl/system_notice.ts
+++ b/shared/src/i18n/nl/system_notice.ts
@@ -13,7 +13,7 @@ const system_notice: TranslationStrings = {
'system_notice.dev_test_modal.body': 'This is a dev-only test notice.',
'system_notice.thank_you_support.title': 'Bedankt voor het gebruik van TREK',
'system_notice.thank_you_support.body':
- "Even een kort bedankje dat je TREK hebt geïnstalleerd — het betekent echt veel voor me.\n\nIk ben een solo-ontwikkelaar en bouw TREK in mijn vrije tijd. Het begon als een klein hulpmiddel voor mijn eigen reizen, en ik ben oprecht overweldigd door de steun en de interesse vanuit de community sindsdien. TREK is met heel veel hart gemaakt aan mijn kant — maar ook dankzij de vele geweldige externe bijdragers die hebben geholpen het vorm te geven.\n\n**TREK is open source en volledig gratis — en dat zal het voor altijd blijven. Geen betaalde versies, geen abonnementen, geen addertjes onder het gras. Dat beloof ik.**\n\nAls TREK nuttig voor je is en je de ontwikkeling ervan wilt steunen, helpt een klein kopje koffie me oprecht om te blijven bouwen — absoluut geen druk, maar elk kopje houdt de late avonden gaande.\n\nBedankt dat je er bent.\n\n— Maurice",
+ 'Even een kort bedankje dat je TREK hebt geïnstalleerd — het betekent echt veel voor me.\n\nIk ben een solo-ontwikkelaar en bouw TREK in mijn vrije tijd. Het begon als een klein hulpmiddel voor mijn eigen reizen, en ik ben oprecht overweldigd door de steun en de interesse vanuit de community sindsdien. TREK is met heel veel hart gemaakt aan mijn kant — maar ook dankzij de vele geweldige externe bijdragers die hebben geholpen het vorm te geven.\n\n**TREK is open source en volledig gratis — en dat zal het voor altijd blijven. Geen betaalde versies, geen abonnementen, geen addertjes onder het gras. Dat beloof ik.**\n\nAls TREK nuttig voor je is en je de ontwikkeling ervan wilt steunen, helpt een klein kopje koffie me oprecht om te blijven bouwen — absoluut geen druk, maar elk kopje houdt de late avonden gaande.\n\nBedankt dat je er bent.\n\n— Maurice',
'system_notice.thank_you_support.highlight_opensource': '100% open source op GitHub',
'system_notice.thank_you_support.highlight_free': 'Voor altijd gratis — nooit betaalde versies',
'system_notice.thank_you_support.highlight_community': 'Samen met de community gebouwd',
diff --git a/shared/src/i18n/nl/trip.ts b/shared/src/i18n/nl/trip.ts
index 80281da92..6aab78b2e 100644
--- a/shared/src/i18n/nl/trip.ts
+++ b/shared/src/i18n/nl/trip.ts
@@ -28,7 +28,8 @@ const trip: TranslationStrings = {
'trip.confirm.deletePlaces': '{count} plaatsen verwijderen?',
'trip.toast.placesDeleted': '{count} plaatsen verwijderd',
'trip.invite.linkTitle': 'Uitnodigingslink voor reis',
- 'trip.invite.linkHint': 'Iedereen met een TREK-account die deze link opent, neemt als lid deel aan de reis. Genereer opnieuw om de oude link ongeldig te maken.',
+ 'trip.invite.linkHint':
+ 'Iedereen met een TREK-account die deze link opent, neemt als lid deel aan de reis. Genereer opnieuw om de oude link ongeldig te maken.',
'trip.invite.create': 'Uitnodigingslink maken',
'trip.invite.regenerate': 'Opnieuw genereren',
'trip.invite.disable': 'Uitschakelen',
diff --git a/shared/src/i18n/nl/undo.ts b/shared/src/i18n/nl/undo.ts
index a9da2bc09..13eb49cf1 100644
--- a/shared/src/i18n/nl/undo.ts
+++ b/shared/src/i18n/nl/undo.ts
@@ -9,7 +9,7 @@ const undo: TranslationStrings = {
'undo.optimize': 'Route geoptimaliseerd',
'undo.deletePlace': 'Locatie verwijderd',
'undo.deletePlaces': 'Plaatsen verwijderd',
- 'undo.changeCategory': "Category changed",
+ 'undo.changeCategory': 'Category changed',
'undo.moveDay': 'Locatie naar andere dag verplaatst',
'undo.lock': 'Vergrendeling locatie gewijzigd',
'undo.importGpx': 'GPX-import',
diff --git a/shared/src/i18n/pl/admin.ts b/shared/src/i18n/pl/admin.ts
index 9912016c2..b20e456a6 100644
--- a/shared/src/i18n/pl/admin.ts
+++ b/shared/src/i18n/pl/admin.ts
@@ -87,6 +87,8 @@ const admin: TranslationStrings = {
'admin.recommended': 'Polecane',
'admin.weatherKey': 'Klucz OpenWeatherMap API',
'admin.weatherKeyHint': 'Do danych pogodowych. Uzyskaj go bezpłatnie na openweathermap.org',
+ 'admin.unsplashKey': 'Klucz API Unsplash',
+ 'admin.unsplashKeyHint': 'Do wyszukiwania obrazów. Bezpłatnie na unsplash.com/developers',
'admin.validateKey': 'Testuj',
'admin.keyValid': 'Połączono',
'admin.keyInvalid': 'Niepoprawny',
@@ -155,6 +157,11 @@ const admin: TranslationStrings = {
'admin.tabs.plugins': 'Wtyczki',
'admin.plugins.rescan': 'Skanuj ponownie',
'admin.plugins.rescanned': 'Folder wtyczek został ponownie przeskanowany',
+ 'admin.plugins.upload': 'Prześlij wtyczkę',
+ 'admin.plugins.dropToUpload': 'Upuść plik .zip wtyczki, aby zainstalować',
+ 'admin.plugins.uploaded': 'Wtyczka “{name}” przesłana — aktywuj ją, aby uruchomić',
+ 'admin.plugins.sideloaded': 'Załadowano ręcznie',
+ 'admin.plugins.sideloadedHint': 'Przesłano ręcznie — nie z rejestru, niepodpisane i niesprawdzone',
'admin.plugins.browse': 'Przeglądaj wtyczki',
'admin.plugins.installed': 'Zainstalowane',
'admin.plugins.install': 'Zainstaluj',
@@ -169,11 +176,13 @@ const admin: TranslationStrings = {
'admin.plugins.noErrors': 'Brak zarejestrowanych błędów.',
'admin.plugins.uninstalled': 'Wtyczka została odinstalowana',
'admin.plugins.uninstallTitle': 'Odinstalować wtyczkę?',
- 'admin.plugins.uninstallBody': 'Spowoduje to zatrzymanie wtyczki, usunięcie jej kodu i wszystkich jej danych. Tej operacji nie można cofnąć.',
+ 'admin.plugins.uninstallBody':
+ 'Spowoduje to zatrzymanie wtyczki, usunięcie jej kodu i wszystkich jej danych. Tej operacji nie można cofnąć.',
'admin.plugins.status.starting': 'Uruchamianie…',
'admin.plugins.type.widget': 'Widget',
'admin.plugins.type.page': 'Strona',
'admin.plugins.type.integration': 'Integracja',
+ 'admin.plugins.type.trip-page': 'Strona podróży',
'admin.plugins.reviewed': 'Zweryfikowana',
'admin.plugins.unreviewed': 'Niezweryfikowana',
'admin.plugins.updated': 'Wtyczka została zaktualizowana',
@@ -183,10 +192,12 @@ const admin: TranslationStrings = {
'admin.plugins.title': 'Wtyczki',
'admin.plugins.subtitle': 'Instaluj wtyczki innych autorów i zarządzaj nimi na swojej instancji.',
'admin.plugins.disabledTitle': 'Wtyczki są wyłączone',
- 'admin.plugins.disabledBody': 'Środowisko uruchomieniowe wtyczek jest wyłączone (TREK_PLUGINS_ENABLED). Żadna wtyczka nie może działać, dopóki administrator nie włączy tej opcji w konfiguracji serwera.',
+ 'admin.plugins.disabledBody':
+ 'Środowisko uruchomieniowe wtyczek jest wyłączone (TREK_PLUGINS_ENABLED). Żadna wtyczka nie może działać, dopóki administrator nie włączy tej opcji w konfiguracji serwera.',
'admin.plugins.empty': 'Nie zainstalowano jeszcze żadnych wtyczek.',
'admin.plugins.loadError': 'Nie udało się załadować wtyczek.',
- 'admin.plugins.scaffoldNote': 'Instalacja i aktywacja wtyczek pojawią się w późniejszej aktualizacji. Ten panel obecnie jedynie wyświetla zainstalowane wtyczki.',
+ 'admin.plugins.scaffoldNote':
+ 'Instalacja i aktywacja wtyczek pojawią się w późniejszej aktualizacji. Ten panel obecnie jedynie wyświetla zainstalowane wtyczki.',
'admin.plugins.status.active': 'Aktywna',
'admin.plugins.status.inactive': 'Nieaktywna',
'admin.plugins.status.disabled': 'Wyłączona',
@@ -208,11 +219,34 @@ const admin: TranslationStrings = {
'admin.plugins.reviewedOn': 'Zweryfikowano {date}',
'admin.plugins.perm.db:own': 'Przechowywanie własnych danych w izolowanej bazie danych',
'admin.plugins.perm.db:read:trips': 'Odczyt podróży, do których działający użytkownik ma dostęp',
- 'admin.plugins.perm.db:read:users': 'Odczyt podstawowych informacji profilowych (nazwa, awatar — nigdy dane logowania)',
+ 'admin.plugins.perm.db:read:users':
+ 'Odczyt podstawowych informacji profilowych (nazwa, awatar — nigdy dane logowania)',
+ 'admin.plugins.perm.db:read:costs': 'Odczyt wydatków (pozycji budżetu), do których działający użytkownik ma dostęp',
+ 'admin.plugins.perm.db:read:packing':
+ 'Odczyt list rzeczy do spakowania w podróżach, do których działający użytkownik ma dostęp',
+ 'admin.plugins.perm.db:read:files': 'Odczyt plików w podróżach, do których działający użytkownik ma dostęp',
+ 'admin.plugins.perm.db:write:costs':
+ 'Tworzenie wydatków (pozycji budżetu) w podróżach, które działający użytkownik może edytować',
+ 'admin.plugins.perm.db:write:places':
+ 'Dodawanie, edycja i usuwanie miejsc w podróżach, które działający użytkownik może edytować',
+ 'admin.plugins.perm.db:write:days':
+ 'Dodawanie, edycja i usuwanie dni w podróżach, które działający użytkownik może edytować',
+ 'admin.plugins.perm.db:write:itinerary':
+ 'Przypisywanie i usuwanie miejsc do dni w podróżach, które działający użytkownik może edytować',
+ 'admin.plugins.perm.db:write:trips':
+ 'Edycja szczegółów podróży (tytuł, daty, waluta…) w podróżach, które działający użytkownik może edytować',
+ 'admin.plugins.perm.db:meta':
+ 'Dołączanie własnych prywatnych danych do podróży, miejsc i dni, do których działający użytkownik ma dostęp',
'admin.plugins.perm.ws:broadcast:trip': 'Wysyłanie aktualizacji w czasie rzeczywistym do członków podróży',
'admin.plugins.perm.ws:broadcast:user': 'Wysyłanie aktualizacji w czasie rzeczywistym do poszczególnych użytkowników',
'admin.plugins.perm.hook:photo-provider': 'Dostarczanie zdjęć do sekcji Zdjęcia',
'admin.plugins.perm.hook:calendar-source': 'Dostarczanie wydarzeń do kalendarza',
+ 'admin.plugins.perm.hook:place-detail-provider':
+ 'Dodawanie dodatkowych szczegółów (recenzji, ocen, linków) do miejsca',
+ 'admin.plugins.perm.hook:trip-warning-provider':
+ 'Zgłaszanie ostrzeżeń walidacyjnych dla podróży (widocznych w planerze)',
+ 'admin.plugins.perm.events:subscribe':
+ 'Reagowanie na podstawowe zdarzenia aktywności (tylko nazwa zdarzenia i podróż, nigdy treść)',
'admin.plugins.perm.http:outbound': 'Wykonywanie wychodzących zapytań do zadeklarowanych hostów',
'admin.plugins.updateConsentTitle': 'Ta aktualizacja wymaga nowych uprawnień',
'admin.plugins.updateConsentBody':
@@ -221,7 +255,8 @@ const admin: TranslationStrings = {
'admin.plugins.updateNewEgress': 'Nowe połączenia wychodzące',
'admin.plugins.updateApprove': 'Zatwierdź i włącz',
'admin.plugins.updateLater': 'Na razie pozostaw wyłączoną',
- 'admin.plugins.updateKeptOff': 'Aktualizacja zainstalowana — pozostaje wyłączona, dopóki nie zatwierdzisz nowych uprawnień',
+ 'admin.plugins.updateKeptOff':
+ 'Aktualizacja zainstalowana — pozostaje wyłączona, dopóki nie zatwierdzisz nowych uprawnień',
'admin.plugins.reviewedMeaning':
'„Zweryfikowana” oznacza, że opiekun TREK przeskanował tę wtyczkę pod kątem złośliwego oprogramowania w każdej wersji — nie pod kątem jakości ani tego, czy działa. To nie jest gwarancja, że wtyczka jest nieszkodliwa.',
'admin.plugins.security.title': 'Jak wtyczki są izolowane — i jakie są tego granice',
@@ -264,11 +299,36 @@ const admin: TranslationStrings = {
'admin.plugins.restarted': 'Wtyczka została uruchomiona ponownie',
'admin.plugins.cap.readsTrips': 'Odczytuje Twoje podróże',
'admin.plugins.cap.readsUsers': 'Odczytuje podstawowe profile',
+ 'admin.plugins.cap.readsCosts': 'Odczytuje Twoje wydatki',
+ 'admin.plugins.cap.readsPacking': 'Odczytuje listy pakowania',
+ 'admin.plugins.cap.readsFiles': 'Odczytuje pliki podróży',
+ 'admin.plugins.cap.writesCosts': 'Dodaje wydatki',
+ 'admin.plugins.cap.writesPlaces': 'Edytuje miejsca',
+ 'admin.plugins.cap.writesDays': 'Edytuje dni',
+ 'admin.plugins.cap.writesItinerary': 'Edytuje plan podróży',
+ 'admin.plugins.cap.writesTrips': 'Edytuje podróże',
+ 'admin.plugins.cap.metadata': 'Dodaje metadane',
'admin.plugins.cap.widget': 'Widget na pulpicie',
'admin.plugins.cap.heroWidget': 'Widget karty pokładowej',
+ 'admin.plugins.cap.placeSlot': 'Szczegóły miejsca',
'admin.plugins.cap.realtime': 'Aktualizacje na żywo',
'admin.plugins.cap.photos': 'Dostarcza zdjęcia',
'admin.plugins.cap.calendar': 'Dostarcza wydarzenia kalendarza',
+ 'admin.plugins.cap.placeDetails': 'Wzbogaca miejsca',
+ 'admin.plugins.cap.warnings': 'Zgłasza problemy',
+ 'admin.plugins.cap.events': 'Reaguje na aktywność',
+ 'admin.plugins.cap.requiresAddon': 'Wymaga {addon}',
+ 'admin.plugins.cap.dependsOn': 'Wymaga {id} {version}',
+ 'admin.plugins.dep.addonDisabledToast': 'Najpierw włącz wymagane dodatki: {addons}',
+ 'admin.plugins.dep.autoEnabled': 'Najpierw włączono wymagane wtyczki: {plugins}',
+ 'admin.plugins.dep.downloaded': 'Pobrano {id}',
+ 'admin.plugins.dep.resolveTitle': 'Brakujące zależności',
+ 'admin.plugins.dep.resolveBody': '„{name}” wymaga zainstalowania tych wtyczek, zanim będzie można ją włączyć.',
+ 'admin.plugins.dep.requires': 'Wymaga {version}',
+ 'admin.plugins.dep.mismatch': 'Wymaga {wanted} — zainstalowano {installed}',
+ 'admin.plugins.dep.download': 'Pobierz',
+ 'admin.plugins.dep.update': 'Aktualizuj',
+ 'admin.plugins.dep.resolveHint': 'Pobiera najnowszą zgodną wersję wraz z jej zależnościami.',
'admin.plugins.accessTitle': 'Do czego ma dostęp',
'admin.plugins.connectsTitle': 'Łączy się z',
'admin.plugins.detailsTitle': 'Szczegóły',
diff --git a/shared/src/i18n/pl/budget.ts b/shared/src/i18n/pl/budget.ts
index 995bce5f7..260d6ee3e 100644
--- a/shared/src/i18n/pl/budget.ts
+++ b/shared/src/i18n/pl/budget.ts
@@ -52,6 +52,9 @@ const budget: TranslationStrings = {
'costs.nothingOwed': 'Nikt nie jest ci nic winien',
'costs.yourShare': 'Twój udział',
'costs.youPaid': 'Zapłaciłeś',
+ 'costs.outstanding': 'Kwota nierozliczona',
+ 'costs.outstandingSub': 'Wydatki bez płatnika',
+ 'costs.outstandingItems': 'wydatków potrzebuje płatnika',
'costs.expenses': 'Wydatki',
'costs.entries': 'Wpisów: {count}',
'costs.searchPlaceholder': 'Szukaj wydatków…',
@@ -116,10 +119,10 @@ const budget: TranslationStrings = {
'costs.unfinishedHint': 'Tylko w sumie — jeszcze nierozliczone',
'costs.tapToInclude': 'Dotknij, aby dodać',
'costs.amount': 'Kwota',
- 'costs.split': "Split",
- 'costs.splitEqually': "Equally",
- 'costs.splitCustom': "Custom",
- 'costs.splitTicket': "Ticket",
+ 'costs.split': 'Split',
+ 'costs.splitEqually': 'Equally',
+ 'costs.splitCustom': 'Custom',
+ 'costs.splitTicket': 'Ticket',
'costs.filter.allCategories': 'Wszystkie kategorie',
'costs.filter.allDays': 'Wszystkie dni',
'costs.expensesCount': '{count} wydatków',
diff --git a/shared/src/i18n/pl/collection.ts b/shared/src/i18n/pl/collection.ts
index a5b2037ac..98f4deaf0 100644
--- a/shared/src/i18n/pl/collection.ts
+++ b/shared/src/i18n/pl/collection.ts
@@ -49,7 +49,8 @@ const collection: TranslationStrings = {
'collections.editList': 'Zmień nazwę',
'collections.listMenu': 'Opcje listy',
'collections.deleteList': 'Usuń listę',
- 'collections.deleteListConfirm': 'Spowoduje to trwałe usunięcie listy i wszystkich zapisanych w niej miejsc. Tej operacji nie można cofnąć.',
+ 'collections.deleteListConfirm':
+ 'Spowoduje to trwałe usunięcie listy i wszystkich zapisanych w niej miejsc. Tej operacji nie można cofnąć.',
'collections.listName': 'Nazwa listy',
'collections.listNamePlaceholder': 'np. Tokio 2025',
'collections.listColor': 'Kolor',
@@ -127,7 +128,8 @@ const collection: TranslationStrings = {
'collections.share.memberHint': 'Tylko właściciel listy może zapraszać lub usuwać osoby.',
'collections.share.cancel': 'Anuluj',
'collections.share.leave': 'Opuść listę',
- 'collections.share.leaveConfirm': 'Opuścić tę udostępnioną listę? Utracisz dostęp, dopóki nie otrzymasz ponownego zaproszenia.',
+ 'collections.share.leaveConfirm':
+ 'Opuścić tę udostępnioną listę? Utracisz dostęp, dopóki nie otrzymasz ponownego zaproszenia.',
'collections.share.left': 'Opuściłeś listę',
'collections.share.remove': 'Usuń',
diff --git a/shared/src/i18n/pl/help.ts b/shared/src/i18n/pl/help.ts
index ff34ae73a..6fc3567e8 100644
--- a/shared/src/i18n/pl/help.ts
+++ b/shared/src/i18n/pl/help.ts
@@ -2,12 +2,12 @@ import type { TranslationStrings } from '../types';
// English fallback until 'pl' is translated.
const help: TranslationStrings = {
- 'help.title': "Help & Docs",
- 'help.search': "Search docs…",
- 'help.contents': "Contents",
- 'help.noResults': "No matching pages.",
+ 'help.title': 'Help & Docs',
+ 'help.search': 'Search docs…',
+ 'help.contents': 'Contents',
+ 'help.noResults': 'No matching pages.',
'help.errorTitle': "Couldn't load this page",
- 'help.errorBody': "The help content is fetched from the TREK wiki. Check your connection and try again.",
+ 'help.errorBody': 'The help content is fetched from the TREK wiki. Check your connection and try again.',
};
export default help;
diff --git a/shared/src/i18n/pl/index.ts b/shared/src/i18n/pl/index.ts
index b9af5461f..eef4c74aa 100644
--- a/shared/src/i18n/pl/index.ts
+++ b/shared/src/i18n/pl/index.ts
@@ -5,11 +5,13 @@ import backup from './backup';
import budget from './budget';
import categories from './categories';
import collab from './collab';
+import collection from './collection';
import common from './common';
import dashboard from './dashboard';
import day from './day';
import dayplan from './dayplan';
import files from './files';
+import help from './help';
import inspector from './inspector';
import journey from './journey';
import login from './login';
@@ -39,8 +41,6 @@ import trip from './trip';
import trips from './trips';
import undo from './undo';
import vacay from './vacay';
-import collection from './collection';
-import help from './help';
const locale = {
...common,
diff --git a/shared/src/i18n/pl/login.ts b/shared/src/i18n/pl/login.ts
index 554706eed..769b146ce 100644
--- a/shared/src/i18n/pl/login.ts
+++ b/shared/src/i18n/pl/login.ts
@@ -86,7 +86,8 @@ const login: TranslationStrings = {
'login.passkey.signIn': 'Zaloguj się kluczem dostępu',
'login.passkey.failed': 'Logowanie kluczem dostępu nie powiodło się. Spróbuj ponownie.',
'login.insecureCookie.title': "Login won't stick over HTTP",
- 'login.insecureCookie.body': "You’re connecting over plain HTTP, so your browser drops TREK’s secure session cookie — the next request fails with \"Access token required\". Fix: use HTTPS, or for a home-lab set COOKIE_SECURE=false.",
- 'login.insecureCookie.link': "Open the Troubleshooting guide",
+ 'login.insecureCookie.body':
+ 'You’re connecting over plain HTTP, so your browser drops TREK’s secure session cookie — the next request fails with "Access token required". Fix: use HTTPS, or for a home-lab set COOKIE_SECURE=false.',
+ 'login.insecureCookie.link': 'Open the Troubleshooting guide',
};
export default login;
diff --git a/shared/src/i18n/pl/places.ts b/shared/src/i18n/pl/places.ts
index 3d7b21900..34a976ea2 100644
--- a/shared/src/i18n/pl/places.ts
+++ b/shared/src/i18n/pl/places.ts
@@ -24,8 +24,8 @@ const places: TranslationStrings = {
'places.kmlImportNoneSelected': 'Wybierz co najmniej jeden typ.',
'places.selectionCount': '{count} zaznaczono',
'places.deleteSelected': 'Usuń wybrane',
- 'places.changeCategory': "Change category",
- 'places.categoryChanged': "{count} places updated",
+ 'places.changeCategory': 'Change category',
+ 'places.categoryChanged': '{count} places updated',
'places.kmlKmzImported': 'Zaimportowano {count} miejsc z KMZ/KML',
'places.urlResolved': 'Miejsce zaimportowane z URL',
'places.kmlKmzSummaryValues': 'Placemarks: {total} • Zaimportowano: {created} • Pominięto: {skipped}',
diff --git a/shared/src/i18n/pl/settings.ts b/shared/src/i18n/pl/settings.ts
index 0cb4456cb..f5eee6519 100644
--- a/shared/src/i18n/pl/settings.ts
+++ b/shared/src/i18n/pl/settings.ts
@@ -330,18 +330,21 @@ const settings: TranslationStrings = {
'settings.airtrail.test.success': 'Połączono — znaleziono {count} lot(y/ów)',
'settings.airtrail.test.failed': 'Połączenie nieudane',
'settings.aiParsing.title': 'Analiza AI',
- 'settings.aiParsing.hint': 'Użyj własnego modelu AI, aby wyodrębniać rezerwacje z przesłanych plików. Ma to zastosowanie tylko wtedy, gdy administrator nie skonfigurował modelu dla całej instancji.',
+ 'settings.aiParsing.hint':
+ 'Użyj własnego modelu AI, aby wyodrębniać rezerwacje z przesłanych plików. Ma to zastosowanie tylko wtedy, gdy administrator nie skonfigurował modelu dla całej instancji.',
'settings.aiParsing.provider': 'Dostawca',
'settings.aiParsing.providerLocal': 'Lokalny (Ollama)',
'settings.aiParsing.providerOpenai': 'OpenAI',
'settings.aiParsing.providerAnthropic': 'Anthropic',
'settings.aiParsing.model': 'Model',
'settings.aiParsing.baseUrl': 'Bazowy adres URL',
- 'settings.aiParsing.baseUrlHint': 'Miejsce, w którym działa model — lokalny serwer Ollama lub punkt końcowy zgodny z OpenAI.',
+ 'settings.aiParsing.baseUrlHint':
+ 'Miejsce, w którym działa model — lokalny serwer Ollama lub punkt końcowy zgodny z OpenAI.',
'settings.aiParsing.apiKey': 'Klucz API',
'settings.aiParsing.apiKeyHint': 'Przechowywany w postaci zaszyfrowanej. Pozostaw puste, aby zachować bieżący klucz.',
'settings.aiParsing.multimodal': 'Wysyłaj dokumenty jako obrazy',
- 'settings.aiParsing.multimodalHint': 'Dla modeli obsługujących obraz — wysyła oryginalny plik PDF zamiast wyodrębnionego tekstu.',
+ 'settings.aiParsing.multimodalHint':
+ 'Dla modeli obsługujących obraz — wysyła oryginalny plik PDF zamiast wyodrębnionego tekstu.',
'settings.aiParsing.toast.saved': 'Zapisano ustawienia AI',
'settings.aiParsing.toast.saveError': 'Nie udało się zapisać ustawień AI',
'settings.tabs.appearance': 'Appearance',
@@ -360,7 +363,8 @@ const settings: TranslationStrings = {
'settings.appearance.contrastLow': 'Low contrast',
'settings.appearance.readability': 'Readability',
'settings.appearance.transparency': 'Transparency',
- 'settings.appearance.transparencyHint': 'Glassy translucent surfaces. Turn off for solid, higher-contrast backgrounds.',
+ 'settings.appearance.transparencyHint':
+ 'Glassy translucent surfaces. Turn off for solid, higher-contrast backgrounds.',
'settings.appearance.reduceMotion': 'Reduce motion',
'settings.appearance.reduceMotionHint': 'Minimize animations and transitions.',
'settings.appearance.density': 'Density',
@@ -390,7 +394,8 @@ const settings: TranslationStrings = {
'settings.appearance.group.belowHero': 'Below the hero',
'settings.appearance.group.bottomOfPage': 'Bottom of page',
'settings.appearance.sidebarHint': 'The whole right column. Turn off and the dashboard centers.',
- 'settings.appearance.densityHint': 'Compact tightens spacing and padding for a denser layout that fits more on screen.',
+ 'settings.appearance.densityHint':
+ 'Compact tightens spacing and padding for a denser layout that fits more on screen.',
'settings.appearance.textSizeAll': 'Everything',
'settings.appearance.perSize': 'Adjust each size separately',
'settings.appearance.size.large': 'Large',
@@ -413,10 +418,13 @@ const settings: TranslationStrings = {
'settings.offline.cache.title': 'Pamięć podręczna offline',
'settings.offline.mode.title': 'Tryb offline',
'settings.offline.mode.force': 'Wymuś tryb offline',
- 'settings.offline.mode.forceHint': 'Pracuj wyłącznie na danych z pamięci podręcznej i kolejkuj swoje zmiany. Wyłącz, aby połączyć się ponownie i zsynchronizować.',
- 'settings.offline.mode.active': 'Tryb offline jest włączony — Twoje zmiany czekają w kolejce i zostaną zsynchronizowane po jego wyłączeniu.',
+ 'settings.offline.mode.forceHint':
+ 'Pracuj wyłącznie na danych z pamięci podręcznej i kolejkuj swoje zmiany. Wyłącz, aby połączyć się ponownie i zsynchronizować.',
+ 'settings.offline.mode.active':
+ 'Tryb offline jest włączony — Twoje zmiany czekają w kolejce i zostaną zsynchronizowane po jego wyłączeniu.',
'settings.offline.prepare.title': 'Przygotuj do trybu offline',
- 'settings.offline.prepare.hint': 'Pobierz wszystko, czego potrzebujesz — dane podróży, dokumenty i kafelki mapy — zanim stracisz połączenie.',
+ 'settings.offline.prepare.hint':
+ 'Pobierz wszystko, czego potrzebujesz — dane podróży, dokumenty i kafelki mapy — zanim stracisz połączenie.',
'settings.offline.prepare.button': 'Pobierz do użytku offline',
'settings.offline.prepare.running': 'Pobieranie…',
'settings.offline.prepare.done': 'Gotowe do użytku offline',
@@ -427,12 +435,14 @@ const settings: TranslationStrings = {
'settings.offline.resyncing': 'Synchronizowanie…',
'settings.offline.storage.title': 'Co przechowywać offline',
'settings.offline.storage.tiles': 'Przechowuj kafelki mapy offline',
- 'settings.offline.storage.tilesHint': 'Kafelki mapy zajmują najwięcej miejsca. Wyłącz tę opcję, aby przechowywać offline tylko dane podróży i dokumenty.',
+ 'settings.offline.storage.tilesHint':
+ 'Kafelki mapy zajmują najwięcej miejsca. Wyłącz tę opcję, aby przechowywać offline tylko dane podróży i dokumenty.',
'settings.offline.storage.tripsTitle': 'Podróże',
'settings.offline.storage.tripOn': 'Przechowywane offline',
'settings.offline.storage.tripOff': 'Nieprzechowywane',
'settings.offline.clear': 'Wyczyść pamięć podręczną',
- 'settings.offline.clearConfirm': 'Wyczyścić wszystkie dane podróży zapisane offline? Możesz je w każdej chwili zsynchronizować ponownie, będąc online.',
+ 'settings.offline.clearConfirm':
+ 'Wyczyścić wszystkie dane podróży zapisane offline? Możesz je w każdej chwili zsynchronizować ponownie, będąc online.',
'settings.offline.stats.trips': 'Podróże w pamięci podręcznej',
'settings.offline.stats.pending': 'Oczekujące zmiany',
'settings.offline.stats.failed': 'Nieudane zmiany',
@@ -440,7 +450,8 @@ const settings: TranslationStrings = {
'settings.offline.empty': 'Brak podróży w pamięci podręcznej. Połącz się z internetem, aby zsynchronizować.',
'settings.offline.loading': 'Ładowanie…',
'settings.offline.conflicts.title': 'Konflikty synchronizacji',
- 'settings.offline.conflicts.hint': 'Zmiany wprowadzone offline kolidują z nowszymi zmianami na serwerze. Wybierz, którą wersję zachować.',
+ 'settings.offline.conflicts.hint':
+ 'Zmiany wprowadzone offline kolidują z nowszymi zmianami na serwerze. Wybierz, którą wersję zachować.',
'settings.offline.conflicts.keepMine': 'Zachowaj moją',
'settings.offline.conflicts.keepServer': 'Zachowaj serwerową',
'settings.offline.conflicts.mine': 'Twoja wersja',
diff --git a/shared/src/i18n/pl/trip.ts b/shared/src/i18n/pl/trip.ts
index fa713e2b6..f19c54d5b 100644
--- a/shared/src/i18n/pl/trip.ts
+++ b/shared/src/i18n/pl/trip.ts
@@ -28,7 +28,8 @@ const trip: TranslationStrings = {
'trip.toast.placesDeleted': '{count} miejsc usunięto',
'trip.loadingPhotos': 'Ładowanie zdjęć...',
'trip.invite.linkTitle': 'Link zaproszenia do podróży',
- 'trip.invite.linkHint': 'Każda osoba z kontem TREK, która otworzy ten link, dołączy do podróży jako członek. Wygeneruj ponownie, aby unieważnić stary link.',
+ 'trip.invite.linkHint':
+ 'Każda osoba z kontem TREK, która otworzy ten link, dołączy do podróży jako członek. Wygeneruj ponownie, aby unieważnić stary link.',
'trip.invite.create': 'Utwórz link zaproszenia',
'trip.invite.regenerate': 'Wygeneruj ponownie',
'trip.invite.disable': 'Wyłącz',
diff --git a/shared/src/i18n/pl/undo.ts b/shared/src/i18n/pl/undo.ts
index 2b3c72992..fbab2ab02 100644
--- a/shared/src/i18n/pl/undo.ts
+++ b/shared/src/i18n/pl/undo.ts
@@ -9,7 +9,7 @@ const undo: TranslationStrings = {
'undo.optimize': 'Trasa zoptymalizowana',
'undo.deletePlace': 'Miejsce usunięte',
'undo.deletePlaces': 'Miejsca usunięte',
- 'undo.changeCategory': "Category changed",
+ 'undo.changeCategory': 'Category changed',
'undo.moveDay': 'Miejsce przeniesione',
'undo.lock': 'Blokada przełączona',
'undo.importGpx': 'Import GPX',
diff --git a/shared/src/i18n/ru/admin.ts b/shared/src/i18n/ru/admin.ts
index a7583f0a8..8b68d6640 100644
--- a/shared/src/i18n/ru/admin.ts
+++ b/shared/src/i18n/ru/admin.ts
@@ -96,6 +96,8 @@ const admin: TranslationStrings = {
'admin.recommended': 'Рекомендуется',
'admin.weatherKey': 'API-ключ OpenWeatherMap',
'admin.weatherKeyHint': 'Для данных о погоде. Бесплатно на openweathermap.org',
+ 'admin.unsplashKey': 'Ключ API Unsplash',
+ 'admin.unsplashKeyHint': 'Для поиска изображений. Бесплатно на unsplash.com/developers',
'admin.validateKey': 'Проверить',
'admin.keyValid': 'Подключено',
'admin.keyInvalid': 'Недействителен',
@@ -162,6 +164,11 @@ const admin: TranslationStrings = {
'admin.tabs.plugins': 'Плагины',
'admin.plugins.rescan': 'Пересканировать',
'admin.plugins.rescanned': 'Папка плагинов пересканирована',
+ 'admin.plugins.upload': 'Загрузить плагин',
+ 'admin.plugins.dropToUpload': 'Перетащите .zip плагина для установки',
+ 'admin.plugins.uploaded': 'Плагин “{name}” загружен — активируйте для запуска',
+ 'admin.plugins.sideloaded': 'Загружен вручную',
+ 'admin.plugins.sideloadedHint': 'Загружено вручную — не из реестра, без подписи и проверки',
'admin.plugins.browse': 'Обзор плагинов',
'admin.plugins.installed': 'Установлен',
'admin.plugins.install': 'Установить',
@@ -176,11 +183,13 @@ const admin: TranslationStrings = {
'admin.plugins.noErrors': 'Ошибок не зафиксировано.',
'admin.plugins.uninstalled': 'Плагин удалён',
'admin.plugins.uninstallTitle': 'Удалить плагин?',
- 'admin.plugins.uninstallBody': 'Плагин будет остановлен, его код удалён, а все его данные стёрты. Это действие нельзя отменить.',
+ 'admin.plugins.uninstallBody':
+ 'Плагин будет остановлен, его код удалён, а все его данные стёрты. Это действие нельзя отменить.',
'admin.plugins.status.starting': 'Запуск…',
'admin.plugins.type.widget': 'Виджет',
'admin.plugins.type.page': 'Страница',
'admin.plugins.type.integration': 'Интеграция',
+ 'admin.plugins.type.trip-page': 'Страница поездки',
'admin.plugins.reviewed': 'Проверен',
'admin.plugins.unreviewed': 'Не проверен',
'admin.plugins.updated': 'Плагин обновлён',
@@ -190,10 +199,12 @@ const admin: TranslationStrings = {
'admin.plugins.title': 'Плагины',
'admin.plugins.subtitle': 'Устанавливайте сторонние плагины и управляйте ими на вашем экземпляре.',
'admin.plugins.disabledTitle': 'Плагины отключены',
- 'admin.plugins.disabledBody': 'Среда выполнения плагинов выключена (TREK_PLUGINS_ENABLED). Плагины не смогут работать, пока администратор не включит её в конфигурации сервера.',
+ 'admin.plugins.disabledBody':
+ 'Среда выполнения плагинов выключена (TREK_PLUGINS_ENABLED). Плагины не смогут работать, пока администратор не включит её в конфигурации сервера.',
'admin.plugins.empty': 'Плагины пока не установлены.',
'admin.plugins.loadError': 'Не удалось загрузить плагины.',
- 'admin.plugins.scaffoldNote': 'Установка и активация плагинов появятся в одном из следующих обновлений. Пока эта панель только показывает установленные плагины.',
+ 'admin.plugins.scaffoldNote':
+ 'Установка и активация плагинов появятся в одном из следующих обновлений. Пока эта панель только показывает установленные плагины.',
'admin.plugins.status.active': 'Активен',
'admin.plugins.status.inactive': 'Неактивен',
'admin.plugins.status.disabled': 'Отключён',
@@ -216,10 +227,30 @@ const admin: TranslationStrings = {
'admin.plugins.perm.db:own': 'Хранить собственные данные в изолированной базе данных',
'admin.plugins.perm.db:read:trips': 'Читать поездки, доступные текущему пользователю',
'admin.plugins.perm.db:read:users': 'Читать основную информацию профиля (имя, аватар — но не учётные данные)',
+ 'admin.plugins.perm.db:read:costs': 'Читать расходы (статьи бюджета), доступные текущему пользователю',
+ 'admin.plugins.perm.db:read:packing': 'Читать списки вещей поездок, доступных текущему пользователю',
+ 'admin.plugins.perm.db:read:files': 'Читать файлы поездок, доступных текущему пользователю',
+ 'admin.plugins.perm.db:write:costs':
+ 'Создавать расходы (статьи бюджета) в поездках, которые текущий пользователь может редактировать',
+ 'admin.plugins.perm.db:write:places':
+ 'Добавлять, изменять и удалять места в поездках, которые текущий пользователь может редактировать',
+ 'admin.plugins.perm.db:write:days':
+ 'Добавлять, изменять и удалять дни в поездках, которые текущий пользователь может редактировать',
+ 'admin.plugins.perm.db:write:itinerary':
+ 'Назначать и удалять места в днях поездок, которые текущий пользователь может редактировать',
+ 'admin.plugins.perm.db:write:trips':
+ 'Изменять данные поездки (название, даты, валюту…) в поездках, которые текущий пользователь может редактировать',
+ 'admin.plugins.perm.db:meta':
+ 'Прикреплять собственные приватные данные к поездкам, местам и дням, к которым у текущего пользователя есть доступ',
'admin.plugins.perm.ws:broadcast:trip': 'Отправлять обновления в реальном времени участникам поездки',
'admin.plugins.perm.ws:broadcast:user': 'Отправлять обновления в реальном времени отдельным пользователям',
'admin.plugins.perm.hook:photo-provider': 'Предоставлять фотографии для «Воспоминаний»',
'admin.plugins.perm.hook:calendar-source': 'Предоставлять события для календаря',
+ 'admin.plugins.perm.hook:place-detail-provider': 'Добавлять дополнительные сведения (отзывы, оценки, ссылки) к месту',
+ 'admin.plugins.perm.hook:trip-warning-provider':
+ 'Выдавать предупреждения проверки для поездки (отображаются в планировщике)',
+ 'admin.plugins.perm.events:subscribe':
+ 'Реагировать на основные события активности (только название события и поездка, никогда содержимое)',
'admin.plugins.perm.http:outbound': 'Выполнять исходящие запросы к заявленным хостам',
'admin.plugins.updateConsentTitle': 'Для этого обновления нужны новые разрешения',
'admin.plugins.updateConsentBody':
@@ -271,11 +302,36 @@ const admin: TranslationStrings = {
'admin.plugins.restarted': 'Плагин перезапущен',
'admin.plugins.cap.readsTrips': 'Читает ваши поездки',
'admin.plugins.cap.readsUsers': 'Читает основные профили',
+ 'admin.plugins.cap.readsCosts': 'Читает ваши расходы',
+ 'admin.plugins.cap.readsPacking': 'Читает списки вещей',
+ 'admin.plugins.cap.readsFiles': 'Читает файлы поездок',
+ 'admin.plugins.cap.writesCosts': 'Добавляет расходы',
+ 'admin.plugins.cap.writesPlaces': 'Изменяет места',
+ 'admin.plugins.cap.writesDays': 'Изменяет дни',
+ 'admin.plugins.cap.writesItinerary': 'Изменяет маршрут',
+ 'admin.plugins.cap.writesTrips': 'Изменяет поездки',
+ 'admin.plugins.cap.metadata': 'Добавляет метаданные',
'admin.plugins.cap.widget': 'Виджет панели',
'admin.plugins.cap.heroWidget': 'Виджет посадочного талона',
+ 'admin.plugins.cap.placeSlot': 'Детали места',
'admin.plugins.cap.realtime': 'Обновления в реальном времени',
'admin.plugins.cap.photos': 'Предоставляет фото',
'admin.plugins.cap.calendar': 'Предоставляет события календаря',
+ 'admin.plugins.cap.placeDetails': 'Обогащает места',
+ 'admin.plugins.cap.warnings': 'Отмечает проблемы',
+ 'admin.plugins.cap.events': 'Реагирует на активность',
+ 'admin.plugins.cap.requiresAddon': 'Требуется {addon}',
+ 'admin.plugins.cap.dependsOn': 'Нужен {id} {version}',
+ 'admin.plugins.dep.addonDisabledToast': 'Сначала включите необходимые дополнения: {addons}',
+ 'admin.plugins.dep.autoEnabled': 'Сначала включены необходимые плагины: {plugins}',
+ 'admin.plugins.dep.downloaded': '{id} загружен',
+ 'admin.plugins.dep.resolveTitle': 'Отсутствуют зависимости',
+ 'admin.plugins.dep.resolveBody': '«{name}» требует установки этих плагинов перед включением.',
+ 'admin.plugins.dep.requires': 'Требуется {version}',
+ 'admin.plugins.dep.mismatch': 'Нужна {wanted} — установлена {installed}',
+ 'admin.plugins.dep.download': 'Загрузить',
+ 'admin.plugins.dep.update': 'Обновить',
+ 'admin.plugins.dep.resolveHint': 'Загружает последнюю совместимую версию вместе с её зависимостями.',
'admin.plugins.accessTitle': 'К чему есть доступ',
'admin.plugins.connectsTitle': 'Подключается к',
'admin.plugins.detailsTitle': 'Подробности',
diff --git a/shared/src/i18n/ru/budget.ts b/shared/src/i18n/ru/budget.ts
index ddf45fdea..479d775c3 100644
--- a/shared/src/i18n/ru/budget.ts
+++ b/shared/src/i18n/ru/budget.ts
@@ -52,6 +52,9 @@ const budget: TranslationStrings = {
'costs.nothingOwed': 'Вам ничего не должны',
'costs.yourShare': 'Ваша доля',
'costs.youPaid': 'Вы заплатили',
+ 'costs.outstanding': 'Неурегулированная сумма',
+ 'costs.outstandingSub': 'Расходы без плательщика',
+ 'costs.outstandingItems': 'расходов без плательщика',
'costs.expenses': 'Расходы',
'costs.entries': '{count} записей',
'costs.searchPlaceholder': 'Поиск расходов…',
@@ -116,10 +119,10 @@ const budget: TranslationStrings = {
'costs.unfinishedHint': 'Только в сумме — ещё не урегулировано',
'costs.tapToInclude': 'Нажмите, чтобы добавить',
'costs.amount': 'Сумма',
- 'costs.split': "Split",
- 'costs.splitEqually': "Equally",
- 'costs.splitCustom': "Custom",
- 'costs.splitTicket': "Ticket",
+ 'costs.split': 'Split',
+ 'costs.splitEqually': 'Equally',
+ 'costs.splitCustom': 'Custom',
+ 'costs.splitTicket': 'Ticket',
'costs.filter.allCategories': 'Все категории',
'costs.filter.allDays': 'Все дни',
'costs.expensesCount': 'Расходов: {count}',
diff --git a/shared/src/i18n/ru/help.ts b/shared/src/i18n/ru/help.ts
index b287783ed..7b2398413 100644
--- a/shared/src/i18n/ru/help.ts
+++ b/shared/src/i18n/ru/help.ts
@@ -2,12 +2,12 @@ import type { TranslationStrings } from '../types';
// English fallback until 'ru' is translated.
const help: TranslationStrings = {
- 'help.title': "Help & Docs",
- 'help.search': "Search docs…",
- 'help.contents': "Contents",
- 'help.noResults': "No matching pages.",
+ 'help.title': 'Help & Docs',
+ 'help.search': 'Search docs…',
+ 'help.contents': 'Contents',
+ 'help.noResults': 'No matching pages.',
'help.errorTitle': "Couldn't load this page",
- 'help.errorBody': "The help content is fetched from the TREK wiki. Check your connection and try again.",
+ 'help.errorBody': 'The help content is fetched from the TREK wiki. Check your connection and try again.',
};
export default help;
diff --git a/shared/src/i18n/ru/index.ts b/shared/src/i18n/ru/index.ts
index b9af5461f..eef4c74aa 100644
--- a/shared/src/i18n/ru/index.ts
+++ b/shared/src/i18n/ru/index.ts
@@ -5,11 +5,13 @@ import backup from './backup';
import budget from './budget';
import categories from './categories';
import collab from './collab';
+import collection from './collection';
import common from './common';
import dashboard from './dashboard';
import day from './day';
import dayplan from './dayplan';
import files from './files';
+import help from './help';
import inspector from './inspector';
import journey from './journey';
import login from './login';
@@ -39,8 +41,6 @@ import trip from './trip';
import trips from './trips';
import undo from './undo';
import vacay from './vacay';
-import collection from './collection';
-import help from './help';
const locale = {
...common,
diff --git a/shared/src/i18n/ru/login.ts b/shared/src/i18n/ru/login.ts
index 4075b2a6a..1a3064f53 100644
--- a/shared/src/i18n/ru/login.ts
+++ b/shared/src/i18n/ru/login.ts
@@ -87,7 +87,8 @@ const login: TranslationStrings = {
'login.passkey.signIn': 'Войти с помощью passkey',
'login.passkey.failed': 'Не удалось войти с помощью passkey. Попробуйте ещё раз.',
'login.insecureCookie.title': "Login won't stick over HTTP",
- 'login.insecureCookie.body': "You’re connecting over plain HTTP, so your browser drops TREK’s secure session cookie — the next request fails with \"Access token required\". Fix: use HTTPS, or for a home-lab set COOKIE_SECURE=false.",
- 'login.insecureCookie.link': "Open the Troubleshooting guide",
+ 'login.insecureCookie.body':
+ 'You’re connecting over plain HTTP, so your browser drops TREK’s secure session cookie — the next request fails with "Access token required". Fix: use HTTPS, or for a home-lab set COOKIE_SECURE=false.',
+ 'login.insecureCookie.link': 'Open the Troubleshooting guide',
};
export default login;
diff --git a/shared/src/i18n/ru/places.ts b/shared/src/i18n/ru/places.ts
index 47dd9b613..ad9a89227 100644
--- a/shared/src/i18n/ru/places.ts
+++ b/shared/src/i18n/ru/places.ts
@@ -24,8 +24,8 @@ const places: TranslationStrings = {
'places.kmlImportNoneSelected': 'Выберите хотя бы один тип.',
'places.selectionCount': '{count} выбрано',
'places.deleteSelected': 'Удалить выбранные',
- 'places.changeCategory': "Change category",
- 'places.categoryChanged': "{count} places updated",
+ 'places.changeCategory': 'Change category',
+ 'places.categoryChanged': '{count} places updated',
'places.kmlKmzImported': '{count} мест импортировано из KMZ/KML',
'places.urlResolved': 'Место импортировано из URL',
'places.importList': 'Импорт списка',
diff --git a/shared/src/i18n/ru/settings.ts b/shared/src/i18n/ru/settings.ts
index 40484c370..ed566095f 100644
--- a/shared/src/i18n/ru/settings.ts
+++ b/shared/src/i18n/ru/settings.ts
@@ -331,18 +331,21 @@ const settings: TranslationStrings = {
'settings.airtrail.test.success': 'Подключено — найдено рейсов: {count}',
'settings.airtrail.test.failed': 'Не удалось подключиться',
'settings.aiParsing.title': 'Распознавание с помощью ИИ',
- 'settings.aiParsing.hint': 'Используйте собственную модель ИИ для извлечения бронирований из загруженных файлов. Это работает только в том случае, если администратор не настроил модель для всего экземпляра.',
+ 'settings.aiParsing.hint':
+ 'Используйте собственную модель ИИ для извлечения бронирований из загруженных файлов. Это работает только в том случае, если администратор не настроил модель для всего экземпляра.',
'settings.aiParsing.provider': 'Провайдер',
'settings.aiParsing.providerLocal': 'Локально (Ollama)',
'settings.aiParsing.providerOpenai': 'OpenAI',
'settings.aiParsing.providerAnthropic': 'Anthropic',
'settings.aiParsing.model': 'Модель',
'settings.aiParsing.baseUrl': 'Базовый URL',
- 'settings.aiParsing.baseUrlHint': 'Где работает модель — локальный сервер Ollama или конечная точка, совместимая с OpenAI.',
+ 'settings.aiParsing.baseUrlHint':
+ 'Где работает модель — локальный сервер Ollama или конечная точка, совместимая с OpenAI.',
'settings.aiParsing.apiKey': 'Ключ API',
'settings.aiParsing.apiKeyHint': 'Хранится в зашифрованном виде. Оставьте поле пустым, чтобы сохранить текущий ключ.',
'settings.aiParsing.multimodal': 'Отправлять документы как изображения',
- 'settings.aiParsing.multimodalHint': 'Для моделей с поддержкой изображений — отправляет исходный PDF вместо извлечённого текста.',
+ 'settings.aiParsing.multimodalHint':
+ 'Для моделей с поддержкой изображений — отправляет исходный PDF вместо извлечённого текста.',
'settings.aiParsing.toast.saved': 'Настройки ИИ сохранены',
'settings.aiParsing.toast.saveError': 'Не удалось сохранить настройки ИИ',
'settings.tabs.appearance': 'Appearance',
@@ -361,7 +364,8 @@ const settings: TranslationStrings = {
'settings.appearance.contrastLow': 'Low contrast',
'settings.appearance.readability': 'Readability',
'settings.appearance.transparency': 'Transparency',
- 'settings.appearance.transparencyHint': 'Glassy translucent surfaces. Turn off for solid, higher-contrast backgrounds.',
+ 'settings.appearance.transparencyHint':
+ 'Glassy translucent surfaces. Turn off for solid, higher-contrast backgrounds.',
'settings.appearance.reduceMotion': 'Reduce motion',
'settings.appearance.reduceMotionHint': 'Minimize animations and transitions.',
'settings.appearance.density': 'Density',
@@ -391,7 +395,8 @@ const settings: TranslationStrings = {
'settings.appearance.group.belowHero': 'Below the hero',
'settings.appearance.group.bottomOfPage': 'Bottom of page',
'settings.appearance.sidebarHint': 'The whole right column. Turn off and the dashboard centers.',
- 'settings.appearance.densityHint': 'Compact tightens spacing and padding for a denser layout that fits more on screen.',
+ 'settings.appearance.densityHint':
+ 'Compact tightens spacing and padding for a denser layout that fits more on screen.',
'settings.appearance.textSizeAll': 'Everything',
'settings.appearance.perSize': 'Adjust each size separately',
'settings.appearance.size.large': 'Large',
@@ -414,10 +419,13 @@ const settings: TranslationStrings = {
'settings.offline.cache.title': 'Офлайн-кэш',
'settings.offline.mode.title': 'Офлайн-режим',
'settings.offline.mode.force': 'Принудительный офлайн-режим',
- 'settings.offline.mode.forceHint': 'Работайте только с кэшированными данными, а ваши изменения ставятся в очередь. Выключите, чтобы снова подключиться и синхронизировать.',
- 'settings.offline.mode.active': 'Офлайн-режим включён — ваши изменения поставлены в очередь и синхронизируются, когда вы его выключите.',
+ 'settings.offline.mode.forceHint':
+ 'Работайте только с кэшированными данными, а ваши изменения ставятся в очередь. Выключите, чтобы снова подключиться и синхронизировать.',
+ 'settings.offline.mode.active':
+ 'Офлайн-режим включён — ваши изменения поставлены в очередь и синхронизируются, когда вы его выключите.',
'settings.offline.prepare.title': 'Подготовка к работе офлайн',
- 'settings.offline.prepare.hint': 'Скачайте всё необходимое — данные поездок, документы и тайлы карты — до того, как потеряете соединение.',
+ 'settings.offline.prepare.hint':
+ 'Скачайте всё необходимое — данные поездок, документы и тайлы карты — до того, как потеряете соединение.',
'settings.offline.prepare.button': 'Скачать для работы офлайн',
'settings.offline.prepare.running': 'Скачивание…',
'settings.offline.prepare.done': 'Готово к работе офлайн',
@@ -428,12 +436,14 @@ const settings: TranslationStrings = {
'settings.offline.resyncing': 'Синхронизация…',
'settings.offline.storage.title': 'Что хранить офлайн',
'settings.offline.storage.tiles': 'Хранить тайлы карты офлайн',
- 'settings.offline.storage.tilesHint': 'Тайлы карты занимают больше всего места. Выключите, чтобы хранить офлайн только данные поездок и документы.',
+ 'settings.offline.storage.tilesHint':
+ 'Тайлы карты занимают больше всего места. Выключите, чтобы хранить офлайн только данные поездок и документы.',
'settings.offline.storage.tripsTitle': 'Поездки',
'settings.offline.storage.tripOn': 'Хранится офлайн',
'settings.offline.storage.tripOff': 'Не хранится',
'settings.offline.clear': 'Очистить кэш',
- 'settings.offline.clearConfirm': 'Очистить все офлайн-данные поездок? Вы сможете синхронизировать их снова в любой момент при наличии подключения.',
+ 'settings.offline.clearConfirm':
+ 'Очистить все офлайн-данные поездок? Вы сможете синхронизировать их снова в любой момент при наличии подключения.',
'settings.offline.stats.trips': 'Кэшированные поездки',
'settings.offline.stats.pending': 'Изменения в очереди',
'settings.offline.stats.failed': 'Неудавшиеся изменения',
@@ -441,7 +451,8 @@ const settings: TranslationStrings = {
'settings.offline.empty': 'Поездки ещё не кэшированы. Подключитесь к интернету для синхронизации.',
'settings.offline.loading': 'Загрузка…',
'settings.offline.conflicts.title': 'Конфликты синхронизации',
- 'settings.offline.conflicts.hint': 'Изменения, сделанные вами офлайн, конфликтуют с более новыми изменениями на сервере. Выберите, какую версию сохранить.',
+ 'settings.offline.conflicts.hint':
+ 'Изменения, сделанные вами офлайн, конфликтуют с более новыми изменениями на сервере. Выберите, какую версию сохранить.',
'settings.offline.conflicts.keepMine': 'Оставить мою',
'settings.offline.conflicts.keepServer': 'Оставить серверную',
'settings.offline.conflicts.mine': 'Ваша версия',
diff --git a/shared/src/i18n/ru/trip.ts b/shared/src/i18n/ru/trip.ts
index df443a5fe..0ae7f8215 100644
--- a/shared/src/i18n/ru/trip.ts
+++ b/shared/src/i18n/ru/trip.ts
@@ -28,7 +28,8 @@ const trip: TranslationStrings = {
'trip.confirm.deletePlaces': 'Удалить {count} мест?',
'trip.toast.placesDeleted': '{count} мест удалено',
'trip.invite.linkTitle': 'Ссылка-приглашение в поездку',
- 'trip.invite.linkHint': 'Любой пользователь с аккаунтом TREK, открыв эту ссылку, присоединится к поездке как участник. Создайте ссылку заново, чтобы старая перестала работать.',
+ 'trip.invite.linkHint':
+ 'Любой пользователь с аккаунтом TREK, открыв эту ссылку, присоединится к поездке как участник. Создайте ссылку заново, чтобы старая перестала работать.',
'trip.invite.create': 'Создать ссылку-приглашение',
'trip.invite.regenerate': 'Создать заново',
'trip.invite.disable': 'Отключить',
diff --git a/shared/src/i18n/ru/undo.ts b/shared/src/i18n/ru/undo.ts
index 0636843cb..914c3cb13 100644
--- a/shared/src/i18n/ru/undo.ts
+++ b/shared/src/i18n/ru/undo.ts
@@ -9,7 +9,7 @@ const undo: TranslationStrings = {
'undo.optimize': 'Маршрут оптимизирован',
'undo.deletePlace': 'Место удалено',
'undo.deletePlaces': 'Места удалены',
- 'undo.changeCategory': "Category changed",
+ 'undo.changeCategory': 'Category changed',
'undo.moveDay': 'Место перемещено в другой день',
'undo.lock': 'Блокировка места изменена',
'undo.importGpx': 'Импорт GPX',
diff --git a/shared/src/i18n/sv/admin.ts b/shared/src/i18n/sv/admin.ts
index e79a9bf1f..b58abeca6 100644
--- a/shared/src/i18n/sv/admin.ts
+++ b/shared/src/i18n/sv/admin.ts
@@ -27,7 +27,8 @@ const admin: TranslationStrings = {
'admin.notifications.adminWebhookPanel.saved': 'Admin webhook URL sparad',
'admin.notifications.adminWebhookPanel.testSuccess': 'Test webhook har skickats utan problem',
'admin.notifications.adminWebhookPanel.testFailed': 'Test webhook misslyckades',
- 'admin.notifications.adminWebhookPanel.alwaysOnHint': 'Webhook för administratör aktiveras alltid när en URL konfigureras',
+ 'admin.notifications.adminWebhookPanel.alwaysOnHint':
+ 'Webhook för administratör aktiveras alltid när en URL konfigureras',
'admin.notifications.adminNtfyPanel.title': 'Admin Ntfy',
'admin.notifications.adminNtfyPanel.hint':
'Detta ntfy-ämne används uteslutande för administratörsmeddelanden (t.ex. versionsvarningar). Det är separat från ämnena för enskilda användare och aktiveras alltid när det är konfigurerat.',
@@ -126,7 +127,8 @@ const admin: TranslationStrings = {
'Inställningarna för inloggning med lösenord styrs av miljövariabeln OIDC_ONLY och kan inte ändras här.',
'admin.lockoutWarning': 'Minst en inloggningsmetod måste vara aktiverad',
'admin.requireMfa': 'Kräv tvåfaktorsautentisering (2FA)',
- 'admin.requireMfaHint': 'Användare som inte har tvåfaktorsautentisering måste slutföra inställningarna under inställningar innan de använder appen.',
+ 'admin.requireMfaHint':
+ 'Användare som inte har tvåfaktorsautentisering måste slutföra inställningarna under inställningar innan de använder appen.',
'admin.apiKeys': 'API Nycklar',
'admin.apiKeysHint': 'Valfritt. Aktiverar utökade platsuppgifter, såsom foton och väderinformation.',
'admin.mapsKey': 'Google Maps API Nyckel',
@@ -136,6 +138,8 @@ const admin: TranslationStrings = {
'admin.recommended': 'Rekommenderat',
'admin.weatherKey': 'OpenWeatherMap API Nyckel',
'admin.weatherKeyHint': 'För väderdata. Gratis på openweathermap.org',
+ 'admin.unsplashKey': 'Unsplash API-nyckel',
+ 'admin.unsplashKeyHint': 'För bildsökning. Gratis på unsplash.com/developers',
'admin.validateKey': 'Test',
'admin.keyValid': 'Ansluten',
'admin.keyInvalid': 'Felaktig',
@@ -151,13 +155,15 @@ const admin: TranslationStrings = {
'När funktionen är aktiverad är endast SSO-inloggning tillåten. Lösenordsbaserad inloggning och registrering blockeras.',
'admin.fileTypes': 'Tillåtna filtyper',
'admin.fileTypesHint': 'Ställ in vilka filtyper användarna kan ladda upp.',
- 'admin.fileTypesFormat': 'Filändelser separerade med kommatecken (t.ex. jpg, png, pdf, doc). Använd * för att tillåta alla filtyper.',
+ 'admin.fileTypesFormat':
+ 'Filändelser separerade med kommatecken (t.ex. jpg, png, pdf, doc). Använd * för att tillåta alla filtyper.',
'admin.fileTypesSaved': 'Inställningar för filtyper har sparats',
'admin.placesPhotos.title': 'Plats Foton',
'admin.placesPhotos.subtitle':
'Hämta bilder från Google Places API. Inaktivera för att spara API-kvoten. Wikimedia-bilder påverkas inte.',
'admin.placesAutocomplete.title': 'Automatisk komplettering av plats',
- 'admin.placesAutocomplete.subtitle': 'Använd Google Places API för sökförslag. Inaktivera funktionen för att spara på API-kvoten.',
+ 'admin.placesAutocomplete.subtitle':
+ 'Använd Google Places API för sökförslag. Inaktivera funktionen för att spara på API-kvoten.',
'admin.placesDetails.title': 'Platsinformation',
'admin.placesDetails.subtitle':
'Hämta detaljerad information om platsen (öppettider, betyg, webbplats) från Google Places API. Inaktivera funktionen för att spara på API-kvoten.',
@@ -169,7 +175,7 @@ const admin: TranslationStrings = {
'admin.collab.notes.subtitle': 'Delade noteringar och dokument',
'admin.collab.polls.title': 'Omröstningar',
'admin.collab.polls.subtitle': 'Grupp omröstningar',
- 'admin.collab.whatsnext.title': "Vad händer härnäst?",
+ 'admin.collab.whatsnext.title': 'Vad händer härnäst?',
'admin.collab.whatsnext.subtitle': 'Förslag på aktiviteter och nästa steg',
'admin.tabs.config': 'Anpassning',
'admin.tabs.defaults': 'Användarinställningar',
@@ -214,6 +220,11 @@ const admin: TranslationStrings = {
'admin.tabs.plugins': 'Plugins',
'admin.plugins.rescan': 'Skanna om',
'admin.plugins.rescanned': 'Plugin-mappen har skannats om',
+ 'admin.plugins.upload': 'Ladda upp plugin',
+ 'admin.plugins.dropToUpload': 'Släpp en plugin-.zip för att installera',
+ 'admin.plugins.uploaded': 'Pluginet “{name}” uppladdat — aktivera det för att köra',
+ 'admin.plugins.sideloaded': 'Manuellt laddad',
+ 'admin.plugins.sideloadedHint': 'Uppladdat manuellt — inte från registret, osignerat och ogranskat',
'admin.plugins.browse': 'Bläddra bland plugins',
'admin.plugins.installed': 'Installerat',
'admin.plugins.install': 'Installera',
@@ -228,11 +239,13 @@ const admin: TranslationStrings = {
'admin.plugins.noErrors': 'Inga fel loggade.',
'admin.plugins.uninstalled': 'Pluginet har avinstallerats',
'admin.plugins.uninstallTitle': 'Avinstallera pluginet?',
- 'admin.plugins.uninstallBody': 'Detta stoppar pluginet, tar bort dess kod och raderar alla dess data. Detta kan inte ångras.',
+ 'admin.plugins.uninstallBody':
+ 'Detta stoppar pluginet, tar bort dess kod och raderar alla dess data. Detta kan inte ångras.',
'admin.plugins.status.starting': 'Startar…',
'admin.plugins.type.widget': 'Widget',
'admin.plugins.type.page': 'Sida',
'admin.plugins.type.integration': 'Integration',
+ 'admin.plugins.type.trip-page': 'Ressida',
'admin.plugins.reviewed': 'Granskad',
'admin.plugins.unreviewed': 'Ej granskad',
'admin.plugins.updated': 'Pluginet har uppdaterats',
@@ -242,10 +255,12 @@ const admin: TranslationStrings = {
'admin.plugins.title': 'Plugins',
'admin.plugins.subtitle': 'Installera och hantera tredjepartsplugins på din instans.',
'admin.plugins.disabledTitle': 'Plugins är inaktiverade',
- 'admin.plugins.disabledBody': 'Plugin-körmiljön är avstängd (TREK_PLUGINS_ENABLED). Inga plugins kan köras förrän en administratör aktiverar den i serverkonfigurationen.',
+ 'admin.plugins.disabledBody':
+ 'Plugin-körmiljön är avstängd (TREK_PLUGINS_ENABLED). Inga plugins kan köras förrän en administratör aktiverar den i serverkonfigurationen.',
'admin.plugins.empty': 'Inga plugins installerade ännu.',
'admin.plugins.loadError': 'Kunde inte läsa in plugins.',
- 'admin.plugins.scaffoldNote': 'Installation och aktivering av plugins kommer i en senare uppdatering. Denna panel visar för närvarande endast installerade plugins.',
+ 'admin.plugins.scaffoldNote':
+ 'Installation och aktivering av plugins kommer i en senare uppdatering. Denna panel visar för närvarande endast installerade plugins.',
'admin.plugins.status.active': 'Aktivt',
'admin.plugins.status.inactive': 'Inaktivt',
'admin.plugins.status.disabled': 'Avstängt',
@@ -267,11 +282,31 @@ const admin: TranslationStrings = {
'admin.plugins.reviewedOn': 'Granskad {date}',
'admin.plugins.perm.db:own': 'Lagra sina egna data i en isolerad databas',
'admin.plugins.perm.db:read:trips': 'Läsa resor som den aktiva användaren har åtkomst till',
- 'admin.plugins.perm.db:read:users': 'Läsa grundläggande profilinformation (namn, avatar – aldrig inloggningsuppgifter)',
+ 'admin.plugins.perm.db:read:users':
+ 'Läsa grundläggande profilinformation (namn, avatar – aldrig inloggningsuppgifter)',
+ 'admin.plugins.perm.db:read:costs': 'Läsa kostnader (budgetposter) som den aktiva användaren har åtkomst till',
+ 'admin.plugins.perm.db:read:packing': 'Läsa packlistor för resor som den aktiva användaren har åtkomst till',
+ 'admin.plugins.perm.db:read:files': 'Läsa filer för resor som den aktiva användaren har åtkomst till',
+ 'admin.plugins.perm.db:write:costs': 'Skapa kostnader (budgetposter) på resor som den aktiva användaren kan redigera',
+ 'admin.plugins.perm.db:write:places':
+ 'Lägga till, redigera och ta bort platser på resor som den aktiva användaren kan redigera',
+ 'admin.plugins.perm.db:write:days':
+ 'Lägga till, redigera och ta bort dagar på resor som den aktiva användaren kan redigera',
+ 'admin.plugins.perm.db:write:itinerary':
+ 'Tilldela och ta bort platser på dagar i resor som den aktiva användaren kan redigera',
+ 'admin.plugins.perm.db:write:trips':
+ 'Redigera resedetaljer (titel, datum, valuta…) på resor som den aktiva användaren kan redigera',
+ 'admin.plugins.perm.db:meta':
+ 'Koppla egen privat data till resor, platser och dagar som den aktiva användaren har åtkomst till',
'admin.plugins.perm.ws:broadcast:trip': 'Skicka realtidsuppdateringar till resans medlemmar',
'admin.plugins.perm.ws:broadcast:user': 'Skicka realtidsuppdateringar till enskilda användare',
'admin.plugins.perm.hook:photo-provider': 'Tillhandahålla foton till Minnen',
'admin.plugins.perm.hook:calendar-source': 'Tillhandahålla händelser till kalendern',
+ 'admin.plugins.perm.hook:place-detail-provider':
+ 'Bidra med extra detaljer (recensioner, betyg, länkar) till en plats',
+ 'admin.plugins.perm.hook:trip-warning-provider': 'Visa valideringsvarningar på en resa (visas i planeraren)',
+ 'admin.plugins.perm.events:subscribe':
+ 'Reagera på grundläggande aktivitetshändelser (endast händelsenamn + resa, aldrig innehållet)',
'admin.plugins.perm.http:outbound': 'Göra utgående anrop till sina deklarerade värdar',
'admin.plugins.updateConsentTitle': 'Den här uppdateringen kräver nya behörigheter',
'admin.plugins.updateConsentBody':
@@ -280,7 +315,8 @@ const admin: TranslationStrings = {
'admin.plugins.updateNewEgress': 'Nya utgående anslutningar',
'admin.plugins.updateApprove': 'Godkänn och aktivera',
'admin.plugins.updateLater': 'Låt vara avstängd tills vidare',
- 'admin.plugins.updateKeptOff': 'Uppdateringen är installerad — förblir avstängd tills du godkänner de nya behörigheterna',
+ 'admin.plugins.updateKeptOff':
+ 'Uppdateringen är installerad — förblir avstängd tills du godkänner de nya behörigheterna',
'admin.plugins.reviewedMeaning':
'”Granskad” betyder att en TREK-underhållare har skannat pluginet efter skadlig kod i varje version — inte efter kvalitet eller om det fungerar. Det är ingen garanti för att ett plugin är ofarligt.',
'admin.plugins.security.title': 'Så här isoleras plugins — och gränserna för det',
@@ -323,11 +359,36 @@ const admin: TranslationStrings = {
'admin.plugins.restarted': 'Pluginet har startats om',
'admin.plugins.cap.readsTrips': 'Läser dina resor',
'admin.plugins.cap.readsUsers': 'Läser grundläggande profiler',
+ 'admin.plugins.cap.readsCosts': 'Läser dina kostnader',
+ 'admin.plugins.cap.readsPacking': 'Läser packlistor',
+ 'admin.plugins.cap.readsFiles': 'Läser resefiler',
+ 'admin.plugins.cap.writesCosts': 'Lägger till kostnader',
+ 'admin.plugins.cap.writesPlaces': 'Redigerar platser',
+ 'admin.plugins.cap.writesDays': 'Redigerar dagar',
+ 'admin.plugins.cap.writesItinerary': 'Redigerar resplan',
+ 'admin.plugins.cap.writesTrips': 'Redigerar resor',
+ 'admin.plugins.cap.metadata': 'Lägger till metadata',
'admin.plugins.cap.widget': 'Dashboard-widget',
'admin.plugins.cap.heroWidget': 'Boardingkort-widget',
+ 'admin.plugins.cap.placeSlot': 'Platsdetalj',
'admin.plugins.cap.realtime': 'Realtidsuppdateringar',
'admin.plugins.cap.photos': 'Tillhandahåller foton',
'admin.plugins.cap.calendar': 'Tillhandahåller kalenderhändelser',
+ 'admin.plugins.cap.placeDetails': 'Berikar platser',
+ 'admin.plugins.cap.warnings': 'Flaggar problem',
+ 'admin.plugins.cap.events': 'Reagerar på aktivitet',
+ 'admin.plugins.cap.requiresAddon': 'Kräver {addon}',
+ 'admin.plugins.cap.dependsOn': 'Kräver {id} {version}',
+ 'admin.plugins.dep.addonDisabledToast': 'Aktivera de nödvändiga tilläggen först: {addons}',
+ 'admin.plugins.dep.autoEnabled': 'Aktiverade nödvändiga plugin först: {plugins}',
+ 'admin.plugins.dep.downloaded': 'Laddade ner {id}',
+ 'admin.plugins.dep.resolveTitle': 'Saknade beroenden',
+ 'admin.plugins.dep.resolveBody': '”{name}” behöver dessa plugin installerade innan det kan aktiveras.',
+ 'admin.plugins.dep.requires': 'Kräver {version}',
+ 'admin.plugins.dep.mismatch': 'Kräver {wanted} — {installed} är installerad',
+ 'admin.plugins.dep.download': 'Ladda ner',
+ 'admin.plugins.dep.update': 'Uppdatera',
+ 'admin.plugins.dep.resolveHint': 'Laddar ner den senaste kompatibla versionen, inklusive dess egna beroenden.',
'admin.plugins.accessTitle': 'Vad det har åtkomst till',
'admin.plugins.connectsTitle': 'Ansluter till',
'admin.plugins.detailsTitle': 'Detaljer',
@@ -408,7 +469,8 @@ const admin: TranslationStrings = {
'admin.oauthSessions.revokeError': 'Kunde inte återkalla session',
'admin.oauthSessions.loadError': 'Kunde inte ladda OAuth sessions',
'admin.tabs.github': 'GitHub',
- 'admin.audit.subtitle': 'Säkerhetsrelaterade händelser och administrativa händelser (säkerhetskopieringar, användare, MFA, inställningar).',
+ 'admin.audit.subtitle':
+ 'Säkerhetsrelaterade händelser och administrativa händelser (säkerhetskopieringar, användare, MFA, inställningar).',
'admin.audit.empty': 'Inga revisionsposter ännu.',
'admin.audit.refresh': 'Uppdatera',
'admin.audit.loadMore': 'Ladda fler',
@@ -437,7 +499,8 @@ const admin: TranslationStrings = {
'admin.update.confirmTitle': 'Ska uppdateringen installeras?',
'admin.update.confirmText':
'TREK kommer att uppdateras från {current} till {version}. Servern startas om automatiskt därefter.',
- 'admin.update.dataInfo': 'Alla dina data (resor, användare, API-nycklar, uppladdningar, Vacay, Atlas, budgetar) kommer att bevaras.',
+ 'admin.update.dataInfo':
+ 'Alla dina data (resor, användare, API-nycklar, uppladdningar, Vacay, Atlas, budgetar) kommer att bevaras.',
'admin.update.warning': 'Appen kommer att vara tillfälligt otillgänglig under omstarten.',
'admin.update.confirm': 'Uppdatera nu',
'admin.update.installing': 'Uppdaterar…',
@@ -454,15 +517,15 @@ const admin: TranslationStrings = {
'admin.update.reloadHint': 'Vänligen uppdatera sidan om några sekunder.',
'admin.tabs.permissions': 'Behörigheter',
'admin.addons.catalog.journey.name': 'Journey',
- 'admin.addons.catalog.journey.description':
- 'Resespårning och resedagbok med incheckningar, foton och dagliga inlägg',
+ 'admin.addons.catalog.journey.description': 'Resespårning och resedagbok med incheckningar, foton och dagliga inlägg',
'admin.addons.catalog.collections.name': 'Samlingar',
'admin.addons.catalog.collections.description':
'Personligt platsbibliotek — spara platser mellan resor i namngivna listor, kopiera till valfri resa, dela med andra',
'admin.passkey.title': 'Inloggningsnyckel',
'admin.passkey.cardHint': 'Låter användare att logga in med inloggningsnyckel (WebAuthn). Avstängt som standard.',
'admin.passkey.login': 'Aktivera inloggningsnyckel',
- 'admin.passkey.loginHint': 'Visa alternativet ”Logga in med en inloggningsnyckel och låt användarna registrera inloggningsnycklar i sina inställningar.',
+ 'admin.passkey.loginHint':
+ 'Visa alternativet ”Logga in med en inloggningsnyckel och låt användarna registrera inloggningsnycklar i sina inställningar.',
'admin.passkey.notConfigured':
'Det finns ännu ingen WebAuthn-domän för denna distribution. Ange APP_URL eller Relying Party ID nedan – inloggningsnycklar förblir dolda tills dess.',
'admin.passkey.rpId': 'Relying Party ID (domain)',
@@ -473,7 +536,7 @@ const admin: TranslationStrings = {
'Fullständiga ursprungsadresser separerade med kommatecken, t.ex. https://trek.example.org. Lämna fältet tomt för att använda APP_URL.',
'admin.passkey.reset': 'Återställ inloggningsnycklar',
'admin.passkey.resetHint':
- "Ta bort alla den här användarens inloggningsnycklar (t.ex. om enheten har försvunnit). Användaren kan fortfarande logga in med sitt lösenord.",
+ 'Ta bort alla den här användarens inloggningsnycklar (t.ex. om enheten har försvunnit). Användaren kan fortfarande logga in med sitt lösenord.',
'admin.passkey.resetConfirm': 'Ta bort alla åtkomstnycklar för {name}?',
'admin.passkey.resetDone': 'Tog bort {count} inloggningsnycklar',
'admin.group.users': 'Users',
@@ -482,7 +545,8 @@ const admin: TranslationStrings = {
'admin.group.maintenance': 'Maintenance',
'admin.invite.tripLabel': 'Lägg till i resa (valfritt)',
'admin.invite.tripNone': 'Ingen resa',
- 'admin.invite.tripHint': 'Den nya användaren läggs automatiskt till i den här resan när de registrerar sig via länken.',
+ 'admin.invite.tripHint':
+ 'Den nya användaren läggs automatiskt till i den här resan när de registrerar sig via länken.',
'admin.invite.boundTo': 'läggs till i {trip}',
};
export default admin;
diff --git a/shared/src/i18n/sv/backup.ts b/shared/src/i18n/sv/backup.ts
index 8512ef781..c1b08536d 100644
--- a/shared/src/i18n/sv/backup.ts
+++ b/shared/src/i18n/sv/backup.ts
@@ -12,8 +12,10 @@ const backup: TranslationStrings = {
'backup.createFirst': 'Skapa den första säkerhetskopian',
'backup.download': 'Ladda ner',
'backup.restore': 'Återställ',
- 'backup.confirm.restore': 'Återställ säkerhetskopia "{name}"?\n\nAlla aktuella data kommer att ersättas med säkerhetskopian.',
- 'backup.confirm.uploadRestore': 'Ladda upp och återställ säkerhetskopian "{name}"?\n\nAlla befintliga data kommer att skrivas över.',
+ 'backup.confirm.restore':
+ 'Återställ säkerhetskopia "{name}"?\n\nAlla aktuella data kommer att ersättas med säkerhetskopian.',
+ 'backup.confirm.uploadRestore':
+ 'Ladda upp och återställ säkerhetskopian "{name}"?\n\nAlla befintliga data kommer att skrivas över.',
'backup.confirm.delete': 'Ta bort säkerhetskopia "{name}"?',
'backup.toast.loadError': 'Det gick inte att ladda säkerhetskopiorna',
'backup.toast.created': 'Säkerhetskopian har skapats',
diff --git a/shared/src/i18n/sv/budget.ts b/shared/src/i18n/sv/budget.ts
index a287402b0..dc0769e9f 100644
--- a/shared/src/i18n/sv/budget.ts
+++ b/shared/src/i18n/sv/budget.ts
@@ -42,22 +42,25 @@ const budget: TranslationStrings = {
'costs.youLower': 'du',
'costs.youOwe': 'Du är skyldig',
'costs.youOweSub': 'Du bör betala andra',
- 'costs.youreOwed': "Du är skyldig",
+ 'costs.youreOwed': 'Du är skyldig',
'costs.youreOwedSub': 'Andra borde betala dig',
'costs.totalSpend': 'Totala resekostnader',
'costs.totalSpendSub': 'Bland alla resenärer',
'costs.to': 'Till',
'costs.from': 'Från',
- 'costs.allSettled': "Allt är nu reglerat",
+ 'costs.allSettled': 'Allt är nu reglerat',
'costs.nothingOwed': 'Ingenting är skyldig dig',
'costs.yourShare': 'Din andel',
'costs.youPaid': 'Du betalade',
+ 'costs.outstanding': 'Utestående belopp',
+ 'costs.outstandingSub': 'Utgifter utan betalare än',
+ 'costs.outstandingItems': 'utgifter saknar betalare',
'costs.expenses': 'Kostnader',
'costs.entries': '{count} inlägg',
'costs.searchPlaceholder': 'Sök kostnader…',
'costs.filter.all': 'Alla',
'costs.filter.mine': 'Betalat av mig',
- 'costs.filter.owed': "Jag är skyldig",
+ 'costs.filter.owed': 'Jag är skyldig',
'costs.addExpense': 'Lägg till utgift',
'costs.editExpense': 'Redigera utgift',
'costs.noMatch': 'Inga utgifter stämmer överens med din sökning.',
@@ -69,7 +72,7 @@ const budget: TranslationStrings = {
'costs.youBorrowed': 'du lånade {amount}',
'costs.settleUp': 'Betala',
'costs.history': 'Historik',
- 'costs.everyoneSquare': "Alla är likadana",
+ 'costs.everyoneSquare': 'Alla är likadana',
'costs.nothingOutstanding': 'Det finns inga utestående betalningar just nu.',
'costs.pay': 'betala',
'costs.pays': 'betalar',
@@ -116,10 +119,10 @@ const budget: TranslationStrings = {
'costs.unfinishedHint': 'Endast totalt – ännu inte reglerat',
'costs.tapToInclude': 'Tryck för att inkludera',
'costs.amount': 'Summa',
- 'costs.split': "Split",
- 'costs.splitEqually': "Equally",
- 'costs.splitCustom': "Custom",
- 'costs.splitTicket': "Ticket",
+ 'costs.split': 'Split',
+ 'costs.splitEqually': 'Equally',
+ 'costs.splitCustom': 'Custom',
+ 'costs.splitTicket': 'Ticket',
'costs.filter.allCategories': 'Alla kategorier',
'costs.filter.allDays': 'Alla dagar',
'costs.expensesCount': '{count} utgifter',
diff --git a/shared/src/i18n/sv/collab.ts b/shared/src/i18n/sv/collab.ts
index ec5f78a3f..b1fa660ab 100644
--- a/shared/src/i18n/sv/collab.ts
+++ b/shared/src/i18n/sv/collab.ts
@@ -4,7 +4,7 @@ const collab: TranslationStrings = {
'collab.tabs.chat': 'Chatt',
'collab.tabs.notes': 'Noteringar',
'collab.tabs.polls': 'Omröstningar',
- 'collab.whatsNext.title': "Vad händer härnäst?",
+ 'collab.whatsNext.title': 'Vad händer härnäst?',
'collab.whatsNext.today': 'Idag',
'collab.whatsNext.tomorrow': 'I morgon',
'collab.whatsNext.empty': 'Inga kommande aktiviteter',
diff --git a/shared/src/i18n/sv/dashboard.ts b/shared/src/i18n/sv/dashboard.ts
index 70e426899..209e066dc 100644
--- a/shared/src/i18n/sv/dashboard.ts
+++ b/shared/src/i18n/sv/dashboard.ts
@@ -42,7 +42,7 @@ const dashboard: TranslationStrings = {
'dashboard.status.past': 'Tidigare',
'dashboard.status.daysLeft': '{count} dagar kvar',
'dashboard.toast.loadError': 'Det gick inte att ladda resor',
- 'dashboard.loadErrorBanner': "Det gick inte att ansluta till servern. Dina resor är säkra – försök igen.",
+ 'dashboard.loadErrorBanner': 'Det gick inte att ansluta till servern. Dina resor är säkra – försök igen.',
'dashboard.retry': 'Försök igen',
'dashboard.toast.created': 'Resan har skapats!',
'dashboard.toast.createError': 'Det gick inte att skapa resan',
@@ -65,7 +65,7 @@ const dashboard: TranslationStrings = {
'dashboard.confirm.copy.will4': 'Packlistor (okontrollerade)',
'dashboard.confirm.copy.will5': 'Uppgifter (ej tilldelade och ej avklarade)',
'dashboard.confirm.copy.will6': 'Dagliga anteckningar',
- 'dashboard.confirm.copy.wontCopy': "Kommer inte att kopieras",
+ 'dashboard.confirm.copy.wontCopy': 'Kommer inte att kopieras',
'dashboard.confirm.copy.wont1': 'Samarbetspartners och medlemmarnas uppdrag',
'dashboard.confirm.copy.wont2': 'Samarbetsanteckningar, omröstningar och meddelanden',
'dashboard.confirm.copy.wont3': 'Filer och foton',
diff --git a/shared/src/i18n/sv/dayplan.ts b/shared/src/i18n/sv/dayplan.ts
index 7561a2c39..0022be9d6 100644
--- a/shared/src/i18n/sv/dayplan.ts
+++ b/shared/src/i18n/sv/dayplan.ts
@@ -11,7 +11,8 @@ const dayplan: TranslationStrings = {
'dayplan.confirmDeleteNoteTitle': 'Ta bort notering?',
'dayplan.confirmDeleteNoteBody': 'Denna anteckning kommer att raderas permanent.',
'dayplan.cannotDropOnTimed': 'Objekt kan inte placeras mellan tidsbundna poster',
- 'dayplan.cannotBreakChronology': 'Detta skulle störa den kronologiska ordningen för tidsbestämda poster och bokningar',
+ 'dayplan.cannotBreakChronology':
+ 'Detta skulle störa den kronologiska ordningen för tidsbestämda poster och bokningar',
'dayplan.addNote': 'Lägg till notering',
'dayplan.expandAll': 'Expandera alla dagar',
'dayplan.collapseAll': 'Dölj alla dagar',
@@ -44,7 +45,7 @@ const dayplan: TranslationStrings = {
'dayplan.mobile.createNew': 'Skapa ny plats',
'dayplan.reorderDays': 'Sortera om dagar',
'dayplan.reorderTitle': 'Sortera om dagar',
- 'dayplan.reorderHint': "Dagens platser, anteckningar och bokningar följer med.",
+ 'dayplan.reorderHint': 'Dagens platser, anteckningar och bokningar följer med.',
'dayplan.addDay': 'Lägg till dag',
'dayplan.moveUp': 'Flytta upp',
'dayplan.moveDown': 'Flytta ner',
diff --git a/shared/src/i18n/sv/externalNotifications.ts b/shared/src/i18n/sv/externalNotifications.ts
index 0fd8c4126..268c55c96 100644
--- a/shared/src/i18n/sv/externalNotifications.ts
+++ b/shared/src/i18n/sv/externalNotifications.ts
@@ -59,7 +59,8 @@ const en: NotificationLocale = {
body: 'Vi har fått en begäran om att återställa lösenordet till ditt TREK konto. Klicka på knappen nedan för att ange ett nytt lösenord.',
ctaIntro: 'Återställ lösenord',
expiry: 'Den här länken upphör att gälla om 60 minuter.',
- ignore: "Om du inte har begärt detta kan du lugnt strunta i det här e-postmeddelandet – ditt lösenord kommer inte att ändras.",
+ ignore:
+ 'Om du inte har begärt detta kan du lugnt strunta i det här e-postmeddelandet – ditt lösenord kommer inte att ändras.',
},
};
diff --git a/shared/src/i18n/sv/help.ts b/shared/src/i18n/sv/help.ts
index 960189cec..5b263a152 100644
--- a/shared/src/i18n/sv/help.ts
+++ b/shared/src/i18n/sv/help.ts
@@ -2,12 +2,12 @@ import type { TranslationStrings } from '../types';
// English fallback until 'sv' is translated.
const help: TranslationStrings = {
- 'help.title': "Help & Docs",
- 'help.search': "Search docs…",
- 'help.contents': "Contents",
- 'help.noResults': "No matching pages.",
+ 'help.title': 'Help & Docs',
+ 'help.search': 'Search docs…',
+ 'help.contents': 'Contents',
+ 'help.noResults': 'No matching pages.',
'help.errorTitle': "Couldn't load this page",
- 'help.errorBody': "The help content is fetched from the TREK wiki. Check your connection and try again.",
+ 'help.errorBody': 'The help content is fetched from the TREK wiki. Check your connection and try again.',
};
export default help;
diff --git a/shared/src/i18n/sv/index.ts b/shared/src/i18n/sv/index.ts
index b9af5461f..eef4c74aa 100644
--- a/shared/src/i18n/sv/index.ts
+++ b/shared/src/i18n/sv/index.ts
@@ -5,11 +5,13 @@ import backup from './backup';
import budget from './budget';
import categories from './categories';
import collab from './collab';
+import collection from './collection';
import common from './common';
import dashboard from './dashboard';
import day from './day';
import dayplan from './dayplan';
import files from './files';
+import help from './help';
import inspector from './inspector';
import journey from './journey';
import login from './login';
@@ -39,8 +41,6 @@ import trip from './trip';
import trips from './trips';
import undo from './undo';
import vacay from './vacay';
-import collection from './collection';
-import help from './help';
const locale = {
...common,
diff --git a/shared/src/i18n/sv/journey.ts b/shared/src/i18n/sv/journey.ts
index 2856db615..23861b2e6 100644
--- a/shared/src/i18n/sv/journey.ts
+++ b/shared/src/i18n/sv/journey.ts
@@ -51,7 +51,7 @@ const journey: TranslationStrings = {
'journey.visibility.public': 'Offentlig',
'journey.emptyState.title': 'Din berättelse börjar här',
'journey.emptyState.subtitle': 'Checka in på en plats eller skriv ditt första dagboksinlägg',
- 'journey.frontpage.subtitle': "Förvandla dina resor till minnen du aldrig kommer att glömma",
+ 'journey.frontpage.subtitle': 'Förvandla dina resor till minnen du aldrig kommer att glömma',
'journey.frontpage.createJourney': 'Skapa Journey',
'journey.frontpage.activeJourney': 'Aktiv Journey',
'journey.frontpage.allJourneys': 'Alla Journeys',
@@ -204,7 +204,7 @@ const journey: TranslationStrings = {
'journey.photosUploadFailed': 'Några foton kunde inte laddas upp',
'journey.photosAdded': '{count} foton tillagd',
'journey.public.notFound': 'Hittades inte',
- 'journey.public.notFoundMessage': "Denna journey existerar inte eller länken har utgått.",
+ 'journey.public.notFoundMessage': 'Denna journey existerar inte eller länken har utgått.',
'journey.public.readOnly': 'Skrivskyddad · Offentlig Journey',
'journey.public.tagline': 'Reseresurser och upptäcktspaket',
'journey.public.sharedVia': 'Dela via',
diff --git a/shared/src/i18n/sv/login.ts b/shared/src/i18n/sv/login.ts
index 9d56a78e0..20b708371 100644
--- a/shared/src/i18n/sv/login.ts
+++ b/shared/src/i18n/sv/login.ts
@@ -3,7 +3,8 @@ import type { TranslationStrings } from '../types';
const login: TranslationStrings = {
'login.error': 'Inloggningen misslyckades. Kontrollera dina inloggningsuppgifter.',
'login.tagline': 'Dina resor.\nDin plan.',
- 'login.description': 'Planera resor tillsammans med hjälp av interaktiva kartor, budgetar och synkronisering i realtid.',
+ 'login.description':
+ 'Planera resor tillsammans med hjälp av interaktiva kartor, budgetar och synkronisering i realtid.',
'login.features.maps': 'Interaktiva kartor',
'login.features.mapsDesc': 'Google Places, rutter och klusterbildning',
'login.features.realtime': 'Synkronisering i realtid',
@@ -32,7 +33,7 @@ const login: TranslationStrings = {
'login.createAccount': 'Skapa konto',
'login.createAccountHint': 'Skapa ett nytt konto.',
'login.creating': 'Skapar…',
- 'login.noAccount': "Har du inget konto?",
+ 'login.noAccount': 'Har du inget konto?',
'login.hasAccount': 'Har du redan ett konto?',
'login.register': 'Registrera dig',
'login.emailPlaceholder': '[email protected]',
@@ -61,17 +62,17 @@ const login: TranslationStrings = {
'login.rememberMe': 'Kom ihåg mig',
'login.forgotPasswordTitle': 'Återställ ditt lösenord',
'login.forgotPasswordBody':
- "Ange den e-postadress du använde när du registrerade dig. Om det finns ett konto skickar vi en länk för att återställa lösenordet.",
+ 'Ange den e-postadress du använde när du registrerade dig. Om det finns ett konto skickar vi en länk för att återställa lösenordet.',
'login.forgotPasswordSubmit': 'Skicka återställningslänk',
'login.forgotPasswordSentTitle': 'Kolla din e-post',
'login.forgotPasswordSentBody':
'Om det finns ett konto kopplat till den e-postadressen är en återställningslänk på väg. Den går ut om 60 minuter.',
'login.forgotPasswordSmtpHintOff':
- "Observera: din administratör har inte konfigurerat SMTP, så återställningslänken kommer att skrivas ut på serverkonsolen istället för att skickas via e-post.",
+ 'Observera: din administratör har inte konfigurerat SMTP, så återställningslänken kommer att skrivas ut på serverkonsolen istället för att skickas via e-post.',
'login.backToLogin': 'Tillbaka till inloggningen',
'login.newPassword': 'Nytt lösenord',
'login.confirmPassword': 'Godkänn nytt lösenord',
- 'login.passwordsDontMatch': "Lösenorden matchar inte",
+ 'login.passwordsDontMatch': 'Lösenorden matchar inte',
'login.mfaCode': '2FA kod',
'login.resetPasswordTitle': 'Ange ett nytt lösenord',
'login.resetPasswordBody': 'Välj ett starkt lösenord som du inte har använt här tidigare. Minst 8 tecken.',
@@ -81,12 +82,14 @@ const login: TranslationStrings = {
'login.resetPasswordSuccessTitle': 'Lösenordet har uppdaterats',
'login.resetPasswordSuccessBody': 'Nu kan du logga in med ditt nya lösenord.',
'login.resetPasswordInvalidLink': 'Ogiltig återställningslänk',
- 'login.resetPasswordInvalidLinkBody': 'Den här länken saknas eller fungerar inte. Begär en ny för att kunna fortsätta.',
+ 'login.resetPasswordInvalidLinkBody':
+ 'Den här länken saknas eller fungerar inte. Begär en ny för att kunna fortsätta.',
'login.resetPasswordFailed': 'Återställningen misslyckades. Länken kan ha gått ut.',
'login.passkey.signIn': 'Logga in med en inloggningsnyckel',
'login.passkey.failed': 'Inloggningsnyckel misslyckades. Försök igen.',
'login.insecureCookie.title': "Login won't stick over HTTP",
- 'login.insecureCookie.body': "You’re connecting over plain HTTP, so your browser drops TREK’s secure session cookie — the next request fails with \"Access token required\". Fix: use HTTPS, or for a home-lab set COOKIE_SECURE=false.",
- 'login.insecureCookie.link': "Open the Troubleshooting guide",
+ 'login.insecureCookie.body':
+ 'You’re connecting over plain HTTP, so your browser drops TREK’s secure session cookie — the next request fails with "Access token required". Fix: use HTTPS, or for a home-lab set COOKIE_SECURE=false.',
+ 'login.insecureCookie.link': 'Open the Troubleshooting guide',
};
export default login;
diff --git a/shared/src/i18n/sv/members.ts b/shared/src/i18n/sv/members.ts
index 846c5bfac..1e0edfdf3 100644
--- a/shared/src/i18n/sv/members.ts
+++ b/shared/src/i18n/sv/members.ts
@@ -25,7 +25,8 @@ const members: TranslationStrings = {
'members.transferError': 'Det gick inte att överföra ägarskapet',
'members.guests': 'Gäster',
'members.guest': 'Gäst',
- 'members.guestsHint': 'Personer utan konto. De kan tilldelas kostnader, packning och uppgifter, men kan inte logga in.',
+ 'members.guestsHint':
+ 'Personer utan konto. De kan tilldelas kostnader, packning och uppgifter, men kan inte logga in.',
'members.addGuest': 'Lägg till gäst',
'members.guestNamePlaceholder': 'Gästens namn',
'members.guestAdded': 'Gäst tillagd',
diff --git a/shared/src/i18n/sv/memories.ts b/shared/src/i18n/sv/memories.ts
index a3afdfda8..758625e7c 100644
--- a/shared/src/i18n/sv/memories.ts
+++ b/shared/src/i18n/sv/memories.ts
@@ -3,12 +3,13 @@ import type { TranslationStrings } from '../types';
const memories: TranslationStrings = {
'memories.title': 'Foton',
'memories.notConnected': '{provider_name} inte ansluten',
- 'memories.notConnectedHint': 'Anslut din {provider_name} instans i inställningar för att kunna lägga till foton till denna resa.',
+ 'memories.notConnectedHint':
+ 'Anslut din {provider_name} instans i inställningar för att kunna lägga till foton till denna resa.',
'memories.notConnectedMultipleHint':
'Anslut någon av följande fotoleverantörer: {provider_names} i Inställningar för att kunna lägga till foton till den här resan.',
'memories.noDates': 'Ange datum för din resa för att ladda foton.',
'memories.noPhotos': 'Inga foton hittades',
- 'memories.noPhotosHint': "Inga foton hittades i {provider_name} för tidsperioden för denna resa.",
+ 'memories.noPhotosHint': 'Inga foton hittades i {provider_name} för tidsperioden för denna resa.',
'memories.photosFound': 'foton',
'memories.fromOthers': 'från andra',
'memories.sharePhotos': 'Dela foton',
diff --git a/shared/src/i18n/sv/notifications.ts b/shared/src/i18n/sv/notifications.ts
index 7c24973ce..1266253ae 100644
--- a/shared/src/i18n/sv/notifications.ts
+++ b/shared/src/i18n/sv/notifications.ts
@@ -6,7 +6,7 @@ const notifications: TranslationStrings = {
'notifications.deleteAll': 'Ta bort alla',
'notifications.showAll': 'Visa alla meddelanden',
'notifications.empty': 'Inga meddelanden',
- 'notifications.emptyDescription': "Nu är du helt uppdaterad!",
+ 'notifications.emptyDescription': 'Nu är du helt uppdaterad!',
'notifications.all': 'Alla',
'notifications.unreadOnly': 'Olästa',
'notifications.markRead': 'Markera som läst',
diff --git a/shared/src/i18n/sv/oauth.ts b/shared/src/i18n/sv/oauth.ts
index fa7f8d760..a38e46d4e 100644
--- a/shared/src/i18n/sv/oauth.ts
+++ b/shared/src/i18n/sv/oauth.ts
@@ -33,11 +33,14 @@ const oauth: TranslationStrings = {
'oauth.scope.packing:read.label': 'Visa packlistor',
'oauth.scope.packing:read.description': 'Läs om packningsföremål, väskor och kategoritilldelningar',
'oauth.scope.packing:write.label': 'Hantera packlistor',
- 'oauth.scope.packing:write.description': 'Lägg till, uppdatera, ta bort, växla mellan och ordna om packningsföremål och väskor',
+ 'oauth.scope.packing:write.description':
+ 'Lägg till, uppdatera, ta bort, växla mellan och ordna om packningsföremål och väskor',
'oauth.scope.todos:read.label': 'Visa uppgiftslistor',
- 'oauth.scope.todos:read.description': 'Läs uppgifter som ska göras under resan och vilka som är ansvariga för respektive kategori',
+ 'oauth.scope.todos:read.description':
+ 'Läs uppgifter som ska göras under resan och vilka som är ansvariga för respektive kategori',
'oauth.scope.todos:write.label': 'Hantera uppgiftslistor',
- 'oauth.scope.todos:write.description': 'Skapa, uppdatera, aktivera/inaktivera, ta bort och ändra ordningen på uppgifter',
+ 'oauth.scope.todos:write.description':
+ 'Skapa, uppdatera, aktivera/inaktivera, ta bort och ändra ordningen på uppgifter',
'oauth.scope.budget:read.label': 'Visa budget',
'oauth.scope.budget:read.description': 'Läs om budgetposter och kostnadsfördelning',
'oauth.scope.budget:write.label': 'Hantera budgeten',
@@ -49,7 +52,8 @@ const oauth: TranslationStrings = {
'oauth.scope.collab:read.label': 'Visa samarbete',
'oauth.scope.collab:read.description': 'Läs samarbetsanteckningar, omröstningar och meddelanden',
'oauth.scope.collab:write.label': 'Hantera samarbete',
- 'oauth.scope.collab:write.description': 'Skapa, uppdatera och ta bort samarbetsanteckningar, omröstningar och meddelanden',
+ 'oauth.scope.collab:write.description':
+ 'Skapa, uppdatera och ta bort samarbetsanteckningar, omröstningar och meddelanden',
'oauth.scope.notifications:read.label': 'Visa meddelanden',
'oauth.scope.notifications:read.description': 'Läsa meddelanden i appen och antalet olästa meddelanden',
'oauth.scope.notifications:write.label': 'Hantera aviseringar',
@@ -59,7 +63,8 @@ const oauth: TranslationStrings = {
'oauth.scope.vacay:write.label': 'Hantera semesterplaner',
'oauth.scope.vacay:write.description': 'Skapa och hantera semesterposter, helgdagar och teamplaner',
'oauth.scope.geo:read.label': 'Kartor och geokodning',
- 'oauth.scope.geo:read.description': 'Sök efter platser, omvandla kart-URL:er och utför omvänd geokodning av koordinater',
+ 'oauth.scope.geo:read.description':
+ 'Sök efter platser, omvandla kart-URL:er och utför omvänd geokodning av koordinater',
'oauth.scope.weather:read.label': 'Väderprognoser',
'oauth.scope.weather:read.description': 'Hämta väderprognoser för resmål och datum',
'oauth.scope.journey:read.label': 'Visa journeys',
@@ -86,6 +91,7 @@ const oauth: TranslationStrings = {
'oauth.authorize.permissionsRequested': 'Begärda behörigheter',
'oauth.authorize.alwaysIncluded': 'Ingår alltid',
'oauth.authorize.alwaysTool.listTrips': 'Lista dina resor så att AI:n kan identifiera resenummer',
- 'oauth.authorize.alwaysTool.getTripSummary': 'Läs en översikt över resan som krävs för att kunna använda något annat verktyg',
+ 'oauth.authorize.alwaysTool.getTripSummary':
+ 'Läs en översikt över resan som krävs för att kunna använda något annat verktyg',
};
export default oauth;
diff --git a/shared/src/i18n/sv/packing.ts b/shared/src/i18n/sv/packing.ts
index a1d13dc61..d919aff1a 100644
--- a/shared/src/i18n/sv/packing.ts
+++ b/shared/src/i18n/sv/packing.ts
@@ -5,8 +5,7 @@ const packing: TranslationStrings = {
'packing.empty': 'Packlistan är tom',
'packing.import': 'Importera',
'packing.importTitle': 'Importera packlista',
- 'packing.importHint':
- 'Ett föremål per rad. Format: Kategori, Namn, Vikt i g (valfritt), Påse (valfritt)',
+ 'packing.importHint': 'Ett föremål per rad. Format: Kategori, Namn, Vikt i g (valfritt), Påse (valfritt)',
'packing.importPlaceholder':
'Hygiene, tandborste\nKläder, T-shirts, 200\nDokument, pass, handbagage\nElektronik, laddare, 50, resväska',
'packing.importCsv': 'Ladda CSV/TXT',
diff --git a/shared/src/i18n/sv/places.ts b/shared/src/i18n/sv/places.ts
index b7839c83d..99d4403d7 100644
--- a/shared/src/i18n/sv/places.ts
+++ b/shared/src/i18n/sv/places.ts
@@ -24,8 +24,8 @@ const places: TranslationStrings = {
'places.kmlImportNoneSelected': 'Välj minst en typ att importera.',
'places.selectionCount': '{count} markerade',
'places.deleteSelected': 'Ta bort det markerade',
- 'places.changeCategory': "Change category",
- 'places.categoryChanged': "{count} places updated",
+ 'places.changeCategory': 'Change category',
+ 'places.categoryChanged': '{count} places updated',
'places.kmlKmzImported': '{count} platser som importerats från KMZ/KML',
'places.urlResolved': 'Plats importerad från URL',
'places.importList': 'Importera lista',
diff --git a/shared/src/i18n/sv/reservations.ts b/shared/src/i18n/sv/reservations.ts
index b5770ba13..bb0f0021c 100644
--- a/shared/src/i18n/sv/reservations.ts
+++ b/shared/src/i18n/sv/reservations.ts
@@ -6,7 +6,8 @@ const reservations: TranslationStrings = {
'reservations.emptyHint': 'Lägg till bokningar av flyg, hotell och annat',
'reservations.add': 'Lägg till bokning',
'reservations.addManual': 'Manuell bokning',
- 'reservations.placeHint': 'Tips: Det är bäst att göra bokningar direkt från en plats för att koppla dem till din dagsplan.',
+ 'reservations.placeHint':
+ 'Tips: Det är bäst att göra bokningar direkt från en plats för att koppla dem till din dagsplan.',
'reservations.confirmed': 'Bekräftat',
'reservations.pending': 'Väntar på beslut',
'reservations.summary': '{confirmed} bekräftat, {pending} väntar på beslut',
@@ -126,7 +127,8 @@ const reservations: TranslationStrings = {
'reservations.import.cta': 'Importera från fil',
'reservations.import.dropHere': 'Dra och släpp bokningsbekräftelser här, eller klicka för att välja',
'reservations.import.dropActive': 'Dra och släpp filerna som ska importeras',
- 'reservations.import.acceptedFormats': 'Godkända filformat: EML, PDF, PKPass, HTML, TXT (högst 10 MB per fil, upp till 5 filer)',
+ 'reservations.import.acceptedFormats':
+ 'Godkända filformat: EML, PDF, PKPass, HTML, TXT (högst 10 MB per fil, upp till 5 filer)',
'reservations.import.parsing': 'Analyserar filer…',
'reservations.import.previewHeading': '{count} reservation(er) hittades',
'reservations.import.previewEmpty': 'Inga bokningar kunde extraheras från de uppladdade filerna.',
diff --git a/shared/src/i18n/sv/settings.ts b/shared/src/i18n/sv/settings.ts
index 07288e0cb..ca351e30e 100644
--- a/shared/src/i18n/sv/settings.ts
+++ b/shared/src/i18n/sv/settings.ts
@@ -22,7 +22,8 @@ const settings: TranslationStrings = {
'settings.mapMapboxSubtitle': 'Vektorplattor, 3D-byggnader och terräng',
'settings.mapMapLibreSubtitle': 'OpenFreeMap-vektorplattor, ingen token',
'settings.mapOpenFreeMapStylePlaceholder': 'Välj en OpenFreeMap-stil',
- 'settings.mapOpenFreeMapStyleHint': 'Förinställning eller OpenFreeMap-stil-URL. OpenFreeMap-stilar fungerar utan token.',
+ 'settings.mapOpenFreeMapStyleHint':
+ 'Förinställning eller OpenFreeMap-stil-URL. OpenFreeMap-stilar fungerar utan token.',
'settings.mapExperimental': 'Experimentell',
'settings.mapMapboxToken': 'Mapbox-åtkomsttoken',
'settings.mapMapboxTokenHint': 'Offentlig token (pk.*) från',
@@ -31,7 +32,8 @@ const settings: TranslationStrings = {
'settings.mapStylePlaceholder': 'Välj en Mapbox-stil',
'settings.mapStyleHint': 'Förinställda eller egna mapbox://styles/USER/ID länk',
'settings.map3dBuildings': '3D-byggnader och terräng',
- 'settings.map3dHint': 'Vinkel + verklighetstrogna 3D-byggnadsextrusioner — fungerar för alla stilar, inklusive satellitstil.',
+ 'settings.map3dHint':
+ 'Vinkel + verklighetstrogna 3D-byggnadsextrusioner — fungerar för alla stilar, inklusive satellitstil.',
'settings.mapHighQuality': 'Högkvalitetsläge',
'settings.mapHighQualityHint': 'Antialiasing + globprojektion för skarpare kanter och en realistisk världsbild.',
'settings.mapHighQualityWarning': 'Kan påverka prestandan på enheter i lägre enheter.',
@@ -59,7 +61,8 @@ const settings: TranslationStrings = {
'settings.distance': 'Avståndsenhet',
'settings.timeFormat': 'Tidsformat',
'settings.bookingLabels': 'Etiketter för bokningsrutter',
- 'settings.bookingLabelsHint': 'Visa stations- och flygplatsnamn på kartan. När funktionen är avstängd visas endast ikonen.',
+ 'settings.bookingLabelsHint':
+ 'Visa stations- och flygplatsnamn på kartan. När funktionen är avstängd visas endast ikonen.',
'settings.aiAlwaysRetry': 'Försök alltid importera bokningar med AI',
'settings.aiAlwaysRetryHint': 'När en fil inte kan läsas av standardtolken görs ett nytt försök automatiskt med AI.',
'settings.mapPoiPill': 'Utforska platser på kartan',
@@ -174,7 +177,8 @@ const settings: TranslationStrings = {
'settings.oauth.modal.clientNamePlaceholder': 't.ex. Claude Web, Min MCP App',
'settings.oauth.modal.redirectUris': 'Omdirigerings-URI:er',
'settings.oauth.modal.redirectUrisPlaceholder': 'https://din-app.com/callback\nhttps://din-app.com/auth',
- 'settings.oauth.modal.redirectUrisHint': 'En URI per rad. HTTPS krävs (med undantag för localhost). Exakt matchning krävs.',
+ 'settings.oauth.modal.redirectUrisHint':
+ 'En URI per rad. HTTPS krävs (med undantag för localhost). Exakt matchning krävs.',
'settings.oauth.modal.scopes': 'Tillåtna tillämpningsområden',
'settings.oauth.modal.scopesHint':
'list_trips och get_trip_summary är alltid tillgängliga – inget tillämpningsområden krävs. De gör det möjligt för AI:n att hämta de res-ID:n som behövs för att använda andra verktyg.',
@@ -183,7 +187,8 @@ const settings: TranslationStrings = {
'settings.oauth.modal.creating': 'Registrerar...',
'settings.oauth.modal.create': 'Registrerar klient',
'settings.oauth.modal.createdTitle': 'Klient registrerad',
- 'settings.oauth.modal.createdWarning': 'Klienthemligheten visas endast en gång. Kopiera den nu – den går inte att återställa.',
+ 'settings.oauth.modal.createdWarning':
+ 'Klienthemligheten visas endast en gång. Kopiera den nu – den går inte att återställa.',
'settings.oauth.toast.createError': 'Det gick inte att registrera OAuth-klienten',
'settings.oauth.toast.deleted': 'OAuth-klienten har tagits bort',
'settings.oauth.toast.deleteError': 'Det gick inte att ta bort OAuth-klienten',
@@ -206,7 +211,7 @@ const settings: TranslationStrings = {
'settings.about.supporters.badge': 'Månatliga bidragsgivare',
'settings.about.supporters.title': 'Resekompisar för TREK',
'settings.about.supporters.subtitle':
- "Medan du planerar din nästa rutt bidrar dessa personer till att forma TREK:s framtid. Deras månatliga bidrag går direkt till utveckling och faktisk arbetstid – så att TREK förblir öppen källkod.",
+ 'Medan du planerar din nästa rutt bidrar dessa personer till att forma TREK:s framtid. Deras månatliga bidrag går direkt till utveckling och faktisk arbetstid – så att TREK förblir öppen källkod.',
'settings.about.supporters.since': 'bidragsgivare sedan {date}',
'settings.about.supporters.tierEmpty': 'Var först',
'settings.about.supporter.tier.noReturnTicket': 'Ingen returbiljett',
@@ -234,8 +239,7 @@ const settings: TranslationStrings = {
'settings.passwordMismatch': 'Lösenorden stämmer inte överens',
'settings.passwordWeak': 'Lösenordet måste innehålla versaler, gemener, en siffra och ett specialtecken',
'settings.passwordChanged': 'Lösenordet har ändrats',
- 'settings.mustChangePassword':
- 'Du måste byta lösenord innan du kan fortsätta. Välj ett nytt lösenord nedan.',
+ 'settings.mustChangePassword': 'Du måste byta lösenord innan du kan fortsätta. Välj ett nytt lösenord nedan.',
'settings.deleteAccount': 'Ta bort konto',
'settings.deleteAccountTitle': 'Ta bort ditt konto?',
'settings.deleteAccountWarning':
@@ -261,7 +265,8 @@ const settings: TranslationStrings = {
'settings.mfa.requiredByPolicy':
'Din administratör kräver tvåfaktorsautentisering. Konfigurera en autentiseringsapp nedan innan du fortsätter.',
'settings.mfa.backupTitle': 'Säkerhetskoder',
- 'settings.mfa.backupDescription': 'Använd dessa engångskoder för säkerhetskopiering om du förlorar åtkomsten till din autentiseringsapp.',
+ 'settings.mfa.backupDescription':
+ 'Använd dessa engångskoder för säkerhetskopiering om du förlorar åtkomsten till din autentiseringsapp.',
'settings.mfa.backupWarning': 'Spara dessa koder nu. Varje kod kan endast användas en gång.',
'settings.mfa.backupCopy': 'Copy codes',
'settings.mfa.backupDownload': 'Ladda ner TXT',
@@ -337,7 +342,8 @@ const settings: TranslationStrings = {
'settings.aiParsing.apiKey': 'API-nyckel',
'settings.aiParsing.apiKeyHint': 'Lagras krypterad. Lämna tomt för att behålla den nuvarande nyckeln.',
'settings.aiParsing.multimodal': 'Skicka dokument som bilder',
- 'settings.aiParsing.multimodalHint': 'För modeller med bildstöd — skickar original-PDF:en istället för extraherad text.',
+ 'settings.aiParsing.multimodalHint':
+ 'För modeller med bildstöd — skickar original-PDF:en istället för extraherad text.',
'settings.aiParsing.toast.saved': 'AI-inställningar sparade',
'settings.aiParsing.toast.saveError': 'Kunde inte spara AI-inställningarna',
'settings.tabs.appearance': 'Appearance',
@@ -356,7 +362,8 @@ const settings: TranslationStrings = {
'settings.appearance.contrastLow': 'Low contrast',
'settings.appearance.readability': 'Readability',
'settings.appearance.transparency': 'Transparency',
- 'settings.appearance.transparencyHint': 'Glassy translucent surfaces. Turn off for solid, higher-contrast backgrounds.',
+ 'settings.appearance.transparencyHint':
+ 'Glassy translucent surfaces. Turn off for solid, higher-contrast backgrounds.',
'settings.appearance.reduceMotion': 'Reduce motion',
'settings.appearance.reduceMotionHint': 'Minimize animations and transitions.',
'settings.appearance.density': 'Density',
@@ -386,7 +393,8 @@ const settings: TranslationStrings = {
'settings.appearance.group.belowHero': 'Below the hero',
'settings.appearance.group.bottomOfPage': 'Bottom of page',
'settings.appearance.sidebarHint': 'The whole right column. Turn off and the dashboard centers.',
- 'settings.appearance.densityHint': 'Compact tightens spacing and padding for a denser layout that fits more on screen.',
+ 'settings.appearance.densityHint':
+ 'Compact tightens spacing and padding for a denser layout that fits more on screen.',
'settings.appearance.textSizeAll': 'Everything',
'settings.appearance.perSize': 'Adjust each size separately',
'settings.appearance.size.large': 'Large',
@@ -409,10 +417,12 @@ const settings: TranslationStrings = {
'settings.offline.cache.title': 'Offline-cache',
'settings.offline.mode.title': 'Offlineläge',
'settings.offline.mode.force': 'Tvinga offlineläge',
- 'settings.offline.mode.forceHint': 'Arbeta endast med cachelagrade data och köa dina ändringar. Stäng av för att återansluta och synkronisera.',
+ 'settings.offline.mode.forceHint':
+ 'Arbeta endast med cachelagrade data och köa dina ändringar. Stäng av för att återansluta och synkronisera.',
'settings.offline.mode.active': 'Offlineläget är på — dina ändringar köas och synkroniseras när du stänger av det.',
'settings.offline.prepare.title': 'Förbered för offline',
- 'settings.offline.prepare.hint': 'Ladda ner allt du behöver — resdata, dokument och kartrutor — innan du förlorar anslutningen.',
+ 'settings.offline.prepare.hint':
+ 'Ladda ner allt du behöver — resdata, dokument och kartrutor — innan du förlorar anslutningen.',
'settings.offline.prepare.button': 'Ladda ner för offlineanvändning',
'settings.offline.prepare.running': 'Laddar ner…',
'settings.offline.prepare.done': 'Klar för offlineanvändning',
@@ -423,7 +433,8 @@ const settings: TranslationStrings = {
'settings.offline.resyncing': 'Synkroniserar…',
'settings.offline.storage.title': 'Vad som ska lagras offline',
'settings.offline.storage.tiles': 'Lagra kartrutor offline',
- 'settings.offline.storage.tilesHint': 'Kartrutor använder mest lagringsutrymme. Stäng av detta för att endast behålla resdata och dokument offline.',
+ 'settings.offline.storage.tilesHint':
+ 'Kartrutor använder mest lagringsutrymme. Stäng av detta för att endast behålla resdata och dokument offline.',
'settings.offline.storage.tripsTitle': 'Resor',
'settings.offline.storage.tripOn': 'Lagrad offline',
'settings.offline.storage.tripOff': 'Inte lagrad',
@@ -436,7 +447,8 @@ const settings: TranslationStrings = {
'settings.offline.empty': 'Inga resor har cachelagrats ännu. Anslut till internet för att synkronisera.',
'settings.offline.loading': 'Laddar…',
'settings.offline.conflicts.title': 'Synkroniseringskonflikter',
- 'settings.offline.conflicts.hint': 'Ändringar du gjorde offline krockar med nyare ändringar på servern. Välj vilken version du vill behålla.',
+ 'settings.offline.conflicts.hint':
+ 'Ändringar du gjorde offline krockar med nyare ändringar på servern. Välj vilken version du vill behålla.',
'settings.offline.conflicts.keepMine': 'Behåll mina',
'settings.offline.conflicts.keepServer': 'Behåll deras',
'settings.offline.conflicts.mine': 'Din version',
diff --git a/shared/src/i18n/sv/system_notice.ts b/shared/src/i18n/sv/system_notice.ts
index c6ef3b32c..eb6ea8fa3 100644
--- a/shared/src/i18n/sv/system_notice.ts
+++ b/shared/src/i18n/sv/system_notice.ts
@@ -27,7 +27,7 @@ const system_notice: TranslationStrings = {
'system_notice.v3_mcp.highlight_tools': 'Utökad verktygslåda och uppmaningar',
'system_notice.v3_thankyou.title': 'Ett personligt meddelande från mig',
'system_notice.v3_thankyou.body':
- "Innan du går – vill jag ta en stund.\n\nTREK började som ett sidoprojekt som jag skapade för mina egna resor. Jag hade aldrig kunnat föreställa mig att det skulle växa till något som 4 000 av er nu litar på för att planera era äventyr. Varje stjärna, varje problem, varje önskemål om funktioner – jag läser dem alla, och de är det som håller mig igång under sena nätter mellan mitt heltidsjobb och universitetet.\n\nJag vill att ni ska veta: TREK kommer alltid att vara öppen källkod, alltid självhostat, alltid ert. Ingen spårning, inga prenumerationer, inga förbehåll. Bara ett verktyg skapat av någon som älskar att resa lika mycket som ni.\n\nEtt särskilt tack till [jubnl](https://github.com/jubnl) – du har blivit en fantastisk samarbetspartner. Så mycket av det som gör 3.0 så bra bär dina avtryck. Tack för att du trodde på det här projektet när det fortfarande var lite ojämnt i kanterna.\n\nOch till var och en av er som rapporterade ett fel, översatte en sträng, delade TREK med en vän eller helt enkelt använde det för att planera en resa – **tack**. Ni är anledningen till att det här finns.\n\nSkål för många fler äventyr tillsammans.\n\n— Maurice\n\n---\n\n[Gå med i communityn på Discord](https://discord.gg/7Q6M6jDwzf)\n\nOm TREK gör dina resor bättre, så håller en [liten kaffe](https://ko-fi.com/mauriceboe) alltid lamporna tända.",
+ 'Innan du går – vill jag ta en stund.\n\nTREK började som ett sidoprojekt som jag skapade för mina egna resor. Jag hade aldrig kunnat föreställa mig att det skulle växa till något som 4 000 av er nu litar på för att planera era äventyr. Varje stjärna, varje problem, varje önskemål om funktioner – jag läser dem alla, och de är det som håller mig igång under sena nätter mellan mitt heltidsjobb och universitetet.\n\nJag vill att ni ska veta: TREK kommer alltid att vara öppen källkod, alltid självhostat, alltid ert. Ingen spårning, inga prenumerationer, inga förbehåll. Bara ett verktyg skapat av någon som älskar att resa lika mycket som ni.\n\nEtt särskilt tack till [jubnl](https://github.com/jubnl) – du har blivit en fantastisk samarbetspartner. Så mycket av det som gör 3.0 så bra bär dina avtryck. Tack för att du trodde på det här projektet när det fortfarande var lite ojämnt i kanterna.\n\nOch till var och en av er som rapporterade ett fel, översatte en sträng, delade TREK med en vän eller helt enkelt använde det för att planera en resa – **tack**. Ni är anledningen till att det här finns.\n\nSkål för många fler äventyr tillsammans.\n\n— Maurice\n\n---\n\n[Gå med i communityn på Discord](https://discord.gg/7Q6M6jDwzf)\n\nOm TREK gör dina resor bättre, så håller en [liten kaffe](https://ko-fi.com/mauriceboe) alltid lamporna tända.',
'system_notice.v3014_whitespace_collision.title': 'Åtgärd krävs: konflikt mellan användarkonton',
'system_notice.v3014_whitespace_collision.body':
'Uppgraderingen till version 3.0.14 upptäckte en eller flera konflikter mellan användarnamn eller e-postadresser som orsakades av blanksteg i början eller slutet av lagrade konton. De berörda kontona döptes om automatiskt. Kontrollera serverloggarna efter rader som börjar med **[migration] WHITESPACE COLLISION** för att identifiera vilka konton som behöver granskas.',
diff --git a/shared/src/i18n/sv/trip.ts b/shared/src/i18n/sv/trip.ts
index 3d95bd6bf..c39846018 100644
--- a/shared/src/i18n/sv/trip.ts
+++ b/shared/src/i18n/sv/trip.ts
@@ -28,7 +28,8 @@ const trip: TranslationStrings = {
'trip.confirm.deletePlaces': 'Radera {count} platser?',
'trip.toast.placesDeleted': '{count} platser raderade',
'trip.invite.linkTitle': 'Inbjudningslänk till resa',
- 'trip.invite.linkHint': 'Alla med ett TREK-konto som öppnar den här länken går med i resan som medlem. Skapa en ny länk för att ogiltigförklara den gamla.',
+ 'trip.invite.linkHint':
+ 'Alla med ett TREK-konto som öppnar den här länken går med i resan som medlem. Skapa en ny länk för att ogiltigförklara den gamla.',
'trip.invite.create': 'Skapa inbjudningslänk',
'trip.invite.regenerate': 'Skapa ny',
'trip.invite.disable': 'Inaktivera',
diff --git a/shared/src/i18n/sv/trips.ts b/shared/src/i18n/sv/trips.ts
index c4ddd337a..13761163a 100644
--- a/shared/src/i18n/sv/trips.ts
+++ b/shared/src/i18n/sv/trips.ts
@@ -11,6 +11,7 @@ const trips: TranslationStrings = {
'trips.reminderDays': 'dagar',
'trips.reminderCustom': 'Anpassad',
'trips.reminderDaysBefore': 'dagar innan avresa',
- 'trips.reminderDisabledHint': 'Resepåminnelser är inaktiverade. Aktivera dem under Admin > Inställningar > Meddelanden.',
+ 'trips.reminderDisabledHint':
+ 'Resepåminnelser är inaktiverade. Aktivera dem under Admin > Inställningar > Meddelanden.',
};
export default trips;
diff --git a/shared/src/i18n/sv/undo.ts b/shared/src/i18n/sv/undo.ts
index 611fac0fc..1d97995a0 100644
--- a/shared/src/i18n/sv/undo.ts
+++ b/shared/src/i18n/sv/undo.ts
@@ -9,7 +9,7 @@ const undo: TranslationStrings = {
'undo.optimize': 'Rutt optimerad',
'undo.deletePlace': 'Plats borttagen',
'undo.deletePlaces': 'Platser borttagna',
- 'undo.changeCategory': "Category changed",
+ 'undo.changeCategory': 'Category changed',
'undo.moveDay': 'Plats har flyttats till en annan dag',
'undo.lock': 'Plats lås växlad',
'undo.importGpx': 'GPX importering',
diff --git a/shared/src/i18n/tr/admin.ts b/shared/src/i18n/tr/admin.ts
index 467cb2007..0d72828c1 100644
--- a/shared/src/i18n/tr/admin.ts
+++ b/shared/src/i18n/tr/admin.ts
@@ -138,6 +138,8 @@ const admin: TranslationStrings = {
'admin.recommended': 'Tavsiye edilen',
'admin.weatherKey': 'OpenWeatherMap API Anahtarı',
'admin.weatherKeyHint': "Hava durumu verileri için. openweathermap.org'da ücretsiz",
+ 'admin.unsplashKey': 'Unsplash API Anahtarı',
+ 'admin.unsplashKeyHint': "Görsel araması için. unsplash.com/developers'da ücretsiz",
'admin.validateKey': 'Test et',
'admin.keyValid': 'Bağlı',
'admin.keyInvalid': 'Geçersiz',
@@ -206,6 +208,11 @@ const admin: TranslationStrings = {
'admin.tabs.plugins': 'Plugins',
'admin.plugins.rescan': 'Yeniden tara',
'admin.plugins.rescanned': 'Eklenti klasörü yeniden tarandı',
+ 'admin.plugins.upload': 'Eklenti yükle',
+ 'admin.plugins.dropToUpload': 'Yüklemek için bir eklenti .zip dosyası bırakın',
+ 'admin.plugins.uploaded': '“{name}” eklentisi yüklendi — çalıştırmak için etkinleştirin',
+ 'admin.plugins.sideloaded': 'Elle yüklendi',
+ 'admin.plugins.sideloadedHint': 'Elle yüklendi — dizinden değil, imzasız ve incelenmemiş',
'admin.plugins.browse': 'Eklentilere göz at',
'admin.plugins.installed': 'Yüklü',
'admin.plugins.install': 'Yükle',
@@ -220,11 +227,13 @@ const admin: TranslationStrings = {
'admin.plugins.noErrors': 'Kayıtlı hata yok.',
'admin.plugins.uninstalled': 'Eklenti kaldırıldı',
'admin.plugins.uninstallTitle': 'Eklenti kaldırılsın mı?',
- 'admin.plugins.uninstallBody': 'Bu, eklentiyi durdurur, kodunu kaldırır ve tüm verilerini siler. Bu işlem geri alınamaz.',
+ 'admin.plugins.uninstallBody':
+ 'Bu, eklentiyi durdurur, kodunu kaldırır ve tüm verilerini siler. Bu işlem geri alınamaz.',
'admin.plugins.status.starting': 'Başlatılıyor…',
'admin.plugins.type.widget': 'Widget',
'admin.plugins.type.page': 'Sayfa',
'admin.plugins.type.integration': 'Entegrasyon',
+ 'admin.plugins.type.trip-page': 'Gezi sayfası',
'admin.plugins.reviewed': 'İncelendi',
'admin.plugins.unreviewed': 'İncelenmedi',
'admin.plugins.updated': 'Eklenti güncellendi',
@@ -234,10 +243,12 @@ const admin: TranslationStrings = {
'admin.plugins.title': 'Plugins',
'admin.plugins.subtitle': 'Örneğinizde üçüncü taraf eklentileri yükleyin ve yönetin.',
'admin.plugins.disabledTitle': 'Eklentiler devre dışı',
- 'admin.plugins.disabledBody': 'Eklenti çalışma zamanı kapalı (TREK_PLUGINS_ENABLED). Bir yönetici sunucu yapılandırmasında etkinleştirene kadar hiçbir eklenti çalışamaz.',
+ 'admin.plugins.disabledBody':
+ 'Eklenti çalışma zamanı kapalı (TREK_PLUGINS_ENABLED). Bir yönetici sunucu yapılandırmasında etkinleştirene kadar hiçbir eklenti çalışamaz.',
'admin.plugins.empty': 'Henüz eklenti yüklenmedi.',
'admin.plugins.loadError': 'Eklentiler yüklenemedi.',
- 'admin.plugins.scaffoldNote': 'Eklenti yükleme ve etkinleştirme daha sonraki bir güncellemede gelecek. Bu panel şu anda yalnızca yüklü eklentileri listeler.',
+ 'admin.plugins.scaffoldNote':
+ 'Eklenti yükleme ve etkinleştirme daha sonraki bir güncellemede gelecek. Bu panel şu anda yalnızca yüklü eklentileri listeler.',
'admin.plugins.status.active': 'Aktif',
'admin.plugins.status.inactive': 'Pasif',
'admin.plugins.status.disabled': 'Devre dışı',
@@ -260,10 +271,30 @@ const admin: TranslationStrings = {
'admin.plugins.perm.db:own': 'Kendi verilerini yalıtılmış bir veritabanında saklar',
'admin.plugins.perm.db:read:trips': 'İşlemi yapan kullanıcının erişebildiği seyahatleri okur',
'admin.plugins.perm.db:read:users': 'Temel profil bilgilerini okur (ad, avatar — asla kimlik bilgileri değil)',
+ 'admin.plugins.perm.db:read:costs': 'İşlemi yapan kullanıcının erişebildiği harcamaları (bütçe kalemleri) okur',
+ 'admin.plugins.perm.db:read:packing': 'İşlemi yapan kullanıcının erişebildiği seyahatlerin eşya listelerini okur',
+ 'admin.plugins.perm.db:read:files': 'İşlemi yapan kullanıcının erişebildiği seyahatlerin dosyalarını okur',
+ 'admin.plugins.perm.db:write:costs':
+ 'İşlemi yapan kullanıcının düzenleyebildiği seyahatlerde harcamalar (bütçe kalemleri) oluşturur',
+ 'admin.plugins.perm.db:write:places':
+ 'İşlemi yapan kullanıcının düzenleyebildiği seyahatlerde yerler ekler, düzenler ve kaldırır',
+ 'admin.plugins.perm.db:write:days':
+ 'İşlemi yapan kullanıcının düzenleyebildiği seyahatlerde günler ekler, düzenler ve kaldırır',
+ 'admin.plugins.perm.db:write:itinerary':
+ 'İşlemi yapan kullanıcının düzenleyebildiği seyahatlerin günlerine yerler atar ve kaldırır',
+ 'admin.plugins.perm.db:write:trips':
+ 'İşlemi yapan kullanıcının düzenleyebildiği seyahatlerin ayrıntılarını (başlık, tarihler, para birimi…) düzenler',
+ 'admin.plugins.perm.db:meta':
+ 'İşlemi yapan kullanıcının erişebildiği seyahatlere, yerlere ve günlere kendi özel verilerini ekler',
'admin.plugins.perm.ws:broadcast:trip': 'Seyahat üyelerine gerçek zamanlı güncellemeler gönderir',
'admin.plugins.perm.ws:broadcast:user': 'Tek tek kullanıcılara gerçek zamanlı güncellemeler gönderir',
'admin.plugins.perm.hook:photo-provider': 'Fotoğraflar bölümüne fotoğraf sağlar',
'admin.plugins.perm.hook:calendar-source': 'Takvime etkinlik sağlar',
+ 'admin.plugins.perm.hook:place-detail-provider':
+ 'Bir yere ek ayrıntılar (yorumlar, puanlar, bağlantılar) katkıda bulunur',
+ 'admin.plugins.perm.hook:trip-warning-provider': 'Bir gezide doğrulama uyarıları oluşturur (planlayıcıda gösterilir)',
+ 'admin.plugins.perm.events:subscribe':
+ 'Temel etkinlik olaylarına tepki verir (yalnızca olay adı + seyahat, asla içerik değil)',
'admin.plugins.perm.http:outbound': 'Bildirdiği ana bilgisayarlara giden istekler yapar',
'admin.plugins.updateConsentTitle': 'Bu güncelleme yeni izinler gerektiriyor',
'admin.plugins.updateConsentBody':
@@ -315,11 +346,36 @@ const admin: TranslationStrings = {
'admin.plugins.restarted': 'Eklenti yeniden başlatıldı',
'admin.plugins.cap.readsTrips': 'Seyahatlerinizi okur',
'admin.plugins.cap.readsUsers': 'Temel profilleri okur',
+ 'admin.plugins.cap.readsCosts': 'Harcamalarınızı okur',
+ 'admin.plugins.cap.readsPacking': 'Eşya listelerini okur',
+ 'admin.plugins.cap.readsFiles': 'Seyahat dosyalarını okur',
+ 'admin.plugins.cap.writesCosts': 'Harcama ekler',
+ 'admin.plugins.cap.writesPlaces': 'Yerleri düzenler',
+ 'admin.plugins.cap.writesDays': 'Günleri düzenler',
+ 'admin.plugins.cap.writesItinerary': 'Rotayı düzenler',
+ 'admin.plugins.cap.writesTrips': 'Seyahatleri düzenler',
+ 'admin.plugins.cap.metadata': 'Meta veri ekler',
'admin.plugins.cap.widget': "Pano widget'ı",
'admin.plugins.cap.heroWidget': "Biniş kartı widget'ı",
+ 'admin.plugins.cap.placeSlot': 'Yer detayı',
'admin.plugins.cap.realtime': 'Gerçek zamanlı güncellemeler',
'admin.plugins.cap.photos': 'Fotoğraf sağlar',
'admin.plugins.cap.calendar': 'Takvim etkinlikleri sağlar',
+ 'admin.plugins.cap.placeDetails': 'Yerleri zenginleştirir',
+ 'admin.plugins.cap.warnings': 'Sorunları işaretler',
+ 'admin.plugins.cap.events': 'Etkinliğe tepki verir',
+ 'admin.plugins.cap.requiresAddon': '{addon} gerekir',
+ 'admin.plugins.cap.dependsOn': '{id} {version} gerekir',
+ 'admin.plugins.dep.addonDisabledToast': 'Önce gerekli eklentileri etkinleştirin: {addons}',
+ 'admin.plugins.dep.autoEnabled': 'Önce gerekli eklentiler etkinleştirildi: {plugins}',
+ 'admin.plugins.dep.downloaded': '{id} indirildi',
+ 'admin.plugins.dep.resolveTitle': 'Eksik bağımlılıklar',
+ 'admin.plugins.dep.resolveBody': '“{name}” etkinleştirilebilmesi için bu eklentilerin kurulu olması gerekir.',
+ 'admin.plugins.dep.requires': '{version} gerekir',
+ 'admin.plugins.dep.mismatch': '{wanted} gerekir — {installed} kurulu',
+ 'admin.plugins.dep.download': 'İndir',
+ 'admin.plugins.dep.update': 'Güncelle',
+ 'admin.plugins.dep.resolveHint': 'Kendi bağımlılıkları dahil, en son uyumlu sürümü indirir.',
'admin.plugins.accessTitle': 'Neye erişebilir',
'admin.plugins.connectsTitle': 'Şuraya bağlanır',
'admin.plugins.detailsTitle': 'Detaylar',
diff --git a/shared/src/i18n/tr/budget.ts b/shared/src/i18n/tr/budget.ts
index 0128e376b..b0969f862 100644
--- a/shared/src/i18n/tr/budget.ts
+++ b/shared/src/i18n/tr/budget.ts
@@ -52,6 +52,9 @@ const budget: TranslationStrings = {
'costs.nothingOwed': 'Size borç yok',
'costs.yourShare': 'Sizin payınız',
'costs.youPaid': 'Siz ödediniz',
+ 'costs.outstanding': 'Bekleyen tutar',
+ 'costs.outstandingSub': 'Henüz ödeyeni olmayan harcamalar',
+ 'costs.outstandingItems': 'harcamanın ödeyeni yok',
'costs.expenses': 'Harcamalar',
'costs.entries': '{count} kayıt',
'costs.searchPlaceholder': 'Harcamalarda ara…',
@@ -116,10 +119,10 @@ const budget: TranslationStrings = {
'costs.unfinishedHint': 'Yalnızca toplamda — henüz ödenmedi',
'costs.tapToInclude': 'Eklemek için dokun',
'costs.amount': 'Tutar',
- 'costs.split': "Split",
- 'costs.splitEqually': "Equally",
- 'costs.splitCustom': "Custom",
- 'costs.splitTicket': "Ticket",
+ 'costs.split': 'Split',
+ 'costs.splitEqually': 'Equally',
+ 'costs.splitCustom': 'Custom',
+ 'costs.splitTicket': 'Ticket',
'costs.filter.allCategories': 'Tüm kategoriler',
'costs.filter.allDays': 'Tüm günler',
'costs.expensesCount': '{count} harcama',
diff --git a/shared/src/i18n/tr/collection.ts b/shared/src/i18n/tr/collection.ts
index fed81a005..edfab4fb0 100644
--- a/shared/src/i18n/tr/collection.ts
+++ b/shared/src/i18n/tr/collection.ts
@@ -49,7 +49,8 @@ const collection: TranslationStrings = {
'collections.editList': 'Yeniden adlandır',
'collections.listMenu': 'Liste seçenekleri',
'collections.deleteList': 'Listeyi sil',
- 'collections.deleteListConfirm': 'Bu, listeyi ve içindeki tüm kaydedilmiş yerleri kalıcı olarak siler. Bu işlem geri alınamaz.',
+ 'collections.deleteListConfirm':
+ 'Bu, listeyi ve içindeki tüm kaydedilmiş yerleri kalıcı olarak siler. Bu işlem geri alınamaz.',
'collections.listName': 'Liste adı',
'collections.listNamePlaceholder': 'örn. Tokyo 2025',
'collections.listColor': 'Renk',
@@ -127,7 +128,8 @@ const collection: TranslationStrings = {
'collections.share.memberHint': 'Yalnızca liste sahibi kişileri davet edebilir veya kaldırabilir.',
'collections.share.cancel': 'İptal',
'collections.share.leave': 'Listeden ayrıl',
- 'collections.share.leaveConfirm': 'Bu paylaşılan listeden ayrılmak istiyor musunuz? Tekrar davet edilene kadar erişiminizi kaybedersiniz.',
+ 'collections.share.leaveConfirm':
+ 'Bu paylaşılan listeden ayrılmak istiyor musunuz? Tekrar davet edilene kadar erişiminizi kaybedersiniz.',
'collections.share.left': 'Listeden ayrıldınız',
'collections.share.remove': 'Kaldır',
diff --git a/shared/src/i18n/tr/help.ts b/shared/src/i18n/tr/help.ts
index 9306be171..80600fea5 100644
--- a/shared/src/i18n/tr/help.ts
+++ b/shared/src/i18n/tr/help.ts
@@ -2,12 +2,12 @@ import type { TranslationStrings } from '../types';
// English fallback until 'tr' is translated.
const help: TranslationStrings = {
- 'help.title': "Help & Docs",
- 'help.search': "Search docs…",
- 'help.contents': "Contents",
- 'help.noResults': "No matching pages.",
+ 'help.title': 'Help & Docs',
+ 'help.search': 'Search docs…',
+ 'help.contents': 'Contents',
+ 'help.noResults': 'No matching pages.',
'help.errorTitle': "Couldn't load this page",
- 'help.errorBody': "The help content is fetched from the TREK wiki. Check your connection and try again.",
+ 'help.errorBody': 'The help content is fetched from the TREK wiki. Check your connection and try again.',
};
export default help;
diff --git a/shared/src/i18n/tr/index.ts b/shared/src/i18n/tr/index.ts
index b9af5461f..eef4c74aa 100644
--- a/shared/src/i18n/tr/index.ts
+++ b/shared/src/i18n/tr/index.ts
@@ -5,11 +5,13 @@ import backup from './backup';
import budget from './budget';
import categories from './categories';
import collab from './collab';
+import collection from './collection';
import common from './common';
import dashboard from './dashboard';
import day from './day';
import dayplan from './dayplan';
import files from './files';
+import help from './help';
import inspector from './inspector';
import journey from './journey';
import login from './login';
@@ -39,8 +41,6 @@ import trip from './trip';
import trips from './trips';
import undo from './undo';
import vacay from './vacay';
-import collection from './collection';
-import help from './help';
const locale = {
...common,
diff --git a/shared/src/i18n/tr/login.ts b/shared/src/i18n/tr/login.ts
index ce86d448b..890302227 100644
--- a/shared/src/i18n/tr/login.ts
+++ b/shared/src/i18n/tr/login.ts
@@ -87,7 +87,8 @@ const login: TranslationStrings = {
'login.passkey.signIn': 'Passkey ile oturum açın',
'login.passkey.failed': 'Passkey ile oturum açma başarısız oldu. Lütfen tekrar deneyin.',
'login.insecureCookie.title': "Login won't stick over HTTP",
- 'login.insecureCookie.body': "You’re connecting over plain HTTP, so your browser drops TREK’s secure session cookie — the next request fails with \"Access token required\". Fix: use HTTPS, or for a home-lab set COOKIE_SECURE=false.",
- 'login.insecureCookie.link': "Open the Troubleshooting guide",
+ 'login.insecureCookie.body':
+ 'You’re connecting over plain HTTP, so your browser drops TREK’s secure session cookie — the next request fails with "Access token required". Fix: use HTTPS, or for a home-lab set COOKIE_SECURE=false.',
+ 'login.insecureCookie.link': 'Open the Troubleshooting guide',
};
export default login;
diff --git a/shared/src/i18n/tr/members.ts b/shared/src/i18n/tr/members.ts
index ca0df8d00..8d56db8aa 100644
--- a/shared/src/i18n/tr/members.ts
+++ b/shared/src/i18n/tr/members.ts
@@ -25,7 +25,8 @@ const members: TranslationStrings = {
'members.transferError': 'Sahiplik devredilemedi',
'members.guests': 'Misafirler',
'members.guest': 'Misafir',
- 'members.guestsHint': 'Hesabı olmayan kişiler. Masraflara, valize ve görevlere atanabilirler, ancak giriş yapamazlar.',
+ 'members.guestsHint':
+ 'Hesabı olmayan kişiler. Masraflara, valize ve görevlere atanabilirler, ancak giriş yapamazlar.',
'members.addGuest': 'Misafir ekle',
'members.guestNamePlaceholder': 'Misafir adı',
'members.guestAdded': 'Misafir eklendi',
diff --git a/shared/src/i18n/tr/places.ts b/shared/src/i18n/tr/places.ts
index 74f2c7751..86fe071fc 100644
--- a/shared/src/i18n/tr/places.ts
+++ b/shared/src/i18n/tr/places.ts
@@ -24,8 +24,8 @@ const places: TranslationStrings = {
'places.kmlImportNoneSelected': 'İçe aktarılacak en az bir tür seçin.',
'places.selectionCount': '{count} seçildi',
'places.deleteSelected': 'Seçileni sil',
- 'places.changeCategory': "Change category",
- 'places.categoryChanged': "{count} places updated",
+ 'places.changeCategory': 'Change category',
+ 'places.categoryChanged': '{count} places updated',
'places.kmlKmzImported': "KMZ/KML'den {count} yer içe Aktarıldı",
'places.urlResolved': "URL'den içe aktarılan Yer",
'places.importList': 'Liste İçe Aktarma',
diff --git a/shared/src/i18n/tr/settings.ts b/shared/src/i18n/tr/settings.ts
index 745b5170a..cc237d197 100644
--- a/shared/src/i18n/tr/settings.ts
+++ b/shared/src/i18n/tr/settings.ts
@@ -29,7 +29,8 @@ const settings: TranslationStrings = {
'settings.mapStylePlaceholder': 'Bir Mapbox stili seçin',
'settings.mapStyleHint': 'Ön ayar veya kendi mapbox://styles/KULLANICI/ID adresiniz',
'settings.mapOpenFreeMapStylePlaceholder': 'Bir OpenFreeMap stili seçin',
- 'settings.mapOpenFreeMapStyleHint': "Ön ayar veya OpenFreeMap stil URL'si. OpenFreeMap stilleri anahtar gerektirmeden çalışır.",
+ 'settings.mapOpenFreeMapStyleHint':
+ "Ön ayar veya OpenFreeMap stil URL'si. OpenFreeMap stilleri anahtar gerektirmeden çalışır.",
'settings.map3dBuildings': '3D Binalar ve Arazi',
'settings.map3dHint': 'Eğim + gerçek 3D bina çıkıntıları — uydu dahil her stilde çalışır.',
'settings.mapHighQuality': 'Yüksek Kalite Modu',
@@ -326,18 +327,21 @@ const settings: TranslationStrings = {
'settings.airtrail.test.success': 'Bağlandı — {count} uçuş bulundu',
'settings.airtrail.test.failed': 'Bağlantı başarısız',
'settings.aiParsing.title': 'Yapay zekâ ayrıştırma',
- 'settings.aiParsing.hint': 'Yüklenen dosyalardan rezervasyonları çıkarmak için kendi yapay zekâ modelini kullan. Bu yalnızca yöneticin tüm uygulama geneli için bir model yapılandırmadığında geçerlidir.',
+ 'settings.aiParsing.hint':
+ 'Yüklenen dosyalardan rezervasyonları çıkarmak için kendi yapay zekâ modelini kullan. Bu yalnızca yöneticin tüm uygulama geneli için bir model yapılandırmadığında geçerlidir.',
'settings.aiParsing.provider': 'Sağlayıcı',
'settings.aiParsing.providerLocal': 'Yerel (Ollama)',
'settings.aiParsing.providerOpenai': 'OpenAI',
'settings.aiParsing.providerAnthropic': 'Anthropic',
'settings.aiParsing.model': 'Model',
'settings.aiParsing.baseUrl': 'Temel URL',
- 'settings.aiParsing.baseUrlHint': 'Modelin çalıştığı yer — yerel bir Ollama sunucusu veya OpenAI uyumlu bir uç nokta.',
+ 'settings.aiParsing.baseUrlHint':
+ 'Modelin çalıştığı yer — yerel bir Ollama sunucusu veya OpenAI uyumlu bir uç nokta.',
'settings.aiParsing.apiKey': 'API anahtarı',
'settings.aiParsing.apiKeyHint': 'Şifrelenmiş olarak saklanır. Mevcut anahtarı korumak için boş bırak.',
'settings.aiParsing.multimodal': 'Belgeleri görsel olarak gönder',
- 'settings.aiParsing.multimodalHint': 'Görüntü işleyebilen modeller için — çıkarılan metin yerine orijinal PDF\'yi gönderir.',
+ 'settings.aiParsing.multimodalHint':
+ "Görüntü işleyebilen modeller için — çıkarılan metin yerine orijinal PDF'yi gönderir.",
'settings.aiParsing.toast.saved': 'Yapay zekâ ayarları kaydedildi',
'settings.aiParsing.toast.saveError': 'Yapay zekâ ayarları kaydedilemedi',
'settings.tabs.appearance': 'Appearance',
@@ -356,7 +360,8 @@ const settings: TranslationStrings = {
'settings.appearance.contrastLow': 'Low contrast',
'settings.appearance.readability': 'Readability',
'settings.appearance.transparency': 'Transparency',
- 'settings.appearance.transparencyHint': 'Glassy translucent surfaces. Turn off for solid, higher-contrast backgrounds.',
+ 'settings.appearance.transparencyHint':
+ 'Glassy translucent surfaces. Turn off for solid, higher-contrast backgrounds.',
'settings.appearance.reduceMotion': 'Reduce motion',
'settings.appearance.reduceMotionHint': 'Minimize animations and transitions.',
'settings.appearance.density': 'Density',
@@ -386,7 +391,8 @@ const settings: TranslationStrings = {
'settings.appearance.group.belowHero': 'Below the hero',
'settings.appearance.group.bottomOfPage': 'Bottom of page',
'settings.appearance.sidebarHint': 'The whole right column. Turn off and the dashboard centers.',
- 'settings.appearance.densityHint': 'Compact tightens spacing and padding for a denser layout that fits more on screen.',
+ 'settings.appearance.densityHint':
+ 'Compact tightens spacing and padding for a denser layout that fits more on screen.',
'settings.appearance.textSizeAll': 'Everything',
'settings.appearance.perSize': 'Adjust each size separately',
'settings.appearance.size.large': 'Large',
@@ -409,10 +415,13 @@ const settings: TranslationStrings = {
'settings.offline.cache.title': 'Çevrimdışı önbellek',
'settings.offline.mode.title': 'Çevrimdışı mod',
'settings.offline.mode.force': 'Çevrimdışı modu zorla',
- 'settings.offline.mode.forceHint': 'Yalnızca önbelleğe alınmış verilerle çalışın ve değişikliklerinizi sıraya alın. Yeniden bağlanıp senkronize etmek için kapatın.',
- 'settings.offline.mode.active': 'Çevrimdışı mod açık — değişiklikleriniz sıraya alındı ve kapattığınızda senkronize edilecek.',
+ 'settings.offline.mode.forceHint':
+ 'Yalnızca önbelleğe alınmış verilerle çalışın ve değişikliklerinizi sıraya alın. Yeniden bağlanıp senkronize etmek için kapatın.',
+ 'settings.offline.mode.active':
+ 'Çevrimdışı mod açık — değişiklikleriniz sıraya alındı ve kapattığınızda senkronize edilecek.',
'settings.offline.prepare.title': 'Çevrimdışı için hazırlan',
- 'settings.offline.prepare.hint': 'Bağlantınızı kaybetmeden önce ihtiyacınız olan her şeyi — gezi verileri, belgeler ve harita kutucukları — indirin.',
+ 'settings.offline.prepare.hint':
+ 'Bağlantınızı kaybetmeden önce ihtiyacınız olan her şeyi — gezi verileri, belgeler ve harita kutucukları — indirin.',
'settings.offline.prepare.button': 'Çevrimdışı kullanım için indir',
'settings.offline.prepare.running': 'İndiriliyor…',
'settings.offline.prepare.done': 'Çevrimdışı kullanıma hazır',
@@ -423,12 +432,14 @@ const settings: TranslationStrings = {
'settings.offline.resyncing': 'Senkronize ediliyor…',
'settings.offline.storage.title': 'Çevrimdışı olarak ne saklanacak',
'settings.offline.storage.tiles': 'Harita kutucuklarını çevrimdışı sakla',
- 'settings.offline.storage.tilesHint': 'Harita kutucukları en fazla depolama alanını kullanır. Yalnızca gezi verilerini ve belgeleri çevrimdışı tutmak için bunu kapatın.',
+ 'settings.offline.storage.tilesHint':
+ 'Harita kutucukları en fazla depolama alanını kullanır. Yalnızca gezi verilerini ve belgeleri çevrimdışı tutmak için bunu kapatın.',
'settings.offline.storage.tripsTitle': 'Geziler',
'settings.offline.storage.tripOn': 'Çevrimdışı saklandı',
'settings.offline.storage.tripOff': 'Saklanmadı',
'settings.offline.clear': 'Önbelleği temizle',
- 'settings.offline.clearConfirm': 'Tüm çevrimdışı gezi verileri silinsin mi? Çevrimiçiyken istediğiniz zaman yeniden senkronize edebilirsiniz.',
+ 'settings.offline.clearConfirm':
+ 'Tüm çevrimdışı gezi verileri silinsin mi? Çevrimiçiyken istediğiniz zaman yeniden senkronize edebilirsiniz.',
'settings.offline.stats.trips': 'Önbelleğe alınan geziler',
'settings.offline.stats.pending': 'Bekleyen değişiklikler',
'settings.offline.stats.failed': 'Başarısız değişiklikler',
@@ -436,7 +447,8 @@ const settings: TranslationStrings = {
'settings.offline.empty': 'Henüz önbelleğe alınmış gezi yok. Senkronize etmek için internete bağlanın.',
'settings.offline.loading': 'Yükleniyor…',
'settings.offline.conflicts.title': 'Senkronizasyon çakışmaları',
- 'settings.offline.conflicts.hint': 'Çevrimdışıyken yaptığınız değişiklikler sunucudaki daha yeni değişikliklerle çakışıyor. Hangi sürümün saklanacağını seçin.',
+ 'settings.offline.conflicts.hint':
+ 'Çevrimdışıyken yaptığınız değişiklikler sunucudaki daha yeni değişikliklerle çakışıyor. Hangi sürümün saklanacağını seçin.',
'settings.offline.conflicts.keepMine': 'Benimkini sakla',
'settings.offline.conflicts.keepServer': 'Onlarınkini sakla',
'settings.offline.conflicts.mine': 'Sizin sürümünüz',
diff --git a/shared/src/i18n/tr/trip.ts b/shared/src/i18n/tr/trip.ts
index 91db8179a..bdf42f317 100644
--- a/shared/src/i18n/tr/trip.ts
+++ b/shared/src/i18n/tr/trip.ts
@@ -28,7 +28,8 @@ const trip: TranslationStrings = {
'trip.confirm.deletePlaces': '{count} Yer silinsin mi?',
'trip.toast.placesDeleted': '{count} yer silindi',
'trip.invite.linkTitle': 'Seyahat davet bağlantısı',
- 'trip.invite.linkHint': 'TREK hesabı olan ve bu bağlantıyı açan herkes seyahate üye olarak katılır. Eski bağlantıyı geçersiz kılmak için yeniden oluşturun.',
+ 'trip.invite.linkHint':
+ 'TREK hesabı olan ve bu bağlantıyı açan herkes seyahate üye olarak katılır. Eski bağlantıyı geçersiz kılmak için yeniden oluşturun.',
'trip.invite.create': 'Davet bağlantısı oluştur',
'trip.invite.regenerate': 'Yeniden oluştur',
'trip.invite.disable': 'Devre dışı bırak',
@@ -75,7 +76,8 @@ const trip: TranslationStrings = {
'transit.changeRoute': 'Rotayı değiştir',
'transit.journey': 'Toplu taşıma yolculuğu',
'transit.pickDay': 'Bağlantı aramak için bir gün seçin.',
- 'transit.noItinerary': 'Bu kaydın kayıtlı bir güzergâhı yok — bir tane aramak için "Rotayı değiştir" seçeneğini kullanın.',
+ 'transit.noItinerary':
+ 'Bu kaydın kayıtlı bir güzergâhı yok — bir tane aramak için "Rotayı değiştir" seçeneğini kullanın.',
'transit.durationLabel': 'Süre',
'transit.transfersLabel': 'Aktarma',
'transit.walkLabel': 'Yürüyüş',
diff --git a/shared/src/i18n/tr/undo.ts b/shared/src/i18n/tr/undo.ts
index f553587fd..2194c310f 100644
--- a/shared/src/i18n/tr/undo.ts
+++ b/shared/src/i18n/tr/undo.ts
@@ -9,7 +9,7 @@ const undo: TranslationStrings = {
'undo.optimize': 'Rota optimize edildi',
'undo.deletePlace': 'Yer silindi',
'undo.deletePlaces': 'Yerler silindi',
- 'undo.changeCategory': "Category changed",
+ 'undo.changeCategory': 'Category changed',
'undo.moveDay': 'Yer başka güne taşındı',
'undo.lock': 'Yer kilidi değiştirildi',
'undo.importGpx': 'GPX içe aktarma',
diff --git a/shared/src/i18n/uk/admin.ts b/shared/src/i18n/uk/admin.ts
index 3299c06b1..e48462688 100644
--- a/shared/src/i18n/uk/admin.ts
+++ b/shared/src/i18n/uk/admin.ts
@@ -96,6 +96,8 @@ const admin: TranslationStrings = {
'admin.recommended': 'Рекомендується',
'admin.weatherKey': 'API-ключ OpenWeatherMap',
'admin.weatherKeyHint': 'Для даних про погоду. Безкоштовно на openweathermap.org',
+ 'admin.unsplashKey': 'Ключ API Unsplash',
+ 'admin.unsplashKeyHint': 'Для пошуку зображень. Безкоштовно на unsplash.com/developers',
'admin.validateKey': 'Перевірити',
'admin.keyValid': 'Підключено',
'admin.keyInvalid': 'Недійсний',
@@ -162,6 +164,11 @@ const admin: TranslationStrings = {
'admin.tabs.plugins': 'Плагіни',
'admin.plugins.rescan': 'Пересканувати',
'admin.plugins.rescanned': 'Папку плагінів пересканувано',
+ 'admin.plugins.upload': 'Завантажити плагін',
+ 'admin.plugins.dropToUpload': 'Перетягніть .zip плагіна для встановлення',
+ 'admin.plugins.uploaded': 'Плагін “{name}” завантажено — активуйте для запуску',
+ 'admin.plugins.sideloaded': 'Завантажено вручну',
+ 'admin.plugins.sideloadedHint': 'Завантажено вручну — не з реєстру, без підпису та перевірки',
'admin.plugins.browse': 'Огляд плагінів',
'admin.plugins.installed': 'Встановлено',
'admin.plugins.install': 'Встановити',
@@ -181,6 +188,7 @@ const admin: TranslationStrings = {
'admin.plugins.type.widget': 'Віджет',
'admin.plugins.type.page': 'Сторінка',
'admin.plugins.type.integration': 'Інтеграція',
+ 'admin.plugins.type.trip-page': 'Сторінка подорожі',
'admin.plugins.reviewed': 'Перевірено',
'admin.plugins.unreviewed': 'Не перевірено',
'admin.plugins.updated': 'Плагін оновлено',
@@ -190,10 +198,12 @@ const admin: TranslationStrings = {
'admin.plugins.title': 'Плагіни',
'admin.plugins.subtitle': 'Встановлюйте сторонні плагіни та керуйте ними на вашому інстансі.',
'admin.plugins.disabledTitle': 'Плагіни вимкнено',
- 'admin.plugins.disabledBody': 'Середовище виконання плагінів вимкнено (TREK_PLUGINS_ENABLED). Жоден плагін не зможе запуститися, доки адміністратор не ввімкне його в конфігурації сервера.',
+ 'admin.plugins.disabledBody':
+ 'Середовище виконання плагінів вимкнено (TREK_PLUGINS_ENABLED). Жоден плагін не зможе запуститися, доки адміністратор не ввімкне його в конфігурації сервера.',
'admin.plugins.empty': 'Плагіни ще не встановлені.',
'admin.plugins.loadError': 'Не вдалося завантажити плагіни.',
- 'admin.plugins.scaffoldNote': 'Встановлення та активація плагінів з’являться в наступному оновленні. Наразі ця панель лише показує встановлені плагіни.',
+ 'admin.plugins.scaffoldNote':
+ 'Встановлення та активація плагінів з’являться в наступному оновленні. Наразі ця панель лише показує встановлені плагіни.',
'admin.plugins.status.active': 'Активний',
'admin.plugins.status.inactive': 'Неактивний',
'admin.plugins.status.disabled': 'Вимкнено',
@@ -216,10 +226,30 @@ const admin: TranslationStrings = {
'admin.plugins.perm.db:own': 'Зберігати власні дані в ізольованій базі даних',
'admin.plugins.perm.db:read:trips': 'Читати подорожі, до яких має доступ поточний користувач',
'admin.plugins.perm.db:read:users': "Читати базову інформацію профілю (ім'я, аватар — ніколи не облікові дані)",
+ 'admin.plugins.perm.db:read:costs': 'Читати витрати (статті бюджету), до яких має доступ поточний користувач',
+ 'admin.plugins.perm.db:read:packing': 'Читати списки речей подорожей, до яких має доступ поточний користувач',
+ 'admin.plugins.perm.db:read:files': 'Читати файли подорожей, до яких має доступ поточний користувач',
+ 'admin.plugins.perm.db:write:costs':
+ 'Створювати витрати (статті бюджету) у подорожах, які може редагувати поточний користувач',
+ 'admin.plugins.perm.db:write:places':
+ 'Додавати, редагувати та видаляти місця в подорожах, які може редагувати поточний користувач',
+ 'admin.plugins.perm.db:write:days':
+ 'Додавати, редагувати та видаляти дні в подорожах, які може редагувати поточний користувач',
+ 'admin.plugins.perm.db:write:itinerary':
+ 'Призначати та видаляти місця в днях подорожей, які може редагувати поточний користувач',
+ 'admin.plugins.perm.db:write:trips':
+ 'Редагувати деталі подорожі (назва, дати, валюта…) у подорожах, які може редагувати поточний користувач',
+ 'admin.plugins.perm.db:meta':
+ 'Прикріплювати власні приватні дані до подорожей, місць і днів, до яких має доступ поточний користувач',
'admin.plugins.perm.ws:broadcast:trip': 'Надсилати оновлення в реальному часі учасникам подорожі',
'admin.plugins.perm.ws:broadcast:user': 'Надсилати оновлення в реальному часі окремим користувачам',
'admin.plugins.perm.hook:photo-provider': 'Надавати фотографії для Спогадів',
'admin.plugins.perm.hook:calendar-source': 'Надавати події для календаря',
+ 'admin.plugins.perm.hook:place-detail-provider': 'Додавати додаткові деталі (відгуки, оцінки, посилання) до місця',
+ 'admin.plugins.perm.hook:trip-warning-provider':
+ 'Створювати попередження перевірки для подорожі (показуються в планувальнику)',
+ 'admin.plugins.perm.events:subscribe':
+ 'Реагувати на основні події активності (лише назва події + подорож, ніколи вміст)',
'admin.plugins.perm.http:outbound': 'Виконувати вихідні запити до заявлених хостів',
'admin.plugins.updateConsentTitle': 'Це оновлення потребує нових дозволів',
'admin.plugins.updateConsentBody':
@@ -271,11 +301,36 @@ const admin: TranslationStrings = {
'admin.plugins.restarted': 'Плагін перезапущено',
'admin.plugins.cap.readsTrips': 'Читає ваші подорожі',
'admin.plugins.cap.readsUsers': 'Читає базові профілі',
+ 'admin.plugins.cap.readsCosts': 'Читає ваші витрати',
+ 'admin.plugins.cap.readsPacking': 'Читає списки речей',
+ 'admin.plugins.cap.readsFiles': 'Читає файли подорожей',
+ 'admin.plugins.cap.writesCosts': 'Додає витрати',
+ 'admin.plugins.cap.writesPlaces': 'Редагує місця',
+ 'admin.plugins.cap.writesDays': 'Редагує дні',
+ 'admin.plugins.cap.writesItinerary': 'Редагує маршрут',
+ 'admin.plugins.cap.writesTrips': 'Редагує подорожі',
+ 'admin.plugins.cap.metadata': 'Додає метадані',
'admin.plugins.cap.widget': 'Віджет панелі',
'admin.plugins.cap.heroWidget': 'Віджет посадкового талона',
+ 'admin.plugins.cap.placeSlot': 'Деталі місця',
'admin.plugins.cap.realtime': 'Оновлення в реальному часі',
'admin.plugins.cap.photos': 'Надає фотографії',
'admin.plugins.cap.calendar': 'Надає події календаря',
+ 'admin.plugins.cap.placeDetails': 'Збагачує місця',
+ 'admin.plugins.cap.warnings': 'Позначає проблеми',
+ 'admin.plugins.cap.events': 'Реагує на активність',
+ 'admin.plugins.cap.requiresAddon': 'Потрібен {addon}',
+ 'admin.plugins.cap.dependsOn': 'Потрібен {id} {version}',
+ 'admin.plugins.dep.addonDisabledToast': 'Спершу увімкніть потрібні доповнення: {addons}',
+ 'admin.plugins.dep.autoEnabled': 'Спершу увімкнено потрібні плагіни: {plugins}',
+ 'admin.plugins.dep.downloaded': 'Завантажено {id}',
+ 'admin.plugins.dep.resolveTitle': 'Відсутні залежності',
+ 'admin.plugins.dep.resolveBody': '“{name}” потребує встановлення цих плагінів, перш ніж його можна буде увімкнути.',
+ 'admin.plugins.dep.requires': 'Потрібен {version}',
+ 'admin.plugins.dep.mismatch': 'Потрібен {wanted} — встановлено {installed}',
+ 'admin.plugins.dep.download': 'Завантажити',
+ 'admin.plugins.dep.update': 'Оновити',
+ 'admin.plugins.dep.resolveHint': 'Завантажує останню сумісну версію разом з її залежностями.',
'admin.plugins.accessTitle': 'До чого має доступ',
'admin.plugins.connectsTitle': 'Підключається до',
'admin.plugins.detailsTitle': 'Деталі',
diff --git a/shared/src/i18n/uk/budget.ts b/shared/src/i18n/uk/budget.ts
index 76f76255f..a4e2a039f 100644
--- a/shared/src/i18n/uk/budget.ts
+++ b/shared/src/i18n/uk/budget.ts
@@ -52,6 +52,9 @@ const budget: TranslationStrings = {
'costs.nothingOwed': 'Вам нічого не винні',
'costs.yourShare': 'Ваша частка',
'costs.youPaid': 'Ви заплатили',
+ 'costs.outstanding': 'Неврегульована сума',
+ 'costs.outstandingSub': 'Витрати без платника',
+ 'costs.outstandingItems': 'витрат без платника',
'costs.expenses': 'Витрати',
'costs.entries': '{count} записів',
'costs.searchPlaceholder': 'Пошук витрат…',
@@ -116,10 +119,10 @@ const budget: TranslationStrings = {
'costs.unfinishedHint': 'Лише в сумі — ще не врегульовано',
'costs.tapToInclude': 'Натисніть, щоб додати',
'costs.amount': 'Сума',
- 'costs.split': "Split",
- 'costs.splitEqually': "Equally",
- 'costs.splitCustom': "Custom",
- 'costs.splitTicket': "Ticket",
+ 'costs.split': 'Split',
+ 'costs.splitEqually': 'Equally',
+ 'costs.splitCustom': 'Custom',
+ 'costs.splitTicket': 'Ticket',
'costs.filter.allCategories': 'Усі категорії',
'costs.filter.allDays': 'Усі дні',
'costs.expensesCount': '{count} витрат',
diff --git a/shared/src/i18n/uk/help.ts b/shared/src/i18n/uk/help.ts
index e29af24c4..e10fcd4a5 100644
--- a/shared/src/i18n/uk/help.ts
+++ b/shared/src/i18n/uk/help.ts
@@ -2,12 +2,12 @@ import type { TranslationStrings } from '../types';
// English fallback until 'uk' is translated.
const help: TranslationStrings = {
- 'help.title': "Help & Docs",
- 'help.search': "Search docs…",
- 'help.contents': "Contents",
- 'help.noResults': "No matching pages.",
+ 'help.title': 'Help & Docs',
+ 'help.search': 'Search docs…',
+ 'help.contents': 'Contents',
+ 'help.noResults': 'No matching pages.',
'help.errorTitle': "Couldn't load this page",
- 'help.errorBody': "The help content is fetched from the TREK wiki. Check your connection and try again.",
+ 'help.errorBody': 'The help content is fetched from the TREK wiki. Check your connection and try again.',
};
export default help;
diff --git a/shared/src/i18n/uk/index.ts b/shared/src/i18n/uk/index.ts
index b9af5461f..eef4c74aa 100644
--- a/shared/src/i18n/uk/index.ts
+++ b/shared/src/i18n/uk/index.ts
@@ -5,11 +5,13 @@ import backup from './backup';
import budget from './budget';
import categories from './categories';
import collab from './collab';
+import collection from './collection';
import common from './common';
import dashboard from './dashboard';
import day from './day';
import dayplan from './dayplan';
import files from './files';
+import help from './help';
import inspector from './inspector';
import journey from './journey';
import login from './login';
@@ -39,8 +41,6 @@ import trip from './trip';
import trips from './trips';
import undo from './undo';
import vacay from './vacay';
-import collection from './collection';
-import help from './help';
const locale = {
...common,
diff --git a/shared/src/i18n/uk/login.ts b/shared/src/i18n/uk/login.ts
index 244670b98..074c45a48 100644
--- a/shared/src/i18n/uk/login.ts
+++ b/shared/src/i18n/uk/login.ts
@@ -86,7 +86,8 @@ const login: TranslationStrings = {
'login.passkey.signIn': 'Увійти за допомогою passkey',
'login.passkey.failed': 'Не вдалося увійти за допомогою passkey. Спробуйте ще раз.',
'login.insecureCookie.title': "Login won't stick over HTTP",
- 'login.insecureCookie.body': "You’re connecting over plain HTTP, so your browser drops TREK’s secure session cookie — the next request fails with \"Access token required\". Fix: use HTTPS, or for a home-lab set COOKIE_SECURE=false.",
- 'login.insecureCookie.link': "Open the Troubleshooting guide",
+ 'login.insecureCookie.body':
+ 'You’re connecting over plain HTTP, so your browser drops TREK’s secure session cookie — the next request fails with "Access token required". Fix: use HTTPS, or for a home-lab set COOKIE_SECURE=false.',
+ 'login.insecureCookie.link': 'Open the Troubleshooting guide',
};
export default login;
diff --git a/shared/src/i18n/uk/members.ts b/shared/src/i18n/uk/members.ts
index 7e398f4be..49ce7c1e7 100644
--- a/shared/src/i18n/uk/members.ts
+++ b/shared/src/i18n/uk/members.ts
@@ -25,9 +25,10 @@ const members: TranslationStrings = {
'members.transferError': 'Не вдалося передати право власності',
'members.guests': 'Гості',
'members.guest': 'Гість',
- 'members.guestsHint': 'Люди без облікового запису. Їм можна призначати витрати, речі та завдання, але вони не можуть увійти.',
+ 'members.guestsHint':
+ 'Люди без облікового запису. Їм можна призначати витрати, речі та завдання, але вони не можуть увійти.',
'members.addGuest': 'Додати гостя',
- 'members.guestNamePlaceholder': 'Ім\'я гостя',
+ 'members.guestNamePlaceholder': "Ім'я гостя",
'members.guestAdded': 'Гостя додано',
'members.guestAddError': 'Не вдалося додати гостя',
'members.guestRenameError': 'Не вдалося перейменувати гостя',
diff --git a/shared/src/i18n/uk/places.ts b/shared/src/i18n/uk/places.ts
index 0653fca51..70ed89a6c 100644
--- a/shared/src/i18n/uk/places.ts
+++ b/shared/src/i18n/uk/places.ts
@@ -24,8 +24,8 @@ const places: TranslationStrings = {
'places.kmlImportNoneSelected': 'Виберіть щонайменше один тип.',
'places.selectionCount': '{count} вибрано',
'places.deleteSelected': 'Видалити вибране',
- 'places.changeCategory': "Change category",
- 'places.categoryChanged': "{count} places updated",
+ 'places.changeCategory': 'Change category',
+ 'places.categoryChanged': '{count} places updated',
'places.kmlKmzImported': '{count} місць імпортовано з KMZ/KML',
'places.urlResolved': 'Місце імпортовано з URL',
'places.importList': 'Імпорт списку',
diff --git a/shared/src/i18n/uk/settings.ts b/shared/src/i18n/uk/settings.ts
index e483cb0e7..1d6908ff2 100644
--- a/shared/src/i18n/uk/settings.ts
+++ b/shared/src/i18n/uk/settings.ts
@@ -330,7 +330,8 @@ const settings: TranslationStrings = {
'settings.airtrail.test.success': 'Підключено — знайдено {count} рейс(ів)',
'settings.airtrail.test.failed': 'Не вдалося підключитися',
'settings.aiParsing.title': 'Розпізнавання ШІ',
- 'settings.aiParsing.hint': 'Використовуйте власну модель ШІ для вилучення бронювань із завантажених файлів. Це діє лише тоді, коли адміністратор не налаштував модель для всього екземпляра.',
+ 'settings.aiParsing.hint':
+ 'Використовуйте власну модель ШІ для вилучення бронювань із завантажених файлів. Це діє лише тоді, коли адміністратор не налаштував модель для всього екземпляра.',
'settings.aiParsing.provider': 'Постачальник',
'settings.aiParsing.providerLocal': 'Локальний (Ollama)',
'settings.aiParsing.providerOpenai': 'OpenAI',
@@ -339,9 +340,11 @@ const settings: TranslationStrings = {
'settings.aiParsing.baseUrl': 'Базова URL-адреса',
'settings.aiParsing.baseUrlHint': 'Де працює модель — локальний сервер Ollama або сумісна з OpenAI кінцева точка.',
'settings.aiParsing.apiKey': 'Ключ API',
- 'settings.aiParsing.apiKeyHint': 'Зберігається в зашифрованому вигляді. Залиште порожнім, щоб зберегти поточний ключ.',
+ 'settings.aiParsing.apiKeyHint':
+ 'Зберігається в зашифрованому вигляді. Залиште порожнім, щоб зберегти поточний ключ.',
'settings.aiParsing.multimodal': 'Надсилати документи як зображення',
- 'settings.aiParsing.multimodalHint': 'Для моделей із підтримкою зображень — надсилає оригінальний PDF замість вилученого тексту.',
+ 'settings.aiParsing.multimodalHint':
+ 'Для моделей із підтримкою зображень — надсилає оригінальний PDF замість вилученого тексту.',
'settings.aiParsing.toast.saved': 'Налаштування ШІ збережено',
'settings.aiParsing.toast.saveError': 'Не вдалося зберегти налаштування ШІ',
'settings.tabs.appearance': 'Appearance',
@@ -360,7 +363,8 @@ const settings: TranslationStrings = {
'settings.appearance.contrastLow': 'Low contrast',
'settings.appearance.readability': 'Readability',
'settings.appearance.transparency': 'Transparency',
- 'settings.appearance.transparencyHint': 'Glassy translucent surfaces. Turn off for solid, higher-contrast backgrounds.',
+ 'settings.appearance.transparencyHint':
+ 'Glassy translucent surfaces. Turn off for solid, higher-contrast backgrounds.',
'settings.appearance.reduceMotion': 'Reduce motion',
'settings.appearance.reduceMotionHint': 'Minimize animations and transitions.',
'settings.appearance.density': 'Density',
@@ -390,7 +394,8 @@ const settings: TranslationStrings = {
'settings.appearance.group.belowHero': 'Below the hero',
'settings.appearance.group.bottomOfPage': 'Bottom of page',
'settings.appearance.sidebarHint': 'The whole right column. Turn off and the dashboard centers.',
- 'settings.appearance.densityHint': 'Compact tightens spacing and padding for a denser layout that fits more on screen.',
+ 'settings.appearance.densityHint':
+ 'Compact tightens spacing and padding for a denser layout that fits more on screen.',
'settings.appearance.textSizeAll': 'Everything',
'settings.appearance.perSize': 'Adjust each size separately',
'settings.appearance.size.large': 'Large',
@@ -413,10 +418,13 @@ const settings: TranslationStrings = {
'settings.offline.cache.title': 'Офлайн-кеш',
'settings.offline.mode.title': 'Офлайн-режим',
'settings.offline.mode.force': 'Примусовий офлайн-режим',
- 'settings.offline.mode.forceHint': 'Працюйте лише з кешованими даними та ставте свої зміни в чергу. Вимкніть, щоб знову підключитися та синхронізувати.',
- 'settings.offline.mode.active': 'Офлайн-режим увімкнено — ваші зміни поставлені в чергу й синхронізуються, коли ви його вимкнете.',
+ 'settings.offline.mode.forceHint':
+ 'Працюйте лише з кешованими даними та ставте свої зміни в чергу. Вимкніть, щоб знову підключитися та синхронізувати.',
+ 'settings.offline.mode.active':
+ 'Офлайн-режим увімкнено — ваші зміни поставлені в чергу й синхронізуються, коли ви його вимкнете.',
'settings.offline.prepare.title': 'Підготуватися до офлайну',
- 'settings.offline.prepare.hint': 'Завантажте все необхідне — дані поїздок, документи та тайли карти — перш ніж втратите зв’язок.',
+ 'settings.offline.prepare.hint':
+ 'Завантажте все необхідне — дані поїздок, документи та тайли карти — перш ніж втратите зв’язок.',
'settings.offline.prepare.button': 'Завантажити для офлайн-використання',
'settings.offline.prepare.running': 'Завантаження…',
'settings.offline.prepare.done': 'Готово до офлайн-використання',
@@ -427,12 +435,14 @@ const settings: TranslationStrings = {
'settings.offline.resyncing': 'Синхронізація…',
'settings.offline.storage.title': 'Що зберігати офлайн',
'settings.offline.storage.tiles': 'Зберігати тайли карти офлайн',
- 'settings.offline.storage.tilesHint': 'Тайли карти займають найбільше місця. Вимкніть, щоб зберігати офлайн лише дані поїздок і документи.',
+ 'settings.offline.storage.tilesHint':
+ 'Тайли карти займають найбільше місця. Вимкніть, щоб зберігати офлайн лише дані поїздок і документи.',
'settings.offline.storage.tripsTitle': 'Поїздки',
'settings.offline.storage.tripOn': 'Збережено офлайн',
'settings.offline.storage.tripOff': 'Не збережено',
'settings.offline.clear': 'Очистити кеш',
- 'settings.offline.clearConfirm': 'Очистити всі офлайн-дані поїздок? Ви можете синхронізувати їх будь-коли в режимі онлайн.',
+ 'settings.offline.clearConfirm':
+ 'Очистити всі офлайн-дані поїздок? Ви можете синхронізувати їх будь-коли в режимі онлайн.',
'settings.offline.stats.trips': 'Кешовані поїздки',
'settings.offline.stats.pending': 'Зміни в очікуванні',
'settings.offline.stats.failed': 'Невдалі зміни',
@@ -440,7 +450,8 @@ const settings: TranslationStrings = {
'settings.offline.empty': 'Поки що немає кешованих поїздок. Підключіться до інтернету, щоб синхронізувати.',
'settings.offline.loading': 'Завантаження…',
'settings.offline.conflicts.title': 'Конфлікти синхронізації',
- 'settings.offline.conflicts.hint': 'Зміни, які ви зробили офлайн, конфліктують із новішими змінами на сервері. Виберіть, яку версію залишити.',
+ 'settings.offline.conflicts.hint':
+ 'Зміни, які ви зробили офлайн, конфліктують із новішими змінами на сервері. Виберіть, яку версію залишити.',
'settings.offline.conflicts.keepMine': 'Залишити мою',
'settings.offline.conflicts.keepServer': 'Залишити їхню',
'settings.offline.conflicts.mine': 'Ваша версія',
diff --git a/shared/src/i18n/uk/trip.ts b/shared/src/i18n/uk/trip.ts
index 27adf64f1..b85311840 100644
--- a/shared/src/i18n/uk/trip.ts
+++ b/shared/src/i18n/uk/trip.ts
@@ -28,7 +28,8 @@ const trip: TranslationStrings = {
'trip.confirm.deletePlaces': 'Видалити {count} місць?',
'trip.toast.placesDeleted': '{count} місць видалено',
'trip.invite.linkTitle': 'Посилання-запрошення до подорожі',
- 'trip.invite.linkHint': 'Будь-хто з обліковим записом TREK, хто відкриє це посилання, приєднається до подорожі як учасник. Згенеруйте заново, щоб анулювати старе посилання.',
+ 'trip.invite.linkHint':
+ 'Будь-хто з обліковим записом TREK, хто відкриє це посилання, приєднається до подорожі як учасник. Згенеруйте заново, щоб анулювати старе посилання.',
'trip.invite.create': 'Створити посилання-запрошення',
'trip.invite.regenerate': 'Згенерувати заново',
'trip.invite.disable': 'Вимкнути',
@@ -58,7 +59,7 @@ const trip: TranslationStrings = {
'transit.search': 'Пошук',
'transit.searching': 'Пошук…',
'transit.searchError': 'Не вдалося знайти маршрут. Спробуйте ще раз.',
- 'transit.noResults': 'З\'єднань не знайдено. Спробуйте інший час або фільтри.',
+ 'transit.noResults': "З'єднань не знайдено. Спробуйте інший час або фільтри.",
'transit.direct': 'Прямий',
'transit.transfers': 'Пересадок: {count}',
'transit.min': '{count} хв',
diff --git a/shared/src/i18n/uk/undo.ts b/shared/src/i18n/uk/undo.ts
index 9d563c61c..090636c88 100644
--- a/shared/src/i18n/uk/undo.ts
+++ b/shared/src/i18n/uk/undo.ts
@@ -9,7 +9,7 @@ const undo: TranslationStrings = {
'undo.optimize': 'Маршрут оптимізовано',
'undo.deletePlace': 'Місце видалено',
'undo.deletePlaces': 'Місця видалено',
- 'undo.changeCategory': "Category changed",
+ 'undo.changeCategory': 'Category changed',
'undo.moveDay': 'Місце переміщено в інший день',
'undo.lock': 'Блокування місця змінено',
'undo.importGpx': 'Імпорт GPX',
diff --git a/shared/src/i18n/vi/admin.ts b/shared/src/i18n/vi/admin.ts
index 67cc20b36..66615269c 100644
--- a/shared/src/i18n/vi/admin.ts
+++ b/shared/src/i18n/vi/admin.ts
@@ -3,7 +3,7 @@ import type { TranslationStrings } from '../types';
const admin: TranslationStrings = {
'admin.notifications.title': 'Thông báo',
'admin.notifications.hint': 'Chọn một kênh thông báo. Chỉ có một người có thể hoạt động tại một thời điểm.',
- 'admin.notifications.none': 'Tàn tật',
+ 'admin.notifications.none': 'Tắt',
'admin.notifications.email': 'Email (SMTP)',
'admin.notifications.webhook': 'Webhook',
'admin.notifications.ntfy': 'Ntfy',
@@ -54,7 +54,8 @@ const admin: TranslationStrings = {
'admin.smtp.title': 'Email & Thông báo',
'admin.smtp.hint': 'Cấu hình SMTP để gửi thông báo qua email.',
'admin.smtp.testButton': 'Gửi email kiểm tra',
- 'admin.webhook.hint': 'Cho phép người dùng định cấu hình URL webhook của riêng họ để nhận thông báo (Discord, Slack, v.v.).',
+ 'admin.webhook.hint':
+ 'Cho phép người dùng định cấu hình URL webhook của riêng họ để nhận thông báo (Discord, Slack, v.v.).',
'admin.smtp.testSuccess': 'Email kiểm tra đã được gửi thành công',
'admin.smtp.testFailed': 'Email kiểm tra không thành công',
'admin.title': 'Sự quản lý',
@@ -136,28 +137,32 @@ const admin: TranslationStrings = {
'admin.recommended': 'Khuyến khích',
'admin.weatherKey': 'OpenWeatherMap API Chìa khóa',
'admin.weatherKeyHint': 'Đối với dữ liệu thời tiết. Miễn phí tại openweathermap.org',
+ 'admin.unsplashKey': 'Khóa API Unsplash',
+ 'admin.unsplashKeyHint': 'Đối với tìm kiếm hình ảnh. Miễn phí tại unsplash.com/developers',
'admin.validateKey': 'Bài kiểm tra',
'admin.keyValid': 'Đã kết nối',
'admin.keyInvalid': 'Không hợp lệ',
'admin.keySaved': 'Đã lưu khóa API',
'admin.oidcTitle': 'Đăng nhập một lần (OIDC)',
- 'admin.oidcSubtitle': 'Cho phép đăng nhập thông qua các nhà cung cấp bên ngoài như Google, Apple, Authentik hoặc Keycloak.',
+ 'admin.oidcSubtitle':
+ 'Cho phép đăng nhập thông qua các nhà cung cấp bên ngoài như Google, Apple, Authentik hoặc Keycloak.',
'admin.oidcDisplayName': 'Tên hiển thị',
'admin.oidcIssuer': 'Nhà phát hành URL',
'admin.oidcIssuerHint': 'Nhà phát hành kết nối OpenID URL của nhà cung cấp. ví dụ. https://accounts.google.com',
'admin.oidcSaved': 'Đã lưu cấu hình OIDC',
'admin.oidcOnlyMode': 'Vô hiệu hóa xác thực mật khẩu',
- 'admin.oidcOnlyModeHint':
- 'Khi được bật, chỉ cho phép đăng nhập SSO. Đăng nhập và đăng ký dựa trên mật khẩu bị chặn.',
+ 'admin.oidcOnlyModeHint': 'Khi được bật, chỉ cho phép đăng nhập SSO. Đăng nhập và đăng ký dựa trên mật khẩu bị chặn.',
'admin.fileTypes': 'Các loại tệp được phép',
'admin.fileTypesHint': 'Định cấu hình loại tệp mà người dùng có thể tải lên.',
- 'admin.fileTypesFormat': 'Các phần mở rộng được phân tách bằng dấu phẩy (ví dụ: jpg,png,pdf,doc). Sử dụng * để cho phép tất cả các loại.',
+ 'admin.fileTypesFormat':
+ 'Các phần mở rộng được phân tách bằng dấu phẩy (ví dụ: jpg,png,pdf,doc). Sử dụng * để cho phép tất cả các loại.',
'admin.fileTypesSaved': 'Đã lưu cài đặt loại tệp',
'admin.placesPhotos.title': 'Đặt ảnh',
'admin.placesPhotos.subtitle':
'Tìm nạp ảnh từ Google Địa điểm API. Tắt để lưu hạn ngạch API. Hình ảnh của Wikimedia không bị ảnh hưởng.',
'admin.placesAutocomplete.title': 'Đặt Tự động hoàn thành',
- 'admin.placesAutocomplete.subtitle': 'Sử dụng Google Địa điểm API để có các đề xuất tìm kiếm. Tắt để lưu hạn ngạch API.',
+ 'admin.placesAutocomplete.subtitle':
+ 'Sử dụng Google Địa điểm API để có các đề xuất tìm kiếm. Tắt để lưu hạn ngạch API.',
'admin.placesDetails.title': 'Chi tiết địa điểm',
'admin.placesDetails.subtitle':
'Tìm nạp thông tin chi tiết về địa điểm (giờ, xếp hạng, trang web) từ Google Địa điểm API. Tắt để lưu hạn ngạch API.',
@@ -214,6 +219,11 @@ const admin: TranslationStrings = {
'admin.tabs.plugins': 'Plugins',
'admin.plugins.rescan': 'Quét lại',
'admin.plugins.rescanned': 'Đã quét lại thư mục plugin',
+ 'admin.plugins.upload': 'Tải plugin lên',
+ 'admin.plugins.dropToUpload': 'Thả tệp .zip plugin để cài đặt',
+ 'admin.plugins.uploaded': 'Đã tải lên plugin “{name}” — kích hoạt để chạy',
+ 'admin.plugins.sideloaded': 'Tải thủ công',
+ 'admin.plugins.sideloadedHint': 'Đã tải lên thủ công — không từ kho đăng ký, chưa ký và chưa duyệt',
'admin.plugins.browse': 'Duyệt plugin',
'admin.plugins.installed': 'Đã cài đặt',
'admin.plugins.install': 'Cài đặt',
@@ -228,11 +238,13 @@ const admin: TranslationStrings = {
'admin.plugins.noErrors': 'Chưa ghi nhận lỗi nào.',
'admin.plugins.uninstalled': 'Đã gỡ cài đặt plugin',
'admin.plugins.uninstallTitle': 'Gỡ cài đặt plugin?',
- 'admin.plugins.uninstallBody': 'Thao tác này sẽ dừng plugin, xóa mã nguồn và toàn bộ dữ liệu của nó. Không thể hoàn tác.',
+ 'admin.plugins.uninstallBody':
+ 'Thao tác này sẽ dừng plugin, xóa mã nguồn và toàn bộ dữ liệu của nó. Không thể hoàn tác.',
'admin.plugins.status.starting': 'Đang khởi động…',
'admin.plugins.type.widget': 'Widget',
'admin.plugins.type.page': 'Trang',
'admin.plugins.type.integration': 'Tích hợp',
+ 'admin.plugins.type.trip-page': 'Trang chuyến đi',
'admin.plugins.reviewed': 'Đã kiểm duyệt',
'admin.plugins.unreviewed': 'Chưa kiểm duyệt',
'admin.plugins.updated': 'Đã cập nhật plugin',
@@ -242,10 +254,12 @@ const admin: TranslationStrings = {
'admin.plugins.title': 'Plugins',
'admin.plugins.subtitle': 'Cài đặt và quản lý các plugin bên thứ ba trên hệ thống của bạn.',
'admin.plugins.disabledTitle': 'Plugin đang bị tắt',
- 'admin.plugins.disabledBody': 'Môi trường chạy plugin đang bị tắt (TREK_PLUGINS_ENABLED). Không plugin nào có thể chạy cho đến khi quản trị viên bật nó trong cấu hình máy chủ.',
+ 'admin.plugins.disabledBody':
+ 'Môi trường chạy plugin đang bị tắt (TREK_PLUGINS_ENABLED). Không plugin nào có thể chạy cho đến khi quản trị viên bật nó trong cấu hình máy chủ.',
'admin.plugins.empty': 'Chưa cài đặt plugin nào.',
'admin.plugins.loadError': 'Không thể tải danh sách plugin.',
- 'admin.plugins.scaffoldNote': 'Tính năng cài đặt và kích hoạt plugin sẽ có trong bản cập nhật sau. Hiện bảng này chỉ liệt kê các plugin đã cài đặt.',
+ 'admin.plugins.scaffoldNote':
+ 'Tính năng cài đặt và kích hoạt plugin sẽ có trong bản cập nhật sau. Hiện bảng này chỉ liệt kê các plugin đã cài đặt.',
'admin.plugins.status.active': 'Đang hoạt động',
'admin.plugins.status.inactive': 'Không hoạt động',
'admin.plugins.status.disabled': 'Đã tắt',
@@ -267,11 +281,34 @@ const admin: TranslationStrings = {
'admin.plugins.reviewedOn': 'Đã kiểm duyệt {date}',
'admin.plugins.perm.db:own': 'Lưu trữ dữ liệu riêng trong một cơ sở dữ liệu cách ly',
'admin.plugins.perm.db:read:trips': 'Đọc các chuyến đi mà người dùng hiện tại có quyền truy cập',
- 'admin.plugins.perm.db:read:users': 'Đọc thông tin hồ sơ cơ bản (tên, ảnh đại diện — không bao giờ là thông tin đăng nhập)',
+ 'admin.plugins.perm.db:read:users':
+ 'Đọc thông tin hồ sơ cơ bản (tên, ảnh đại diện — không bao giờ là thông tin đăng nhập)',
+ 'admin.plugins.perm.db:read:costs': 'Đọc chi phí (mục ngân sách) mà người dùng hiện tại có quyền truy cập',
+ 'admin.plugins.perm.db:read:packing':
+ 'Đọc danh sách hành lý của các chuyến đi mà người dùng hiện tại có quyền truy cập',
+ 'admin.plugins.perm.db:read:files': 'Đọc tệp của các chuyến đi mà người dùng hiện tại có quyền truy cập',
+ 'admin.plugins.perm.db:write:costs':
+ 'Tạo chi phí (mục ngân sách) trên các chuyến đi mà người dùng hiện tại có quyền chỉnh sửa',
+ 'admin.plugins.perm.db:write:places':
+ 'Thêm, chỉnh sửa và xóa địa điểm trên các chuyến đi mà người dùng hiện tại có quyền chỉnh sửa',
+ 'admin.plugins.perm.db:write:days':
+ 'Thêm, chỉnh sửa và xóa ngày trên các chuyến đi mà người dùng hiện tại có quyền chỉnh sửa',
+ 'admin.plugins.perm.db:write:itinerary':
+ 'Gán và xóa địa điểm vào các ngày của chuyến đi mà người dùng hiện tại có quyền chỉnh sửa',
+ 'admin.plugins.perm.db:write:trips':
+ 'Chỉnh sửa chi tiết chuyến đi (tiêu đề, ngày, tiền tệ…) trên các chuyến đi mà người dùng hiện tại có quyền chỉnh sửa',
+ 'admin.plugins.perm.db:meta':
+ 'Đính kèm dữ liệu riêng của nó vào các chuyến đi, địa điểm và ngày mà người dùng đang thao tác có quyền truy cập',
'admin.plugins.perm.ws:broadcast:trip': 'Gửi cập nhật thời gian thực đến các thành viên chuyến đi',
'admin.plugins.perm.ws:broadcast:user': 'Gửi cập nhật thời gian thực đến từng người dùng',
'admin.plugins.perm.hook:photo-provider': 'Cung cấp ảnh cho tính năng Ảnh',
'admin.plugins.perm.hook:calendar-source': 'Cung cấp sự kiện cho lịch',
+ 'admin.plugins.perm.hook:place-detail-provider':
+ 'Đóng góp thêm thông tin chi tiết (đánh giá, xếp hạng, liên kết) cho một địa điểm',
+ 'admin.plugins.perm.hook:trip-warning-provider':
+ 'Đưa ra cảnh báo xác thực trên một chuyến đi (hiển thị trong trình lập kế hoạch)',
+ 'admin.plugins.perm.events:subscribe':
+ 'Phản hồi các sự kiện hoạt động cốt lõi (chỉ tên sự kiện + chuyến đi, không bao giờ là nội dung)',
'admin.plugins.perm.http:outbound': 'Gửi yêu cầu ra ngoài đến các máy chủ đã khai báo',
'admin.plugins.updateConsentTitle': 'Bản cập nhật này cần các quyền mới',
'admin.plugins.updateConsentBody':
@@ -323,11 +360,36 @@ const admin: TranslationStrings = {
'admin.plugins.restarted': 'Đã khởi động lại plugin',
'admin.plugins.cap.readsTrips': 'Đọc chuyến đi của bạn',
'admin.plugins.cap.readsUsers': 'Đọc hồ sơ cơ bản',
+ 'admin.plugins.cap.readsCosts': 'Đọc chi phí của bạn',
+ 'admin.plugins.cap.readsPacking': 'Đọc danh sách hành lý',
+ 'admin.plugins.cap.readsFiles': 'Đọc tệp chuyến đi',
+ 'admin.plugins.cap.writesCosts': 'Thêm chi phí',
+ 'admin.plugins.cap.writesPlaces': 'Chỉnh sửa địa điểm',
+ 'admin.plugins.cap.writesDays': 'Chỉnh sửa ngày',
+ 'admin.plugins.cap.writesItinerary': 'Chỉnh sửa lịch trình',
+ 'admin.plugins.cap.writesTrips': 'Chỉnh sửa chuyến đi',
+ 'admin.plugins.cap.metadata': 'Thêm siêu dữ liệu',
'admin.plugins.cap.widget': 'Widget bảng điều khiển',
'admin.plugins.cap.heroWidget': 'Widget thẻ lên máy bay',
+ 'admin.plugins.cap.placeSlot': 'Chi tiết địa điểm',
'admin.plugins.cap.realtime': 'Cập nhật thời gian thực',
'admin.plugins.cap.photos': 'Cung cấp ảnh',
'admin.plugins.cap.calendar': 'Cung cấp sự kiện lịch',
+ 'admin.plugins.cap.placeDetails': 'Làm phong phú địa điểm',
+ 'admin.plugins.cap.warnings': 'Gắn cờ vấn đề',
+ 'admin.plugins.cap.events': 'Phản hồi hoạt động',
+ 'admin.plugins.cap.requiresAddon': 'Cần {addon}',
+ 'admin.plugins.cap.dependsOn': 'Cần {id} {version}',
+ 'admin.plugins.dep.addonDisabledToast': 'Trước tiên hãy bật các tiện ích bổ sung cần thiết: {addons}',
+ 'admin.plugins.dep.autoEnabled': 'Đã bật các plugin cần thiết trước: {plugins}',
+ 'admin.plugins.dep.downloaded': 'Đã tải xuống {id}',
+ 'admin.plugins.dep.resolveTitle': 'Thiếu phần phụ thuộc',
+ 'admin.plugins.dep.resolveBody': '“{name}” cần cài đặt các plugin này trước khi có thể bật.',
+ 'admin.plugins.dep.requires': 'Cần {version}',
+ 'admin.plugins.dep.mismatch': 'Cần {wanted} — đã cài {installed}',
+ 'admin.plugins.dep.download': 'Tải xuống',
+ 'admin.plugins.dep.update': 'Cập nhật',
+ 'admin.plugins.dep.resolveHint': 'Tải phiên bản tương thích mới nhất, bao gồm cả các phần phụ thuộc của nó.',
'admin.plugins.accessTitle': 'Những gì có thể truy cập',
'admin.plugins.connectsTitle': 'Kết nối tới',
'admin.plugins.detailsTitle': 'Chi tiết',
@@ -349,7 +411,8 @@ const admin: TranslationStrings = {
'admin.addons.catalog.atlas.name': 'Bản đồ',
'admin.addons.catalog.atlas.description': 'Bản đồ thế giới với các quốc gia đã ghé thăm và số liệu thống kê du lịch',
'admin.addons.catalog.collab.name': 'Cộng tác',
- 'admin.addons.catalog.collab.description': 'Ghi chú, thăm dò ý kiến ​​và trò chuyện theo thời gian thực để lập kế hoạch chuyến đi',
+ 'admin.addons.catalog.collab.description':
+ 'Ghi chú, thăm dò ý kiến ​​và trò chuyện theo thời gian thực để lập kế hoạch chuyến đi',
'admin.addons.catalog.memories.name': 'Hình ảnh (Immich)',
'admin.addons.catalog.memories.description': 'Chia sẻ ảnh chuyến đi qua phiên bản Immich của bạn',
'admin.addons.catalog.mcp.name': 'MCP',
@@ -357,7 +420,7 @@ const admin: TranslationStrings = {
'admin.addons.subtitleBefore': 'Bật hoặc tắt các tính năng để tùy chỉnh',
'admin.addons.subtitleAfter': 'kinh nghiệm.',
'admin.addons.enabled': 'Đã bật',
- 'admin.addons.disabled': 'Tàn tật',
+ 'admin.addons.disabled': 'Tắt',
'admin.addons.type.trip': 'Chuyến đi',
'admin.addons.type.global': 'Toàn cầu',
'admin.addons.type.integration': 'Tích hợp',
@@ -437,7 +500,8 @@ const admin: TranslationStrings = {
'admin.update.confirmTitle': 'Cài đặt bản cập nhật?',
'admin.update.confirmText':
'TREK sẽ được cập nhật từ {current} lên {version}. Máy chủ sẽ tự động khởi động lại sau đó.',
- 'admin.update.dataInfo': 'Tất cả dữ liệu của bạn (chuyến đi, người dùng, khóa API, nội dung tải lên, Vacay, Atlas, ngân sách) sẽ được giữ nguyên.',
+ 'admin.update.dataInfo':
+ 'Tất cả dữ liệu của bạn (chuyến đi, người dùng, khóa API, nội dung tải lên, Vacay, Atlas, ngân sách) sẽ được giữ nguyên.',
'admin.update.warning': 'Ứng dụng sẽ không khả dụng trong thời gian ngắn khi khởi động lại.',
'admin.update.confirm': 'Cập nhật ngay',
'admin.update.installing': 'Đang cập nhật…',
@@ -462,7 +526,8 @@ const admin: TranslationStrings = {
'admin.passkey.title': 'Đăng nhập bằng mật mã',
'admin.passkey.cardHint': 'Cho phép người dùng đăng nhập bằng mật mã (WebAuthn). Tắt theo mặc định.',
'admin.passkey.login': 'Kích hoạt đăng nhập bằng mật mã',
- 'admin.passkey.loginHint': 'Hiển thị tùy chọn "Đăng nhập bằng mật mã" và cho phép người dùng đăng ký mật mã trong cài đặt của họ.',
+ 'admin.passkey.loginHint':
+ 'Hiển thị tùy chọn "Đăng nhập bằng mật mã" và cho phép người dùng đăng ký mật mã trong cài đặt của họ.',
'admin.passkey.notConfigured':
'Chưa có miền WebAuthn nào giải quyết được việc triển khai này. Đặt APP_URL hoặc Relying Party ID bên dưới — mật mã sẽ được ẩn cho đến lúc đó.',
'admin.passkey.rpId': 'Đảng dựa vào ID (miền)',
diff --git a/shared/src/i18n/vi/backup.ts b/shared/src/i18n/vi/backup.ts
index 0b147c624..5f841eca0 100644
--- a/shared/src/i18n/vi/backup.ts
+++ b/shared/src/i18n/vi/backup.ts
@@ -12,8 +12,10 @@ const backup: TranslationStrings = {
'backup.createFirst': 'Tạo bản sao lưu đầu tiên',
'backup.download': 'Tải xuống',
'backup.restore': 'Khôi phục',
- 'backup.confirm.restore': 'Khôi phục bản sao lưu "{name}"?\n\nTất cả dữ liệu hiện tại sẽ được thay thế bằng bản sao lưu.',
- 'backup.confirm.uploadRestore': 'Tải lên và khôi phục tập tin sao lưu "{name}"?\n\nTất cả dữ liệu hiện tại sẽ bị ghi đè.',
+ 'backup.confirm.restore':
+ 'Khôi phục bản sao lưu "{name}"?\n\nTất cả dữ liệu hiện tại sẽ được thay thế bằng bản sao lưu.',
+ 'backup.confirm.uploadRestore':
+ 'Tải lên và khôi phục tập tin sao lưu "{name}"?\n\nTất cả dữ liệu hiện tại sẽ bị ghi đè.',
'backup.confirm.delete': 'Xóa bản sao lưu "{name}"?',
'backup.toast.loadError': 'Không tải được bản sao lưu',
'backup.toast.created': 'Sao lưu được tạo thành công',
diff --git a/shared/src/i18n/vi/budget.ts b/shared/src/i18n/vi/budget.ts
index 1964a9097..069425030 100644
--- a/shared/src/i18n/vi/budget.ts
+++ b/shared/src/i18n/vi/budget.ts
@@ -52,6 +52,9 @@ const budget: TranslationStrings = {
'costs.nothingOwed': 'Không có gì nợ bạn',
'costs.yourShare': 'Chia sẻ của bạn',
'costs.youPaid': 'Bạn đã trả tiền',
+ 'costs.outstanding': 'Số tiền chưa thanh toán',
+ 'costs.outstandingSub': 'Chi phí chưa có người trả',
+ 'costs.outstandingItems': 'chi phí cần người trả',
'costs.expenses': 'Chi phí',
'costs.entries': '{count} mục',
'costs.searchPlaceholder': 'Chi phí tìm kiếm…',
diff --git a/shared/src/i18n/vi/collection.ts b/shared/src/i18n/vi/collection.ts
index 8ad2cdaaa..2d9e08df1 100644
--- a/shared/src/i18n/vi/collection.ts
+++ b/shared/src/i18n/vi/collection.ts
@@ -49,7 +49,8 @@ const collection: TranslationStrings = {
'collections.editList': 'Đổi tên',
'collections.listMenu': 'Tùy chọn danh sách',
'collections.deleteList': 'Xóa danh sách',
- 'collections.deleteListConfirm': 'Thao tác này xóa vĩnh viễn danh sách và tất cả địa điểm đã lưu trong đó. Không thể hoàn tác.',
+ 'collections.deleteListConfirm':
+ 'Thao tác này xóa vĩnh viễn danh sách và tất cả địa điểm đã lưu trong đó. Không thể hoàn tác.',
'collections.listName': 'Tên danh sách',
'collections.listNamePlaceholder': 'vd. Tokyo 2025',
'collections.listColor': 'Màu',
@@ -127,7 +128,8 @@ const collection: TranslationStrings = {
'collections.share.memberHint': 'Chỉ chủ sở hữu danh sách mới có thể mời hoặc xóa người.',
'collections.share.cancel': 'Hủy',
'collections.share.leave': 'Rời khỏi danh sách',
- 'collections.share.leaveConfirm': 'Rời khỏi danh sách được chia sẻ này? Bạn sẽ mất quyền truy cập cho đến khi được mời lại.',
+ 'collections.share.leaveConfirm':
+ 'Rời khỏi danh sách được chia sẻ này? Bạn sẽ mất quyền truy cập cho đến khi được mời lại.',
'collections.share.left': 'Bạn đã rời khỏi danh sách',
'collections.share.remove': 'Xóa',
diff --git a/shared/src/i18n/vi/dashboard.ts b/shared/src/i18n/vi/dashboard.ts
index c529ac876..8578ade6a 100644
--- a/shared/src/i18n/vi/dashboard.ts
+++ b/shared/src/i18n/vi/dashboard.ts
@@ -81,7 +81,8 @@ const dashboard: TranslationStrings = {
'dashboard.endDate': 'Ngày kết thúc',
'dashboard.dayCount': 'Số ngày',
'dashboard.dayCountHint': 'Lên kế hoạch cho bao nhiêu ngày khi không có ngày đi du lịch nào được ấn định.',
- 'dashboard.noDateHint': 'Không có ngày nào được đặt - 7 ngày mặc định sẽ được tạo. Bạn có thể thay đổi điều này bất cứ lúc nào.',
+ 'dashboard.noDateHint':
+ 'Không có ngày nào được đặt - 7 ngày mặc định sẽ được tạo. Bạn có thể thay đổi điều này bất cứ lúc nào.',
'dashboard.coverImage': 'Ảnh bìa',
'dashboard.addCoverImage': 'Thêm ảnh bìa (hoặc kéo và thả)',
'dashboard.addMembers': 'Bạn đồng hành',
diff --git a/shared/src/i18n/vi/externalNotifications.ts b/shared/src/i18n/vi/externalNotifications.ts
index ea1dd6f77..29ccb76db 100644
--- a/shared/src/i18n/vi/externalNotifications.ts
+++ b/shared/src/i18n/vi/externalNotifications.ts
@@ -59,7 +59,8 @@ const en: NotificationLocale = {
body: 'Chúng tôi đã nhận được yêu cầu đặt lại mật khẩu cho tài khoản TREK của bạn. Nhấp vào nút bên dưới để đặt mật khẩu mới.',
ctaIntro: 'Đặt lại mật khẩu',
expiry: 'Liên kết này sẽ hết hạn sau 60 phút.',
- ignore: "Nếu bạn không yêu cầu điều này, bạn có thể bỏ qua email này một cách an toàn — mật khẩu của bạn sẽ không thay đổi.",
+ ignore:
+ 'Nếu bạn không yêu cầu điều này, bạn có thể bỏ qua email này một cách an toàn — mật khẩu của bạn sẽ không thay đổi.',
},
};
diff --git a/shared/src/i18n/vi/help.ts b/shared/src/i18n/vi/help.ts
index b72752502..fcac0d06f 100644
--- a/shared/src/i18n/vi/help.ts
+++ b/shared/src/i18n/vi/help.ts
@@ -6,8 +6,7 @@ const help: TranslationStrings = {
'help.contents': 'Nội dung',
'help.noResults': 'Không có trang nào phù hợp.',
'help.errorTitle': 'Không thể tải trang này',
- 'help.errorBody':
- 'Nội dung trợ giúp được lấy từ wiki TREK. Hãy kiểm tra kết nối và thử lại.',
+ 'help.errorBody': 'Nội dung trợ giúp được lấy từ wiki TREK. Hãy kiểm tra kết nối và thử lại.',
};
export default help;
diff --git a/shared/src/i18n/vi/index.ts b/shared/src/i18n/vi/index.ts
index bcd280f42..eef4c74aa 100644
--- a/shared/src/i18n/vi/index.ts
+++ b/shared/src/i18n/vi/index.ts
@@ -5,6 +5,7 @@ import backup from './backup';
import budget from './budget';
import categories from './categories';
import collab from './collab';
+import collection from './collection';
import common from './common';
import dashboard from './dashboard';
import day from './day';
@@ -40,7 +41,6 @@ import trip from './trip';
import trips from './trips';
import undo from './undo';
import vacay from './vacay';
-import collection from './collection';
const locale = {
...common,
diff --git a/shared/src/i18n/vi/members.ts b/shared/src/i18n/vi/members.ts
index b15d6b078..0939e3237 100644
--- a/shared/src/i18n/vi/members.ts
+++ b/shared/src/i18n/vi/members.ts
@@ -25,7 +25,8 @@ const members: TranslationStrings = {
'members.transferError': 'Không thể chuyển quyền sở hữu',
'members.guests': 'Khách',
'members.guest': 'Khách',
- 'members.guestsHint': 'Người không có tài khoản. Có thể giao chi phí, hành lý và công việc cho họ, nhưng họ không thể đăng nhập.',
+ 'members.guestsHint':
+ 'Người không có tài khoản. Có thể giao chi phí, hành lý và công việc cho họ, nhưng họ không thể đăng nhập.',
'members.addGuest': 'Thêm khách',
'members.guestNamePlaceholder': 'Tên khách',
'members.guestAdded': 'Đã thêm khách',
diff --git a/shared/src/i18n/vi/memories.ts b/shared/src/i18n/vi/memories.ts
index e5a8cdcd7..ad05b3062 100644
--- a/shared/src/i18n/vi/memories.ts
+++ b/shared/src/i18n/vi/memories.ts
@@ -3,7 +3,8 @@ import type { TranslationStrings } from '../types';
const memories: TranslationStrings = {
'memories.title': 'Ảnh',
'memories.notConnected': '{provider_name} không được kết nối',
- 'memories.notConnectedHint': 'Kết nối phiên bản {provider_name} của bạn trong Cài đặt để có thể thêm ảnh vào chuyến đi này.',
+ 'memories.notConnectedHint':
+ 'Kết nối phiên bản {provider_name} của bạn trong Cài đặt để có thể thêm ảnh vào chuyến đi này.',
'memories.notConnectedMultipleHint':
'Kết nối bất kỳ nhà cung cấp ảnh nào sau đây: {provider_names} trong Cài đặt để có thể thêm ảnh vào chuyến đi này.',
'memories.noDates': 'Thêm ngày vào chuyến đi của bạn để tải ảnh.',
diff --git a/shared/src/i18n/vi/oauth.ts b/shared/src/i18n/vi/oauth.ts
index f3ca3d666..157af1601 100644
--- a/shared/src/i18n/vi/oauth.ts
+++ b/shared/src/i18n/vi/oauth.ts
@@ -33,7 +33,8 @@ const oauth: TranslationStrings = {
'oauth.scope.packing:read.label': 'Xem danh sách đóng gói',
'oauth.scope.packing:read.description': 'Đọc các mặt hàng đóng gói, túi xách và người được giao danh mục',
'oauth.scope.packing:write.label': 'Quản lý danh sách đóng gói',
- 'oauth.scope.packing:write.description': 'Thêm, cập nhật, xóa, chuyển đổi và sắp xếp lại các mặt hàng và túi đóng gói',
+ 'oauth.scope.packing:write.description':
+ 'Thêm, cập nhật, xóa, chuyển đổi và sắp xếp lại các mặt hàng và túi đóng gói',
'oauth.scope.todos:read.label': 'Xem danh sách việc cần làm',
'oauth.scope.todos:read.description': 'Đọc các mục việc cần làm trong chuyến đi và người được giao danh mục',
'oauth.scope.todos:write.label': 'Quản lý danh sách việc cần làm',
@@ -76,7 +77,8 @@ const oauth: TranslationStrings = {
'oauth.authorize.loginButton': 'Đăng nhập vào TREK',
'oauth.authorize.requestLabel': 'Yêu cầu ủy quyền',
'oauth.authorize.requestDescription': 'Ứng dụng này đang yêu cầu quyền truy cập vào tài khoản TREK của bạn.',
- 'oauth.authorize.trustNote': 'Chỉ cấp quyền truy cập cho các ứng dụng mà bạn tin tưởng. Dữ liệu của bạn vẫn còn trên máy chủ của bạn.',
+ 'oauth.authorize.trustNote':
+ 'Chỉ cấp quyền truy cập cho các ứng dụng mà bạn tin tưởng. Dữ liệu của bạn vẫn còn trên máy chủ của bạn.',
'oauth.authorize.selectScope': 'Chọn ít nhất một phạm vi',
'oauth.authorize.approveOneScope': 'Phê duyệt (phạm vi {count})',
'oauth.authorize.approveManyScopes': 'Phê duyệt ({count} phạm vi)',
@@ -86,6 +88,7 @@ const oauth: TranslationStrings = {
'oauth.authorize.permissionsRequested': 'Đã yêu cầu quyền',
'oauth.authorize.alwaysIncluded': 'Luôn bao gồm',
'oauth.authorize.alwaysTool.listTrips': 'Liệt kê các chuyến đi của bạn để AI có thể khám phá ID chuyến đi',
- 'oauth.authorize.alwaysTool.getTripSummary': 'Đọc tổng quan về chuyến đi cần thiết để sử dụng bất kỳ công cụ nào khác',
+ 'oauth.authorize.alwaysTool.getTripSummary':
+ 'Đọc tổng quan về chuyến đi cần thiết để sử dụng bất kỳ công cụ nào khác',
};
export default oauth;
diff --git a/shared/src/i18n/vi/places.ts b/shared/src/i18n/vi/places.ts
index 1b22ee83a..2eb8915e5 100644
--- a/shared/src/i18n/vi/places.ts
+++ b/shared/src/i18n/vi/places.ts
@@ -24,8 +24,8 @@ const places: TranslationStrings = {
'places.kmlImportNoneSelected': 'Chọn ít nhất một loại để nhập.',
'places.selectionCount': '{count} đã chọn',
'places.deleteSelected': 'Xóa đã chọn',
- 'places.changeCategory': "Change category",
- 'places.categoryChanged': "{count} places updated",
+ 'places.changeCategory': 'Change category',
+ 'places.categoryChanged': '{count} places updated',
'places.kmlKmzImported': '{count} địa điểm được nhập từ KMZ/KML',
'places.urlResolved': 'Địa điểm được nhập từ URL',
'places.importList': 'Nhập danh sách',
@@ -83,7 +83,7 @@ const places: TranslationStrings = {
'places.categoryCreateError': 'Không tạo được danh mục',
'places.nameRequired': 'Vui lòng nhập tên',
'places.saveError': 'Không lưu được',
- 'places.duplicateExists': '\'{name}\' đã có trong chuyến đi này.',
+ 'places.duplicateExists': "'{name}' đã có trong chuyến đi này.",
'places.addAnyway': 'Vẫn thêm',
'places.enrichOnImport': 'Làm phong phú các địa điểm thông qua Google',
'places.enrichOnImportHint':
diff --git a/shared/src/i18n/vi/reservations.ts b/shared/src/i18n/vi/reservations.ts
index 18e42780b..d78a50748 100644
--- a/shared/src/i18n/vi/reservations.ts
+++ b/shared/src/i18n/vi/reservations.ts
@@ -6,7 +6,8 @@ const reservations: TranslationStrings = {
'reservations.emptyHint': 'Thêm đặt chỗ cho chuyến bay, khách sạn và hơn thế nữa',
'reservations.add': 'Thêm đặt chỗ',
'reservations.addManual': 'Thêm đặt chỗ',
- 'reservations.placeHint': 'Mẹo: Tốt nhất bạn nên tạo đặt chỗ trực tiếp từ một nơi để liên kết chúng với kế hoạch trong ngày của bạn.',
+ 'reservations.placeHint':
+ 'Mẹo: Tốt nhất bạn nên tạo đặt chỗ trực tiếp từ một nơi để liên kết chúng với kế hoạch trong ngày của bạn.',
'reservations.confirmed': 'Đã xác nhận',
'reservations.pending': 'Chưa giải quyết',
'reservations.summary': '{confirmed} đã xác nhận, {pending} đang chờ xử lý',
@@ -126,7 +127,8 @@ const reservations: TranslationStrings = {
'reservations.import.cta': 'Nhập từ tập tin',
'reservations.import.dropHere': 'Thả file xác nhận đặt phòng tại đây, hoặc bấm để chọn',
'reservations.import.dropActive': 'Thả tập tin để nhập',
- 'reservations.import.acceptedFormats': 'Đã chấp nhận: EML, PDF, PKPass, HTML, TXT (tối đa 10 MB mỗi cái, tối đa 5 tệp)',
+ 'reservations.import.acceptedFormats':
+ 'Đã chấp nhận: EML, PDF, PKPass, HTML, TXT (tối đa 10 MB mỗi cái, tối đa 5 tệp)',
'reservations.import.parsing': 'Đang phân tích tệp…',
'reservations.import.previewHeading': '{count} đã tìm thấy (các) đặt chỗ',
'reservations.import.previewEmpty': 'Không thể trích xuất đặt chỗ nào từ các tập tin đã tải lên.',
@@ -138,14 +140,16 @@ const reservations: TranslationStrings = {
'reservations.import.back': 'Quay lại',
'reservations.import.success': '{count} đặt chỗ đã được nhập',
'reservations.import.partialFailure': '{created} đã được nhập, {failed} không thành công',
- 'reservations.import.error': 'Phân tích cú pháp không thành công. Hãy chắc chắn rằng tập tin này là một xác nhận đặt phòng hợp lệ.',
+ 'reservations.import.error':
+ 'Phân tích cú pháp không thành công. Hãy chắc chắn rằng tập tin này là một xác nhận đặt phòng hợp lệ.',
'reservations.import.unavailable': 'Nhập đăng ký không có sẵn trên máy chủ này.',
'reservations.import.unsupportedFormat': 'Định dạng tệp không được hỗ trợ. Sử dụng EML, PDF, PKPass, HTML hoặc TXT.',
'reservations.import.fileTooLarge': 'Tệp "{name}" vượt quá giới hạn 10 MB.',
'reservations.airtrail.title': 'Nhập từ AirTrail',
'reservations.airtrail.cta': 'AirTrail',
'reservations.airtrail.synced': 'AirTrail',
- 'reservations.airtrail.syncedHint': 'Đã đồng bộ hóa từ AirTrail — các chỉnh sửa vẫn được đồng bộ hóa theo cả hai cách.',
+ 'reservations.airtrail.syncedHint':
+ 'Đã đồng bộ hóa từ AirTrail — các chỉnh sửa vẫn được đồng bộ hóa theo cả hai cách.',
'reservations.airtrail.notSynced': 'Chưa được đồng bộ hóa',
'reservations.airtrail.notSyncedHint': 'Chuyến bay này đã bị xóa trong AirTrail và không còn đồng bộ hóa nữa.',
'reservations.airtrail.loadError': 'Không thể tải chuyến bay AirTrail của bạn.',
diff --git a/shared/src/i18n/vi/settings.ts b/shared/src/i18n/vi/settings.ts
index 5d0a28b27..18597b78e 100644
--- a/shared/src/i18n/vi/settings.ts
+++ b/shared/src/i18n/vi/settings.ts
@@ -17,7 +17,8 @@ const settings: TranslationStrings = {
'settings.mapTemplatePlaceholder': 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
'settings.mapHint': 'Mẫu URL cho ô bản đồ',
'settings.mapProvider': 'Nhà cung cấp bản đồ',
- 'settings.mapProviderHint': 'Ảnh hưởng tới Công cụ lập kế hoạch chuyến đi và bản đồ hành trình. Atlas luôn sử dụng Leaflet.',
+ 'settings.mapProviderHint':
+ 'Ảnh hưởng tới Công cụ lập kế hoạch chuyến đi và bản đồ hành trình. Atlas luôn sử dụng Leaflet.',
'settings.mapLeafletSubtitle': '2D cổ điển, bất kỳ ô raster nào',
'settings.mapMapboxSubtitle': 'Gạch vector, tòa nhà 3D và địa hình',
'settings.mapMapLibreSubtitle': 'OpenFreeMap gạch vector, không có mã thông báo',
@@ -29,11 +30,13 @@ const settings: TranslationStrings = {
'settings.mapStylePlaceholder': 'Chọn kiểu Mapbox',
'settings.mapStyleHint': 'Đặt trước hoặc của riêng bạn mapbox://styles/USER/ID URL',
'settings.mapOpenFreeMapStylePlaceholder': 'Chọn kiểu OpenFreeMap',
- 'settings.mapOpenFreeMapStyleHint': 'Đặt trước hoặc kiểu OpenFreeMap URL. Kiểu OpenFreeMap hoạt động mà không cần mã thông báo.',
+ 'settings.mapOpenFreeMapStyleHint':
+ 'Đặt trước hoặc kiểu OpenFreeMap URL. Kiểu OpenFreeMap hoạt động mà không cần mã thông báo.',
'settings.map3dBuildings': 'Tòa nhà & địa hình 3D',
'settings.map3dHint': 'Cao độ + ép đùn tòa nhà 3D thực - hoạt động trên mọi phong cách, bao gồm cả vệ tinh.',
'settings.mapHighQuality': 'Chế độ chất lượng cao',
- 'settings.mapHighQualityHint': 'Khử răng cưa + chiếu hình ảnh địa cầu cho các cạnh sắc nét hơn và thế giới quan chân thực hơn.',
+ 'settings.mapHighQualityHint':
+ 'Khử răng cưa + chiếu hình ảnh địa cầu cho các cạnh sắc nét hơn và thế giới quan chân thực hơn.',
'settings.mapHighQualityWarning': 'Có thể ảnh hưởng đến hiệu suất trên các thiết bị cấp thấp hơn.',
'settings.mapTipLabel': 'Mẹo:',
'settings.mapTip':
@@ -68,7 +71,8 @@ const settings: TranslationStrings = {
'settings.optimizeFromAccommodationHint':
'Khi tối ưu hóa một ngày, hãy bắt đầu lộ trình tại khách sạn nơi bạn thức dậy và kết thúc tại khách sạn bạn nhận phòng vào tối hôm đó.',
'settings.aiAlwaysRetry': 'Luôn thử lại việc nhập đặt chỗ bằng AI.',
- 'settings.aiAlwaysRetryHint': 'Khi trình phân tích cú pháp tiêu chuẩn không thể đọc được tệp, hãy tự động thử lại bằng AI..',
+ 'settings.aiAlwaysRetryHint':
+ 'Khi trình phân tích cú pháp tiêu chuẩn không thể đọc được tệp, hãy tự động thử lại bằng AI..',
'settings.notifications': 'Thông báo',
'settings.notifyTripInvite': 'Lời mời chuyến đi',
'settings.notifyBookingChange': 'Thay đổi đặt chỗ',
@@ -174,7 +178,8 @@ const settings: TranslationStrings = {
'settings.oauth.modal.clientNamePlaceholder': 'ví dụ. Claude Web, Ứng dụng MCP của tôi',
'settings.oauth.modal.redirectUris': 'URI chuyển hướng',
'settings.oauth.modal.redirectUrisPlaceholder': 'https://your-app.com/callback\nhttps://your-app.com/auth',
- 'settings.oauth.modal.redirectUrisHint': 'Một URI trên mỗi dòng. Yêu cầu HTTPS (miễn trừ localhost). Đối sánh chính xác được thực thi.',
+ 'settings.oauth.modal.redirectUrisHint':
+ 'Một URI trên mỗi dòng. Yêu cầu HTTPS (miễn trừ localhost). Đối sánh chính xác được thực thi.',
'settings.oauth.modal.scopes': 'Phạm vi được phép',
'settings.oauth.modal.scopesHint':
'list_trips và get_trip_summary luôn có sẵn — không yêu cầu phạm vi. Họ cho phép AI khám phá ID chuyến đi cần thiết để sử dụng bất kỳ công cụ nào khác.',
@@ -183,7 +188,8 @@ const settings: TranslationStrings = {
'settings.oauth.modal.creating': 'Đang đăng ký…',
'settings.oauth.modal.create': 'Đăng ký khách hàng',
'settings.oauth.modal.createdTitle': 'Khách hàng đã đăng ký',
- 'settings.oauth.modal.createdWarning': 'Bí mật của khách hàng chỉ được hiển thị một lần. Sao chép nó ngay bây giờ - nó không thể phục hồi được.',
+ 'settings.oauth.modal.createdWarning':
+ 'Bí mật của khách hàng chỉ được hiển thị một lần. Sao chép nó ngay bây giờ - nó không thể phục hồi được.',
'settings.oauth.toast.createError': 'Không thể đăng ký ứng dụng khách OAuth',
'settings.oauth.toast.deleted': 'OAuth khách hàng đã bị xóa',
'settings.oauth.toast.deleteError': 'Không xóa được ứng dụng khách OAuth',
@@ -261,7 +267,8 @@ const settings: TranslationStrings = {
'settings.mfa.requiredByPolicy':
'Quản trị viên của bạn yêu cầu xác thực hai yếu tố. Thiết lập ứng dụng xác thực bên dưới trước khi tiếp tục.',
'settings.mfa.backupTitle': 'Mã dự phòng',
- 'settings.mfa.backupDescription': 'Sử dụng các mã dự phòng một lần này nếu bạn mất quyền truy cập vào ứng dụng xác thực của mình.',
+ 'settings.mfa.backupDescription':
+ 'Sử dụng các mã dự phòng một lần này nếu bạn mất quyền truy cập vào ứng dụng xác thực của mình.',
'settings.mfa.backupWarning': 'Hãy lưu lại những mã này ngay bây giờ. Mỗi mã chỉ có thể được sử dụng một lần.',
'settings.mfa.backupCopy': 'Sao chép mã',
'settings.mfa.backupDownload': 'Tải xuống TXT',
@@ -290,7 +297,8 @@ const settings: TranslationStrings = {
'Mật mã đã được bật nhưng chưa được định cấu hình đầy đủ trên máy chủ này. Hãy yêu cầu quản trị viên của bạn đặt miền WebAuthn.',
'settings.passkey.add': 'Thêm mật mã',
'settings.passkey.addTitle': 'Thêm mật mã',
- 'settings.passkey.passwordPrompt': 'Xác nhận mật khẩu hiện tại của bạn, sau đó làm theo lời nhắc trên thiết bị của bạn.',
+ 'settings.passkey.passwordPrompt':
+ 'Xác nhận mật khẩu hiện tại của bạn, sau đó làm theo lời nhắc trên thiết bị của bạn.',
'settings.passkey.passwordRequired': 'Mật khẩu hiện tại của bạn là bắt buộc.',
'settings.passkey.namePlaceholder': 'Tên (tùy chọn, ví dụ: "iPhone")',
'settings.passkey.addedToast': 'Đã thêm mật mã',
@@ -337,7 +345,8 @@ const settings: TranslationStrings = {
'settings.aiParsing.apiKey': 'Khóa API',
'settings.aiParsing.apiKeyHint': 'Được lưu trữ mã hóa. Để trống để giữ khóa hiện tại.',
'settings.aiParsing.multimodal': 'Gửi tài liệu dưới dạng hình ảnh',
- 'settings.aiParsing.multimodalHint': 'Dành cho các mô hình hỗ trợ thị giác — gửi PDF gốc thay vì văn bản đã trích xuất.',
+ 'settings.aiParsing.multimodalHint':
+ 'Dành cho các mô hình hỗ trợ thị giác — gửi PDF gốc thay vì văn bản đã trích xuất.',
'settings.aiParsing.toast.saved': 'Đã lưu cài đặt AI',
'settings.aiParsing.toast.saveError': 'Không thể lưu cài đặt AI',
'settings.tabs.appearance': 'Giao diện',
@@ -356,8 +365,7 @@ const settings: TranslationStrings = {
'settings.appearance.contrastLow': 'Tương phản thấp',
'settings.appearance.readability': 'Khả năng đọc',
'settings.appearance.transparency': 'Độ trong suốt',
- 'settings.appearance.transparencyHint':
- 'Bề mặt trong mờ kiểu kính. Tắt để có nền đặc, tương phản cao hơn.',
+ 'settings.appearance.transparencyHint': 'Bề mặt trong mờ kiểu kính. Tắt để có nền đặc, tương phản cao hơn.',
'settings.appearance.reduceMotion': 'Giảm chuyển động',
'settings.appearance.reduceMotionHint': 'Giảm thiểu hoạt ảnh và hiệu ứng chuyển tiếp.',
'settings.appearance.density': 'Mật độ',
@@ -387,8 +395,7 @@ const settings: TranslationStrings = {
'settings.appearance.reset': 'Đặt lại về mặc định',
'settings.appearance.group.belowHero': 'Dưới ảnh bìa',
'settings.appearance.group.bottomOfPage': 'Cuối trang',
- 'settings.appearance.sidebarHint':
- 'Toàn bộ cột bên phải. Tắt đi thì bảng điều khiển sẽ căn giữa.',
+ 'settings.appearance.sidebarHint': 'Toàn bộ cột bên phải. Tắt đi thì bảng điều khiển sẽ căn giữa.',
'settings.appearance.densityHint':
'Chế độ gọn thu hẹp khoảng cách và lề để bố cục dày đặc hơn, hiển thị được nhiều hơn trên màn hình.',
'settings.appearance.textSizeAll': 'Tất cả',
@@ -413,10 +420,13 @@ const settings: TranslationStrings = {
'settings.offline.cache.title': 'Bộ nhớ đệm ngoại tuyến',
'settings.offline.mode.title': 'Chế độ ngoại tuyến',
'settings.offline.mode.force': 'Bắt buộc chế độ ngoại tuyến',
- 'settings.offline.mode.forceHint': 'Chỉ làm việc với dữ liệu trong bộ nhớ đệm và đưa các thay đổi của bạn vào hàng đợi. Tắt để kết nối lại và đồng bộ hóa.',
- 'settings.offline.mode.active': 'Chế độ ngoại tuyến đang bật — các thay đổi của bạn đã được đưa vào hàng đợi và sẽ đồng bộ hóa khi bạn tắt nó.',
+ 'settings.offline.mode.forceHint':
+ 'Chỉ làm việc với dữ liệu trong bộ nhớ đệm và đưa các thay đổi của bạn vào hàng đợi. Tắt để kết nối lại và đồng bộ hóa.',
+ 'settings.offline.mode.active':
+ 'Chế độ ngoại tuyến đang bật — các thay đổi của bạn đã được đưa vào hàng đợi và sẽ đồng bộ hóa khi bạn tắt nó.',
'settings.offline.prepare.title': 'Chuẩn bị cho ngoại tuyến',
- 'settings.offline.prepare.hint': 'Tải xuống mọi thứ bạn cần — dữ liệu chuyến đi, tài liệu và ô bản đồ — trước khi bạn mất kết nối.',
+ 'settings.offline.prepare.hint':
+ 'Tải xuống mọi thứ bạn cần — dữ liệu chuyến đi, tài liệu và ô bản đồ — trước khi bạn mất kết nối.',
'settings.offline.prepare.button': 'Tải xuống để dùng ngoại tuyến',
'settings.offline.prepare.running': 'Đang tải xuống…',
'settings.offline.prepare.done': 'Sẵn sàng dùng ngoại tuyến',
@@ -427,12 +437,14 @@ const settings: TranslationStrings = {
'settings.offline.resyncing': 'Đang đồng bộ hóa…',
'settings.offline.storage.title': 'Lưu trữ gì khi ngoại tuyến',
'settings.offline.storage.tiles': 'Lưu ô bản đồ ngoại tuyến',
- 'settings.offline.storage.tilesHint': 'Ô bản đồ chiếm nhiều dung lượng lưu trữ nhất. Tắt tùy chọn này để chỉ giữ dữ liệu chuyến đi và tài liệu ở chế độ ngoại tuyến.',
+ 'settings.offline.storage.tilesHint':
+ 'Ô bản đồ chiếm nhiều dung lượng lưu trữ nhất. Tắt tùy chọn này để chỉ giữ dữ liệu chuyến đi và tài liệu ở chế độ ngoại tuyến.',
'settings.offline.storage.tripsTitle': 'Chuyến đi',
'settings.offline.storage.tripOn': 'Đã lưu ngoại tuyến',
'settings.offline.storage.tripOff': 'Chưa lưu',
'settings.offline.clear': 'Xóa bộ nhớ đệm',
- 'settings.offline.clearConfirm': 'Xóa tất cả dữ liệu chuyến đi ngoại tuyến? Bạn có thể đồng bộ lại bất cứ lúc nào khi trực tuyến.',
+ 'settings.offline.clearConfirm':
+ 'Xóa tất cả dữ liệu chuyến đi ngoại tuyến? Bạn có thể đồng bộ lại bất cứ lúc nào khi trực tuyến.',
'settings.offline.stats.trips': 'Chuyến đi trong bộ nhớ đệm',
'settings.offline.stats.pending': 'Thay đổi đang chờ',
'settings.offline.stats.failed': 'Thay đổi không thành công',
@@ -440,7 +452,8 @@ const settings: TranslationStrings = {
'settings.offline.empty': 'Chưa có chuyến đi nào trong bộ nhớ đệm. Kết nối internet để đồng bộ hóa.',
'settings.offline.loading': 'Đang tải…',
'settings.offline.conflicts.title': 'Xung đột đồng bộ hóa',
- 'settings.offline.conflicts.hint': 'Các thay đổi bạn thực hiện khi ngoại tuyến mâu thuẫn với các thay đổi mới hơn trên máy chủ. Chọn phiên bản nào để giữ lại.',
+ 'settings.offline.conflicts.hint':
+ 'Các thay đổi bạn thực hiện khi ngoại tuyến mâu thuẫn với các thay đổi mới hơn trên máy chủ. Chọn phiên bản nào để giữ lại.',
'settings.offline.conflicts.keepMine': 'Giữ của tôi',
'settings.offline.conflicts.keepServer': 'Giữ của máy chủ',
'settings.offline.conflicts.mine': 'Phiên bản của bạn',
diff --git a/shared/src/i18n/vi/trip.ts b/shared/src/i18n/vi/trip.ts
index 0d7fe2b86..93624363b 100644
--- a/shared/src/i18n/vi/trip.ts
+++ b/shared/src/i18n/vi/trip.ts
@@ -28,7 +28,8 @@ const trip: TranslationStrings = {
'trip.confirm.deletePlaces': 'Xóa {count} địa điểm?',
'trip.toast.placesDeleted': '{count} địa điểm đã bị xóa',
'trip.invite.linkTitle': 'Liên kết mời tham gia chuyến đi',
- 'trip.invite.linkHint': 'Bất kỳ ai có tài khoản TREK mở liên kết này đều sẽ tham gia chuyến đi với tư cách thành viên. Tạo lại để vô hiệu hóa liên kết cũ.',
+ 'trip.invite.linkHint':
+ 'Bất kỳ ai có tài khoản TREK mở liên kết này đều sẽ tham gia chuyến đi với tư cách thành viên. Tạo lại để vô hiệu hóa liên kết cũ.',
'trip.invite.create': 'Tạo liên kết mời',
'trip.invite.regenerate': 'Tạo lại',
'trip.invite.disable': 'Vô hiệu hóa',
diff --git a/shared/src/i18n/vi/undo.ts b/shared/src/i18n/vi/undo.ts
index a70402866..113787d76 100644
--- a/shared/src/i18n/vi/undo.ts
+++ b/shared/src/i18n/vi/undo.ts
@@ -9,7 +9,7 @@ const undo: TranslationStrings = {
'undo.optimize': 'Tuyến đường được tối ưu hóa',
'undo.deletePlace': 'Địa điểm đã bị xóa',
'undo.deletePlaces': 'Địa điểm đã bị xóa',
- 'undo.changeCategory': "Category changed",
+ 'undo.changeCategory': 'Category changed',
'undo.moveDay': 'Địa điểm đã chuyển sang ngày khác',
'undo.lock': 'Đã bật khóa địa điểm',
'undo.importGpx': 'GPX nhập khẩu',
diff --git a/shared/src/i18n/vi/vacay.ts b/shared/src/i18n/vi/vacay.ts
index 40713a0fb..bac1cd6ef 100644
--- a/shared/src/i18n/vi/vacay.ts
+++ b/shared/src/i18n/vi/vacay.ts
@@ -88,6 +88,7 @@ const vacay: TranslationStrings = {
'vacay.fuseInfo2': 'Cả hai bên có thể tạo và chỉnh sửa các mục cho nhau.',
'vacay.fuseInfo3': 'Cả hai bên đều có thể xóa các mục và thay đổi quyền lợi trong kỳ nghỉ.',
'vacay.fuseInfo4': 'Các cài đặt như ngày nghỉ lễ và ngày nghỉ của công ty đều được chia sẻ.',
- 'vacay.fuseInfo5': 'Sự hợp nhất có thể được giải thể bất cứ lúc nào bởi một trong hai bên. Các mục của bạn sẽ được bảo tồn.',
+ 'vacay.fuseInfo5':
+ 'Sự hợp nhất có thể được giải thể bất cứ lúc nào bởi một trong hai bên. Các mục của bạn sẽ được bảo tồn.',
};
export default vacay;
diff --git a/shared/src/i18n/zh-TW/admin.ts b/shared/src/i18n/zh-TW/admin.ts
index 0ee9f27e0..62a3f4178 100644
--- a/shared/src/i18n/zh-TW/admin.ts
+++ b/shared/src/i18n/zh-TW/admin.ts
@@ -133,6 +133,8 @@ const admin: TranslationStrings = {
'admin.recommended': '推薦',
'admin.weatherKey': 'OpenWeatherMap API 金鑰',
'admin.weatherKeyHint': '用於天氣資料。在 openweathermap.org 免費獲取',
+ 'admin.unsplashKey': 'Unsplash API 金鑰',
+ 'admin.unsplashKeyHint': '用於圖片搜尋。在 unsplash.com/developers 免費獲取',
'admin.validateKey': '測試',
'admin.keyValid': '已連線',
'admin.keyInvalid': '無效',
@@ -196,6 +198,11 @@ const admin: TranslationStrings = {
'admin.tabs.plugins': '外掛',
'admin.plugins.rescan': '重新掃描',
'admin.plugins.rescanned': '已重新掃描外掛資料夾',
+ 'admin.plugins.upload': '上傳外掛',
+ 'admin.plugins.dropToUpload': '拖入外掛 .zip 以安裝',
+ 'admin.plugins.uploaded': '外掛「{name}」已上傳 — 啟用後即可執行',
+ 'admin.plugins.sideloaded': '手動載入',
+ 'admin.plugins.sideloadedHint': '手動上傳 — 非來自外掛庫,未簽署且未審核',
'admin.plugins.browse': '瀏覽外掛',
'admin.plugins.installed': '已安裝',
'admin.plugins.install': '安裝',
@@ -215,6 +222,7 @@ const admin: TranslationStrings = {
'admin.plugins.type.widget': '小工具',
'admin.plugins.type.page': '頁面',
'admin.plugins.type.integration': '整合',
+ 'admin.plugins.type.trip-page': '行程頁面',
'admin.plugins.reviewed': '已審核',
'admin.plugins.unreviewed': '未審核',
'admin.plugins.updated': '外掛已更新',
@@ -224,7 +232,8 @@ const admin: TranslationStrings = {
'admin.plugins.title': '外掛',
'admin.plugins.subtitle': '在你的執行個體上安裝並管理第三方外掛。',
'admin.plugins.disabledTitle': '外掛已停用',
- 'admin.plugins.disabledBody': '外掛執行環境已關閉(TREK_PLUGINS_ENABLED)。在管理員於伺服器配置中啟用之前,任何外掛都無法執行。',
+ 'admin.plugins.disabledBody':
+ '外掛執行環境已關閉(TREK_PLUGINS_ENABLED)。在管理員於伺服器配置中啟用之前,任何外掛都無法執行。',
'admin.plugins.empty': '尚未安裝任何外掛。',
'admin.plugins.loadError': '無法載入外掛。',
'admin.plugins.scaffoldNote': '外掛的安裝與啟用功能將在後續更新中推出。此面板目前僅列出已安裝的外掛。',
@@ -250,14 +259,25 @@ const admin: TranslationStrings = {
'admin.plugins.perm.db:own': '在隔離的資料庫中儲存自己的資料',
'admin.plugins.perm.db:read:trips': '讀取操作使用者可存取的行程',
'admin.plugins.perm.db:read:users': '讀取基本個人資料(名稱、頭像——絕不包含憑證)',
+ 'admin.plugins.perm.db:read:costs': '讀取操作使用者可存取的支出(預算項)',
+ 'admin.plugins.perm.db:read:packing': '讀取操作使用者可存取之行程的打包清單',
+ 'admin.plugins.perm.db:read:files': '讀取操作使用者可存取之行程的檔案',
+ 'admin.plugins.perm.db:write:costs': '在操作使用者可編輯的行程中建立支出(預算項)',
+ 'admin.plugins.perm.db:write:places': '在操作使用者可編輯的行程中新增、編輯及移除地點',
+ 'admin.plugins.perm.db:write:days': '在操作使用者可編輯的行程中新增、編輯及移除日期',
+ 'admin.plugins.perm.db:write:itinerary': '在操作使用者可編輯的行程日期中指派及移除地點',
+ 'admin.plugins.perm.db:write:trips': '在操作使用者可編輯的行程中編輯行程詳情(標題、日期、貨幣……)',
+ 'admin.plugins.perm.db:meta': '將自己的私有資料附加到操作使用者可存取的行程、地點與日期',
'admin.plugins.perm.ws:broadcast:trip': '向行程成員傳送即時更新',
'admin.plugins.perm.ws:broadcast:user': '向個別使用者傳送即時更新',
'admin.plugins.perm.hook:photo-provider': '為「回憶」提供照片',
'admin.plugins.perm.hook:calendar-source': '為行事曆提供事件',
+ 'admin.plugins.perm.hook:place-detail-provider': '為地點提供額外資訊(評論、評分、連結)',
+ 'admin.plugins.perm.hook:trip-warning-provider': '對行程發出驗證警告(顯示於規劃工具中)',
+ 'admin.plugins.perm.events:subscribe': '回應核心活動事件(僅事件名稱與行程,絕不包含內容)',
'admin.plugins.perm.http:outbound': '向其宣告的主機發出對外請求',
'admin.plugins.updateConsentTitle': '此更新需要新的權限',
- 'admin.plugins.updateConsentBody':
- '{name} v{version} 要求你尚未授予的權限。新版本已安裝,但在你核准之前將保持關閉。',
+ 'admin.plugins.updateConsentBody': '{name} v{version} 要求你尚未授予的權限。新版本已安裝,但在你核准之前將保持關閉。',
'admin.plugins.updateNewPermissions': '新要求的權限',
'admin.plugins.updateNewEgress': '新的對外連線',
'admin.plugins.updateApprove': '核准並啟用',
@@ -305,11 +325,36 @@ const admin: TranslationStrings = {
'admin.plugins.restarted': '外掛已重新啟動',
'admin.plugins.cap.readsTrips': '讀取你的行程',
'admin.plugins.cap.readsUsers': '讀取基本個人資料',
+ 'admin.plugins.cap.readsCosts': '讀取你的支出',
+ 'admin.plugins.cap.readsPacking': '讀取打包清單',
+ 'admin.plugins.cap.readsFiles': '讀取行程檔案',
+ 'admin.plugins.cap.writesCosts': '新增支出',
+ 'admin.plugins.cap.writesPlaces': '編輯地點',
+ 'admin.plugins.cap.writesDays': '編輯日期',
+ 'admin.plugins.cap.writesItinerary': '編輯行程安排',
+ 'admin.plugins.cap.writesTrips': '編輯行程',
+ 'admin.plugins.cap.metadata': '新增中繼資料',
'admin.plugins.cap.widget': '儀表板小工具',
'admin.plugins.cap.heroWidget': '登機證小工具',
+ 'admin.plugins.cap.placeSlot': '地點詳情',
'admin.plugins.cap.realtime': '即時更新',
'admin.plugins.cap.photos': '提供照片',
'admin.plugins.cap.calendar': '提供行事曆事件',
+ 'admin.plugins.cap.placeDetails': '豐富地點',
+ 'admin.plugins.cap.warnings': '標記問題',
+ 'admin.plugins.cap.events': '回應活動',
+ 'admin.plugins.cap.requiresAddon': '需要 {addon}',
+ 'admin.plugins.cap.dependsOn': '需要 {id} {version}',
+ 'admin.plugins.dep.addonDisabledToast': '請先啟用所需的外掛模組:{addons}',
+ 'admin.plugins.dep.autoEnabled': '已先啟用所需的外掛:{plugins}',
+ 'admin.plugins.dep.downloaded': '已下載 {id}',
+ 'admin.plugins.dep.resolveTitle': '缺少相依項目',
+ 'admin.plugins.dep.resolveBody': '“{name}” 需要先安裝這些外掛才能啟用。',
+ 'admin.plugins.dep.requires': '需要 {version}',
+ 'admin.plugins.dep.mismatch': '需要 {wanted} — 已安裝 {installed}',
+ 'admin.plugins.dep.download': '下載',
+ 'admin.plugins.dep.update': '更新',
+ 'admin.plugins.dep.resolveHint': '下載最新的相容版本,包含其自身的相依項目。',
'admin.plugins.accessTitle': '可存取的內容',
'admin.plugins.connectsTitle': '連線至',
'admin.plugins.detailsTitle': '詳細資訊',
diff --git a/shared/src/i18n/zh-TW/budget.ts b/shared/src/i18n/zh-TW/budget.ts
index 4ca2b5223..3b8817495 100644
--- a/shared/src/i18n/zh-TW/budget.ts
+++ b/shared/src/i18n/zh-TW/budget.ts
@@ -51,6 +51,9 @@ const budget: TranslationStrings = {
'costs.nothingOwed': '沒有人欠你',
'costs.yourShare': '你的分攤',
'costs.youPaid': '你支付了',
+ 'costs.outstanding': '未結算金額',
+ 'costs.outstandingSub': '尚無付款人的支出',
+ 'costs.outstandingItems': '筆支出需要付款人',
'costs.expenses': '支出',
'costs.entries': '{count} 筆',
'costs.searchPlaceholder': '搜尋支出…',
@@ -115,10 +118,10 @@ const budget: TranslationStrings = {
'costs.unfinishedHint': '僅計入總額 — 尚未結算',
'costs.tapToInclude': '點按以加入',
'costs.amount': '金額',
- 'costs.split': "Split",
- 'costs.splitEqually': "Equally",
- 'costs.splitCustom': "Custom",
- 'costs.splitTicket': "Ticket",
+ 'costs.split': 'Split',
+ 'costs.splitEqually': 'Equally',
+ 'costs.splitCustom': 'Custom',
+ 'costs.splitTicket': 'Ticket',
'costs.filter.allCategories': '所有類別',
'costs.filter.allDays': '所有日期',
'costs.expensesCount': '{count} 筆支出',
diff --git a/shared/src/i18n/zh-TW/help.ts b/shared/src/i18n/zh-TW/help.ts
index 52ecfc306..91579451c 100644
--- a/shared/src/i18n/zh-TW/help.ts
+++ b/shared/src/i18n/zh-TW/help.ts
@@ -2,12 +2,12 @@ import type { TranslationStrings } from '../types';
// English fallback until 'zh-TW' is translated.
const help: TranslationStrings = {
- 'help.title': "Help & Docs",
- 'help.search': "Search docs…",
- 'help.contents': "Contents",
- 'help.noResults': "No matching pages.",
+ 'help.title': 'Help & Docs',
+ 'help.search': 'Search docs…',
+ 'help.contents': 'Contents',
+ 'help.noResults': 'No matching pages.',
'help.errorTitle': "Couldn't load this page",
- 'help.errorBody': "The help content is fetched from the TREK wiki. Check your connection and try again.",
+ 'help.errorBody': 'The help content is fetched from the TREK wiki. Check your connection and try again.',
};
export default help;
diff --git a/shared/src/i18n/zh-TW/index.ts b/shared/src/i18n/zh-TW/index.ts
index df6ca22e7..b22df6def 100644
--- a/shared/src/i18n/zh-TW/index.ts
+++ b/shared/src/i18n/zh-TW/index.ts
@@ -5,11 +5,13 @@ import backup from './backup';
import budget from './budget';
import categories from './categories';
import collab from './collab';
+import collection from './collection';
import common from './common';
import dashboard from './dashboard';
import day from './day';
import dayplan from './dayplan';
import files from './files';
+import help from './help';
import inspector from './inspector';
import journey from './journey';
import login from './login';
@@ -39,8 +41,6 @@ import trip from './trip';
import trips from './trips';
import undo from './undo';
import vacay from './vacay';
-import collection from './collection';
-import help from './help';
const locale = {
...common,
diff --git a/shared/src/i18n/zh-TW/login.ts b/shared/src/i18n/zh-TW/login.ts
index 1dda168dc..10150dc59 100644
--- a/shared/src/i18n/zh-TW/login.ts
+++ b/shared/src/i18n/zh-TW/login.ts
@@ -83,7 +83,8 @@ const login: TranslationStrings = {
'login.passkey.signIn': '使用 Passkey 登入',
'login.passkey.failed': 'Passkey 登入失敗,請重試。',
'login.insecureCookie.title': "Login won't stick over HTTP",
- 'login.insecureCookie.body': "You’re connecting over plain HTTP, so your browser drops TREK’s secure session cookie — the next request fails with \"Access token required\". Fix: use HTTPS, or for a home-lab set COOKIE_SECURE=false.",
- 'login.insecureCookie.link': "Open the Troubleshooting guide",
+ 'login.insecureCookie.body':
+ 'You’re connecting over plain HTTP, so your browser drops TREK’s secure session cookie — the next request fails with "Access token required". Fix: use HTTPS, or for a home-lab set COOKIE_SECURE=false.',
+ 'login.insecureCookie.link': 'Open the Troubleshooting guide',
};
export default login;
diff --git a/shared/src/i18n/zh-TW/places.ts b/shared/src/i18n/zh-TW/places.ts
index f16b0bb43..5c6d47b34 100644
--- a/shared/src/i18n/zh-TW/places.ts
+++ b/shared/src/i18n/zh-TW/places.ts
@@ -23,8 +23,8 @@ const places: TranslationStrings = {
'places.kmlImportNoneSelected': '請至少選擇一種類型。',
'places.selectionCount': '已選 {count} 項',
'places.deleteSelected': '刪除所選',
- 'places.changeCategory': "Change category",
- 'places.categoryChanged': "{count} places updated",
+ 'places.changeCategory': 'Change category',
+ 'places.categoryChanged': '{count} places updated',
'places.kmlKmzImported': '已從 KMZ/KML 匯入 {count} 個地點',
'places.urlResolved': '已從 URL 匯入地點',
'places.importList': '列表匯入',
diff --git a/shared/src/i18n/zh-TW/settings.ts b/shared/src/i18n/zh-TW/settings.ts
index 536964414..198682bff 100644
--- a/shared/src/i18n/zh-TW/settings.ts
+++ b/shared/src/i18n/zh-TW/settings.ts
@@ -310,7 +310,8 @@ const settings: TranslationStrings = {
'settings.airtrail.test.success': '已連接——找到 {count} 筆航班',
'settings.airtrail.test.failed': '連接失敗',
'settings.aiParsing.title': 'AI 解析',
- 'settings.aiParsing.hint': '使用你自己的 AI 模型,從上傳的檔案中擷取預訂資訊。此設定僅在管理員尚未為整個執行個體設定模型時才會生效。',
+ 'settings.aiParsing.hint':
+ '使用你自己的 AI 模型,從上傳的檔案中擷取預訂資訊。此設定僅在管理員尚未為整個執行個體設定模型時才會生效。',
'settings.aiParsing.provider': '供應商',
'settings.aiParsing.providerLocal': '本機 (Ollama)',
'settings.aiParsing.providerOpenai': 'OpenAI',
@@ -340,7 +341,8 @@ const settings: TranslationStrings = {
'settings.appearance.contrastLow': 'Low contrast',
'settings.appearance.readability': 'Readability',
'settings.appearance.transparency': 'Transparency',
- 'settings.appearance.transparencyHint': 'Glassy translucent surfaces. Turn off for solid, higher-contrast backgrounds.',
+ 'settings.appearance.transparencyHint':
+ 'Glassy translucent surfaces. Turn off for solid, higher-contrast backgrounds.',
'settings.appearance.reduceMotion': 'Reduce motion',
'settings.appearance.reduceMotionHint': 'Minimize animations and transitions.',
'settings.appearance.density': 'Density',
@@ -370,7 +372,8 @@ const settings: TranslationStrings = {
'settings.appearance.group.belowHero': 'Below the hero',
'settings.appearance.group.bottomOfPage': 'Bottom of page',
'settings.appearance.sidebarHint': 'The whole right column. Turn off and the dashboard centers.',
- 'settings.appearance.densityHint': 'Compact tightens spacing and padding for a denser layout that fits more on screen.',
+ 'settings.appearance.densityHint':
+ 'Compact tightens spacing and padding for a denser layout that fits more on screen.',
'settings.appearance.textSizeAll': 'Everything',
'settings.appearance.perSize': 'Adjust each size separately',
'settings.appearance.size.large': 'Large',
diff --git a/shared/src/i18n/zh-TW/undo.ts b/shared/src/i18n/zh-TW/undo.ts
index 3bc7383f3..5847176d5 100644
--- a/shared/src/i18n/zh-TW/undo.ts
+++ b/shared/src/i18n/zh-TW/undo.ts
@@ -9,7 +9,7 @@ const undo: TranslationStrings = {
'undo.optimize': '路線已最佳化',
'undo.deletePlace': '地點已刪除',
'undo.deletePlaces': '地點已刪除',
- 'undo.changeCategory': "Category changed",
+ 'undo.changeCategory': 'Category changed',
'undo.moveDay': '地點已移至另一天',
'undo.lock': '地點鎖定已切換',
'undo.importGpx': 'GPX 匯入',
diff --git a/shared/src/i18n/zh/admin.ts b/shared/src/i18n/zh/admin.ts
index 20b9a27b8..b85697250 100644
--- a/shared/src/i18n/zh/admin.ts
+++ b/shared/src/i18n/zh/admin.ts
@@ -95,6 +95,8 @@ const admin: TranslationStrings = {
'admin.recommended': '推荐',
'admin.weatherKey': 'OpenWeatherMap API 密钥',
'admin.weatherKeyHint': '用于天气数据。在 openweathermap.org 免费获取',
+ 'admin.unsplashKey': 'Unsplash API 密钥',
+ 'admin.unsplashKeyHint': '用于图片搜索。在 unsplash.com/developers 免费获取',
'admin.validateKey': '测试',
'admin.keyValid': '已连接',
'admin.keyInvalid': '无效',
@@ -157,6 +159,11 @@ const admin: TranslationStrings = {
'admin.tabs.plugins': '插件',
'admin.plugins.rescan': '重新扫描',
'admin.plugins.rescanned': '已重新扫描插件文件夹',
+ 'admin.plugins.upload': '上传插件',
+ 'admin.plugins.dropToUpload': '拖入插件 .zip 以安装',
+ 'admin.plugins.uploaded': '插件“{name}”已上传 — 激活后即可运行',
+ 'admin.plugins.sideloaded': '手动加载',
+ 'admin.plugins.sideloadedHint': '手动上传 — 非来自插件库,未签名且未审核',
'admin.plugins.browse': '浏览插件',
'admin.plugins.installed': '已安装',
'admin.plugins.install': '安装',
@@ -176,6 +183,7 @@ const admin: TranslationStrings = {
'admin.plugins.type.widget': '小组件',
'admin.plugins.type.page': '页面',
'admin.plugins.type.integration': '集成',
+ 'admin.plugins.type.trip-page': '行程页面',
'admin.plugins.reviewed': '已审核',
'admin.plugins.unreviewed': '未审核',
'admin.plugins.updated': '插件已更新',
@@ -185,7 +193,8 @@ const admin: TranslationStrings = {
'admin.plugins.title': '插件',
'admin.plugins.subtitle': '在你的实例上安装和管理第三方插件。',
'admin.plugins.disabledTitle': '插件功能已禁用',
- 'admin.plugins.disabledBody': '插件运行时已关闭(TREK_PLUGINS_ENABLED)。在管理员于服务器配置中启用之前,任何插件都无法运行。',
+ 'admin.plugins.disabledBody':
+ '插件运行时已关闭(TREK_PLUGINS_ENABLED)。在管理员于服务器配置中启用之前,任何插件都无法运行。',
'admin.plugins.empty': '尚未安装任何插件。',
'admin.plugins.loadError': '无法加载插件。',
'admin.plugins.scaffoldNote': '插件的安装与激活功能将在后续更新中推出。此面板目前仅列出已安装的插件。',
@@ -211,10 +220,22 @@ const admin: TranslationStrings = {
'admin.plugins.perm.db:own': '在隔离的数据库中存储自己的数据',
'admin.plugins.perm.db:read:trips': '读取当前用户可访问的旅行',
'admin.plugins.perm.db:read:users': '读取基本个人资料(姓名、头像——绝不包括凭据)',
+ 'admin.plugins.perm.db:read:costs': '读取当前用户可访问的支出(预算项)',
+ 'admin.plugins.perm.db:read:packing': '读取当前用户可访问的旅行的行李清单',
+ 'admin.plugins.perm.db:read:files': '读取当前用户可访问的旅行的文件',
+ 'admin.plugins.perm.db:write:costs': '在当前用户可编辑的旅行中创建支出(预算项)',
+ 'admin.plugins.perm.db:write:places': '在当前用户可编辑的旅行中添加、编辑和删除地点',
+ 'admin.plugins.perm.db:write:days': '在当前用户可编辑的旅行中添加、编辑和删除行程日',
+ 'admin.plugins.perm.db:write:itinerary': '在当前用户可编辑的旅行中,为各行程日分配和移除地点',
+ 'admin.plugins.perm.db:write:trips': '在当前用户可编辑的旅行中编辑行程详情(标题、日期、货币…)',
+ 'admin.plugins.perm.db:meta': '将其自有的私有数据附加到操作用户可访问的旅行、地点和行程日上',
'admin.plugins.perm.ws:broadcast:trip': '向旅行成员发送实时更新',
'admin.plugins.perm.ws:broadcast:user': '向单个用户发送实时更新',
'admin.plugins.perm.hook:photo-provider': '为回忆提供照片',
'admin.plugins.perm.hook:calendar-source': '为日历提供事件',
+ 'admin.plugins.perm.hook:place-detail-provider': '为地点补充额外信息(评论、评分、链接)',
+ 'admin.plugins.perm.hook:trip-warning-provider': '对行程发出校验警告(显示在规划器中)',
+ 'admin.plugins.perm.events:subscribe': '响应核心活动事件(仅事件名称和行程,绝不包含内容)',
'admin.plugins.perm.http:outbound': '向其声明的主机发出出站请求',
'admin.plugins.updateConsentTitle': '此次更新需要新的权限',
'admin.plugins.updateConsentBody':
@@ -266,11 +287,36 @@ const admin: TranslationStrings = {
'admin.plugins.restarted': '插件已重启',
'admin.plugins.cap.readsTrips': '读取你的旅行',
'admin.plugins.cap.readsUsers': '读取基本个人资料',
+ 'admin.plugins.cap.readsCosts': '读取你的支出',
+ 'admin.plugins.cap.readsPacking': '读取行李清单',
+ 'admin.plugins.cap.readsFiles': '读取旅行文件',
+ 'admin.plugins.cap.writesCosts': '添加支出',
+ 'admin.plugins.cap.writesPlaces': '编辑地点',
+ 'admin.plugins.cap.writesDays': '编辑行程日',
+ 'admin.plugins.cap.writesItinerary': '编辑行程',
+ 'admin.plugins.cap.writesTrips': '编辑旅行',
+ 'admin.plugins.cap.metadata': '添加元数据',
'admin.plugins.cap.widget': '仪表盘小组件',
'admin.plugins.cap.heroWidget': '登机牌小组件',
+ 'admin.plugins.cap.placeSlot': '地点详情',
'admin.plugins.cap.realtime': '实时更新',
'admin.plugins.cap.photos': '提供照片',
'admin.plugins.cap.calendar': '提供日历事件',
+ 'admin.plugins.cap.placeDetails': '丰富地点信息',
+ 'admin.plugins.cap.warnings': '标记问题',
+ 'admin.plugins.cap.events': '响应活动',
+ 'admin.plugins.cap.requiresAddon': '需要 {addon}',
+ 'admin.plugins.cap.dependsOn': '需要 {id} {version}',
+ 'admin.plugins.dep.addonDisabledToast': '请先启用所需的插件模块:{addons}',
+ 'admin.plugins.dep.autoEnabled': '已先启用所需的插件:{plugins}',
+ 'admin.plugins.dep.downloaded': '已下载 {id}',
+ 'admin.plugins.dep.resolveTitle': '缺少依赖项',
+ 'admin.plugins.dep.resolveBody': '“{name}” 需要先安装这些插件才能启用。',
+ 'admin.plugins.dep.requires': '需要 {version}',
+ 'admin.plugins.dep.mismatch': '需要 {wanted} — 已安装 {installed}',
+ 'admin.plugins.dep.download': '下载',
+ 'admin.plugins.dep.update': '更新',
+ 'admin.plugins.dep.resolveHint': '下载最新的兼容版本,包括其自身的依赖项。',
'admin.plugins.accessTitle': '可访问的内容',
'admin.plugins.connectsTitle': '连接到',
'admin.plugins.detailsTitle': '详情',
@@ -386,7 +432,8 @@ const admin: TranslationStrings = {
'admin.update.backupLink': '前往备份',
'admin.update.howTo': '如何更新',
'admin.update.dockerText': '你的 TREK 实例运行在 Docker 中。要更新到 {version},请在服务器上执行以下命令:',
- 'admin.update.nonDockerText': '此 TREK 实例未运行在 Docker 中。要更新到 {version},请重新执行你当初使用的安装或更新方式——例如,在 Proxmox Community Scripts 上,从 LXC 控制台运行更新:',
+ 'admin.update.nonDockerText':
+ '此 TREK 实例未运行在 Docker 中。要更新到 {version},请重新执行你当初使用的安装或更新方式——例如,在 Proxmox Community Scripts 上,从 LXC 控制台运行更新:',
'admin.update.wikiLink': '打开更新指南',
'admin.update.reloadHint': '请在几秒后刷新页面。',
'admin.tabs.permissions': '权限',
diff --git a/shared/src/i18n/zh/budget.ts b/shared/src/i18n/zh/budget.ts
index cb21c278e..278d08b91 100644
--- a/shared/src/i18n/zh/budget.ts
+++ b/shared/src/i18n/zh/budget.ts
@@ -51,6 +51,9 @@ const budget: TranslationStrings = {
'costs.nothingOwed': '没有人欠你',
'costs.yourShare': '你的份额',
'costs.youPaid': '你已支付',
+ 'costs.outstanding': '未结算金额',
+ 'costs.outstandingSub': '尚无付款人的支出',
+ 'costs.outstandingItems': '笔支出需要付款人',
'costs.expenses': '支出',
'costs.entries': '{count} 条记录',
'costs.searchPlaceholder': '搜索支出…',
@@ -115,10 +118,10 @@ const budget: TranslationStrings = {
'costs.unfinishedHint': '仅计入总额 — 尚未结算',
'costs.tapToInclude': '点按以加入',
'costs.amount': '金额',
- 'costs.split': "Split",
- 'costs.splitEqually': "Equally",
- 'costs.splitCustom': "Custom",
- 'costs.splitTicket': "Ticket",
+ 'costs.split': 'Split',
+ 'costs.splitEqually': 'Equally',
+ 'costs.splitCustom': 'Custom',
+ 'costs.splitTicket': 'Ticket',
'costs.filter.allCategories': '所有类别',
'costs.filter.allDays': '所有日期',
'costs.expensesCount': '{count} 笔支出',
diff --git a/shared/src/i18n/zh/help.ts b/shared/src/i18n/zh/help.ts
index 91d85397e..256dbeaa8 100644
--- a/shared/src/i18n/zh/help.ts
+++ b/shared/src/i18n/zh/help.ts
@@ -2,12 +2,12 @@ import type { TranslationStrings } from '../types';
// English fallback until 'zh' is translated.
const help: TranslationStrings = {
- 'help.title': "Help & Docs",
- 'help.search': "Search docs…",
- 'help.contents': "Contents",
- 'help.noResults': "No matching pages.",
+ 'help.title': 'Help & Docs',
+ 'help.search': 'Search docs…',
+ 'help.contents': 'Contents',
+ 'help.noResults': 'No matching pages.',
'help.errorTitle': "Couldn't load this page",
- 'help.errorBody': "The help content is fetched from the TREK wiki. Check your connection and try again.",
+ 'help.errorBody': 'The help content is fetched from the TREK wiki. Check your connection and try again.',
};
export default help;
diff --git a/shared/src/i18n/zh/index.ts b/shared/src/i18n/zh/index.ts
index b9af5461f..eef4c74aa 100644
--- a/shared/src/i18n/zh/index.ts
+++ b/shared/src/i18n/zh/index.ts
@@ -5,11 +5,13 @@ import backup from './backup';
import budget from './budget';
import categories from './categories';
import collab from './collab';
+import collection from './collection';
import common from './common';
import dashboard from './dashboard';
import day from './day';
import dayplan from './dayplan';
import files from './files';
+import help from './help';
import inspector from './inspector';
import journey from './journey';
import login from './login';
@@ -39,8 +41,6 @@ import trip from './trip';
import trips from './trips';
import undo from './undo';
import vacay from './vacay';
-import collection from './collection';
-import help from './help';
const locale = {
...common,
diff --git a/shared/src/i18n/zh/login.ts b/shared/src/i18n/zh/login.ts
index c17676c1d..1a3357b94 100644
--- a/shared/src/i18n/zh/login.ts
+++ b/shared/src/i18n/zh/login.ts
@@ -83,7 +83,8 @@ const login: TranslationStrings = {
'login.passkey.signIn': '使用通行密钥登录',
'login.passkey.failed': '通行密钥登录失败,请重试。',
'login.insecureCookie.title': "Login won't stick over HTTP",
- 'login.insecureCookie.body': "You’re connecting over plain HTTP, so your browser drops TREK’s secure session cookie — the next request fails with \"Access token required\". Fix: use HTTPS, or for a home-lab set COOKIE_SECURE=false.",
- 'login.insecureCookie.link': "Open the Troubleshooting guide",
+ 'login.insecureCookie.body':
+ 'You’re connecting over plain HTTP, so your browser drops TREK’s secure session cookie — the next request fails with "Access token required". Fix: use HTTPS, or for a home-lab set COOKIE_SECURE=false.',
+ 'login.insecureCookie.link': 'Open the Troubleshooting guide',
};
export default login;
diff --git a/shared/src/i18n/zh/places.ts b/shared/src/i18n/zh/places.ts
index e095e0f73..57362dfa0 100644
--- a/shared/src/i18n/zh/places.ts
+++ b/shared/src/i18n/zh/places.ts
@@ -23,8 +23,8 @@ const places: TranslationStrings = {
'places.kmlImportNoneSelected': '请至少选择一种类型。',
'places.selectionCount': '已选 {count} 项',
'places.deleteSelected': '删除所选',
- 'places.changeCategory': "Change category",
- 'places.categoryChanged': "{count} places updated",
+ 'places.changeCategory': 'Change category',
+ 'places.categoryChanged': '{count} places updated',
'places.kmlKmzImported': '已从 KMZ/KML 导入 {count} 个地点',
'places.urlResolved': '已从 URL 导入地点',
'places.importList': '列表导入',
diff --git a/shared/src/i18n/zh/settings.ts b/shared/src/i18n/zh/settings.ts
index 82453f72e..a5ec0bc6a 100644
--- a/shared/src/i18n/zh/settings.ts
+++ b/shared/src/i18n/zh/settings.ts
@@ -308,7 +308,8 @@ const settings: TranslationStrings = {
'settings.airtrail.test.success': '已连接——找到 {count} 个航班',
'settings.airtrail.test.failed': '连接失败',
'settings.aiParsing.title': 'AI 解析',
- 'settings.aiParsing.hint': '使用你自己的 AI 模型从上传的文件中提取预订信息。仅当管理员未为整个实例配置模型时才会生效。',
+ 'settings.aiParsing.hint':
+ '使用你自己的 AI 模型从上传的文件中提取预订信息。仅当管理员未为整个实例配置模型时才会生效。',
'settings.aiParsing.provider': '服务商',
'settings.aiParsing.providerLocal': '本地 (Ollama)',
'settings.aiParsing.providerOpenai': 'OpenAI',
@@ -338,7 +339,8 @@ const settings: TranslationStrings = {
'settings.appearance.contrastLow': 'Low contrast',
'settings.appearance.readability': 'Readability',
'settings.appearance.transparency': 'Transparency',
- 'settings.appearance.transparencyHint': 'Glassy translucent surfaces. Turn off for solid, higher-contrast backgrounds.',
+ 'settings.appearance.transparencyHint':
+ 'Glassy translucent surfaces. Turn off for solid, higher-contrast backgrounds.',
'settings.appearance.reduceMotion': 'Reduce motion',
'settings.appearance.reduceMotionHint': 'Minimize animations and transitions.',
'settings.appearance.density': 'Density',
@@ -368,7 +370,8 @@ const settings: TranslationStrings = {
'settings.appearance.group.belowHero': 'Below the hero',
'settings.appearance.group.bottomOfPage': 'Bottom of page',
'settings.appearance.sidebarHint': 'The whole right column. Turn off and the dashboard centers.',
- 'settings.appearance.densityHint': 'Compact tightens spacing and padding for a denser layout that fits more on screen.',
+ 'settings.appearance.densityHint':
+ 'Compact tightens spacing and padding for a denser layout that fits more on screen.',
'settings.appearance.textSizeAll': 'Everything',
'settings.appearance.perSize': 'Adjust each size separately',
'settings.appearance.size.large': 'Large',
diff --git a/shared/src/i18n/zh/undo.ts b/shared/src/i18n/zh/undo.ts
index 79ccbf63c..0da29ee36 100644
--- a/shared/src/i18n/zh/undo.ts
+++ b/shared/src/i18n/zh/undo.ts
@@ -9,7 +9,7 @@ const undo: TranslationStrings = {
'undo.optimize': '路线已优化',
'undo.deletePlace': '地点已删除',
'undo.deletePlaces': '地点已删除',
- 'undo.changeCategory': "Category changed",
+ 'undo.changeCategory': 'Category changed',
'undo.moveDay': '地点已移至另一天',
'undo.lock': '地点锁定已切换',
'undo.importGpx': 'GPX 导入',
diff --git a/shared/src/reservation/ki-reservation.schema.ts b/shared/src/reservation/ki-reservation.schema.ts
index 38af4bbf5..da0ec5ceb 100644
--- a/shared/src/reservation/ki-reservation.schema.ts
+++ b/shared/src/reservation/ki-reservation.schema.ts
@@ -30,9 +30,7 @@ export const KI_RESERVATION_TYPES = [
] as const;
/** Lenient validator: require a string `@type`, allow any other keys through. */
-export const kiReservationSchema = z
- .object({ '@type': z.string() })
- .catchall(z.unknown());
+export const kiReservationSchema = z.object({ '@type': z.string() }).catchall(z.unknown());
export type KiReservationDto = z.infer<typeof kiReservationSchema>;
/** Top-level wrapper the providers return: `{ reservations: KiReservation[] }`. */
diff --git a/unraid-template.xml b/unraid-template.xml
index 00068d8ba..7126cf2c8 100644
--- a/unraid-template.xml
+++ b/unraid-template.xml
@@ -63,4 +63,5 @@
<Config Name="DEMO_MODE" Target="DEMO_MODE" Default="false" Mode="" Description="Enable demo mode (resets all data hourly). Not intended for regular use." Type="Variable" Display="advanced" Required="false" Mask="false">false</Config>
<Config Name="MCP_RATE_LIMIT" Target="MCP_RATE_LIMIT" Default="300" Mode="" Description="Max MCP API requests per user per minute." Type="Variable" Display="advanced" Required="false" Mask="false">300</Config>
<Config Name="MCP_MAX_SESSION_PER_USER" Target="MCP_MAX_SESSION_PER_USER" Default="20" Mode="" Description="Max concurrent MCP sessions per user." Type="Variable" Display="advanced" Required="false" Mask="false">20</Config>
+ <Config Name="UNSPLASH_ACCESS_KEY" Target="UNSPLASH_ACCESS_KEY" Default="" Mode="" Description="Optional Unsplash Access Key for trip-cover and place-image search. Without one, TREK uses Unsplash's unauthenticated endpoint, which some datacenter/VPS IPs are blocked from. Get a free key at unsplash.com/developers. Can also be set per-admin in Admin &gt; Settings; this env var overrides that." Type="Variable" Display="advanced" Required="false" Mask="true"/>
</Container>
diff --git a/wiki/Creating-a-Trip.md b/wiki/Creating-a-Trip.md
index 1e8e9bcb8..731b7caf9 100644
--- a/wiki/Creating-a-Trip.md
+++ b/wiki/Creating-a-Trip.md
@@ -35,6 +35,7 @@ The cover image is displayed on the trip card and as the background of the Spotl
- **Drag and drop** an image file onto the dashed upload area.
- **Paste from clipboard** — if you have an image in your clipboard, paste it anywhere in the dialog.
- **File picker** — click the upload area to browse for a file.
+- **Search Unsplash** — type a query to pick a stock photo. If this returns *"Unsplash search unavailable"* (common on VPS/datacenter IPs), configure a free Unsplash Access Key — see [Environment-Variables → Image Search (Unsplash)](Environment-Variables#image-search-unsplash).
When **creating** a new trip the cover image field is always visible. When **editing** an existing trip it is only shown if you have the `trip_cover_upload` permission. For a new trip, the image is uploaded immediately after the trip is created.
diff --git a/wiki/Environment-Variables.md b/wiki/Environment-Variables.md
index 4d3b22bad..efff2d32b 100644
--- a/wiki/Environment-Variables.md
+++ b/wiki/Environment-Variables.md
@@ -230,6 +230,25 @@ When left at the default, using the transit feature makes the TREK **server** se
---
+## Image Search (Unsplash)
+
+TREK can search [Unsplash](https://unsplash.com/) for **trip cover images** and **place images**. By default the server queries Unsplash's public web endpoint **without an API key**, so no configuration is needed on most installs.
+
+Some hosting environments — commonly VPS and datacenter IP ranges (and many Kubernetes clusters) — are **blocked or rate-limited** by that unauthenticated endpoint, which surfaces in the UI as **"Unsplash search unavailable"**. Configuring a free Unsplash Access Key switches the server to Unsplash's official, authenticated API (`api.unsplash.com`), which is not subject to that block. See [issue #1449](https://github.com/mauriceboe/TREK/issues/1449).
+
+| Variable | Description | Default |
+|-----------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------|
+| `UNSPLASH_ACCESS_KEY` | Unsplash **Access Key** used to authenticate cover/place image search against `https://api.unsplash.com`. When set, it takes priority over any key configured per-admin in **Admin → Settings**. When unset, the server falls back to the unauthenticated endpoint (which some datacenter/VPS IPs are blocked from). Get a free key at [unsplash.com/developers](https://unsplash.com/developers). | unauthenticated endpoint |
+
+**Two ways to configure it** — pick one; the env var wins if both are present:
+
+1. **Environment variable** (this page) — instance-wide, ideal for Docker/Helm/Unraid where you already manage config as env.
+2. **Admin → Settings → API Keys** — paste the key into the **Unsplash API Key** field. Stored encrypted at rest and used as a fallback for every user when no env var is set. This is the better option if you'd rather not restart the container to change it.
+
+To get a key: create a free account at [unsplash.com/developers](https://unsplash.com/developers), register a new application, and copy its **Access Key** (not the Secret Key). The Unsplash free tier (demo) allows 50 requests/hour, which is ample for cover search.
+
+---
+
## Storage & Paths
| Variable | Description | Default |
diff --git a/wiki/Plugin-Cookbook.md b/wiki/Plugin-Cookbook.md
new file mode 100644
index 000000000..01bc96c38
--- /dev/null
+++ b/wiki/Plugin-Cookbook.md
@@ -0,0 +1,196 @@
+# Plugin Cookbook
+
+Short, copy-paste recipes for the things plugins can do. Each one names the
+permission it needs (declare it in `trek-plugin.json` → `permissions`) and the
+capability it uses. For the full API see [[Plugin Development|Plugin-Development]];
+for the permission catalogue see [[Plugin Permissions|Plugin-Permissions]].
+
+> Every trip/place/day operation is **membership-checked by the host** against the
+> user bound to the invocation — your plugin never passes a user id. Writes also
+> need that user's `*_edit` permission. A read/write you're not allowed to do fails
+> loudly; it never silently escalates.
+
+The complete, runnable version of these recipes is the
+[`trip-doctor`](https://github.com/mauriceboe/TREK/tree/main/plugin-sdk/examples/trip-doctor)
+example plugin.
+
+---
+
+## Read a trip's places and bookings
+
+**Needs:** `db:read:trips`
+
+```js
+async handler(req, ctx) {
+ const places = await ctx.trips.getPlaces(Number(req.query.tripId))
+ const bookings = await ctx.trips.getReservations(Number(req.query.tripId))
+ // …use them; the host already checked req.user can see this trip
+}
+```
+
+## Read the packing list or files of a trip
+
+**Needs:** `db:read:packing` · `db:read:files` (declare only what you use)
+
+```js
+const packing = await ctx.packing.list(tripId) // hydrated bags/assignees
+const files = await ctx.files.list(tripId) // trash excluded
+```
+
+Both are membership-checked against the current user — same gate as `ctx.trips.*`.
+
+## Add / move something on the itinerary
+
+**Needs:** `db:write:places` · `db:write:days` · `db:write:itinerary` (declare only what you use)
+
+```js
+const place = await ctx.places.create(tripId, { name: 'Teamlab', lat: 35.62, lng: 139.78 })
+const day = await ctx.days.create(tripId, { date: '2027-04-02', notes: 'Odaiba' })
+await ctx.itinerary.assign(tripId, day.id, place.id, 'buy tickets first')
+// days.create accepts { date?, notes?, position? }; set a day title later with ctx.days.update(tripId, day.id, { title: 'Odaiba' }).
+```
+
+Updates and deletes mirror the REST app exactly (`ctx.places.update/delete`,
+`ctx.days.update/delete`, `ctx.itinerary.unassign`). They broadcast the same live
+event, so open web sessions update instantly.
+
+## Tag a core entity — no schema fork
+
+**Needs:** `db:meta`
+
+Store your own JSON-serialisable data on a trip, place or day. Rows are namespaced
+to **your plugin id** — no other plugin can read or overwrite them.
+
+```js
+await ctx.meta.set('place', placeId, 'lastCheckedAt', Date.now())
+const when = await ctx.meta.get('place', placeId, 'lastCheckedAt')
+const all = await ctx.meta.list('place', placeId) // { lastCheckedAt: 172… }
+await ctx.meta.delete('place', placeId, 'lastCheckedAt')
+```
+
+Reads need trip access; writes additionally need the entity's edit permission.
+
+## Contribute extra info to a place (rendered natively)
+
+**Needs:** `hook:place-detail-provider`
+
+Return rows and TREK draws them at the foot of the place panel — no iframe.
+
+```js
+module.exports = {
+ hooks: {
+ placeDetailProvider: {
+ async getDetails(placeId, ctx) {
+ return [
+ { label: 'Crowd', value: 'Quiet right now' },
+ { label: 'Official site', url: 'https://…' },
+ ]
+ },
+ },
+ },
+}
+```
+
+## Raise validation warnings on a trip
+
+**Needs:** `hook:trip-warning-provider`
+
+Return problems and they show as a non-blocking banner in the planner.
+
+```js
+hooks: {
+ warningProvider: {
+ async getWarnings(tripId, ctx) {
+ const places = await ctx.trips.getPlaces(tripId)
+ return places
+ .filter((p) => p.lat == null)
+ .map((p) => ({ level: 'warning', message: `"${p.name}" has no location`, placeId: p.id }))
+ },
+ },
+}
+```
+
+`level` is `'info' | 'warning' | 'error'`; `dayId`/`placeId` are optional anchors.
+
+## Push a live update to a trip / a user
+
+**Needs:** `ws:broadcast:trip` and/or `ws:broadcast:user`
+
+```js
+ctx.ws.broadcastToTrip(tripId, 'doctor:rechecked', { count }) // → plugin:<id>:doctor:rechecked
+ctx.ws.broadcastToUser(userId, 'nudge', { text: '…' }) // (userId, event, data) — only that user
+```
+
+Events are automatically namespaced to `plugin:<your-id>:…` so they can't collide
+with core events.
+
+## React to core activity
+
+**Needs:** `events:subscribe`
+
+Handlers run with no user and get the event name + tripId only (never the payload).
+
+```js
+events: [
+ { on: 'file:created', async handler({ tripId }, ctx) {
+ await notifySlack(`New file on trip ${tripId}`) // needs http:outbound
+ } },
+]
+```
+
+Fire-and-forget on a short timeout — never blocks a core write. Trip reads are
+refused (no user); use `ctx.db`, `ctx.ws.*`, or an outbound call. Your own
+`plugin:*` broadcasts are never re-delivered, so handlers can't loop.
+
+## Depend on another plugin — call it and hear its events
+
+**Needs:** a `pluginDependencies` entry for the other plugin (no permission).
+
+Expose a contract from the **dependency** (declare the names in
+`capabilities.provides` / `capabilities.emits`):
+
+```js
+// plugin "koffi" · manifest: "capabilities": { "provides": ["convert"], "emits": ["rate.updated"] }
+exports: {
+ async convert({ amount, from, to }) { return { amount: amount * rate(from, to), to } },
+},
+async onLoad(ctx) { ctx.events.emit('rate.updated', { pair: 'USD/EUR' }) },
+```
+
+Consume it from the **dependent** (declare koffi as a dependency):
+
+```js
+// manifest: "pluginDependencies": [{ "id": "koffi", "version": ">=1.0.0 <2.0.0" }]
+routes: [
+ { method: 'GET', path: '/price', async handler(_req, ctx) {
+ const out = await ctx.plugins.call('koffi', 'convert', { amount: 10, from: 'USD', to: 'EUR' })
+ return { status: 200, body: JSON.stringify(out) }
+ } },
+],
+subscriptions: [
+ { plugin: 'koffi', event: 'rate.updated', async handler(payload, ctx) { ctx.log.info('rates changed', payload) } },
+],
+```
+
+TREK auto-enables koffi before your plugin, routes the call (as your acting user),
+and refuses it if koffi isn't a satisfied dependency or doesn't export `convert`. See
+[[Plugin Development#talking-to-other-plugins|Plugin-Development]].
+
+## Match the TREK look
+
+Add `<!-- trek:ui -->` to your widget's `<head>`. The dev server and `pack` inline
+TREK's token-driven kit (glass surfaces, buttons, inputs, dark-mode) and a
+`window.trek` bridge with the live theme + tokens. See
+[[Plugin Development#the-design-kit-recommended|Plugin-Development]]. `window.trek.ui`
+gives you bundler-free, kit-styled DOM builders (`ui.el/button/card/chip/input/mount`).
+
+---
+
+## Where things run
+
+| Surface | Runs | Gets |
+|---|---|---|
+| `routes` | forked server child | `ctx` bound to the HTTP request's user |
+| `jobs` | forked server child, on a schedule | `ctx` with **no** user (can't read user-scoped data) |
+| `hooks` | forked server child, when core asks | `ctx` bound to the user who triggered the read, short timeout |
+| `widget` / `page` | sandboxed iframe (no same-origin) | `postMessage` bridge; calls its own routes via `trek:invoke` |
diff --git a/wiki/Plugin-Development.md b/wiki/Plugin-Development.md
index 51bd3afd5..dddc414dc 100644
--- a/wiki/Plugin-Development.md
+++ b/wiki/Plugin-Development.md
@@ -10,7 +10,7 @@ child process** and reaches it only over RPC; the browser part runs in a
```bash
npx trek-plugin-sdk create # interactive wizard
-npx trek-plugin-sdk create my-plugin --type integration|page|widget # or direct
+npx trek-plugin-sdk create my-plugin --type integration|page|widget|trip-page # or direct
cd my-plugin
```
@@ -24,7 +24,7 @@ my-plugin/
trek-plugin.json # manifest
package.json # CommonJS marker + the SDK as a devDependency
server/index.js # your plugin code (built, plain JS)
- client/index.html # page/widget iframe (page/widget only)
+ client/index.html # native UI via the design kit (page / widget / trip-page only)
README.md # fill this in — the registry requires a screenshot
```
@@ -40,7 +40,9 @@ injects it in production. It loads your `server/index.js` through the same
`definePlugin` contract the host uses and gives you a **real request loop
without a full TREK**: a dashboard
listing your routes, the routes served under `/api/<path>`, your page/widget UI
-at `/ui`, and a reload on every save. The injected `ctx` **enforces exactly the
+at `/ui`, a **themed host preview at `/preview`** (a real sandboxed frame with a
+theme/accent/appearance toggle, `trek.invoke()` proxied to your routes), and a reload
+on every save. The injected `ctx` **enforces exactly the
permissions your manifest grants** — an ungranted call throws `PERMISSION_DENIED`,
so you catch a missing grant here rather than after install. `db:own` is backed
by a real SQLite file (`.trek-dev/db.sqlite`) when the runtime has `node:sqlite`.
@@ -50,14 +52,23 @@ by a real SQLite file (`.trek-dev/db.sqlite`) when the runtime has `node:sqlite`
- Feed `ctx.trips` / `ctx.users` by dropping a `dev-fixtures.json` next to the
manifest: `{ "trips": { "1": { "members": [1], "data": { … } } }, "users": {} }`.
-## The three plugin types
+## The plugin types
- **integration** — background logic (jobs, routes) with no UI of its own. Photo-
provider / calendar-source hook types exist in the SDK but are **not yet wired
- into the host** — see [Integration hooks](#integration-hooks-not-yet-functional).
+ into the host** — see [Provider hooks](#provider-hooks). The `placeDetailProvider`
+ hook IS wired.
- **page** — adds a nav entry that opens a full-page sandboxed iframe.
-- **widget** — adds a card to the dashboard (`sidebar` slot) or a hero-bar
- overlay (`hero` slot).
+- **widget** — adds a card to the dashboard (`sidebar` slot), a hero-bar overlay
+ (`hero` slot), or a panel inside the trip planner's **place-detail** view
+ (`place-detail` slot — the frame also receives the open `placeId` in
+ `trek:context`, so it can show place-specific info like reviews or ratings). Set
+ the slot in `capabilities.widget.slot`.
+- **trip-page** — adds a tab **inside every trip planner**, so your UI lives in the
+ trip alongside Plan / Transports / Files. The frame is the same sandboxed iframe as
+ a `page`, but it receives the current `tripId` in `trek:context` (so you can scope
+ data to the open trip) and it has no dashboard nav entry. The tab shows on desktop
+ and mobile.
## The SDK package
@@ -121,9 +132,20 @@ declaration for readers — the manifest parser does not consume it.
|---|---|---|
| `ctx.db` | `query(sql, …args)` / `exec(sql, …args)` / `migrate(id, sql)` against your **own** SQLite file | `db:own` |
| `ctx.trips` | `getById` / `getPlaces` / `getReservations` (membership-checked) | `db:read:trips` |
+| `ctx.trips.update(tripId, fields)` | update trip fields (title/dates/currency/reminder_days/…) | `db:write:trips` |
+| `ctx.places` | `create(tripId, fields)` / `update(tripId, placeId, fields)` / `delete(tripId, placeId)` | `db:write:places` |
+| `ctx.days` | `create(tripId, {date?, notes?})` / `update(tripId, dayId, {notes?, title?})` / `delete(tripId, dayId)` | `db:write:days` |
+| `ctx.itinerary` | `assign(tripId, dayId, placeId, notes?)` / `unassign(tripId, assignmentId)` — place↔day | `db:write:itinerary` |
+| `ctx.meta` | `get` / `set` / `list` / `delete` your **own** namespaced data on a `trip`/`place`/`day` (enrich core entities without forking the schema) | `db:meta` |
+| `ctx.packing` | `list(tripId)` — a trip's packing items (membership-checked, respects private-item visibility) | `db:read:packing` |
+| `ctx.files` | `list(tripId)` — a trip's files, trash excluded (membership-checked) | `db:read:files` |
+| `ctx.costs` | `getByTrip(tripId)` / `listMine()` — read budget items (membership-checked) | `db:read:costs` |
+| `ctx.costs` (write) | `create(tripId, input)` / `update(tripId, itemId, input)` / `delete(tripId, itemId)` — broadcasts `budget:*` | `db:write:costs` |
| `ctx.users` | `getById(id)` — public profile only (`id, username, display_name, avatar`) | `db:read:users` |
| `ctx.ws.broadcastToTrip(tripId, event, data)` | broadcast to a trip's members (event forced to `plugin:<id>:<event>`) | `ws:broadcast:trip` |
| `ctx.ws.broadcastToUser(userId, event, data)` | broadcast to one user | `ws:broadcast:user` |
+| `ctx.plugins.call(id, fn, args?)` | call a function another plugin **exposes** and get its result — `id` must be a declared, satisfied `pluginDependency` that lists `fn` in its `capabilities.provides` | a plugin dependency (no permission) |
+| `ctx.events.emit(name, payload?)` | publish an event to dependents that subscribed — `name` must be in your `capabilities.emits` | — (no permission) |
| `ctx.config` | your resolved settings (secrets delivered decrypted) | — |
| `ctx.log` | `info` / `warn` / `error` → your error log | — |
| `ctx.id` | your plugin id (string) | — |
@@ -138,6 +160,28 @@ from the authenticated request and membership-checks every trip read against it.
`asUserId` parameter for source compatibility, but **the host ignores it** — you
cannot read another user's trips by passing an id.
+**Writes (`ctx.trips.update` / `ctx.places` / `ctx.days` / `ctx.itinerary` /
+`ctx.costs.create`) are route-context only too, and doubly gated:** the host checks
+the acting user can **access** the trip AND holds the app's edit permission for that
+entity (`place_edit` / `day_edit` / `trip_edit`), exactly like the web UI. They run
+through the same services and broadcast the same events, so open sessions update
+live. Input is validated against TREK's own schemas (a bad payload is `BAD_PARAMS`),
+and every write is recorded in the tamper-evident capability audit log against the
+acting user. A plugin can only change what its user could change by hand.
+
+**`ctx.costs` ("costs" = budget items)** behaves exactly like `ctx.trips`: reads are
+membership-checked against the request's user and only work **inside a route handler**
+(`onLoad`/`jobs` have no user → `RESOURCE_FORBIDDEN`). `getByTrip(tripId)` returns one
+trip's budget items (hydrated with members/payers); `listMine()` aggregates budget items
+across every trip the acting user can access. `create/update/delete(tripId, …)` mutate a
+trip's budget items — gated exactly like a normal budget write (the same model the planner
+write scopes `db:write:places`/`days`/`itinerary`/`trips` use): the acting user needs the
+**`budget_edit`** permission on that trip, the input is
+validated against TREK's budget schema, and a successful create broadcasts the same
+`budget:created` event the app emits. **Every `ctx.costs.*` call also requires the Costs
+(budget) addon to be enabled** — if the admin has turned it off, the call is refused with
+`RESOURCE_FORBIDDEN`.
+
### Route auth
Routes are authenticated by default (`req.user` is the logged-in user). Set
@@ -149,27 +193,119 @@ raw headers or the session cookie.
The iframe is served same-origin from `/plugin-frame/<id>/…` but sandboxed
**without `allow-same-origin`**, so it runs at an **opaque origin**: it can't read
-cookies or the parent DOM. It talks to TREK only via `postMessage` (target origin
-must be `'*'` — an opaque frame has no nameable origin).
+cookies or the parent DOM, and the CSP forbids external `<link>`/`<script src>` — so
+**everything must be inlined** into your `index.html`. It talks to TREK only via
+`postMessage` (target origin must be `'*'` — an opaque frame has no nameable origin).
+
+### The design kit (recommended)
+
+Because the frame can't load TREK's stylesheet, we ship it. Drop **one line** in your
+`client/index.html` `<head>`:
+
+```html
+<!-- trek:ui -->
+```
+
+`dev` and `pack` expand that marker into the inlined **TREK design kit** — a
+token-driven stylesheet plus a `window.trek` bridge. It costs nothing to keep the
+source a one-liner, and a rebuild always ships the current kit. The kit:
+
+- gives you native components — **glass panels, cards, buttons, inputs, chips, list
+ rows, hover** — that swap correctly between light and dark;
+- follows the user's live **accent scheme, custom accent and high-contrast** (it
+ applies the tokens TREK sends);
+- mirrors the host's **appearance flags** (reduced-motion, no-transparency, density);
+- **auto-reports your height** (widgets/pages self-size — no manual `trek:resize`);
+- installs `window.trek` so you never hand-roll `postMessage`.
+
+`window.trek` also carries **`trek.ui`** — tiny DOM builders that emit kit-styled
+elements, so you can build UI with no bundler and no CSS:
```js
-// Announce readiness — TREK replies with trek:context.
-window.parent.postMessage({ type: 'trek:ready' }, '*')
+const { ui } = trek
+ui.mount(ui.card([
+ ui.el('div', { class: 'trek-title', text: 'Nearby' }),
+ ui.button('Refresh', { variant: 'primary', onClick: refresh }),
+ ui.chip('open now', 'success'),
+]))
+// ui.el(tag, props, children) is the general builder; props take class/text/html/on:{event}.
+```
+
+The scaffold seeds a working example. A minimal client:
+
+```html
+<!doctype html>
+<html lang="en">
+<head>
+ <meta charset="utf-8" />
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
+ <!-- trek:ui -->
+</head>
+<body>
+ <div class="trek-glass trek-stack" style="margin:16px">
+ <div class="trek-title">Your plugin</div>
+ <p class="trek-muted" id="hello">…</p>
+ <button class="trek-btn trek-btn--primary" id="go">Say hello</button>
+ </div>
+ <script>
+ trek.onContext((ctx) => { document.getElementById('hello').textContent = 'theme: ' + ctx.theme })
+ document.getElementById('go').addEventListener('click', async () => {
+ try { const data = await trek.invoke('/hello'); document.getElementById('hello').textContent = 'Hello ' + data.hello }
+ catch (e) { trek.notify('error', e.message) }
+ })
+ </script>
+</body>
+</html>
+```
+**Component classes** (the bootstrap adds `trek-ui` to `<body>`):
+
+| Class | What |
+|---|---|
+| `.trek-glass` | the signature frosted-glass surface |
+| `.trek-card` | a solid card |
+| `.trek-interactive` | add to a glass/card for the native hover-lift |
+| `.trek-btn` + `--primary` / `--secondary` / `--ghost` / `--danger` | buttons |
+| `.trek-input` / `.trek-textarea` / `.trek-select` / `.trek-label` | form controls |
+| `.trek-chip` + `--accent` / `--success` / `--danger` / `--warning` / `--info` | chips / badges |
+| `.trek-row` | a hover-highlight list row |
+| `.trek-title` / `.trek-muted` / `.trek-faint` | text helpers |
+| `.trek-stack` / `.trek-cluster` | vertical / horizontal flex with gap |
+
+**The `window.trek` bridge:**
+
+| Call | Does |
+|---|---|
+| `trek.onContext(cb)` | run `cb(context)` now (if already received) and on every update; returns an unsubscribe fn |
+| `trek.context` | the last context (or `null`) |
+| `trek.invoke(sub, { method, body })` | call your own route; returns a `Promise` (rejects with an `Error`, `.code` = HTTP status) |
+| `trek.notify(level, message)` | toast (`info`/`success`/`warning`/`error`) |
+| `trek.navigate(to)` | in-app navigation (relative paths only) |
+| `trek.resize(px)` | override the auto height |
+| `trek.ready()` / `trek.requestContext()` | re-handshake / re-request the context |
+
+**Preview it:** `npx trek-plugin-sdk dev`, then open **`/preview`** — it renders your UI
+in a real sandboxed frame with a theme/accent/appearance toggle and proxies
+`trek.invoke()` to your routes.
+
+### The raw bridge (without the kit)
+
+If you'd rather not use the kit, talk to the frame yourself. Announce readiness and
+handle messages:
+
+```js
+window.parent.postMessage({ type: 'trek:ready' }, '*') // TREK replies with trek:context
window.addEventListener('message', (e) => {
+ if (e.source !== window.parent) return // opaque frame: trust the parent window
const m = e.data
- if (m.type === 'trek:context') {
- // m.tripId, m.userId (string|null), m.theme ('light'|'dark'), m.locale, m.hostOrigin
- }
- if (m.type === 'trek:response' && m.requestId === '1') { /* m.data */ }
- if (m.type === 'trek:error' && m.requestId === '1') { /* m.code, m.message */ }
+ if (m.type === 'trek:context') { /* m.theme, m.tokens, m.appearance, … (below) */ }
+ if (m.type === 'trek:response') { /* m.requestId, m.data */ }
+ if (m.type === 'trek:error') { /* m.requestId, m.code, m.message */ }
})
-
-// Call one of your OWN server routes — TREK proxies it with the user's session:
window.parent.postMessage({ type: 'trek:invoke', requestId: '1', sub: '/status', method: 'GET' }, '*')
```
-**Messages you send to TREK (inbound bridge):**
+**Messages you send to TREK:**
| Message | Payload | Effect |
|---|---|---|
@@ -180,16 +316,62 @@ window.parent.postMessage({ type: 'trek:invoke', requestId: '1', sub: '/status',
| `trek:resize` | `{ height }` | set the iframe height (capped at 2000px) |
| `trek:invoke` | `{ requestId, sub, method, body }` | call your own route; resolves as `trek:response` or `trek:error` |
-**Messages TREK sends you (host bridge):**
+**Messages TREK sends you:**
| Message | Payload |
|---|---|
-| `trek:context` | `{ tripId, userId, theme, locale, hostOrigin }` — `userId` is a **string** or `null` |
+| `trek:context` | `{ tripId, userId, theme, locale, hostOrigin, user, formats, tokens, appearance }` (see below) — re-sent whenever the theme **or appearance** changes |
| `trek:response` | `{ requestId, data }` — a successful `trek:invoke` |
| `trek:error` | `{ requestId, code, message }` — a failed `trek:invoke` (`code` is the HTTP status or `"error"`) |
-The frame's CSP is locked down per plugin: `default-src 'none'`, own scripts/styles
-only, `connect-src` limited to your declared `egress[]` hosts, no popups.
+The frame's CSP is locked down per plugin: `default-src 'none'`, own inline
+scripts/styles only, `connect-src` limited to the hosts you were **granted** via
+`http:outbound:<host>` permissions (not merely the `egress[]` you declared), no popups.
+
+### The context payload
+
+| Field | Type |
+|---|---|
+| `tripId` | `number \| null` — the trip in view (a `trip-page` tab, or a widget on a trip), else `null` |
+| `placeId` | `number \| null` — the place in view (a `place-detail` slot), else `null` |
+| `userId` | `string \| null` |
+| `theme` | `'light' \| 'dark'` |
+| `locale` | e.g. `'en'` |
+| `hostOrigin` | the app origin |
+| `user` | `{ name, avatar, isAdmin } \| null` — **never** an email; role only as a boolean |
+| `formats` | `{ locale, currency, timeFormat, distanceUnit, temperatureUnit, timezone }` |
+| `tokens` | TREK's resolved CSS design tokens for the current theme (see below) |
+| `appearance` | `{ scheme, density: 'comfortable'\|'compact', reducedMotion, noTransparency }` |
+
+### Matching the TREK look by hand (`m.tokens`)
+
+`tokens` is the whole global palette resolved for the **current** theme — surfaces
+(`--bg-card`, `--bg-hover`, …), text (`--text-primary`/`-secondary`/`-muted`/`-faint`),
+borders, the **accent family** (`--accent`, `--accent-text`, `--accent-hover`,
+`--accent-subtle`), semantic + soft fills (`--success`/`--danger`/`--warning`/`--info`
+`-soft`), shadows (`--shadow-*`), radii (`--radius-*`) and fonts (`--font-system`).
+Apply them as CSS variables and your UI matches the host exactly — in both themes and
+under a custom accent or high-contrast — instead of hard-coding a palette that drifts:
+
+```js
+function applyContext(m) {
+ document.documentElement.dataset.theme = m.theme // for your dark rules
+ for (const k in m.tokens) document.documentElement.style.setProperty(k, m.tokens[k])
+ const a = m.appearance || {}
+ document.documentElement.toggleAttribute('data-reduce-motion', !!a.reducedMotion)
+ document.documentElement.toggleAttribute('data-no-transparency', !!a.noTransparency)
+}
+// in your trek:context handler: applyContext(m)
+```
+
+`tokens`/`appearance` are non-secret display values only, re-sent on every theme or
+appearance change so plugins feel native rather than bolted-on. (The glassy tokens the
+dashboard uses — `--glass-*`, `--r-*`, `--sh-*` — aren't in `tokens`; the design kit
+bakes those, since they only change with light/dark, not the accent.) Honour
+`appearance.reducedMotion` / `noTransparency`, and the frame also inherits the OS
+`prefers-reduced-motion`. Dashboard widgets are wrapped in the native glassy tool card
+and auto-size to the height you report via `trek:resize`, so render flush and
+transparent — the design kit reports your height for you.
## Settings
@@ -199,14 +381,174 @@ settings are per-user. `secret: true` fields are stored encrypted and delivered
decrypted through `ctx.config` (server-side only) — never to the iframe. Resolved
values arrive in `ctx.config`.
-## Integration hooks (not yet functional)
+## Provider hooks
+
+A hook is core calling **into** your plugin for data (host→plugin). Declare it on
+the plugin definition and grant the matching `hook:*` permission:
+
+```js
+module.exports = definePlugin({
+ hooks: {
+ placeDetailProvider: {
+ // Return extra rows TREK renders natively on a place. Runs with the current
+ // user bound, on a short timeout — a slow/failing call is skipped, never fatal.
+ async getDetails(placeId, ctx) {
+ return [{ label: 'Crowd', value: 'Quiet now' }, { label: 'Guide', url: 'https://…' }]
+ },
+ },
+ },
+})
+```
+
+| Hook | Permission | Status |
+|---|---|---|
+| `placeDetailProvider.getDetails(placeId, ctx)` → `{ label, value?, url? }[]` | `hook:place-detail-provider` | **live** — shown in the place-detail panel; also `GET /api/place-details/:placeId` |
+| `warningProvider.getWarnings(tripId, ctx)` → `{ level, message, dayId?, placeId? }[]` | `hook:trip-warning-provider` | **live** — validation warnings shown as a non-blocking banner in the trip planner; also `GET /api/trip-warnings/:tripId` |
+| `photoProvider` / `calendarSource` | `hook:photo-provider` / `hook:calendar-source` | reserved — declared + the `invoke.hook` transport exists, but no core consumer calls them yet |
+
+Each hook method receives its args plus the per-invocation `ctx`, so any `ctx.trips.*`
+read it makes is membership-checked against the current user (like a route handler).
+
+## Event subscriptions
+
+React to core activity with `events` + the `events:subscribe` permission. Handlers
+fire **without a user** (like a job) and receive only the **event name + tripId** —
+never the payload — so a plugin can react to activity without seeing content:
-The SDK exports `PhotoProvider` / `CalendarSource` interfaces and a
-`hooks: { photoProvider, calendarSource }` field on the plugin definition, and the
-`hook:photo-provider` / `hook:calendar-source` permissions validate. **However the
-host runtime does not consume `hooks` yet** — it only invokes `onLoad`, `onUnload`,
-`routes` and `jobs`. Treat these as a reserved surface: you can declare them, but
-TREK will not call them today. Build integrations with routes + jobs for now.
+```js
+module.exports = definePlugin({
+ events: [
+ { on: 'place:created', async handler({ event, tripId }, ctx) {
+ await ctx.db.exec('INSERT INTO activity (trip, evt) VALUES (?, ?)', tripId, event)
+ } },
+ { on: '*', handler(e) { /* firehose: every core event */ } },
+ ],
+})
+```
+
+Delivery is fire-and-forget on a short timeout, so a slow subscriber never blocks a
+core write. Because there's no user, trip reads (`ctx.trips.*`) are refused inside a
+handler — use the plugin's own `ctx.db`, `ctx.ws.*`, or an outbound call. A plugin's
+own `plugin:*` broadcasts are never delivered back, so handlers can't loop. Common
+events: `place:*`, `day:*`, `assignment:*`, `budget:*`, `file:*`, `accommodation:*`.
+
+## Dependencies
+
+A plugin can declare that it needs certain **addons** enabled, or other **plugins**
+installed, before it will run. Both are top-level manifest arrays, and both are
+enforced at **activation** — installing always succeeds, so a missing dependency is a
+fixable state, never a broken download.
+
+### `requiredAddons`
+
+```json
+"requiredAddons": ["budget", "journey"]
+```
+
+Addon ids (see [[Addons Overview|Addons-Overview]]) that must be **enabled** for the
+plugin to activate. If one is off, enabling the plugin is refused and the admin panel
+names the addon to turn on. Turning a required addon **off** while the plugin is
+running **auto-disables the plugin** (and anything that depends on it) — a plugin
+never runs against a disabled addon. Ids are validated for shape only, so a plugin may
+name an addon a given TREK build doesn't have; it just stays un-activatable there.
+
+### `pluginDependencies`
+
+```json
+"pluginDependencies": [
+ { "id": "koffi", "version": ">=1.2.0 <2.0.0" }
+]
+```
+
+Other plugins that must be **installed and version-satisfied** (a standard semver
+range) before this one activates. That range is the real contract for anything you
+call on the dependency (see [Talking to other plugins](#talking-to-other-plugins)).
+
+Enforcement, all at activation time:
+
+- **Missing** dependency → activation is blocked and the panel offers a one-click
+ **download** that fetches the newest registry version satisfying your range (pulling
+ *its* own dependencies too), then retries.
+- **Installed but out of range** → same block; the panel offers to update it.
+- **Installed but disabled** → enabling your plugin **auto-enables the dependency
+ first**, transitively (deepest dependency first).
+- **Disabling a dependency** cascades: every plugin that (transitively) depends on it
+ is disabled too.
+- A dependency **cycle** (A → B → A) is refused with a clear error.
+
+Dependencies are also resolved deps-first at boot, so a plugin's dependencies are
+already up before it starts.
+
+## Talking to other plugins
+
+Isolation is the default — plugins can't see each other. To let a plugin be *used* by
+the plugins that depend on it, it opts in by declaring a surface in its manifest
+`capabilities`, and the host routes calls/events between the two child processes.
+There is **no permission** for this: authorization is the dependency edge itself —
+plugin A may call or subscribe to plugin B only if A declares B as a satisfied
+`pluginDependency`, and only for the names B publicly declares.
+
+### Exports — request / response
+
+The **dependency** (B) exposes named functions and lists them in `capabilities.provides`:
+
+```js
+// plugin "koffi"
+module.exports = definePlugin({
+ exports: {
+ // `args` is whatever the caller passed; `ctx` is a per-call context.
+ async convert({ amount, from, to }, ctx) {
+ return { amount: amount * rate(from, to), to }
+ },
+ },
+})
+// manifest: "capabilities": { "provides": ["convert"] }
+```
+
+The **dependent** (A) declares koffi as a dependency and calls it:
+
+```js
+// manifest: "pluginDependencies": [{ "id": "koffi", "version": ">=1.0.0 <2.0.0" }]
+const out = await ctx.plugins.call('koffi', 'convert', { amount: 10, from: 'USD', to: 'EUR' })
+```
+
+- A call is refused (`RESOURCE_FORBIDDEN`) if the target isn't a satisfied dependency,
+ isn't currently active, or the function isn't in the target's `provides`.
+- **The acting user is propagated:** B's export runs as A's current user, so any
+ `ctx.trips.*` read B makes is membership-checked against that user — B can't be
+ tricked into reading data the calling user couldn't see.
+- The call is bounded by a timeout and recorded in the capability audit log
+ (`plugin:<target>#<fn>`), attributed to A and the acting user.
+- B owns its contract: only functions in `provides` are reachable — routes, jobs and
+ helpers stay private. Because your `pluginDependencies` range pins B's version, B can
+ refactor internals freely and only breaks you on a major bump.
+
+### Events — publish / subscribe
+
+The **emitter** (B) declares event names in `capabilities.emits` and publishes them:
+
+```js
+// manifest: "capabilities": { "emits": ["rate.updated"] }
+ctx.events.emit('rate.updated', { pair: 'USD/EUR', rate: 0.92 }) // fire-and-forget
+```
+
+A **dependent** (A) subscribes by naming the source plugin + event:
+
+```js
+module.exports = definePlugin({
+ subscriptions: [
+ { plugin: 'koffi', event: 'rate.updated', async handler(payload, ctx) {
+ await ctx.db.exec('UPDATE cache SET rate = ?', payload.rate)
+ } },
+ ],
+})
+```
+
+- An event reaches A only if A declares `koffi` as a satisfied dependency **and**
+ subscribed to that `(plugin, event)`. Emitting an event not in your `emits` is refused.
+- Like core [event subscriptions](#event-subscriptions), handlers run **without a
+ user** — but unlike them they **do** receive the emitter's payload. Delivery is
+ fire-and-forget on a short timeout; a slow subscriber never blocks the emitter.
## Testing without a running TREK
@@ -226,7 +568,9 @@ await expect(ctx.db.query('SELECT 1')).rejects… // PERMISSION_DENIED (no
```
The mock db is a recorder — set `queryResults` for canned rows, or use an
-integration test for real SQL.
+integration test for real SQL. To test inter-plugin calls, pass
+`pluginExports: { koffi: { convert: (args) => … } }` and assert on `mock.emitted`
+for anything your plugin publishes via `ctx.events.emit`.
## Rules
@@ -246,7 +590,7 @@ integration test for real SQL.
| `name` | string, **required** | display name; also the page nav label. |
| `version` | string, **required** | semver (`1.2.3`, optional pre-release). |
| `apiVersion` | number | plugin API version (currently `1`; `PLUGIN_API_VERSION`). Defaults to `1`. |
-| `type` | string, **required** | `integration` \| `page` \| `widget`. |
+| `type` | string, **required** | `integration` \| `page` \| `widget` \| `trip-page`. |
| `trek` | string | supported TREK range, e.g. `">=3.2.0 <4.0.0"`. Its lower bound becomes `minTrekVersion` in the registry entry. |
| `author` | string | shown in the store. |
| `description` | string | one-line summary for the store. |
@@ -256,7 +600,11 @@ integration test for real SQL.
| `nativeModules` | boolean | must be `false`/absent — `true` is rejected. |
| `permissions` | string[] | see below. |
| `egress` | string[] | allowed outbound hosts; required (non-empty, no bare `*`) when any `http:outbound` permission is present. |
-| `capabilities.widget` | object | `{ title, slot, defaultSize }` — `slot` is `sidebar` (default) or `hero`. |
+| `capabilities.widget` | object | `{ title, slot, defaultSize }` — `slot` is `sidebar` (default), `hero`, or `place-detail`. |
+| `capabilities.provides` | string[] | function names this plugin exposes to its dependents via `ctx.plugins.call` (see [Talking to other plugins](#talking-to-other-plugins)). |
+| `capabilities.emits` | string[] | event names this plugin publishes to its dependents via `ctx.events.emit`. |
+| `requiredAddons` | string[] | addon ids that must be **enabled** for the plugin to activate (see [Dependencies](#dependencies)). |
+| `pluginDependencies` | `{ id, version }[]` | other plugins (semver range) that must be installed + version-satisfied to activate. |
| `settings` | array | setting fields (below). |
**Permissions** (unknown values are rejected):
@@ -265,11 +613,23 @@ integration test for real SQL.
|---|---|
| `db:own` | `ctx.db` — your own SQLite file |
| `db:read:trips` | `ctx.trips.*` (membership-checked, route handlers only) |
+| `db:read:packing` | `ctx.packing.list(tripId)` — a trip's packing items (membership-checked) |
+| `db:read:files` | `ctx.files.list(tripId)` — a trip's files, trash excluded (membership-checked) |
+| `db:read:costs` | `ctx.costs.getByTrip` / `ctx.costs.listMine` (Costs addon, route handlers only) |
+| `db:write:costs` | `ctx.costs.create/update/delete` (Costs addon + acting user's `budget_edit`) |
+| `db:write:places` | `ctx.places.create/update/delete` (acting user's `place_edit`) |
+| `db:write:days` | `ctx.days.create/update/delete` (acting user's `day_edit`) |
+| `db:write:itinerary` | `ctx.itinerary.assign/unassign` (acting user's `day_edit`) |
+| `db:write:trips` | `ctx.trips.update` (acting user's `trip_edit`) |
+| `db:meta` | `ctx.meta.*` — your own namespaced data on a trip/place/day |
| `db:read:users` | `ctx.users.getById` |
+| `events:subscribe` | receive core activity events via `events: [...]` (name + tripId only) |
| `ws:broadcast:trip` | `ctx.ws.broadcastToTrip` |
| `ws:broadcast:user` | `ctx.ws.broadcastToUser` |
| `http:outbound` or `http:outbound:<host>` | outbound HTTP to `egress[]` hosts |
-| `hook:photo-provider` / `hook:calendar-source` | reserved (see [Integration hooks](#integration-hooks-not-yet-functional)) |
+| `hook:place-detail-provider` | `hooks.placeDetailProvider` — extra place rows TREK renders (see [Provider hooks](#provider-hooks)) |
+| `hook:trip-warning-provider` | `hooks.warningProvider` — validation warnings in the planner (see [Provider hooks](#provider-hooks)) |
+| `hook:photo-provider` / `hook:calendar-source` | reserved (see [Provider hooks](#provider-hooks)) |
> There is **no `ws:broadcast:*`** — use `ws:broadcast:trip` and/or
> `ws:broadcast:user` explicitly.
@@ -297,6 +657,12 @@ See [[Plugin Permissions|Plugin-Permissions]] for the full permission model.
## The `trek-plugin` CLI
+Run `npx trek-plugin-sdk` **with no command** in a terminal and you get an
+interactive menu (create / dev / validate / pack / publish, with signing and
+registry-entry commands under **Advanced…**); it just picks which command to run,
+then that command prompts for whatever it needs. Pass a command explicitly to skip
+the menu (and for scripts/CI).
+
Author commands (from `trek-plugin-sdk`):
```bash
diff --git a/wiki/Plugin-Permissions.md b/wiki/Plugin-Permissions.md
index 1f3fa48c8..c5e4371c0 100644
--- a/wiki/Plugin-Permissions.md
+++ b/wiki/Plugin-Permissions.md
@@ -13,10 +13,22 @@ ungranted capability is physically unreachable**, not just disallowed. See
| `db:own` | Read/write the plugin's **own** SQLite file via `ctx.db` — `db.query`, `db.exec`, **and `db.migrate`** | A separate file per plugin — never `trek.db`. `db.migrate` runs a keyed, idempotent migration (schema/table creation, e.g. `CREATE TABLE`) once per id. `ATTACH`/`DETACH`/`VACUUM`/`PRAGMA` are refused. |
| `db:read:trips` | Read-only trip data via `ctx.trips` (`getById`, `getPlaces`, `getReservations`) | Every call is **membership-checked** against the acting user — a plugin can't read a trip that user can't see. |
| `db:read:users` | Read-only public profile via `ctx.users.getById` | Returns id, username, display name, avatar only — **never** password hashes, tokens, or secrets. |
+| `db:read:packing` | Read-only packing items of a trip via `ctx.packing.list(tripId)` | Membership-checked, and scoped to the acting user's visibility — a plugin never sees another member's private packing items. |
+| `db:read:files` | Read-only files of a trip via `ctx.files.list(tripId)` | Membership-checked; trashed files excluded. |
+| `db:read:costs` | Read-only costs (budget items) via `ctx.costs` (`getByTrip`, `listMine`) | Membership-checked; needs the Costs addon enabled. |
+| `db:write:costs` | Create costs via `ctx.costs.create` | Trip access **+** the `budget_edit` permission **+** the Costs addon. |
+| `db:write:places` | Create/update/delete places via `ctx.places` | Trip access **+** the `place_edit` permission. Input validated against TREK's schema; every write audited. |
+| `db:write:days` | Create/update/delete days via `ctx.days` | Trip access **+** the `day_edit` permission. |
+| `db:write:itinerary` | Assign/remove places on days via `ctx.itinerary` | Trip access **+** the `day_edit` permission (it's a day edit). |
+| `db:write:trips` | Update trip details via `ctx.trips.update` | Trip access **+** `trip_edit`. Only schema-writable fields; **archiving** additionally needs `trip_archive` and **cover_image** needs `trip_cover_upload` (same split as the web UI). |
+| `db:meta` | Store the plugin's **own** private key/value data on a trip/place/day via `ctx.meta` | Namespaced per plugin (a plugin only sees its own rows). Reads need trip **access**; **writes** additionally need the entity's edit permission (`place_edit`/`day_edit`/`trip_edit`). Quotas: ≤256-char key, ≤64 KB value, ≤100 keys per entity. Purged on uninstall-with-delete-data. |
| `ws:broadcast:trip` | Push a real-time event to a trip room via `ctx.ws.broadcastToTrip` | Event types are force-namespaced `plugin:<id>:<event>` — a plugin can't forge a core event. |
| `ws:broadcast:user` | Push a real-time event to a user's connections | Same namespacing. |
+| `events:subscribe` | React to core activity via `events: [{ on, handler }]` on the plugin definition | The handler gets only the **event name + tripId** (never the payload) and runs with **no user** (like a job), so it can't read trip data — it reacts to the fact. Fire-and-forget on a short timeout; `plugin:*` re-broadcasts are never delivered back. |
| `hook:photo-provider` | Register as a photo provider in Memories | Implement the `PhotoProvider` interface. |
| `hook:calendar-source` | Register as a calendar source | Implement the `CalendarSource` interface. |
+| `hook:place-detail-provider` | Contribute extra details (reviews, ratings, links) to a place via the `hooks.placeDetailProvider` provider hook | Implement `PlaceDetailProvider` in `hooks` on the plugin definition (not on `ctx`) — shown in the place-detail panel; also exposed at `GET /api/place-details/:placeId`. |
+| `hook:trip-warning-provider` | Raise validation warnings on a trip via the `hooks.warningProvider` provider hook | Implement `WarningProvider` in `hooks` on the plugin definition (not on `ctx`) — shown as a non-blocking banner in the planner; also exposed at `GET /api/trip-warnings/:tripId`. |
| `http:outbound` / `http:outbound:<host>` | Make outbound network requests | **Requires** a non-empty `egress[]`. Only a **per-host** `http:outbound:<host>` actually opens a host at runtime — see below. |
## Outbound network — `http:outbound` vs `http:outbound:<host>`
@@ -101,6 +113,18 @@ flow is in [[Publishing a Plugin|Plugin-Publishing]].
installs on `sha256` alone — but once a plugin has shipped signed, an unsigned
update for it is refused. See [[Publishing a Plugin|Plugin-Publishing]].
+## Not a permission — inter-plugin calls & events
+
+Calling another plugin (`ctx.plugins.call`) and exchanging events
+(`ctx.events.emit` / `subscriptions`) are **not** gated by a permission. Their grant
+is the **dependency declaration**: a plugin may call or subscribe to another only if
+it lists it as a satisfied `pluginDependency`, and only for the function/event names
+that plugin publicly declares in `capabilities.provides` / `capabilities.emits`.
+Calls run mediated by the host, carry the caller's acting user (so trip reads stay
+membership-checked), and are recorded in the capability audit log. See
+[[Plugin Development|Plugin-Development#talking-to-other-plugins]] and
+[[Plugin Development|Plugin-Development#dependencies]].
+
## What is NOT covered
Isolation bounds *what* a plugin can touch, not its intent within a grant. A
diff --git a/wiki/Plugin-Publishing.md b/wiki/Plugin-Publishing.md
index a37a105c3..c59716c42 100644
--- a/wiki/Plugin-Publishing.md
+++ b/wiki/Plugin-Publishing.md
@@ -32,7 +32,7 @@ Put your plugin in a **public GitHub repo** (convention: `trek-plugin-<id>`).
`create-trek-plugin` scaffolds the layout:
```bash
-npx trek-plugin-sdk create flight-tracker --type widget # integration | page | widget
+npx trek-plugin-sdk create flight-tracker --type widget # integration | page | widget | trip-page
```
A publishable plugin has, at the repo root:
@@ -40,7 +40,7 @@ A publishable plugin has, at the repo root:
- `trek-plugin.json` — the manifest (see [[Plugin Development|Plugin-Development]])
- `package.json` — the CommonJS marker (`"type": "commonjs"`), with the SDK as a devDependency at most
- `server/index.js` — the built server entry (required)
-- `client/` — the built frontend (only for `page`/`widget` plugins)
+- `client/` — the built frontend (only for `page`/`widget`/`trip-page` plugins)
- `README.md` — filled in, with a real screenshot (the quality gate is strict — see below)
- `docs/screenshot.png` — the store card image, committed to the repo
@@ -78,6 +78,12 @@ installer (25 MB per file, 50 MB total, 4000 entries).
> `docs/screenshot.png` straight from the repo at the pinned commit, so keep it
> committed to GitHub but out of the zip — `pack` handles this for you.
+The `plugin.zip` `pack` produces is also the artifact for **sideloading**: hand it
+to an instance admin (or drag it onto **Admin → Plugins**) to install without the
+registry at all — no PR, no review, no SHA-256/signature pin. Sideloaded plugins
+are flagged as such and never auto-update, so the registry PR below is still the
+path for anything you want discoverable and updatable. See [[Plugins|Plugins]].
+
## 4. Create the GitHub release
Tag `vX.Y.Z` where `X.Y.Z` **equals** `version` in your manifest, and attach the
diff --git a/wiki/Plugins.md b/wiki/Plugins.md
index 38c1e89b0..f2aa34a6c 100644
--- a/wiki/Plugins.md
+++ b/wiki/Plugins.md
@@ -20,6 +20,7 @@ A plugin declares one `type` in its manifest, which decides where it surfaces:
|---|---|---|
| **widget** | On the dashboard — in the sidebar, or (with `slot: "hero"`) as a boarding-pass style hero overlay | At-a-glance info like flight status or weather |
| **page** | As its own entry in the top navigation | A full self-contained tool |
+| **trip-page** | As a tab **inside every trip planner** (alongside Plan / Transports / Files), scoped to the open trip | A tool that works against one trip at a time |
| **integration** | Nowhere visible — registers into TREK via hooks (e.g. a photo provider or calendar source) | Feed data into existing TREK features |
## Enabling plugins
@@ -54,6 +55,12 @@ code:
- It talks to TREK exclusively over an internal RPC channel, and TREK only
answers the capabilities the plugin's manifest **declares and you approve**.
An ungranted call is refused, not merely ignored.
+- The RPC channel itself is **sealed off from plugin code**: even though the
+ plugin runs in a forked process, its raw IPC primitives (`process.send`,
+ `process.on('message')`) are revoked before its code loads — just like
+ `process.binding`. So a plugin can neither forge host messages (fake its route
+ table, spoof another request's identity) nor eavesdrop on other in-flight
+ requests. Every interaction is forced through the capability-checked SDK.
- A page/widget's interface runs in a **sealed browser frame** that can't read
your session cookie or touch the surrounding TREK page.
- If a plugin crashes, hangs, or runs out of memory, only *its* process dies —
@@ -73,14 +80,20 @@ plus a toolbar:
- **Type** filter — All / Widget / Integration / Page.
- **Status** filter (Installed view only) — All / Active / Off / Update available / Error.
- **Sort** — Name / Recently updated / Updates first.
-- **Rescan** — re-reads the on-disk plugins directory (see [Installing](#installing-a-plugin)).
+- **Upload** — sideload a plugin from a `.zip`/`.tar.gz` (see [Installing](#installing-a-plugin)).
+- **Rescan** — rediscovers the on-disk plugins directory **and** force-pulls the
+ remote registry, bypassing the 30-minute server cache and GitHub's CDN so a
+ just-published plugin (or update) shows up immediately rather than up to ~35
+ minutes later (see [Installing](#installing-a-plugin)).
Each installed row shows an icon tile with a **health dot** (green = active,
blue pulse = starting, red = error, amber = disabled/incompatible, faint = inactive),
-the name and version, a **Reviewed** shield if applicable, and **capability
-chips** derived from its declared permissions — "Reads your trips", "Dashboard
-widget", "Real-time updates", "Provides photos", outbound hosts, and so on — so a
-plugin's real reach is legible without opening anything.
+the name and version, a **Reviewed** shield if applicable, a **Sideloaded** tag
+for manually-uploaded plugins (see [Installing](#installing-a-plugin)), and
+**capability chips** derived from its declared permissions — "Reads your trips",
+"Reads costs" / "Writes costs", "Dashboard widget", "Real-time updates",
+"Provides photos", outbound hosts, and so on — so a plugin's real reach is
+legible without opening anything.
## Reviewing a plugin before install
@@ -101,14 +114,23 @@ guarantee. Read the access list and outbound hosts, not just the description.
## Installing a plugin
-Two ways, both from **Admin → Plugins**:
+Three ways, all from **Admin → Plugins**:
1. **From the registry.** In **Discover**, open a plugin and click **Install**
(also available directly on the card). TREK downloads the pinned version, verifies
its SHA-256 against the registry (and an author signature if the plugin ships one),
safely unpacks it, re-validates the manifest, and registers it — **inactive**.
Nothing runs yet.
-2. **From disk.** Drop a plugin directory into the plugins code directory
+2. **By upload (sideload).** Drag a plugin `.zip`/`.tar.gz` onto the panel, or use
+ the **Upload** button. TREK extracts it into staging with the same hard guards as
+ a registry install (slip/bomb-safe extract, strict manifest, no native binaries —
+ only the registry SHA-256/signature checks don't apply, since there's no registry
+ entry) and registers it **inactive**. A sideloaded plugin is marked **Sideloaded**,
+ is unsigned and not registry-reviewed, has **no auto-update** and no "Source
+ repository" link. Uploading over an existing id force-stops and deactivates the old
+ code first, so the replacement never keeps running without a fresh activation.
+ (Max 50 MB, same ceiling as the SDK's `pack`.)
+3. **From disk.** Drop a plugin directory into the plugins code directory
(`server/data/plugins`, or your `TREK_PLUGINS_DIR` volume) and click **Rescan**
(or restart). TREK discovers it and registers it inactive.
@@ -121,6 +143,30 @@ appears in the top navigation; a widget appears on the dashboard. There is no
separate "Activate" button or second consent screen — you reviewed the permissions
before installing.
+## Dependencies between plugins and addons
+
+A plugin can require **other plugins** or **addons** to be present before it runs.
+This is enforced when you **activate** — installing never fails on a dependency, so
+you can always install first and resolve after. The installed row shows a plugin's
+dependencies as chips (amber when one is missing, out of range, or its addon is off).
+
+- **Requires an addon that's off** — activation is blocked with a message naming the
+ addon. Turn it on in **Admin → Addons**, then flip the plugin on. Turning a required
+ addon back **off** while the plugin runs disables the plugin automatically.
+- **Missing a plugin it depends on** — activation opens a **dependency dialog** listing
+ what's missing; each has a **Download** button that fetches the newest compatible
+ version from the registry (and its own dependencies) and then enables your plugin. A
+ dependency that's installed but the *wrong version* shows an **Update** button instead.
+- **Depends on a plugin that's installed but off** — enabling your plugin
+ **auto-enables its dependencies first**, in order.
+- **Disabling a plugin others depend on disables those dependents too** — a plugin
+ can't keep running with a dependency that's gone.
+
+Plugins that declare a dependency can also **call each other's functions and exchange
+events** at runtime — always mediated by TREK, and only along a declared dependency (a
+plugin can't reach one it didn't declare). See
+[[Plugin Development|Plugin-Development#talking-to-other-plugins]].
+
## Managing a plugin
The **⋯** menu on each row:
diff --git a/wiki/_Sidebar.md b/wiki/_Sidebar.md
index 773f5ce01..f19759693 100644
--- a/wiki/_Sidebar.md
+++ b/wiki/_Sidebar.md
@@ -70,6 +70,7 @@
## Plugins
- [[Plugins Overview|Plugins]]
- [[Plugin Development|Plugin-Development]]
+- [[Plugin Cookbook|Plugin-Cookbook]]
- [[Plugin Permissions|Plugin-Permissions]]
- [[Publishing a Plugin|Plugin-Publishing]]