From 31b50973a58a6bfd422cd8058a77ad7dd7d7f735 Mon Sep 17 00:00:00 2001 From: Juan Denis Date: Mon, 9 Nov 2026 14:20:59 -0500 Subject: [PATCH] feat(ui): compact page actions on the remaining pages Server templates, cloud provision and shared variables get a PagePrimaryButton; Servers Sync and Marketplace Install manually use short labels with the full text in the tooltip. --- .../src/components/shared/SharedVariableGroups.jsx | 10 +++++++--- frontend/src/i18n/locales/ar.json | 6 ++++-- frontend/src/i18n/locales/bn.json | 6 ++++-- frontend/src/i18n/locales/de.json | 6 ++++-- frontend/src/i18n/locales/en.json | 2 ++ frontend/src/i18n/locales/es.json | 6 ++++-- frontend/src/i18n/locales/fr.json | 6 ++++-- frontend/src/i18n/locales/id.json | 6 ++++-- frontend/src/i18n/locales/it.json | 6 ++++-- frontend/src/i18n/locales/ko.json | 6 ++++-- frontend/src/i18n/locales/pl.json | 6 ++++-- frontend/src/i18n/locales/pt.json | 6 ++++-- frontend/src/i18n/locales/ru.json | 6 ++++-- frontend/src/i18n/locales/th.json | 6 ++++-- frontend/src/i18n/locales/tr.json | 6 ++++-- frontend/src/i18n/locales/vi.json | 6 ++++-- frontend/src/i18n/locales/zh-Hans.json | 6 ++++-- frontend/src/i18n/locales/zh-Hant.json | 6 ++++-- frontend/src/pages/CloudProvision.jsx | 8 +++++++- frontend/src/pages/Marketplace.jsx | 10 ++++++++-- frontend/src/pages/ServerTemplates.jsx | 8 +++++++- frontend/src/pages/Servers.jsx | 4 ++-- 22 files changed, 97 insertions(+), 41 deletions(-) diff --git a/frontend/src/components/shared/SharedVariableGroups.jsx b/frontend/src/components/shared/SharedVariableGroups.jsx index fac1cb5c..64e7b946 100644 --- a/frontend/src/components/shared/SharedVariableGroups.jsx +++ b/frontend/src/components/shared/SharedVariableGroups.jsx @@ -4,6 +4,7 @@ import { ArrowLeft, Boxes, Plus, Trash2 } from 'lucide-react'; import api from '../../services/api'; import { useToast } from '../../contexts/useToast.js'; import { Button } from '@/components/ui/button'; +import PagePrimaryButton from '@/components/PagePrimaryButton'; import { Input } from '@/components/ui/input'; import { Label } from '@/components/ui/label'; import { Checkbox } from '@/components/ui/checkbox'; @@ -200,9 +201,12 @@ const SharedVariableGroups = ({ scopeType = 'workspace', scopeId = 'default' }) ) : ( <> - + setCreating(true)} + /> )), [detail, search]); diff --git a/frontend/src/i18n/locales/ar.json b/frontend/src/i18n/locales/ar.json index 7d167c6a..dc95ca79 100644 --- a/frontend/src/i18n/locales/ar.json +++ b/frontend/src/i18n/locales/ar.json @@ -3615,7 +3615,8 @@ "update": "تحديث", "updateAnyway": "التحديث على أي حال", "updating": "جارٍ التحديث…", - "versionByAuthor": "v{{version}} · بواسطة {{author}}" + "versionByAuthor": "v{{version}} · بواسطة {{author}}", + "installShort": "تثبيت" }, "message": { "somethingWentWrong": "حدث خطأ ما." @@ -5631,7 +5632,8 @@ "tokenExpires": "تنتهي صلاحية الرمز المميز", "ungrouped": "غير مجمعة", "whatHappensNext": "ماذا سيحدث بعد ذلك؟", - "windowsPowershell": "ويندوز (باورشيل)" + "windowsPowershell": "ويندوز (باورشيل)", + "syncShort": "مزامنة" }, "serviceDetail": { "areYouSureThisWillPermanently": "هل أنت متأكد؟ سيؤدي هذا إلى إزالة الخدمة وجميع بياناتها نهائيًا.", diff --git a/frontend/src/i18n/locales/bn.json b/frontend/src/i18n/locales/bn.json index f8a941b3..675e764d 100644 --- a/frontend/src/i18n/locales/bn.json +++ b/frontend/src/i18n/locales/bn.json @@ -3615,7 +3615,8 @@ "update": "আপডেট", "updateAnyway": "তবুও আপডেট করুন", "updating": "আপডেট হচ্ছে…", - "versionByAuthor": "v{{version}} · {{author}} দ্বারা" + "versionByAuthor": "v{{version}} · {{author}} দ্বারা", + "installShort": "ইনস্টল" }, "message": { "somethingWentWrong": "কিছু একটা ভুল হয়েছে।" @@ -5631,7 +5632,8 @@ "tokenExpires": "টোকেনের মেয়াদ শেষ", "ungrouped": "গোষ্ঠীভুক্ত নয়", "whatHappensNext": "এরপর কি হবে?", - "windowsPowershell": "উইন্ডোজ (পাওয়ারশেল)" + "windowsPowershell": "উইন্ডোজ (পাওয়ারশেল)", + "syncShort": "সিঙ্ক" }, "serviceDetail": { "areYouSureThisWillPermanently": "আপনি কি নিশ্চিত? এটি স্থায়ীভাবে পরিষেবা এবং এর সমস্ত ডেটা মুছে ফেলবে৷", diff --git a/frontend/src/i18n/locales/de.json b/frontend/src/i18n/locales/de.json index 052ecc5e..903e4d95 100644 --- a/frontend/src/i18n/locales/de.json +++ b/frontend/src/i18n/locales/de.json @@ -3615,7 +3615,8 @@ "update": "Aktualisieren", "updateAnyway": "Trotzdem aktualisieren", "updating": "Wird aktualisiert…", - "versionByAuthor": "v{{version}} · von {{author}}" + "versionByAuthor": "v{{version}} · von {{author}}", + "installShort": "Installieren" }, "message": { "somethingWentWrong": "Etwas ist schiefgelaufen." @@ -5631,7 +5632,8 @@ "tokenExpires": "Token läuft ab", "ungrouped": "Nicht gruppiert", "whatHappensNext": "Was passiert als nächstes?", - "windowsPowershell": "Windows (PowerShell)" + "windowsPowershell": "Windows (PowerShell)", + "syncShort": "Sync" }, "serviceDetail": { "areYouSureThisWillPermanently": "Bist du sicher? Dadurch werden der Dienst und alle seine Daten dauerhaft entfernt.", diff --git a/frontend/src/i18n/locales/en.json b/frontend/src/i18n/locales/en.json index 0f5f08ce..5918f26e 100644 --- a/frontend/src/i18n/locales/en.json +++ b/frontend/src/i18n/locales/en.json @@ -3672,6 +3672,7 @@ "installAnyway": "Install anyway", "installManually": "Install manually", "installOneFromTheCatalogOr": "Install one from the catalog or use Install manually.", + "installShort": "Install", "installUnreviewedExtension": "Install unreviewed extension?", "installWithAnUnverifiableSignature": "Install with an unverifiable signature?", "installWithoutChecksumVerification": "Install without checksum verification?", @@ -5861,6 +5862,7 @@ "stepServerOnline": "Server online", "stepStartAgent": "Start agent", "sync": "Sync", + "syncShort": "Sync", "theAgentRegistersAutomaticallyAndReports": "The agent registers automatically and reports its hostname back as the server name.", "theCodeIsShownInThe": "The code is shown in the terminal output or system tray.", "theRowInThisListWill": "The row in this list will switch from", diff --git a/frontend/src/i18n/locales/es.json b/frontend/src/i18n/locales/es.json index 989dc0c1..be51f0e7 100644 --- a/frontend/src/i18n/locales/es.json +++ b/frontend/src/i18n/locales/es.json @@ -3615,7 +3615,8 @@ "update": "Actualizar", "updateAnyway": "Actualizar de todos modos", "updating": "Actualizando…", - "versionByAuthor": "v{{version}} · por {{author}}" + "versionByAuthor": "v{{version}} · por {{author}}", + "installShort": "Instalar" }, "message": { "somethingWentWrong": "Algo salió mal." @@ -5632,7 +5633,8 @@ "tokenExpires": "El token vence", "ungrouped": "Sin agrupar", "whatHappensNext": "¿Qué pasa después?", - "windowsPowershell": "Windows (PowerShell)" + "windowsPowershell": "Windows (PowerShell)", + "syncShort": "Sincr." }, "serviceDetail": { "areYouSureThisWillPermanently": "¿Estás seguro? Esto quitará el servicio y todos sus datos de forma permanente.", diff --git a/frontend/src/i18n/locales/fr.json b/frontend/src/i18n/locales/fr.json index c5a925b0..2663ac1a 100644 --- a/frontend/src/i18n/locales/fr.json +++ b/frontend/src/i18n/locales/fr.json @@ -3615,7 +3615,8 @@ "update": "Mise à jour", "updateAnyway": "Mettre à jour quand même", "updating": "Mise à jour…", - "versionByAuthor": "v{{version}} · par {{author}}" + "versionByAuthor": "v{{version}} · par {{author}}", + "installShort": "Installer" }, "message": { "somethingWentWrong": "Une erreur s'est produite." @@ -5631,7 +5632,8 @@ "tokenExpires": "Le jeton expire", "ungrouped": "Non groupé", "whatHappensNext": "Que se passe-t-il ensuite ?", - "windowsPowershell": "Windows (PowerShell)" + "windowsPowershell": "Windows (PowerShell)", + "syncShort": "Synchro" }, "serviceDetail": { "areYouSureThisWillPermanently": "Es-tu sûr? Cela supprimera définitivement le service et toutes ses données.", diff --git a/frontend/src/i18n/locales/id.json b/frontend/src/i18n/locales/id.json index 53bcba89..ff1e52c0 100644 --- a/frontend/src/i18n/locales/id.json +++ b/frontend/src/i18n/locales/id.json @@ -3615,7 +3615,8 @@ "update": "Memperbarui", "updateAnyway": "Tetap perbarui", "updating": "Memperbarui…", - "versionByAuthor": "v{{version}} · oleh {{author}}" + "versionByAuthor": "v{{version}} · oleh {{author}}", + "installShort": "Instal" }, "message": { "somethingWentWrong": "Terjadi kesalahan." @@ -5631,7 +5632,8 @@ "tokenExpires": "Token berakhir", "ungrouped": "Tidak dikelompokkan", "whatHappensNext": "Apa yang terjadi selanjutnya?", - "windowsPowershell": "Windows (PowerShell)" + "windowsPowershell": "Windows (PowerShell)", + "syncShort": "Sinkron" }, "serviceDetail": { "areYouSureThisWillPermanently": "Apa kamu yakin? Tindakan ini akan menghapus layanan dan semua datanya secara permanen.", diff --git a/frontend/src/i18n/locales/it.json b/frontend/src/i18n/locales/it.json index b502b7bd..0d212c90 100644 --- a/frontend/src/i18n/locales/it.json +++ b/frontend/src/i18n/locales/it.json @@ -3615,7 +3615,8 @@ "update": "Aggiornamento", "updateAnyway": "Aggiorna comunque", "updating": "Aggiornamento…", - "versionByAuthor": "v{{version}} · di {{author}}" + "versionByAuthor": "v{{version}} · di {{author}}", + "installShort": "Installa" }, "message": { "somethingWentWrong": "Qualcosa è andato storto." @@ -5631,7 +5632,8 @@ "tokenExpires": "Il token scade", "ungrouped": "Non raggruppato", "whatHappensNext": "Cosa succede dopo?", - "windowsPowershell": "Windows (PowerShell)" + "windowsPowershell": "Windows (PowerShell)", + "syncShort": "Sincro" }, "serviceDetail": { "areYouSureThisWillPermanently": "Sei sicuro? Ciò rimuoverà permanentemente il servizio e tutti i suoi dati.", diff --git a/frontend/src/i18n/locales/ko.json b/frontend/src/i18n/locales/ko.json index e86e7248..037db190 100644 --- a/frontend/src/i18n/locales/ko.json +++ b/frontend/src/i18n/locales/ko.json @@ -3615,7 +3615,8 @@ "update": "업데이트", "updateAnyway": "그래도 업데이트", "updating": "업데이트 중…", - "versionByAuthor": "v{{version}} · {{author}} 제작" + "versionByAuthor": "v{{version}} · {{author}} 제작", + "installShort": "설치" }, "message": { "somethingWentWrong": "문제가 발생했습니다." @@ -5631,7 +5632,8 @@ "tokenExpires": "토큰 만료", "ungrouped": "그룹 해제됨", "whatHappensNext": "다음에는 어떻게 되나요?", - "windowsPowershell": "윈도우(파워셸)" + "windowsPowershell": "윈도우(파워셸)", + "syncShort": "동기화" }, "serviceDetail": { "areYouSureThisWillPermanently": "확실합니까? 이렇게 하면 서비스와 모든 데이터가 영구적으로 삭제됩니다.", diff --git a/frontend/src/i18n/locales/pl.json b/frontend/src/i18n/locales/pl.json index 101d38c6..f0d77366 100644 --- a/frontend/src/i18n/locales/pl.json +++ b/frontend/src/i18n/locales/pl.json @@ -3615,7 +3615,8 @@ "update": "Aktualizacja", "updateAnyway": "Zaktualizuj mimo to", "updating": "Aktualizowanie…", - "versionByAuthor": "v{{version}} · autor: {{author}}" + "versionByAuthor": "v{{version}} · autor: {{author}}", + "installShort": "Zainstaluj" }, "message": { "somethingWentWrong": "Coś poszło nie tak." @@ -5631,7 +5632,8 @@ "tokenExpires": "Token wygasa", "ungrouped": "Rozgrupowane", "whatHappensNext": "Co stanie się dalej?", - "windowsPowershell": "Windows (PowerShell)" + "windowsPowershell": "Windows (PowerShell)", + "syncShort": "Synchr." }, "serviceDetail": { "areYouSureThisWillPermanently": "Czy jesteś pewien? Spowoduje to trwałe usunięcie usługi i wszystkich jej danych.", diff --git a/frontend/src/i18n/locales/pt.json b/frontend/src/i18n/locales/pt.json index 224b725f..6becaa84 100644 --- a/frontend/src/i18n/locales/pt.json +++ b/frontend/src/i18n/locales/pt.json @@ -3615,7 +3615,8 @@ "update": "Atualizar", "updateAnyway": "Atualizar mesmo assim", "updating": "Atualizando…", - "versionByAuthor": "v{{version}} · por {{author}}" + "versionByAuthor": "v{{version}} · por {{author}}", + "installShort": "Instalar" }, "message": { "somethingWentWrong": "Algo deu errado." @@ -5631,7 +5632,8 @@ "tokenExpires": "O token expira", "ungrouped": "Desagrupado", "whatHappensNext": "O que acontece a seguir?", - "windowsPowershell": "Windows (PowerShell)" + "windowsPowershell": "Windows (PowerShell)", + "syncShort": "Sincr." }, "serviceDetail": { "areYouSureThisWillPermanently": "Você tem certeza? Isso removerá permanentemente o serviço e todos os seus dados.", diff --git a/frontend/src/i18n/locales/ru.json b/frontend/src/i18n/locales/ru.json index 7e9eeaab..f2a96587 100644 --- a/frontend/src/i18n/locales/ru.json +++ b/frontend/src/i18n/locales/ru.json @@ -3615,7 +3615,8 @@ "update": "Обновлять", "updateAnyway": "Всё равно обновить", "updating": "Обновление…", - "versionByAuthor": "v{{version}} · автор: {{author}}" + "versionByAuthor": "v{{version}} · автор: {{author}}", + "installShort": "Установить" }, "message": { "somethingWentWrong": "Что-то пошло не так." @@ -5631,7 +5632,8 @@ "tokenExpires": "Срок действия токена истекает", "ungrouped": "Разгруппировано", "whatHappensNext": "Что произойдет дальше?", - "windowsPowershell": "Windows (PowerShell)" + "windowsPowershell": "Windows (PowerShell)", + "syncShort": "Синхр." }, "serviceDetail": { "areYouSureThisWillPermanently": "Вы уверены? Это приведет к безвозвратному удалению службы и всех ее данных.", diff --git a/frontend/src/i18n/locales/th.json b/frontend/src/i18n/locales/th.json index af4c36fb..42f2bd6c 100644 --- a/frontend/src/i18n/locales/th.json +++ b/frontend/src/i18n/locales/th.json @@ -3615,7 +3615,8 @@ "update": "อัปเดต", "updateAnyway": "อัปเดตต่อไป", "updating": "กำลังอัปเดต…", - "versionByAuthor": "v{{version}} · โดย {{author}}" + "versionByAuthor": "v{{version}} · โดย {{author}}", + "installShort": "ติดตั้ง" }, "message": { "somethingWentWrong": "เกิดข้อผิดพลาดบางอย่าง" @@ -5631,7 +5632,8 @@ "tokenExpires": "โทเค็นหมดอายุ", "ungrouped": "ไม่ได้จัดกลุ่ม", "whatHappensNext": "จะเกิดอะไรขึ้นต่อไป?", - "windowsPowershell": "วินโดวส์ (PowerShell)" + "windowsPowershell": "วินโดวส์ (PowerShell)", + "syncShort": "ซิงค์" }, "serviceDetail": { "areYouSureThisWillPermanently": "คุณแน่ใจเหรอ? การดำเนินการนี้จะลบบริการและข้อมูลทั้งหมดออกอย่างถาวร", diff --git a/frontend/src/i18n/locales/tr.json b/frontend/src/i18n/locales/tr.json index 5fb988a0..0936eead 100644 --- a/frontend/src/i18n/locales/tr.json +++ b/frontend/src/i18n/locales/tr.json @@ -3615,7 +3615,8 @@ "update": "Güncelleme", "updateAnyway": "Yine de güncelle", "updating": "Güncelleniyor…", - "versionByAuthor": "v{{version}} · {{author}} tarafından" + "versionByAuthor": "v{{version}} · {{author}} tarafından", + "installShort": "Yükle" }, "message": { "somethingWentWrong": "Bir şeyler ters gitti." @@ -5631,7 +5632,8 @@ "tokenExpires": "Belirtecin süresi doluyor", "ungrouped": "Gruplandırılmamış", "whatHappensNext": "Sonra ne olacak?", - "windowsPowershell": "Windows (PowerShell)" + "windowsPowershell": "Windows (PowerShell)", + "syncShort": "Eşitle" }, "serviceDetail": { "areYouSureThisWillPermanently": "Emin misin? Bu, hizmeti ve içindeki tüm verileri kalıcı olarak kaldıracaktır.", diff --git a/frontend/src/i18n/locales/vi.json b/frontend/src/i18n/locales/vi.json index b055a75c..4a8b7e74 100644 --- a/frontend/src/i18n/locales/vi.json +++ b/frontend/src/i18n/locales/vi.json @@ -3615,7 +3615,8 @@ "update": "Cập nhật", "updateAnyway": "Vẫn cập nhật", "updating": "Đang cập nhật…", - "versionByAuthor": "v{{version}} · bởi {{author}}" + "versionByAuthor": "v{{version}} · bởi {{author}}", + "installShort": "Cài đặt" }, "message": { "somethingWentWrong": "Đã xảy ra lỗi." @@ -5631,7 +5632,8 @@ "tokenExpires": "Mã thông báo hết hạn", "ungrouped": "Đã tách nhóm", "whatHappensNext": "Điều gì xảy ra tiếp theo?", - "windowsPowershell": "Windows (PowerShell)" + "windowsPowershell": "Windows (PowerShell)", + "syncShort": "Đồng bộ" }, "serviceDetail": { "areYouSureThisWillPermanently": "Bạn có chắc không? Thao tác này sẽ xóa vĩnh viễn dịch vụ và tất cả dữ liệu của dịch vụ đó.", diff --git a/frontend/src/i18n/locales/zh-Hans.json b/frontend/src/i18n/locales/zh-Hans.json index 55663a3f..4e5e7d74 100644 --- a/frontend/src/i18n/locales/zh-Hans.json +++ b/frontend/src/i18n/locales/zh-Hans.json @@ -3615,7 +3615,8 @@ "update": "更新", "updateAnyway": "仍然更新", "updating": "正在更新…", - "versionByAuthor": "v{{version}} · 作者 {{author}}" + "versionByAuthor": "v{{version}} · 作者 {{author}}", + "installShort": "安装" }, "message": { "somethingWentWrong": "出现了问题。" @@ -5631,7 +5632,8 @@ "tokenExpires": "令牌过期", "ungrouped": "未分组", "whatHappensNext": "接下来会发生什么?", - "windowsPowershell": "Windows(PowerShell)" + "windowsPowershell": "Windows(PowerShell)", + "syncShort": "同步" }, "serviceDetail": { "areYouSureThisWillPermanently": "你确定吗?这将永久删除该服务及其所有数据。", diff --git a/frontend/src/i18n/locales/zh-Hant.json b/frontend/src/i18n/locales/zh-Hant.json index bcfe0d88..0dfb8e87 100644 --- a/frontend/src/i18n/locales/zh-Hant.json +++ b/frontend/src/i18n/locales/zh-Hant.json @@ -3615,7 +3615,8 @@ "update": "更新", "updateAnyway": "仍要更新", "updating": "正在更新…", - "versionByAuthor": "v{{version}} · 作者:{{author}}" + "versionByAuthor": "v{{version}} · 作者:{{author}}", + "installShort": "安裝" }, "message": { "somethingWentWrong": "發生錯誤。" @@ -5631,7 +5632,8 @@ "tokenExpires": "權杖過期", "ungrouped": "未分組", "whatHappensNext": "接下來會發生什麼事?", - "windowsPowershell": "Windows (PowerShell)" + "windowsPowershell": "Windows (PowerShell)", + "syncShort": "同步" }, "serviceDetail": { "areYouSureThisWillPermanently": "你確定嗎?這將永久刪除該服務及其所有資料。", diff --git a/frontend/src/pages/CloudProvision.jsx b/frontend/src/pages/CloudProvision.jsx index 9eaed093..78dad03c 100644 --- a/frontend/src/pages/CloudProvision.jsx +++ b/frontend/src/pages/CloudProvision.jsx @@ -9,6 +9,7 @@ import ConfirmDialog from '../components/ConfirmDialog'; import EmptyState from '../components/EmptyState'; import Modal from '@/components/Modal'; import { Button } from '@/components/ui/button'; +import PagePrimaryButton from '@/components/PagePrimaryButton'; import { Input } from '@/components/ui/input'; import { Select, SelectTrigger, SelectContent, SelectItem, SelectValue } from '@/components/ui/select'; import { Badge } from '@/components/ui/badge'; @@ -61,7 +62,12 @@ const CloudProvision = () => { {user?.is_admin && ( <> - + setShowCreateServer(true)} + /> )} diff --git a/frontend/src/pages/Marketplace.jsx b/frontend/src/pages/Marketplace.jsx index 7d6c1168..c7c6f62e 100644 --- a/frontend/src/pages/Marketplace.jsx +++ b/frontend/src/pages/Marketplace.jsx @@ -296,9 +296,15 @@ const Marketplace = () => { {!installedView && !updatesView && ( setFiltersOpen(true)} /> )} - , [installedView, updatesView, search, installedSearch, activeFilterCount], diff --git a/frontend/src/pages/ServerTemplates.jsx b/frontend/src/pages/ServerTemplates.jsx index ff9b8388..d7a1c984 100644 --- a/frontend/src/pages/ServerTemplates.jsx +++ b/frontend/src/pages/ServerTemplates.jsx @@ -12,6 +12,7 @@ import ErrorState from '../components/ErrorState'; import Modal from '@/components/Modal'; import { LayoutTemplate } from 'lucide-react'; import { Button } from '@/components/ui/button'; +import PagePrimaryButton from '@/components/PagePrimaryButton'; import { Input } from '@/components/ui/input'; import { Textarea } from '@/components/ui/textarea'; import { Badge } from '@/components/ui/badge'; @@ -341,7 +342,12 @@ const ServerTemplates = () => { useTopbarActions(() => ( <> {user?.is_admin && ( - + setShowCreateModal(true)} + /> )} ), [user?.is_admin, activeTab, templates.length]); diff --git a/frontend/src/pages/Servers.jsx b/frontend/src/pages/Servers.jsx index 24f7deca..c80afe52 100644 --- a/frontend/src/pages/Servers.jsx +++ b/frontend/src/pages/Servers.jsx @@ -385,8 +385,8 @@ const Servers = () => { -