Skip to content

Commit

Permalink
Fix invites page, finally
Browse files Browse the repository at this point in the history
  • Loading branch information
pontaoski committed Nov 16, 2020
1 parent 20761ac commit 58cca85
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 37 deletions.
2 changes: 1 addition & 1 deletion resources/StaccatoDrawer.qml
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ Item {
}
ToolButton {
icon.name: "settings-configure"
onClicked: colView.layers.push(Qt.resolvedUrl("Invites.qml"), {"inviteModel": channelsModel.model.invitesModel()})
onClicked: root.pageStack.layers.push(Qt.resolvedUrl("Invites.qml"), {"inviteModel": channelsModel.model.invitesModel()})
}
ToolButton {
icon.name: "list-add"
Expand Down
77 changes: 41 additions & 36 deletions resources/main.qml
Original file line number Diff line number Diff line change
Expand Up @@ -14,51 +14,56 @@ Kirigami.ApplicationWindow {
width: 1000

pageStack.globalToolBar.showNavigationButtons: 0
pageStack.initialPage: Kirigami.Page {
padding: 0
globalToolBarStyle: Kirigami.ApplicationHeaderStyle.None
Kirigami.Theme.colorSet: Kirigami.Theme.View

OverlappingPanels {
anchors.fill: parent
OverlappingPanels {
anchors.fill: parent

leftPanel: StaccatoDrawer { id: leftHandDrawer }
rightPanel: RightDrawer { id: rightHandDrawer }
centerPanel: Kirigami.PageRow {
id: colView
implicitWidth: 400
onImplicitWidthChanged: implicitWidth = 400
columnView {
columnResizeMode: Kirigami.ColumnView.SingleColumn
}
globalToolBar {
style: Kirigami.ApplicationHeaderStyle.ToolBar
}

Connections {
target: HState
function onLoggedIn() {
routerInstance.navigateToRoute("no-guild")
leftHandDrawer.shouldShow = true
leftPanel: StaccatoDrawer { id: leftHandDrawer }
rightPanel: RightDrawer { id: rightHandDrawer }
centerPanel: Kirigami.PageRow {
id: colView
implicitWidth: 400
onImplicitWidthChanged: implicitWidth = 400
columnView {
columnResizeMode: Kirigami.ColumnView.SingleColumn
}
globalToolBar {
style: Kirigami.ApplicationHeaderStyle.ToolBar
}
}

Kirigami.PageRouter {
id: routerInstance

initialRoute: {
if (HState.startupLogin()) {
Connections {
target: HState
function onLoggedIn() {
routerInstance.navigateToRoute("no-guild")
leftHandDrawer.shouldShow = true
return "no-guild"
} else {
return "login"
}
}
pageStack: colView.columnView

property var guildSheet: GuildSheet {
id: guildSheet
}
Kirigami.PageRouter {
id: routerInstance

initialRoute: {
if (HState.startupLogin()) {
leftHandDrawer.shouldShow = true
return "no-guild"
} else {
return "login"
}
}
pageStack: colView.columnView

LoginRoute {}
NoGuildRoute {}
MessagesRoute {}
property var guildSheet: GuildSheet {
id: guildSheet
}

LoginRoute {}
NoGuildRoute {}
MessagesRoute {}
}
}
}
}
Expand Down

0 comments on commit 58cca85

Please sign in to comment.