Added a config setting to denote completion of the startup wizard
This commit is contained in:
parent
05b9500175
commit
da535db655
|
@ -158,10 +158,10 @@ namespace MediaBrowser.Common.Implementations
|
|||
{
|
||||
return Task.Run(() =>
|
||||
{
|
||||
IsFirstRun = !ConfigurationManager.CommonConfiguration.IsStartupWizardCompleted;
|
||||
|
||||
Logger = LogManager.GetLogger("App");
|
||||
|
||||
IsFirstRun = !File.Exists(ApplicationPaths.SystemConfigurationFilePath);
|
||||
|
||||
DiscoverTypes();
|
||||
|
||||
LogManager.ReloadLogger(ConfigurationManager.CommonConfiguration.EnableDebugLevelLogging ? LogSeverity.Debug : LogSeverity.Info);
|
||||
|
|
|
@ -65,6 +65,13 @@ namespace MediaBrowser.Model.Configuration
|
|||
/// <value>The legacy web socket port number.</value>
|
||||
[ProtoMember(59)]
|
||||
public int LegacyWebSocketPortNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether this instance is first run.
|
||||
/// </summary>
|
||||
/// <value><c>true</c> if this instance is first run; otherwise, <c>false</c>.</value>
|
||||
[ProtoMember(4)]
|
||||
public bool IsStartupWizardCompleted { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="BaseApplicationConfiguration" /> class.
|
||||
|
|
|
@ -430,6 +430,7 @@ namespace MediaBrowser.WebDashboard.Api
|
|||
"UpdatePasswordPage.js",
|
||||
"UserImagePage.js",
|
||||
"UserProfilesPage.js",
|
||||
"WizardFinishPage.js",
|
||||
"WizardStartPage.js",
|
||||
"WizardUserPage.js",
|
||||
"SupporterKeyPage.js",
|
||||
|
|
16
MediaBrowser.WebDashboard/Html/scripts/WizardFinishPage.js
Normal file
16
MediaBrowser.WebDashboard/Html/scripts/WizardFinishPage.js
Normal file
|
@ -0,0 +1,16 @@
|
|||
var WizardFinishPage = {
|
||||
|
||||
onFinish: function() {
|
||||
|
||||
ApiClient.getServerConfiguration().done(function (config) {
|
||||
|
||||
config.IsStartupWizardCompleted = true;
|
||||
|
||||
ApiClient.updateServerConfiguration(config).done(function() {
|
||||
Dashboard.navigate('dashboard.html');
|
||||
});
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
};
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
<div class="wizardNavigation">
|
||||
<button type="button" data-iconpos="left" data-icon="arrow-left" data-inline="true" onclick="history.back();">Previous</button>
|
||||
<button type="button" data-iconpos="right" data-icon="wrench" data-inline="true" onclick="Dashboard.navigate('dashboard.html');" data-theme="b">Go to the Dashboard</button>
|
||||
<button type="button" data-iconpos="right" data-icon="wrench" data-inline="true" onclick="WizardFinishPage.onFinish();" data-theme="b">Go to the Dashboard</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -384,6 +384,7 @@
|
|||
<EmbeddedResource Include="Html\scripts\ItemDetailPage.js" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Html\scripts\WizardFinishPage.js" />
|
||||
<EmbeddedResource Include="Html\Readme.txt" />
|
||||
<EmbeddedResource Include="Html\css\images\media\playCircle.png" />
|
||||
<EmbeddedResource Include="Html\css\images\media\nextTrack.png" />
|
||||
|
|
Loading…
Reference in New Issue
Block a user