1
1
<script setup>
2
- import IconBandaid from ' ./components/icons/IconBandaid.vue' ;
3
- import IconGithub from ' ./components/icons/IconGithub.vue' ;
4
- import InputCodeEditor from ' ./components/InputCodeEditor.vue' ;
5
- import FileLoader from ' ./components/FileLoader.vue' ;
6
- import ParseButton from ' ./components/ParseButton.vue' ;
7
- import NodesList from ' ./components/NodesList.vue' ;
8
- import FilterEditor from ' ./components/FilterEditor.vue' ;
2
+ import store from ' ./store' ;
3
+ import {computed } from ' vue' ;
9
4
import ToasterView from ' ./components/ToasterView.vue' ;
5
+ import ExplorationTab from ' ./tabs/ExplorationTab.vue' ;
6
+ import IconGithub from ' ./components/icons/IconGithub.vue' ;
7
+ import IconBandaid from ' ./components/icons/IconBandaid.vue' ;
8
+ // import TransformationTab from './tabs/TransformationTab.vue';
9
+
10
+ const tabs = {
11
+ explore: ExplorationTab,
12
+ // transform: TransformationTab,
13
+ };
14
+
15
+ const availableTabs = computed (() => Object .keys (tabs));
10
16
11
- const navItems = [
12
- FileLoader,
13
- ParseButton,
14
- ];
15
17
</script >
16
18
17
19
<template >
@@ -21,11 +23,9 @@ const navItems = [
21
23
<icon-bandaid />
22
24
<span class =" nav-title" >fl<b >AST</b >er</span >
23
25
</span >
24
- <span class =" nav-items" >
25
- <span v-for =" navItem of navItems" :key =" navItem" class =" nav-item" >
26
- <component :is =" navItem" ></component >
27
- </span >
28
- </span >
26
+ <!-- <span class="tabs">-->
27
+ <!-- <button class="btn tab-btn" v-for="tabName in availableTabs" :key="tabName" @click="store.currentTab = tabName">{{tabName}}</button>-->
28
+ <!-- </span>-->
29
29
<span title =" View code on GitHub" >
30
30
<a href =" https://github.com/ctrl-escp/flaster" title =" flASTer on GitHub" >
31
31
<span class =" github-text" >View on GitHub</span >
@@ -34,15 +34,11 @@ const navItems = [
34
34
</span >
35
35
</nav >
36
36
</header >
37
- <div class =" panes" >
38
- <div class =" pane-top" >
39
- <input-code-editor />
40
- <nodes-list />
41
- </div >
42
- <div class =" pane-bottom" >
43
- <filter-editor />
44
- </div >
45
- </div >
37
+ <main >
38
+ <keep-alive >
39
+ <component :is =" tabs[store.currentTab]" />
40
+ </keep-alive >
41
+ </main >
46
42
<toaster-view />
47
43
</template >
48
44
@@ -61,6 +57,10 @@ a:link {
61
57
margin-right : 10px ;
62
58
}
63
59
60
+ main {
61
+ margin-top : .5rem ;
62
+ }
63
+
64
64
nav {
65
65
background-color : #212121 ;
66
66
display : flex ;
70
70
height : var (--nav-height );
71
71
}
72
72
73
- .nav-items {
74
- display : flex ;
75
- flex-direction : row ;
76
- }
77
-
78
- .nav-item {
79
- margin : 0 5px ;
80
- }
81
-
82
73
.nav-left {
83
74
display : flex ;
84
75
align-items : center ;
@@ -88,22 +79,13 @@ nav {
88
79
font-size : 2.4rem ;
89
80
}
90
81
91
- .pane-bottom {
92
- flex : 1 ;
93
- display : flex ;
94
- }
82
+ .tab-btn {
83
+ text-transform : capitalize ;
95
84
96
- .pane-top {
97
- flex : 1 ;
98
- display : flex ;
99
- flex-wrap : wrap ;
100
85
}
101
86
102
- .panes {
87
+ .tabs {
103
88
display : flex ;
104
- flex-direction : column ;
105
- height : calc (95vh - var (--nav-height ));
106
- gap : .2rem ;
107
- width : 100% ;
89
+ gap : 1rem ;
108
90
}
109
91
</style >
0 commit comments