Skip to content

Commit

Permalink
Adds patch "2023-03-17extends_YASGUI_with_explain_functionality_.patch".
Browse files Browse the repository at this point in the history
  • Loading branch information
boyan-tonchev committed Mar 21, 2023
1 parent c7d533c commit bb3cc86
Showing 1 changed file with 39 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
Subject: [PATCH] Extends yasqe with functionality which add/removes "yasqe-fullscreen" class to yasqe element.
---
Index: Yasgui/packages/yasqe/src/index.ts
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/Yasgui/packages/yasqe/src/index.ts b/Yasgui/packages/yasqe/src/index.ts
--- a/Yasgui/packages/yasqe/src/index.ts (revision 2f255c4ef0c7f4fb4481f02a9bf5571dfa300fe5)
+++ b/Yasgui/packages/yasqe/src/index.ts (revision 1434a7c8904c3a5a0b7696b6b4557f567d133cb6)
@@ -167,6 +167,28 @@
this.updateKeyboardShortcuts();
}

+ public toggleFullScreen(): void {
+ if (this.rootEl.classList.contains("yasqe-fullscreen")) {
+ this.leaveFullScreen();
+ } else {
+ const message = this.translationService.translate(
+ "yasqe.keyboard_shortcuts.dialog.item.explain_exit_fullscreen.message"
+ );
+ this.notificationMessageService.info("explain_exit_fullscreen", message);
+ this.enterFullScreen();
+ }
+ }
+
+ public enterFullScreen(): void {
+ addClass(this.rootEl, "yasqe-fullscreen");
+ addClass(document.body, "scroll-hidden");
+ }
+
+ public leaveFullScreen(): void {
+ removeClass(this.rootEl, "yasqe-fullscreen");
+ removeClass(document.body, "scroll-hidden");
+ }
+
private handleQuery(_yasqe: Yasqe, req: superagent.SuperAgentRequest) {
this.req = req;
this.updateQueryButton();

0 comments on commit bb3cc86

Please sign in to comment.