diff --git a/README.md b/README.md index 410dfcbfc..93d883940 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ Blogifier is single blog supporting multiple authors. Administrator can manage c The [demo site](http://blogifier.azurewebsites.net) is a playground to check out Blogifier features. You can write and publish posts, upload files and test application before install. And no worries, it is just a sandbox and will clean itself. -![demo-img](https://user-images.githubusercontent.com/1932785/38769576-c1d92a8c-3fca-11e8-96a7-acfd848de339.png) +![github-demo](https://user-images.githubusercontent.com/1932785/47130986-eaef1d80-d261-11e8-81d4-c90ad86ff828.png) ## Live blog diff --git a/src/App/Pages/Admin/Upgrade/Index.cshtml b/src/App/Pages/Admin/Upgrade/Index.cshtml index 2b7f94d49..a0e911378 100644 --- a/src/App/Pages/Admin/Upgrade/Index.cshtml +++ b/src/App/Pages/Admin/Upgrade/Index.cshtml @@ -3,6 +3,9 @@ @{ Layout = null; var repoLink = "https://github.com/blogifierdotnet/Blogifier/releases/tag/v" + Model.NewVersion; + + int oldVersion = string.IsNullOrEmpty(Model.OldVersion) ? 0 : int.Parse(Model.OldVersion.Replace(".", "")); + int newVersion = string.IsNullOrEmpty(Model.NewVersion) ? 0 : int.Parse(Model.NewVersion.Replace(".", "")); } @@ -15,29 +18,54 @@
-

Upgrade to version @Model.NewVersion

-

- You running Blogifier version @Model.OldVersion. There new version @Model.NewVersion is available in the repository. You can upgrade to new version manually or just click button below and run in-place upgrade process. -

- - @if (Model.IsUpgrading) { +

+ Reload +

} else { -

- - Cancel -

+ @if (oldVersion < 21) + { +

Sorry, only versions 2.1.x.x and up support auto-upgrade.

+

+ Back +

+ } + else if (oldVersion >= newVersion) + { +

Your blog is up to date!

+

+ Back +

+ } + else + { +

Upgrade to version @Model.NewVersion

+

+ You running Blogifier version @Model.OldVersion. New version @Model.NewVersion now available in the repository. +
You can upgrade manually or click button below and run in-place process. +

+ +
+

+ Upgrade will turn off your web service before replacing old files. If you using IIS as your web server, it most likely will + restart application once you refresh this page or navigate to any page in the blog. +

+ If your blog hosted on Linux, you might need to restart web server manually or via host admin panel. +
+

+ + Cancel +

+ } }
diff --git a/src/App/app.db b/src/App/app.db index 95c804e04..18670d446 100644 Binary files a/src/App/app.db and b/src/App/app.db differ diff --git a/src/App/wwwroot/admin/js/app/fileManagerController.js b/src/App/wwwroot/admin/js/app/fileManagerController.js index 6d971a165..10c1ae547 100644 --- a/src/App/wwwroot/admin/js/app/fileManagerController.js +++ b/src/App/wwwroot/admin/js/app/fileManagerController.js @@ -207,11 +207,11 @@ var updateAvatarCallback = function (data) { toastr.success('Updated'); }; var updateAppCoverCallback = function (data) { - $('#Cover').val(data.url); + $('#BlogItem_Cover').val(data.url); toastr.success('Updated'); }; var updateAppLogoCallback = function (data) { - $('#Logo').val(data.url); + $('#BlogItem_Logo').val(data.url); toastr.success('Updated'); }; diff --git a/src/Core/Core.csproj b/src/Core/Core.csproj index d6d633956..0ee858ed2 100644 --- a/src/Core/Core.csproj +++ b/src/Core/Core.csproj @@ -2,7 +2,7 @@ netcoreapp2.1 - 2.0.2.9 + 2.0.3.0 diff --git a/src/Upgrade/Program.cs b/src/Upgrade/Program.cs index 79483210b..87fc950ee 100644 --- a/src/Upgrade/Program.cs +++ b/src/Upgrade/Program.cs @@ -98,13 +98,6 @@ static void ReplaceFolder(string folder) } } - static string NameFromPath(string path) - { - int x = path.LastIndexOf(_slash); - string name = path.Substring(x); - return name; - } - static List GetCoreFiles() { var fileName = $"{_upgDir}{_slash}files.txt";