From 81bb14a812e294767d1c6b6ff7927a414a2fa81d Mon Sep 17 00:00:00 2001 From: jtc42 Date: Mon, 10 Jun 2019 08:33:53 +0100 Subject: [PATCH] Added custom left-tab logic --- src/App.vue | 58 +++++++++++++++++++++++++---------------------------- 1 file changed, 27 insertions(+), 31 deletions(-) diff --git a/src/App.vue b/src/App.vue index adb06227..b2b84b4a 100644 --- a/src/App.vue +++ b/src/App.vue @@ -6,31 +6,29 @@
-
    -
  • -
  • -
  • -
  • -
  • -
+
+ + + + +
-
-
    -
  • -
  • -
  • -
  • -
  • -
+
+
+
+
+
+
+
  • @@ -75,6 +73,8 @@ export default { data: function () { return { + currentTab: 'connect', + showControlBar: true, window: { width: 0, height: 0 @@ -85,20 +85,6 @@ export default { created: function () { var context = this - function handleSidebarEvent(context, event){ - if (event.target.id == 'left-panel-container') { - console.log("Sidebar hidden") - context.$root.$emit('globalResizePreview') - } - } - - UIkit.util.on(document, 'hidden', '#left-panel-container', function (e) { - handleSidebarEvent(context, e) - }) - UIkit.util.on(document, 'shown', '#left-panel-container', function (e) { - handleSidebarEvent(context, e) - }) - window.addEventListener('resize', this.handleResize) this.handleResize(); @@ -133,6 +119,16 @@ export default { }, methods: { + setTab: function(tabName) { + if (this.currentTab == tabName) { + this.showControlBar = !this.showControlBar + } + else { + this.showControlBar = true + this.currentTab = tabName + } + }, + handleResize: function(event) { this.window.width = window.innerWidth; this.window.height = window.innerHeight;