Commit 3a9c9a75 authored by Francesc Guasch's avatar Francesc Guasch
Browse files

refactor(frontend): polish main screen

- fit long buttons
- set language only if defined
parent d76a84b5
...@@ -1416,7 +1416,7 @@ sub _logged_in { ...@@ -1416,7 +1416,7 @@ sub _logged_in {
if ($login) { if ($login) {
$USER = Ravada::Auth::SQL->new(name => $login); $USER = Ravada::Auth::SQL->new(name => $login);
#Mojolicious::Plugin::I18N:: #Mojolicious::Plugin::I18N::
$c->languages($USER->language); $c->languages($USER->language) if $USER->language();
$c->stash(_logged_in => $login ); $c->stash(_logged_in => $login );
$c->stash(_user => $USER); $c->stash(_user => $USER);
......
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
width="260"></a> width="260"></a>
</div> </div>
<div class="card-body" id="step2"> <div class="card-body" id="step2">
<div class="row">
<a type="button" class="btn btn-success" ng-hide="machine.action" <a type="button" class="btn btn-success" ng-hide="machine.action"
href="/machine/clone/{{machine.id}}.html"><strong><i class="fa fa-play" aria-hidden="true"></i>&nbsp;<%=l 'Start' %></strong></a> href="/machine/clone/{{machine.id}}.html"><strong><i class="fa fa-play" aria-hidden="true"></i>&nbsp;<%=l 'Start' %></strong></a>
<a type="button" class="btn btn-danger text-white" <a type="button" class="btn btn-danger text-white"
...@@ -50,26 +51,26 @@ ...@@ -50,26 +51,26 @@
><%=l 'Yes' %></a> ><%=l 'Yes' %></a>
</div> </div>
<a ng-show="machine.is_active && !machine.action" <a ng-show="machine.is_active && !machine.action"
class="btn btn-light" class="btn btn-outline-secondary"
ng-click="machine.action=true;$parent.refresh=20" ng-click="machine.action=true;$parent.refresh=20"
type="button"><%=l 'action'%></a> type="button"><%=l 'action'%></a>
<div class="btn-group" <div class="btn-group"
ng-show="machine.action && !host_restore" ng-show="machine.action && !host_restore"
> >
<a type="button" class="btn btn-light btn-sm" <button type="button" class="btn btn-outline-dark btn-sm"
ng-show="machine.can_remove" ng-show="machine.can_remove"
ng-click="host_restore=machine.id_clone" ng-click="host_restore=machine.id_clone"
><%=l 'Restore' %></a> ><%=l 'Restore' %></button>
<a ng-show="machine.is_active" type="button" <button ng-show="machine.is_active" type="button"
class="btn btn-light btn-sm" class="btn btn-outline-dark btn-sm"
ng-click="machine.action=false;action(machine,'shutdown')" ng-click="machine.action=false;action(machine,'shutdown')"
><%=l 'Shutdown'%></a> ><%=l 'Shutdown'%></button>
<a ng-show="machine.is_active && machine.can_hibernate" type="button" <button ng-show="machine.is_active && machine.can_hibernate" type="button"
class="btn btn-light btn-sm" class="btn btn-outline-dark"
ng-click="machine.action=false;action(machine,'hibernate')" ng-click="machine.action=false;action(machine,'hibernate')"
><%=l 'Hibernate' %></a> ><%=l 'Hibernate' %></button>
<a <a
ng-click="machine.action=false" ng-click="machine.action=false"
...@@ -80,7 +81,7 @@ ...@@ -80,7 +81,7 @@
<a ng-show="machine.id_clone && !machine.action && host_restore != machine.id_clone" <a ng-show="machine.id_clone && !machine.action && host_restore != machine.id_clone"
align="right" href="/machine/manage/{{machine.id_clone}}.html"><i class="fa fa-fw fa-cog" title="<%=l 'Settings' %>"></i></a> align="right" href="/machine/manage/{{machine.id_clone}}.html"><i class="fa fa-fw fa-cog" title="<%=l 'Settings' %>"></i></a>
% } % }
</div>
</div> </div>
</div> </div>
</div> </div>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment