Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
PIM
Itinerary
Commits
0647578c
Commit
0647578c
authored
Dec 03, 2020
by
Volker Krause
Browse files
Use new API from KOpeningHours for showing a current state description
parent
c899b631
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/app/IndoorMapInfoSheetOpeningHoursDelegate.qml
View file @
0647578c
...
...
@@ -30,24 +30,7 @@ Column {
property
var
currentInterval
:
root
.
oh
.
interval
(
new
Date
())
id
:
currentState
text
:
{
if
(
oh
.
error
!=
OpeningHours
.
NoError
)
{
return
""
;
}
/* TODO if (i.end) Math.round((i.end - Date.now())/60000) + " more minutes."; */
switch
(
currentInterval
.
state
)
{
case
Interval
.
Open
:
return
"
Currently open
"
;
break
;
case
Interval
.
Closed
:
return
"
Currently closed
"
;
break
;
case
Interval
.
Unknown
:
case
Interval
.
Invalid
:
return
""
;
}
}
text
:
intervalModel
.
currentState
// TODO we could update this every minute
color
:
{
switch
(
currentInterval
.
state
)
{
case
Interval
.
Open
:
return
Kirigami
.
Theme
.
positiveTextColor
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment