mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-10-12 20:53:48 +00:00
Added option for update installation behavior (#539)
Build and Release / Read metadata (push) Has been cancelled
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-apple-darwin, osx-arm64, macos-latest, aarch64-apple-darwin, dmg updater) (push) Has been cancelled
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-pc-windows-msvc.exe, win-arm64, windows-latest, aarch64-pc-windows-msvc, nsis updater) (push) Has been cancelled
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-unknown-linux-gnu, linux-arm64, ubuntu-22.04-arm, aarch64-unknown-linux-gnu, appimage deb updater) (push) Has been cancelled
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-apple-darwin, osx-x64, macos-latest, x86_64-apple-darwin, dmg updater) (push) Has been cancelled
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-pc-windows-msvc.exe, win-x64, windows-latest, x86_64-pc-windows-msvc, nsis updater) (push) Has been cancelled
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-unknown-linux-gnu, linux-x64, ubuntu-22.04, x86_64-unknown-linux-gnu, appimage deb updater) (push) Has been cancelled
Build and Release / Prepare & create release (push) Has been cancelled
Build and Release / Publish release (push) Has been cancelled
Build and Release / Read metadata (push) Has been cancelled
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-apple-darwin, osx-arm64, macos-latest, aarch64-apple-darwin, dmg updater) (push) Has been cancelled
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-pc-windows-msvc.exe, win-arm64, windows-latest, aarch64-pc-windows-msvc, nsis updater) (push) Has been cancelled
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-unknown-linux-gnu, linux-arm64, ubuntu-22.04-arm, aarch64-unknown-linux-gnu, appimage deb updater) (push) Has been cancelled
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-apple-darwin, osx-x64, macos-latest, x86_64-apple-darwin, dmg updater) (push) Has been cancelled
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-pc-windows-msvc.exe, win-x64, windows-latest, x86_64-pc-windows-msvc, nsis updater) (push) Has been cancelled
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-unknown-linux-gnu, linux-x64, ubuntu-22.04, x86_64-unknown-linux-gnu, appimage deb updater) (push) Has been cancelled
Build and Release / Prepare & create release (push) Has been cancelled
Build and Release / Publish release (push) Has been cancelled
This commit is contained in:
1 parent
c1826426d9
commit
5d17dcc29b
17 files changed
+128
-26
No files matched your search
@@ -63,13 +63,19 @@ public static class ConfigurationSelectDataFactory
|
||||
yield return new(TB("Enter is sending the input"), SendBehavior.ENTER_IS_SENDING);
|
||||
}
|
||||
|
||||
public static IEnumerable<ConfigurationSelectData<UpdateBehavior>> GetUpdateBehaviorData()
|
||||
public static IEnumerable<ConfigurationSelectData<UpdateInterval>> GetUpdateIntervalData()
|
||||
{
|
||||
yield return new(TB("No automatic update checks"), UpdateBehavior.NO_CHECK);
|
||||
yield return new(TB("Once at startup"), UpdateBehavior.ONCE_STARTUP);
|
||||
yield return new(TB("Check every hour"), UpdateBehavior.HOURLY);
|
||||
yield return new(TB("Check every day"), UpdateBehavior.DAILY);
|
||||
yield return new (TB("Check every week"), UpdateBehavior.WEEKLY);
|
||||
yield return new(TB("No automatic update checks"), UpdateInterval.NO_CHECK);
|
||||
yield return new(TB("Once at startup"), UpdateInterval.ONCE_STARTUP);
|
||||
yield return new(TB("Check every hour"), UpdateInterval.HOURLY);
|
||||
yield return new(TB("Check every day"), UpdateInterval.DAILY);
|
||||
yield return new (TB("Check every week"), UpdateInterval.WEEKLY);
|
||||
}
|
||||
|
||||
public static IEnumerable<ConfigurationSelectData<UpdateInstallation>> GetUpdateBehaviourData()
|
||||
{
|
||||
yield return new(TB("Install updates manually"), UpdateInstallation.MANUAL);
|
||||
yield return new(TB("Install updates automatically"), UpdateInstallation.AUTOMATIC);
|
||||
}
|
||||
|
||||
public static IEnumerable<ConfigurationSelectData<WorkspaceStorageBehavior>> GetWorkspaceStorageBehaviorData()
|
||||
|
||||
@@ -40,7 +40,12 @@ public sealed class DataApp(Expression<Func<Data, DataApp>>? configSelection = n
|
||||
/// <summary>
|
||||
/// If and when we should look for updates.
|
||||
/// </summary>
|
||||
public UpdateBehavior UpdateBehavior { get; set; } = ManagedConfiguration.Register(configSelection, n => n.UpdateBehavior, UpdateBehavior.HOURLY);
|
||||
public UpdateInterval UpdateInterval { get; set; } = ManagedConfiguration.Register(configSelection, n => n.UpdateInterval, UpdateInterval.HOURLY);
|
||||
|
||||
/// <summary>
|
||||
/// How updates should be installed.
|
||||
/// </summary>
|
||||
public UpdateInstallation UpdateInstallation { get; set; } = ManagedConfiguration.Register(configSelection, n => n.UpdateInstallation, UpdateInstallation.MANUAL);
|
||||
|
||||
/// <summary>
|
||||
/// The navigation behavior.
|
||||
|
||||
@@ -41,7 +41,7 @@ public sealed class DataV1V3
|
||||
/// <summary>
|
||||
/// If and when we should look for updates.
|
||||
/// </summary>
|
||||
public UpdateBehavior UpdateBehavior { get; set; } = UpdateBehavior.ONCE_STARTUP;
|
||||
public UpdateInterval UpdateInterval { get; set; } = UpdateInterval.ONCE_STARTUP;
|
||||
|
||||
/// <summary>
|
||||
/// The navigation behavior.
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
namespace AIStudio.Settings.DataModel;
|
||||
|
||||
public enum UpdateInstallation
|
||||
{
|
||||
MANUAL,
|
||||
AUTOMATIC,
|
||||
}
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
namespace AIStudio.Settings.DataModel;
|
||||
|
||||
public enum UpdateBehavior
|
||||
public enum UpdateInterval
|
||||
{
|
||||
NO_CHECK,
|
||||
ONCE_STARTUP,
|
||||
@@ -90,7 +90,7 @@ public static class SettingsMigrations
|
||||
IsSavingEnergy = previousData.IsSavingEnergy,
|
||||
NextProviderNum = previousData.NextProviderNum,
|
||||
ShortcutSendBehavior = previousData.ShortcutSendBehavior,
|
||||
UpdateBehavior = previousData.UpdateBehavior,
|
||||
UpdateInterval = previousData.UpdateInterval,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -117,7 +117,7 @@ public static class SettingsMigrations
|
||||
IsSavingEnergy = previousData.IsSavingEnergy,
|
||||
NextProviderNum = previousData.NextProviderNum,
|
||||
ShortcutSendBehavior = previousData.ShortcutSendBehavior,
|
||||
UpdateBehavior = previousData.UpdateBehavior,
|
||||
UpdateInterval = previousData.UpdateInterval,
|
||||
WorkspaceStorageBehavior = previousData.WorkspaceStorageBehavior,
|
||||
WorkspaceStorageTemporaryMaintenancePolicy = previousData.WorkspaceStorageTemporaryMaintenancePolicy,
|
||||
};
|
||||
@@ -141,7 +141,7 @@ public static class SettingsMigrations
|
||||
{
|
||||
EnableSpellchecking = previousConfig.EnableSpellchecking,
|
||||
IsSavingEnergy = previousConfig.IsSavingEnergy,
|
||||
UpdateBehavior = previousConfig.UpdateBehavior,
|
||||
UpdateInterval = previousConfig.UpdateInterval,
|
||||
NavigationBehavior = previousConfig.NavigationBehavior,
|
||||
},
|
||||
|
||||
|
||||
Reference in new issue
Block a user