Skip to content

Commit

Permalink
more consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
bwp91 committed Nov 12, 2023
1 parent f4a67b7 commit 40033fd
Show file tree
Hide file tree
Showing 41 changed files with 68 additions and 73 deletions.
3 changes: 2 additions & 1 deletion ui/src/app/core/components/confirm/confirm.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ <h5 class="modal-title">{{ title }}</h5>
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body w-100">
<div class="modal-body w-100 text-center">
<i *ngIf="faIconClass" class="fas fa-fw {{ faIconClass }} mb-4" style="font-size: 75px;"></i>
<p class="w-100 text-center">{{ message }}</p>
</div>
<div class="modal-footer justify-content-between">
Expand Down
1 change: 1 addition & 0 deletions ui/src/app/core/components/confirm/confirm.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export class ConfirmComponent implements OnInit {
@Input() title: string;
@Input() message: string;
@Input() confirmButtonLabel: string;
@Input() faIconClass: string|undefined;

constructor(
public activeModal: NgbActiveModal,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@ <h5 class="modal-title">{{ title }}</h5>
</button>
</div>
<div class="modal-body w-100 text-center">
<i *ngIf="faIconClass" class="fas fa-fw {{ faIconClass }} mb-4" style="font-size: 75px;"></i>
<p class="w-100">{{ message }}</p>
</div>
<div class="modal-footer justify-content-between">
<div class="text-left">
<button type="button" class="btn btn-elegant" data-dismiss="modal" (click)="activeModal.close()">
<button type="button" class="btn btn-elegant" data-dismiss="modal" (click)="activeModal.dismiss('Dismiss')">
{{ 'form.button_close' | translate }}
</button>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export class InformationComponent implements OnInit {
@Input() message: string;
@Input() ctaButtonLabel: string;
@Input() ctaButtonLink: string;
@Input() faIconClass: string;

constructor(
public activeModal: NgbActiveModal,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ <h5 class="primary-text">
</div>
<div *ngIf="deviceInfo[item._bridge?.username]._isPaired=== true">
<div class="text-center">
<i class="fa fa-fw fa-check-circle primary-text" style="font-size: 50px;"></i>
<p class="mt-2">
<i class="fa fa-fw fa-check-circle primary-text mb-4" style="font-size: 75px;"></i>
<p>
{{ 'child_bridge.label_bridge_paired' | translate }}
</p>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ <h5 class="modal-title">{{'plugins.manage.label_install' | translate}}: {{ plugi
</div>

<div class="w-100 text-center" *ngIf="!loading">
<i class="fas fa-fw fa-history primary-text" style="font-size: 50px;"></i>
<p class="mt-4">
<i class="fas fa-fw fa-history primary-text mb-4" style="font-size: 75px;"></i>
<p>
{{ 'plugins.manage.message_select_version_to_install' | translate }}:
</p>
<select class="custom-select" [(ngModel)]="selectedVersion">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ <h5 class="modal-title">{{'plugins.manage.label_uninstall' | translate}}: {{ plu
</div>

<div class="w-100" *ngIf="!loading">
<i class="fas fa-fw fa-trash primary-text" style="font-size: 50px;"></i>
<p class="mt-4" [translate]="'plugins.manage.message_uninstall_remove_confirmation'"
<i class="fas fa-fw fa-trash primary-text mb-4" style="font-size: 75px;"></i>
<p [translate]="'plugins.manage.message_uninstall_remove_confirmation'"
[translateParams]="{pluginName: plugin.name}">
</p>
<p *ngIf="pluginAlias && pluginType">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@
<form>
<div class="modal-body">
<div class="w-100 text-center pink-text mb-4">
<i class="fas fa-fw fa-heart" style="font-size: 50px;"></i>
<i class="fas fa-fw fa-heart" style="font-size: 75px;"></i>
</div>
<p class="w-100 text-justify">
<p class="w-100 text-center">
As more users install their plugins through the Homebridge UI, they are less likely to visit the projects' GitHub page where the ways to support a developer would typically be displayed.
</p>
<p class="w-100 text-justify">
<p class="w-100 text-center">
Adding donation links directly in the Homebridge UI ensures users know how to support Homebridge developers if they wish to do so.
</p>
<ul class="list-group">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<i class="far fa-fw fa-arrow-alt-circle-up"></i> {{ 'plugins.status_update_beta_available' | translate }}
</p>
<p class="mb-0 red-text" *ngIf="plugin.installedVersion && plugin.disabled">
<i class="far fa-fw fa-times-circle"></i> {{ 'plugins.status_disabled' | translate }}
<i class="far fa-fw fa-circle-pause"></i> {{ 'plugins.status_disabled' | translate }}
</p>
</div>
<div class="">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ export class PluginCardComponent implements OnInit {
ref.componentInstance.message = this.$translate.instant('plugins.manage.modal_verified_message');
ref.componentInstance.ctaButtonLabel = this.$translate.instant('plugins.manage.modal_verified_cta');
ref.componentInstance.ctaButtonLink = 'https://github.com/homebridge/homebridge/wiki/verified-Plugins';
ref.componentInstance.faIconClass = 'fa-shield-alt green-text';
}

disablePlugin(plugin: any) {
Expand All @@ -82,6 +83,7 @@ export class PluginCardComponent implements OnInit {
ref.componentInstance.title = `${this.$translate.instant('plugins.manage.disable')}: ${plugin.name}`;
ref.componentInstance.message = this.$translate.instant('plugins.manage.message_confirm_disable', { pluginName: plugin.name });
ref.componentInstance.confirmButtonLabel = this.$translate.instant('plugins.manage.disable');
ref.componentInstance.faIconClass = 'fa-circle-pause red-text';

ref.result.then(async () => {
try {
Expand Down Expand Up @@ -111,6 +113,7 @@ export class PluginCardComponent implements OnInit {
ref.componentInstance.title = `${this.$translate.instant('plugins.manage.enable')}: ${plugin.name}`;
ref.componentInstance.message = this.$translate.instant('plugins.manage.message_confirm_enable', { pluginName: plugin.name });
ref.componentInstance.confirmButtonLabel = this.$translate.instant('plugins.manage.enable');
ref.componentInstance.faIconClass = 'fa-circle-check green-text';

ref.result.then(async () => {
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ <h3 class="text-center primary-text" [translate]="'reset.title_warning'">Warning
<div class="text-center"></div>
<div class="text-right">
<button type="button" class="btn btn-danger" data-dismiss="modal" (click)="onResetHomebridgeAccessoryClick()" [disabled]="clicked">
{{ 'reset.button_reset_homebridge_now' | translate }}
{{ 'form.button_reset' | translate }}
</button>
</div>
</div>
Expand Down
40 changes: 23 additions & 17 deletions ui/src/app/modules/users/users-add/users-add.component.html
Original file line number Diff line number Diff line change
@@ -1,24 +1,25 @@
<div class="modal-content">
<div class="modal-body">

<form novalidate (ngSubmit)="onSubmit(form)" [formGroup]="form">
<p class="h4 text-center mb-4" [innerText]="page.title | translate"></p>

<form novalidate (ngSubmit)="onSubmit(form)" [formGroup]="form">
<div class="modal-header">
<h5 class="modal-title">{{ 'users.title_add_user' | translate }}</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close" (click)="activeModal.dismiss('Dismiss')">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<div class="md-form">
<i class="fas fa-fw fa-user-shield prefix grey-text"></i>
<input formControlName="username" [attr.disabled]="(page.title === 'users.title_edit_user') ? true : null"
type="text" id="form-username" autocomplete="username" autocapitalize="none" class="form-control pl-0 pr-0">
<label for="form-username" [ngClass]="{'active': page.title === 'users.title_edit_user'}"
[translate]="'users.label_username'">Username</label>
</div>

<div class="md-form">
<i class="fas fa-fw fa-user prefix grey-text"></i>
<input formControlName="name" type="text" id="form-name" autocomplete="name" class="form-control pl-0 pr-0">
<label for="form-name" [ngClass]="{'active': page.title === 'users.title_edit_user'}"
[translate]="'users.label_full_name'">Full Name</label>
</div>

<div class="row pb-3">
<div class="col-md-6">
<div class="md-form">
Expand All @@ -40,18 +41,23 @@
</div>
</div>
</div>

<div class="form-check text-center mb-4">
<div class="form-check text-center">
<input formControlName="admin" type="checkbox" class="form-check-input" id="isAdmin">
<label class="form-check-label" for="isAdmin" [translate]="'users.label_admin_user'">Admin User?</label>
</div>

<div class="text-center">
<button class="btn btn-primary" type="submit" [disabled]="!form.valid"
[innerText]="page.save | translate"></button>
</div>
<div class="modal-footer justify-content-between">
<div class="text-left">
<button type="button" class="btn btn-elegant" data-dismiss="modal" (click)="activeModal.dismiss('Dismiss')">
{{ 'form.button_close' | translate }}
</button>
</div>

</form>

</div>
<div class="text-center"></div>
<div class="text-right">
<button class="btn btn-primary" type="submit" [disabled]="!form.valid">
{{ 'form.button_save' | translate }}
</button>
</div>
</div>
</form>
</div>
37 changes: 23 additions & 14 deletions ui/src/app/modules/users/users-edit/users-edit.component.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
<div class="modal-content">
<div class="modal-body">

<form novalidate (ngSubmit)="onSubmit(form)" [formGroup]="form">
<p class="h4 text-center mb-4" [innerText]="page.title | translate"></p>

<form novalidate (ngSubmit)="onSubmit(form)" [formGroup]="form">
<div class="modal-header">
<h5 class="modal-title">{{ 'users.title_edit_user' | translate }}</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close" (click)="activeModal.dismiss('Dismiss')">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<div class="md-form">
<i class="fas fa-fw fa-user-shield prefix grey-text"></i>
<input formControlName="username" type="text" id="form-username" autocomplete="off" autocapitalize="none"
Expand Down Expand Up @@ -41,17 +44,23 @@
</div>
</div>

<div class="form-check text-center mb-4">
<div class="form-check text-center">
<input formControlName="admin" type="checkbox" class="form-check-input" id="isAdmin">
<label class="form-check-label" for="isAdmin" [translate]="'users.label_admin_user'">Admin User?</label>
</div>

<div class="text-center">
<button class="btn btn-primary" type="submit" [disabled]="!form.valid"
[innerText]="page.save | translate"></button>
</div>
<div class="modal-footer justify-content-between">
<div class="text-left">
<button type="button" class="btn btn-elegant" data-dismiss="modal" (click)="activeModal.dismiss('Dismiss')">
{{ 'form.button_close' | translate }}
</button>
</div>

</form>

</div>
<div class="text-center"></div>
<div class="text-right">
<button class="btn btn-primary" type="submit" [disabled]="!form.valid">
{{ 'form.button_save' | translate }}
</button>
</div>
</div>
</form>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ <h5 class="modal-title">{{ 'menu.restart.title' | translate }}</h5>
<div class="modal-body align-items-center w-100 pb-0">

<div class="w-100 text-center primary-text mb-4">
<i class="fas fa-fw fa-power-off" style="font-size: 50px;"></i>
<i class="fas fa-fw fa-power-off" style="font-size: 75px;"></i>
</div>

<p class="w-100 text-center my-4">
Expand Down
1 change: 0 additions & 1 deletion ui/src/i18n/bg.json
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,6 @@
"plugins.toast_failed_to_load_plugins": "Неуспешно зареждане на добавките",
"plugins.tooltip_update_plugin_to": "Актуализирай добавката до v{{latestVersion}}",
"reset.accessories_will_may_need_to_be_reconfigured": "After performing this action some accessories may need to be reconfigured in HomeKit or re-added to your automations.",
"reset.button_reset_homebridge_now": "Нулирай Homebridge сега",
"reset.message_accessory_config_will_not_be_changed": "Останалата част от конфигурацията ви няма да бъде променена. Ако Homebridge не се стартира поради лоша конфигурация, нулирането няма да го поправи.",
"reset.message_action_is_irreversible": "Това действие е необратимо. Моля, прочетете внимателно, преди да продължите.",
"reset.message_all_automations_will_be_reset": "Всички автоматизации и ще трябва да бъдат пренастроени след нулиране.",
Expand Down
1 change: 0 additions & 1 deletion ui/src/i18n/ca.json
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,6 @@
"plugins.toast_failed_to_load_plugins": "Error al carregar els plugins",
"plugins.tooltip_update_plugin_to": "Actualitzar el plugin a v{{ latestVersion }}",
"reset.accessories_will_may_need_to_be_reconfigured": "Després de realitzar aquesta acció, pot ser que sigui necessari configurar de nou alguns accessoris en HomeKit o tornar a afegir-los a les teves automatitzacions.",
"reset.button_reset_homebridge_now": "Restableix Homebridge ara",
"reset.message_accessory_config_will_not_be_changed": "La resta de la configuració no serà canviada. Si Homebridge no comença causa d'una mala configuració, un reinici no ho arreglarà.",
"reset.message_action_is_irreversible": "Aquesta acció és irreversible. Si us plau, llegeix amb precaució abans de continuar.",
"reset.message_all_automations_will_be_reset": "Totes les automatitzacions necessiten ser configurades de nou després de reinici.",
Expand Down
1 change: 0 additions & 1 deletion ui/src/i18n/cs.json
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,6 @@
"plugins.toast_failed_to_load_plugins": "Nepodařilo se načíst pluginy",
"plugins.tooltip_update_plugin_to": "Aktualizovat plugin pro v{{latestVersion}}",
"reset.accessories_will_may_need_to_be_reconfigured": "Po provedení této akce může být nutné některé příslušenství znovu nakonfigurovat v HomeKit nebo znovu přidat do vašich automatizací.",
"reset.button_reset_homebridge_now": "Resetovat Homebridge nyní",
"reset.message_accessory_config_will_not_be_changed": "Zbytek konfigurace se nezmění. Pokud se Homebridge nespustí kvůli špatné konfiguraci, reset ji neopraví.",
"reset.message_action_is_irreversible": "Tato akce je nevratná. Před pokračováním prosím pečlivě přečtěte.",
"reset.message_all_automations_will_be_reset": "Všechny automatizace budete muset po restartování znovu nastavit.",
Expand Down
1 change: 0 additions & 1 deletion ui/src/i18n/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,6 @@
"plugins.toast_failed_to_load_plugins": "Fehler beim Laden der Plugins",
"plugins.tooltip_update_plugin_to": "Plugin auf v{{latestVersion}} aktualisieren",
"reset.accessories_will_may_need_to_be_reconfigured": "Nachdem diese Aktion durchgeführt wurde, müssen eventuell einige HomeKit-Geräte neu eingerichtet oder neu zur Automation hinzugefühgt werden.",
"reset.button_reset_homebridge_now": "Homebridge zurücksetzen",
"reset.message_accessory_config_will_not_be_changed": "Die Konfiguration wird nicht geändert. Wenn Homebridge aufgrund einer fehlerhaften Konfiguration nicht gestartet wird, kann ein Reset das Problem <strong>nicht</strong> beheben.",
"reset.message_action_is_irreversible": "Diese Aktion ist nicht umkehrbar. Bitte prüfe sie sorgfältig, bevor du fortfährst.",
"reset.message_all_automations_will_be_reset": "Alle Automatisierungen müssen nach einem Reset neu konfiguriert werden.",
Expand Down
3 changes: 1 addition & 2 deletions ui/src/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,6 @@
"plugins.toast_failed_to_load_plugins": "Failed to load plugins",
"plugins.tooltip_update_plugin_to": "Update plugin to v{{latestVersion}}",
"reset.accessories_will_may_need_to_be_reconfigured": "After performing this action some accessories may need to be reconfigured in HomeKit or re-added to your automations.",
"reset.button_reset_homebridge_now": "Reset Homebridge Now",
"reset.message_accessory_config_will_not_be_changed": "The rest of your config will not be changed. If Homebridge is not starting due to a bad config a reset will not fix it.",
"reset.message_action_is_irreversible": "This action is irreversible. Please read carefully before proceeding.",
"reset.message_all_automations_will_be_reset": "All automations and will need to be reconfigured after a reset.",
Expand Down Expand Up @@ -411,6 +410,6 @@
"users.toast_added_new_user": "Added New User",
"users.toast_failed_to_add_user": "Failed to Add User",
"users.toast_failed_to_delete_user": "Failed to Delete user",
"users.toast_updated_user": "Updated User",
"users.toast_updated_user": "User Updated",
"users.toast_user_deleted": "User Deleted"
}
1 change: 0 additions & 1 deletion ui/src/i18n/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,6 @@
"plugins.toast_failed_to_load_plugins": "Error al cargar los plugins",
"plugins.tooltip_update_plugin_to": "Actualizar plugin a la versión {{latestVersion}}",
"reset.accessories_will_may_need_to_be_reconfigured": "Después de realizar esta acción, puede que sea necesario configurar de nuevo algunos accesorios en HomeKit o volver a añadirlos a sus automatizaciones.",
"reset.button_reset_homebridge_now": "Reiniciar Homebrige ahora",
"reset.message_accessory_config_will_not_be_changed": "El resto de tu configuración no sufrirá cambios. Si Homebridge no inicia debido a una mala configuración, un reinicio no bastará para repararlo.",
"reset.message_action_is_irreversible": "Esta acción es irreversible. Por favor, lee con precaución antes de continuar.",
"reset.message_all_automations_will_be_reset": "Todas las automatizaciones necesitarán ser configuradas de nuevo después de reinicio.",
Expand Down
1 change: 0 additions & 1 deletion ui/src/i18n/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,6 @@
"plugins.toast_failed_to_load_plugins": "Erreur de chargement des plugins",
"plugins.tooltip_update_plugin_to": "Mettre à jour le plugin vers v{{latestVersion}}",
"reset.accessories_will_may_need_to_be_reconfigured": "Après la réalisation de cette action, certains accessoires devront peut-être être reconfigurés dans HomeKit ou de nouveau ajoutés à vos Automatisations.",
"reset.button_reset_homebridge_now": "Réinitialiser Homebridge maintenant",
"reset.message_accessory_config_will_not_be_changed": "Le reste de votre configuration ne sera pas modifié. Si Homebridge ne démarre pas à cause d'une mauvaise configuration, une réinitialisation ne réglera pas le problème.",
"reset.message_action_is_irreversible": "Cette action est irréversible. Merci de lire avec attention avant de continuer.",
"reset.message_all_automations_will_be_reset": "Toutes les automatisations devront être reconfigurées après une réinitialisation.",
Expand Down
1 change: 0 additions & 1 deletion ui/src/i18n/he.json
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,6 @@
"plugins.toast_failed_to_load_plugins": "כשל בהעלאת התוספים",
"plugins.tooltip_update_plugin_to": "תוסף עודכן לגרסא v{{latestVersion}}",
"reset.accessories_will_may_need_to_be_reconfigured": "After performing this action some accessories may need to be reconfigured in HomeKit or re-added to your automations.",
"reset.button_reset_homebridge_now": "רסט את הומברידג' עכשיו",
"reset.message_accessory_config_will_not_be_changed": "The rest of your config will not be changed. If Homebridge is not starting due to a bad config a reset will not fix it.",
"reset.message_action_is_irreversible": "פעולה זו לא ניתנת לביטול, נא קרא בזהירות לפני שתמשיך",
"reset.message_all_automations_will_be_reset": "All automations and will need to be reconfigured after a reset.",
Expand Down
Loading

0 comments on commit 40033fd

Please sign in to comment.