Skip to content

Commit 662b45c

Browse files
committed
feat(accounts): add basic accounts page
1 parent 8697f4b commit 662b45c

File tree

1 file changed

+22
-5
lines changed

1 file changed

+22
-5
lines changed

src/ui/Accounts.qml

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,33 @@
11
import QtQuick
2+
import QtQuick.Layouts
23
import org.kde.kirigami as Kirigami
4+
import org.kde.kirigamiaddons.formcard as FormCard
5+
import org.kde.kirigamiaddons.labs.components as Components
36

47
Kirigami.ScrollablePage {
58
id: accounts
69

7-
Layout.fillWidth: true
10+
ColumnLayout {
11+
FormCard.FormCard {
12+
Layout.fillWidth: true
813

9-
Kirigami.CardsListView {
10-
id: listAccounts
14+
ColumnLayout {
15+
spacing: 0
1116

12-
delegate: Kirigami.AbstractCard {
13-
contentItem: Flow {
17+
Repeater {
18+
model: Tailscale.accountModel
19+
20+
FormCard.FormButtonDelegate {
21+
required property QtObject modelData
22+
23+
icon.name: "user"
24+
text: modelData.loginName
25+
26+
onClicked: {
27+
Tailscale.switchAccount(modelData.loginName);
28+
}
29+
}
30+
}
1431
}
1532
}
1633
}

0 commit comments

Comments
 (0)