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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions apps/web/src/components/app-shell/app-sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import {
Puzzle,
Settings,
Shield,
Sparkles,
Sun,
Trash2,
Users,
Expand Down Expand Up @@ -1500,6 +1501,11 @@ export function AppSidebar() {
exact
/>
) : null}
<NavItem
to="/admin/changelog"
icon={Sparkles}
label={t("nav.changelog")}
/>
<PluginAdminPages navItems={adminPluginNavItems} />
</SidebarMenu>
</SidebarGroupContent>
Expand Down
98 changes: 98 additions & 0 deletions apps/web/src/components/home/UpdateBanner.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
import { useQuery } from "@tanstack/react-query";
import { ArrowUpRight, Sparkles, X } from "lucide-react";
import { useState } from "react";
import { useTranslation } from "react-i18next";

import { type ReleaseInfo, versionQueryOptions } from "@/lib/version-api";

const DISMISS_KEY = "paca-update-banner-dismissed";

function readDismissed(): string | null {
try {
return window.localStorage.getItem(DISMISS_KEY);
} catch {
return null;
}
}

/**
* Home banner that surfaces newer releases of the upstream project and/or the
* fork. Rendered only when the API reports an available update; dismissible per
* release set (a new release re-shows it).
*/
export function UpdateBanner() {
const { t } = useTranslation("shared");
const { data } = useQuery(versionQueryOptions());
const [dismissed, setDismissed] = useState<string | null>(readDismissed);

const updates: { kind: "upstream" | "fork"; info: ReleaseInfo }[] = [];
if (data?.upstream?.hasUpdate) {
updates.push({ kind: "upstream", info: data.upstream });
}
if (data?.fork?.hasUpdate) {
updates.push({ kind: "fork", info: data.fork });
}

if (updates.length === 0) {
return null;
}

// Encode the set of latest versions so dismissing hides only this exact set;
// a later release produces a new signature and shows the banner again.
const signature = updates.map((u) => u.info.latest).join(",");
if (dismissed === signature) {
return null;
}

const dismiss = () => {
try {
window.localStorage.setItem(DISMISS_KEY, signature);
} catch {
// ignore storage failures — dismissal just won't persist
}
setDismissed(signature);
};

return (
<div className="flex items-start gap-3 border-b border-primary/20 bg-primary/10 px-6 py-3">
<Sparkles className="mt-0.5 size-4 shrink-0 text-primary" />
<div className="flex flex-1 flex-col gap-1 text-sm">
<div className="flex flex-wrap items-center gap-x-2 gap-y-0.5">
<span className="font-semibold text-foreground">
{t("home.updateBanner.title")}
</span>
<span className="text-xs text-muted-foreground">
{t("home.updateBanner.current", { version: data?.current })}
</span>
</div>
<div className="flex flex-col gap-1 sm:flex-row sm:flex-wrap sm:items-center sm:gap-x-5">
{updates.map((u) => (
<a
key={u.kind}
href={u.info.url}
target="_blank"
rel="noopener noreferrer"
className="inline-flex items-center gap-1.5 text-muted-foreground transition-colors hover:text-foreground"
>
<span>
{t(`home.updateBanner.${u.kind}`, { version: u.info.latest })}
</span>
<span className="inline-flex items-center gap-0.5 font-medium text-primary">
{t("home.updateBanner.viewRelease")}
<ArrowUpRight className="size-3" />
</span>
</a>
))}
</div>
</div>
<button
type="button"
onClick={dismiss}
aria-label={t("home.updateBanner.dismiss")}
className="shrink-0 rounded p-1 text-muted-foreground transition-colors hover:bg-primary/15 hover:text-foreground"
>
<X className="size-4" />
</button>
</div>
);
}
7 changes: 7 additions & 0 deletions apps/web/src/i18n/locales/en/admin.json
Original file line number Diff line number Diff line change
Expand Up @@ -261,5 +261,12 @@
"title": "Extension Point Layout",
"description": "Drag to reorder plugin panels within each extension point. Toggle visibility to show or hide panels for all users."
}
},
"changelog": {
"title": "What's New",
"description": "Follow the improvements and highlights from the latest Paca releases.",
"current": "Current version",
"error": "Couldn't load the changelog right now. Please try again later.",
"empty": "No release notes available yet."
}
}
3 changes: 2 additions & 1 deletion apps/web/src/i18n/locales/en/appShell.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@
"conversations": "Conversations",
"automation": "Automation",
"team": "Team",
"settings": "Settings"
"settings": "Settings",
"changelog": "What's New"
},
"projectSwitcher": {
"projects": "Projects",
Expand Down
8 changes: 8 additions & 0 deletions apps/web/src/i18n/locales/en/shared.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,14 @@
"added": "Added"
},
"home": {
"updateBanner": {
"title": "Update available",
"upstream": "Paca released {{version}}.",
"fork": "Your version {{version}} is available.",
"current": "You're on {{version}}.",
"viewRelease": "View release",
"dismiss": "Dismiss"
},
"greeting": {
"morning": "Good morning",
"afternoon": "Good afternoon",
Expand Down
7 changes: 7 additions & 0 deletions apps/web/src/i18n/locales/es/admin.json
Original file line number Diff line number Diff line change
Expand Up @@ -261,5 +261,12 @@
"title": "Diseño de puntos de extensión",
"description": "Arrastra para reordenar los paneles de plugins dentro de cada punto de extensión. Activa o desactiva la visibilidad para mostrar u ocultar paneles para todos los usuarios."
}
},
"changelog": {
"title": "Novedades",
"description": "Sigue las mejoras y novedades de las últimas versiones de Paca.",
"current": "Versión actual",
"error": "No se pudieron cargar las novedades en este momento. Inténtalo de nuevo más tarde.",
"empty": "Aún no hay notas de versión disponibles."
}
}
3 changes: 2 additions & 1 deletion apps/web/src/i18n/locales/es/appShell.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@
"conversations": "Conversaciones",
"automation": "Automatización",
"team": "Equipo",
"settings": "Configuración"
"settings": "Configuración",
"changelog": "Novedades"
},
"projectSwitcher": {
"projects": "Proyectos",
Expand Down
8 changes: 8 additions & 0 deletions apps/web/src/i18n/locales/es/shared.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,14 @@
"added": "Añadido"
},
"home": {
"updateBanner": {
"title": "Actualización disponible",
"upstream": "Paca lanzó la versión {{version}}.",
"fork": "Tu versión {{version}} está disponible.",
"current": "Estás en la {{version}}.",
"viewRelease": "Ver versión",
"dismiss": "Descartar"
},
"greeting": {
"morning": "Buenos días",
"afternoon": "Buenas tardes",
Expand Down
7 changes: 7 additions & 0 deletions apps/web/src/i18n/locales/fr/admin.json
Original file line number Diff line number Diff line change
Expand Up @@ -261,5 +261,12 @@
"title": "Disposition des points d'extension",
"description": "Faites glisser pour réorganiser les panneaux de plugins au sein de chaque point d'extension. Activez ou désactivez la visibilité pour afficher ou masquer les panneaux pour tous les utilisateurs."
}
},
"changelog": {
"title": "Nouveautés",
"description": "Suivez les améliorations et les nouveautés des dernières versions de Paca.",
"current": "Version actuelle",
"error": "Impossible de charger les nouveautés pour le moment. Veuillez réessayer plus tard.",
"empty": "Aucune note de version disponible pour le moment."
}
}
3 changes: 2 additions & 1 deletion apps/web/src/i18n/locales/fr/appShell.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@
"conversations": "Conversations",
"automation": "Automatisation",
"team": "Équipe",
"settings": "Paramètres"
"settings": "Paramètres",
"changelog": "Nouveautés"
},
"projectSwitcher": {
"projects": "Projets",
Expand Down
8 changes: 8 additions & 0 deletions apps/web/src/i18n/locales/fr/shared.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,14 @@
"added": "Ajouté"
},
"home": {
"updateBanner": {
"title": "Mise à jour disponible",
"upstream": "Paca a publié la version {{version}}.",
"fork": "Votre version {{version}} est disponible.",
"current": "Vous utilisez la {{version}}.",
"viewRelease": "Voir la version",
"dismiss": "Ignorer"
},
"greeting": {
"morning": "Bonjour",
"afternoon": "Bon après-midi",
Expand Down
7 changes: 7 additions & 0 deletions apps/web/src/i18n/locales/ja/admin.json
Original file line number Diff line number Diff line change
Expand Up @@ -261,5 +261,12 @@
"title": "拡張ポイントレイアウト",
"description": "ドラッグして各拡張ポイント内のプラグインパネルを並べ替えます。表示設定を切り替えて、全ユーザーに対するパネルの表示・非表示を制御します。"
}
},
"changelog": {
"title": "新着情報",
"description": "Paca の最新リリースの改善点やハイライトをチェックしましょう。",
"current": "現在のバージョン",
"error": "現在、変更履歴を読み込めませんでした。しばらくしてからもう一度お試しください。",
"empty": "まだリリースノートはありません。"
}
}
3 changes: 2 additions & 1 deletion apps/web/src/i18n/locales/ja/appShell.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@
"conversations": "会話",
"automation": "自動化",
"team": "チーム",
"settings": "設定"
"settings": "設定",
"changelog": "新着情報"
},
"projectSwitcher": {
"projects": "プロジェクト",
Expand Down
8 changes: 8 additions & 0 deletions apps/web/src/i18n/locales/ja/shared.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,14 @@
"added": "追加"
},
"home": {
"updateBanner": {
"title": "アップデートがあります",
"upstream": "Paca が {{version}} をリリースしました。",
"fork": "あなたのバージョン {{version}} が利用可能です。",
"current": "現在 {{version}} を使用中です。",
"viewRelease": "リリースを見る",
"dismiss": "閉じる"
},
"greeting": {
"morning": "おはようございます",
"afternoon": "こんにちは",
Expand Down
7 changes: 7 additions & 0 deletions apps/web/src/i18n/locales/ko/admin.json
Original file line number Diff line number Diff line change
Expand Up @@ -261,5 +261,12 @@
"title": "확장 지점 레이아웃",
"description": "각 확장 지점 내에서 플러그인 패널을 드래그하여 순서를 변경하세요. 표시 여부를 전환하여 모든 사용자에게 패널을 보이거나 숨길 수 있습니다."
}
},
"changelog": {
"title": "새로운 소식",
"description": "Paca 최신 릴리스의 개선 사항과 주요 내용을 확인하세요.",
"current": "현재 버전",
"error": "지금은 변경 내역을 불러올 수 없습니다. 나중에 다시 시도해 주세요.",
"empty": "아직 릴리스 노트가 없습니다."
}
}
3 changes: 2 additions & 1 deletion apps/web/src/i18n/locales/ko/appShell.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@
"conversations": "대화",
"automation": "자동화",
"team": "팀",
"settings": "설정"
"settings": "설정",
"changelog": "새로운 소식"
},
"projectSwitcher": {
"projects": "프로젝트",
Expand Down
8 changes: 8 additions & 0 deletions apps/web/src/i18n/locales/ko/shared.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,14 @@
"added": "추가됨"
},
"home": {
"updateBanner": {
"title": "업데이트 사용 가능",
"upstream": "Paca가 {{version}}을(를) 출시했습니다.",
"fork": "버전 {{version}}을(를) 사용할 수 있습니다.",
"current": "현재 {{version}}을(를) 사용 중입니다.",
"viewRelease": "릴리스 보기",
"dismiss": "닫기"
},
"greeting": {
"morning": "좋은 아침이에요",
"afternoon": "안녕하세요",
Expand Down
7 changes: 7 additions & 0 deletions apps/web/src/i18n/locales/pt-BR/admin.json
Original file line number Diff line number Diff line change
Expand Up @@ -261,5 +261,12 @@
"title": "Layout de Pontos de Extensão",
"description": "Arraste para reordenar os painéis de plugins dentro de cada ponto de extensão. Alterne a visibilidade para mostrar ou ocultar painéis para todos os usuários."
}
},
"changelog": {
"title": "Novidades",
"description": "Acompanhe as melhorias e novidades das últimas versões do Paca.",
"current": "Versão atual",
"error": "Não foi possível carregar as novidades agora. Tente novamente mais tarde.",
"empty": "Nenhuma novidade disponível no momento."
}
}
3 changes: 2 additions & 1 deletion apps/web/src/i18n/locales/pt-BR/appShell.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@
"conversations": "Conversas",
"automation": "Automação",
"team": "Equipe",
"settings": "Configurações"
"settings": "Configurações",
"changelog": "Novidades"
},
"projectSwitcher": {
"projects": "Projetos",
Expand Down
8 changes: 8 additions & 0 deletions apps/web/src/i18n/locales/pt-BR/shared.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,14 @@
"added": "Adicionado"
},
"home": {
"updateBanner": {
"title": "Atualização disponível",
"upstream": "O Paca lançou a versão {{version}}.",
"fork": "Sua versão {{version}} está disponível.",
"current": "Você está na {{version}}.",
"viewRelease": "Ver release",
"dismiss": "Dispensar"
},
"greeting": {
"morning": "Bom dia",
"afternoon": "Boa tarde",
Expand Down
7 changes: 7 additions & 0 deletions apps/web/src/i18n/locales/ru/admin.json
Original file line number Diff line number Diff line change
Expand Up @@ -267,5 +267,12 @@
"title": "Раскладка точек расширения",
"description": "Перетаскивайте панели плагинов внутри каждой точки расширения. Переключайте видимость, чтобы показывать или скрывать панели для всех пользователей."
}
},
"changelog": {
"title": "Что нового",
"description": "Следите за улучшениями и главными изменениями в последних версиях Paca.",
"current": "Текущая версия",
"error": "Не удалось загрузить список изменений. Пожалуйста, повторите попытку позже.",
"empty": "Пока нет заметок о выпусках."
}
}
3 changes: 2 additions & 1 deletion apps/web/src/i18n/locales/ru/appShell.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@
"conversations": "Диалоги",
"automation": "Автоматизация",
"team": "Команда",
"settings": "Настройки"
"settings": "Настройки",
"changelog": "Что нового"
},
"projectSwitcher": {
"projects": "Проекты",
Expand Down
8 changes: 8 additions & 0 deletions apps/web/src/i18n/locales/ru/shared.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,14 @@
"added": "Добавлено"
},
"home": {
"updateBanner": {
"title": "Доступно обновление",
"upstream": "Paca выпустил версию {{version}}.",
"fork": "Доступна ваша версия {{version}}.",
"current": "У вас установлена {{version}}.",
"viewRelease": "Посмотреть выпуск",
"dismiss": "Закрыть"
},
"greeting": {
"morning": "Доброе утро",
"afternoon": "Добрый день",
Expand Down
7 changes: 7 additions & 0 deletions apps/web/src/i18n/locales/vi/admin.json
Original file line number Diff line number Diff line change
Expand Up @@ -261,5 +261,12 @@
"title": "Bố cục điểm mở rộng",
"description": "Kéo để sắp xếp lại các bảng plugin trong từng điểm mở rộng. Bật/tắt khả năng hiển thị để hiện hoặc ẩn bảng cho tất cả người dùng."
}
},
"changelog": {
"title": "Có gì mới",
"description": "Theo dõi các cải tiến và điểm nổi bật từ những phiên bản Paca mới nhất.",
"current": "Phiên bản hiện tại",
"error": "Hiện không thể tải nhật ký thay đổi. Vui lòng thử lại sau.",
"empty": "Chưa có ghi chú phát hành nào."
}
}
Loading
Loading