mirror of https://github.com/ghostfolio/ghostfolio
6 changed files with 33 additions and 9 deletions
@ -1,7 +1,7 @@ |
|||||
@if (deviceType === 'mobile') { |
@if (deviceType === 'mobile') { |
||||
<div class="d-flex justify-content-center" mat-dialog-actions> |
<div class="d-flex justify-content-center" mat-dialog-actions> |
||||
<button mat-button (click)="onClickCloseButton()"> |
<button mat-icon-button (click)="onClickCloseButton()"> |
||||
<ion-icon name="close" size="large" /> |
<ion-icon class="d-block text-body-secondary" name="close-outline" /> |
||||
</button> |
</button> |
||||
</div> |
</div> |
||||
} |
} |
||||
|
|||||
@ -1,3 +1,8 @@ |
|||||
:host { |
:host { |
||||
display: block; |
display: block; |
||||
|
|
||||
|
button[mat-icon-button] { |
||||
|
// Show the touch target of 48px, which the density of the theme hides |
||||
|
--mat-icon-button-touch-target-display: block; |
||||
|
} |
||||
} |
} |
||||
|
|||||
@ -1,12 +1,16 @@ |
|||||
<div class="d-flex" mat-dialog-title> |
<div |
||||
|
class="d-flex" |
||||
|
mat-dialog-title |
||||
|
[class.with-close-button]="deviceType() !== 'mobile'" |
||||
|
> |
||||
<span |
<span |
||||
class="flex-grow-1 text-truncate" |
class="flex-grow-1 text-truncate" |
||||
[class.text-center]="position() === 'center'" |
[class.text-center]="position() === 'center'" |
||||
>{{ title() }}</span |
>{{ title() }}</span |
||||
> |
> |
||||
@if (deviceType() !== 'mobile') { |
@if (deviceType() !== 'mobile') { |
||||
<button class="no-min-width px-0" mat-button (click)="onClickCloseButton()"> |
<button mat-icon-button (click)="onClickCloseButton()"> |
||||
<ion-icon name="close" size="large" /> |
<ion-icon class="d-block text-body-secondary" name="close-outline" /> |
||||
</button> |
</button> |
||||
} |
} |
||||
</div> |
</div> |
||||
|
|||||
@ -1,3 +1,18 @@ |
|||||
:host { |
:host { |
||||
display: block; |
display: block; |
||||
|
|
||||
|
button[mat-icon-button] { |
||||
|
// Move the button to the corner with the same distance to the top and to the right |
||||
|
margin-right: -0.8125rem; |
||||
|
// Center the button on the title |
||||
|
margin-top: 0.125rem; |
||||
|
} |
||||
|
|
||||
|
.with-close-button { |
||||
|
.text-center { |
||||
|
// Compensate for the width of the button (1.75rem minus the negative |
||||
|
// margin) to center the title in the dialog |
||||
|
padding-left: 0.9375rem; |
||||
|
} |
||||
|
} |
||||
} |
} |
||||
|
|||||
Loading…
Reference in new issue