From db66195f7d0514fd28fcbb1adb8e488a30255bdb Mon Sep 17 00:00:00 2001 From: Shaun Date: Mon, 31 Jul 2023 04:24:00 -0400 Subject: [PATCH] Added ability to bulk select, pause & resume (#1886) Co-authored-by: Louis Lam --- .stylelintrc | 3 +- src/assets/app.scss | 25 +++- src/components/MonitorList.vue | 147 ++++++++++++++++++- src/components/MonitorListFilterDropdown.vue | 11 +- src/components/MonitorListItem.vue | 114 +++++++++++--- src/lang/en.json | 3 + 6 files changed, 267 insertions(+), 36 deletions(-) diff --git a/.stylelintrc b/.stylelintrc index 00ddcaaef..0bcdb7c27 100644 --- a/.stylelintrc +++ b/.stylelintrc @@ -10,6 +10,7 @@ "color-function-notation": "legacy", "shorthand-property-no-redundant-values": null, "color-hex-length": null, - "declaration-block-no-redundant-longhand-properties": null + "declaration-block-no-redundant-longhand-properties": null, + "at-rule-no-unknown": null } } diff --git a/src/assets/app.scss b/src/assets/app.scss index 0eff9a069..0d3f0454e 100644 --- a/src/assets/app.scss +++ b/src/assets/app.scss @@ -111,6 +111,10 @@ optgroup { padding-right: 20px; } +.btn-sm { + border-radius: 25px; +} + .btn-primary { color: white; @@ -158,6 +162,26 @@ optgroup { background-color: #161B22; } +.btn-outline-normal { + padding: 4px 10px; + border: 1px solid #ced4da; + border-radius: 25px; + background-color: transparent; + + .dark & { + color: $dark-font-color; + border: 1px solid $dark-font-color2; + } + + &.active { + background-color: $highlight-white; + + .dark & { + background-color: $dark-font-color2; + } + } +} + @media (max-width: 550px) { .table-shadow-box { padding: 10px !important; @@ -436,7 +460,6 @@ optgroup { .monitor-list { &.scrollbar { overflow-y: auto; - height: calc(100% - 107px); } @media (max-width: 770px) { diff --git a/src/components/MonitorList.vue b/src/components/MonitorList.vue index 9ee46e243..887341ba8 100644 --- a/src/components/MonitorList.vue +++ b/src/components/MonitorList.vue @@ -2,6 +2,10 @@
+ +
-
+
{{ $t("No Monitors, please") }} {{ $t("add one") }}
+ + + {{ $t("pauseMonitorMsg") }} + @@ -271,4 +406,12 @@ export default { padding-left: 67px; margin-top: 5px; } + +.selection-controls { + margin-top: 5px; + display: flex; + align-items: center; + gap: 10px; +} + diff --git a/src/components/MonitorListFilterDropdown.vue b/src/components/MonitorListFilterDropdown.vue index 01b9678f9..fe8b3ea28 100644 --- a/src/components/MonitorListFilterDropdown.vue +++ b/src/components/MonitorListFilterDropdown.vue @@ -44,6 +44,7 @@ export default { diff --git a/src/lang/en.json b/src/lang/en.json index ec52f84c2..42423ad41 100644 --- a/src/lang/en.json +++ b/src/lang/en.json @@ -269,6 +269,9 @@ "Services": "Services", "Discard": "Discard", "Cancel": "Cancel", + "Select": "Select", + "selectedMonitorCount": "Selected: {0}", + "Check/Uncheck": "Check/Uncheck", "Powered by": "Powered by", "shrinkDatabaseDescription": "Trigger database VACUUM for SQLite. If your database is created after 1.10.0, AUTO_VACUUM is already enabled and this action is not needed.", "Customize": "Customize",