Skip to content

Commit 5cecee0

Browse files
💄 style: add user panel and refactor the next-auth (#2349)
* ♻️ refactor: refactor the next-auth * ✨ feat: Add User Panel * 💄 style: Update User Avatar on mobile * 🚸 style: fix data importer hot zone * 🚸 style: add migration guide * 🎨 chore: clean code * ✅ test: add test * 🌐 chore: update locale * 💄 style: improve style * ✅ test: fix test * 💄 style: improve locale switch * ♻️ refactor: use middleware redirect instead of page --------- Co-authored-by: canisminor1990 <[email protected]>
1 parent 6026481 commit 5cecee0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+1146
-209
lines changed

locales/ar/common.json

+14
Original file line numberDiff line numberDiff line change
@@ -157,5 +157,19 @@
157157
"action": "ترقية",
158158
"hasNew": "يوجد تحديث متاح",
159159
"newVersion": "هناك إصدار جديد متاح: {{version}}"
160+
},
161+
"userPanel": {
162+
"billing": "إدارة الفواتير",
163+
"defaultNickname": "مستخدم النسخة المجتمعية",
164+
"discord": "الدعم المجتمعي",
165+
"docs": "وثائق الاستخدام",
166+
"email": "الدعم عبر البريد الإلكتروني",
167+
"feedback": "تقديم ملاحظات واقتراحات",
168+
"help": "مركز المساعدة",
169+
"moveGuide": "تم نقل زر الإعدادات إلى هنا",
170+
"plans": "خطط الاشتراك",
171+
"profile": "إدارة الحساب",
172+
"setting": "إعدادات التطبيق",
173+
"usages": "إحصاءات الاستخدام"
160174
}
161175
}

locales/bg-BG/common.json

+14
Original file line numberDiff line numberDiff line change
@@ -157,5 +157,19 @@
157157
"action": "Надстрой",
158158
"hasNew": "Налична е нова актуализация",
159159
"newVersion": "Налична е нова версия: {{version}}"
160+
},
161+
"userPanel": {
162+
"billing": "Управление на сметките",
163+
"defaultNickname": "Потребител на общността",
164+
"discord": "Поддръжка на общността",
165+
"docs": "Документация",
166+
"email": "Поддръжка по имейл",
167+
"feedback": "Обратна връзка и предложения",
168+
"help": "Център за помощ",
169+
"moveGuide": "Бутонът за настройки е преместен тук",
170+
"plans": "Планове за абонамент",
171+
"profile": "Управление на профила",
172+
"setting": "Настройки на приложението",
173+
"usages": "Статистика за използване"
160174
}
161175
}

locales/de-DE/common.json

+14
Original file line numberDiff line numberDiff line change
@@ -157,5 +157,19 @@
157157
"action": "Aktualisieren",
158158
"hasNew": "Neue Version verfügbar",
159159
"newVersion": "Neue Version verfügbar: {{version}}"
160+
},
161+
"userPanel": {
162+
"billing": "Abrechnung verwalten",
163+
"defaultNickname": "Community User",
164+
"discord": "Community-Support",
165+
"docs": "Dokumentation",
166+
"email": "E-Mail-Support",
167+
"feedback": "Feedback und Vorschläge",
168+
"help": "Hilfezentrum",
169+
"moveGuide": "Die Einstellungen wurden hierher verschoben.",
170+
"plans": "Abonnementpläne",
171+
"profile": "Kontoverwaltung",
172+
"setting": "App-Einstellungen",
173+
"usages": "Nutzungsstatistiken"
160174
}
161175
}

locales/en-US/common.json

+14
Original file line numberDiff line numberDiff line change
@@ -157,5 +157,19 @@
157157
"action": "Upgrade",
158158
"hasNew": "New update available",
159159
"newVersion": "New version available: {{version}}"
160+
},
161+
"userPanel": {
162+
"billing": "Billing Management",
163+
"defaultNickname": "Community User",
164+
"discord": "Community Support",
165+
"docs": "Documentation",
166+
"email": "Email Support",
167+
"feedback": "Feedback and Suggestions",
168+
"help": "Help Center",
169+
"moveGuide": "The settings button has been moved here",
170+
"plans": "Subscription Plans",
171+
"profile": "Account Management",
172+
"setting": "App Settings",
173+
"usages": "Usage Statistics"
160174
}
161175
}

locales/es-ES/common.json

