More work on enhanced apps

This commit is contained in:
Kode
2022-03-15 20:09:22 +00:00
parent 1e35f83fed
commit ed3dbf2f14
8 changed files with 89 additions and 9 deletions

View File

@@ -130,8 +130,10 @@ $.when( $.ready ).then(function() {
$('#sortable').on('mouseenter', '.item', function () {
$(this).siblings('.tooltip').addClass('active')
$('.refresh', this).addClass('active')
}).on('mouseleave', '.item', function () {
$(this).siblings('.tooltip').removeClass('active')
$('.refresh', this).removeClass('active')
})
$('#search-container').on('input', 'input[name=q]', function () {

View File

@@ -221,10 +221,40 @@ body {
&.active {
transform: translateY(0);
opacity: 1;
z-index: 2;
z-index: 4;
}
}
}
.tile-actions {
position: absolute;
top: 0px;
left: 0;
padding: 7px;
background: #000000d9;
font-size: 12px;
line-height: 1;
border-radius: 6px;
width: 80px;
height: 90px;
display: flex;
opacity: 0;
align-items: center;
justify-content: center;
transition: all 0.3s;
flex-direction: column;
text-align: center;
cursor: pointer;
&.active {
opacity: 1;
}
}
.refresh {
z-index: 3;
.icon {
font-size: 20px;
margin-bottom: 5px;
}
}
.black {
color: #000!important;
}
@@ -717,6 +747,8 @@ div.create {
position: relative;
width: 100%;
max-width: 620px;
position: relative;
z-index: 4;
form {
width: 100%;
}

View File

@@ -12,6 +12,14 @@
@endif
</div>
<a rel="noopener noreferrer" title="{{ App\Item::getApplicationDescription($app->class) }}" class="link{{ title_color($app->colour) }}"{!! $app->link_target !!} href="{{ $app->link }}"><i class="fas {{ $app->link_icon }}"></i></a>
@if($app->enhanced() === true)
<div class="tile-actions refresh">
<div class="icon">
<i class="fas fa-arrow-rotate-right"></i>
</div>
Refresh Stats
</div>
@endif
</div>
<a class="item-edit" href="{{ route($app->link_type.'.edit', [ $app->id ]) }}"><i class="fas fa-pencil"></i></a>
@if(App\Item::getApplicationDescription($app->class) !== '')<div class="tooltip">{{ App\Item::getApplicationDescription($app->class) }}</div>@endif