mirror of
https://github.com/linuxserver/Heimdall.git
synced 2026-02-21 12:10:34 +09:00
Fix for old apps and icon selector
This commit is contained in:
@@ -153,7 +153,6 @@ abstract class SupportedApps
|
||||
$app->icon = 'icons/'.$details->icon;
|
||||
$app->website = $details->website;
|
||||
$app->license = $details->license;
|
||||
$app->appdescription = $details->description;
|
||||
|
||||
$appclass = $app->class();
|
||||
$application = new $appclass;
|
||||
|
||||
38
public/css/app.css
vendored
38
public/css/app.css
vendored
@@ -891,6 +891,44 @@ div.create .input input, div.create .input select {
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
#websiteiconoptions {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 20px;
|
||||
}
|
||||
#websiteiconoptions .results {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
}
|
||||
#websiteiconoptions .header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
padding: 10px 0;
|
||||
}
|
||||
#websiteiconoptions .selectclose {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.iconbutton {
|
||||
width: 160px;
|
||||
height: 160px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.selecticon {
|
||||
max-width: 120px;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.switch {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
|
||||
2
public/mix-manifest.json
generated
2
public/mix-manifest.json
generated
@@ -1,4 +1,4 @@
|
||||
{
|
||||
"/css/app.css": "/css/app.css?id=57a0971ee7b40dc03549",
|
||||
"/css/app.css": "/css/app.css?id=953b8b27868431843dae",
|
||||
"/js/app.js": "/js/app.js?id=ff749484877e4ce6c2f6"
|
||||
}
|
||||
|
||||
@@ -689,6 +689,41 @@ div.create {
|
||||
color: #91a1b3;
|
||||
margin-left: 20px;
|
||||
}
|
||||
#websiteiconoptions {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 20px;
|
||||
.results {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
}
|
||||
.header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
padding: 10px 0;
|
||||
}
|
||||
.selectclose {
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
.iconbutton {
|
||||
width: 160px;
|
||||
height: 160px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
}
|
||||
.selecticon {
|
||||
max-width: 120px;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.switch {
|
||||
position: relative;
|
||||
|
||||
@@ -37,13 +37,13 @@
|
||||
<div><button class="dark">{{ __('app.apps.website') }}</button></div>
|
||||
<div class="optvalue">
|
||||
<div class="input">
|
||||
{!! Form::text('website', null, array('placeholder' => __('app.apps.website'), 'id' => 'website', 'class' => 'form-control')) !!}
|
||||
{!! Form::text('website', $item->url ?? null, array('placeholder' => __('app.apps.website'), 'id' => 'website', 'class' => 'form-control')) !!}
|
||||
</div>
|
||||
<div><button class="btn">Go</button></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="websiteiconoptions"></div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
|
||||
<div class="input">
|
||||
<label>{{ strtoupper(__('app.url')) }}</label>
|
||||
{!! Form::text('url', null, array('placeholder' => __('app.url'), 'id' => 'appurl', 'class' => 'form-control')) !!}
|
||||
{!! Form::text('url', $item->url ?? null, array('placeholder' => __('app.url'), 'id' => 'appurl', 'class' => 'form-control')) !!}
|
||||
</div>
|
||||
|
||||
<div class="input">
|
||||
|
||||
@@ -46,6 +46,15 @@
|
||||
$('#tile-preview .item').css('backgroundColor', $(this).val());
|
||||
})
|
||||
|
||||
$('#websiteiconoptions').on('click', '.iconbutton', function (e) {
|
||||
const src = $('.selecticon', this).attr('src')
|
||||
$('#appimage').html("<img src='"+src+"' /><input type='hidden' name='icon' value='"+src+"' />");
|
||||
$('#tile-preview .app-icon').attr('src', src);
|
||||
|
||||
}).on('click', '.selectclose', function () {
|
||||
$('#websiteiconoptions').html('')
|
||||
})
|
||||
|
||||
$('.tags').select2();
|
||||
|
||||
$('#searchwebsite').on('click', 'button.btn', function (e) {
|
||||
@@ -112,11 +121,16 @@
|
||||
}
|
||||
websitedata.icons = icons
|
||||
|
||||
$('#appname').val(websitedata.title)
|
||||
$('#appurl').val(websiteurl)
|
||||
$('#appimage').html("<img src='"+websitedata.icons[0]+"' /><input type='hidden' name='icon' value='"+websitedata.icons[0]+"' />");
|
||||
if ($('#appname').val() === '') $('#appname').val(websitedata.title)
|
||||
if ($('#appurl').val() === '') $('#appurl').val(websiteurl)
|
||||
$('input[name=pinned]').prop('checked', true);
|
||||
// $('#appimage').html("<img src='"+websitedata.icons[0]+"' /><input type='hidden' name='icon' value='"+websitedata.icons[0]+"' />");
|
||||
$('#tile-preview .app-icon').attr('src', $('#appimage img').attr('src'));
|
||||
$('#tile-preview .title').text(websitedata.title);
|
||||
$('#tile-preview .title').text($('#appname').val());
|
||||
$('#websiteiconoptions').html('<div class="header"><span>Select Icon</span><span class="selectclose">Close</span></div><div class="results"></div>')
|
||||
icons.forEach(icon => {
|
||||
$('#websiteiconoptions .results').append('<div class="iconbutton"><img class="selecticon" src="' + icon + '" /></div>')
|
||||
})
|
||||
console.log(websitedata)
|
||||
})
|
||||
console.log(website)
|
||||
|
||||
Reference in New Issue
Block a user