Skip to content

Commit 87832e2

Browse files
committed
Update Dialog panel class
1 parent a24a0ec commit 87832e2

File tree

16 files changed

+57
-50
lines changed

16 files changed

+57
-50
lines changed

src/app/features/admin/spaces/spaces.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ export class SpacesComponent implements OnInit {
5656
openAddDialog(): void {
5757
this.dialog
5858
.open<SpaceDialogComponent, SpaceDialogModel, SpaceDialogModel>(SpaceDialogComponent, {
59-
width: '500px',
59+
panelClass: 'sm',
6060
data: {
6161
name: '',
6262
},
@@ -80,7 +80,7 @@ export class SpacesComponent implements OnInit {
8080
openEditDialog(element: Space): void {
8181
this.dialog
8282
.open<SpaceDialogComponent, SpaceDialogModel, SpaceDialogModel>(SpaceDialogComponent, {
83-
width: '500px',
83+
panelClass: 'sm',
8484
data: {
8585
name: element.name,
8686
},

src/app/features/admin/users/users.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ export class UsersComponent implements OnInit {
7575
inviteDialog(): void {
7676
this.dialog
7777
.open<UserInviteDialogComponent, void, UserInviteDialogResponse>(UserInviteDialogComponent, {
78-
width: '500px',
78+
panelClass: 'sm',
7979
})
8080
.afterClosed()
8181
.pipe(
@@ -95,7 +95,7 @@ export class UsersComponent implements OnInit {
9595
editDialog(element: User): void {
9696
this.dialog
9797
.open<UserDialogComponent, UserDialogModel, UserDialogModel>(UserDialogComponent, {
98-
width: '500px',
98+
panelClass: 'sm',
9999
data: {
100100
role: element.role,
101101
permissions: element.permissions,

src/app/features/features.component.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -168,10 +168,7 @@ export class FeaturesComponent implements OnInit {
168168

169169
showReleases() {
170170
this.dialog.open<ReleasesDialogComponent, ReleasesDialogModel, void>(ReleasesDialogComponent, {
171-
minWidth: '900px',
172-
width: 'calc(100vw - 160px)',
173-
maxWidth: '1280px',
174-
maxHeight: 'calc(100vh - 80px)',
171+
panelClass: 'xl',
175172
data: {
176173
version: this.version,
177174
releases: this.releases,

src/app/features/me/me.component.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export class MeComponent {
2929
openEditDialog(): void {
3030
this.dialog
3131
.open<MeDialogComponent, MeDialogModel, MeDialogModel>(MeDialogComponent, {
32-
width: '500px',
32+
panelClass: 'sm',
3333
data: {
3434
displayName: this.userStore.displayName() || undefined,
3535
photoURL: this.userStore.photoURL() || undefined,
@@ -57,7 +57,7 @@ export class MeComponent {
5757
openUpdateEmailDialog(): void {
5858
this.dialog
5959
.open<MeEmailDialogComponent, void, MeEmailDialogModel>(MeEmailDialogComponent, {
60-
width: '500px',
60+
panelClass: 'sm',
6161
})
6262
.afterClosed()
6363
.pipe(
@@ -78,7 +78,7 @@ export class MeComponent {
7878
openUpdatePasswordDialog(): void {
7979
this.dialog
8080
.open<MePasswordDialogComponent, void, MePasswordDialogModel>(MePasswordDialogComponent, {
81-
width: '500px',
81+
panelClass: 'sm',
8282
})
8383
.afterClosed()
8484
.pipe(

src/app/features/spaces/assets/assets.component.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ export class AssetsComponent implements OnInit {
123123
openAddFolderDialog(): void {
124124
this.dialog
125125
.open<AddFolderDialogComponent, AddFolderDialogModel, AssetFolderCreate>(AddFolderDialogComponent, {
126-
width: '500px',
126+
panelClass: 'sm',
127127
data: {
128128
reservedNames: this.assets.map(it => it.name),
129129
},
@@ -157,7 +157,7 @@ export class AssetsComponent implements OnInit {
157157
event.stopImmediatePropagation();
158158
this.dialog
159159
.open<EditFolderDialogComponent, EditFolderDialogModel, AssetFolderUpdate>(EditFolderDialogComponent, {
160-
width: '500px',
160+
panelClass: 'sm',
161161
data: {
162162
reservedNames: this.assets.map(it => it.name),
163163
asset: ObjectUtils.clone(element),
@@ -186,7 +186,7 @@ export class AssetsComponent implements OnInit {
186186
event.stopImmediatePropagation();
187187
this.dialog
188188
.open<EditFileDialogComponent, EditFileDialogModel, AssetFileUpdate>(EditFileDialogComponent, {
189-
width: '500px',
189+
panelClass: 'sm',
190190
data: {
191191
reservedNames: this.assets.map(it => it.name),
192192
asset: ObjectUtils.clone(element),
@@ -254,7 +254,7 @@ export class AssetsComponent implements OnInit {
254254
event.stopImmediatePropagation();
255255
this.dialog
256256
.open<MoveDialogComponent, MoveDialogModel, MoveDialogReturn>(MoveDialogComponent, {
257-
width: '500px',
257+
panelClass: 'sm',
258258
data: {
259259
spaceId: this.spaceId(),
260260
},
@@ -342,7 +342,7 @@ export class AssetsComponent implements OnInit {
342342
openImportDialog() {
343343
this.dialog
344344
.open<ImportDialogComponent, void, ImportDialogReturn>(ImportDialogComponent, {
345-
width: '500px',
345+
panelClass: 'sm',
346346
})
347347
.afterClosed()
348348
.pipe(
@@ -368,7 +368,7 @@ export class AssetsComponent implements OnInit {
368368
openExportDialog() {
369369
this.dialog
370370
.open<ExportDialogComponent, ExportDialogModel, ExportDialogReturn>(ExportDialogComponent, {
371-
width: '500px',
371+
panelClass: 'sm',
372372
data: {
373373
spaceId: this.spaceId(),
374374
},

src/app/features/spaces/contents/contents.component.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ export class ContentsComponent {
107107
openAddDocumentDialog(): void {
108108
this.dialog
109109
.open<AddDocumentDialogComponent, AddDocumentDialogModel, ContentDocumentCreate>(AddDocumentDialogComponent, {
110-
width: '500px',
110+
panelClass: 'sm',
111111
data: {
112112
schemas: this.schemas,
113113
reservedNames: this.contents.map(it => it.name),
@@ -132,7 +132,7 @@ export class ContentsComponent {
132132
openAddFolderDialog(): void {
133133
this.dialog
134134
.open<AddFolderDialogComponent, AddFolderDialogModel, ContentFolderCreate>(AddFolderDialogComponent, {
135-
width: '500px',
135+
panelClass: 'sm',
136136
data: {
137137
reservedNames: this.contents.map(it => it.name),
138138
reservedSlugs: this.contents.map(it => it.slug),
@@ -159,7 +159,7 @@ export class ContentsComponent {
159159
event.stopImmediatePropagation();
160160
this.dialog
161161
.open<EditDialogComponent, EditDialogModel, ContentUpdate>(EditDialogComponent, {
162-
width: '500px',
162+
panelClass: 'sm',
163163
data: {
164164
content: ObjectUtils.clone(element),
165165
reservedNames: this.contents.map(it => it.name),
@@ -227,7 +227,7 @@ export class ContentsComponent {
227227
event.stopImmediatePropagation();
228228
this.dialog
229229
.open<MoveDialogComponent, MoveDialogModel, MoveDialogReturn>(MoveDialogComponent, {
230-
width: '500px',
230+
panelClass: 'sm',
231231
data: {
232232
spaceId: this.spaceId(),
233233
},
@@ -345,7 +345,7 @@ export class ContentsComponent {
345345
openImportDialog() {
346346
this.dialog
347347
.open<ImportDialogComponent, void, ImportDialogReturn>(ImportDialogComponent, {
348-
width: '500px',
348+
panelClass: 'sm',
349349
})
350350
.afterClosed()
351351
.pipe(
@@ -371,7 +371,7 @@ export class ContentsComponent {
371371
openExportDialog() {
372372
this.dialog
373373
.open<ExportDialogComponent, ExportDialogModel, ExportDialogReturn>(ExportDialogComponent, {
374-
width: '500px',
374+
panelClass: 'sm',
375375
data: {
376376
spaceId: this.spaceId(),
377377
},

src/app/features/spaces/contents/shared/asset-select/asset-select.component.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,7 @@ export class AssetSelectComponent implements OnInit {
5555
openAssetSelectDialog(): void {
5656
this.dialog
5757
.open<AssetsSelectDialogComponent, AssetsSelectDialogModel, Asset[] | undefined>(AssetsSelectDialogComponent, {
58-
minWidth: '900px',
59-
width: 'calc(100vw - 160px)',
60-
maxWidth: '1280px',
61-
maxHeight: 'calc(100vh - 80px)',
58+
panelClass: 'xl',
6259
data: {
6360
spaceId: this.space().id,
6461
multiple: false,

src/app/features/spaces/contents/shared/assets-select/assets-select.component.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,7 @@ export class AssetsSelectComponent implements OnInit {
6464
openAssetSelectDialog(): void {
6565
this.dialog
6666
.open<AssetsSelectDialogComponent, AssetsSelectDialogModel, AssetFile[] | undefined>(AssetsSelectDialogComponent, {
67-
minWidth: '900px',
68-
width: 'calc(100vw - 160px)',
69-
maxWidth: '1280px',
70-
maxHeight: 'calc(100vh - 80px)',
67+
panelClass: 'xl',
7168
data: {
7269
spaceId: this.space().id,
7370
multiple: true,

src/app/features/spaces/contents/shared/reference-select/reference-select.component.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,7 @@ export class ReferenceSelectComponent implements OnInit {
5555
openReferenceSelectDialog(): void {
5656
this.dialog
5757
.open<ReferencesSelectDialogComponent, ReferencesSelectDialogModel, ContentDocument[] | undefined>(ReferencesSelectDialogComponent, {
58-
minWidth: '900px',
59-
width: 'calc(100vw - 160px)',
60-
maxWidth: '1280px',
61-
maxHeight: 'calc(100vh - 80px)',
58+
panelClass: 'xl',
6259
data: {
6360
spaceId: this.space().id,
6461
multiple: false,

src/app/features/spaces/contents/shared/references-select/references-select.component.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,7 @@ export class ReferencesSelectComponent implements OnInit {
6060
openReferenceSelectDialog(): void {
6161
this.dialog
6262
.open<ReferencesSelectDialogComponent, ReferencesSelectDialogModel, ContentDocument[] | undefined>(ReferencesSelectDialogComponent, {
63-
minWidth: '900px',
64-
width: 'calc(100vw - 160px)',
65-
maxWidth: '1280px',
66-
maxHeight: 'calc(100vh - 80px)',
63+
panelClass: 'xl',
6764
data: {
6865
spaceId: this.space().id,
6966
multiple: true,

src/app/features/spaces/schemas/schemas.component.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ export class SchemasComponent implements OnInit {
133133
openAddDialog(): void {
134134
this.dialog
135135
.open<AddDialogComponent, AddDialogModel, SchemaCreate>(AddDialogComponent, {
136-
width: '500px',
136+
panelClass: 'sm',
137137
data: {
138138
reservedIds: this.schemaIds(),
139139
},
@@ -159,7 +159,7 @@ export class SchemasComponent implements OnInit {
159159
event.stopImmediatePropagation();
160160
this.dialog
161161
.open<EditIdDialogComponent, EditIdDialogModel, string>(EditIdDialogComponent, {
162-
width: '500px',
162+
panelClass: 'sm',
163163
data: {
164164
id: element.id,
165165
reservedIds: this.schemaIds(),
@@ -218,7 +218,7 @@ export class SchemasComponent implements OnInit {
218218
openImportDialog() {
219219
this.dialog
220220
.open<ImportDialogComponent, void, ImportDialogReturn>(ImportDialogComponent, {
221-
width: '500px',
221+
panelClass: 'sm',
222222
})
223223
.afterClosed()
224224
.pipe(
@@ -243,7 +243,7 @@ export class SchemasComponent implements OnInit {
243243
openExportDialog() {
244244
this.dialog
245245
.open<ExportDialogComponent, void, ExportDialogReturn>(ExportDialogComponent, {
246-
width: '500px',
246+
panelClass: 'sm',
247247
})
248248
.afterClosed()
249249
.pipe(

src/app/features/spaces/settings/locales/locales.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ export class LocalesComponent {
5858
const { id, locales } = this.spaceStore.selectedSpace()!;
5959
this.dialog
6060
.open<LocaleDialogComponent, Locale[], LocaleDialogModel>(LocaleDialogComponent, {
61-
width: '500px',
61+
panelClass: 'sm',
6262
data: locales,
6363
})
6464
.afterClosed()

src/app/features/spaces/settings/tokens/tokens.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ export class TokensComponent {
5959
const spaceId = this.spaceStore.selectedSpaceId();
6060
this.dialog
6161
.open<TokenDialogComponent, never, TokenDialogModel>(TokenDialogComponent, {
62-
width: '500px',
62+
panelClass: 'sm',
6363
})
6464
.afterClosed()
6565
.pipe(

src/app/features/spaces/translations/translations.component.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ export class TranslationsComponent implements OnInit {
179179
openAddDialog(): void {
180180
this.dialog
181181
.open<AddDialogComponent, AddDialogModel, AddDialogReturnModel>(AddDialogComponent, {
182-
width: '500px',
182+
panelClass: 'sm',
183183
data: {
184184
reservedIds: this.translationIds(),
185185
},
@@ -213,7 +213,7 @@ export class TranslationsComponent implements OnInit {
213213
openEditIdDialog(translation: Translation): void {
214214
this.dialog
215215
.open<EditIdDialogComponent, EditIdDialogModel, string>(EditIdDialogComponent, {
216-
width: '500px',
216+
panelClass: 'sm',
217217
data: {
218218
id: translation.id,
219219
reservedIds: this.translationIds(),
@@ -240,7 +240,7 @@ export class TranslationsComponent implements OnInit {
240240
openEditDialog(translation: Translation): void {
241241
this.dialog
242242
.open<EditDialogComponent, Translation, EditDialogModel>(EditDialogComponent, {
243-
width: '500px',
243+
panelClass: 'sm',
244244
data: ObjectUtils.clone(translation),
245245
})
246246
.afterClosed()
@@ -290,7 +290,7 @@ export class TranslationsComponent implements OnInit {
290290
openImportDialog(locales: Locale[]): void {
291291
this.dialog
292292
.open<ImportDialogComponent, ImportDialogModel, ImportDialogReturn>(ImportDialogComponent, {
293-
width: '500px',
293+
panelClass: 'sm',
294294
data: {
295295
locales: locales,
296296
},
@@ -325,7 +325,7 @@ export class TranslationsComponent implements OnInit {
325325
openExportDialog(locales: Locale[]): void {
326326
this.dialog
327327
.open<ExportDialogComponent, ExportDialogModel, ExportDialogReturn>(ExportDialogComponent, {
328-
width: '500px',
328+
panelClass: 'sm',
329329
data: {
330330
locales: locales,
331331
},

src/styles.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
@import 'styles/layout';
1212
@import 'styles/markdown';
1313
@import 'styles/mat-card';
14+
@import 'styles/mat-dialog';
1415
@import 'styles/mat-grid-list';
1516
@import 'styles/mat-list';
1617
@import 'styles/mat-menu';

src/styles/_mat-dialog.scss

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
@use '@angular/material' as mat;
2+
3+
@import './styles-variables';
4+
5+
.cdk-overlay-pane.mat-mdc-dialog-panel {
6+
&.sm {
7+
min-width: 500px;
8+
width: calc(100vw - 160px);
9+
max-width: 640px;
10+
max-height: calc(100vh - 80px);
11+
}
12+
&.xl {
13+
min-width: 900px;
14+
width: calc(100vw - 160px);
15+
max-width: 1280px;
16+
max-height: calc(100vh - 80px);
17+
}
18+
&.full-screen {
19+
20+
}
21+
}

0 commit comments

Comments
 (0)