1
0
mirror of https://github.com/bpatrik/pigallery2.git synced 2024-11-24 08:42:24 +02:00

improving design

This commit is contained in:
Patrik J. Braun 2019-02-23 00:29:35 +01:00
parent f99e13f3fc
commit e029bceed6
18 changed files with 31 additions and 27 deletions

View File

@ -1,4 +1,4 @@
<a class="button btn btn-default"
<a class="button btn btn-secondary"
[routerLink]="['/search', person.name, {type: SearchTypes[SearchTypes.person]}]"
style="display: inline-block;">

View File

@ -1,4 +1,4 @@
<a #dirContainer class="button btn btn-default"
<a #dirContainer class="button btn btn-secondary"
[routerLink]="['/gallery', getDirectoryPath()]"
[queryParams]="queryService.getParams()"
style="display: inline-block;">

View File

@ -29,7 +29,7 @@
<div class="divider" *ngIf="ItemCount > 0 && config.Client.Other.NavBar.showItemCount">&nbsp;</div>
<div class="btn-group" dropdown placement="bottom right">
<button id="button-alignment" dropdownToggle type="button"
class="btn btn-default dropdown-toggle"
class="btn btn-secondary dropdown-toggle"
[ngClass]="{'btn-secondary':galleryService.sorting.value !== DefaultSorting}"
aria-controls="dropdown-alignment"
[innerHTML]="galleryService.sorting.value| iconizeSorting">

View File

@ -1,4 +1,4 @@
<button id="shareButton" class="nav-link btn btn-default btn-link"
<button id="shareButton" class="nav-link btn btn-link"
type="button" [disabled]="!enabled" (click)="openModal(shareModal)">
<span class="oi oi-share"></span>
<ng-container i18n>Share</ng-container>

View File

@ -1,6 +1,6 @@
<div class="dropdown" dropdown>
<button dropdownToggle
class="btn btn-default dropdown-toggle"
class="btn btn-secondary dropdown-toggle"
type="button"
id="language"
data-toggle="dropdown"

View File

@ -90,7 +90,7 @@
[disabled]="!settingsForm.form.valid || !changed || inProgress"
(click)="save()" i18n>Save
</button>
<button class="btn btn-default float-right"
<button class="btn btn-secondary float-right"
(click)="reset()" i18n>Reset
</button>
</div>

View File

@ -36,7 +36,7 @@
[disabled]="!settingsForm.form.valid || !changed || inProgress"
(click)="save()" i18n>Save
</button>
<button class="btn btn-default float-right"
<button class="btn btn-secondary float-right"
(click)="reset()" i18n>Reset
</button>
</div>

View File

@ -54,7 +54,7 @@
[disabled]="!settingsForm.form.valid || !changed || inProgress"
(click)="save()" i18n>Save
</button>
<button class="btn btn-default float-right"
<button class="btn btn-secondary float-right"
(click)="reset()" i18n>Reset
</button>
<br/>
@ -102,7 +102,7 @@
[disabled]="inProgress"
(click)="index(true)" i18n>Index with Thumbnails
</button>
<button class="btn btn-default"
<button class="btn btn-secondary"
*ngIf="_settingsService.progress.value != null"
[disabled]="inProgress"
(click)="cancelIndexing()" i18n>Cancel

View File

@ -62,7 +62,7 @@
[disabled]="!settingsForm.form.valid || !changed || inProgress"
(click)="save()" i18n>Save
</button>
<button class="btn btn-default float-right"
<button class="btn btn-secondary float-right"
(click)="reset()" i18n>Reset
</button>
</div>

View File

@ -27,7 +27,7 @@
[disabled]="!settingsForm.form.valid || !changed || inProgress"
(click)="save()" i18n>Save
</button>
<button class="btn btn-default float-right"
<button class="btn btn-secondary float-right"
(click)="reset()" i18n>Reset
</button>
</div>

View File

@ -167,7 +167,7 @@
[disabled]="!settingsForm.form.valid || !changed || inProgress"
(click)="save()" i18n>Save
</button>
<button class="btn btn-default float-right"
<button class="btn btn-secondary float-right"
(click)="reset()" i18n>Reset
</button>
</div>

View File

@ -36,7 +36,7 @@
[disabled]="!settingsForm.form.valid || !changed || inProgress"
(click)="save()" i18n>Save
</button>
<button class="btn btn-default float-right"
<button class="btn btn-secondary float-right"
(click)="reset()" i18n>Reset
</button>
</div>

View File

@ -72,7 +72,7 @@
[disabled]="!settingsForm.form.valid || !changed || inProgress"
(click)="save()" i18n>Save
</button>
<button class="btn btn-default float-right"
<button class="btn btn-secondary float-right"
(click)="reset()" i18n>Reset
</button>
</div>

View File

@ -51,7 +51,7 @@
[disabled]="!settingsForm.form.valid || !changed || inProgress"
(click)="save()" i18n>Save
</button>
<button class="btn btn-default float-right"
<button class="btn btn-secondary float-right"
(click)="reset()" i18n>Reset
</button>
</div>

View File

@ -103,7 +103,7 @@
[disabled]="!settingsForm.form.valid || !changed || inProgress"
(click)="save()" i18n>Save
</button>
<button class="btn btn-default float-right"
<button class="btn btn-secondary float-right"
(click)="reset()" i18n>Reset
</button>
</div>

View File

@ -43,7 +43,7 @@
</td>
<td>
<button [disabled]="!canModifyUser(user)" (click)="deleteUser(user)"
[ngClass]="canModifyUser(user)? 'btn-danger':'btn-default'"
[ngClass]="canModifyUser(user)? 'btn-danger':'btn-secondary'"
class="btn float-right">
<span class="oi oi-trash" aria-hidden="true" aria-label="Delete"></span>
</button>
@ -84,7 +84,7 @@
</select>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" (click)="userModal.hide()" i18n>Close</button>
<button type="button" class="btn btn-secondary" (click)="userModal.hide()" i18n>Close</button>
<button type="button" class="btn btn-primary" data-dismiss="modal"
(click)="addNewUser()"
[disabled]="!NewUserForm.form.valid" i18n>Add User

View File

@ -71,11 +71,6 @@ export class UserMangerSettingsComponent implements OnInit {
return currentUser.name !== user.name && currentUser.role >= user.role;
}
private async getSettings() {
this.enabled = await this._userSettings.getSettings();
}
async switched(event: { previousValue: false, currentValue: true }) {
this.inProgress = true;
this.error = '';
@ -105,9 +100,14 @@ export class UserMangerSettingsComponent implements OnInit {
}
async addNewUser() {
await this._userSettings.createUser(this.newUser);
await this.getUsersList();
this.childModal.hide();
try {
await this._userSettings.createUser(this.newUser);
await this.getUsersList();
this.childModal.hide();
} catch (e) {
const err: ErrorDTO = e;
this.notification.error(err.message + ', ' + err.details, 'User creation error!');
}
}
async updateRole(user: UserDTO) {
@ -122,6 +122,10 @@ export class UserMangerSettingsComponent implements OnInit {
this.childModal.hide();
}
private async getSettings() {
this.enabled = await this._userSettings.getSettings();
}
private async getUsersList() {
try {
this.users = await this._userSettings.getUsers();

View File

@ -27,7 +27,7 @@
[disabled]="!settingsForm.form.valid || !changed || inProgress"
(click)="save()" i18n>Save
</button>
<button class="btn btn-default float-right"
<button class="btn btn-secondary float-right"
(click)="reset()" i18n>Reset
</button>
</div>