From 00bcdeb50282f1ef266518eabf019de46258e06e Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sun, 29 Nov 2020 23:33:50 +0000 Subject: [PATCH] wip zoom Signed-off-by: Ian Jackson --- templates/landscape.tera | 3 ++- templates/macros.tera | 12 ++++++++++++ templates/script.ts | 12 ++++++++++++ templates/session.tera | 3 ++- 4 files changed, 28 insertions(+), 2 deletions(-) diff --git a/templates/landscape.tera b/templates/landscape.tera index 58d27a55..b97a8319 100644 --- a/templates/landscape.tera +++ b/templates/landscape.tera @@ -36,7 +36,8 @@ {{ m::nick() }} | {{ m::status() }}
- switch to portrait view + switch to portrait view | + {{ m::zoom() }}
{{ m::wresting() }}
diff --git a/templates/macros.tera b/templates/macros.tera index ad4b9e34..e485216b 100644 --- a/templates/macros.tera +++ b/templates/macros.tera @@ -32,6 +32,18 @@ Hi {{nick | escape}} nothing {% endmacro status %} +{% macro zoom() %} +%< + /span> +{% endmacro status %} + {% macro errors() %}

 {% endmacro errors %}
diff --git a/templates/script.ts b/templates/script.ts
index 893a869d..14bfe914 100644
--- a/templates/script.ts
+++ b/templates/script.ts
@@ -881,6 +881,18 @@ function add_timestamped_log_message(ts_html: string, msg_html: string) {
   }
 }
 
+// ----- zoom -----
+
+function zoom_enable() {
+  (document.getElementById("zoom-btn") as any).disabled = false;
+}
+
+function zoom_activate() {
+  let zoom_val = document.getElementById("zoom-val");
+  console.log(zoom_val);
+  (document.getElementById("zoom-btn") as any).disabled = true;
+}
+
 // ----- test counter, startup -----
 
 messages.Piece = function
diff --git a/templates/session.tera b/templates/session.tera
index 9834eb57..b3cd770f 100644
--- a/templates/session.tera
+++ b/templates/session.tera
@@ -36,7 +36,8 @@
 |
 {{ m::status() }}
 |
-switch to landscape view
+switch to landscape view |
+{{ m::zoom() }}
 {{ m::errors() }}
 
 {{ m::space() }}
-- 
2.30.2