From f23dfc727cfc4c7528657019fdbc3bd816093674 Mon Sep 17 00:00:00 2001 From: Ahoo Wang Date: Thu, 18 Apr 2024 21:32:58 +0800 Subject: [PATCH] feat(dashboard): change drawer size --- .../components/authenticated/authenticated.component.ts | 2 +- .../src/app/components/config/config-editor.service.ts | 7 +++---- cosky-dashboard/src/app/components/role/role.component.ts | 2 +- .../src/app/components/service/instance-editor.service.ts | 2 +- cosky-dashboard/src/app/components/user/user.component.ts | 2 +- 5 files changed, 7 insertions(+), 8 deletions(-) diff --git a/cosky-dashboard/src/app/components/authenticated/authenticated.component.ts b/cosky-dashboard/src/app/components/authenticated/authenticated.component.ts index 84c0956a..d72e3dfc 100644 --- a/cosky-dashboard/src/app/components/authenticated/authenticated.component.ts +++ b/cosky-dashboard/src/app/components/authenticated/authenticated.component.ts @@ -47,7 +47,7 @@ export class AuthenticatedComponent implements OnInit { openChangePwd() { const drawerRef = this.drawerService.create({ nzTitle: `Change User:[${this.currentUser.sub}] Password`, - nzWidth: '30%', + nzWidth: '40vw', nzContent: UserChangePwdComponent }); drawerRef.afterOpen.subscribe(() => { diff --git a/cosky-dashboard/src/app/components/config/config-editor.service.ts b/cosky-dashboard/src/app/components/config/config-editor.service.ts index 73de0f7d..1fe39ca4 100644 --- a/cosky-dashboard/src/app/components/config/config-editor.service.ts +++ b/cosky-dashboard/src/app/components/config/config-editor.service.ts @@ -37,7 +37,7 @@ export class ConfigEditorService { } const drawerRef = this.drawerService.create({ nzTitle: editorTitle, - nzWidth: '880px', + nzWidth: '80vw', nzContent: ConfigEditorComponent, nzContentParams: { configId @@ -58,7 +58,7 @@ export class ConfigEditorService { const drawerRef = this.drawerService.create({ nzTitle: editorTitle, - nzWidth: '40%', + nzWidth: '60vw', nzContent: ConfigImporterComponent, nzContentParams: {} }); @@ -75,10 +75,9 @@ export class ConfigEditorService { } openConfigVersionView(configId: string, version: number, rollbackAfter: (result: boolean) => void): void { - const drawerRef = this.drawerService.create({ nzTitle: `Config [${configId}] Version [${version}]`, - nzWidth: '960px', + nzWidth: '80vw', nzContent: ConfigVersionComponent, nzContentParams: { configId, diff --git a/cosky-dashboard/src/app/components/role/role.component.ts b/cosky-dashboard/src/app/components/role/role.component.ts index 71ea0d3a..96e3785d 100644 --- a/cosky-dashboard/src/app/components/role/role.component.ts +++ b/cosky-dashboard/src/app/components/role/role.component.ts @@ -53,7 +53,7 @@ export class RoleComponent implements OnInit { const title = role ? `Edit Role [${role.name}]` : 'Add Role'; const drawerRef = this.drawerService.create({ nzTitle: title, - nzWidth: '40%', + nzWidth: '60vw', nzContent: RoleEditorComponent, nzContentParams: { role diff --git a/cosky-dashboard/src/app/components/service/instance-editor.service.ts b/cosky-dashboard/src/app/components/service/instance-editor.service.ts index e05832fa..1cfe5b4a 100644 --- a/cosky-dashboard/src/app/components/service/instance-editor.service.ts +++ b/cosky-dashboard/src/app/components/service/instance-editor.service.ts @@ -40,7 +40,7 @@ export class InstanceEditorService { const drawerRef = this.drawerService.create({ nzTitle: `Managing service[${serviceId}] instances`, - nzWidth: '660px', + nzWidth: '60vw', nzContent: InstanceEditorComponent, nzContentParams: { instance: editInstance diff --git a/cosky-dashboard/src/app/components/user/user.component.ts b/cosky-dashboard/src/app/components/user/user.component.ts index b61e1d63..73d59fe9 100644 --- a/cosky-dashboard/src/app/components/user/user.component.ts +++ b/cosky-dashboard/src/app/components/user/user.component.ts @@ -61,7 +61,7 @@ export class UserComponent implements OnInit { const drawerRef = this.drawerService.create({ nzTitle: "Add User", - nzWidth: '40%', + nzWidth: '60vw', nzContent: UserAddComponent }); drawerRef.afterOpen.subscribe(() => {