Skip to content

Commit

Permalink
feat: migrate user credential list to react component
Browse files Browse the repository at this point in the history
  • Loading branch information
ironAiken2 committed Dec 12, 2024
1 parent 261b005 commit 7cc2e99
Show file tree
Hide file tree
Showing 24 changed files with 535 additions and 28 deletions.
489 changes: 489 additions & 0 deletions react/src/components/UserCredentialList.tsx

Large diffs are not rendered by default.

7 changes: 4 additions & 3 deletions react/src/pages/UserCredentialsPage.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import BAICard from '../BAICard';
import Flex from '../components/Flex';
import FlexActivityIndicator from '../components/FlexActivityIndicator';
import UserList from '../components/UserList';
import UserCredentialList from '../components/UserCredentialList';
import UserNodeList from '../components/UserNodeList';
import { createStyles } from 'antd-style';
import { CardTabListType } from 'antd/es/card';
Expand Down Expand Up @@ -55,8 +55,9 @@ const UserCredentialsPage: React.FC = () => {
</Flex>
)}
{curTabKey === 'credentials' && (
// @ts-expect-error
<backend-ai-credential-view active />
<Flex direction="column" align="stretch">
<UserCredentialList />
</Flex>
)}
</Suspense>
</BAICard>
Expand Down
3 changes: 2 additions & 1 deletion resources/i18n/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -611,7 +611,8 @@
"MainAccessKey": "Hauptzugangsschlüssel",
"InactivateTheFollowingUsers": "Deaktivieren Sie die folgenden Benutzer.",
"CreatedAt": "Erstellt am",
"SignoutSuccessfullyFinished": "Die Abmeldung ist erfolgreich abgeschlossen"
"SignoutSuccessfullyFinished": "Die Abmeldung ist erfolgreich abgeschlossen",
"AccessKey": "Zugriffsschlüssel"
},
"data": {
"Folders": "Ordner",
Expand Down
3 changes: 2 additions & 1 deletion resources/i18n/el.json
Original file line number Diff line number Diff line change
Expand Up @@ -611,7 +611,8 @@
"MainAccessKey": "Κύριο κλειδί πρόσβασης",
"InactivateTheFollowingUsers": "Απενεργοποιήστε τους παρακάτω χρήστες.",
"CreatedAt": "Δημιουργήθηκε στο",
"SignoutSuccessfullyFinished": "Η αποσύνδεση ολοκληρώθηκε επιτυχώς"
"SignoutSuccessfullyFinished": "Η αποσύνδεση ολοκληρώθηκε επιτυχώς",
"AccessKey": "Κλειδί πρόσβασης"
},
"data": {
"Folders": "Φάκελοι",
Expand Down
3 changes: 2 additions & 1 deletion resources/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -738,7 +738,8 @@
"MainAccessKey": "Main Access Key",
"InactivateTheFollowingUsers": "Inactivate the following users.",
"CreatedAt": "Created At",
"SignoutSuccessfullyFinished": "Signout is seccessfully finished"
"SignoutSuccessfullyFinished": "Signout is seccessfully finished",
"AccessKey": "Access Key"
},
"data": {
"Folders": "Folders",
Expand Down
3 changes: 2 additions & 1 deletion resources/i18n/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,8 @@
"MainAccessKey": "Clave de acceso principal",
"InactivateTheFollowingUsers": "Desactivar los siguientes usuarios.",
"CreatedAt": "Creado en",
"SignoutSuccessfullyFinished": "El proceso de registro ha finalizado"
"SignoutSuccessfullyFinished": "El proceso de registro ha finalizado",
"AccessKey": "Clave de acceso"
},
"data": {
"Allowslettersnumbersand-_": "Permite letras, números y -_",
Expand Down
3 changes: 2 additions & 1 deletion resources/i18n/fi.json
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,8 @@
"MainAccessKey": "Pääkäyttöavain",
"InactivateTheFollowingUsers": "Poista seuraavat käyttäjät käytöstä.",
"CreatedAt": "Luotu klo",
"SignoutSuccessfullyFinished": "Uloskirjautuminen on päättynyt hetkessä"
"SignoutSuccessfullyFinished": "Uloskirjautuminen on päättynyt hetkessä",
"AccessKey": "Pääsyavain"
},
"data": {
"Allowslettersnumbersand-_": "Sallii kirjaimet, numerot ja -_",
Expand Down
3 changes: 2 additions & 1 deletion resources/i18n/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -611,7 +611,8 @@
"MainAccessKey": "Clé d'accès principale",
"InactivateTheFollowingUsers": "Désactivez les utilisateurs suivants.",
"CreatedAt": "Créé à",
"SignoutSuccessfullyFinished": "La signature est terminée en toute sécurité"
"SignoutSuccessfullyFinished": "La signature est terminée en toute sécurité",
"AccessKey": "Clé d'accès"
},
"data": {
"Folders": "Dossiers",
Expand Down
3 changes: 2 additions & 1 deletion resources/i18n/id.json
Original file line number Diff line number Diff line change
Expand Up @@ -612,7 +612,8 @@
"MainAccessKey": "Kunci Akses Utama",
"InactivateTheFollowingUsers": "Nonaktifkan pengguna berikut.",
"CreatedAt": "Dibuat Pada",
"SignoutSuccessfullyFinished": "Keluar dengan aman selesai"
"SignoutSuccessfullyFinished": "Keluar dengan aman selesai",
"AccessKey": "Kunci Akses"
},
"data": {
"Folders": "Folder",
Expand Down
3 changes: 2 additions & 1 deletion resources/i18n/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -612,7 +612,8 @@
"MainAccessKey": "Chiave di accesso principale",
"InactivateTheFollowingUsers": "Disattiva i seguenti utenti.",
"CreatedAt": "Creato a",
"SignoutSuccessfullyFinished": "Il signout è terminato in modo sicuro"
"SignoutSuccessfullyFinished": "Il signout è terminato in modo sicuro",
"AccessKey": "Chiave di accesso"
},
"data": {
"Folders": "cartelle",
Expand Down
3 changes: 2 additions & 1 deletion resources/i18n/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -611,7 +611,8 @@
"MainAccessKey": "メインアクセスキー",
"InactivateTheFollowingUsers": "以下のユーザーを無効化します。",
"CreatedAt": "作成日",
"SignoutSuccessfullyFinished": "ユーザーアカウントが正常に削除されました。"
"SignoutSuccessfullyFinished": "ユーザーアカウントが正常に削除されました。",
"AccessKey": "アクセスキー"
},
"data": {
"Folders": "フォルダー",
Expand Down
3 changes: 2 additions & 1 deletion resources/i18n/ko.json
Original file line number Diff line number Diff line change
Expand Up @@ -726,7 +726,8 @@
"MainAccessKey": "기본 액세스 키",
"InactivateTheFollowingUsers": "다음 사용자를 비활성화합니다.",
"CreatedAt": "생성 날짜",
"SignoutSuccessfullyFinished": "사용자 계정이 성공적으로 삭제되었습니다."
"SignoutSuccessfullyFinished": "사용자 계정이 성공적으로 삭제되었습니다.",
"AccessKey": "접근키"
},
"data": {
"Folders": "폴더",
Expand Down
3 changes: 2 additions & 1 deletion resources/i18n/mn.json
Original file line number Diff line number Diff line change
Expand Up @@ -613,7 +613,8 @@
"MainAccessKey": "Үндсэн хандалтын түлхүүр",
"InactivateTheFollowingUsers": "Дараах хэрэглэгчдийг идэвхгүй болго.",
"CreatedAt": "Үүсгэсэн",
"SignoutSuccessfullyFinished": "Гарах ажиллагаа амжилттай дууслаа"
"SignoutSuccessfullyFinished": "Гарах ажиллагаа амжилттай дууслаа",
"AccessKey": "Хандалтын түлхүүр"
},
"data": {
"Folders": "Фолдерууд",
Expand Down
3 changes: 2 additions & 1 deletion resources/i18n/ms.json
Original file line number Diff line number Diff line change
Expand Up @@ -611,7 +611,8 @@
"MainAccessKey": "Kunci Akses Utama",
"InactivateTheFollowingUsers": "Nyahaktifkan pengguna berikut.",
"CreatedAt": "Dicipta Pada",
"SignoutSuccessfullyFinished": "Log keluar telah selesai dengan selamat"
"SignoutSuccessfullyFinished": "Log keluar telah selesai dengan selamat",
"AccessKey": "Kunci Akses"
},
"data": {
"Folders": "Folder",
Expand Down
3 changes: 2 additions & 1 deletion resources/i18n/pl.json
Original file line number Diff line number Diff line change
Expand Up @@ -611,7 +611,8 @@
"MainAccessKey": "Główny klucz dostępu",
"InactivateTheFollowingUsers": "Dezaktywuj następujących użytkowników.",
"CreatedAt": "Utworzono o godz",
"SignoutSuccessfullyFinished": "Wylogowanie zostało pomyślnie zakończone"
"SignoutSuccessfullyFinished": "Wylogowanie zostało pomyślnie zakończone",
"AccessKey": "Klucz dostępu"
},
"data": {
"Folders": "Lornetka składana",
Expand Down
3 changes: 2 additions & 1 deletion resources/i18n/pt-BR.json
Original file line number Diff line number Diff line change
Expand Up @@ -611,7 +611,8 @@
"MainAccessKey": "Chave de acesso principal",
"InactivateTheFollowingUsers": "Inative os seguintes usuários.",
"CreatedAt": "Criado em",
"SignoutSuccessfullyFinished": "O registo foi concluído com êxito"
"SignoutSuccessfullyFinished": "O registo foi concluído com êxito",
"AccessKey": "Chave de acesso"
},
"data": {
"Folders": "Pastas",
Expand Down
3 changes: 2 additions & 1 deletion resources/i18n/pt.json
Original file line number Diff line number Diff line change
Expand Up @@ -611,7 +611,8 @@
"MainAccessKey": "Chave de acesso principal",
"InactivateTheFollowingUsers": "Inative os seguintes usuários.",
"CreatedAt": "Criado em",
"SignoutSuccessfullyFinished": "O registo foi concluído com êxito"
"SignoutSuccessfullyFinished": "O registo foi concluído com êxito",
"AccessKey": "Chave de acesso"
},
"data": {
"Folders": "Pastas",
Expand Down
3 changes: 2 additions & 1 deletion resources/i18n/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -611,7 +611,8 @@
"MainAccessKey": "Главный ключ доступа",
"InactivateTheFollowingUsers": "Деактивируйте следующих пользователей.",
"CreatedAt": "Создано в",
"SignoutSuccessfullyFinished": "Выход из системы завершен"
"SignoutSuccessfullyFinished": "Выход из системы завершен",
"AccessKey": "Ключ доступа"
},
"data": {
"Folders": "Папки",
Expand Down
3 changes: 2 additions & 1 deletion resources/i18n/th.json
Original file line number Diff line number Diff line change
Expand Up @@ -734,7 +734,8 @@
"MainAccessKey": "คีย์การเข้าถึงหลัก",
"InactivateTheFollowingUsers": "ปิดการใช้งานผู้ใช้ต่อไปนี้",
"CreatedAt": "สร้างเมื่อ",
"SignoutSuccessfullyFinished": "ออกจากระบบสำเร็จแล้ว"
"SignoutSuccessfullyFinished": "ออกจากระบบสำเร็จแล้ว",
"AccessKey": "คีย์การเข้าถึง"
},
"data": {
"Folders": "โฟลเดอร์",
Expand Down
3 changes: 2 additions & 1 deletion resources/i18n/tr.json
Original file line number Diff line number Diff line change
Expand Up @@ -610,7 +610,8 @@
"MainAccessKey": "Ana Erişim Anahtarı",
"InactivateTheFollowingUsers": "Aşağıdaki kullanıcıları devre dışı bırakın.",
"CreatedAt": "Oluşturulma Tarihi",
"SignoutSuccessfullyFinished": "Çıkış işlemi başarıyla tamamlandı"
"SignoutSuccessfullyFinished": "Çıkış işlemi başarıyla tamamlandı",
"AccessKey": "Erişim Anahtarı"
},
"data": {
"Folders": "klasörler",
Expand Down
3 changes: 2 additions & 1 deletion resources/i18n/vi.json
Original file line number Diff line number Diff line change
Expand Up @@ -611,7 +611,8 @@
"MainAccessKey": "Khóa truy cập chính",
"InactivateTheFollowingUsers": "Vô hiệu hóa những người dùng sau.",
"CreatedAt": "Được tạo tại",
"SignoutSuccessfullyFinished": "Đăng xuất đã hoàn tất thành công"
"SignoutSuccessfullyFinished": "Đăng xuất đã hoàn tất thành công",
"AccessKey": "Khóa truy cập"
},
"data": {
"Folders": "Thư mục",
Expand Down
3 changes: 2 additions & 1 deletion resources/i18n/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -611,7 +611,8 @@
"MainAccessKey": "主访问密钥",
"InactivateTheFollowingUsers": "停用以下用户。",
"CreatedAt": "创建于",
"SignoutSuccessfullyFinished": "签出已顺利完成"
"SignoutSuccessfullyFinished": "签出已顺利完成",
"AccessKey": "访问密钥"
},
"data": {
"Folders": "文件夹",
Expand Down
3 changes: 2 additions & 1 deletion resources/i18n/zh-TW.json
Original file line number Diff line number Diff line change
Expand Up @@ -611,7 +611,8 @@
"MainAccessKey": "主存取密鑰",
"InactivateTheFollowingUsers": "停用以下用户。",
"CreatedAt": "創建於",
"SignoutSuccessfullyFinished": "签出已顺利完成"
"SignoutSuccessfullyFinished": "签出已顺利完成",
"AccessKey": "存取密鑰"
},
"data": {
"Folders": "文件夾",
Expand Down
4 changes: 0 additions & 4 deletions src/backend-ai-app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,6 @@ const loadPage =
case 'storage-settings':
import('./components/backend-ai-storage-host-settings-view.js');
break;
case 'credential':
case 'user':
import('./components/backend-ai-credential-view.js');
break;
case 'settings':
import('./components/backend-ai-settings-view.js');
break;
Expand Down

0 comments on commit 7cc2e99

Please sign in to comment.