fix: performance flags filter

This commit is contained in:
qwqVictor 2024-05-21 22:48:59 +08:00
parent 486dedb849
commit a788886c9b
3 changed files with 3 additions and 4 deletions

View File

@ -6,7 +6,6 @@ function initFile(sessionId, filegateway) {
for (var i = 0; i < filegateway.shares.length; i++) {
shares.push($('<option></option>').val(filegateway.shares[i]).text(filegateway.shares[i]));
}
console.log("shares", shares);
$('#shares').append(shares);
window.currentPath = [];
updatePathText();

View File

@ -65,7 +65,7 @@
style="background-color: #34A6FF; border-color: #34A6FF">确定</button>
</form>
<form id="login_form" class="form-signin"
onsubmit="connect(this.elements['inputUser'].value, this.elements['inputPassword'].value, this.elements['inputDomain'].value, Array.from(this.getElementsByClassName('perfFlagsCheckbox')).map((x) => Number.parseInt(x.dataset.mask)).reduce((x, y) => x | y), event);">
onsubmit="connect(this.elements['inputUser'].value, this.elements['inputPassword'].value, this.elements['inputDomain'].value, Array.from(this.getElementsByClassName('perfFlagsCheckbox')).filter((x) => x.checked).map((x) => Number.parseInt(x.dataset.mask)).reduce((x, y) => x | y), event);">
<input type="text" id="inputUser" autocomplete="username" class="form-control" placeholder="用户名">
<input type="password" id="inputPassword" autocomplete="current-password" class="form-control" placeholder="密码">
<input type="text" id="inputDomain" class="form-control" placeholder="域">

View File

@ -40,11 +40,11 @@ function useWorkspace() {
return false;
}
}
function connect(user, password, domain, performanceFlag, event) {
function connect(user, password, domain, performanceFlags, event) {
jsExportedCredentials.user = user;
jsExportedCredentials.password = password;
jsExportedCredentials.domain = domain;
jsExportedCredentials.performanceFlag = performanceFlag;
jsExportedCredentials.performanceFlags = performanceFlags.toString();
jsExportedCredentials.wsurl = (window.workspace.websocketUrl.startsWith("wss://") || window.workspace.websocketUrl.startsWith("ws://")) ?
window.workspace.websocketUrl : (window.location.protocol == "https:" ? "wss://" : "ws://") + window.location.host + window.workspace.websocketUrl;
$.ajax({