This repository has been archived by the owner on Mar 29, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update styling for rule list settings and remove use of legacy color …
…names
- Loading branch information
Showing
4 changed files
with
57 additions
and
56 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
modules/portmaster/src/app/shared/config/rule-list/list-item.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
54 changes: 24 additions & 30 deletions
54
modules/portmaster/src/app/shared/config/rule-list/list-item.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 15 additions & 5 deletions
20
modules/portmaster/src/app/shared/config/rule-list/rule-list.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,26 @@ | ||
<div class="list-items" cdkDropList (cdkDropListDropped)="drop($event)"> | ||
<div class="item" *ngFor="let entry of entries; let index=index; trackBy: trackBy" cdkDrag | ||
[cdkDragDisabled]="readonly"> | ||
<fa-icon icon="grip-vertical" cdkDragHandle *ngIf="!readonly"></fa-icon> | ||
<svg xmlns="http://www.w3.org/2000/svg" class="w-5 h-5 mr-2 text-secondary" fill="none" viewBox="0 0 24 24" | ||
stroke="currentColor" cdkDragHandle [class.opacity-0]="readonly" [class.cusor-move]="!readonly"> | ||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 9l4-4 4 4m0 6l-4 4-4-4" /> | ||
</svg> | ||
<app-rule-list-item [readonly]="readonly" [value]="entry" (valueChange)="updateValue(index, $event)" | ||
(delete)="deleteEntry(index)"> | ||
</app-rule-list-item> | ||
</div> | ||
</div> | ||
|
||
<div class="button-list" *ngIf="!readonly"> | ||
<div class="new-entry" (click)="addEntry()"> | ||
<fa-icon icon="plus-circle" [inverse]="false"></fa-icon> | ||
<span>Add rule</span> | ||
<div class="button-list"> | ||
<div class="dotted" *ngIf="!entries.length && readonly"> | ||
No entries available | ||
</div> | ||
|
||
<button class="new-entry dotted" (click)="addEntry()" *ngIf="!readonly"> | ||
<svg xmlns="http://www.w3.org/2000/svg" class="w-5 h-5" viewBox="0 0 20 20" fill="currentColor"> | ||
<path fill-rule="evenodd" | ||
d="M10 5a1 1 0 011 1v3h3a1 1 0 110 2h-3v3a1 1 0 11-2 0v-3H6a1 1 0 110-2h3V6a1 1 0 011-1z" clip-rule="evenodd" /> | ||
</svg> | ||
<span>Add Rule</span> | ||
</button> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters