Skip to content
Source
Sign inSign up
pingdotgg/t3code

Separate client and environment settings #4567

Closedcolonelpanic8(GitHub profile, opens in a new tab)wants to merge 1 commit intomain fromrefs/pull/4567/headopened View on GitHub

Showing 6 changed files with 82 additions and 37 deletions (loading 4).

x
0 of 6 viewed, 6 left
82 additions and 37 deletionsapps/web/src/components/settings/SettingsPanels.tsxModified
View file
@@ -387,7 +387,9 @@
​
-export function useSettingsRestore(onRestored?: () => void) {
+export type SettingsOwnership = "client" | "environment";
+​
+export function useSettingsRestore(ownership: SettingsOwnership, onRestored?: () => void) {
const { theme, setTheme } = useTheme();
const settings = usePrimarySettings();
const updateSettings = useUpdatePrimarySettings();
@@ -397,8 +399,8 @@
DEFAULT_UNIFIED_SETTINGS.textGenerationModelSelection ?? null,
​
- const changedSettingLabels = useMemo(
- () => [
+ const changedSettingLabels = useMemo(() => {
+ const clientSettingLabels = [
...(theme !== "system" ? ["Theme"] : []),
...(settings.glassOpacity !== DEFAULT_UNIFIED_SETTINGS.glassOpacity ? ["Glass opacity"] : []),
...(settings.timestampFormat !== DEFAULT_UNIFIED_SETTINGS.timestampFormat
@@ -418,6 +420,14 @@
...(settings.autoOpenPlanSidebar !== DEFAULT_UNIFIED_SETTINGS.autoOpenPlanSidebar
? ["Auto-open task panel"]
: []),
+ ...(settings.confirmThreadArchive !== DEFAULT_UNIFIED_SETTINGS.confirmThreadArchive
+ ? ["Archive confirmation"]