mirror of
https://github.com/linuxserver/Heimdall.git
synced 2025-11-18 22:02:42 +09:00
Added upgrade process
This commit is contained in:
@@ -30,6 +30,13 @@ class AppServiceProvider extends ServiceProvider
|
||||
if($bg_image = Setting::fetch('background_image')) {
|
||||
$alt_bg = ' style="background-image: url('.asset('storage/'.$bg_image).')"';
|
||||
}
|
||||
|
||||
// check version to see if an upgrade is needed
|
||||
$db_version = Setting::fetch('version');
|
||||
$app_version = config('app.version');
|
||||
if(version_compare($app_version, $db_version) == 1) { // app is higher than db, so need to run migrations etc
|
||||
Artisan::call('migrate', array('--path' => 'database/migrations', '--force' => true, '--seed' => true));
|
||||
}
|
||||
}
|
||||
view()->share('alt_bg', $alt_bg);
|
||||
|
||||
|
||||
@@ -36,7 +36,10 @@ class SettingsSeeder extends Seeder
|
||||
$setting_group->save();
|
||||
}
|
||||
|
||||
if(!Setting::find(1)) {
|
||||
if($version = Setting::find(1)) {
|
||||
$version->value = config('app.version');
|
||||
$version->save();
|
||||
} else {
|
||||
$setting = new Setting;
|
||||
$setting->id = 1;
|
||||
$setting->group_id = 1;
|
||||
@@ -47,6 +50,7 @@ class SettingsSeeder extends Seeder
|
||||
$setting->system = true;
|
||||
$setting->save();
|
||||
}
|
||||
|
||||
if(!Setting::find(2)) {
|
||||
$setting = new Setting;
|
||||
$setting->id = 2;
|
||||
|
||||
18
public/css/app.css
vendored
18
public/css/app.css
vendored
@@ -378,6 +378,24 @@ body {
|
||||
margin-top: 12px;
|
||||
}
|
||||
|
||||
.item-container {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.item-container .item-edit {
|
||||
color: white;
|
||||
position: absolute;
|
||||
bottom: 20px;
|
||||
left: 8px;
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
background: rgba(0, 0, 0, 0.7);
|
||||
border-radius: 50%;
|
||||
text-align: center;
|
||||
line-height: 30px;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.message-container {
|
||||
width: 100%;
|
||||
padding: 10px 20px;
|
||||
|
||||
2
public/js/app.js
vendored
2
public/js/app.js
vendored
@@ -46,6 +46,7 @@ $.when( $.ready ).then(function() {
|
||||
app.toggleClass('header');
|
||||
if(active) {
|
||||
$('.add-item').hide();
|
||||
$('.item-edit').hide();
|
||||
$('#app').removeClass('sidebar');
|
||||
$("#sortable").sortable("disable")
|
||||
} else {
|
||||
@@ -54,6 +55,7 @@ $.when( $.ready ).then(function() {
|
||||
function()
|
||||
{
|
||||
$('.add-item').fadeIn();
|
||||
$('.item-edit').fadeIn();
|
||||
}, 350);
|
||||
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{
|
||||
"/css/app.css": "/css/app.css?id=d47acbf87c5ae533ddf5",
|
||||
"/js/app.js": "/js/app.js?id=a809f8ee6ee8636e0f2b"
|
||||
"/css/app.css": "/css/app.css?id=93569633795ce0c63222",
|
||||
"/js/app.js": "/js/app.js?id=9cbe042c4b6921658a84"
|
||||
}
|
||||
2
resources/assets/js/app.js
vendored
2
resources/assets/js/app.js
vendored
@@ -37,6 +37,7 @@ $.when( $.ready ).then(function() {
|
||||
app.toggleClass('header');
|
||||
if(active) {
|
||||
$('.add-item').hide();
|
||||
$('.item-edit').hide();
|
||||
$('#app').removeClass('sidebar');
|
||||
$("#sortable").sortable("disable")
|
||||
} else {
|
||||
@@ -45,6 +46,7 @@ $.when( $.ready ).then(function() {
|
||||
function()
|
||||
{
|
||||
$('.add-item').fadeIn();
|
||||
$('.item-edit').fadeIn();
|
||||
}, 350);
|
||||
|
||||
}
|
||||
|
||||
17
resources/assets/sass/_app.scss
vendored
17
resources/assets/sass/_app.scss
vendored
@@ -107,6 +107,20 @@ body {
|
||||
.item-container {
|
||||
//width: 340px;
|
||||
//transition: width .35s ease-in-out;
|
||||
position: relative;
|
||||
.item-edit {
|
||||
color: white;
|
||||
position: absolute;
|
||||
bottom: 20px;
|
||||
left: 8px;
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
background: rgba(0,0,0,0.7);
|
||||
border-radius: 50%;
|
||||
text-align: center;
|
||||
line-height: 30px;
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
.message-container {
|
||||
width: 100%;
|
||||
@@ -166,6 +180,9 @@ body {
|
||||
}
|
||||
.item-container {
|
||||
//width: 240px;
|
||||
.item-edit {
|
||||
//display: block;
|
||||
}
|
||||
}
|
||||
.item, .add-item {
|
||||
transform: scale(0.9);
|
||||
|
||||
@@ -9,4 +9,6 @@
|
||||
|
||||
<a class="link" href="{{ $app->url }}"><i class="fas fa-arrow-alt-to-right"></i></a>
|
||||
</div>
|
||||
<a class="item-edit" href="{{ route('items.edit', $app->id) }}"><i class="fas fa-pencil"></i></a>
|
||||
|
||||
</section>
|
||||
|
||||
Reference in New Issue
Block a user