ソースを参照

hover and panel fixes

luis 7 年 前
コミット
b15cfee049

+ 1 - 0
.drone.yml

@@ -59,6 +59,7 @@ pipeline:
     volumes:
       - /var/run/docker.sock:/var/run/docker.sock
       - /home/stdio/.docker/config.json:/root/.docker/config.json
+
   notify:
     image: drillster/drone-email
     from: drone@hexasoftware.com

+ 5 - 3
browser/vue-flow/src/assets/dark-theme.css

@@ -6,8 +6,10 @@
   --background-tertiary: #323232 !important;
   --normal: #eee !important;
   --normal-secondary: #777 !important;
-  --primary: #f57c00 !important;
-  --primary-darker: #b54c00 !important;
+
+  /* --primary: #f57c00 !important; */
+  --primary: #c55c00 !important;
+  --primary-darker: #a53c00 !important;
   --primary-lighter: #ff8c20 !important;
   --node-label: var(--normal) !important;
   --node-socket: var(--primary) !important;
@@ -17,7 +19,7 @@
 }
 
 .dark .primary-inverse {
-  background: var(--primary-darker) !important;
+  background: var(--primary) !important;
 }
 
 .dark .flow-node__body {

+ 6 - 0
browser/vue-flow/src/assets/default-theme.css

@@ -35,6 +35,7 @@
   color: var(--primary-inverse);
 }
 
+button.active:hover::after,
 .primary-inverse:hover::after {
   content: " ";
   position: absolute;
@@ -60,6 +61,11 @@ button {
   color: inherit;
 }
 
+button.active {
+  background: var(--primary);
+  color: var(--primary-inverse);
+}
+
 button::after,
 .hover::after {
   background: var(--primary);

+ 6 - 5
browser/vue-flow/src/components/main.vue

@@ -50,8 +50,8 @@
         >
           <div class="flow-panel__container">
             <div class="flow-panel__selector">
-              <button @click="panel='palette'">Funcs</button>
-              <button @click="panel='inspector';nodeInspect = nodeActive">Inspector</button>
+              <button :class="{active:panel=='palette'}" @click="panel='palette'">Funcs</button>
+              <button :class="{active:panel=='inspector'}" @click="panel='inspector';nodeInspect = nodeActive">Inspector</button>
             </div>
             <transition name="fade">
               <flow-funcs
@@ -319,6 +319,7 @@ export default {
 }
 
 .flow-main  .app-info {
+  opacity:0.5;
   color: #aaa;
   font-size:10px;
   margin:20px;
@@ -355,11 +356,11 @@ export default {
   z-index:100;
   content:" ";
   position:absolute;
-  top:20%;
-  bottom:20%;
+  top:0%;
+  bottom:0%;
   left:0;
   width:10px;
-  background: rgba(0,0,0,0.4);
+  background: rgba(0,0,0,0.5);
   transition: var(--transition-speed);
 }
 

+ 1 - 1
browser/vue-flow/src/components/panel-inspector.vue

@@ -125,7 +125,7 @@ export default {
   display:none;
   background: var(--background);
   font-size:14px;
-  color: var(--primary-darker);
+  color: var(--primary);
   padding:4px 4px;
   border-bottom: solid 1px rgba(150,150,150,0.2);
 }

+ 10 - 1
go/src/flow/flowserver/session.go

@@ -121,7 +121,7 @@ func (s *FlowSession) ClientRemove(c *websocket.Conn) {
 		}
 	}
 	s.Chat.ClientRemove(c)
-	if len(s.clients) == 0 {
+	if len(s.clients) == 0 && s.flow == nil {
 		log.Println("No more clients, remove session")
 		delete(s.mgr.sessions, s.ID) // Clear memory session
 	}
@@ -243,6 +243,15 @@ func (s *FlowSession) NodeRun(c *websocket.Conn, data []byte) error {
 		if s.flow.Err() != nil {
 			log.Println("error processing node", s.flow.Err())
 		}
+		func() {
+			s.Lock()
+			defer s.Unlock()
+			if len(s.clients) == 0 {
+				log.Println("No more clients, remove session")
+				delete(s.mgr.sessions, s.ID) // Clear memory session
+			}
+		}()
+
 	}()
 	return nil
 }