Skip to content

Commit

Permalink
Move PageSettingsMenu to RightSidebar
Browse files Browse the repository at this point in the history
  • Loading branch information
fdietze committed Aug 21, 2019
1 parent 13bcb13 commit 6acbade
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion webApp/src/main/scala/wust/webApp/views/PageHeader.scala
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ object PageHeader {

VDomModifier(
pinButton,
PageSettingsMenu(channelId).apply(buttonStyle, fontSize := "20px"),
// PageSettingsMenu(channelId).apply(buttonStyle, fontSize := "20px"),
)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ object PageSettingsMenu {
GlobalState.graph().pinnedNodeIdx(userIdx).contains(channelIdx)
}

private def sidebarMenuItems(channelId: NodeId)(implicit ctx: Ctx.Owner) = {
def sidebarMenuItems(channelId: NodeId)(implicit ctx: Ctx.Owner) = {
val isBookmarked = nodeIsBookmarked( channelId)

val channelAsNode: Rx[Option[Node]] = Rx {
Expand Down
11 changes: 9 additions & 2 deletions webApp/src/main/scala/wust/webApp/views/RightSidebar.scala
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package wust.webApp.views

import acyclic.file
import fontAwesome.freeSolid
import outwatch.dom._
import outwatch.dom.dsl._
Expand Down Expand Up @@ -187,7 +186,15 @@ object RightSidebar {
flexDirection.column,
justifyContent.flexStart,
boxShadow := "none", //explicitly overwrite boxshadow from accordion.
)
),
div(
cls := "ui secondary menu",
flexWrap.wrap,
flexDirection.column,
height := "600px",
justifyContent.spaceAround,
PageSettingsMenu.sidebarMenuItems(focusPref.nodeId)
)
)
}
private def viewContent(focusPref: FocusPreference, parentIdAction: Option[NodeId] => Unit, nodeStyle: PageStyle, viewRender: ViewRenderLike)(implicit ctx: Ctx.Owner) = {
Expand Down

0 comments on commit 6acbade

Please sign in to comment.