stabilizes Header and Player bars

This commit is contained in:
2019-11-02 00:42:04 +01:00
parent 1a23eb4c31
commit b5a50bd039
2 changed files with 61 additions and 24 deletions

62
main.js
View File

@@ -6825,11 +6825,13 @@ var $author$project$Main$viewHeaderBar = function (model) {
_List_fromArray(
[
$elm$html$Html$Attributes$class('navbar-item'),
$elm$html$Html$Attributes$href('/coffre')
$elm$html$Html$Attributes$href(
(!model.player.id) ? '/nouveau-tresor' : '/coffre')
]),
_List_fromArray(
[
$elm$html$Html$text('Coffre de groupe')
$elm$html$Html$text(
(!model.player.id) ? 'Nouveau loot' : 'Coffre de groupe')
]))
]))
]))
@@ -6912,40 +6914,64 @@ var $author$project$Main$showWealth = function (wealth) {
]);
};
var $elm$html$Html$button = _VirtualDom_node('button');
var $author$project$Main$actionButton = function (t) {
return A2(
$elm$html$Html$button,
_List_fromArray(
[
$elm$html$Html$Attributes$class('button')
]),
_List_fromArray(
[
$elm$html$Html$text(t)
]));
};
var $author$project$Main$actionButton = F3(
function (t, n, c) {
return A2(
$elm$html$Html$button,
_List_fromArray(
[
$elm$html$Html$Attributes$class('button is-rounded is-' + c)
]),
_List_fromArray(
[
A2(
$elm$html$Html$span,
_List_fromArray(
[
$elm$html$Html$Attributes$class('icon')
]),
_List_fromArray(
[
A2(
$elm$html$Html$i,
_List_fromArray(
[
$elm$html$Html$Attributes$class('fas fa-' + n)
]),
_List_Nil)
])),
A2(
$elm$html$Html$span,
_List_Nil,
_List_fromArray(
[
$elm$html$Html$text(t)
]))
]));
});
var $author$project$Main$viewPlayerAction = F2(
function (player, route) {
switch (route.$) {
case 'PlayerChest':
return _List_fromArray(
[
$author$project$Main$actionButton('Vendre')
A3($author$project$Main$actionButton, 'Vendre', 'coins', 'danger')
]);
case 'GroupLoot':
return _List_fromArray(
[
$author$project$Main$actionButton('Demander')
A3($author$project$Main$actionButton, 'Demander', 'coins', 'primary')
]);
case 'Merchant':
return _List_fromArray(
[
$author$project$Main$actionButton('Acheter')
A3($author$project$Main$actionButton, 'Acheter', 'coins', 'success')
]);
default:
return _List_fromArray(
[
$author$project$Main$actionButton('Valider')
A3($author$project$Main$actionButton, 'Valider', 'coins', 'primary'),
A3($author$project$Main$actionButton, 'Annuler', 'coins', 'danger')
]);
}
});