+14
Original file line numberDiff line numberDiff line change
@@ -157,5 +157,19 @@
157157
"action": "Actualizar",
158158
"hasNew": "Hay una nueva actualización disponible",
159159
"newVersion": "Nueva versión disponible: {{version}}"
160+
},
161+
"userPanel": {
162+
"billing": "Gestión de facturación",
163+
"defaultNickname": "Usuario de la comunidad",
164+
"discord": "Soporte de la comunidad",
165+
"docs": "Documentación de uso",
166+
"email": "Soporte por correo electrónico",
167+
"feedback": "Comentarios y sugerencias",
168+
"help": "Centro de ayuda",
169+
"moveGuide": "El botón de configuración se ha movido aquí",
170+
"plans": "Planes de suscripción",
171+
"profile": "Gestión de cuenta",
172+
"setting": "Configuración de la aplicación",
173+
"usages": "Estadísticas de uso"
160174
}
161175
}

locales/fr-FR/common.json

+14
Original file line numberDiff line numberDiff line change
@@ -157,5 +157,19 @@
157157
"action": "Mettre à jour",
158158
"hasNew": "Nouvelle mise à jour disponible",
159159
"newVersion": "Nouvelle version disponible : {{version}}"
160+
},
161+
"userPanel": {
162+
"billing": "Gestion de la facturation",
163+
"defaultNickname": "Utilisateur de la version communautaire",
164+
"discord": "Support de la communauté",
165+
"docs": "Documentation d'utilisation",
166+
"email": "Support par e-mail",
167+
"feedback": "Retours et suggestions",
168+
"help": "Centre d'aide",
169+
"moveGuide": "Le bouton de configuration a été déplacé ici",
170+
"plans": "Forfaits d'abonnement",
171+
"profile": "Gestion du compte",
172+
"setting": "Paramètres de l'application",
173+
"usages": "Statistiques d'utilisation"
160174
}
161175
}

locales/it-IT/common.json

+14
Original file line numberDiff line numberDiff line change
@@ -157,5 +157,19 @@
157157
"action": "Aggiorna",
158158
"hasNew": "Nuovo aggiornamento disponibile",
159159
"newVersion": "Nuova versione disponibile: {{version}}"
160+
},
161+
"userPanel": {
162+
"billing": "Gestione fatturazione",
163+
"defaultNickname": "Utente Community",
164+
"discord": "Supporto della community",
165+
"docs": "Documentazione",
166+
"email": "Supporto via email",
167+
"feedback": "Feedback e suggerimenti",
168+
"help": "Centro assistenza",
169+
"moveGuide": "Il pulsante delle impostazioni è stato spostato qui",
170+
"plans": "Piani di abbonamento",
171+
"profile": "Gestione account",
172+
"setting": "Impostazioni app",
173+
"usages": "Statistiche di utilizzo"
160174
}
161175
}

locales/ja-JP/common.json

+14
Original file line numberDiff line numberDiff line change
@@ -157,5 +157,19 @@
157157
"action": "アップグレード",
158158
"hasNew": "利用可能な更新があります",
159159
"newVersion": "新しいバージョンが利用可能です:{{version}}"
160+
},
161+
"userPanel": {
162+
"billing": "請求管理",
163+
"defaultNickname": "コミュニティユーザー",
164+
"discord": "コミュニティサポート",
165+
"docs": "使用文書",
166+
"email": "メールサポート",
167+
"feedback": "フィードバックと提案",
168+
"help": "ヘルプセンター",
169+
"moveGuide": "設定ボタンがこちらに移動しました",
170+
"plans": "サブスクリプションプラン",
171+
"profile": "アカウント管理",
172+
"setting": "アプリ設定",
173+
"usages": "利用量統計"
160174
}
161175
}

locales/ko-KR/common.json

+14
Original file line numberDiff line numberDiff line change
@@ -157,5 +157,19 @@
157157
"action": "업그레이드",
158158
"hasNew": "사용 가능한 업데이트가 있습니다",
159159
"newVersion": "새 버전 사용 가능: {{version}}"
160+
},
161+
"userPanel": {
162+
"billing": "결제 관리",
163+
"defaultNickname": "커뮤니티 사용자",
164+
"discord": "커뮤니티 지원",
165+
"docs": "사용 설명서",
166+
"email": "이메일 지원",
167+
"feedback": "피드백 및 제안",
168+
"help": "도움말 센터",
169+
"moveGuide": "설정 버튼을 여기로 이동했습니다",
170+
"plans": "요금제",
171+
"profile": "계정 관리",
172+
"setting": "앱 설정",
173+
"usages": "사용량 통계"
160174
}
161175
}

