Skip to content

Commit 20c7544

Browse files
zjy365xudaotutouHUAHUAI23
authored
feat(desktop): Introduce new console and user onboarding guide (labring#5643)
* update desktop * update * update apps * update appdock * update * update api * update theme * update style * update svg * update notification * update * Onboarding (labring#80) * Update RechargeModal to simplify bonus display and fix .gitignore * refactor: sign in/up backend * Update translation keys and remove unnecessary dependencies * add desktop guide * update onboarding * update style * add logos * update v2.json * Update RechargeModal to simplify bonus display and fix .gitignore (labring#83) refactor: sign in/up backend Update translation keys and remove unnecessary dependencies Refactor PhoneCheck and Sign components Update PhoneCheck.tsx to streamline phone verification flow and improve state management. Refactor Sign.tsx to handle different sign-in methods based on layout configuration. Add version field to LayoutConfigType in system.ts to support locale-specific configurations. * disable devbox draggable * sort apps * fix type * update launchpad guide * update launchpad * launchpad onboarding done * db onboarding done * update template * add devbox guide * template done * update lock * Improve Captcha and verification code handling (labring#84) * Update countdown display in PhoneCheck component Improve the user experience by showing a dynamic countdown when a new link can be requested. The countdown updates every second, enhancing clarity and responsiveness. * onboarding for usw add cloudflare * devbox done * desktop done * fix detail * Update countdown display in PhoneCheck component Improve the user experience by showing a dynamic countdown when a new link can be requested. The countdown updates every second, enhancing clarity and responsiveness. onboarding for usw add cloudflare Refactor EmailCheck and update signup store Update EmailCheck.tsx to improve token handling and error recovery. Refactor signup store to manage startTime more robustly. Add brand-specific meta tags to _document.tsx. * update guide * Update user guide for applaunchpad, dbprovider, and devbox Improve user guide for applaunchpad, dbprovider, and devbox providers. Update driver configurations and add new steps for better user experience. Update guide messages and images for consistency. Update stores and hooks for managing guide state. Add new components and pages for guiding users through the application creation and deployment process. Update dependencies and configuration files for compatibility. Update locales for translations. * update initGuide * fix: input * fix guide * fix onboarding style * fix desktop onboarding * Remove debug log from genResAuthClientConfig function (labring#88) * update json * fix * Refactor EmailCheck component to handle token generation Improve token handling and error management in the EmailCheck component. Remove redundant console logs and ensure proper cleanup on error. * fix template * fix: promise * Optimize region authentication and workspace usage handling - Refactor condition checks for user workspace flush - Update logic to handle workspace creation based on region usage - Add error handling for workspaceUid mismatch in private relations * fix devbox guide * fix devbox IDEButton * fix app detail * update pb * Add switch region initialization logic Handle INIT switch region type by validating workspace name and calling initRegionToken Remove commented out code for old region switching logic * fix: workspaceuage block sign * update region * fix base64 * update desktop id * update db Forbidden * fix detail * fix devbpx layout * fix devbox * update db css * chore * update WorkspaceToggle * fix launchpad * fix template * update guide * fix template * update app pb * update * delete logos * fix ci --------- Co-authored-by: xudaotutou <71751336+xudaotutou@users.noreply.github.com> Co-authored-by: xudaotutou <leiyikai788@gmail.com> Co-authored-by: lim <huahua1319873800@outlook.com>
1 parent bf1eb39 commit 20c7544

289 files changed

Lines changed: 12078 additions & 4658 deletions

File tree

Some content is hidden

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

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,5 @@ pkg/registry/save/testdata/registry
2323
deploy/cloud/tars
2424
.vscode/
2525
/lifecycle/tools/
26+
27+
**.env*

frontend/desktop/.vscode/settings.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
"i18n-ally.keystyle": "nested",
1212
"i18n-ally.sortKeys": true,
1313
"i18n-ally.keepFulfilled": false,
14-
"i18n-ally.sourceLanguage": "zh",
15-
"i18n-ally.displayLanguage": "zh",
14+
"i18n-ally.sourceLanguage": "en",
15+
"i18n-ally.displayLanguage": "en",
1616
"i18n-ally.namespace": true,
1717
"i18n-ally.pathMatcher": "{locale}/{namespaces}.json",
1818
"i18n-ally.extract.targetPickingStrategy": "most-similar-by-key",

frontend/desktop/deploy/README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,15 @@ sealos build -t docker.io/labring/sealos-cloud-desktop:latest -f Kubefile .
66

77
### Env
88

9-
| Name | Description | Default |
10-
|----------------------------|-----------------------------|--------------------|
11-
| `cloudDomain` | sealos cloud domain | `127.0.0.1.nip.io` |
12-
| `wildcardCertSecretName` | wildcard cert secret name | `wildcard-cert` |
9+
| Name | Description | Default |
10+
| ------------------------ | ------------------------- | ------------------ |
11+
| `cloudDomain` | sealos cloud domain | `127.0.0.1.nip.io` |
12+
| `wildcardCertSecretName` | wildcard cert secret name | `wildcard-cert` |
1313

1414
### Config
1515

1616
Here is a config file example:
17+
1718
```yaml
1819
# desktop-config.yaml
1920
apiVersion: apps.sealos.io/v1beta1
@@ -49,7 +50,7 @@ spec:
4950
layout:
5051
title: "Sealos Cloud"
5152
logo: "/logo.png"
52-
backgroundImage: "/images/bg-blue.svg"
53+
backgroundImage: "/images/bg-light.svg"
5354
meta:
5455
title: "Sealos Cloud"
5556
description: "Sealos Cloud"
@@ -76,7 +77,6 @@ spec:
7677
password:
7778
enabled: "true"
7879
salt: "thisispasswordsalt"
79-
8080
```
8181
8282
### How to run
@@ -86,5 +86,5 @@ sealos run \
8686
--env cloudDomain="127.0.0.1.nip.io" \
8787
--env wildcardCertSecretName="wildcard-cert" \
8888
docker.io/labring/sealos-cloud-desktop:latest \
89-
--config-file desktop-config.yaml
89+
--config-file desktop-config.yaml
9090
```

frontend/desktop/deploy/manifests/configmap.yaml.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ data:
2323
layout:
2424
title: "Sealos Cloud"
2525
logo: "/logo.svg"
26-
backgroundImage: "/images/bg-blue.svg"
26+
backgroundImage: "/images/bg-light.svg"
2727
meta:
2828
title: "Sealos Cloud"
2929
description: "Sealos Cloud"

frontend/desktop/package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,13 @@
3838
"@tanstack/react-query": "^4.35.3",
3939
"@umami/node": "^0.4.0",
4040
"axios": "^1.5.1",
41+
"boring-avatars": "^1.11.2",
4142
"clsx": "^1.2.1",
4243
"cors": "^2.8.5",
4344
"croner": "^8.0.2",
4445
"dayjs": "^1.11.10",
4546
"decimal.js": "^10.4.3",
47+
"disposable-email-domains-js": "^1.11.0",
4648
"eslint": "8.38.0",
4749
"eslint-config-next": "13.3.0",
4850
"framer-motion": "^10.16.4",
@@ -53,6 +55,7 @@
5355
"jsonwebtoken": "^9.0.2",
5456
"jwt-decode": "^4.0.0",
5557
"lodash": "^4.17.21",
58+
"lucide-react": "^0.488.0",
5659
"minio": "^7.1.3",
5760
"mongodb": "^5.9.0",
5861
"nanoid": "^4.0.2",
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
-- CreateTable
2+
CREATE TABLE "user_info" (
3+
"id" UUID NOT NULL DEFAULT gen_random_uuid(),
4+
"user_uid" UUID NOT NULL,
5+
"sign_up_region_uid" UUID NOT NULL,
6+
"is_inited" BOOL NOT NULL DEFAULT false,
7+
"config" JSONB,
8+
9+
CONSTRAINT "user_info_pkey" PRIMARY KEY ("id")
10+
);
11+
12+
-- CreateTable
13+
CREATE TABLE "workspace_usage" (
14+
"id" UUID NOT NULL DEFAULT gen_random_uuid(),
15+
"user_uid" UUID NOT NULL,
16+
"workspace_uid" UUID NOT NULL,
17+
"region_uid" UUID NOT NULL,
18+
"seat" INT4 NOT NULL,
19+
"created_at" TIMESTAMPTZ(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
20+
"updated_at" TIMESTAMPTZ(3) NOT NULL,
21+
22+
CONSTRAINT "workspace_usage_pkey" PRIMARY KEY ("id")
23+
);
24+
25+
-- CreateIndex
26+
CREATE UNIQUE INDEX "user_info_user_uid_key" ON "user_info"("user_uid");
27+
28+
-- CreateIndex
29+
CREATE INDEX "workspace_usage_user_uid_idx" ON "workspace_usage"("user_uid");
30+
31+
-- CreateIndex
32+
CREATE UNIQUE INDEX "workspace_usage_region_uid_user_uid_workspace_uid_key" ON "workspace_usage"("region_uid", "user_uid", "workspace_uid");

frontend/desktop/prisma/global/schema.prisma

Lines changed: 38 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,13 @@ model OauthProvider {
2525
}
2626

2727
model Region {
28-
uid String @id @default(dbgenerated("gen_random_uuid()")) @db.Uuid
29-
displayName String
30-
location String
31-
domain String
32-
description String?
33-
txDetail TransactionDetail[]
28+
uid String @id @default(dbgenerated("gen_random_uuid()")) @db.Uuid
29+
displayName String
30+
location String
31+
domain String
32+
description String?
33+
txDetail TransactionDetail[]
34+
WorkspaceUsage WorkspaceUsage[]
3435
}
3536

3637
model Account {
@@ -59,6 +60,34 @@ model AccountTransaction {
5960
billing_id String @db.Uuid
6061
}
6162

63+
model UserInfo {
64+
id String @id @default(dbgenerated("gen_random_uuid()")) @db.Uuid
65+
userUid String @unique @map("user_uid") @db.Uuid
66+
signUpRegionUid String @map("sign_up_region_uid") @db.Uuid
67+
isInited Boolean @default(false) @map("is_inited")
68+
// verify_email Boolean @default(false)
69+
config Json?
70+
user User @relation(fields: [userUid], references: [uid])
71+
72+
@@map("user_info")
73+
}
74+
75+
model WorkspaceUsage {
76+
id String @id @default(dbgenerated("gen_random_uuid()")) @db.Uuid
77+
userUid String @map("user_uid") @db.Uuid
78+
workspaceUid String @map("workspace_uid") @db.Uuid
79+
regionUid String @map("region_uid") @db.Uuid
80+
seat Int
81+
createdAt DateTime @default(now()) @map("created_at") @db.Timestamptz(3)
82+
updatedAt DateTime @updatedAt @map("updated_at") @db.Timestamptz(3)
83+
region Region @relation(fields: [regionUid], references: [uid])
84+
user User @relation(fields: [userUid], references: [uid])
85+
86+
@@unique([regionUid, userUid, workspaceUid])
87+
@@index([userUid])
88+
@@map("workspace_usage")
89+
}
90+
6291
model ErrorPaymentCreate {
6392
userUid String @db.Uuid
6493
regionUid String @db.Uuid
@@ -106,6 +135,8 @@ model User {
106135
DeleteUserTransactionInfo DeleteUserTransactionInfo?
107136
deleteUserLog DeleteUserLog?
108137
userTasks UserTask[]
138+
userInfo UserInfo?
139+
WorkspaceUsage WorkspaceUsage[]
109140
}
110141

111142
model Transfer {
@@ -219,7 +250,7 @@ model EventLog {
219250
createdAt DateTime @default(now()) @db.Timestamptz(3)
220251
mainId String
221252
eventName String
222-
// json
253+
// json
223254
data String
224255
}
225256

Lines changed: 165 additions & 6 deletions
Loading

0 commit comments

Comments
 (0)