Skip to content

armgit / dbx

Public Imported from GitHub
0

25 MB lightweight cross-platform database client for 100+ databases, including MySQL, PostgreSQL, SQLite, Redis, MongoDB, DuckDB, SQL Server, and Dameng. Built-in AI, MCP Server, CLI, desktop and Docker. | 轻量级跨平台数据库管理工具,支持 MySQL、PostgreSQL、SQLite、Redis、MongoDB、达梦等 100+ 数据库,提供桌面端、Docker、CLI、内置 AI 助手和 MCP。

feat(fnos): add app package and release integration

t8y250834a0eb9ac
diff --git a/.github/workflows/fnos-package.yml b/.github/workflows/fnos-package.yml
new file mode 100644
index 0000000000..0e9a842af7
--- /dev/null
+++ b/.github/workflows/fnos-package.yml
@@ -0,0 +1,31 @@
+name: fnOS Package
+
+on:
+ workflow_dispatch:
+ pull_request:
+ paths:
+ - "deploy/fnos/**"
+ - "crates/dbx-web/Cargo.toml"
+ - "docs/logo.png"
+ - "docs/public/logo-64.png"
+ - ".github/workflows/fnos-package.yml"
+ - ".github/workflows/release.yml"
+
+permissions:
+ contents: read
+
+jobs:
+ package:
+ runs-on: ubuntu-24.04
+ steps:
+ - uses: actions/checkout@v5
+
+ - name: Build fnOS package
+ run: ./deploy/fnos/build.sh
+
+ - name: Upload fnOS package
+ uses: actions/upload-artifact@v7
+ with:
+ name: dbx-fnos
+ path: dist/fnos/*
+ if-no-files-found: error
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 86f2542ac0..1d6c06dd3c 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -1035,7 +1035,7 @@ jobs:
# Keep the release as a draft until every release-blocking platform job passes.
# Nix packaging and the Windows 7 static-browser build are advisory and
# upload their release assets independently of publication.
- needs: [cleanup-release-signatures, docker-manifest, jdbc-plugin, static-browser]
+ needs: [cleanup-release-signatures, docker-manifest, fnos-package, jdbc-plugin, static-browser]
runs-on: ubuntu-latest
steps:
- name: Publish draft release
@@ -1233,3 +1233,24 @@ jobs:
-t ${{ env.CNB_REGISTRY }}/${{ env.CNB_REPOSITORY }}:${{ steps.version.outputs.version }} \
-t ${{ env.CNB_REGISTRY }}/${{ env.CNB_REPOSITORY }}:latest \
$(cd /tmp/digests/cnb && printf '${{ env.CNB_REGISTRY }}/${{ env.CNB_REPOSITORY }}@sha256:%s ' *)
+
+ fnos-package:
+ name: Build fnOS package
+ needs: [release-ready, docker-manifest]
+ runs-on: ubuntu-24.04
+ steps:
+ - uses: actions/checkout@v5
+
+ - name: Build versioned fnOS package
+ env:
+ DBX_FNOS_VERSION: ${{ github.ref_name }}
+ run: |
+ DBX_FNOS_VERSION="${DBX_FNOS_VERSION#v}" ./deploy/fnos/build.sh
+
+ - name: Upload fnOS release assets
+ env:
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ run: |
+ gh release upload "${GITHUB_REF_NAME}" dist/fnos/* \
+ --repo "${GITHUB_REPOSITORY}" \
+ --clobber
diff --git a/deploy/fnos/README.md b/deploy/fnos/README.md
new file mode 100644
index 0000000000..5e7c7df85c
--- /dev/null
+++ b/deploy/fnos/README.md
@@ -0,0 +1,63 @@
+# DBX for fnOS
+
+This directory packages the existing DBX Web container as a native fnOS
+application package. The FPK contains the application metadata and Docker
+Compose integration; the DBX image is pulled from the CNB registry when the
+application is installed.
+
+## Build
+
+Run from the repository root:
+
+```bash
+./deploy/fnos/build.sh
+```
+
+The script reads the version from `crates/dbx-web/Cargo.toml`, downloads and
+verifies the official `fnpack` binary when one is not already available, and
+writes these artifacts to `dist/fnos/`:
+
+- `DBX_<version>_fnos.fpk`
+- `DBX_<version>_fnos.fpk.sha256`
+
+Optional overrides:
+
+```bash
+DBX_FNOS_VERSION=0.6.25 \
+DBX_FNOS_IMAGE=docker.cnb.cool/dbxio.com/dbx:0.6.25 \
+DBX_FNOS_CHANGELOG='升级至 DBX 0.6.25。' \
+FNPACK_BIN=/path/to/fnpack \
+./deploy/fnos/build.sh
+```
+
+Release builds must use an immutable version tag. The build rejects `latest`
+and verifies that the package version matches the image tag by default.
+
+## Runtime layout
+
+- Host port: `4224`
+- Container port: `4224`
+- Persistent application data: `${TRIM_PKGVAR}` -> `/app/data`
+- Persistent backups: `${TRIM_PKGVAR}/backups` -> `/app/backups`
+- Container name: `dbx-fnos`
+- Desktop entry: opens DBX in a browser tab
+
+DBX password protection remains enabled. Users set the initial password from
+the DBX Web interface; the package never enables `DBX_DISABLE_PASSWORD`.
+
+The draft application-center copy, support details, and privacy disclosure are
+maintained in `store-listing.zh-CN.md`.
+
+## Device validation still required
+
+Before submitting a release to the fnOS application center, validate on a
+clean fnOS device:
+
+1. Install the generated FPK.
+2. Confirm the versioned CNB image is pulled for the device architecture.
+3. Open DBX from the desktop and set the initial password.
+4. Create and reconnect to a database connection.
+5. Restart DBX and confirm connections persist.
+6. Upgrade from the previous FPK and confirm data remains intact.
+7. Stop and start the application from the application center.
+8. Uninstall and confirm the displayed data-removal behavior matches fnOS.
diff --git a/deploy/fnos/build.sh b/deploy/fnos/build.sh
new file mode 100755
index 0000000000..2b5a880b07
--- /dev/null
+++ b/deploy/fnos/build.sh
@@ -0,0 +1,156 @@
+#!/usr/bin/env bash
+set -euo pipefail
+
+repo_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
+package_source="$repo_root/deploy/fnos/package"
+output_dir="${DBX_FNOS_OUTPUT_DIR:-$repo_root/dist/fnos}"
+fnpack_version="1.2.3"
+scratch_root="$(mktemp -d "${TMPDIR:-/tmp}/dbx-fnos-build.XXXXXX")"
+
+cleanup() {
+ if [[ -d "$scratch_root" ]]; then
+ find "$scratch_root" -depth -delete
+ fi
+}
+trap cleanup EXIT
+
+read_package_version() {
+ sed -nE 's/^version[[:space:]]*=[[:space:]]*"([^"]+)".*/\1/p' \
+ "$repo_root/crates/dbx-web/Cargo.toml" | head -n 1
+}
+
+version="${DBX_FNOS_VERSION:-$(read_package_version)}"
+image="${DBX_FNOS_IMAGE:-docker.cnb.cool/dbxio.com/dbx:$version}"
+changelog="${DBX_FNOS_CHANGELOG:-升级至 DBX ${version}。}"
+
+if ! [[ "$version" =~ ^[0-9]+\.[0-9]+\.[0-9]+([.-][0-9A-Za-z.-]+)?$ ]]; then
+ echo "invalid fnOS package version: $version" >&2
+ exit 1
+fi
+
+if [[ "$image" == *:latest ]]; then
+ echo "fnOS release packages must use an immutable image tag, not latest" >&2
+ exit 1
+fi
+
+if [[ "$image" != *:"$version" ]]; then
+ echo "fnOS image tag must match package version $version: $image" >&2
+ exit 1
+fi
+
+if [[ "$changelog" == *$'\n'* || "$changelog" == *$'\r'* ]]; then
+ echo "DBX_FNOS_CHANGELOG must be a single line" >&2
+ exit 1
+fi
+
+sha256_file() {
+ if command -v sha256sum >/dev/null 2>&1; then
+ sha256sum "$1" | awk '{print $1}'
+ else
+ shasum -a 256 "$1" | awk '{print $1}'
+ fi
+}
+
+resolve_fnpack() {
+ if [[ -n "${FNPACK_BIN:-}" ]]; then
+ printf '%s\n' "$FNPACK_BIN"
+ return
+ fi
+
+ if command -v fnpack >/dev/null 2>&1; then
+ command -v fnpack
+ return
+ fi
+
+ local os arch asset expected_sha256
+ os="$(uname -s)"
+ arch="$(uname -m)"
+ case "$os/$arch" in
+ Darwin/arm64)
+ asset="fnpack-${fnpack_version}-darwin-arm64"
+ expected_sha256="d40cb00896cb2a5d211357d255750ed0cbe7f2d141df671c2b717afb4e74bf77"
+ ;;
+ Darwin/x86_64)
+ asset="fnpack-${fnpack_version}-darwin-amd64"
+ expected_sha256="30a9f50a35e8d8d425b687881761478c3c778e9c0da3a1b59f298b666dd7a268"
+ ;;
+ Linux/x86_64)
+ asset="fnpack-${fnpack_version}-linux-amd64"
+ expected_sha256="54b97fa7b70968c4d05c79840f5daeff508957d0bb2062fdb0376d00d9615c93"
+ ;;
+ *)
+ echo "no verified fnpack download for $os/$arch; set FNPACK_BIN" >&2
+ exit 1
+ ;;
+ esac
+
+ local tool_dir tool_path actual_sha256
+ tool_dir="$scratch_root/tool"
+ mkdir -p "$tool_dir"
+ tool_path="$tool_dir/fnpack"
+ curl --fail --location --retry 3 --connect-timeout 10 \
+ "https://static2.fnnas.com/fnpack/$asset" \
+ --output "$tool_path"
+ actual_sha256="$(sha256_file "$tool_path")"
+ if [[ "$actual_sha256" != "$expected_sha256" ]]; then
+ echo "fnpack checksum mismatch: expected $expected_sha256, got $actual_sha256" >&2
+ exit 1
+ fi
+ chmod +x "$tool_path"
+ printf '%s\n' "$tool_path"
+}
+
+render_template() {
+ local source="$1" destination="$2"
+ local escaped_version escaped_image escaped_changelog
+ escaped_version="$(printf '%s' "$version" | sed 's/[\\&|]/\\&/g')"
+ escaped_image="$(printf '%s' "$image" | sed 's/[\\&|]/\\&/g')"
+ escaped_changelog="$(printf '%s' "$changelog" | sed 's/[\\&|]/\\&/g')"
+ sed \
+ -e "s|__DBX_VERSION__|$escaped_version|g" \
+ -e "s|__DBX_IMAGE__|$escaped_image|g" \
+ -e "s|__DBX_CHANGELOG__|$escaped_changelog|g" \
+ "$source" > "$destination"
+}
+
+fnpack_bin="$(resolve_fnpack)"
+if [[ ! -x "$fnpack_bin" ]]; then
+ echo "fnpack is not executable: $fnpack_bin" >&2
+ exit 1
+fi
+
+work_root="$scratch_root/package"
+package_dir="$work_root/dbx"
+mkdir -p "$package_dir" "$output_dir"
+cp -R "$package_source/." "$package_dir/"
+mkdir -p "$package_dir/app/ui/images" "$package_dir/wizard"
+
+render_template "$package_dir/manifest.template" "$package_dir/manifest"
+render_template "$package_dir/app/docker/docker-compose.yaml.template" \
+ "$package_dir/app/docker/docker-compose.yaml"
+rm "$package_dir/manifest.template" "$package_dir/app/docker/docker-compose.yaml.template"
+
+cp "$repo_root/docs/public/logo-64.png" "$package_dir/ICON.PNG"
+cp "$repo_root/docs/logo.png" "$package_dir/ICON_256.PNG"
+cp "$repo_root/docs/public/logo-64.png" "$package_dir/app/ui/images/icon_64.png"
+cp "$repo_root/docs/logo.png" "$package_dir/app/ui/images/icon_256.png"
+chmod +x "$package_dir"/cmd/*
+
+(cd "$package_dir" && "$fnpack_bin" build)
+
+fpk_path="$(find "$package_dir" -maxdepth 1 -type f -name '*.fpk' -print -quit)"
+if [[ -z "$fpk_path" ]]; then
+ echo "fnpack completed without producing an FPK" >&2
+ exit 1
+fi
+
+artifact="$output_dir/DBX_${version}_fnos.fpk"
+cp "$fpk_path" "$artifact"
+if command -v sha256sum >/dev/null 2>&1; then
+ (cd "$output_dir" && sha256sum "$(basename "$artifact")" > "$(basename "$artifact").sha256")
+else
+ (cd "$output_dir" && shasum -a 256 "$(basename "$artifact")" > "$(basename "$artifact").sha256")
+fi
+
+printf 'Created %s\n' "$artifact"
+printf 'Image: %s\n' "$image"
diff --git a/deploy/fnos/package/app/docker/docker-compose.yaml.template b/deploy/fnos/package/app/docker/docker-compose.yaml.template
new file mode 100644
index 0000000000..90a0772a56
--- /dev/null
+++ b/deploy/fnos/package/app/docker/docker-compose.yaml.template
@@ -0,0 +1,16 @@
+version: "3.8"
+
+services:
+ dbx:
+ image: __DBX_IMAGE__
+ container_name: dbx-fnos
+ restart: unless-stopped
+ ports:
+ - "${TRIM_SERVICE_PORT}:4224"
+ volumes:
+ - "${TRIM_PKGVAR}:/app/data"
+ - "${TRIM_PKGVAR}/backups:/app/backups"
+ environment:
+ DBX_DATA_DIR: /app/data
+ DBX_BACKUP_ROOT: /app/backups
+ stop_grace_period: 90s
diff --git a/deploy/fnos/package/app/ui/config b/deploy/fnos/package/app/ui/config
new file mode 100644
index 0000000000..8b0542b7d6
--- /dev/null
+++ b/deploy/fnos/package/app/ui/config
@@ -0,0 +1,13 @@
+{
+ ".url": {
+ "dbx.Application": {
+ "title": "DBX",
+ "icon": "images/icon_{0}.png",
+ "type": "url",
+ "protocol": "http",
+ "port": "4224",
+ "url": "/",
+ "allUsers": false
+ }
+ }
+}
diff --git a/deploy/fnos/package/cmd/config_callback b/deploy/fnos/package/cmd/config_callback
new file mode 100755
index 0000000000..8c3cbfc39d
--- /dev/null
+++ b/deploy/fnos/package/cmd/config_callback
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+exit 0
diff --git a/deploy/fnos/package/cmd/config_init b/deploy/fnos/package/cmd/config_init
new file mode 100755
index 0000000000..8c3cbfc39d
--- /dev/null
+++ b/deploy/fnos/package/cmd/config_init
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+exit 0
diff --git a/deploy/fnos/package/cmd/install_callback b/deploy/fnos/package/cmd/install_callback
new file mode 100755
index 0000000000..8c3cbfc39d
--- /dev/null
+++ b/deploy/fnos/package/cmd/install_callback
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+exit 0
diff --git a/deploy/fnos/package/cmd/install_init b/deploy/fnos/package/cmd/install_init
new file mode 100755
index 0000000000..8c3cbfc39d
--- /dev/null
+++ b/deploy/fnos/package/cmd/install_init
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+exit 0
diff --git a/deploy/fnos/package/cmd/main b/deploy/fnos/package/cmd/main
new file mode 100755
index 0000000000..9b5758b889
--- /dev/null
+++ b/deploy/fnos/package/cmd/main
@@ -0,0 +1,18 @@
+#!/bin/bash
+
+container_name="dbx-fnos"
+
+case "$1" in
+ start|stop)
+ exit 0
+ ;;
+ status)
+ if [ "$(docker inspect --format '{{.State.Status}}' "$container_name" 2>/dev/null)" = "running" ]; then
+ exit 0
+ fi
+ exit 3
+ ;;
+ *)
+ exit 1
+ ;;
+esac
diff --git a/deploy/fnos/package/cmd/uninstall_callback b/deploy/fnos/package/cmd/uninstall_callback
new file mode 100755
index 0000000000..8c3cbfc39d
--- /dev/null
+++ b/deploy/fnos/package/cmd/uninstall_callback
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+exit 0
diff --git a/deploy/fnos/package/cmd/uninstall_init b/deploy/fnos/package/cmd/uninstall_init
new file mode 100755
index 0000000000..8c3cbfc39d
--- /dev/null
+++ b/deploy/fnos/package/cmd/uninstall_init
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+exit 0
diff --git a/deploy/fnos/package/cmd/upgrade_callback b/deploy/fnos/package/cmd/upgrade_callback
new file mode 100755
index 0000000000..8c3cbfc39d
--- /dev/null
+++ b/deploy/fnos/package/cmd/upgrade_callback
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+exit 0
diff --git a/deploy/fnos/package/cmd/upgrade_init b/deploy/fnos/package/cmd/upgrade_init
new file mode 100755
index 0000000000..8c3cbfc39d
--- /dev/null
+++ b/deploy/fnos/package/cmd/upgrade_init
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+exit 0
diff --git a/deploy/fnos/package/config/privilege b/deploy/fnos/package/config/privilege
new file mode 100644
index 0000000000..963fa52d3f
--- /dev/null
+++ b/deploy/fnos/package/config/privilege
@@ -0,0 +1,7 @@
+{
+ "defaults": {
+ "run-as": "package"
+ },
+ "username": "dbx",
+ "groupname": "dbx"
+}
diff --git a/deploy/fnos/package/config/resource b/deploy/fnos/package/config/resource
new file mode 100644
index 0000000000..ee33248208
--- /dev/null
+++ b/deploy/fnos/package/config/resource
@@ -0,0 +1,10 @@
+{
+ "docker-project": {
+ "projects": [
+ {
+ "name": "dbx",
+ "path": "docker"
+ }
+ ]
+ }
+}
diff --git a/deploy/fnos/package/manifest.template b/deploy/fnos/package/manifest.template
new file mode 100644
index 0000000000..1bf9be102a
--- /dev/null
+++ b/deploy/fnos/package/manifest.template
@@ -0,0 +1,16 @@
+appname = dbx
+version = __DBX_VERSION__
+display_name = DBX
+desc = 现代化的开源数据库管理工具,支持多种数据库和数据服务。
+platform = all
+source = thirdparty
+maintainer = t8y2
+maintainer_url = https://dbxio.com
+distributor = t8y2
+distributor_url = https://dbxio.com
+desktop_uidir = ui
+desktop_applaunchname = dbx.Application
+service_port = 4224
+checkport = true
+ctl_stop = true
+changelog = __DBX_CHANGELOG__
diff --git a/deploy/fnos/store-listing.zh-CN.md b/deploy/fnos/store-listing.zh-CN.md
new file mode 100644
index 0000000000..90c9a4b533
--- /dev/null
+++ b/deploy/fnos/store-listing.zh-CN.md
@@ -0,0 +1,88 @@
+# DBX 飞牛应用中心上架资料
+
+## 基础信息
+
+- 应用名称:DBX
+- 应用标识:`dbx`
+- 应用类别:开发工具
+- 开发者:t8y2
+- 发布者:t8y2
+- 官方网站:https://dbxio.com
+- 隐私政策:https://dbxio.com/cn/privacy
+- 技术支持:https://github.com/t8y2/dbx/issues/new/choose
+- 源代码:https://github.com/t8y2/dbx
+- 开源许可证:Apache License 2.0
+- 支持架构:x86、ARM
+- 交付方式:Docker 应用
+
+## 一句话介绍
+
+现代化的开源数据库管理工具,在浏览器中统一连接和管理多种数据库与数据服务。
+
+## 应用介绍
+
+DBX 是一款开源数据库管理工具,提供数据库连接管理、SQL 编辑与执行、数据浏览和编辑、对象与结构查看、导入导出、备份以及可选的 AI 辅助能力。
+
+飞牛版本通过 Docker 运行 DBX Web,应用数据保存在飞牛为 DBX 分配的持久化应用目录中。应用默认启用独立的 DBX 密码保护,不会因为安装在 NAS 上而自动关闭身份验证。
+
+DBX 支持 MySQL、PostgreSQL、SQLite、Redis、MongoDB、ClickHouse、SQL Server、Oracle、Elasticsearch 等数据库与数据服务。部分数据库能力需要用户按需安装对应驱动或插件。
+
+## 核心功能
+
+- 管理多种 SQL、NoSQL、缓存、搜索及消息队列连接
+- SQL 编辑、执行、结果查看与数据编辑
+- 数据库、Schema、表、字段、索引和其他对象浏览
+- 数据导入、导出及数据库备份
+- SSH Tunnel、TLS 和多种数据库认证方式
+- 可选 AI 服务、插件和外部驱动
+- WebDAV、GitHub 或 Gitee 配置同步能力
+
+## 网络与权限说明
+
+DBX 需要网络访问能力,用于连接用户配置的数据库或数据服务。用户主动使用以下功能时,DBX 还可能访问相应的第三方服务:
+
+- 用户配置的 AI 服务提供商
+- 用户配置的 WebDAV、GitHub 或 Gitee 同步服务
+- DBX 插件、驱动及版本信息下载地址
+
+DBX 不需要宿主机特权模式、Host 网络、额外 Linux Capabilities 或宿主机系统目录写权限。应用只持久化自身的数据和备份目录。
+
+## 数据与隐私说明
+
+DBX 不提供强制注册的中心化账号服务。数据库连接、应用设置、已保存 SQL、插件配置、AI 配置和 Tunnel 配置默认保存在用户自己的飞牛设备上。
+
+连接、插件、AI 和 Tunnel 中的敏感凭据在写入 DBX 数据库前会加密。加密密钥与 DBX 数据共同保存在应用的持久化数据目录中,因此用户备份或恢复 DBX 时必须同时保留完整数据目录。该机制不能防止拥有整个 NAS 数据卷读取权限的人员复制应用数据。
+
+只有在用户主动连接数据库、调用 AI 服务、执行云同步、下载插件或驱动时,相关数据才会发送到用户选择或配置的目标服务。第三方服务如何处理数据,由相应服务的隐私政策和用户配置决定。
+
+DBX 本身不要求用户向项目维护者上传数据库内容或数据库凭据。通过公开 GitHub Issues 寻求支持时,请勿提交密码、Token、私钥、完整连接字符串、未脱敏日志或其他敏感数据。
+
+用户可以在 DBX 中删除连接和配置。卸载飞牛应用前,应先根据需要导出配置或备份应用数据;最终的数据保留与删除行为以飞牛卸载界面中的用户选择和系统规则为准。
+
+## 截图清单
+
+实机验证时需要制作以下截图:
+
+1. DBX 首页或连接列表
+2. 新建数据库连接页面
+3. SQL 编辑器与查询结果
+4. 数据库对象或表结构浏览
+5. 应用中心中的 DBX 安装详情
+
+截图必须使用测试数据,并移除数据库地址、用户名、密码、Token、业务表名和业务数据。
+
+## 首次发布说明
+
+DBX 首次登陆飞牛 fnOS 应用中心,提供基于浏览器的数据库管理体验,支持 x86 与 ARM 设备。应用默认启用密码保护,并将数据持久化保存在飞牛应用目录中。
+
+## 提交前待确认
+
+- [x] 应用名称:DBX
+- [x] 开发者与发布者:t8y2
+- [x] 官方网站:dbxio.com
+- [x] 技术支持:GitHub Issues
+- [ ] 飞牛实机安装、启动、停止、升级和卸载验证
+- [ ] x86 架构验证
+- [ ] ARM 架构验证或明确首发架构范围
+- [ ] 使用测试数据制作应用截图
+- [ ] 按飞牛当前流程提交应用包和测试材料
diff --git a/docs/app/[lang]/privacy/page.tsx b/docs/app/[lang]/privacy/page.tsx
new file mode 100644
index 0000000000..3f6bacfd55
--- /dev/null
+++ b/docs/app/[lang]/privacy/page.tsx
@@ -0,0 +1,366 @@
+import type { Metadata } from "next";
+import Link from "next/link";
+import type { ReactNode } from "react";
+import { ArrowUpRight, Database, Globe2, Network, ShieldCheck } from "lucide-react";
+import { LandingFooter } from "@/components/landing/LandingFooter";
+import { LandingNav } from "@/components/landing/LandingNav";
+import { resolveLang } from "@/lib/i18n";
+import { buildMetadata } from "@/lib/metadata";
+
+const copy = {
+ en: {
+ metadataTitle: "Privacy Policy",
+ metadataDescription: "How the DBX application and dbxio.com handle local data, optional network features, website analytics, support submissions, retention, and security.",
+ eyebrow: "Privacy",
+ title: "Privacy Policy",
+ lead: "DBX is local-first. The application does not require a DBX cloud account, and the project maintainers do not receive your database contents or credentials by default.",
+ effectiveLabel: "Effective date",
+ effectiveDate: "September 27, 2026",
+ updatedLabel: "Last updated",
+ updatedDate: "September 27, 2026",
+ highlights: [
+ {
+ title: "Local by default",
+ description: "Application settings, saved SQL, connection definitions, and protected secrets stay in the DBX data directory you control.",
+ },
+ {
+ title: "Network access is contextual",
+ description: "DBX contacts databases and optional services only as required by the connections and features you configure or use.",
+ },
+ {
+ title: "Website data is separate",
+ description: "Website analytics, GitHub sign-in, and support submissions are described separately from data stored by your DBX installation.",
+ },
+ ],
+ contentsLabel: "On this page",
+ sections: [
+ ["scope", "Scope"],
+ ["application-data", "Application data"],
+ ["network", "Network activity"],
+ ["website", "Website services"],
+ ["retention", "Retention and deletion"],
+ ["security", "Security"],
+ ["changes", "Changes and contact"],
+ ],
+ scopeTitle: "Scope and responsibility",
+ scopeParagraphs: [
+ "This policy covers the official DBX application, including desktop, Web, Docker, and NAS distributions, and the dbxio.com website operated for the DBX project.",
+ "When you self-host DBX, you or your organization controls the deployment, users, databases, backups, and access policies. The DBX project is normally not the controller or processor of data stored inside that deployment.",
+ "A database, AI provider, synchronization service, identity provider, plugin source, application store, or other third party you choose has its own terms and privacy practices.",
+ ],
+ applicationTitle: "Data stored by the DBX application",
+ applicationIntro: "DBX stores the information needed to provide the features you enable. Depending on how you use it, this can include:",
+ applicationBullets: [
+ "Database connection definitions, application preferences, saved SQL, query-related workspace state, and backup metadata.",
+ "Plugin settings, AI provider settings, SSH tunnel settings, and WebDAV or code-hosting synchronization settings.",
+ "Credentials such as passwords, tokens, and private-key passphrases when you choose to save them.",
+ ],
+ applicationClosing: "Sensitive fields are protected by the DBX Secret Store before they are written to the application database. On Web, Docker, and NAS deployments, the encryption key and database are part of the same data-directory recovery unit. Anyone who can copy the complete application data volume may be able to copy both, so operating-system permissions, NAS access controls, and backup security remain important.",
+ networkTitle: "When the application uses the network",
+ networkIntro: "Not every installation uses every service below. Network requests occur when a configured feature needs them, or when you explicitly invoke that feature.",
+ networkColumns: ["Feature", "Destination and possible data"],
+ networkRows: [
+ ["Database connections", "The database or data-service endpoint you configure. Protocol traffic can include credentials, queries, metadata, and returned data."],
+ ["AI assistance", "The AI provider or compatible endpoint you select. Requests can include your prompt and the SQL, schema, error, selection, or other context needed for the requested task."],
+ ["Synchronization", "The WebDAV, GitHub, or Gitee service you configure. DBX sends the synchronization package and the authentication information required by that service."],
+ ["Plugins, drivers, and updates", "Official or user-configured download sources. Requests can reveal ordinary network metadata and the version, platform, package, plugin, or driver being requested."],
+ ["OAuth and external authentication", "The identity provider required by the database or service you choose. The exchanged identity and tokens follow that provider's protocol and policy."],
+ ],
+ networkClosing: "DBX does not control how a destination service retains or uses data. Review the destination, minimize the context you send, use TLS where available, and do not send sensitive production data to a service you do not trust.",
+ websiteTitle: "Data handled by dbxio.com",
+ websiteItems: [
+ {
+ title: "Hosting and analytics",
+ description: "The website loads an analytics script from analytics.unihub.top. Website hosting and analytics requests may process technical information normally sent by a browser, such as IP address, user agent, referrer, requested page, timestamp, and usage events, depending on the active service configuration.",
+ },
+ {
+ title: "GitHub sign-in",
+ description: "If you choose GitHub sign-in for a website feature, GitHub authenticates you and the site reads your GitHub login, avatar URL, and profile URL. The temporary OAuth access token is discarded after that public identity is read. A signed session cookie can remain for up to seven days.",
+ },
+ {
+ title: "Issue drafting and submission",
+ description: "The issue form sends the description and any screenshots you provide to the configured AI service to prepare a draft. A draft is kept for about 30 minutes, the anonymous issue session for up to 24 hours, and rate-limit records for about one hour. Nothing is published until you review and confirm the draft.",
+ },
+ {
+ title: "Public support content",
+ description: "After confirmation, the issue title, body, and uploaded images become public on GitHub and associated public image hosting. Do not submit passwords, tokens, private keys, connection strings, unredacted logs, customer data, or other confidential or personal information.",
+ },
+ ],
+ retentionTitle: "Retention, export, and deletion",
+ retentionParagraphs: [
+ "Application data remains in the data directory, system credential store, configured synchronization destination, and backups until you or the system administrator removes it. Deleting a connection or configuration does not automatically erase independent backups or copies already synchronized to a third party.",
+ "You can delete application records through DBX and remove the application data directory when uninstalling. Export anything you need before deletion. For fnOS and other application stores, the final removal behavior also depends on the choices and rules presented by that platform.",
+ "Short-lived website authentication, draft, and rate-limit records expire as described above. Published GitHub Issues and images follow GitHub and hosting retention rules and may remain in caches, forks, notifications, or archives even after a deletion request. Operational logs and analytics data are retained according to the current hosting and analytics configuration for security, abuse prevention, and maintenance.",
+ ],
+ securityTitle: "Security boundaries",
+ securityParagraphs: [
+ "DBX uses safeguards such as encrypted secret storage, signed packages, sandboxing for supported plugin paths, and authenticated website sessions where applicable. No system can guarantee absolute security.",
+ "Protect the device and data directory, restrict network exposure, use strong DBX and database credentials, keep DBX and its dependencies updated, verify third-party endpoints, and secure exported or synchronized data. If you operate DBX for other people, you are responsible for appropriate access control, notices, and legal compliance.",
+ ],
+ changesTitle: "Policy changes and contact",
+ changesParagraphs: [
+ "We may update this policy when DBX features, website services, or legal requirements change. The effective date at the top identifies the current version. Material changes should be reflected in the project website or release materials.",
+ "For privacy or security questions, contact the DBX maintainers through the GitHub support channel. Do not include sensitive information in a public Issue; ask for an appropriate private contact path first if the request itself contains confidential details.",
+ ],
+ contactLabel: "Open the DBX support channel",
+ closing: "This policy describes the official DBX project. A distributor or organization offering its own DBX service may provide additional terms that also apply.",
+ },
+ cn: {
+ metadataTitle: "隐私政策",
+ metadataDescription: "了解 DBX 应用和 dbxio.com 如何处理本地数据、可选联网功能、网站统计、支持提交、数据保留与安全边界。",
+ eyebrow: "隐私",
+ title: "隐私政策",
+ lead: "DBX 采用本地优先设计。应用不要求注册 DBX 云账号,项目维护者默认不会收到你的数据库内容或数据库凭据。",
+ effectiveLabel: "生效日期",
+ effectiveDate: "2026 年 9 月 27 日",
+ updatedLabel: "最后更新",
+ updatedDate: "2026 年 9 月 27 日",
+ highlights: [
+ {
+ title: "默认保存在本地",
+ description: "应用设置、已保存 SQL、连接定义和受保护的敏感凭据保存在你控制的 DBX 数据目录中。",
+ },
+ {
+ title: "联网取决于实际功能",
+ description: "DBX 仅在连接你配置的系统,或使用你启用的在线功能时访问相应网络服务。",
+ },
+ {
+ title: "网站数据单独说明",
+ description: "网站统计、GitHub 登录和支持提交,与自托管 DBX 实例保存的数据具有不同边界。",
+ },
+ ],
+ contentsLabel: "本页内容",
+ sections: [
+ ["scope", "适用范围"],
+ ["application-data", "应用数据"],
+ ["network", "联网行为"],
+ ["website", "网站服务"],
+ ["retention", "保留与删除"],
+ ["security", "安全边界"],
+ ["changes", "变更与联系"],
+ ],
+ scopeTitle: "适用范围与责任边界",
+ scopeParagraphs: [
+ "本政策适用于官方 DBX 应用,包括桌面端、Web、Docker 和 NAS 发行包,以及 DBX 项目运营的 dbxio.com 网站。",
+ "当你自行部署 DBX 时,你或你的组织负责部署环境、使用者、数据库、备份和访问策略。DBX 项目通常不是该部署内数据库数据的控制者或处理者。",
+ "你选择的数据库、AI 服务、同步服务、身份提供商、插件来源、应用商店或其他第三方,适用其各自的条款和隐私规则。",
+ ],
+ applicationTitle: "DBX 应用保存的数据",
+ applicationIntro: "DBX 会保存提供已启用功能所需的信息。根据你的使用方式,可能包括:",
+ applicationBullets: [
+ "数据库连接定义、应用设置、已保存 SQL、查询相关工作区状态和备份元数据。",
+ "插件设置、AI 服务设置、SSH Tunnel 设置,以及 WebDAV 或代码托管同步设置。",
+ "在你选择保存时使用的密码、Token 和私钥口令等敏感凭据。",
+ ],
+ applicationClosing: "敏感字段写入应用数据库前会由 DBX Secret Store 保护。在 Web、Docker 和 NAS 部署中,加密密钥与数据库属于同一个数据目录恢复单元。能够复制完整应用数据卷的人员可能同时取得密文和密钥,因此仍需妥善设置操作系统权限、NAS 访问控制和备份权限。",
+ networkTitle: "DBX 应用何时访问网络",
+ networkIntro: "并非每个安装都会使用下列全部服务。只有已配置功能需要访问,或你主动调用相关功能时,才会产生对应网络请求。",
+ networkColumns: ["功能", "访问目标与可能发送的数据"],
+ networkRows: [
+ ["数据库连接", "你配置的数据库或数据服务地址。协议流量可能包含凭据、查询、元数据和返回数据。"],
+ ["AI 辅助", "你选择的 AI 服务商或兼容接口。请求可能包含提示词,以及完成任务所需的 SQL、Schema、错误信息、选中内容或其他上下文。"],
+ ["配置同步", "你配置的 WebDAV、GitHub 或 Gitee 服务。DBX 会发送同步包及该服务所需的认证信息。"],
+ ["插件、驱动与更新", "官方或用户配置的下载来源。请求可能暴露常规网络元数据,以及所请求的版本、平台、软件包、插件或驱动信息。"],
+ ["OAuth 与外部认证", "所选数据库或服务要求的身份提供商。交换的身份信息和 Token 受该提供商协议与隐私规则约束。"],
+ ],
+ networkClosing: "DBX 无法控制目标服务如何保留或使用数据。请核对访问目标、尽量减少发送的上下文、在可用时使用 TLS,并避免把敏感生产数据发送给不可信的服务。",
+ websiteTitle: "dbxio.com 处理的数据",
+ websiteItems: [
+ {
+ title: "网站托管与访问统计",
+ description: "网站会从 analytics.unihub.top 加载访问统计脚本。根据当前服务配置,网站托管和统计请求可能处理浏览器通常发送的技术信息,例如 IP 地址、User-Agent、来源页面、访问页面、时间和使用事件。",
+ },
+ {
+ title: "GitHub 登录",
+ description: "当你主动使用网站的 GitHub 登录功能时,认证由 GitHub 完成,网站会读取你的 GitHub 用户名、头像地址和个人主页地址。用于读取这些公开身份信息的临时 OAuth Token 随后会被丢弃,签名会话 Cookie 最长可保留 7 天。",
+ },
+ {
+ title: "Issue 草稿与提交",
+ description: "Issue 表单会把你填写的描述和上传的截图发送给已配置的 AI 服务,以生成可编辑草稿。草稿约保留 30 分钟,匿名 Issue 会话最长保留 24 小时,限流记录约保留 1 小时。只有你检查并确认后才会公开发布。",
+ },
+ {
+ title: "公开支持内容",
+ description: "确认提交后,Issue 标题、正文和上传图片会在 GitHub 及关联的公开图片地址上公开。请勿提交密码、Token、私钥、连接字符串、未脱敏日志、客户数据或其他机密和个人信息。",
+ },
+ ],
+ retentionTitle: "数据保留、导出与删除",
+ retentionParagraphs: [
+ "应用数据会保留在数据目录、系统凭据库、已配置的同步目标和备份中,直到你或系统管理员将其删除。删除连接或配置,不会自动清除独立备份或已同步到第三方的副本。",
+ "你可以在 DBX 中删除应用记录,也可以在卸载时移除应用数据目录;删除前请先导出需要保留的内容。对于飞牛 fnOS 等应用商店,最终的数据移除行为还取决于平台卸载界面提供的选项和系统规则。",
+ "短期的网站认证、草稿和限流记录会按上述期限过期。已经公开的 GitHub Issue 和图片受 GitHub 及图片托管规则约束,即使申请删除,也可能继续存在于缓存、Fork、通知或归档中。运行日志和统计数据会根据当前托管与统计配置,在安全、防滥用和维护所需范围内保留。",
+ ],
+ securityTitle: "安全措施与限制",
+ securityParagraphs: [
+ "DBX 会在适用场景使用敏感信息加密存储、签名软件包、受支持插件路径的沙箱隔离和网站会话认证等措施,但任何系统都无法保证绝对安全。",
+ "请保护设备和数据目录、限制网络暴露、使用高强度的 DBX 与数据库凭据、及时更新 DBX 及其依赖、核对第三方服务地址,并妥善保护导出或同步的数据。如果你为其他人运营 DBX,还应负责适当的访问控制、隐私告知和合规要求。",
+ ],
+ changesTitle: "政策变更与联系方式",
+ changesParagraphs: [
+ "当 DBX 功能、网站服务或法律要求发生变化时,我们可能更新本政策。页面顶部的生效日期用于标识当前版本;重要变更会尽量在项目网站或发布材料中说明。",
+ "如有隐私或安全问题,可通过 GitHub 支持渠道联系 DBX 维护者。不要在公开 Issue 中填写敏感信息;如果请求本身包含机密内容,请先要求提供合适的私下联系方式。",
+ ],
+ contactLabel: "打开 DBX 支持渠道",
+ closing: "本政策说明的是官方 DBX 项目。第三方发行者或组织提供的 DBX 服务,可能另有同时适用的条款。",
+ },
+} as const;
+
+function Paragraphs({ items }: { items: readonly string[] }) {
+ return (
+ <div className="grid gap-4 text-[15px] leading-7 text-landing-muted">
+ {items.map((paragraph) => <p key={paragraph}>{paragraph}</p>)}
+ </div>
+ );
+}
+
+function PolicySection({ id, number, title, children }: { id: string; number: string; title: string; children: ReactNode }) {
+ return (
+ <section id={id} className="scroll-mt-24 border-t border-landing-line py-10 first:border-t-0 first:pt-0">
+ <div className="mb-5 flex items-start gap-4">
+ <span className="mt-0.5 inline-flex h-7 min-w-7 items-center justify-center rounded-full border border-[color-mix(in_srgb,var(--color-landing-sky)_32%,transparent)] bg-[color-mix(in_srgb,var(--color-landing-sky)_8%,transparent)] px-2 text-[11px] font-[750] tracking-[0.08em] text-landing-sky">
+ {number}
+ </span>
+ <h2 className="text-[clamp(1.25rem,2.4vw,1.6rem)] font-[760] tracking-[-0.025em] text-landing-ink">{title}</h2>
+ </div>
+ {children}
+ </section>
+ );
+}
+
+export async function generateMetadata({ params }: { params: Promise<{ lang: string }> }): Promise<Metadata> {
+ const { lang } = await params;
+ const locale = resolveLang(lang);
+ const t = copy[locale];
+
+ return buildMetadata({
+ title: t.metadataTitle,
+ description: t.metadataDescription,
+ path: `/${locale}/privacy`,
+ lang: locale,
+ });
+}
+
+export default async function PrivacyPage({ params }: { params: Promise<{ lang: string }> }) {
+ const { lang } = await params;
+ const locale = resolveLang(lang);
+ const t = copy[locale];
+
+ return (
+ <main className="min-h-screen bg-landing-bg text-landing-ink">
+ <LandingNav lang={locale} active="privacy" />
+
+ <div className="mx-auto max-w-[1180px] px-7 pb-24 pt-32 max-[760px]:px-[18px] max-[760px]:pb-16 max-[760px]:pt-24">
+ <header className="max-w-[900px]">
+ <div className="mb-7 inline-flex items-center gap-2 rounded-full border border-landing-line bg-landing-soft px-3 py-1.5 text-[11px] font-[720] uppercase tracking-[0.16em] text-landing-sky">
+ <ShieldCheck size={14} aria-hidden="true" />
+ {t.eyebrow}
+ </div>
+ <h1 className="max-w-[760px] text-[clamp(2.6rem,7vw,5.4rem)] font-[840] leading-[0.94] tracking-[-0.065em] text-landing-ink">{t.title}</h1>
+ <p className="mt-7 max-w-[780px] text-[clamp(1.05rem,2.2vw,1.3rem)] leading-[1.7] text-landing-muted">{t.lead}</p>
+ <dl className="mt-8 flex flex-wrap gap-x-8 gap-y-3 border-l-2 border-[color-mix(in_srgb,var(--color-landing-sky)_62%,transparent)] pl-5 text-sm">
+ <div className="flex gap-2">
+ <dt className="text-landing-muted">{t.effectiveLabel}</dt>
+ <dd className="font-[650] text-landing-ink">{t.effectiveDate}</dd>
+ </div>
+ <div className="flex gap-2">
+ <dt className="text-landing-muted">{t.updatedLabel}</dt>
+ <dd className="font-[650] text-landing-ink">{t.updatedDate}</dd>
+ </div>
+ </dl>
+ </header>
+
+ <div className="mt-14 grid gap-4 md:grid-cols-3">
+ {t.highlights.map((item, index) => {
+ const Icon = [Database, Network, Globe2][index];
+ return (
+ <div key={item.title} className="rounded-2xl border border-landing-line bg-landing-panel p-6">
+ <Icon size={20} aria-hidden="true" className="text-landing-sky" />
+ <h2 className="mt-5 text-[15px] font-[720] text-landing-ink">{item.title}</h2>
+ <p className="mt-2 text-[13px] leading-6 text-landing-muted">{item.description}</p>
+ </div>
+ );
+ })}
+ </div>
+
+ <div className="mt-20 grid grid-cols-[220px_minmax(0,1fr)] items-start gap-14 max-[900px]:grid-cols-1 max-[900px]:gap-10 max-[900px]:mt-14">
+ <aside className="sticky top-24 rounded-2xl border border-landing-line bg-landing-panel p-5 max-[900px]:static">
+ <p className="text-[11px] font-[720] uppercase tracking-[0.14em] text-landing-muted">{t.contentsLabel}</p>
+ <nav aria-label={t.contentsLabel} className="mt-3 grid gap-0.5 max-[900px]:grid-cols-2 max-[520px]:grid-cols-1">
+ {t.sections.map(([id, label], index) => (
+ <a key={id} href={`#${id}`} className="flex min-h-10 items-center gap-3 rounded-lg px-2 text-[13px] text-landing-muted transition-colors hover:bg-landing-soft hover:text-landing-ink">
+ <span className="font-mono text-[10px] text-landing-sky">{String(index + 1).padStart(2, "0")}</span>
+ <span>{label}</span>
+ </a>
+ ))}
+ </nav>
+ </aside>
+
+ <div className="min-w-0 max-w-[780px]">
+ <PolicySection id="scope" number="01" title={t.scopeTitle}>
+ <Paragraphs items={t.scopeParagraphs} />
+ </PolicySection>
+
+ <PolicySection id="application-data" number="02" title={t.applicationTitle}>
+ <p className="text-[15px] leading-7 text-landing-muted">{t.applicationIntro}</p>
+ <ul className="mt-5 grid gap-3 text-[15px] leading-7 text-landing-muted">
+ {t.applicationBullets.map((item) => (
+ <li key={item} className="flex gap-3">
+ <span aria-hidden="true" className="mt-[11px] size-1.5 shrink-0 rounded-full bg-landing-sky" />
+ <span>{item}</span>
+ </li>
+ ))}
+ </ul>
+ <p className="mt-5 text-[15px] leading-7 text-landing-muted">{t.applicationClosing}</p>
+ </PolicySection>
+
+ <PolicySection id="network" number="03" title={t.networkTitle}>
+ <p className="text-[15px] leading-7 text-landing-muted">{t.networkIntro}</p>
+ <div className="mt-6 overflow-hidden rounded-2xl border border-landing-line">
+ <div className="grid grid-cols-[180px_minmax(0,1fr)] gap-5 border-b border-landing-line bg-landing-soft px-5 py-3 text-[11px] font-[720] uppercase tracking-[0.12em] text-landing-muted max-[620px]:hidden">
+ <span>{t.networkColumns[0]}</span>
+ <span>{t.networkColumns[1]}</span>
+ </div>
+ {t.networkRows.map(([feature, description]) => (
+ <div key={feature} className="grid grid-cols-[180px_minmax(0,1fr)] gap-5 border-b border-landing-line px-5 py-5 last:border-b-0 max-[620px]:grid-cols-1 max-[620px]:gap-2">
+ <strong className="text-[14px] font-[680] text-landing-ink">{feature}</strong>
+ <p className="text-[14px] leading-6 text-landing-muted">{description}</p>
+ </div>
+ ))}
+ </div>
+ <p className="mt-5 text-[15px] leading-7 text-landing-muted">{t.networkClosing}</p>
+ </PolicySection>
+
+ <PolicySection id="website" number="04" title={t.websiteTitle}>
+ <div className="grid gap-4">
+ {t.websiteItems.map((item) => (
+ <div key={item.title} className="rounded-xl border border-landing-line bg-landing-panel px-5 py-5">
+ <h3 className="text-[14px] font-[700] text-landing-ink">{item.title}</h3>
+ <p className="mt-2 text-[14px] leading-6 text-landing-muted">{item.description}</p>
+ </div>
+ ))}
+ </div>
+ </PolicySection>
+
+ <PolicySection id="retention" number="05" title={t.retentionTitle}>
+ <Paragraphs items={t.retentionParagraphs} />
+ </PolicySection>
+
+ <PolicySection id="security" number="06" title={t.securityTitle}>
+ <Paragraphs items={t.securityParagraphs} />
+ </PolicySection>
+
+ <PolicySection id="changes" number="07" title={t.changesTitle}>
+ <Paragraphs items={t.changesParagraphs} />
+ <Link href="https://github.com/t8y2/dbx/issues/new/choose" target="_blank" rel="noopener noreferrer" className="mt-6 inline-flex min-h-11 items-center gap-2 rounded-lg border border-landing-line bg-landing-panel px-4 text-[13px] font-[680] text-landing-ink transition-colors hover:border-[color-mix(in_srgb,var(--color-landing-blue)_62%,transparent)]">
+ {t.contactLabel}
+ <ArrowUpRight size={15} aria-hidden="true" />
+ </Link>
+ <p className="mt-8 border-l border-landing-line pl-5 text-[13px] leading-6 text-landing-muted">{t.closing}</p>
+ </PolicySection>
+ </div>
+ </div>
+ </div>
+
+ <LandingFooter lang={locale} />
+ </main>
+ );
+}
diff --git a/docs/components/landing/LandingFooter.tsx b/docs/components/landing/LandingFooter.tsx
index 4c3bec31c9..6c51691312 100644
--- a/docs/components/landing/LandingFooter.tsx
+++ b/docs/components/landing/LandingFooter.tsx
@@ -4,10 +4,12 @@ import type { DocsLang } from "@/lib/i18n";
const i18n = {
en: {
tagline: "25 MB to manage 100+ databases.",
+ privacy: "Privacy",
copyright: `© ${new Date().getFullYear()} DBX. All rights reserved.`,
},
cn: {
tagline: "25MB,管理100+种数据库。",
+ privacy: "隐私政策",
copyright: `© ${new Date().getFullYear()} DBX.`,
},
};
@@ -34,7 +36,13 @@ export function LandingFooter({ lang }: { lang: DocsLang }) {
</Link>
{/* Tagline */}
- <span className="text-[13px] text-[var(--color-landing-muted)]">{t.tagline}</span>
+ <div className="flex items-center gap-3 text-[13px] text-[var(--color-landing-muted)] max-[760px]:flex-col max-[760px]:gap-1">
+ <span>{t.tagline}</span>
+ <span aria-hidden="true" className="max-[760px]:hidden">·</span>
+ <Link href={`/${lang}/privacy`} prefetch={false} className="min-h-8 inline-flex items-center underline decoration-[color-mix(in_srgb,var(--color-landing-muted)_45%,transparent)] underline-offset-4 transition-colors hover:text-[var(--color-landing-ink)]">
+ {t.privacy}
+ </Link>
+ </div>
{/* Repo icons */}
<div className="flex items-center gap-3 shrink-0">
diff --git a/docs/components/landing/LandingNav.tsx b/docs/components/landing/LandingNav.tsx
index a2c3488499..a1238164bc 100644
--- a/docs/components/landing/LandingNav.tsx
+++ b/docs/components/landing/LandingNav.tsx
@@ -39,7 +39,7 @@ const i18n = {
},
};
-export function LandingNav({ lang, active }: { lang: DocsLang; active?: "home" | "databases" | "changelog" | "community" | "issue" | "sponsors" | "contributors" | "drivers" | "plugins" }) {
+export function LandingNav({ lang, active }: { lang: DocsLang; active?: "home" | "databases" | "changelog" | "community" | "issue" | "sponsors" | "contributors" | "drivers" | "plugins" | "privacy" }) {
const ref = useRef<HTMLElement>(null);
const [menuOpen, setMenuOpen] = useState(false);
const t = i18n[lang];
@@ -53,6 +53,7 @@ export function LandingNav({ lang, active }: { lang: DocsLang; active?: "home" |
sponsors: `/${otherLang}/sponsors`,
contributors: `/${otherLang}/contributors`,
drivers: `/${otherLang}/drivers`,
+ privacy: `/${otherLang}/privacy`,
};
const langHref = langHrefMap[active ?? ""] ?? `/${otherLang}`;
const navItems = [