Added workspace display options (#184)

This commit is contained in:
Thorsten Sommer authored and GitHub committed 2024-11-02 22:53:02 +01:00
1 parent bd97c0fb4b
commit d2ac4e26b0
11 files changed
+185 -78

No files matched your search

@@ -58,6 +58,13 @@ public static class ConfigurationSelectDataFactory
yield return new("Delete temporary chats older than 1 year", WorkspaceStorageTemporaryMaintenancePolicy.DELETE_OLDER_THAN_365_DAYS);
}
public static IEnumerable<ConfigurationSelectData<WorkspaceDisplayBehavior>> GetWorkspaceDisplayBehaviorData()
{
yield return new("Toggle the overlay: the chat uses all the space, workspaces are temporarily shown", WorkspaceDisplayBehavior.TOGGLE_OVERLAY);
yield return new("Toggle the sidebar: show the workspaces next to the chat when desired", WorkspaceDisplayBehavior.TOGGLE_SIDEBAR);
yield return new("Sidebar is always visible: show the workspaces next to the chat all the time", WorkspaceDisplayBehavior.SIDEBAR_ALWAYS_VISIBLE);
}
public static IEnumerable<ConfigurationSelectData<NavBehavior>> GetNavBehaviorData()
{
yield return new("Navigation expands on mouse hover", NavBehavior.EXPAND_ON_HOVER);
@@ -11,4 +11,14 @@ public sealed class DataWorkspace
/// The chat storage maintenance behavior.
/// </summary>
public WorkspaceStorageTemporaryMaintenancePolicy StorageTemporaryMaintenancePolicy { get; set; } = WorkspaceStorageTemporaryMaintenancePolicy.DELETE_OLDER_THAN_90_DAYS;
/// <summary>
/// The behavior used for displaying the workspace.
/// </summary>
public WorkspaceDisplayBehavior DisplayBehavior { get; set; } = WorkspaceDisplayBehavior.TOGGLE_SIDEBAR;
/// <summary>
/// Indicates whether the sidebar is currently visible.
/// </summary>
public bool IsSidebarVisible { get; set; } = true;
}
@@ -0,0 +1,9 @@
namespace AIStudio.Settings.DataModel;
public enum WorkspaceDisplayBehavior
{
TOGGLE_OVERLAY,
TOGGLE_SIDEBAR,
SIDEBAR_ALWAYS_VISIBLE,
}