locales/nl-NL/common.json

+14
Original file line numberDiff line numberDiff line change
@@ -157,5 +157,19 @@
157157
"action": "升级",
158158
"hasNew": "有可用更新",
159159
"newVersion": "有新版本可用:{{version}}"
160+
},
161+
"userPanel": {
162+
"billing": "账单管理",
163+
"defaultNickname": "Standaardgebruiker",
164+
"discord": "社区支持",
165+
"docs": "使用文档",
166+
"email": "邮件支持",
167+
"feedback": "反馈与建议",
168+
"help": "帮助中心",
169+
"moveGuide": "De instellingenknop is hierheen verplaatst",
170+
"plans": "订阅方案",
171+
"profile": "账户管理",
172+
"setting": "应用设置",
173+
"usages": "用量统计"
160174
}
161175
}

locales/pl-PL/common.json

+14
Original file line numberDiff line numberDiff line change
@@ -157,5 +157,19 @@
157157
"action": "Aktualizuj",
158158
"hasNew": "Dostępna jest nowa aktualizacja",
159159
"newVersion": "Dostępna jest nowa wersja: {{version}}"
160+
},
161+
"userPanel": {
162+
"billing": "Zarządzanie rachunkami",
163+
"defaultNickname": "Użytkownik Wersji Społecznościowej",
164+
"discord": "Wsparcie społeczności",
165+
"docs": "Dokumentacja",
166+
"email": "Wsparcie mailowe",
167+
"feedback": "Opinie i sugestie",
168+
"help": "Centrum pomocy",
169+
"moveGuide": "Przenieś przycisk ustawień tutaj",
170+
"plans": "Plan abonamentu",
171+
"profile": "Zarządzanie kontem",
172+
"setting": "Ustawienia aplikacji",
173+
"usages": "Statystyki użycia"
160174
}
161175
}

locales/pt-BR/common.json

+14
Original file line numberDiff line numberDiff line change
@@ -157,5 +157,19 @@
157157
"action": "Atualizar",
158158
"hasNew": "Nova atualização disponível",
159159
"newVersion": "Nova versão disponível: {{version}}"
160+
},
161+
"userPanel": {
162+
"billing": "Gerenciamento de faturas",
163+
"defaultNickname": "Usuário da Comunidade",
164+
"discord": "Suporte da Comunidade",
165+
"docs": "Documentação",
166+
"email": "Suporte por E-mail",
167+
"feedback": "Feedback e Sugestões",
168+
"help": "Central de Ajuda",
169+
"moveGuide": "O botão de configurações foi movido para cá",
170+
"plans": "Planos de Assinatura",
171+
"profile": "Gerenciamento de Conta",
172+
"setting": "Configurações do Aplicativo",
173+
"usages": "Estatísticas de Uso"
160174
}
161175
}

locales/ru-RU/common.json

+14
Original file line numberDiff line numberDiff line change
@@ -157,5 +157,19 @@
157157
"action": "обновить",
158158
"hasNew": "Доступно обновление",
159159
"newVersion": "Доступна новая версия: {{version}}"
160+
},
161+
"userPanel": {
162+
"billing": "Управление счетами",
163+
"defaultNickname": "Пользователь сообщества",
164+
"discord": "Поддержка сообщества",
165+
"docs": "Документация",
166+
"email": "Поддержка по электронной почте",
167+
"feedback": "Обратная связь и предложения",
168+
"help": "Центр помощи",
169+
"moveGuide": "Кнопка настроек перемещена сюда",
170+
"plans": "Планы подписки",
171+
"profile": "Управление аккаунтом",
172+
"setting": "Настройки приложения",
173+
"usages": "Статистика использования"
160174
}
161175
}

locales/tr-TR/common.json

+14
Original file line numberDiff line numberDiff line change
@@ -157,5 +157,19 @@
157157
"action": "Güncelle",
158158
"hasNew": "Yeni güncelleme mevcut",
159159
"newVersion": "Yeni sürüm mevcut: {{version}}"
160+
},
161+
"userPanel": {
162+
"billing": "Fatura Yönetimi",
163+
"defaultNickname": "Topluluk Kullanıcısı",
164+
"discord": "Topluluk Destek",
165+
"docs": "Belgeler",
166+
"email": "E-posta Destek",
167+
"feedback": "Geribildirim ve Öneriler",
168+
"help": "Yardım Merkezi",
169+
"moveGuide": "Ayarlar düğmesini buraya taşıyın",
170+
"plans": "Planlar",
171+
"profile": "Hesap Yönetimi",
172+
"setting": "Uygulama Ayarları",
173+
"usages": "Kullanım İstatistikleri"
160174
}
161175
}

