Skip to content

Commit

Permalink
5/8 checkpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremykross committed May 8, 2019
1 parent 268d0a6 commit 81b8ce8
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 19 deletions.
21 changes: 20 additions & 1 deletion resources/public/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,20 @@ body * {
left: 50%;
}

.modal-underlay .modal .close {
line-height: 26px;
width: 32px;
right: 24px;
top: 24px;
height: 32px;
border: 2px solid black;
text-align: center;
position: absolute;
cursor: pointer;
font-size: 18px;
border-radius: 50%;
}

.select {

}
Expand Down Expand Up @@ -282,7 +296,7 @@ body * {
}

.node:hover {
padding: 16px;
padding: 24px;
}

.node .outline {
Expand Down Expand Up @@ -446,6 +460,11 @@ body * {
color: white;
}

.title-bar .disabled {
pointer-events: none;
opacity: 0.5;
}

.title-bar .import {
cursor: pointer;
flex: 1;
Expand Down
8 changes: 6 additions & 2 deletions src/konstellate/components.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
menu-open?-$
(ulmus/merge
(ulmus/reduce
(fn [v e] (.stopPropagation e) true)
(fn [v e] (.stopPropagation e) (not v))
false
((:recurrent/dom-$ sources) ".workspace-more" "click"))
(ulmus/map (constantly false) ((:recurrent/dom-$ sources) :root "click")))
Expand Down Expand Up @@ -152,7 +152,11 @@
:recurrent/dom-$
(ulmus/map (fn [labels-dom]
`[:div {:class "workload-panel"}
~@labels-dom])
~@(map-indexed
(fn [idx label-dom]
[:div {:style {:z-index (- (count labels-dom) idx)}}
label-dom])
labels-dom)])
(ulmus/pickzip :recurrent/dom-$ (ulmus/map vals labels-$)))}))


Expand Down
23 changes: 7 additions & 16 deletions src/konstellate/core.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,7 @@
(select-keys sources [:recurrent/dom-$])
{:pos-$ (ulmus/signal-of {:top "80px" :right "32px"})
:open?-$ (ulmus/reduce not false ((:recurrent/dom-$ sources) ".more" "click"))
:items-$ (ulmus/signal-of [{:value "export-yaml"
:label "Export To Yaml"}
{:value "export-kustomize"
:items-$ (ulmus/signal-of [{:value "export-kustomize"
:label "Export To Kustomize"}
{:value "export-helm"
:label "Export To Helm"}])}))
Expand Down Expand Up @@ -71,7 +69,7 @@
{}
(map (fn [k] [k ((state/isolate graffle/Graffle
[:workspaces k :edited :yaml])
{:initial-state {}}
{}
(assoc
(select-keys sources [:recurrent/dom-$ :recurrent/state-$])
:selected-nodes-$
Expand Down Expand Up @@ -116,10 +114,10 @@

editor-$
(ulmus/merge
(ulmus/map (fn [[kind workspace]]
(ulmus/map (fn [kind]
((state/isolate editor/Editor
[:workspaces
workspace
@(:selected-$ workspace-list)
:edited
:yaml
(keyword (gensym))])
Expand All @@ -129,14 +127,7 @@
:recurrent/state-$
:swagger-$])
:definitions-$ definitions-$)))
(ulmus/distinct
(ulmus/filter
#(every? identity %)
(ulmus/zip
(:selected-$ kind-picker)
(ulmus/sample-on
(:selected-$ workspace-list)
(:selected-$ kind-picker))))))
(:selected-$ kind-picker))
(ulmus/map (fn [edit-id]
(let [path [:workspaces
@(:selected-$ workspace-list)
Expand Down Expand Up @@ -423,9 +414,9 @@
(recurrent.core/start!
(state/with-state Main)
{}
{:swagger-$ (recurrent.drivers.http/create! swagger-path {:with-credentials? false})
{:swagger-$ (recurrent.drivers.http/create! swagger-path {:with-credentials? false})
:recurrent/dom-$ (recurrent.drivers.rum/create! "app")})))

(set! (.-onerror js/window) #(println %))
;(set! (.-onerror js/window) #(println %))

(.addEventListener js/document "DOMContentLoaded" start!)
3 changes: 3 additions & 0 deletions src/konstellate/style.clj
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,9 @@
:position "relative"
:z-index 20}

[:.disabled {:pointer-events "none"
:opacity 0.5}]

[:.import {:cursor "pointer"
:flex 1
:font-size "16px"
Expand Down

0 comments on commit 81b8ce8

Please sign in to comment.