added hide-cm option to code changes
This commit is contained in:
129
.github/patches/hidecm.diff
vendored
Normal file
129
.github/patches/hidecm.diff
vendored
Normal file
@@ -0,0 +1,129 @@
|
||||
diff --git a/flutter/lib/desktop/pages/desktop_setting_page.dart b/flutter/lib/desktop/pages/desktop_setting_page.dart
|
||||
index 56a99446c..5991aceed 100644
|
||||
--- a/flutter/lib/desktop/pages/desktop_setting_page.dart
|
||||
+++ b/flutter/lib/desktop/pages/desktop_setting_page.dart
|
||||
@@ -1101,8 +1101,8 @@ class _SafetyState extends State<_Safety> with AutomaticKeepAliveClientMixin {
|
||||
if (usePassword)
|
||||
_SubButton('Set permanent password', setPasswordDialog,
|
||||
permEnabled && !locked),
|
||||
- // if (usePassword)
|
||||
- // hide_cm(!locked).marginOnly(left: _kContentHSubMargin - 6),
|
||||
+ if (usePassword)
|
||||
+ hide_cm(!locked).marginOnly(left: _kContentHSubMargin - 6),
|
||||
if (usePassword) radios[2],
|
||||
]);
|
||||
})));
|
||||
diff --git a/flutter/lib/main.dart b/flutter/lib/main.dart
|
||||
index 3032a2321..66d0d8c26 100644
|
||||
--- a/flutter/lib/main.dart
|
||||
+++ b/flutter/lib/main.dart
|
||||
@@ -245,7 +245,7 @@ void runConnectionManagerScreen() async {
|
||||
MyTheme.currentThemeMode(),
|
||||
);
|
||||
final hide = await bind.cmGetConfig(name: "hide_cm") == 'true';
|
||||
- gFFI.serverModel.hideCm = hide;
|
||||
+ // gFFI.serverModel.hideCm = hide;
|
||||
if (hide) {
|
||||
await hideCmWindow(isStartup: true);
|
||||
} else {
|
||||
diff --git a/flutter/lib/models/server_model.dart b/flutter/lib/models/server_model.dart
|
||||
index 877576461..4efd6c8b0 100644
|
||||
--- a/flutter/lib/models/server_model.dart
|
||||
+++ b/flutter/lib/models/server_model.dart
|
||||
@@ -32,7 +32,7 @@ class ServerModel with ChangeNotifier {
|
||||
bool _fileOk = false;
|
||||
bool _clipboardOk = false;
|
||||
bool _showElevation = false;
|
||||
- bool hideCm = false;
|
||||
+ bool _hideCm = false;
|
||||
int _connectStatus = 0; // Rendezvous Server status
|
||||
String _verificationMethod = "";
|
||||
String _temporaryPasswordLength = "";
|
||||
@@ -62,6 +62,8 @@ class ServerModel with ChangeNotifier {
|
||||
|
||||
bool get clipboardOk => _clipboardOk;
|
||||
|
||||
+ bool get hideCm => _hideCm;
|
||||
+
|
||||
bool get showElevation => _showElevation;
|
||||
|
||||
int get connectStatus => _connectStatus;
|
||||
@@ -82,12 +84,11 @@ class ServerModel with ChangeNotifier {
|
||||
|
||||
setVerificationMethod(String method) async {
|
||||
await bind.mainSetOption(key: kOptionVerificationMethod, value: method);
|
||||
- /*
|
||||
+
|
||||
if (method != kUsePermanentPassword) {
|
||||
await bind.mainSetOption(
|
||||
key: 'allow-hide-cm', value: bool2option('allow-hide-cm', false));
|
||||
}
|
||||
- */
|
||||
}
|
||||
|
||||
String get temporaryPasswordLength {
|
||||
@@ -104,12 +105,11 @@ class ServerModel with ChangeNotifier {
|
||||
|
||||
setApproveMode(String mode) async {
|
||||
await bind.mainSetOption(key: kOptionApproveMode, value: mode);
|
||||
- /*
|
||||
+
|
||||
if (mode != 'password') {
|
||||
await bind.mainSetOption(
|
||||
key: 'allow-hide-cm', value: bool2option('allow-hide-cm', false));
|
||||
}
|
||||
- */
|
||||
}
|
||||
|
||||
TextEditingController get serverId => _serverId;
|
||||
@@ -126,7 +126,6 @@ class ServerModel with ChangeNotifier {
|
||||
_emptyIdShow = translate("Generating ...");
|
||||
_serverId = IDTextEditingController(text: _emptyIdShow);
|
||||
|
||||
- /*
|
||||
// initital _hideCm at startup
|
||||
final verificationMethod =
|
||||
bind.mainGetOptionSync(key: kOptionVerificationMethod);
|
||||
@@ -137,7 +136,6 @@ class ServerModel with ChangeNotifier {
|
||||
verificationMethod == kUsePermanentPassword)) {
|
||||
_hideCm = false;
|
||||
}
|
||||
- */
|
||||
|
||||
timerCallback() async {
|
||||
final connectionStatus =
|
||||
@@ -227,14 +225,14 @@ class ServerModel with ChangeNotifier {
|
||||
final temporaryPasswordLength =
|
||||
await bind.mainGetOption(key: "temporary-password-length");
|
||||
final approveMode = await bind.mainGetOption(key: kOptionApproveMode);
|
||||
- /*
|
||||
+
|
||||
var hideCm = option2bool(
|
||||
'allow-hide-cm', await bind.mainGetOption(key: 'allow-hide-cm'));
|
||||
if (!(approveMode == 'password' &&
|
||||
verificationMethod == kUsePermanentPassword)) {
|
||||
hideCm = false;
|
||||
}
|
||||
- */
|
||||
+
|
||||
if (_approveMode != approveMode) {
|
||||
_approveMode = approveMode;
|
||||
update = true;
|
||||
@@ -265,7 +263,7 @@ class ServerModel with ChangeNotifier {
|
||||
_temporaryPasswordLength = temporaryPasswordLength;
|
||||
update = true;
|
||||
}
|
||||
- /*
|
||||
+
|
||||
if (_hideCm != hideCm) {
|
||||
_hideCm = hideCm;
|
||||
if (desktopType == DesktopType.cm) {
|
||||
@@ -277,7 +275,7 @@ class ServerModel with ChangeNotifier {
|
||||
}
|
||||
update = true;
|
||||
}
|
||||
- */
|
||||
+
|
||||
if (update) {
|
||||
notifyListeners();
|
||||
}
|
7
.github/workflows/generator-android.yml
vendored
7
.github/workflows/generator-android.yml
vendored
@@ -392,6 +392,13 @@ jobs:
|
||||
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: |
|
||||
wget https://raw.githubusercontent.com/bryangerlach/rdgen/refs/heads/master/.github/patches/hidecm.diff
|
||||
git apply hidecm.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
@@ -330,6 +330,13 @@ jobs:
|
||||
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: |
|
||||
wget https://raw.githubusercontent.com/bryangerlach/rdgen/refs/heads/master/.github/patches/hidecm.diff
|
||||
git apply hidecm.diff
|
||||
|
||||
- name: Restore bridge files
|
||||
if: matrix.job.arch == 'x86_64' || env.UPLOAD_ARTIFACT == 'true'
|
||||
uses: actions/download-artifact@master
|
||||
|
7
.github/workflows/generator-windows.yml
vendored
7
.github/workflows/generator-windows.yml
vendored
@@ -367,6 +367,13 @@ jobs:
|
||||
Invoke-WebRequest -Uri https://raw.githubusercontent.com/bryangerlach/rdgen/refs/heads/master/.github/patches/xoffline.diff -OutFile 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/bryangerlach/rdgen/refs/heads/master/.github/patches/hidecm.diff -OutFile hidecm.diff
|
||||
git apply hidecm.diff
|
||||
|
||||
|
||||
- name: run as admin
|
||||
continue-on-error: true
|
||||
|
@@ -69,4 +69,5 @@ class GenerateForm(forms.Form):
|
||||
|
||||
#custom added features
|
||||
cycleMonitor = forms.BooleanField(initial=False, required=False)
|
||||
xOffline = forms.BooleanField(initial=False, required=False)
|
||||
xOffline = forms.BooleanField(initial=False, required=False)
|
||||
hidecm = forms.BooleanField(initial=False, required=False)
|
@@ -204,7 +204,11 @@
|
||||
<label for="{{ form.enableRecording.id_for_label }}">{{ form.enableRecording }} Enable recording session</label>
|
||||
<label for="{{ form.enableBlockingInput.id_for_label }}">{{ form.enableBlockingInput }} Enable blocking user input</label>
|
||||
<label for="{{ form.enableRemoteModi.id_for_label }}">{{ form.enableRemoteModi }} Enable remote configuration modification</label>
|
||||
</div>
|
||||
</div><br>
|
||||
<h2><i class="fas fa-code"></i> Code Changes</h2>
|
||||
<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>
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
@@ -214,8 +218,6 @@
|
||||
{{ form.defaultManual }}<br><br>
|
||||
<label for="{{ form.overrideManual.id_for_label }}">Override settings</label><br>
|
||||
{{ form.overrideManual }}<br><br>
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
<div class="platform">
|
||||
|
@@ -25,6 +25,7 @@ def generator_view(request):
|
||||
delayFix = form.cleaned_data['delayFix']
|
||||
cycleMonitor = form.cleaned_data['cycleMonitor']
|
||||
xOffline = form.cleaned_data['xOffline']
|
||||
hidecm = form.cleaned_data['hidecm']
|
||||
server = form.cleaned_data['serverIP']
|
||||
key = form.cleaned_data['key']
|
||||
apiServer = form.cleaned_data['apiServer']
|
||||
@@ -159,6 +160,7 @@ def generator_view(request):
|
||||
extras['rdgen'] = 'true'
|
||||
extras['cycleMonitor'] = 'true' if cycleMonitor else 'false'
|
||||
extras['xOffline'] = 'true' if xOffline else 'false'
|
||||
extras['hidecm'] = 'true' if hidecm 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