Skip to content

Commit

Permalink
Merge pull request #1224 from jumpserver/dev
Browse files Browse the repository at this point in the history
v4.6.0
  • Loading branch information
BaiJiangJie authored Jan 15, 2025
2 parents 87b22d0 + ebbbbac commit b2ce9b2
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 2 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"license": "GPLv3",
"scripts": {
"ng": "ng",
"dev": "NODE_OPTIONS=--openssl-legacy-provider ng serve --hmr --proxy-config proxy.conf.json --host 0.0.0.0 --base-href=/luna/ --disable-host-check",
"start": "NODE_OPTIONS=--openssl-legacy-provider ng serve --hmr --proxy-config proxy.conf.json --host 0.0.0.0 --base-href=/luna/ --disable-host-check",
"build": "NODE_OPTIONS=--openssl-legacy-provider ng build --prod --base-href=/luna/ --output-path 'luna'",
"extract": "ngx-translate-extract --input ./src --output ./src/assets/i18n/*.json --sort --format namespaced-json",
Expand Down
7 changes: 6 additions & 1 deletion src/app/elements/content/content.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {ElementCommandDialogComponent} from '@app/elements/content/command-dialo
import {ElementSendCommandWithVariableDialogComponent} from '@app/elements/content/send-command-with-variable-dialog/send-command-with-variable-dialog.component';
import {fromEvent, Subscription} from 'rxjs';
import * as jQuery from 'jquery/dist/jquery.min.js';
import * as _ from 'lodash';

@Component({
selector: 'elements-content',
Expand Down Expand Up @@ -92,6 +93,10 @@ export class ElementContentComponent implements OnInit, OnDestroy {
}

handleKeyDownTabChange() {
const debouncedSwitch = _.debounce((key: string) => {
this.viewSrv.keyboardSwitchTab(key);
}, 500);

this.keyboardSubscription = fromEvent(window, 'keydown').subscribe((event: any) => {
if (event.altKey && event.shiftKey && (event.key === 'ArrowRight' || event.key === 'ArrowLeft') && this.viewList.length > 1) {
let key = '';
Expand All @@ -100,7 +105,7 @@ export class ElementContentComponent implements OnInit, OnDestroy {
} else if (event.key === 'ArrowLeft') {
key = 'alt+shift+left';
}
this.viewSrv.keyboardSwitchTab(key);
debouncedSwitch(key);
}
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ <h2 mat-dialog-title> {{ 'Login reminder' | translate }} </h2>

<div *ngSwitchCase="'acl_face_online_not_supported'">
<mat-dialog-content>
<div class="error-message">{{ 'ACL action "Face Online" not supported for this asset.' |translate }}</div>
<div class="error-message">{{errorDetail }}</div>
</mat-dialog-content>
<mat-dialog-actions>
<button (click)="closeDialog()" mat-raised-button>{{ "Close" | translate }}</button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ export class ElementACLDialogComponent implements OnInit {
if (Array.isArray(error)) {
error = error.join(' ');
} else if (typeof error === 'object') {
if (error.detail) {
error = error.detail;
}
error = JSON.stringify(error);
}
return error;
Expand Down

0 comments on commit b2ce9b2

Please sign in to comment.