option to add sort by status
This commit is contained in:
33
.github/patches/statussort.diff
vendored
Normal file
33
.github/patches/statussort.diff
vendored
Normal 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;
|
||||
}
|
||||
}
|
||||
|
7
.github/workflows/generator-android.yml
vendored
7
.github/workflows/generator-android.yml
vendored
@@ -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:
|
||||
|
7
.github/workflows/generator-linux.yml
vendored
7
.github/workflows/generator-linux.yml
vendored
@@ -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
|
||||
|
25
.github/workflows/generator-macos.yml
vendored
25
.github/workflows/generator-macos.yml
vendored
@@ -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
|
||||
|
7
.github/workflows/generator-windows.yml
vendored
7
.github/workflows/generator-windows.yml
vendored
@@ -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
|
||||
|
@@ -70,4 +70,5 @@ class GenerateForm(forms.Form):
|
||||
#custom added features
|
||||
cycleMonitor = forms.BooleanField(initial=False, required=False)
|
||||
xOffline = forms.BooleanField(initial=False, required=False)
|
||||
hidecm = forms.BooleanField(initial=False, required=False)
|
||||
hidecm = forms.BooleanField(initial=False, required=False)
|
||||
statussort = forms.BooleanField(initial=False, required=False)
|
@@ -211,6 +211,7 @@
|
||||
<label for="{{ form.cycleMonitor.id_for_label }}">{{ form.cycleMonitor }} Add a button to cycle through available monitors to the minimized toolbar.</label><br>
|
||||
<label for="{{ form.xOffline.id_for_label }}">{{ form.xOffline }} Display an X for offline devices in the addressbook.</label><br>
|
||||
<label for="{{ form.hidecm.id_for_label }}">{{ form.hidecm }} Allow hiding the connection window from remote screen.</label><br>
|
||||
<label for="{{ form.statussort.id_for_label }}">{{ form.statussort }} Allow sorting by online status.</label><br>
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
|
@@ -26,6 +26,7 @@ def generator_view(request):
|
||||
cycleMonitor = form.cleaned_data['cycleMonitor']
|
||||
xOffline = form.cleaned_data['xOffline']
|
||||
hidecm = form.cleaned_data['hidecm']
|
||||
statussort = form.cleaned_data['statussort']
|
||||
server = form.cleaned_data['serverIP']
|
||||
key = form.cleaned_data['key']
|
||||
apiServer = form.cleaned_data['apiServer']
|
||||
@@ -162,6 +163,7 @@ def generator_view(request):
|
||||
extras['cycleMonitor'] = 'true' if cycleMonitor else 'false'
|
||||
extras['xOffline'] = 'true' if xOffline else 'false'
|
||||
extras['hidecm'] = 'true' if hidecm else 'false'
|
||||
extras['statussort'] = 'true' if statussort else 'false'
|
||||
extra_input = json.dumps(extras)
|
||||
|
||||
####from here run the github action, we need user, repo, access token.
|
||||
|
Reference in New Issue
Block a user