summaryrefslogtreecommitdiff
path: root/lib/Travelynx/Controller
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2019-04-23 22:27:13 +0200
committerDaniel Friesel <derf@finalrewind.org>2019-04-23 22:27:13 +0200
commit6c1cae86f4fa343b4f165f80a4e42eba37fa917c (patch)
tree273fcc63fd249a766b39855f5dc3f60b4dcecb26 /lib/Travelynx/Controller
parentffaa0c44a78bb4bab632fcb76b668215da4c0a82 (diff)
Primitive auto-refresh of current journey status
Todo: Redirect user to destination station upon arrival
Diffstat (limited to 'lib/Travelynx/Controller')
-rwxr-xr-xlib/Travelynx/Controller/Traveling.pm14
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/Travelynx/Controller/Traveling.pm b/lib/Travelynx/Controller/Traveling.pm
index d8e5e03..73a079c 100755
--- a/lib/Travelynx/Controller/Traveling.pm
+++ b/lib/Travelynx/Controller/Traveling.pm
@@ -19,6 +19,20 @@ sub homepage {
}
}
+sub status_card {
+ my ($self) = @_;
+ my $status = $self->get_user_status;
+
+ delete $self->stash->{layout};
+
+ if ( $status->{checked_in} ) {
+ $self->render( '_checked_in', status => $status );
+ }
+ else {
+ $self->render( '_checked_out', status => $status );
+ }
+}
+
sub geolocation {
my ($self) = @_;