Commit 601f0d0b authored by Mathieu's avatar Mathieu
Browse files

Refactor Foldel/File button

parent bb79b3de
Pipeline #1250 failed with stage
in 13 minutes and 38 seconds
......@@ -68,8 +68,8 @@ class TreeNodePanel(val treeNodeManager: TreeNodeManager, fileDisplayer: FileDis
lazy val addRootDirButton = {
val folder = ToggleState("Folder", btn_primary_string, () {})
val file = ToggleState("File", btn_secondary_string, () {})
val folder = ToggleState("Folder", s"btn $btn_danger_string folder-or-file", () {})
val file = ToggleState("File", s"btn $btn_danger_string folder-or-file", () {})
toggle(folder, true, file, () {})
}
......@@ -132,7 +132,9 @@ class TreeNodePanel(val treeNodeManager: TreeNodeManager, fileDisplayer: FileDis
}.map { sp
goToDirButton(sp, s" ${sp.name} / ")
},
div(glyph_plus, cls := "plus-button", onClick --> { _ plusFile.update(!_) })
div(glyph_plus, cls <-- plusFile.signal.map { pf
"plus-button" + { if (pf) " selected" else "" }
}, onClick --> { _ plusFile.update(!_) })
)
},
plusFile.signal.expand(createFileTool),
......
......@@ -482,6 +482,7 @@ padding-bottom: 90px;
flex: 0 0 20px;
margin-right: 5px;
cursor: pointer;
margin-left:10px;
}
.file1{
......@@ -791,4 +792,18 @@ padding-bottom: 90px;
font-size: 20px;
color: #3086b5;
margin-left:10px;
}
.plus-button.selected {
background-color: #3086b5;
color: white;
}
.btn.btn-danger .bi-caret-right-fill {
font-size: 14px;
}
.folder-or-file {
width: 80px;
padding: 5px;
}
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment