From 1edcde6d9f3792abcfebe1755f55c492ca6b98aa Mon Sep 17 00:00:00 2001 From: rxtur Date: Thu, 18 Oct 2018 22:47:52 -0500 Subject: [PATCH] Few minor fixes --- README.md | 2 +- src/App/Pages/Admin/Upgrade/Index.cshtml | 60 +++++++++++++----- src/App/app.db | Bin 122880 -> 122880 bytes .../admin/js/app/fileManagerController.js | 4 +- src/Core/Core.csproj | 2 +- src/Upgrade/Program.cs | 7 -- 6 files changed, 48 insertions(+), 27 deletions(-) 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 95c804e04b9f804972988cecf2d6f97a9bd0b0e2..18670d446b3a3a009ca86d5f71b015de50c8fefe 100644 GIT binary patch delta 356 zcmXw!yG{Z@6oz*JWeEwxYAlQv(~z~<+fYadP)H)37T!voWry93;|`e_pak^+&=)ZA z1xO496%k*-g4USWQThUIG$yAyIsbpYZ?wpc7TJd#HUGHVRP!%a&qDy-l?<3D;2V5_ z33!|8&J)-CZ=dbEhGJF&V%E%7Ubia9G1IISBSOOr!|L+k(KW!6oFaQ7m delta 75 zcmZoTz}|3xeS$P2=R_H2M$U~13+s6q7#NuOFEQ|c=6}L}X|tfg5q=f{W@h!~YyI1= f^)u=zurc!QW#Hcnl-bO`eeZrocY)0;27mYgeLfgt 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";