forked from teocomi/BCFier
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #31 from opf/bug/39052-add-in-fails-to-open-browse…
…r-on-fresh-installs [#39052] Add-in fails to open browser on fresh installs
- Loading branch information
Showing
13 changed files
with
133 additions
and
182 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 10 additions & 14 deletions
24
src/OpenProject.Browser/Settings/OpenProjectSettingsExtensions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,26 @@ | ||
using System.Collections.Generic; | ||
using System; | ||
using System.Collections.Generic; | ||
using Newtonsoft.Json; | ||
using Serilog; | ||
|
||
namespace OpenProject.Browser.Settings | ||
{ | ||
public static class OpenProjectSettingsExtensions | ||
{ | ||
public static List<string> GetOpenProjectInstances(this IOpenProjectSettings settings) | ||
{ | ||
if (settings.OpenProjectInstances == null) | ||
{ | ||
return null; | ||
} | ||
|
||
return JsonConvert.DeserializeObject<List<string>>(settings.OpenProjectInstances); | ||
} | ||
var result = new List<string>(); | ||
|
||
public static void SetOpenProjectInstances(this IOpenProjectSettings settings, List<string> openProjectInstances) | ||
{ | ||
if (openProjectInstances == null) | ||
try | ||
{ | ||
settings.OpenProjectInstances = null; | ||
result = JsonConvert.DeserializeObject<List<string>>(settings.OpenProjectInstances); | ||
} | ||
else | ||
catch (Exception exception) | ||
{ | ||
settings.OpenProjectInstances = JsonConvert.SerializeObject(openProjectInstances); | ||
Log.Error(exception, "Invalid settings value for OpenProject instances: {0}.", settings.OpenProjectInstances); | ||
} | ||
|
||
return result; | ||
} | ||
} | ||
} |
Binary file modified
BIN
-9 Bytes
(100%)
src/OpenProject.Browser/WebViewIntegration/LandingPage/LandingPage.zip
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.