mirror of
https://github.com/kyantech/Palmr.git
synced 2025-10-22 22:02:00 +00:00
feat: add option to hide Palmr version in footer (#297)
This commit is contained in:
@@ -17,6 +17,12 @@ const defaultConfigs = [
|
||||
type: "boolean",
|
||||
group: "general",
|
||||
},
|
||||
{
|
||||
key: "hideVersion",
|
||||
value: "false",
|
||||
type: "boolean",
|
||||
group: "general",
|
||||
},
|
||||
{
|
||||
key: "appDescription",
|
||||
value: "Secure and simple file sharing - Your personal cloud",
|
||||
|
@@ -1300,6 +1300,10 @@
|
||||
"passwordAuthEnabled": {
|
||||
"title": "المصادقة بالكلمة السرية",
|
||||
"description": "تمكين أو تعطيل المصادقة بالكلمة السرية"
|
||||
},
|
||||
"hideVersion": {
|
||||
"title": "إخفاء الإصدار",
|
||||
"description": "إخفاء إصدار Palmr في تذييل جميع الصفحات"
|
||||
}
|
||||
},
|
||||
"buttons": {
|
||||
|
@@ -1298,6 +1298,10 @@
|
||||
"passwordAuthEnabled": {
|
||||
"title": "Passwort-Authentifizierung",
|
||||
"description": "Passwort-basierte Authentifizierung aktivieren oder deaktivieren"
|
||||
},
|
||||
"hideVersion": {
|
||||
"title": "Version Ausblenden",
|
||||
"description": "Die Palmr-Version in der Fußzeile aller Seiten ausblenden"
|
||||
}
|
||||
},
|
||||
"buttons": {
|
||||
|
@@ -1211,6 +1211,10 @@
|
||||
"title": "Show Home Page",
|
||||
"description": "Show Home Page after installation"
|
||||
},
|
||||
"hideVersion": {
|
||||
"title": "Hide Version",
|
||||
"description": "Hide the Palmr version from the footer on all pages"
|
||||
},
|
||||
"smtpEnabled": {
|
||||
"title": "SMTP Enabled",
|
||||
"description": "Enable or disable SMTP email functionality"
|
||||
|
@@ -1298,6 +1298,10 @@
|
||||
"passwordAuthEnabled": {
|
||||
"title": "Autenticación por Contraseña",
|
||||
"description": "Habilitar o deshabilitar la autenticación basada en contraseña"
|
||||
},
|
||||
"hideVersion": {
|
||||
"title": "Ocultar Versión",
|
||||
"description": "Ocultar la versión de Palmr en el pie de página de todas las páginas"
|
||||
}
|
||||
},
|
||||
"buttons": {
|
||||
|
@@ -1301,6 +1301,10 @@
|
||||
"passwordAuthEnabled": {
|
||||
"title": "Authentification par Mot de Passe",
|
||||
"description": "Activer ou désactiver l'authentification basée sur mot de passe"
|
||||
},
|
||||
"hideVersion": {
|
||||
"title": "Masquer la Version",
|
||||
"description": "Masquer la version de Palmr dans le pied de page de toutes les pages"
|
||||
}
|
||||
},
|
||||
"buttons": {
|
||||
|
@@ -1298,6 +1298,10 @@
|
||||
"passwordAuthEnabled": {
|
||||
"title": "पासवर्ड प्रमाणीकरण",
|
||||
"description": "पासवर्ड आधारित प्रमाणीकरण सक्षम या अक्षम करें"
|
||||
},
|
||||
"hideVersion": {
|
||||
"title": "संस्करण छुपाएं",
|
||||
"description": "सभी पृष्ठों के फुटर में Palmr संस्करण छुपाएं"
|
||||
}
|
||||
},
|
||||
"buttons": {
|
||||
|
@@ -1298,6 +1298,10 @@
|
||||
"passwordAuthEnabled": {
|
||||
"title": "Autenticazione Password",
|
||||
"description": "Abilita o disabilita l'autenticazione basata su password"
|
||||
},
|
||||
"hideVersion": {
|
||||
"title": "Nascondi Versione",
|
||||
"description": "Nascondi la versione di Palmr nel piè di pagina di tutte le pagine"
|
||||
}
|
||||
},
|
||||
"buttons": {
|
||||
|
@@ -1298,6 +1298,10 @@
|
||||
"passwordAuthEnabled": {
|
||||
"title": "パスワード認証",
|
||||
"description": "パスワード認証を有効または無効にする"
|
||||
},
|
||||
"hideVersion": {
|
||||
"title": "バージョンを非表示",
|
||||
"description": "すべてのページのフッターにあるPalmrバージョンを非表示にする"
|
||||
}
|
||||
},
|
||||
"buttons": {
|
||||
|
@@ -1298,6 +1298,10 @@
|
||||
"passwordAuthEnabled": {
|
||||
"title": "비밀번호 인증",
|
||||
"description": "비밀번호 기반 인증 활성화 또는 비활성화"
|
||||
},
|
||||
"hideVersion": {
|
||||
"title": "버전 숨기기",
|
||||
"description": "모든 페이지의 바닥글에서 Palmr 버전 숨기기"
|
||||
}
|
||||
},
|
||||
"buttons": {
|
||||
|
@@ -1298,6 +1298,10 @@
|
||||
"passwordAuthEnabled": {
|
||||
"title": "Wachtwoord Authenticatie",
|
||||
"description": "Wachtwoord-gebaseerde authenticatie inschakelen of uitschakelen"
|
||||
},
|
||||
"hideVersion": {
|
||||
"title": "Versie Verbergen",
|
||||
"description": "Verberg de Palmr-versie in de voettekst van alle pagina's"
|
||||
}
|
||||
},
|
||||
"buttons": {
|
||||
|
@@ -1298,6 +1298,10 @@
|
||||
"passwordAuthEnabled": {
|
||||
"title": "Uwierzytelnianie hasłem",
|
||||
"description": "Włącz lub wyłącz uwierzytelnianie oparte na haśle"
|
||||
},
|
||||
"hideVersion": {
|
||||
"title": "Ukryj Wersję",
|
||||
"description": "Ukryj wersję Palmr w stopce wszystkich stron"
|
||||
}
|
||||
},
|
||||
"buttons": {
|
||||
|
@@ -1307,6 +1307,10 @@
|
||||
"passwordAuthEnabled": {
|
||||
"title": "Autenticação por Senha",
|
||||
"description": "Ative ou desative a autenticação baseada em senha"
|
||||
},
|
||||
"hideVersion": {
|
||||
"title": "Ocultar Versão",
|
||||
"description": "Ocultar a versão do Palmr no rodapé de todas as páginas"
|
||||
}
|
||||
},
|
||||
"buttons": {
|
||||
|
@@ -1298,6 +1298,10 @@
|
||||
"passwordAuthEnabled": {
|
||||
"title": "Парольная аутентификация",
|
||||
"description": "Включить или отключить парольную аутентификацию"
|
||||
},
|
||||
"hideVersion": {
|
||||
"title": "Скрыть Версию",
|
||||
"description": "Скрыть версию Palmr в нижнем колонтитуле всех страниц"
|
||||
}
|
||||
},
|
||||
"buttons": {
|
||||
|
@@ -1298,6 +1298,10 @@
|
||||
"passwordAuthEnabled": {
|
||||
"title": "Şifre Doğrulama",
|
||||
"description": "Şifre tabanlı doğrulamayı etkinleştirme veya devre dışı bırakma"
|
||||
},
|
||||
"hideVersion": {
|
||||
"title": "Sürümü Gizle",
|
||||
"description": "Tüm sayfaların alt bilgisinde Palmr sürümünü gizle"
|
||||
}
|
||||
},
|
||||
"buttons": {
|
||||
|
@@ -1298,6 +1298,10 @@
|
||||
"passwordAuthEnabled": {
|
||||
"title": "密码认证",
|
||||
"description": "启用或禁用基于密码的认证"
|
||||
},
|
||||
"hideVersion": {
|
||||
"title": "隐藏版本",
|
||||
"description": "在所有页面的页脚中隐藏Palmr版本"
|
||||
}
|
||||
},
|
||||
"buttons": {
|
||||
@@ -1684,7 +1688,11 @@
|
||||
"copyToClipboard": "复制到剪贴板",
|
||||
"savedMessage": "我已保存备用码",
|
||||
"available": "可用备用码:{count}个",
|
||||
"instructions": ["• 将这些代码保存在安全的位置", "• 每个备用码只能使用一次", "• 您可以随时生成新的备用码"]
|
||||
"instructions": [
|
||||
"• 将这些代码保存在安全的位置",
|
||||
"• 每个备用码只能使用一次",
|
||||
"• 您可以随时生成新的备用码"
|
||||
]
|
||||
},
|
||||
"verification": {
|
||||
"title": "双重认证",
|
||||
|
@@ -1,12 +1,18 @@
|
||||
"use client";
|
||||
|
||||
import Link from "next/link";
|
||||
import { useTranslations } from "next-intl";
|
||||
|
||||
import { useSecureConfigValue } from "@/hooks/use-secure-configs";
|
||||
import packageJson from "../../../../../../package.json";
|
||||
|
||||
const { version } = packageJson;
|
||||
|
||||
export function TransparentFooter() {
|
||||
const t = useTranslations();
|
||||
const { value: hideVersion } = useSecureConfigValue("hideVersion");
|
||||
|
||||
const shouldHideVersion = hideVersion === "true";
|
||||
|
||||
return (
|
||||
<footer className="absolute bottom-0 left-0 right-0 z-50 w-full flex items-center justify-center py-3 h-16 pointer-events-none">
|
||||
@@ -22,7 +28,7 @@ export function TransparentFooter() {
|
||||
Kyantech Solutions
|
||||
</p>
|
||||
</Link>
|
||||
<span className="text-white text-[11px] mt-1">v{version}</span>
|
||||
{!shouldHideVersion && <span className="text-white text-[11px] mt-1">v{version}</span>}
|
||||
</div>
|
||||
</footer>
|
||||
);
|
||||
|
@@ -35,6 +35,7 @@ export const createFieldDescriptions = (t: ReturnType<typeof createTranslator>)
|
||||
appName: t("settings.fields.appName.description"),
|
||||
appDescription: t("settings.fields.appDescription.description"),
|
||||
showHomePage: t("settings.fields.showHomePage.description"),
|
||||
hideVersion: t("settings.fields.hideVersion.description"),
|
||||
firstUserAccess: t("settings.fields.firstUserAccess.description"),
|
||||
serverUrl: t("settings.fields.serverUrl.description"),
|
||||
|
||||
@@ -70,6 +71,7 @@ export const createFieldTitles = (t: ReturnType<typeof createTranslator>) => ({
|
||||
appName: t("settings.fields.appName.title"),
|
||||
appDescription: t("settings.fields.appDescription.title"),
|
||||
showHomePage: t("settings.fields.showHomePage.title"),
|
||||
hideVersion: t("settings.fields.hideVersion.title"),
|
||||
firstUserAccess: t("settings.fields.firstUserAccess.title"),
|
||||
serverUrl: t("settings.fields.serverUrl.title"),
|
||||
|
||||
|
@@ -1,12 +1,19 @@
|
||||
"use client";
|
||||
|
||||
import Link from "next/link";
|
||||
import { useTranslations } from "next-intl";
|
||||
|
||||
import { useSecureConfigValue } from "@/hooks/use-secure-configs";
|
||||
|
||||
import packageJson from "../../../package.json";
|
||||
|
||||
const { version } = packageJson;
|
||||
|
||||
export function DefaultFooter() {
|
||||
const t = useTranslations();
|
||||
const { value: hideVersion } = useSecureConfigValue("hideVersion");
|
||||
|
||||
const shouldHideVersion = hideVersion === "true";
|
||||
|
||||
return (
|
||||
<footer className="w-full flex items-center justify-center py-3 h-16">
|
||||
@@ -20,7 +27,7 @@ export function DefaultFooter() {
|
||||
<span className="text-default-600 text-xs sm:text-sm">{t("footer.poweredBy")}</span>
|
||||
<p className="text-primary text-xs sm:text-sm">Kyantech Solutions</p>
|
||||
</Link>
|
||||
<span className="text-default-500 text-[11px] mt-1">v{version}</span>
|
||||
{!shouldHideVersion && <span className="text-default-500 text-[11px] mt-1">v{version}</span>}
|
||||
</div>
|
||||
</footer>
|
||||
);
|
||||
|
Reference in New Issue
Block a user