Skip to content

Commit

Permalink
move Export button to icon-set-details, make Save the primary button
Browse files Browse the repository at this point in the history
  • Loading branch information
hofstef committed Nov 20, 2024
1 parent 40e70ff commit 86dcb3c
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 44 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,23 @@
</mat-form-field>
</div>
<div class="buttons">
<button
mat-stroked-button
class="mr-1"
title="Import icon set"
(click)="startIconSetImport()"
>
<span>Import icon set</span>
<input
type="file"
accept=".domain, .iconset"
style="display: none"
id="importDomain"
name="file"
onclick="this.value=null"
(change)="importIconSet()"
/>
</button>
<button
mat-stroked-button
class="mr-1"
Expand Down Expand Up @@ -75,38 +92,14 @@
<span>Cancel changes</span>
</button>
<button
mat-stroked-button
mat-flat-button
class="mr-1"
title="Save changes"
color="primary"
(click)="saveIconSet()"
>
<span>Save changes</span>
</button>
<button
mat-stroked-button
class="mr-1"
title="Import icon set"
(click)="startIconSetImport()"
>
<span>Import icon set</span>
<input
type="file"
accept=".domain, .iconset"
style="display: none"
id="importDomain"
name="file"
onclick="this.value=null"
(change)="importIconSet()"
/>
</button>
<button
mat-stroked-button
class="mr-1"
title="Export icon set"
(click)="exportIconSet()"
>
<span>Export icon set</span>
</button>
</div>
</div>
<div class="iconList smallScrollbar">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,6 @@ export class IconSetConfigurationComponent implements OnInit {
);
}

exportIconSet(): void {
this.iconSetCustomizationService.exportIconSet();
}

/** Add Custom Icon **/
startIconUpload(): void {
document.getElementById('importIcon')?.click();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,26 @@
<div class="details smallScrollbar">
<div>
<h3>Set Name for Export:</h3>
<h3>Export as File:</h3>
<div class="iconSetDetails">
<mat-form-field class="exportForm" color="accent">
<mat-label>Icon set name</mat-label>
<input
matInput
type="text"
placeholder="Icon Set Name"
subscriptSizing="dynamic"
class="dense-8"
(input)="changeName($event)"
[value]="iconSetName | async"
/>
</mat-form-field>
<button
mat-stroked-button
class="exportForm"
title="Export icon set"
(click)="exportIconSet()"
>
<span>Export icon set</span>
</button>
</div>
</div>
<div class="actorList">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,10 @@
}

.iconSetDetails {
display: flex;
flex-direction: column;
padding-left: 8px;
padding-right: 8px;
::ng-deep.mat-mdc-form-field-infix {
border: none;
padding-bottom: 0 !important;
padding-top: 0 !important;
}

::ng-deep.mdc-text-field {
padding-left: 0 !important;
}
}

.compactItem {
Expand All @@ -40,9 +33,9 @@

.exportForm {
margin-left: 12px;
margin-top: 12px;
margin-bottom: 0px;
height: 50px;
margin-right: 12px;
margin-top: 8px;
margin-bottom: 0;
}

h3 {
Expand All @@ -55,3 +48,7 @@ h3 {
mat-list {
padding-top: 0;
}

::ng-deep.mat-mdc-form-field-subscript-wrapper {
height: 0 !important;
}
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,8 @@ export class IconSetDetailsComponent implements OnInit {
this.draggedList = draggedList;
this.draggedIndex = index;
}

exportIconSet(): void {
this.customizationService.exportIconSet();
}
}

0 comments on commit 86dcb3c

Please sign in to comment.