option to add sort by status

This commit is contained in:
Bryan Gerlach
2025-01-13 13:23:39 -06:00
parent 38b2e8528c
commit 188dfc89fa
8 changed files with 75 additions and 10 deletions

33
.github/patches/statussort.diff vendored Normal file
View File

@@ -0,0 +1,33 @@
diff --git a/flutter/lib/common/widgets/peers_view.dart b/flutter/lib/common/widgets/peers_view.dart
index 3e34f882d..68d82116b 100644
--- a/flutter/lib/common/widgets/peers_view.dart
+++ b/flutter/lib/common/widgets/peers_view.dart
@@ -25,13 +25,13 @@ class PeerSortType {
static const String remoteId = 'Remote ID';
static const String remoteHost = 'Remote Host';
static const String username = 'Username';
- // static const String status = 'Status';
+ static const String status = 'Status';
static List<String> values = [
PeerSortType.remoteId,
PeerSortType.remoteHost,
PeerSortType.username,
- // PeerSortType.status
+ PeerSortType.status
];
}
@@ -384,9 +384,9 @@ class _PeersViewState extends State<_PeersView>
peers.sort((p1, p2) =>
p1.username.toLowerCase().compareTo(p2.username.toLowerCase()));
break;
- // case PeerSortType.status:
- // peers.sort((p1, p2) => p1.online ? -1 : 1);
- // break;
+ case PeerSortType.status:
+ peers.sort((p1, p2) => p1.online ? -1 : 1);
+ break;
}
}

View File

@@ -399,6 +399,13 @@ jobs:
wget https://raw.githubusercontent.com/bryangerlach/rdgen/refs/heads/master/.github/patches/hidecm.diff
git apply hidecm.diff
- name: statussort
continue-on-error: true
if: fromJson(inputs.extras).statussort == 'true'
run: |
wget https://raw.githubusercontent.com/bryangerlach/rdgen/refs/heads/master/.github/patches/statussort.diff
git apply statussort.diff
- name: Report Status
uses: fjogeleit/http-request-action@v1
with:

View File

@@ -337,6 +337,13 @@ jobs:
wget https://raw.githubusercontent.com/bryangerlach/rdgen/refs/heads/master/.github/patches/hidecm.diff
git apply hidecm.diff
- name: statussort
continue-on-error: true
if: fromJson(inputs.extras).statussort == 'true'
run: |
wget https://raw.githubusercontent.com/bryangerlach/rdgen/refs/heads/master/.github/patches/statussort.diff
git apply statussort.diff
- name: Restore bridge files
if: matrix.job.arch == 'x86_64' || env.UPLOAD_ARTIFACT == 'true'
uses: actions/download-artifact@master

View File

@@ -437,26 +437,33 @@ jobs:
run: |
sed -i '' -e '/if !key.is_empty() && !token.is_empty() {/,/}/d' ./src/client.rs
- name: add cycle monitors to toolbar
continue-on-error: true
if: fromJson(inputs.extras).cycleMonitor == 'true'
run: |
Invoke-WebRequest -Uri https://raw.githubusercontent.com/VenimK/creator/refs/heads/master/.github/patches/cycle_monitor.diff -OutFile cycle_monitor.diff
git apply cycle_monitor.diff
- name: add cycle monitors to toolbar
continue-on-error: true
if: fromJson(inputs.extras).cycleMonitor == 'true'
run: |
wget https://raw.githubusercontent.com/bryangerlach/rdgen/refs/heads/master/.github/patches/cycle_monitor.diff
git apply cycle_monitor.diff
- name: use X for offline display instead of orange circle
continue-on-error: true
if: fromJson(inputs.extras).xOffline == 'true'
run: |
Invoke-WebRequest -Uri https://raw.githubusercontent.com/VenimK/creator/refs/heads/master/.github/patches/xoffline.diff -OutFile xoffline.diff
wget https://raw.githubusercontent.com/bryangerlach/rdgen/refs/heads/master/.github/patches/xoffline.diff
git apply xoffline.diff
- name: hide-cm
continue-on-error: true
if: fromJson(inputs.extras).hidecm == 'true'
run: |
Invoke-WebRequest -Uri https://raw.githubusercontent.com/VenimK/creator/refs/heads/master/.github/patches/hidecm.diff -OutFile hidecm.diff
wget https://raw.githubusercontent.com/bryangerlach/rdgen/refs/heads/master/.github/patches/hidecm.diff
git apply hidecm.diff
- name: statussort
continue-on-error: true
if: fromJson(inputs.extras).statussort == 'true'
run: |
wget https://raw.githubusercontent.com/bryangerlach/rdgen/refs/heads/master/.github/patches/statussort.diff
git apply statussort.diff
- name: Install Rust toolchain

View File

@@ -374,6 +374,13 @@ jobs:
Invoke-WebRequest -Uri https://raw.githubusercontent.com/bryangerlach/rdgen/refs/heads/master/.github/patches/hidecm.diff -OutFile hidecm.diff
git apply hidecm.diff
- name: statussort
continue-on-error: true
if: fromJson(inputs.extras).statussort == 'true'
run: |
Invoke-WebRequest -Uri https://raw.githubusercontent.com/bryangerlach/rdgen/refs/heads/master/.github/patches/statussort.diff -OutFile statussort.diff
git apply statussort.diff
- name: run as admin
continue-on-error: true