locales/vi-VN/common.json

+14
Original file line numberDiff line numberDiff line change
@@ -157,5 +157,19 @@
157157
"action": "Nâng cấp",
158158
"hasNew": "Có bản cập nhật mới",
159159
"newVersion": "Có phiên bản mới: {{version}}"
160+
},
161+
"userPanel": {
162+
"billing": "Quản lý hóa đơn",
163+
"defaultNickname": "Người dùng phiên bản cộng đồng",
164+
"discord": "Hỗ trợ cộng đồng",
165+
"docs": "Tài liệu sử dụng",
166+
"email": "Hỗ trợ qua email",
167+
"feedback": "Phản hồi và đề xuất",
168+
"help": "Trung tâm trợ giúp",
169+
"moveGuide": "Đã di chuyển nút cài đặt đến đây",
170+
"plans": "Kế hoạch đăng ký",
171+
"profile": "Quản lý tài khoản",
172+
"setting": "Cài đặt ứng dụng",
173+
"usages": "Thống kê sử dụng"
160174
}
161175
}

locales/zh-CN/common.json

+14
Original file line numberDiff line numberDiff line change
@@ -157,5 +157,19 @@
157157
"action": "升级",
158158
"hasNew": "有可用更新",
159159
"newVersion": "有新版本可用:{{version}}"
160+
},
161+
"userPanel": {
162+
"billing": "账单管理",
163+
"defaultNickname": "社区版用户",
164+
"discord": "社区支持",
165+
"docs": "使用文档",
166+
"email": "邮件支持",
167+
"feedback": "反馈与建议",
168+
"help": "帮助中心",
169+
"moveGuide": "设置按钮搬到这里啦",
170+
"plans": "订阅方案",
171+
"profile": "账户管理",
172+
"setting": "应用设置",
173+
"usages": "用量统计"
160174
}
161175
}

locales/zh-TW/common.json

+14
Original file line numberDiff line numberDiff line change
@@ -157,5 +157,19 @@
157157
"action": "升級",
158158
"hasNew": "有可用更新",
159159
"newVersion": "有新版本可用:{{version}}"
160+
},
161+
"userPanel": {
162+
"billing": "帳單管理",
163+
"defaultNickname": "社群版使用者",
164+
"discord": "社區支援",
165+
"docs": "使用文件",
166+
"email": "郵件支援",
167+
"feedback": "反饋與建議",
168+
"help": "幫助中心",
169+
"moveGuide": "設置按鈕搬到這裡啦",
170+
"plans": "訂閱方案",
171+
"profile": "帳戶管理",
172+
"setting": "應用設定",
173+
"usages": "用量統計"
160174
}
161175
}

next.config.mjs

+7
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,13 @@ const nextConfig = {
3030

3131
output: buildWithDocker ? 'standalone' : undefined,
3232

33+
redirects: async () => [
34+
{
35+
source: '/settings',
36+
permanent: true,
37+
destination: '/settings/common',
38+
},
39+
],
3340
rewrites: async () => [
3441
// due to google api not work correct in some countries
3542
// we need a proxy to bypass the restriction

src/app/(main)/(mobile)/me/page.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { redirect } from 'next/navigation';
22
import { Center } from 'react-layout-kit';
33

44
import BrandWatermark from '@/components/BrandWatermark';
5-
import Avatar from '@/features/AvatarWithUpload';
5+
import UserAvatar from '@/features/User/UserAvatar';
66
import { isMobileDevice } from '@/utils/responsive';
77

88
import AvatarBanner, { AVATAR_SIZE } from './features/AvatarBanner';
@@ -17,7 +17,7 @@ const Page = () => {
1717
return (
1818
<>
1919
<AvatarBanner>
20-
<Avatar size={AVATAR_SIZE} />
20+
<UserAvatar size={AVATAR_SIZE} />
2121
</AvatarBanner>
2222
<Cate />
2323
<ExtraCate />

0 commit comments

Comments
 (0)