2019-03-24 05:27:49 -04:00
|
|
|
/*
|
2020-03-25 15:19:26 -04:00
|
|
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
* SPDX-FileCopyrightText: 2019 Bhushan Shah <bshah@kde.org>
|
2021-02-10 17:06:26 -05:00
|
|
|
* SPDX-FileCopyrightText: 2019-2021 Johan Ouwerkerk <jm.ouwerkerk@gmail.com>
|
2019-03-24 05:27:49 -04:00
|
|
|
*/
|
|
|
|
|
2021-02-10 17:06:26 -05:00
|
|
|
import org.kde.kirigami 2.12 as Kirigami
|
2021-02-22 15:22:35 -05:00
|
|
|
import QtQml 2.15
|
|
|
|
|
|
|
|
import Keysmith.Application 1.0 as Application
|
2019-03-24 05:27:49 -04:00
|
|
|
|
|
|
|
Kirigami.ApplicationWindow {
|
|
|
|
id: root
|
|
|
|
|
2021-12-09 22:18:07 -05:00
|
|
|
width: Kirigami.Units.gridUnit * 28
|
|
|
|
height: Kirigami.Units.gridUnit * 28
|
|
|
|
|
2021-02-10 17:06:26 -05:00
|
|
|
Kirigami.PageRouter {
|
|
|
|
id: router
|
|
|
|
initialRoute: "__init__"
|
|
|
|
pageStack: root.pageStack.columnView
|
2020-02-29 17:49:44 -05:00
|
|
|
|
2021-02-10 17:06:26 -05:00
|
|
|
// FIXME: dummy just to have a valid initialRoute
|
|
|
|
Kirigami.PageRoute {
|
|
|
|
name: "__init__"
|
|
|
|
Component {
|
|
|
|
Kirigami.Page {
|
|
|
|
}
|
2019-03-24 05:27:49 -04:00
|
|
|
}
|
|
|
|
}
|
2019-12-27 13:04:07 -05:00
|
|
|
|
2021-02-10 17:06:26 -05:00
|
|
|
Kirigami.PageRoute {
|
2021-02-22 15:22:35 -05:00
|
|
|
name: Application.Keysmith.navigation.name(Application.Navigation.SetupPassword)
|
2021-02-10 17:06:26 -05:00
|
|
|
Component {
|
|
|
|
SetupPassword {
|
2021-02-22 15:22:35 -05:00
|
|
|
vm: Kirigami.PageRouter.data
|
2021-02-10 17:06:26 -05:00
|
|
|
}
|
2020-09-30 15:50:12 -04:00
|
|
|
}
|
2021-02-10 17:06:26 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
Kirigami.PageRoute {
|
2021-02-22 15:22:35 -05:00
|
|
|
name: Application.Keysmith.navigation.name(Application.Navigation.UnlockAccounts)
|
2021-02-10 17:06:26 -05:00
|
|
|
Component {
|
|
|
|
UnlockAccounts {
|
2021-02-22 15:22:35 -05:00
|
|
|
vm: Kirigami.PageRouter.data
|
2021-02-10 17:06:26 -05:00
|
|
|
}
|
2020-09-30 15:50:12 -04:00
|
|
|
}
|
2021-02-10 17:06:26 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
Kirigami.PageRoute {
|
2021-02-22 15:22:35 -05:00
|
|
|
name: Application.Keysmith.navigation.name(Application.Navigation.AccountsOverview)
|
2021-02-10 17:06:26 -05:00
|
|
|
Component {
|
|
|
|
AccountsOverview {
|
2021-02-22 15:22:35 -05:00
|
|
|
vm: Kirigami.PageRouter.data
|
2021-02-10 17:06:26 -05:00
|
|
|
}
|
2020-09-30 15:50:12 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-02-10 17:06:26 -05:00
|
|
|
Kirigami.PageRoute {
|
2021-02-22 15:22:35 -05:00
|
|
|
name: Application.Keysmith.navigation.name(Application.Navigation.AddAccount)
|
2021-02-10 17:06:26 -05:00
|
|
|
Component {
|
|
|
|
AddAccount {
|
2021-02-22 15:22:35 -05:00
|
|
|
vm: Kirigami.PageRouter.data
|
2021-02-10 17:06:26 -05:00
|
|
|
}
|
2020-09-30 15:50:12 -04:00
|
|
|
}
|
2021-02-10 17:06:26 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
Kirigami.PageRoute {
|
2021-02-22 15:22:35 -05:00
|
|
|
name: Application.Keysmith.navigation.name(Application.Navigation.RenameAccount)
|
2021-02-10 17:06:26 -05:00
|
|
|
Component {
|
|
|
|
RenameAccount {
|
2021-02-22 15:22:35 -05:00
|
|
|
vm: Kirigami.PageRouter.data
|
2021-02-10 17:06:26 -05:00
|
|
|
}
|
2020-09-30 15:50:12 -04:00
|
|
|
}
|
2021-02-10 17:06:26 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
Kirigami.PageRoute {
|
2021-02-22 15:22:35 -05:00
|
|
|
name: Application.Keysmith.navigation.name(Application.Navigation.ErrorPage)
|
2021-02-10 17:06:26 -05:00
|
|
|
Component {
|
|
|
|
ErrorPage {
|
2021-02-22 15:22:35 -05:00
|
|
|
vm: Kirigami.PageRouter.data
|
2021-02-10 17:06:26 -05:00
|
|
|
}
|
2020-09-30 15:50:12 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-02-11 14:52:30 -05:00
|
|
|
Connections {
|
2021-02-22 15:22:35 -05:00
|
|
|
target: Application.Keysmith.navigation
|
2021-02-11 14:52:30 -05:00
|
|
|
function onRouted (route, data) {
|
2021-02-22 15:22:35 -05:00
|
|
|
router.navigateToRoute({route, data});
|
2021-02-11 14:52:30 -05:00
|
|
|
}
|
|
|
|
function onPushed(route, data) {
|
2021-02-22 15:22:35 -05:00
|
|
|
router.pushRoute({route, data});
|
2020-09-30 15:50:12 -04:00
|
|
|
}
|
2020-02-29 17:49:44 -05:00
|
|
|
}
|
2019-03-24 05:27:49 -04:00
|
|
|
}
|