Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugin dropdown menu - reorder #1711

Merged
merged 4 commits into from
Nov 16, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 17 additions & 17 deletions ui/src/app/modules/plugins/plugin-card/plugin-card.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -82,29 +82,13 @@ <h4 class="card-title mb-0">
<i class="fas fa-fw fa-ellipsis-v"></i>
</a>
<div ngbDropdownMenu aria-labelledby="Plugin actions drop down menu">
<ng-container *ngIf="hasChildBridges && !plugin.disabled">
<button ngbDropdownItem *ngIf="!childBridgeRestartInProgress && !plugin.disabled" (click)="doChildBridgeAction('restart')">
<i class="fa-fw icon-button fas fa-fw fa-power-off"></i> {{ 'child_bridge.label_bridge_restart_child_bridges' | translate }}
</button>
<button ngbDropdownItem *ngIf="!allChildBridgesStopped" (click)="doChildBridgeAction('stop')">
<i class="fas fa-fw fa-stop"></i> {{ 'child_bridge.label_child_stop' | translate }}
</button>
<button ngbDropdownItem *ngIf="allChildBridgesStopped" (click)="doChildBridgeAction('start')">
<i class="fas fa-fw fa-play"></i> {{ 'child_bridge.label_child_start' | translate }}
</button>
<div class="dropdown-divider"></div>
</ng-container>
<button ngbDropdownItem *ngIf="plugin.publicPackage" (click)="$plugin.installPreviousVersion(plugin)">
<i class="fas fa-fw fa-fw fa-history"></i>
{{ 'plugins.manage.message_install_alternate_version' | translate }}
</button>
<button ngbDropdownItem (click)="viewPluginLog(plugin)" *ngIf="plugin.installedVersion">
<i class="fas fa-fw fa-fw fa-wave-square"></i> {{ 'plugins.manage.plugin_logs' | translate }}
</button>
<button ngbDropdownItem (click)="$plugin.bridgeSettings(plugin)"
*ngIf="plugin.installedVersion && plugin.name !== 'homebridge-config-ui-x'">
<i class="fas fa-fw fa-fw fa-project-diagram"></i> {{ 'child_bridge.label_bridge_settings' | translate }}
</button>
<button ngbDropdownItem (click)="$plugin.jsonEditor(plugin)"
*ngIf="!isMobile && plugin.installedVersion && plugin.name !== 'homebridge-config-ui-x'">
<i class="fas fa-fw fa-fw fa-code"></i> {{ 'plugins.manage.json_config' | translate }}
Expand All @@ -121,8 +105,24 @@ <h4 class="card-title mb-0">
(click)="$plugin.uninstallPlugin(plugin)">
<i class="fas fa-fw fa-fw fa-trash"></i> {{ 'plugins.button_uninstall' | translate }}
</button>
<div class="dropdown-divider"></div>
<ng-container *ngIf="hasChildBridges && !plugin.disabled">
<button ngbDropdownItem *ngIf="!childBridgeRestartInProgress && !plugin.disabled" (click)="doChildBridgeAction('restart')">
<i class="fa-fw icon-button fas fa-fw fa-power-off"></i> {{ 'child_bridge.label_bridge_restart_child_bridges' | translate }}
</button>
<button ngbDropdownItem *ngIf="!allChildBridgesStopped" (click)="doChildBridgeAction('stop')">
<i class="fas fa-fw fa-stop"></i> {{ 'child_bridge.label_child_stop' | translate }}
</button>
<button ngbDropdownItem *ngIf="allChildBridgesStopped" (click)="doChildBridgeAction('start')">
<i class="fas fa-fw fa-play"></i> {{ 'child_bridge.label_child_start' | translate }}
</button>
</ng-container>
<button ngbDropdownItem (click)="$plugin.bridgeSettings(plugin)"
*ngIf="plugin.installedVersion && plugin.name !== 'homebridge-config-ui-x'">
<i class="fas fa-fw fa-fw fa-project-diagram"></i> {{ 'child_bridge.label_bridge_settings' | translate }}
</button>
<div class="dropdown-divider" *ngIf="plugin.links.homepage || plugin.links.npm"></div>
<a ngbDropdownItem target="_blank" rel="noopener noreferrer" class="text-decoration-none"
<a ngbDropdownItem target="_blank" rel="noopener noreferrer" class="text-decoration-none"
*ngIf="plugin.name === 'homebridge-config-ui-x'" href="/swagger">
<i class="fas fa-fw fa-passport"></i> {{ 'plugins.button_api_documentation' | translate }}
</a>
Expand Down
Loading