-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhome_assistant.slint
More file actions
94 lines (77 loc) · 2.67 KB
/
Copy pathhome_assistant.slint
File metadata and controls
94 lines (77 loc) · 2.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
import { Button, Palette } from "std-widgets.slint";
export component HomeAssistant inherits Rectangle {
in-out property <string> home-assistant-url: "";
callback back-clicked();
background: Palette.background;
VerticalLayout {
alignment: start;
padding: 16px;
spacing: 16px;
// back button
HorizontalLayout {
alignment: start;
Button {
text: "← Back";
width: 150px;
height: 60px;
clicked => {
root.back-clicked();
}
}
}
// status panel behind fullscreen Chromium
Rectangle {
background: #1a1a1a;
border-width: 2px;
border-color: #333333;
border-radius: 8px;
vertical-stretch: 1;
VerticalLayout {
alignment: center;
padding: 32px;
spacing: 12px;
Text {
text: "🏠";
font-size: 64px;
horizontal-alignment: center;
}
Text {
text: "Home Assistant Opened!";
font-size: 28px;
font-weight: 700;
color: #4caf50;
horizontal-alignment: center;
}
Text {
text: "Chromium is running in fullscreen";
font-size: 16px;
color: #cccccc;
horizontal-alignment: center;
}
Rectangle { height: 8px; }
Text {
text: root.home-assistant-url != "" ? root.home-assistant-url : "No URL configured";
font-size: 13px;
color: #888888;
horizontal-alignment: center;
wrap: word-wrap;
}
Rectangle { height: 24px; }
Text {
text: "If you see this screen instead of Home Assistant:";
font-size: 14px;
font-weight: 600;
color: #ff9800;
horizontal-alignment: center;
}
Text {
text: "• Make sure chromium is installed\n• Check .config/dramma.toml has the correct home_assistant_url\n• You can close this page with POST /close-hass";
font-size: 13px;
color: #999999;
horizontal-alignment: center;
wrap: word-wrap;
}
}
}
}
}