42 lines
1.1 KiB
Plaintext
42 lines
1.1 KiB
Plaintext
|
|
import { LineEdit, StandardListView, Button } from "std-widgets.slint";
|
||
|
|
import { Style } from "globals.slint";
|
||
|
|
import { IconButton } from "widgets/icon-button.slint";
|
||
|
|
|
||
|
|
export component UsersView inherits HorizontalLayout {
|
||
|
|
padding: Style.spacing;
|
||
|
|
spacing: Style.spacing;
|
||
|
|
in property <[StandardListViewItem]> model <=> list_view_sites.model;
|
||
|
|
in-out property <int> current-item <=> list_view_sites.current-item;
|
||
|
|
callback pw_edited <=> line_edit_site_pw.edited;
|
||
|
|
callback pw_accepted <=> line_edit_site_pw.accepted;
|
||
|
|
VerticalLayout {
|
||
|
|
spacing: Style.spacing;
|
||
|
|
Text {
|
||
|
|
text: "Username:";
|
||
|
|
}
|
||
|
|
|
||
|
|
line_edit_site_pw := LineEdit {
|
||
|
|
input-type: InputType.text;
|
||
|
|
placeholder-text: "Full Name";
|
||
|
|
}
|
||
|
|
|
||
|
|
list_view_sites := StandardListView {
|
||
|
|
model: [
|
||
|
|
{ text: "Test" },
|
||
|
|
{ text: "Test" },
|
||
|
|
];
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
VerticalLayout {
|
||
|
|
spacing: Style.spacing;
|
||
|
|
IconButton {
|
||
|
|
icon: @image-url("images/key.svg");
|
||
|
|
}
|
||
|
|
|
||
|
|
IconButton {
|
||
|
|
icon: @image-url("images/trash-2.svg");
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|