From 5244121371d33c452c401c99535ca99572406634 Mon Sep 17 00:00:00 2001 From: lk340 Date: Wed, 30 Jul 2025 18:52:56 -0400 Subject: [PATCH 1/6] WIP --- macos/Onit/AppDelegate.swift | 3 - .../Colors/BaseBG.colorset/Contents.json | 38 +++++++++++ .../BlueBtnLabel.colorset/Contents.json | 38 +++++++++++ .../Colors/ElevatedBG.colorset/Contents.json | 38 +++++++++++ .../GenericBorder.colorset/Contents.json | 38 +++++++++++ .../Colors/HintBG.colorset/Contents.json | 38 +++++++++++ .../Contents.json | 12 ++-- .../Colors/MessageBG.colorset/Contents.json | 38 +++++++++++ .../Colors/Orange500.colorset/Contents.json | 38 +++++++++++ .../PlaceholderText.colorset/Contents.json | 38 +++++++++++ .../Colors/Red500.colorset/Contents.json | 38 +++++++++++ .../Colors/RedBrick.colorset/Contents.json | 6 +- .../Colors/RedDisabled.colorset/Contents.json | 66 +++++++++---------- .../RedDisabledHover.colorset/Contents.json | 66 +++++++++---------- .../Colors/RedPale400.colorset/Contents.json | 38 +++++++++++ .../Colors/S0.colorset/Contents.json | 38 +++++++++++ .../Colors/S1.colorset/Contents.json | 38 +++++++++++ .../Colors/S10.colorset/Contents.json | 38 +++++++++++ .../Colors/S2.colorset/Contents.json | 38 +++++++++++ .../Colors/S3.colorset/Contents.json | 38 +++++++++++ .../Colors/S4.colorset/Contents.json | 38 +++++++++++ .../Colors/S5.colorset/Contents.json | 38 +++++++++++ .../Colors/S6.colorset/Contents.json | 38 +++++++++++ .../Colors/S7.colorset/Contents.json | 38 +++++++++++ .../Colors/S8.colorset/Contents.json | 38 +++++++++++ .../Colors/S9.colorset/Contents.json | 38 +++++++++++ .../Colors/T1.colorset/Contents.json | 38 +++++++++++ .../Colors/T2.colorset/Contents.json | 16 ++--- .../Colors/T3.colorset/Contents.json | 16 ++--- .../Colors/T4.colorset/Contents.json | 16 ++--- .../Colors/T5.colorset/Contents.json | 16 ++--- .../Colors/T6.colorset/Contents.json | 38 +++++++++++ .../Colors/T7.colorset/Contents.json | 26 ++++++-- .../Colors/T8.colorset/Contents.json | 16 ++--- .../Colors/T9.colorset/Contents.json | 38 +++++++++++ .../WarningDisabled.colorset/Contents.json | 66 +++++++++---------- .../Contents.json | 66 +++++++++---------- .../General/Styles/HoverableButtonStyle.swift | 4 +- macos/Onit/General/Styles/ViewStyle.swift | 8 +-- macos/Onit/UI/Alerts/SubscriptionAlert.swift | 3 +- macos/Onit/UI/Auth/AuthFlow.swift | 38 ++++++----- macos/Onit/UI/Chat/ChatSystemPromptView.swift | 19 +++--- macos/Onit/UI/Chat/ChatView.swift | 8 +-- macos/Onit/UI/Components/ContextTag.swift | 14 ++-- macos/Onit/UI/Components/CopyButton.swift | 3 +- .../Onit/UI/Components/CustomTextField.swift | 16 ++--- macos/Onit/UI/Components/Divider.swift | 2 +- .../UI/Components/DynamicScrollView.swift | 2 +- .../Onit/UI/Components/GlassBackground.swift | 15 +++++ macos/Onit/UI/Components/IconButton.swift | 12 ++-- macos/Onit/UI/Components/InputField.swift | 6 +- .../Onit/UI/Components/LabeledTextField.swift | 6 +- macos/Onit/UI/Components/LoaderPulse.swift | 2 +- macos/Onit/UI/Components/MenuHeader.swift | 2 +- macos/Onit/UI/Components/MenuList.swift | 3 - macos/Onit/UI/Components/MenuSection.swift | 4 +- macos/Onit/UI/Components/OCRDetailSheet.swift | 12 ++-- macos/Onit/UI/Components/ResizeHandle.swift | 2 +- macos/Onit/UI/Components/SearchBar.swift | 2 +- macos/Onit/UI/Components/SimpleButton.swift | 8 +-- macos/Onit/UI/Components/TextButton.swift | 13 ++-- .../Onit/UI/Components/TextViewWrapper.swift | 4 +- macos/Onit/UI/Components/TooltipView.swift | 6 +- macos/Onit/UI/Content/ContentView.swift | 10 ++- .../ContentViewFooterNotification.swift | 11 ++-- .../UI/Content/ExternalTetheredButton.swift | 5 +- .../Content/ExternalTetheredButtonStyle.swift | 6 +- macos/Onit/UI/Content/TetheredButton.swift | 10 +-- macos/Onit/UI/Content/Toolbar.swift | 5 +- macos/Onit/UI/Content/ToolbarLeft.swift | 5 +- macos/Onit/UI/Content/ToolbarRight.swift | 2 +- macos/Onit/UI/History/HistoryRowView.swift | 6 +- macos/Onit/UI/History/HistoryView.swift | 4 +- macos/Onit/UI/Modifiers/DragModifier.swift | 2 +- .../UI/Onboarding/OnboardingAuthButton.swift | 4 +- .../UI/Prompt/Dialogs/SetUpButtonStyle.swift | 6 +- .../Onit/UI/Prompt/Dialogs/SetUpDialog.swift | 18 ++--- .../Onit/UI/Prompt/Dialogs/SetUpDialogs.swift | 4 +- macos/Onit/UI/Prompt/Files/ContextItem.swift | 34 +++++----- macos/Onit/UI/Prompt/Files/ContextMenu.swift | 3 +- .../Files/ContextMenuWindowButton.swift | 2 +- .../UI/Prompt/Files/ContextMenuWindows.swift | 4 +- macos/Onit/UI/Prompt/Files/FileRow.swift | 37 +++++------ .../UI/Prompt/Files/PaperclipButton.swift | 1 + .../Onit/UI/Prompt/Files/WebContextItem.swift | 6 +- macos/Onit/UI/Prompt/FinalContextView.swift | 32 +++++---- .../Generated/GeneratedContentView.swift | 7 +- .../Prompt/Generated/GeneratedToolbar.swift | 8 ++- .../Prompt/Generated/ToggleOutputsView.swift | 8 ++- macos/Onit/UI/Prompt/Input/InputBody.swift | 2 +- macos/Onit/UI/Prompt/Input/InputButtons.swift | 2 +- macos/Onit/UI/Prompt/Input/InputTitle.swift | 2 +- macos/Onit/UI/Prompt/Input/InputView.swift | 6 +- macos/Onit/UI/Prompt/MicrophoneButton.swift | 6 +- macos/Onit/UI/Prompt/PromptCore.swift | 15 ++--- macos/Onit/UI/Prompt/PromptCoreFooter.swift | 2 +- .../UI/Prompt/PromptCoreFooterButton.swift | 4 +- .../Onit/UI/Prompt/StopGenerationButton.swift | 10 +-- .../SystemPrompt/SystemPromptDetailView.swift | 23 +++---- .../SystemPromptSelectionView.swift | 13 ++-- .../SystemPrompt/SystemPromptView.swift | 4 +- macos/Onit/UI/Prompt/WebSearchButton.swift | 2 +- macos/Onit/UI/PromptDivider.swift | 19 ------ .../Onit/UI/QuickEdit/QuickEditHintView.swift | 6 +- .../UI/QuickEdit/QuickEditResponseView.swift | 32 ++++----- macos/Onit/UI/QuickEdit/QuickEditView.swift | 16 ++--- macos/Onit/UI/Settings/AboutTab.swift | 2 +- macos/Onit/UI/Settings/AccessibilityTab.swift | 8 +-- .../UI/Settings/DatabaseSettingsView.swift | 24 ++++--- macos/Onit/UI/Settings/DebugModeTab.swift | 14 ++-- macos/Onit/UI/Settings/GeneralTab.swift | 45 +++++++++---- .../Onit/UI/Settings/GeneralTabAccount.swift | 11 ++-- .../UI/Settings/GeneralTabAccountAlert.swift | 24 ++----- .../Settings/GeneralTabPlanAndBilling.swift | 13 ++-- macos/Onit/UI/Settings/GeneralTabVoice.swift | 2 + .../CustomProviderFormView.swift | 2 +- .../CustomProvidersSection.swift | 2 +- .../Settings/Models/LocalModelsSection.swift | 4 +- .../Onit/UI/Settings/Models/ModelToggle.swift | 2 +- .../Settings/Models/RemoteModelSection.swift | 10 +-- .../Settings/Models/SettingErrorMessage.swift | 2 +- .../Settings/Models/SettingInfoButton.swift | 5 +- .../UI/Settings/Models/StreamingToggle.swift | 5 +- macos/Onit/UI/Settings/QuickEditTab.swift | 16 ++--- .../SystemPrompt/NewSystemPromptView.swift | 52 ++++++++------- macos/Onit/UI/Settings/SystemPromptTab.swift | 11 +--- macos/Onit/UI/Settings/WebSearchTab.swift | 31 +++++---- macos/Onit/UI/Windows/ContextView.swift | 3 +- 128 files changed, 1578 insertions(+), 631 deletions(-) create mode 100644 macos/Onit/Assets.xcassets/Colors/BaseBG.colorset/Contents.json create mode 100644 macos/Onit/Assets.xcassets/Colors/BlueBtnLabel.colorset/Contents.json create mode 100644 macos/Onit/Assets.xcassets/Colors/ElevatedBG.colorset/Contents.json create mode 100644 macos/Onit/Assets.xcassets/Colors/GenericBorder.colorset/Contents.json create mode 100644 macos/Onit/Assets.xcassets/Colors/HintBG.colorset/Contents.json rename macos/Onit/Assets.xcassets/Colors/{LimeGreen.colorset => Lime400.colorset}/Contents.json (88%) create mode 100644 macos/Onit/Assets.xcassets/Colors/MessageBG.colorset/Contents.json create mode 100644 macos/Onit/Assets.xcassets/Colors/Orange500.colorset/Contents.json create mode 100644 macos/Onit/Assets.xcassets/Colors/PlaceholderText.colorset/Contents.json create mode 100644 macos/Onit/Assets.xcassets/Colors/Red500.colorset/Contents.json create mode 100644 macos/Onit/Assets.xcassets/Colors/RedPale400.colorset/Contents.json create mode 100644 macos/Onit/Assets.xcassets/Colors/S0.colorset/Contents.json create mode 100644 macos/Onit/Assets.xcassets/Colors/S1.colorset/Contents.json create mode 100644 macos/Onit/Assets.xcassets/Colors/S10.colorset/Contents.json create mode 100644 macos/Onit/Assets.xcassets/Colors/S2.colorset/Contents.json create mode 100644 macos/Onit/Assets.xcassets/Colors/S3.colorset/Contents.json create mode 100644 macos/Onit/Assets.xcassets/Colors/S4.colorset/Contents.json create mode 100644 macos/Onit/Assets.xcassets/Colors/S5.colorset/Contents.json create mode 100644 macos/Onit/Assets.xcassets/Colors/S6.colorset/Contents.json create mode 100644 macos/Onit/Assets.xcassets/Colors/S7.colorset/Contents.json create mode 100644 macos/Onit/Assets.xcassets/Colors/S8.colorset/Contents.json create mode 100644 macos/Onit/Assets.xcassets/Colors/S9.colorset/Contents.json create mode 100644 macos/Onit/Assets.xcassets/Colors/T1.colorset/Contents.json create mode 100644 macos/Onit/Assets.xcassets/Colors/T6.colorset/Contents.json create mode 100644 macos/Onit/Assets.xcassets/Colors/T9.colorset/Contents.json create mode 100644 macos/Onit/UI/Components/GlassBackground.swift delete mode 100644 macos/Onit/UI/PromptDivider.swift diff --git a/macos/Onit/AppDelegate.swift b/macos/Onit/AppDelegate.swift index 1a83e78e0..b9c70a3bc 100644 --- a/macos/Onit/AppDelegate.swift +++ b/macos/Onit/AppDelegate.swift @@ -15,9 +15,6 @@ class AppDelegate: NSObject, NSApplicationDelegate { func applicationDidFinishLaunching(_ notification: Notification) { FirebaseApp.configure() - if let darkAppearance = NSAppearance(named: .darkAqua) { - NSApp.appearance = darkAppearance - } GIDSignIn.sharedInstance.restorePreviousSignIn() // Configure dock icon visibility based on user preference diff --git a/macos/Onit/Assets.xcassets/Colors/BaseBG.colorset/Contents.json b/macos/Onit/Assets.xcassets/Colors/BaseBG.colorset/Contents.json new file mode 100644 index 000000000..19ea7b13b --- /dev/null +++ b/macos/Onit/Assets.xcassets/Colors/BaseBG.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "display-p3", + "components" : { + "alpha" : "0.900", + "blue" : "0xF8", + "green" : "0xF7", + "red" : "0xF6" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "display-p3", + "components" : { + "alpha" : "0.850", + "blue" : "0x00", + "green" : "0x00", + "red" : "0x00" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/macos/Onit/Assets.xcassets/Colors/BlueBtnLabel.colorset/Contents.json b/macos/Onit/Assets.xcassets/Colors/BlueBtnLabel.colorset/Contents.json new file mode 100644 index 000000000..92ef03170 --- /dev/null +++ b/macos/Onit/Assets.xcassets/Colors/BlueBtnLabel.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "display-p3", + "components" : { + "alpha" : "1.000", + "blue" : "0xFF", + "green" : "0xFF", + "red" : "0xFF" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "display-p3", + "components" : { + "alpha" : "1.000", + "blue" : "0xFF", + "green" : "0xFF", + "red" : "0xFF" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/macos/Onit/Assets.xcassets/Colors/ElevatedBG.colorset/Contents.json b/macos/Onit/Assets.xcassets/Colors/ElevatedBG.colorset/Contents.json new file mode 100644 index 000000000..0008ab089 --- /dev/null +++ b/macos/Onit/Assets.xcassets/Colors/ElevatedBG.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "display-p3", + "components" : { + "alpha" : "0.400", + "blue" : "0xF9", + "green" : "0xF6", + "red" : "0xF5" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "display-p3", + "components" : { + "alpha" : "0.500", + "blue" : "0x48", + "green" : "0x3F", + "red" : "0x3C" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/macos/Onit/Assets.xcassets/Colors/GenericBorder.colorset/Contents.json b/macos/Onit/Assets.xcassets/Colors/GenericBorder.colorset/Contents.json new file mode 100644 index 000000000..f8d2ae5af --- /dev/null +++ b/macos/Onit/Assets.xcassets/Colors/GenericBorder.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "display-p3", + "components" : { + "alpha" : "0.400", + "blue" : "0xC3", + "green" : "0xC1", + "red" : "0xBF" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "display-p3", + "components" : { + "alpha" : "0.800", + "blue" : "0x42", + "green" : "0x3C", + "red" : "0x3A" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/macos/Onit/Assets.xcassets/Colors/HintBG.colorset/Contents.json b/macos/Onit/Assets.xcassets/Colors/HintBG.colorset/Contents.json new file mode 100644 index 000000000..68a782f95 --- /dev/null +++ b/macos/Onit/Assets.xcassets/Colors/HintBG.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "display-p3", + "components" : { + "alpha" : "0.700", + "blue" : "0xEA", + "green" : "0xE9", + "red" : "0xE8" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "display-p3", + "components" : { + "alpha" : "0.800", + "blue" : "0x29", + "green" : "0x24", + "red" : "0x23" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/macos/Onit/Assets.xcassets/Colors/LimeGreen.colorset/Contents.json b/macos/Onit/Assets.xcassets/Colors/Lime400.colorset/Contents.json similarity index 88% rename from macos/Onit/Assets.xcassets/Colors/LimeGreen.colorset/Contents.json rename to macos/Onit/Assets.xcassets/Colors/Lime400.colorset/Contents.json index 5d8341dc0..5d8a70b86 100644 --- a/macos/Onit/Assets.xcassets/Colors/LimeGreen.colorset/Contents.json +++ b/macos/Onit/Assets.xcassets/Colors/Lime400.colorset/Contents.json @@ -5,9 +5,9 @@ "color-space" : "srgb", "components" : { "alpha" : "1.000", - "blue" : "0x92", - "green" : "0xFF", - "red" : "0x79" + "blue" : "0x42", + "green" : "0xAC", + "red" : "0x29" } }, "idiom" : "universal" @@ -23,9 +23,9 @@ "color-space" : "srgb", "components" : { "alpha" : "1.000", - "blue" : "0.573", - "green" : "1.000", - "red" : "0.475" + "blue" : "0x92", + "green" : "0xFF", + "red" : "0x79" } }, "idiom" : "universal" diff --git a/macos/Onit/Assets.xcassets/Colors/MessageBG.colorset/Contents.json b/macos/Onit/Assets.xcassets/Colors/MessageBG.colorset/Contents.json new file mode 100644 index 000000000..3bd7fb4ab --- /dev/null +++ b/macos/Onit/Assets.xcassets/Colors/MessageBG.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "display-p3", + "components" : { + "alpha" : "0.800", + "blue" : "0xF9", + "green" : "0xF6", + "red" : "0xF5" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "display-p3", + "components" : { + "alpha" : "0.500", + "blue" : "0x48", + "green" : "0x3F", + "red" : "0x3C" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/macos/Onit/Assets.xcassets/Colors/Orange500.colorset/Contents.json b/macos/Onit/Assets.xcassets/Colors/Orange500.colorset/Contents.json new file mode 100644 index 000000000..8ef47fc38 --- /dev/null +++ b/macos/Onit/Assets.xcassets/Colors/Orange500.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "display-p3", + "components" : { + "alpha" : "1.000", + "blue" : "0x1F", + "green" : "0x99", + "red" : "0xFD" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "display-p3", + "components" : { + "alpha" : "1.000", + "blue" : "0x2C", + "green" : "0xA0", + "red" : "0xFF" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/macos/Onit/Assets.xcassets/Colors/PlaceholderText.colorset/Contents.json b/macos/Onit/Assets.xcassets/Colors/PlaceholderText.colorset/Contents.json new file mode 100644 index 000000000..841d64fa3 --- /dev/null +++ b/macos/Onit/Assets.xcassets/Colors/PlaceholderText.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "display-p3", + "components" : { + "alpha" : "0.400", + "blue" : "0x00", + "green" : "0x00", + "red" : "0x00" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "display-p3", + "components" : { + "alpha" : "0.400", + "blue" : "0xFF", + "green" : "0xFF", + "red" : "0xFF" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/macos/Onit/Assets.xcassets/Colors/Red500.colorset/Contents.json b/macos/Onit/Assets.xcassets/Colors/Red500.colorset/Contents.json new file mode 100644 index 000000000..a0460ca24 --- /dev/null +++ b/macos/Onit/Assets.xcassets/Colors/Red500.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "display-p3", + "components" : { + "alpha" : "1.000", + "blue" : "0x2A", + "green" : "0x2B", + "red" : "0xFA" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "display-p3", + "components" : { + "alpha" : "1.000", + "blue" : "0x2A", + "green" : "0x2B", + "red" : "0xFA" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/macos/Onit/Assets.xcassets/Colors/RedBrick.colorset/Contents.json b/macos/Onit/Assets.xcassets/Colors/RedBrick.colorset/Contents.json index 897a5053c..65780d499 100644 --- a/macos/Onit/Assets.xcassets/Colors/RedBrick.colorset/Contents.json +++ b/macos/Onit/Assets.xcassets/Colors/RedBrick.colorset/Contents.json @@ -5,9 +5,9 @@ "color-space" : "srgb", "components" : { "alpha" : "1.000", - "blue" : "0.172", - "green" : "0.172", - "red" : "0.270" + "blue" : "0x2B", + "green" : "0x2B", + "red" : "0x44" } }, "idiom" : "universal" diff --git a/macos/Onit/Assets.xcassets/Colors/RedDisabled.colorset/Contents.json b/macos/Onit/Assets.xcassets/Colors/RedDisabled.colorset/Contents.json index 8cdfb6696..5494c412b 100644 --- a/macos/Onit/Assets.xcassets/Colors/RedDisabled.colorset/Contents.json +++ b/macos/Onit/Assets.xcassets/Colors/RedDisabled.colorset/Contents.json @@ -1,38 +1,38 @@ { - "colors": [ - { - "color": { - "color-space": "srgb", - "components": { - "alpha": "1.000", - "blue": "0.141", - "green": "0.141", - "red": "0.239" - } - }, - "idiom": "universal" - }, + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xDC", + "green" : "0xDC", + "red" : "0xF5" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ { - "appearances": [ - { - "appearance": "luminosity", - "value": "dark" - } - ], - "color": { - "color-space": "srgb", - "components": { - "alpha": "1.000", - "blue": "0.141", - "green": "0.141", - "red": "0.239" - } - }, - "idiom": "universal" + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x24", + "green" : "0x24", + "red" : "0x3D" } - ], - "info": { - "author": "xcode", - "version": 1 + }, + "idiom" : "universal" } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } } diff --git a/macos/Onit/Assets.xcassets/Colors/RedDisabledHover.colorset/Contents.json b/macos/Onit/Assets.xcassets/Colors/RedDisabledHover.colorset/Contents.json index 5674b45b4..1a9df1872 100644 --- a/macos/Onit/Assets.xcassets/Colors/RedDisabledHover.colorset/Contents.json +++ b/macos/Onit/Assets.xcassets/Colors/RedDisabledHover.colorset/Contents.json @@ -1,38 +1,38 @@ { - "colors": [ - { - "color": { - "color-space": "srgb", - "components": { - "alpha": "1.000", - "blue": "0.196", - "green": "0.196", - "red": "0.345" - } - }, - "idiom": "universal" - }, + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xC8", + "green" : "0xC8", + "red" : "0xEE" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ { - "appearances": [ - { - "appearance": "luminosity", - "value": "dark" - } - ], - "color": { - "color-space": "srgb", - "components": { - "alpha": "1.000", - "blue": "0.196", - "green": "0.196", - "red": "0.345" - } - }, - "idiom": "universal" + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x32", + "green" : "0x32", + "red" : "0x58" } - ], - "info": { - "author": "xcode", - "version": 1 + }, + "idiom" : "universal" } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } } diff --git a/macos/Onit/Assets.xcassets/Colors/RedPale400.colorset/Contents.json b/macos/Onit/Assets.xcassets/Colors/RedPale400.colorset/Contents.json new file mode 100644 index 000000000..0162e0a2a --- /dev/null +++ b/macos/Onit/Assets.xcassets/Colors/RedPale400.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "display-p3", + "components" : { + "alpha" : "1.000", + "blue" : "0x57", + "green" : "0x50", + "red" : "0xF5" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "display-p3", + "components" : { + "alpha" : "1.000", + "blue" : "0x61", + "green" : "0x5A", + "red" : "0xFF" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/macos/Onit/Assets.xcassets/Colors/S0.colorset/Contents.json b/macos/Onit/Assets.xcassets/Colors/S0.colorset/Contents.json new file mode 100644 index 000000000..b793681c5 --- /dev/null +++ b/macos/Onit/Assets.xcassets/Colors/S0.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "display-p3", + "components" : { + "alpha" : "1.000", + "blue" : "0x00", + "green" : "0x00", + "red" : "0x00" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "display-p3", + "components" : { + "alpha" : "1.000", + "blue" : "0xFF", + "green" : "0xFF", + "red" : "0xFF" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/macos/Onit/Assets.xcassets/Colors/S1.colorset/Contents.json b/macos/Onit/Assets.xcassets/Colors/S1.colorset/Contents.json new file mode 100644 index 000000000..e2b4485fb --- /dev/null +++ b/macos/Onit/Assets.xcassets/Colors/S1.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "display-p3", + "components" : { + "alpha" : "1.000", + "blue" : "0x75", + "green" : "0x6C", + "red" : "0x69" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "display-p3", + "components" : { + "alpha" : "1.000", + "blue" : "0xCE", + "green" : "0xC5", + "red" : "0xC1" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/macos/Onit/Assets.xcassets/Colors/S10.colorset/Contents.json b/macos/Onit/Assets.xcassets/Colors/S10.colorset/Contents.json new file mode 100644 index 000000000..a4f750991 --- /dev/null +++ b/macos/Onit/Assets.xcassets/Colors/S10.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "display-p3", + "components" : { + "alpha" : "1.000", + "blue" : "0xFF", + "green" : "0xFF", + "red" : "0xFF" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "display-p3", + "components" : { + "alpha" : "1.000", + "blue" : "0x00", + "green" : "0x00", + "red" : "0x00" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/macos/Onit/Assets.xcassets/Colors/S2.colorset/Contents.json b/macos/Onit/Assets.xcassets/Colors/S2.colorset/Contents.json new file mode 100644 index 000000000..67d6fd835 --- /dev/null +++ b/macos/Onit/Assets.xcassets/Colors/S2.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "display-p3", + "components" : { + "alpha" : "1.000", + "blue" : "0x88", + "green" : "0x7F", + "red" : "0x7B" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "display-p3", + "components" : { + "alpha" : "1.000", + "blue" : "0x9B", + "green" : "0x92", + "red" : "0x8E" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/macos/Onit/Assets.xcassets/Colors/S3.colorset/Contents.json b/macos/Onit/Assets.xcassets/Colors/S3.colorset/Contents.json new file mode 100644 index 000000000..f9689fe54 --- /dev/null +++ b/macos/Onit/Assets.xcassets/Colors/S3.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "display-p3", + "components" : { + "alpha" : "1.000", + "blue" : "0x9D", + "green" : "0x94", + "red" : "0x8F" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "display-p3", + "components" : { + "alpha" : "1.000", + "blue" : "0x78", + "green" : "0x71", + "red" : "0x6E" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/macos/Onit/Assets.xcassets/Colors/S4.colorset/Contents.json b/macos/Onit/Assets.xcassets/Colors/S4.colorset/Contents.json new file mode 100644 index 000000000..e4717e09d --- /dev/null +++ b/macos/Onit/Assets.xcassets/Colors/S4.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "display-p3", + "components" : { + "alpha" : "1.000", + "blue" : "0xC8", + "green" : "0xC1", + "red" : "0xBE" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "display-p3", + "components" : { + "alpha" : "1.000", + "blue" : "0x5C", + "green" : "0x56", + "red" : "0x54" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/macos/Onit/Assets.xcassets/Colors/S5.colorset/Contents.json b/macos/Onit/Assets.xcassets/Colors/S5.colorset/Contents.json new file mode 100644 index 000000000..8adb64714 --- /dev/null +++ b/macos/Onit/Assets.xcassets/Colors/S5.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "display-p3", + "components" : { + "alpha" : "1.000", + "blue" : "0xD5", + "green" : "0xD0", + "red" : "0xCD" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "display-p3", + "components" : { + "alpha" : "1.000", + "blue" : "0x42", + "green" : "0x3C", + "red" : "0x3A" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/macos/Onit/Assets.xcassets/Colors/S6.colorset/Contents.json b/macos/Onit/Assets.xcassets/Colors/S6.colorset/Contents.json new file mode 100644 index 000000000..f60935a3d --- /dev/null +++ b/macos/Onit/Assets.xcassets/Colors/S6.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "display-p3", + "components" : { + "alpha" : "1.000", + "blue" : "0xDE", + "green" : "0xDC", + "red" : "0xDA" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "display-p3", + "components" : { + "alpha" : "1.000", + "blue" : "0x35", + "green" : "0x30", + "red" : "0x2E" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/macos/Onit/Assets.xcassets/Colors/S7.colorset/Contents.json b/macos/Onit/Assets.xcassets/Colors/S7.colorset/Contents.json new file mode 100644 index 000000000..507d56c4c --- /dev/null +++ b/macos/Onit/Assets.xcassets/Colors/S7.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "display-p3", + "components" : { + "alpha" : "1.000", + "blue" : "0xE7", + "green" : "0xE6", + "red" : "0xE5" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "display-p3", + "components" : { + "alpha" : "1.000", + "blue" : "0x2F", + "green" : "0x2A", + "red" : "0x28" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/macos/Onit/Assets.xcassets/Colors/S8.colorset/Contents.json b/macos/Onit/Assets.xcassets/Colors/S8.colorset/Contents.json new file mode 100644 index 000000000..8fe44374f --- /dev/null +++ b/macos/Onit/Assets.xcassets/Colors/S8.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "display-p3", + "components" : { + "alpha" : "1.000", + "blue" : "0xEA", + "green" : "0xE9", + "red" : "0xE8" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "display-p3", + "components" : { + "alpha" : "1.000", + "blue" : "0x29", + "green" : "0x24", + "red" : "0x23" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/macos/Onit/Assets.xcassets/Colors/S9.colorset/Contents.json b/macos/Onit/Assets.xcassets/Colors/S9.colorset/Contents.json new file mode 100644 index 000000000..0e7345f8f --- /dev/null +++ b/macos/Onit/Assets.xcassets/Colors/S9.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "display-p3", + "components" : { + "alpha" : "1.000", + "blue" : "0xF2", + "green" : "0xF1", + "red" : "0xF1" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "display-p3", + "components" : { + "alpha" : "1.000", + "blue" : "0x1A", + "green" : "0x17", + "red" : "0x16" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/macos/Onit/Assets.xcassets/Colors/T1.colorset/Contents.json b/macos/Onit/Assets.xcassets/Colors/T1.colorset/Contents.json new file mode 100644 index 000000000..43488caf0 --- /dev/null +++ b/macos/Onit/Assets.xcassets/Colors/T1.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "display-p3", + "components" : { + "alpha" : "0.800", + "blue" : "0x52", + "green" : "0x47", + "red" : "0x43" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "display-p3", + "components" : { + "alpha" : "0.800", + "blue" : "0xFF", + "green" : "0xF5", + "red" : "0xF1" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/macos/Onit/Assets.xcassets/Colors/T2.colorset/Contents.json b/macos/Onit/Assets.xcassets/Colors/T2.colorset/Contents.json index a34f65193..f830a1fa2 100644 --- a/macos/Onit/Assets.xcassets/Colors/T2.colorset/Contents.json +++ b/macos/Onit/Assets.xcassets/Colors/T2.colorset/Contents.json @@ -4,10 +4,10 @@ "color" : { "color-space" : "display-p3", "components" : { - "alpha" : "1.000", - "blue" : "0xD8", - "green" : "0xCF", - "red" : "0xCD" + "alpha" : "0.750", + "blue" : "0x5F", + "green" : "0x53", + "red" : "0x4F" } }, "idiom" : "universal" @@ -22,10 +22,10 @@ "color" : { "color-space" : "display-p3", "components" : { - "alpha" : "1.000", - "blue" : "0xD8", - "green" : "0xCF", - "red" : "0xCD" + "alpha" : "0.600", + "blue" : "0xFF", + "green" : "0xEF", + "red" : "0xE8" } }, "idiom" : "universal" diff --git a/macos/Onit/Assets.xcassets/Colors/T3.colorset/Contents.json b/macos/Onit/Assets.xcassets/Colors/T3.colorset/Contents.json index c9cb68b60..b44e9a207 100644 --- a/macos/Onit/Assets.xcassets/Colors/T3.colorset/Contents.json +++ b/macos/Onit/Assets.xcassets/Colors/T3.colorset/Contents.json @@ -4,10 +4,10 @@ "color" : { "color-space" : "display-p3", "components" : { - "alpha" : "1.000", - "blue" : "0xBD", - "green" : "0xB2", - "red" : "0xAE" + "alpha" : "0.650", + "blue" : "0x6A", + "green" : "0x58", + "red" : "0x51" } }, "idiom" : "universal" @@ -22,10 +22,10 @@ "color" : { "color-space" : "display-p3", "components" : { - "alpha" : "1.000", - "blue" : "0xBD", - "green" : "0xB2", - "red" : "0xAE" + "alpha" : "0.500", + "blue" : "0xFF", + "green" : "0xF0", + "red" : "0xEA" } }, "idiom" : "universal" diff --git a/macos/Onit/Assets.xcassets/Colors/T4.colorset/Contents.json b/macos/Onit/Assets.xcassets/Colors/T4.colorset/Contents.json index 79ec66333..9dd953ba8 100644 --- a/macos/Onit/Assets.xcassets/Colors/T4.colorset/Contents.json +++ b/macos/Onit/Assets.xcassets/Colors/T4.colorset/Contents.json @@ -4,10 +4,10 @@ "color" : { "color-space" : "display-p3", "components" : { - "alpha" : "1.000", - "blue" : "0x6E", - "green" : "0x68", - "red" : "0x67" + "alpha" : "0.400", + "blue" : "0x78", + "green" : "0x65", + "red" : "0x5D" } }, "idiom" : "universal" @@ -22,10 +22,10 @@ "color" : { "color-space" : "display-p3", "components" : { - "alpha" : "1.000", - "blue" : "0x6E", - "green" : "0x68", - "red" : "0x67" + "alpha" : "0.400", + "blue" : "0xFF", + "green" : "0xEF", + "red" : "0xE9" } }, "idiom" : "universal" diff --git a/macos/Onit/Assets.xcassets/Colors/T5.colorset/Contents.json b/macos/Onit/Assets.xcassets/Colors/T5.colorset/Contents.json index af6ce5075..d4f86dc9f 100644 --- a/macos/Onit/Assets.xcassets/Colors/T5.colorset/Contents.json +++ b/macos/Onit/Assets.xcassets/Colors/T5.colorset/Contents.json @@ -4,10 +4,10 @@ "color" : { "color-space" : "display-p3", "components" : { - "alpha" : "1.000", - "blue" : "0x57", - "green" : "0x51", - "red" : "0x50" + "alpha" : "0.310", + "blue" : "0x7A", + "green" : "0x66", + "red" : "0x5D" } }, "idiom" : "universal" @@ -22,10 +22,10 @@ "color" : { "color-space" : "display-p3", "components" : { - "alpha" : "1.000", - "blue" : "0x57", - "green" : "0x51", - "red" : "0x50" + "alpha" : "0.300", + "blue" : "0xFF", + "green" : "0xE8", + "red" : "0xDF" } }, "idiom" : "universal" diff --git a/macos/Onit/Assets.xcassets/Colors/T6.colorset/Contents.json b/macos/Onit/Assets.xcassets/Colors/T6.colorset/Contents.json new file mode 100644 index 000000000..02fc8b920 --- /dev/null +++ b/macos/Onit/Assets.xcassets/Colors/T6.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "display-p3", + "components" : { + "alpha" : "0.250", + "blue" : "0x7A", + "green" : "0x73", + "red" : "0x70" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "display-p3", + "components" : { + "alpha" : "0.200", + "blue" : "0xFF", + "green" : "0xE4", + "red" : "0xD9" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/macos/Onit/Assets.xcassets/Colors/T7.colorset/Contents.json b/macos/Onit/Assets.xcassets/Colors/T7.colorset/Contents.json index 22fb5cc30..66d70bdfa 100644 --- a/macos/Onit/Assets.xcassets/Colors/T7.colorset/Contents.json +++ b/macos/Onit/Assets.xcassets/Colors/T7.colorset/Contents.json @@ -4,10 +4,28 @@ "color" : { "color-space" : "srgb", "components" : { - "alpha" : "1.000", - "blue" : "0x47", - "green" : "0x42", - "red" : "0x40" + "alpha" : "0.180", + "blue" : "0x7A", + "green" : "0x73", + "red" : "0x70" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "0.190", + "blue" : "0xF7", + "green" : "0xDD", + "red" : "0xD2" } }, "idiom" : "universal" diff --git a/macos/Onit/Assets.xcassets/Colors/T8.colorset/Contents.json b/macos/Onit/Assets.xcassets/Colors/T8.colorset/Contents.json index 6dfa797d5..e9ac4eb6e 100644 --- a/macos/Onit/Assets.xcassets/Colors/T8.colorset/Contents.json +++ b/macos/Onit/Assets.xcassets/Colors/T8.colorset/Contents.json @@ -4,10 +4,10 @@ "color" : { "color-space" : "display-p3", "components" : { - "alpha" : "1.000", - "blue" : "0x59", - "green" : "0x50", - "red" : "0x4D" + "alpha" : "0.160", + "blue" : "0x7A", + "green" : "0x73", + "red" : "0x70" } }, "idiom" : "universal" @@ -22,10 +22,10 @@ "color" : { "color-space" : "display-p3", "components" : { - "alpha" : "1.000", - "blue" : "0x59", - "green" : "0x50", - "red" : "0x4D" + "alpha" : "0.150", + "blue" : "0xFF", + "green" : "0xE3", + "red" : "0xDD" } }, "idiom" : "universal" diff --git a/macos/Onit/Assets.xcassets/Colors/T9.colorset/Contents.json b/macos/Onit/Assets.xcassets/Colors/T9.colorset/Contents.json new file mode 100644 index 000000000..15be29cc8 --- /dev/null +++ b/macos/Onit/Assets.xcassets/Colors/T9.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "display-p3", + "components" : { + "alpha" : "0.100", + "blue" : "0x7A", + "green" : "0x73", + "red" : "0x70" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "display-p3", + "components" : { + "alpha" : "0.100", + "blue" : "0xFF", + "green" : "0xE5", + "red" : "0xE0" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/macos/Onit/Assets.xcassets/Colors/WarningDisabled.colorset/Contents.json b/macos/Onit/Assets.xcassets/Colors/WarningDisabled.colorset/Contents.json index b8dc74849..117e42880 100644 --- a/macos/Onit/Assets.xcassets/Colors/WarningDisabled.colorset/Contents.json +++ b/macos/Onit/Assets.xcassets/Colors/WarningDisabled.colorset/Contents.json @@ -1,38 +1,38 @@ { - "colors": [ - { - "color": { - "color-space": "srgb", - "components": { - "alpha": "1.000", - "blue": "0.137", - "green": "0.184", - "red": "0.220" - } - }, - "idiom": "universal" - }, + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xD0", + "green" : "0xE3", + "red" : "0xF2" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ { - "appearances": [ - { - "appearance": "luminosity", - "value": "dark" - } - ], - "color": { - "color-space": "srgb", - "components": { - "alpha": "1.000", - "blue": "0.137", - "green": "0.184", - "red": "0.220" - } - }, - "idiom": "universal" + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x23", + "green" : "0x2F", + "red" : "0x38" } - ], - "info": { - "author": "xcode", - "version": 1 + }, + "idiom" : "universal" } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } } diff --git a/macos/Onit/Assets.xcassets/Colors/WarningDisabledHover.colorset/Contents.json b/macos/Onit/Assets.xcassets/Colors/WarningDisabledHover.colorset/Contents.json index e2d2902b5..a175dda76 100644 --- a/macos/Onit/Assets.xcassets/Colors/WarningDisabledHover.colorset/Contents.json +++ b/macos/Onit/Assets.xcassets/Colors/WarningDisabledHover.colorset/Contents.json @@ -1,38 +1,38 @@ { - "colors": [ - { - "color": { - "color-space": "srgb", - "components": { - "alpha": "1.000", - "blue": "0.196", - "green": "0.278", - "red": "0.345" - } - }, - "idiom": "universal" - }, + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xB3", + "green" : "0xD5", + "red" : "0xF0" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ { - "appearances": [ - { - "appearance": "luminosity", - "value": "dark" - } - ], - "color": { - "color-space": "srgb", - "components": { - "alpha": "1.000", - "blue": "0.196", - "green": "0.278", - "red": "0.345" - } - }, - "idiom": "universal" + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x32", + "green" : "0x47", + "red" : "0x58" } - ], - "info": { - "author": "xcode", - "version": 1 + }, + "idiom" : "universal" } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } } diff --git a/macos/Onit/General/Styles/HoverableButtonStyle.swift b/macos/Onit/General/Styles/HoverableButtonStyle.swift index 3bbd7065c..9a3a90c4b 100644 --- a/macos/Onit/General/Styles/HoverableButtonStyle.swift +++ b/macos/Onit/General/Styles/HoverableButtonStyle.swift @@ -47,7 +47,7 @@ struct HoverableButtonStyle: ButtonStyle { private func clickBackground(_ clicked: Bool) -> some View { if background { RoundedRectangle(cornerRadius: 6) - .fill(.gray600) + .fill(Color.T_7) .opacity(clicked ? 1 : 0) } } @@ -56,7 +56,7 @@ struct HoverableButtonStyle: ButtonStyle { private var hoverBackground: some View { if background { RoundedRectangle(cornerRadius: 6) - .fill(.gray800) + .fill(Color.T_8) .opacity(hovering ? 1 : 0) .animation(.easeInOut(duration: 0.15), value: hovering) } diff --git a/macos/Onit/General/Styles/ViewStyle.swift b/macos/Onit/General/Styles/ViewStyle.swift index 857dc1d6e..f9eabe130 100644 --- a/macos/Onit/General/Styles/ViewStyle.swift +++ b/macos/Onit/General/Styles/ViewStyle.swift @@ -15,7 +15,7 @@ struct GradientBorder { } struct DefaultBorderValues { - var cornerRadius: CGFloat = 12 + var cornerRadius: CGFloat = 10 var inset: CGFloat = 0.5 var lineWidth: CGFloat = 1 } @@ -25,7 +25,7 @@ extension View { cornerRadius: CGFloat = DefaultBorderValues().cornerRadius, inset: CGFloat = DefaultBorderValues().inset, lineWidth: CGFloat = DefaultBorderValues().lineWidth, - stroke: Color = Color.gray500, + stroke: Color = Color.genericBorder, dotted: Bool = false ) -> some View { self @@ -85,7 +85,7 @@ extension View { func styleText( size: CGFloat = 14, weight: Font.Weight = Font.Weight.medium, - color: Color = Color.primary, + color: Color = Color.S_0, align: TextAlignment = TextAlignment.leading, underline: Bool = false ) -> some View { @@ -107,7 +107,7 @@ extension View { extension View { func addButtonEffects( background: Color = .clear, - hoverBackground: Color = .gray600, + hoverBackground: Color = Color.T_8, cornerRadius: CGFloat = 8, disabled: Bool = false, allowsHitTesting: Bool = true, diff --git a/macos/Onit/UI/Alerts/SubscriptionAlert.swift b/macos/Onit/UI/Alerts/SubscriptionAlert.swift index b22c08393..94b84ffbc 100644 --- a/macos/Onit/UI/Alerts/SubscriptionAlert.swift +++ b/macos/Onit/UI/Alerts/SubscriptionAlert.swift @@ -102,8 +102,7 @@ struct SubscriptionAlert: View { } .frame(maxHeight: .infinity) .background( - Color.black - .opacity(0.8) + Color.baseBG .onTapGesture { close?() } diff --git a/macos/Onit/UI/Auth/AuthFlow.swift b/macos/Onit/UI/Auth/AuthFlow.swift index 69b0023d3..1019415cb 100644 --- a/macos/Onit/UI/Auth/AuthFlow.swift +++ b/macos/Onit/UI/Auth/AuthFlow.swift @@ -58,6 +58,7 @@ struct AuthFlow: View { } .frame(maxWidth: .infinity, maxHeight: .infinity) .padding(.top, 134) + .background(Color.baseBG) } } @@ -73,7 +74,7 @@ extension AuthFlow { if !errorMessageAuth.isEmpty { Text(errorMessageAuth) - .styleText(size: 12, weight: .medium, color: .red, align: .center) + .styleText(size: 12, weight: .medium, color: Color.red500, align: .center) } } } @@ -91,10 +92,10 @@ extension AuthFlow { Text("Continue with email") .frame(maxWidth: .infinity) .frame(height: 40) - .styleText(align: .center) + .styleText(color: Color.white, align: .center) .addButtonEffects( - background: .blue400, - hoverBackground: .blue350, + background: Color.blue400, + hoverBackground: Color.blue350, cornerRadius: 9, isHovered: $isHoveredContinueWithEmailButton, isPressed: $isPressedContinueWithEmailButton, @@ -113,7 +114,7 @@ extension AuthFlow { VStack(alignment: .center, spacing: 12) { formAuthButtons - Text("OR").styleText(size: 12, color: .gray300) + Text("OR").styleText(size: 12, color: Color.S_3) VStack(spacing: 20) { VStack(spacing: 12) { @@ -129,13 +130,14 @@ extension AuthFlow { private var agreement: some View { Text(generateAgreementText()) + .frame(width: 320) .styleText(size: 12, align: .center) } private var redirectSection: some View { HStack(spacing: 6) { Text(isSignUp ? "Already have an account?" : "Don't have an account?") - .styleText(size: 13, weight: .regular, color: .gray100) + .styleText(size: 13, weight: .regular, color: Color.S_1) Button { if isSignUp { @@ -183,7 +185,7 @@ extension AuthFlow { .styleText( size: 13, weight: .regular, - color: .gray100 + color: Color.S_1 ) Text(email).styleText(size: 15, weight: .regular) @@ -195,12 +197,12 @@ extension AuthFlow { VStack(alignment: .center, spacing: 28) { VStack(alignment: .center, spacing: 0) { Text("Didn't get it? Check your spam folder and the spelling") - .styleText(size: 12, color: .gray200, align: .center) + .styleText(size: 12, color: Color.S_2, align: .center) .frame(maxWidth: .infinity) HStack(spacing: 4) { Text("of your email address, or") - .styleText(size: 12, color: .gray200) + .styleText(size: 12, color: Color.S_2) Button { requestEmailLoginLink() @@ -218,8 +220,8 @@ extension AuthFlow { Text("← Back") .frame(height: 40) .padding(.horizontal, 14) - .background(isHoveredBackButton ? .gray900 : .clear) - .addBorder(cornerRadius: 9, stroke: .gray700) + .background(isHoveredBackButton ? Color.T_8 : Color.T_9) + .addBorder(cornerRadius: 9, stroke: Color.genericBorder) .scaleEffect(isPressedBackButton ? 0.98 : 1) .opacity(isPressedBackButton ? 0.7 : 1) .addAnimation(dependency: isHoveredBackButton) @@ -245,24 +247,24 @@ extension AuthFlow { extension AuthFlow { private func generateAgreementText() -> AttributedString { var agreementText = AttributedString("By continuing with Google or email, you agree to our ") - agreementText.foregroundColor = .gray300 + agreementText.foregroundColor = Color.S_3 var termsText = AttributedString("Terms of Service") - termsText.foregroundColor = .gray200 + termsText.foregroundColor = Color.S_2 termsText.link = URL(string: "https://www.getonit.ai/") agreementText.append(termsText) var andText = AttributedString(" and ") - andText.foregroundColor = .gray300 + andText.foregroundColor = Color.S_3 agreementText.append(andText) var privacyText = AttributedString("Privacy Policy") - privacyText.foregroundColor = .gray200 + privacyText.foregroundColor = Color.S_2 privacyText.link = URL(string: "https://www.getonit.ai/") agreementText.append(privacyText) var periodText = AttributedString(".") - periodText.foregroundColor = .gray300 + periodText.foregroundColor = Color.S_3 agreementText.append(periodText) return agreementText @@ -272,11 +274,11 @@ extension AuthFlow { var skipText = AttributedString("") var orText = AttributedString("or, ") - orText.foregroundColor = .gray100 + orText.foregroundColor = Color.S_1 skipText.append(orText) var mainText = AttributedString("skip account creation & use own APIs →") - mainText.foregroundColor = Color.primary + mainText.foregroundColor = Color.S_0 skipText.append(mainText) return skipText diff --git a/macos/Onit/UI/Chat/ChatSystemPromptView.swift b/macos/Onit/UI/Chat/ChatSystemPromptView.swift index a52adf684..2320d462b 100644 --- a/macos/Onit/UI/Chat/ChatSystemPromptView.swift +++ b/macos/Onit/UI/Chat/ChatSystemPromptView.swift @@ -26,7 +26,7 @@ struct ChatSystemPromptView: View { isExpanded.toggle() } } label: { - HStack(alignment: .top, spacing: 6) { + HStack(alignment: .center, spacing: 6) { Image(.chatSettings) .renderingMode(.template) Text(systemPrompt.name) @@ -48,11 +48,12 @@ struct ChatSystemPromptView: View { .appFont(.medium14) .frame(maxWidth: .infinity, alignment: .leading) .padding([.horizontal, .top], 12) + .foregroundColor(Color.S_1) ScrollView { Text(systemPrompt.prompt) .appFont(.medium14) - .foregroundStyle(.gray100) + .foregroundStyle(Color.S_1) .padding(.horizontal, 12) .background( GeometryReader { geometry in @@ -69,7 +70,7 @@ struct ChatSystemPromptView: View { .scrollBounceBehavior(.basedOnSize) .frame(height: min(contentHeight, 165)) - PromptDivider() + DividerHorizontal() HStack(alignment: .top, spacing: 4) { Image(systemName: "info.circle") @@ -79,16 +80,16 @@ struct ChatSystemPromptView: View { VStack(alignment: .leading, spacing: 4) { Text(infoFirstLine) .appFont(.medium13) - .foregroundStyle(.white.opacity(0.5)) + .foregroundStyle(Color.S_0.opacity(0.5)) HStack(spacing: 0) { Text(infoSecondLinePrefix) .appFont(.medium13) - .foregroundStyle(.white.opacity(0.5)) + .foregroundStyle(Color.S_0.opacity(0.5)) Text(infoClickableText) .appFont(.medium13) - .foregroundStyle(.blue300) + .foregroundStyle(Color.blue300) .underline() .onTapGesture { state?.newChat(shouldSystemPrompt: true) @@ -99,9 +100,9 @@ struct ChatSystemPromptView: View { .padding([.horizontal, .bottom], 12) } .background { - RoundedRectangle(cornerRadius: 8) - .stroke(lineWidth: 1) - .fill(.gray600) + RoundedRectangle(cornerRadius: 10) + .fill(Color.messageBG) + .strokeBorder(Color.genericBorder, lineWidth: 1) } } } diff --git a/macos/Onit/UI/Chat/ChatView.swift b/macos/Onit/UI/Chat/ChatView.swift index 7b95aebd0..75dcab3bc 100644 --- a/macos/Onit/UI/Chat/ChatView.swift +++ b/macos/Onit/UI/Chat/ChatView.swift @@ -69,15 +69,13 @@ struct ChatView: View { IconButton( icon: .arrowDown, buttonSize: 36, - activeColor: .white, - inactiveColor: .white, - hoverBackground: .gray400, + activeColor: Color.S_0, tooltipPrompt: "Scroll to bottom" ) { hasUserManuallyScrolled = false } - .background(.gray600) - .addBorder(cornerRadius: 18, stroke: .gray400) + .background(GlassBackground()) + .addBorder(cornerRadius: 18, stroke: Color.genericBorder) .transition(.scale.combined(with: .opacity)) .padding(.trailing, 20) } else { diff --git a/macos/Onit/UI/Components/ContextTag.swift b/macos/Onit/UI/Components/ContextTag.swift index 2ee48ba18..db29d0214 100644 --- a/macos/Onit/UI/Components/ContextTag.swift +++ b/macos/Onit/UI/Components/ContextTag.swift @@ -29,10 +29,10 @@ struct ContextTag: View { init( text: String, - textColor: Color = .T_2, - hoverTextColor: Color = .white, - background: Color = .gray500, - hoverBackground: Color = .gray400, + textColor: Color = Color.T_2, + hoverTextColor: Color = Color.S_0, + background: Color = Color.T_8, + hoverBackground: Color = Color.S_4, hasHoverBorder: Bool = false, hasDottedBorder: Bool = false, maxWidth: CGFloat = 155, @@ -114,7 +114,7 @@ struct ContextTag: View { .styleText( size: 12, weight: .regular, - color: .gray100 + color: Color.S_1 ) .truncateText() } @@ -148,7 +148,7 @@ struct ContextTag: View { .addAnimation(dependency: isHoveredBody) .addBorder( cornerRadius: 4, - stroke: hasHoverBorder && isHoveredBody ? .T_4 : borderColor ?? .clear, + stroke: hasHoverBorder && isHoveredBody ? Color.T_4 : borderColor ?? Color.clear, dotted: hasDottedBorder ) .addButtonEffects( @@ -182,7 +182,7 @@ extension ContextTag { } label: { Image(.cross) .addIconStyles( - foregroundColor: isHoveredRemove ? .white : .gray100, + foregroundColor: isHoveredRemove ? Color.S_0 : Color.T_3, iconSize: 9 ) .addAnimation(dependency: isHoveredRemove) diff --git a/macos/Onit/UI/Components/CopyButton.swift b/macos/Onit/UI/Components/CopyButton.swift index 7d9948f78..042b0b6a0 100644 --- a/macos/Onit/UI/Components/CopyButton.swift +++ b/macos/Onit/UI/Components/CopyButton.swift @@ -21,6 +21,7 @@ struct CopyButton: View { IconButton( icon: .copy, iconSize: 18, + inactiveColor: Color.S_0, tooltipPrompt: "Copy" ) { let pasteboard = NSPasteboard.general @@ -36,7 +37,7 @@ struct CopyButton: View { .opacity(showCheckmark ? 0 : 1) .overlay { Image(systemName: "checkmark.circle.fill") - .foregroundStyle(Color.limeGreen) + .foregroundStyle(Color.lime400) .opacity(showCheckmark ? 1 : 0) } .addAnimation(dependency: showCheckmark) diff --git a/macos/Onit/UI/Components/CustomTextField.swift b/macos/Onit/UI/Components/CustomTextField.swift index 6e4cc4707..fade9a219 100644 --- a/macos/Onit/UI/Components/CustomTextField.swift +++ b/macos/Onit/UI/Components/CustomTextField.swift @@ -14,10 +14,10 @@ struct CustomTextField: View { private let sidePadding: CGFloat struct Config { - var background: Color = .clear - var strokeColor: Color = .gray600 - var hoverStrokeColor: Color = .gray500 - var focusedStrokeColor: Color = .gray400 + var background: Color = Color.clear + var strokeColor: Color = Color.genericBorder + var hoverStrokeColor: Color = Color.T_5 + var focusedStrokeColor: Color = Color.genericBorder var clear: Bool = false var leftIcon: ImageResource? = nil } @@ -47,7 +47,7 @@ struct CustomTextField: View { Image(leftIcon) .resizable() .renderingMode(.template) - .foregroundColor(.gray200) + .foregroundColor(Color.S_2) .frame(width: iconSize, height: iconSize) } @@ -55,7 +55,7 @@ struct CustomTextField: View { TextField("", text: $text) .textFieldStyle(.plain) .font(.system(size: 14, weight: .medium)) - .foregroundColor(.white) + .foregroundColor(Color.S_0) .fixedSize(horizontal: false, vertical: true) .focused($focused) @@ -86,7 +86,7 @@ struct CustomTextField: View { extension CustomTextField { private var placeholderView: some View { Text(placeholder) - .styleText(color: .gray300) + .styleText(color: Color.placeholderText) .allowsHitTesting(false) } @@ -97,7 +97,7 @@ extension CustomTextField { Image(.smallCross) .resizable() .renderingMode(.template) - .foregroundColor(closeButtonHovered ? .white : .gray200) + .foregroundColor(closeButtonHovered ? Color.S_0 : Color.S_2) .frame(maxWidth: .infinity) .frame(maxHeight: .infinity) } diff --git a/macos/Onit/UI/Components/Divider.swift b/macos/Onit/UI/Components/Divider.swift index 2e6a705f2..bf1060dc4 100644 --- a/macos/Onit/UI/Components/Divider.swift +++ b/macos/Onit/UI/Components/Divider.swift @@ -9,7 +9,7 @@ import SwiftUI struct DividerHorizontal : View { var height: CGFloat = 1 - var foregroundColor: Color = Color.gray700 + var foregroundColor: Color = Color.genericBorder var body: some View { return Rectangle() diff --git a/macos/Onit/UI/Components/DynamicScrollView.swift b/macos/Onit/UI/Components/DynamicScrollView.swift index f9add6c70..752697011 100644 --- a/macos/Onit/UI/Components/DynamicScrollView.swift +++ b/macos/Onit/UI/Components/DynamicScrollView.swift @@ -14,7 +14,7 @@ struct DynamicScrollView: View { init( maxHeight: CGFloat, - gradientColor: Color = .gray900, + gradientColor: Color = Color.clear, @ViewBuilder children: @escaping () -> Children ) { self.maxHeight = maxHeight diff --git a/macos/Onit/UI/Components/GlassBackground.swift b/macos/Onit/UI/Components/GlassBackground.swift new file mode 100644 index 000000000..c6e7e0c61 --- /dev/null +++ b/macos/Onit/UI/Components/GlassBackground.swift @@ -0,0 +1,15 @@ +// +// GlassBackground.swift +// Onit +// +// Created by Loyd Kim on 7/29/25. +// + +import SwiftUI + +struct GlassBackground: View { + var body: some View { + Rectangle() + .fill(.thinMaterial) + } +} diff --git a/macos/Onit/UI/Components/IconButton.swift b/macos/Onit/UI/Components/IconButton.swift index dc72ad1d6..dd415d42a 100644 --- a/macos/Onit/UI/Components/IconButton.swift +++ b/macos/Onit/UI/Components/IconButton.swift @@ -29,12 +29,12 @@ struct IconButton: View { iconSize: CGFloat = 20, buttonSize: CGFloat = ToolbarButtonStyle.height, isActive: Bool = false, - activeColor: Color = .gray100, - inactiveColor: Color = .gray200, - hoverBackground: Color = .gray800, - activeBackground: Color = .gray800, + activeColor: Color = Color.S_1, + inactiveColor: Color = Color.T_3, + hoverBackground: Color = Color.T_8, + activeBackground: Color = Color.T_8, cornerRadius: CGFloat = ToolbarButtonStyle.cornerRadius, - activeBorderColor: Color = .gray500, + activeBorderColor: Color = Color.T_6, tooltipPrompt: String? = nil, tooltipShortcut: Tooltip.Shortcut? = nil, @@ -63,7 +63,7 @@ struct IconButton: View { @State private var isPressed: Bool = false var iconColor: Color { - if isHovered { return .white } + if isHovered { return Color.S_0 } else if isActive { return activeColor } else { return inactiveColor } } diff --git a/macos/Onit/UI/Components/InputField.swift b/macos/Onit/UI/Components/InputField.swift index edaf402d0..410411e8c 100644 --- a/macos/Onit/UI/Components/InputField.swift +++ b/macos/Onit/UI/Components/InputField.swift @@ -35,10 +35,10 @@ struct InputField: View { .frame(height: 40) .styleText(size: 14) .padding(.horizontal, 14) - .background(isHovered ? .gray800 : .gray900) + .background(isHovered ? Color.T_8 : Color.T_9) .addBorder( cornerRadius: 9, - stroke: errorMessage.isEmpty ? .gray500 : .red + stroke: errorMessage.isEmpty ? Color.genericBorder : Color.red500 ) .focused($isFocused) .onHover{ isHovering in isHovered = isHovering } @@ -49,7 +49,7 @@ struct InputField: View { if !errorMessage.isEmpty { Text(errorMessage) - .styleText(size: 12, weight: .medium, color: .red) + .styleText(size: 12, weight: .medium, color: Color.red500) .opacity(errorMessage.isEmpty ? 0 : 1) .addAnimation(dependency: errorMessage) } diff --git a/macos/Onit/UI/Components/LabeledTextField.swift b/macos/Onit/UI/Components/LabeledTextField.swift index 97d246858..91de89a58 100644 --- a/macos/Onit/UI/Components/LabeledTextField.swift +++ b/macos/Onit/UI/Components/LabeledTextField.swift @@ -17,7 +17,7 @@ struct LabeledTextField: View { VStack(alignment: .leading, spacing: 4) { Text(label) .font(.subheadline) - .foregroundColor(.secondary) + .foregroundColor(Color.secondary) .padding(.leading, 8) if secure { @@ -25,14 +25,14 @@ struct LabeledTextField: View { .textFieldStyle(.roundedBorder) .frame(height: 22) .font(.system(size: 13, weight: .regular)) - .foregroundColor(.primary) + .foregroundColor(Color.S_0) .textFieldStyle(PlainTextFieldStyle()) } else { TextField("", text: $text) .textFieldStyle(.roundedBorder) .frame(height: 22) .font(.system(size: 13, weight: .regular)) - .foregroundColor(.primary) + .foregroundColor(Color.S_0) .textFieldStyle(PlainTextFieldStyle()) } } diff --git a/macos/Onit/UI/Components/LoaderPulse.swift b/macos/Onit/UI/Components/LoaderPulse.swift index 1fe6f1c4b..2452abc86 100644 --- a/macos/Onit/UI/Components/LoaderPulse.swift +++ b/macos/Onit/UI/Components/LoaderPulse.swift @@ -18,7 +18,7 @@ struct LoaderPulse: View { init( size: CGFloat = 12, - color: Color = .white, + color: Color = Color.S_1, duration: Double = 0.6, pauseDuration: Double = 0.5 ) { diff --git a/macos/Onit/UI/Components/MenuHeader.swift b/macos/Onit/UI/Components/MenuHeader.swift index 030c9ce3c..9b6423f5f 100644 --- a/macos/Onit/UI/Components/MenuHeader.swift +++ b/macos/Onit/UI/Components/MenuHeader.swift @@ -24,7 +24,7 @@ struct MenuHeader: View { Text(title) .styleText( size: 13, - color: .gray100 + color: Color.S_1 ) .truncateText() diff --git a/macos/Onit/UI/Components/MenuList.swift b/macos/Onit/UI/Components/MenuList.swift index 74c79bb5d..d73aec318 100644 --- a/macos/Onit/UI/Components/MenuList.swift +++ b/macos/Onit/UI/Components/MenuList.swift @@ -45,9 +45,6 @@ struct MenuList: View { sections() } - .background(.gray900) .frame(width: width) - .addBorder() - .addShadow() } } diff --git a/macos/Onit/UI/Components/MenuSection.swift b/macos/Onit/UI/Components/MenuSection.swift index 0b94e09f7..b4ef89a74 100644 --- a/macos/Onit/UI/Components/MenuSection.swift +++ b/macos/Onit/UI/Components/MenuSection.swift @@ -21,7 +21,7 @@ struct MenuSection: View { init( titleIcon: ImageResource? = nil, - titleIconColor: Color = Color.white, + titleIconColor: Color = Color.S_0, title: String? = nil, showTopBorder: Bool = false, maxScrollHeight: CGFloat? = nil, @@ -85,7 +85,7 @@ extension MenuSection { Text(title) .font(.system(size: 13)) - .foregroundColor(.gray100) + .foregroundColor(Color.S_1) .truncateText() } .padding(.horizontal, 8) diff --git a/macos/Onit/UI/Components/OCRDetailSheet.swift b/macos/Onit/UI/Components/OCRDetailSheet.swift index 8b6b87634..7f3b1a51b 100644 --- a/macos/Onit/UI/Components/OCRDetailSheet.swift +++ b/macos/Onit/UI/Components/OCRDetailSheet.swift @@ -50,11 +50,11 @@ struct OCRDetailSheet: View { if result.appTitle != result.appName { Text(result.appTitle) .font(.subheadline) - .foregroundColor(.secondary) + .foregroundColor(Color.secondary) } Text("\(result.matchPercentage)% accessibility match") .font(.subheadline) - .foregroundColor(result.matchPercentage < 50 ? .red : result.matchPercentage < 75 ? .yellow : .green) + .foregroundColor(result.matchPercentage < 50 ? Color.red500 : result.matchPercentage < 75 ? Color.yellow : Color.green) } Spacer() @@ -141,14 +141,14 @@ struct OCRDetailSheet: View { if !missingText.isEmpty { Text("Text Missing from Accessibility:") .font(.system(size: 13, weight: .medium)) - .foregroundColor(.red) + .foregroundColor(Color.red500) ScrollView { Text(missingText) .font(.system(size: 11, design: .monospaced)) .frame(maxWidth: .infinity, alignment: .leading) } .padding(8) - .background(Color.red.opacity(0.1)) + .background(Color.red500.opacity(0.1)) .cornerRadius(4) .frame(maxHeight: 120) } @@ -369,11 +369,11 @@ private struct OCRImageViewerSheet: View { if result.appTitle != result.appName { Text(result.appTitle) .font(.subheadline) - .foregroundColor(.secondary) + .foregroundColor(Color.secondary) } Text("\(result.matchPercentage)% accessibility match") .font(.subheadline) - .foregroundColor(result.matchPercentage < 50 ? .red : result.matchPercentage < 75 ? .yellow : .green) + .foregroundColor(result.matchPercentage < 50 ? Color.red500 : result.matchPercentage < 75 ? Color.yellow : Color.green) } Spacer() diff --git a/macos/Onit/UI/Components/ResizeHandle.swift b/macos/Onit/UI/Components/ResizeHandle.swift index 8ea0ce6e7..7a9327ef3 100644 --- a/macos/Onit/UI/Components/ResizeHandle.swift +++ b/macos/Onit/UI/Components/ResizeHandle.swift @@ -36,7 +36,7 @@ struct ResizeHandle: View { } .background( RoundedCorners(radius: 14, corners: .bottomLeft) - .fill(Color.white) + .fill(Color.T_1) .opacity(isHovered ? 0.2 : 0) ) .clipped() diff --git a/macos/Onit/UI/Components/SearchBar.swift b/macos/Onit/UI/Components/SearchBar.swift index aa2c3f77b..d8ebdd44a 100644 --- a/macos/Onit/UI/Components/SearchBar.swift +++ b/macos/Onit/UI/Components/SearchBar.swift @@ -17,7 +17,7 @@ struct SearchBar: View { searchQuery: Binding, placeholder: String = "Search for...", sidePadding: CGFloat = 0, - background: Color = .gray800 + background: Color = Color.T_9 ) { self._searchQuery = searchQuery self.placeholder = placeholder diff --git a/macos/Onit/UI/Components/SimpleButton.swift b/macos/Onit/UI/Components/SimpleButton.swift index 40fac936e..29cc45e86 100644 --- a/macos/Onit/UI/Components/SimpleButton.swift +++ b/macos/Onit/UI/Components/SimpleButton.swift @@ -27,9 +27,9 @@ struct SimpleButton: View { disabled: Bool = false, spacing: CGFloat = 4, text: String, - textColor: Color = Color.primary, + textColor: Color = Color.S_0, action: @escaping () -> Void, - background: Color = Color.gray400 + background: Color = Color.S_4 ) { self.iconText = iconText self.iconImage = iconImage @@ -71,8 +71,8 @@ struct SimpleButton: View { .cornerRadius(5) .opacity(disabled ? 0.5 : isPressed ? 0.7 : 1) .allowsHitTesting(allowHitTesting) - .shadow(color: .black.opacity(0.05), radius: 0, x: 0, y: 0) - .shadow(color: .black.opacity(0.3), radius: 1.25, x: 0, y: 0.5) + .shadow(color: Color.black.opacity(0.05), radius: 0, x: 0, y: 0) + .shadow(color: Color.black.opacity(0.4), radius: 1.25, x: 0, y: 0.5) .addAnimation(dependency: isHovered) .onHover { isHovering in isHovered = isHovering} .gesture( diff --git a/macos/Onit/UI/Components/TextButton.swift b/macos/Onit/UI/Components/TextButton.swift index 454411aea..3a3c4b9c4 100644 --- a/macos/Onit/UI/Components/TextButton.swift +++ b/macos/Onit/UI/Components/TextButton.swift @@ -27,6 +27,7 @@ struct TextButton: View { private let fontSize: CGFloat private let fontWeight: Font.Weight private let fontColor: Color + private let hoverFontColor: Color private let icon: ImageResource? private let iconImage: NSImage? @@ -42,8 +43,8 @@ struct TextButton: View { init( iconSize: CGFloat = 20, iconImageSize: CGFloat = 18, - iconColor: Color = Color.primary, - hoverIconColor: Color = Color.primary, + iconColor: Color = Color.S_0, + hoverIconColor: Color = Color.S_0, disabled: Bool = false, selected: Bool = false, @@ -55,10 +56,11 @@ struct TextButton: View { cornerRadius: CGFloat = 8, background: Color = .clear, - hoverBackground: Color = .gray600, + hoverBackground: Color = Color.T_8, fontSize: CGFloat = 14, fontWeight: Font.Weight = Font.Weight.medium, - fontColor: Color = Color.primary, + fontColor: Color = Color.S_0, + hoverFontColor: Color = Color.S_0, icon: ImageResource? = nil, iconImage: NSImage? = nil, @@ -90,6 +92,7 @@ struct TextButton: View { self.fontSize = fontSize self.fontWeight = fontWeight self.fontColor = fontColor + self.hoverFontColor = hoverFontColor self.icon = icon self.iconImage = iconImage @@ -128,7 +131,7 @@ struct TextButton: View { .styleText( size: fontSize, weight: fontWeight, - color: disabled ? .gray200 : selected ? .blue300 : isHovered ? .white : fontColor + color: disabled ? Color.S_2 : selected ? Color.blue300 : isHovered ? hoverFontColor : fontColor ) .truncateText() } diff --git a/macos/Onit/UI/Components/TextViewWrapper.swift b/macos/Onit/UI/Components/TextViewWrapper.swift index fe02a7d6b..47fb80736 100644 --- a/macos/Onit/UI/Components/TextViewWrapper.swift +++ b/macos/Onit/UI/Components/TextViewWrapper.swift @@ -26,8 +26,8 @@ struct TextViewWrapper: NSViewRepresentable { var isDisabled: Bool = false var font: NSFont = AppFont.medium14.nsFont - var textColor: NSColor = .white - var placeholderColor: NSColor = .gray300 + var textColor: NSColor = .S_0 + var placeholderColor: NSColor = .placeholderText var detectLinks: Bool = true // TODO remove this once we use TextInputView for prompt editing func makeNSView(context: Self.Context) -> NSScrollView { diff --git a/macos/Onit/UI/Components/TooltipView.swift b/macos/Onit/UI/Components/TooltipView.swift index 9f1460b08..d66410d3a 100644 --- a/macos/Onit/UI/Components/TooltipView.swift +++ b/macos/Onit/UI/Components/TooltipView.swift @@ -61,7 +61,7 @@ struct TooltipView: View { KeyboardShortcutView(shortcut: shortcut.native) .padding(.horizontal, 4) .padding(.vertical, 6) - .background(.gray400, in: .rect(cornerRadius: 6)) + .background(Color.T_9, in: .rect(cornerRadius: 6)) .padding(4) .fixedSize() } @@ -72,7 +72,7 @@ struct TooltipView: View { } .appFont(.medium10) } - .foregroundStyle(.white) + .foregroundStyle(Color.S_0) .padding(.leading, 8) .background { tooltipBackground @@ -88,7 +88,7 @@ struct TooltipView: View { var tooltipBackground: some View { RoundedRectangle(cornerRadius: 8) - .fill(Color.gray500) + .fill(Color.hintBG) // .shadow(color: .black.opacity(0.36), radius: 2.5, x: 0, y: 0) } } diff --git a/macos/Onit/UI/Content/ContentView.swift b/macos/Onit/UI/Content/ContentView.swift index 8e662f79a..aeae2a510 100644 --- a/macos/Onit/UI/Content/ContentView.swift +++ b/macos/Onit/UI/Content/ContentView.swift @@ -65,6 +65,8 @@ struct ContentView: View { var body: some View { ZStack(alignment: .top) { + GlassBackground() + if shouldShowOnboardingAccessibility { VStack(spacing: 0) { if state?.showChatView == true { @@ -124,12 +126,8 @@ struct ContentView: View { } } } - .background(Color.black) - .addBorder( - cornerRadius: 14, - lineWidth: 2, - stroke: .gray600 - ) + .background(Color.baseBG) + .addBorder() .edgesIgnoringSafeArea(.top) .buttonStyle(PlainButtonStyle()) .simultaneousGesture( diff --git a/macos/Onit/UI/Content/ContentViewFooterNotification.swift b/macos/Onit/UI/Content/ContentViewFooterNotification.swift index fe5cc895a..8b725ae3a 100644 --- a/macos/Onit/UI/Content/ContentViewFooterNotification.swift +++ b/macos/Onit/UI/Content/ContentViewFooterNotification.swift @@ -34,7 +34,7 @@ struct ContentViewFooterNotification: View { var body: some View { ZStack(alignment: .topTrailing) { VStack(alignment: .center, spacing: 0) { - DividerHorizontal(foregroundColor: .gray600) + DividerHorizontal() VStack(alignment: .center, spacing: 13) { Text(content.0) @@ -42,13 +42,17 @@ struct ContentViewFooterNotification: View { TextButton( iconSize: content.3, + iconColor: Color.white, + hoverIconColor: Color.white, gap: 4, height: 36, fillContainer: false, - background: .blue400, - hoverBackground: .blue350, + background: Color.blue400, + hoverBackground: Color.blue350, fontSize: 13, fontWeight: .regular, + fontColor: Color.white, + hoverFontColor: Color.white, icon: content.2, text: content.1 ) { @@ -66,7 +70,6 @@ struct ContentViewFooterNotification: View { ) .padding([.top, .trailing], 10) } - .background(.black) } } diff --git a/macos/Onit/UI/Content/ExternalTetheredButton.swift b/macos/Onit/UI/Content/ExternalTetheredButton.swift index 82163f380..d3b7b4dc4 100644 --- a/macos/Onit/UI/Content/ExternalTetheredButton.swift +++ b/macos/Onit/UI/Content/ExternalTetheredButton.swift @@ -214,7 +214,7 @@ extension ExternalTetheredButton { private func icon(_ imageResource: ImageResource) -> some View { Image(imageResource) .renderingMode(.template) - .foregroundColor(.white) + .foregroundColor(Color.S_0) .frame( width: Self.width, height: Self.height @@ -227,7 +227,7 @@ extension ExternalTetheredButton { .styleText( size: 13, weight: .regular, - color: .gray100 + color: Color.S_1 ) .padding(.top, 4) .padding(.horizontal, 8) @@ -265,7 +265,6 @@ extension ExternalTetheredButton { } } .padding(8) - .background(.gray900) } } diff --git a/macos/Onit/UI/Content/ExternalTetheredButtonStyle.swift b/macos/Onit/UI/Content/ExternalTetheredButtonStyle.swift index d55c3c48c..9e53ff667 100644 --- a/macos/Onit/UI/Content/ExternalTetheredButtonStyle.swift +++ b/macos/Onit/UI/Content/ExternalTetheredButtonStyle.swift @@ -60,12 +60,12 @@ struct ExternalTetheredButtonStyle: ButtonStyle { } .background { RoundedCorners(radius: buttonCornerRadius, corners: .left) - .fill(.gray800) + .fill(Color.hintBG) } .overlay { RoundedCorners(radius: buttonCornerRadius, corners: .left) .stroke( - isHovering ? .gray300 : .gray600, + isHovering ? Color.T_2 : Color.T_5, lineWidth: buttonBorderWidth ) } @@ -133,7 +133,7 @@ struct ExternalTetheredButtonStyle: ButtonStyle { @ViewBuilder private func clickBackground(_ clicked: Bool) -> some View { RoundedCorners(radius: buttonCornerRadius, corners: .left) - .fill(.gray900) + .fill(Color.T_8) .opacity(clicked ? 1 : 0) } diff --git a/macos/Onit/UI/Content/TetheredButton.swift b/macos/Onit/UI/Content/TetheredButton.swift index 9340cce8c..45e86e989 100644 --- a/macos/Onit/UI/Content/TetheredButton.swift +++ b/macos/Onit/UI/Content/TetheredButton.swift @@ -64,21 +64,21 @@ struct TetheredButton: View { PanelStateCoordinator.shared.closePanel(for: state) }) { // Transparent rectangle that fills the entire button area - RoundedRectangle(cornerRadius: Self.width / 2) - .fill(isHovering ? .gray800 : .black) + GlassBackground() .frame(width: Self.width, height: Self.height) + .cornerRadius(Self.width / 2) .animation(.easeInOut(duration: 0.15), value: isHovering) .overlay { Image(.smallChevRight) .renderingMode(.template) - .foregroundColor(.white) + .foregroundColor(Color.S_2) .rotationEffect(arrowRotation) } } .buttonStyle(.plain) .background { RoundedRectangle(cornerRadius: Self.width / 2) - .fill(isHovering ? .gray800 : .black) + .fill(isHovering ? Color.S_8 : Color.baseBG) .animation(.easeInOut(duration: 0.15), value: isHovering) } .onHover { hovering in @@ -95,7 +95,7 @@ struct TetheredButton: View { .overlay { TetheredButtonBorder(cornerRadius: Self.width / 2) .stroke( - .gray500, + Color.genericBorder, lineWidth: 1.5 ) } diff --git a/macos/Onit/UI/Content/Toolbar.swift b/macos/Onit/UI/Content/Toolbar.swift index 10c81c069..3a0cd85cc 100644 --- a/macos/Onit/UI/Content/Toolbar.swift +++ b/macos/Onit/UI/Content/Toolbar.swift @@ -15,12 +15,11 @@ struct Toolbar: View { Spacer() ToolbarRight() } - .padding(.top, 1) .padding(.trailing, 8) .padding(.leading, 12) - .frame(height: 31) + .frame(height: 40) - PromptDivider() + DividerHorizontal() } } } diff --git a/macos/Onit/UI/Content/ToolbarLeft.swift b/macos/Onit/UI/Content/ToolbarLeft.swift index 692dd688a..df2095d6b 100644 --- a/macos/Onit/UI/Content/ToolbarLeft.swift +++ b/macos/Onit/UI/Content/ToolbarLeft.swift @@ -26,8 +26,8 @@ struct ToolbarLeft: View { height: ToolbarButtonStyle.height, fillContainer: false, cornerRadius: ToolbarButtonStyle.cornerRadius, - fontSize: 13, - fontColor: .gray200, + fontSize: 11, + fontColor: Color.S_2, text: "ESC", tooltipPrompt: "Close Onit", tooltipShortcut: .keyboardShortcuts(.escape) @@ -35,6 +35,7 @@ struct ToolbarLeft: View { AnalyticsManager.Toolbar.escapePressed() PanelStateCoordinator.shared.closePanel() } + .padding(.trailing, 4) } private var newChatButton: some View { diff --git a/macos/Onit/UI/Content/ToolbarRight.swift b/macos/Onit/UI/Content/ToolbarRight.swift index 9bd1e1547..76b35b286 100644 --- a/macos/Onit/UI/Content/ToolbarRight.swift +++ b/macos/Onit/UI/Content/ToolbarRight.swift @@ -52,7 +52,7 @@ struct ToolbarRight: View { icon: mode == .local ? .localModeActive : .localMode, iconSize: 22, isActive: mode == .local, - activeColor: .limeGreen, + activeColor: Color.lime400, activeBackground: .clear, activeBorderColor: .clear, tooltipPrompt: "Local Mode", diff --git a/macos/Onit/UI/History/HistoryRowView.swift b/macos/Onit/UI/History/HistoryRowView.swift index e39a03305..1376430e1 100644 --- a/macos/Onit/UI/History/HistoryRowView.swift +++ b/macos/Onit/UI/History/HistoryRowView.swift @@ -33,15 +33,17 @@ struct HistoryRowView: View { Text("\(chat.responseCount)") .appFont(.medium13) .monospacedDigit() - .foregroundStyle(.gray200) + .foregroundStyle(Color.S_2) } var deleteButton: some View { HStack(alignment: .center) { Text(windowState?.deleteChatFailed == true ? "Delete failed" : "") - .foregroundColor(Color.red) + .foregroundColor(Color.red500) Image(systemName: "trash") + .renderingMode(.template) + .foregroundColor(Color.S_2) .frame(width: 14, height: 14) } .frame(height: 34) diff --git a/macos/Onit/UI/History/HistoryView.swift b/macos/Onit/UI/History/HistoryView.swift index 38fdb3e0b..0b8352171 100644 --- a/macos/Onit/UI/History/HistoryView.swift +++ b/macos/Onit/UI/History/HistoryView.swift @@ -77,7 +77,7 @@ struct HistoryView: View { extension HistoryView { private var emptyText: some View { Text("No prompts found") - .foregroundStyle(.gray200) + .foregroundStyle(Color.S_2) .frame(maxWidth: .infinity, alignment: .leading) .padding(.horizontal, 8) .padding(.bottom, 8) @@ -89,7 +89,7 @@ extension HistoryView { VStack(alignment: .leading, spacing: 8) { Text(section) .appFont(.medium13) - .foregroundStyle(.white.opacity(0.6)) + .foregroundStyle(Color.S_0.opacity(0.6)) .padding(.top, 4) .padding(.leading, 4) diff --git a/macos/Onit/UI/Modifiers/DragModifier.swift b/macos/Onit/UI/Modifiers/DragModifier.swift index 3c711e35d..d7f15bbeb 100644 --- a/macos/Onit/UI/Modifiers/DragModifier.swift +++ b/macos/Onit/UI/Modifiers/DragModifier.swift @@ -15,7 +15,7 @@ struct DragModifier: ViewModifier { if dragging { Color.white.opacity(0.12) } else { - Color.BG + Color.clear } } diff --git a/macos/Onit/UI/Onboarding/OnboardingAuthButton.swift b/macos/Onit/UI/Onboarding/OnboardingAuthButton.swift index 78397023d..d1a1c6865 100644 --- a/macos/Onit/UI/Onboarding/OnboardingAuthButton.swift +++ b/macos/Onit/UI/Onboarding/OnboardingAuthButton.swift @@ -27,9 +27,9 @@ struct OnboardingAuthButton: View { .frame(maxWidth: .infinity) .frame(height: 40) .foregroundColor(Color.primary) - .addBorder(cornerRadius: 9, stroke: .gray700) + .addBorder(cornerRadius: 9, stroke: Color.genericBorder) .addButtonEffects( - background: isHovered ? .gray800 : .gray900, + background: isHovered ? Color.T_8 : Color.T_9, isHovered: $isHovered, isPressed: $isPressed, action: action diff --git a/macos/Onit/UI/Prompt/Dialogs/SetUpButtonStyle.swift b/macos/Onit/UI/Prompt/Dialogs/SetUpButtonStyle.swift index 68b0993a1..618de8eb0 100644 --- a/macos/Onit/UI/Prompt/Dialogs/SetUpButtonStyle.swift +++ b/macos/Onit/UI/Prompt/Dialogs/SetUpButtonStyle.swift @@ -45,9 +45,9 @@ struct SetUpButtonStyle: ButtonStyle { private var foregroundColor: Color { switch variant { case .primary: - return .FG + return Color.S_0 case .default: - return .FG + return Color.S_0 } } @@ -56,7 +56,7 @@ struct SetUpButtonStyle: ButtonStyle { case .primary: return .blue400 case .default: - return .gray700 + return Color.T_8 } } } diff --git a/macos/Onit/UI/Prompt/Dialogs/SetUpDialog.swift b/macos/Onit/UI/Prompt/Dialogs/SetUpDialog.swift index b0cf25572..4cf50829e 100644 --- a/macos/Onit/UI/Prompt/Dialogs/SetUpDialog.swift +++ b/macos/Onit/UI/Prompt/Dialogs/SetUpDialog.swift @@ -22,10 +22,10 @@ struct SetUpDialog: View { var borderGrad: LinearGradient { .init( stops: [ - .init(color: .border1, location: 0), - .init(color: .border2, location: 0.46), - .init(color: .border2, location: 0.65), - .init(color: .border1, location: 1), + .init(color: Color.S_5, location: 0), + .init(color: Color.S_8, location: 0.46), + .init(color: Color.S_8, location: 0.65), + .init(color: Color.S_5, location: 1), ], startPoint: .bottomTrailing, endPoint: .topLeading @@ -46,7 +46,7 @@ struct SetUpDialog: View { .frame(maxWidth: .infinity, alignment: .leading) .padding(.horizontal, 12) .padding(.vertical, 12) - .background(.gray900, in: .rect(cornerRadius: 16)) + .background(Color.messageBG, in: .rect(cornerRadius: 16)) .overlay { RoundedRectangle(cornerRadius: 16) .strokeBorder(borderGrad, lineWidth: 1) @@ -63,13 +63,13 @@ struct SetUpDialog: View { .resizable() .frame(width: 16, height: 16) .padding(0) - .foregroundStyle(titleColor ?? .FG) + .foregroundStyle(titleColor ?? Color.S_0) } Text(title) .fontWeight(.semibold) .appFont(.medium14) - .foregroundStyle(titleColor ?? .FG) + .foregroundStyle(titleColor ?? Color.S_0) Spacer() @@ -78,6 +78,8 @@ struct SetUpDialog: View { closeAction() } label: { Image(.smallCross) + .renderingMode(.template) + .foregroundColor(Color.S_0) .padding(2) } .buttonStyle(HoverableButtonStyle(background: true)) @@ -88,7 +90,7 @@ struct SetUpDialog: View { var main: some View { subtitle() .appFont(.medium13) - .foregroundStyle(.gray100) + .foregroundStyle(Color.S_1) .fixedSize(horizontal: false, vertical: true) .lineLimit(10) .padding(.leading, icon != nil ? 28 : 0) diff --git a/macos/Onit/UI/Prompt/Dialogs/SetUpDialogs.swift b/macos/Onit/UI/Prompt/Dialogs/SetUpDialogs.swift index 688304bea..1b5a30616 100644 --- a/macos/Onit/UI/Prompt/Dialogs/SetUpDialogs.swift +++ b/macos/Onit/UI/Prompt/Dialogs/SetUpDialogs.swift @@ -65,8 +65,8 @@ struct SetUpDialogs: View { if state.setUpHeight >= scrollMaxHeight { LinearGradient( gradient: Gradient(stops: [ - .init(color: Color.black, location: 0), - .init(color: Color.black.opacity(0), location: 1) + .init(color: Color.T_7, location: 0), + .init(color: Color.T_7.opacity(0), location: 1) ]), startPoint: .bottom, endPoint: .top diff --git a/macos/Onit/UI/Prompt/Files/ContextItem.swift b/macos/Onit/UI/Prompt/Files/ContextItem.swift index d0e6f29f0..b73cb59e9 100644 --- a/macos/Onit/UI/Prompt/Files/ContextItem.swift +++ b/macos/Onit/UI/Prompt/Files/ContextItem.swift @@ -26,10 +26,10 @@ struct ContextItem: View { case .auto(let autoContext): ContextTag( text: name, - textColor: isEditing ? autoContextTextColor : .white, - hoverTextColor: isEditing ? autoContextHoverTextColor : .white, - background: isEditing ? autoContextBackground : .clear, - hoverBackground: isEditing ? autoContextHoverBackground : .gray600, + textColor: isEditing ? autoContextTextColor : Color.S_0, + hoverTextColor: isEditing ? autoContextHoverTextColor : Color.S_0, + background: isEditing ? autoContextBackground : Color.clear, + hoverBackground: isEditing ? autoContextHoverBackground : Color.T_9, maxWidth: isEditing ? 155 : .infinity, iconBundleURL: autoContext.appBundleUrl, tooltip: isEditing ? name : "View auto-context file", @@ -40,9 +40,9 @@ struct ContextItem: View { default: ContextTag( text: name, - textColor: isEditing ? .T_2 : .white, - background: isEditing ? .gray500 : .clear, - hoverBackground: isEditing ? .gray400 : .gray600, + textColor: isEditing ? Color.T_2 : Color.S_0, + background: isEditing ? Color.T_8 : Color.clear, + hoverBackground: isEditing ? Color.S_4 : Color.T_9, maxWidth: isEditing ? 155 : .infinity, iconView: ContextImage(context: item), caption: item.fileType, @@ -111,38 +111,38 @@ struct ContextItem: View { } private var autoContextTextColor: Color { - return .T_2 + return Color.T_2 } private var autoContextHoverTextColor: Color { - return .white + return Color.S_0 } private var autoContextBackground: Color { if hasError { - return .redDisabled + return Color.redDisabled } else if hasWarning { - return .warningDisabled + return Color.warningDisabled } else { - return .gray500 + return Color.T_8 } } private var autoContextHoverBackground: Color { if hasError { - return .redDisabledHover + return Color.redDisabledHover } else if hasWarning { - return .warningDisabledHover + return Color.warningDisabledHover } else { - return .gray400 + return Color.S_4 } } private var autoContextErrorDotColor: Color? { if hasError { - return .red + return Color.red500 } else if hasWarning { - return .yellow + return Color.orange500 } else { return nil } diff --git a/macos/Onit/UI/Prompt/Files/ContextMenu.swift b/macos/Onit/UI/Prompt/Files/ContextMenu.swift index ce6235f40..e3eb2f67d 100644 --- a/macos/Onit/UI/Prompt/Files/ContextMenu.swift +++ b/macos/Onit/UI/Prompt/Files/ContextMenu.swift @@ -79,7 +79,8 @@ extension ContextMenu { extension ContextMenu { private var backButton: IconButton { IconButton( - icon: .chevLeft + icon: .chevLeft, + inactiveColor: Color.S_0 ) { searchQuery = "" windowState?.showContextMenuBrowserTabs = false diff --git a/macos/Onit/UI/Prompt/Files/ContextMenuWindowButton.swift b/macos/Onit/UI/Prompt/Files/ContextMenuWindowButton.swift index 8df5cf367..1965e1064 100644 --- a/macos/Onit/UI/Prompt/Files/ContextMenuWindowButton.swift +++ b/macos/Onit/UI/Prompt/Files/ContextMenuWindowButton.swift @@ -40,7 +40,7 @@ struct ContextMenuWindowButton: View { var body: some View { TextButton( - background: selected ? .gray600 : .clear, + background: selected ? Color.T_8 : .clear, icon: windowIcon == nil ? .stars : nil, iconImage: windowIcon, text: windowName diff --git a/macos/Onit/UI/Prompt/Files/ContextMenuWindows.swift b/macos/Onit/UI/Prompt/Files/ContextMenuWindows.swift index 830bdfc24..5e1327f09 100644 --- a/macos/Onit/UI/Prompt/Files/ContextMenuWindows.swift +++ b/macos/Onit/UI/Prompt/Files/ContextMenuWindows.swift @@ -134,7 +134,7 @@ extension ContextMenuWindows { let selected = currentArrowKeyIndex == allBrowserTabsButtonIndex return TextButton( - background: selected ? .gray600 : .clear, + background: selected ? Color.T_8 : .clear, icon: .compass, text: "All Browser Tabs..." ) { @@ -176,7 +176,7 @@ extension ContextMenuWindows { let selected = currentArrowKeyIndex == uploadFileButtonIndex return TextButton( - background: selected ? .gray600 : .clear, + background: selected ? Color.T_8 : .clear, icon: .file, text: "Upload File" ) { diff --git a/macos/Onit/UI/Prompt/Files/FileRow.swift b/macos/Onit/UI/Prompt/Files/FileRow.swift index 80f4625c2..79bc8034d 100644 --- a/macos/Onit/UI/Prompt/Files/FileRow.swift +++ b/macos/Onit/UI/Prompt/Files/FileRow.swift @@ -54,7 +54,7 @@ struct FileRow: View { } } - var contextTagText: String { + var foregroundWindowContextTagText: String { if let foregroundWindow = windowState?.foregroundWindow { let foregroundWindowName = WindowHelpers.getWindowName(window: foregroundWindow.element) if let ocrResult = ocrComparisonResult { @@ -66,40 +66,40 @@ struct FileRow: View { return "" } - var contextTagBackground: Color { + var ghostContextTagBackground: Color { if let ocrResult = ocrComparisonResult { if ocrResult.matchPercentage < 50 { - return .redDisabled + return Color.redDisabled } else if ocrResult.matchPercentage < 75 { - return .warningDisabled + return Color.warningDisabled } else { - return .clear + return Color.clear } } else { - return .clear + return Color.clear } } - var contextTagHoverBackground: Color { + var ghostContextTagHoverBackground: Color { if let ocrResult = ocrComparisonResult { if ocrResult.matchPercentage < 50 { - return .redDisabledHover + return Color.redDisabledHover } else if ocrResult.matchPercentage < 75 { - return .warningDisabledHover + return Color.warningDisabledHover } else { - return .clear + return Color.clear } } else { - return .clear + return Color.clear } } var contextTagErrorDotColor: Color? { if let ocrResult = ocrComparisonResult { if ocrResult.matchPercentage < 50 { - return .red + return Color.red500 } else if ocrResult.matchPercentage < 75 { - return .yellow + return Color.orange500 } else { return nil } @@ -163,10 +163,9 @@ extension FileRow { ) -> some View { ContextTag( text: text, - textColor: .T_2, - hoverTextColor: .white, - background: contextTagBackground, - hoverBackground: contextTagHoverBackground, + hoverTextColor: Color.T_2, + background: ghostContextTagBackground, + hoverBackground: ghostContextTagHoverBackground, hasHoverBorder: true, hasDottedBorder: true, shouldFadeIn: true, @@ -214,7 +213,7 @@ extension FileRow { let iconBundleURL = WindowHelpers.getWindowAppBundleUrl(window: foregroundWindow.element) ghostContextTag( - text: contextTagText, + text: foregroundWindowContextTagText, iconBundleURL: iconBundleURL, tooltip: "Add \(foregroundWindowName) Context" ) { @@ -255,7 +254,7 @@ extension FileRow { if let pendingInput = windowState?.pendingInput { ContextTag( text: StringHelpers.removeWhiteSpaceAndNewLines(pendingInput.selectedText), - borderColor: showHighlightedTextInput ? .gray400 : .clear, + borderColor: showHighlightedTextInput ? Color.S_4 : Color.clear, iconView: Image(.text).addIconStyles(iconSize: 14) ) { showHighlightedTextInput = true diff --git a/macos/Onit/UI/Prompt/Files/PaperclipButton.swift b/macos/Onit/UI/Prompt/Files/PaperclipButton.swift index b9d9047a5..6e549102a 100644 --- a/macos/Onit/UI/Prompt/Files/PaperclipButton.swift +++ b/macos/Onit/UI/Prompt/Files/PaperclipButton.swift @@ -35,6 +35,7 @@ struct PaperclipButton: View { IconButton( icon: .paperclip, iconSize: 18, + inactiveColor: Color.S_1, tooltipPrompt: accessibilityAutoContextEnabled ? "Add context" : "Upload file" ) { AnalyticsManager.Chat.paperclipPressed() diff --git a/macos/Onit/UI/Prompt/Files/WebContextItem.swift b/macos/Onit/UI/Prompt/Files/WebContextItem.swift index d76cc846b..e706f7809 100644 --- a/macos/Onit/UI/Prompt/Files/WebContextItem.swift +++ b/macos/Onit/UI/Prompt/Files/WebContextItem.swift @@ -42,9 +42,9 @@ struct WebContextItem: View { ContextTag( text: getCurrentWebsiteTitle(), - textColor: isEditing ? .T_2 : .white, - background: websiteUndergoingScrape || !isEditing ? .clear : .gray500, - hoverBackground: isEditing ? .gray400 : .gray600, + textColor: isEditing ? Color.T_2 : Color.S_0, + background: websiteUndergoingScrape || !isEditing ? Color.clear : Color.T_8, + hoverBackground: isEditing ? Color.S_4 : Color.S_6, maxWidth: isEditing ? 155 : .infinity, isLoading: websiteUndergoingScrape, iconView: websiteUndergoingScrape ? LoaderPulse() : favicon, diff --git a/macos/Onit/UI/Prompt/FinalContextView.swift b/macos/Onit/UI/Prompt/FinalContextView.swift index 2a4da0fad..54a9b6001 100644 --- a/macos/Onit/UI/Prompt/FinalContextView.swift +++ b/macos/Onit/UI/Prompt/FinalContextView.swift @@ -67,9 +67,8 @@ struct FinalContextView: View { .allowsHitTesting(isEditing) .textSelection(.enabled) .focused($isTextFieldFocused) - .foregroundColor(.white) + .foregroundColor(Color.S_0) .scrollContentBackground(.hidden) - .background(.gray800) // To match the TextField style .padding(0) // To match the TextField padding .onChange(of: cursorPosition) { windowState?.detectIsTyping() @@ -84,8 +83,8 @@ struct FinalContextView: View { } .padding(.vertical, 6) .padding(.horizontal, 8) - .background(Color.gray500) - .foregroundColor(.white) + .background(Color.S_4) + .foregroundColor(Color.S_0) .cornerRadius(8) Button("Send") { @@ -101,7 +100,7 @@ struct FinalContextView: View { .padding(.vertical, 6) .padding(.horizontal, 8) .background(Color.blue400) - .foregroundColor(.white) + .foregroundColor(Color.white) .cornerRadius(8) .keyboardShortcut(.return, modifiers: []) } @@ -110,7 +109,8 @@ struct FinalContextView: View { } .padding(.horizontal, 8) .padding(.vertical, 12) - .background(.gray800, in: .rect(cornerRadius: 8)) + .background(Color.messageBG, in: .rect(cornerRadius: 10)) + .addBorder() .contentShape(Rectangle()) // Make the entire VStack tappable .onTapGesture { isEditing = true @@ -119,10 +119,11 @@ struct FinalContextView: View { .overlay(alignment: .topTrailing) { Image(.edit) .resizable() + .renderingMode(.template) .frame(width: 16, height: 16) .padding(4) - .background(.gray500) - .foregroundColor(.gray200) + .background(Color.T_5) + .foregroundColor(Color.S_0) .cornerRadius(6) .opacity(isHoveringInstruction && !isEditing ? 1 : 0) // Initially hidden .offset(x: -8, y: 6) // 6 pixels down from the top edge and 8 pixels in from the right edge @@ -138,10 +139,10 @@ struct FinalContextView: View { .resizable() .frame(width: 16, height: 16) .padding(4) - .foregroundColor(.gray200) + .foregroundColor(Color.S_2) Text("Searching the web") .appFont(.medium16) - .foregroundColor(.gray200) + .foregroundColor(Color.S_2) Spacer() } .shimmering() @@ -150,16 +151,21 @@ struct FinalContextView: View { isExpanded.toggle() } label: { HStack(alignment: .center) { - Image(.paperclipStars) + Image(.paperclip) + .addIconStyles( + foregroundColor: Color.S_2, + iconSize: 16 + ) Text("Final context used") .appFont(.medium14) Image(.smallChevDown) .renderingMode(.template) .rotationEffect(isExpanded ? .degrees(180) : .degrees(0)) + .foregroundColor(Color.S_3) Spacer() } } - .foregroundStyle(.gray100) + .foregroundStyle(Color.S_2) .buttonStyle(.plain) if isExpanded { @@ -180,7 +186,7 @@ struct FinalContextView: View { .background { RoundedRectangle(cornerRadius: 8) .fill(.clear) - .strokeBorder(.gray700) + .strokeBorder(Color.genericBorder) } } } diff --git a/macos/Onit/UI/Prompt/Generated/GeneratedContentView.swift b/macos/Onit/UI/Prompt/Generated/GeneratedContentView.swift index 7808b33a2..ac4ea0650 100644 --- a/macos/Onit/UI/Prompt/Generated/GeneratedContentView.swift +++ b/macos/Onit/UI/Prompt/Generated/GeneratedContentView.swift @@ -27,9 +27,10 @@ struct GeneratedContentView: View { var configuration: LLMStreamConfiguration { let font = FontConfiguration(size: fontSize, lineHeight: lineHeight) - let color = ColorConfiguration(citationBackgroundColor: .gray600, - citationHoverBackgroundColor: .gray400, - citationTextColor: .gray100) + let color = ColorConfiguration(textColor: .S_0, + citationBackgroundColor: Color.S_6, + citationHoverBackgroundColor: Color.S_4, + citationTextColor: Color.S_1) let thought = ThoughtConfiguration(icon: Image(.lightBulb)) return LLMStreamConfiguration(font: font, colors: color, thought: thought) diff --git a/macos/Onit/UI/Prompt/Generated/GeneratedToolbar.swift b/macos/Onit/UI/Prompt/Generated/GeneratedToolbar.swift index 4d1433467..43e2082ae 100644 --- a/macos/Onit/UI/Prompt/Generated/GeneratedToolbar.swift +++ b/macos/Onit/UI/Prompt/Generated/GeneratedToolbar.swift @@ -26,7 +26,10 @@ struct GeneratedToolbar: View { prompt.safeGenerationIndex < prompt.responses.count, let model = prompt.sortedResponses[prompt.safeGenerationIndex].model { Text("\(model)") - .foregroundColor(Color.gray300) + .styleText( + size: 12, + color: Color.S_2 + ) } } .padding(.horizontal, 12) @@ -42,6 +45,7 @@ struct GeneratedToolbar: View { var regenerate: some View { IconButton( icon: .arrowsSpin, + inactiveColor: Color.S_0, tooltipPrompt: "Retry" ) { state?.generate(prompt) @@ -86,7 +90,7 @@ struct GeneratedToolbar: View { // .padding(4) // .background { // RoundedRectangle(cornerRadius: 10) -// .fill(mode == .local ? .limeGreen : .blue400) +// .fill(mode == .local ? Color.lime400 : .blue400) // } // .foregroundStyle(.FG) // } diff --git a/macos/Onit/UI/Prompt/Generated/ToggleOutputsView.swift b/macos/Onit/UI/Prompt/Generated/ToggleOutputsView.swift index 2ea268e48..abe9b120c 100644 --- a/macos/Onit/UI/Prompt/Generated/ToggleOutputsView.swift +++ b/macos/Onit/UI/Prompt/Generated/ToggleOutputsView.swift @@ -20,7 +20,7 @@ struct ToggleOutputsView: View { text `right` } - .foregroundStyle(.gray300) + .foregroundStyle(Color.S_2) } var left: some View { @@ -31,9 +31,10 @@ struct ToggleOutputsView: View { .frame(width: 20, height: 20) .overlay { Image(.chevLeft) + .renderingMode(.template) } } - .foregroundStyle(prompt.canDecrementGeneration ? .FG : .gray300) + .foregroundStyle(prompt.canDecrementGeneration ? Color.S_0 : Color.S_2) .disabled(!prompt.canDecrementGeneration) .background { if isTyping { @@ -61,9 +62,10 @@ struct ToggleOutputsView: View { .frame(width: 20, height: 20) .overlay { Image(.chevRight) + .renderingMode(.template) } } - .foregroundStyle(prompt.canIncrementGeneration ? .FG : .gray300) + .foregroundStyle(prompt.canIncrementGeneration ? Color.S_0 : Color.S_2) .disabled(!prompt.canIncrementGeneration) .background { if isTyping { diff --git a/macos/Onit/UI/Prompt/Input/InputBody.swift b/macos/Onit/UI/Prompt/Input/InputBody.swift index be39ef6ce..cd38eac93 100644 --- a/macos/Onit/UI/Prompt/Input/InputBody.swift +++ b/macos/Onit/UI/Prompt/Input/InputBody.swift @@ -52,7 +52,7 @@ struct InputBody: View { func textView(text: String) -> some View { Text(text) .multilineTextAlignment(.leading) - .foregroundColor(.FG) + .foregroundColor(Color.S_0) .frame(maxWidth: .infinity, alignment: .leading) .fixedSize(horizontal: false, vertical: true) .textSelection(.enabled) diff --git a/macos/Onit/UI/Prompt/Input/InputButtons.swift b/macos/Onit/UI/Prompt/Input/InputButtons.swift index 9502384f6..f1095819b 100644 --- a/macos/Onit/UI/Prompt/Input/InputButtons.swift +++ b/macos/Onit/UI/Prompt/Input/InputButtons.swift @@ -44,7 +44,7 @@ struct InputButtons: View { } } } - .foregroundStyle(.gray200) + .foregroundStyle(Color.T_3) } } diff --git a/macos/Onit/UI/Prompt/Input/InputTitle.swift b/macos/Onit/UI/Prompt/Input/InputTitle.swift index a8ebc7b5f..564854695 100644 --- a/macos/Onit/UI/Prompt/Input/InputTitle.swift +++ b/macos/Onit/UI/Prompt/Input/InputTitle.swift @@ -29,7 +29,7 @@ struct InputTitle: View { Spacer() InputButtons(inputExpanded: $inputExpanded, input: input, isEditing: isEditing) } - .foregroundStyle(.gray100) + .foregroundStyle(Color.S_1) .padding(.horizontal, 12) .padding(.vertical, 4) } diff --git a/macos/Onit/UI/Prompt/Input/InputView.swift b/macos/Onit/UI/Prompt/Input/InputView.swift index b3632da04..ee1358a53 100644 --- a/macos/Onit/UI/Prompt/Input/InputView.swift +++ b/macos/Onit/UI/Prompt/Input/InputView.swift @@ -22,15 +22,15 @@ struct InputView: View { } .background { RoundedRectangle(cornerRadius: 6) - .fill(.gray500) - .strokeBorder(.gray400) + .fill(Color.messageBG) + .strokeBorder(Color.genericBorder) } .padding(.top, isEditing ? 6 : 0) .padding([.horizontal], isEditing ? 8 : 0) } var divider: some View { - Color.gray400 + Color.genericBorder .frame(height: 1) .opacity(inputExpanded ? 1 : 0) } diff --git a/macos/Onit/UI/Prompt/MicrophoneButton.swift b/macos/Onit/UI/Prompt/MicrophoneButton.swift index 8a8aa84d3..9d24f9b51 100644 --- a/macos/Onit/UI/Prompt/MicrophoneButton.swift +++ b/macos/Onit/UI/Prompt/MicrophoneButton.swift @@ -31,13 +31,13 @@ struct MicrophoneButton: View { var body: some View { PromptCoreFooterButton( - iconColor: audioRecorder.isRecording ? .red : .gray200, + iconColor: audioRecorder.isRecording ? .red : Color.S_2, icon: .microphone, text: audioRecorder.isRecording ? "Stop" : "Voice", action: { handleMicrophonePress() }, background: audioRecorder.isRecording ? Color.red.opacity(0.15) : .clear, - hoverBackground: audioRecorder.isRecording ? Color.red.opacity(0.3) : .gray600, - fontColor: audioRecorder.isRecording ? .red : .gray200 + hoverBackground: audioRecorder.isRecording ? Color.red.opacity(0.3) : Color.T_8, + fontColor: audioRecorder.isRecording ? .red : Color.S_2 ) .disabled(audioRecorder.isTranscribing) .help(microphoneButtonHelpText) diff --git a/macos/Onit/UI/Prompt/PromptCore.swift b/macos/Onit/UI/Prompt/PromptCore.swift index 44b19babe..471a18f74 100644 --- a/macos/Onit/UI/Prompt/PromptCore.swift +++ b/macos/Onit/UI/Prompt/PromptCore.swift @@ -51,18 +51,18 @@ struct PromptCore: View { @FocusState private var isFocused: Bool private var unfocusedBorder = GradientBorder( - colorOne: .gray500, - colorTwo: .gray500 + colorOne: Color.S_5, + colorTwo: Color.S_5 ) private var remoteBorder = GradientBorder( - colorOne: Color(hex: "#6D6AFD") ?? .gray800, - colorTwo: Color(hex: "#B3ADDA") ?? .gray800 + colorOne: Color(hex: "#6D6AFD") ?? Color.S_5, + colorTwo: Color(hex: "#B3ADDA") ?? Color.S_5 ) private var localBorder = GradientBorder( - colorOne: Color(hex: "#7ECD8C") ?? .gray800, - colorTwo: Color(hex: "#4AA4BF") ?? .gray800 + colorOne: Color(hex: "#7ECD8C") ?? Color.S_5, + colorTwo: Color(hex: "#4AA4BF") ?? Color.S_5 ) private var text: String { @@ -148,7 +148,6 @@ extension PromptCore { detectLinks: true ) .frame(height: min(textHeight, maxHeightLimit)) - .foregroundStyle(.white) .opacity(shouldIndicateDisabled ? 0.5 : 1) .focused($isFocused) .onAppear { isFocused = true } @@ -195,7 +194,7 @@ extension PromptCore { } .padding(.top, 2) .padding([.horizontal, .bottom], 0) - .background(.gray800) + .background(Color.messageBG) .addGradientBorder( cornerRadius: 8, lineWidth: 1.6, diff --git a/macos/Onit/UI/Prompt/PromptCoreFooter.swift b/macos/Onit/UI/Prompt/PromptCoreFooter.swift index d37b3c450..4d2f8cc36 100644 --- a/macos/Onit/UI/Prompt/PromptCoreFooter.swift +++ b/macos/Onit/UI/Prompt/PromptCoreFooter.swift @@ -42,7 +42,7 @@ struct PromptCoreFooter: View { MicrophoneButton(audioRecorder: audioRecorder) PromptCoreFooterButton( - iconColor: .gray200, + iconColor: Color.S_2, icon: .send2, text: "Send", disabled: disableSend, diff --git a/macos/Onit/UI/Prompt/PromptCoreFooterButton.swift b/macos/Onit/UI/Prompt/PromptCoreFooterButton.swift index 3f0713078..ff86a655c 100644 --- a/macos/Onit/UI/Prompt/PromptCoreFooterButton.swift +++ b/macos/Onit/UI/Prompt/PromptCoreFooterButton.swift @@ -26,8 +26,8 @@ struct PromptCoreFooterButton: View { action: @escaping () -> Void, background: Color = .clear, - hoverBackground: Color = .gray600, - fontColor: Color = .gray200 + hoverBackground: Color = Color.T_8, + fontColor: Color = Color.S_2 ) { self.iconColor = iconColor self.icon = icon diff --git a/macos/Onit/UI/Prompt/StopGenerationButton.swift b/macos/Onit/UI/Prompt/StopGenerationButton.swift index 54fc6ad22..60fde1427 100644 --- a/macos/Onit/UI/Prompt/StopGenerationButton.swift +++ b/macos/Onit/UI/Prompt/StopGenerationButton.swift @@ -21,26 +21,26 @@ struct StopGenerationButton: View { HStack(spacing: 4) { Image(systemName: "command") .font(.system(size: 10)) - .foregroundColor(.white) + .foregroundColor(Color.S_0) Image(systemName: "delete.left") .font(.system(size: 10)) - .foregroundColor(.white) + .foregroundColor(Color.S_0) Text("Stop") .font(.system(size: 13, weight: .semibold)) - .foregroundColor(.white) + .foregroundColor(Color.S_0) } .padding(.horizontal, 6) .padding(.vertical, 0) .frame(height: 26) } .buttonStyle(PlainButtonStyle()) - .background(isHovered ? .gray400 : .gray800) + .background(isHovered ? Color.T_8 : Color.elevatedBG) .cornerRadius(6) .overlay( RoundedRectangle(cornerRadius: 6) - .stroke(.gray500, lineWidth: 1) + .stroke(isHovered ? Color.T_5 : Color.genericBorder, lineWidth: 1) ) .keyboardShortcut(shortcut) .onHover { hovering in diff --git a/macos/Onit/UI/Prompt/SystemPrompt/SystemPromptDetailView.swift b/macos/Onit/UI/Prompt/SystemPrompt/SystemPromptDetailView.swift index d842498db..d66fc7b6a 100644 --- a/macos/Onit/UI/Prompt/SystemPrompt/SystemPromptDetailView.swift +++ b/macos/Onit/UI/Prompt/SystemPrompt/SystemPromptDetailView.swift @@ -25,7 +25,7 @@ struct SystemPromptDetailView: View { VStack(alignment: .leading, spacing: 12) { VStack(alignment: .leading, spacing: 8) { Text("Prompt") - .foregroundStyle(.gray100) + .foregroundStyle(Color.S_1) .bold() Text(storedPrompt.prompt) } @@ -33,7 +33,7 @@ struct SystemPromptDetailView: View { if let shortcut = KeyboardShortcuts.Name(storedPrompt.id).shortcut?.native { VStack(alignment: .leading, spacing: 8) { Text("Hotkey") - .foregroundStyle(.gray100) + .foregroundStyle(Color.S_1) .bold() KeyboardShortcutView(shortcut: shortcut, characterWidth: 12, spacing: 3) .font(.system(size: 13, weight: .light)) @@ -43,7 +43,7 @@ struct SystemPromptDetailView: View { if !storedPrompt.applications.isEmpty || !storedPrompt.tags.isEmpty { VStack(alignment: .leading, spacing: 8) { Text("Apps & Tags") - .foregroundStyle(.gray100) + .foregroundStyle(Color.S_1) .bold() appsAndTags } @@ -51,13 +51,8 @@ struct SystemPromptDetailView: View { buttons } - .padding(.vertical, 8) - .padding(.horizontal, 16) - .background { - RoundedRectangle(cornerRadius: 14) - .fill(.gray800) - .strokeBorder(.gray600) - } + .padding([.horizontal, .bottom], 16) + .padding(.top, 12) .frame(width: size.width - 16) .onChange(of: windowState?.systemPromptId, initial: true) { oldValue, newValue in let descriptor = FetchDescriptor() @@ -86,7 +81,7 @@ struct SystemPromptDetailView: View { .padding(.vertical, 4) .background { RoundedRectangle(cornerRadius: 5) - .fill(.gray500) + .fill(Color.S_5) } } @@ -96,7 +91,7 @@ struct SystemPromptDetailView: View { .padding(.vertical, 4) .background { RoundedRectangle(cornerRadius: 5) - .fill(.gray500) + .fill(Color.S_5) } } } @@ -109,7 +104,7 @@ struct SystemPromptDetailView: View { dismiss() } label: { Text("Select another prompt") - .foregroundStyle(.gray100) + .foregroundStyle(Color.S_1) .underline() }.buttonStyle(.plain) @@ -123,7 +118,7 @@ struct SystemPromptDetailView: View { Image(.pencil) .resizable() .frame(width: 16, height: 16) - .foregroundStyle(.gray100) + .foregroundStyle(Color.S_1) }.tooltip(prompt: "Edit") } } diff --git a/macos/Onit/UI/Prompt/SystemPrompt/SystemPromptSelectionView.swift b/macos/Onit/UI/Prompt/SystemPrompt/SystemPromptSelectionView.swift index 650ab7f20..c39019755 100644 --- a/macos/Onit/UI/Prompt/SystemPrompt/SystemPromptSelectionView.swift +++ b/macos/Onit/UI/Prompt/SystemPrompt/SystemPromptSelectionView.swift @@ -103,7 +103,7 @@ struct SystemPromptSelectionView: View { private func sectionView(title: String?, prompts: [SystemPrompt]) -> some View { VStack(alignment: .leading, spacing: 0) { if let title = title { - Text(title).foregroundStyle(.gray200) + Text(title).foregroundStyle(Color.S_2) } ForEach(prompts, id: \.id) { prompt in @@ -121,7 +121,7 @@ struct SystemPromptSelectionView: View { openSettings() } label: { Label("Settings", systemImage: "message") - .foregroundStyle(.gray100) + .foregroundStyle(Color.S_1) .font(.system(size: 13)) } .buttonStyle(PlainButtonStyle()) @@ -131,8 +131,13 @@ struct SystemPromptSelectionView: View { Button { showNewPrompt = true } label: { - Label("New Prompt", image: .plus) - .foregroundStyle(.gray100) + Label { + Text("New Prompt") + } icon: { + Image(.plus) + .renderingMode(.template) + } + .foregroundStyle(Color.S_1) } .buttonStyle(.plain) } diff --git a/macos/Onit/UI/Prompt/SystemPrompt/SystemPromptView.swift b/macos/Onit/UI/Prompt/SystemPrompt/SystemPromptView.swift index 5dbabb637..549095d08 100644 --- a/macos/Onit/UI/Prompt/SystemPrompt/SystemPromptView.swift +++ b/macos/Onit/UI/Prompt/SystemPrompt/SystemPromptView.swift @@ -102,8 +102,8 @@ struct SystemPromptView: View { .padding(.vertical, 8) .background { RoundedRectangle(cornerRadius: 10) - .fill(.gray800) - .strokeBorder(.gray600) + .fill(Color.messageBG) + .strokeBorder(Color.genericBorder) .onTapGesture { showSelection = true } diff --git a/macos/Onit/UI/Prompt/WebSearchButton.swift b/macos/Onit/UI/Prompt/WebSearchButton.swift index af9d7521f..306a0c5cc 100644 --- a/macos/Onit/UI/Prompt/WebSearchButton.swift +++ b/macos/Onit/UI/Prompt/WebSearchButton.swift @@ -10,7 +10,7 @@ struct WebSearchButton: View { icon: .web, iconSize: 17, isActive: webSearchEnabled, - activeColor: .white, + activeColor: Color.S_0, inactiveColor: webSearchEnabled ? .blue400 : .gray200 ) { toggleWebSearch() diff --git a/macos/Onit/UI/PromptDivider.swift b/macos/Onit/UI/PromptDivider.swift deleted file mode 100644 index b8362a6ad..000000000 --- a/macos/Onit/UI/PromptDivider.swift +++ /dev/null @@ -1,19 +0,0 @@ -// -// PromptDivider.swift -// Onit -// -// Created by Benjamin Sage on 10/23/24. -// - -import SwiftUI - -struct PromptDivider: View { - var body: some View { - Color.gray600 - .frame(height: 1) - } -} - -#Preview { - PromptDivider() -} diff --git a/macos/Onit/UI/QuickEdit/QuickEditHintView.swift b/macos/Onit/UI/QuickEdit/QuickEditHintView.swift index 7ec9a29e9..371566c79 100644 --- a/macos/Onit/UI/QuickEdit/QuickEditHintView.swift +++ b/macos/Onit/UI/QuickEdit/QuickEditHintView.swift @@ -38,7 +38,7 @@ struct QuickEditHintView: View { Image(.dots) .resizable() .renderingMode(.template) - .foregroundColor(.FG) + .foregroundColor(Color.white) .aspectRatio(contentMode: .fit) .frame(width: Self.hintWidth, height: Self.hintWidth) } else { @@ -52,8 +52,8 @@ struct QuickEditHintView: View { .padding(.horizontal, Self.horizontalPadding) } .frame(height: height) - .background(.blue300) - .addBorder(cornerRadius: 8, inset: 0, stroke: .blue400) + .background(Color.blue300) + .addBorder(cornerRadius: 8, inset: 0, stroke: Color.blue400) .onHover { hovering in isHovered = hovering } diff --git a/macos/Onit/UI/QuickEdit/QuickEditResponseView.swift b/macos/Onit/UI/QuickEdit/QuickEditResponseView.swift index 95b7f27bd..aaa1e870f 100644 --- a/macos/Onit/UI/QuickEdit/QuickEditResponseView.swift +++ b/macos/Onit/UI/QuickEdit/QuickEditResponseView.swift @@ -54,9 +54,10 @@ struct QuickEditResponseView: View { private var configuration: LLMStreamConfiguration { let font = FontConfiguration(size: fontSize, lineHeight: lineHeight) - let color = ColorConfiguration(citationBackgroundColor: .gray600, - citationHoverBackgroundColor: .gray400, - citationTextColor: .gray100) + let color = ColorConfiguration(textColor: .S_0, + citationBackgroundColor: Color.S_6, + citationHoverBackgroundColor: Color.S_4, + citationTextColor: Color.S_1) let thought = ThoughtConfiguration(icon: Image(.lightBulb)) return LLMStreamConfiguration(font: font, colors: color, thought: thought) @@ -83,11 +84,11 @@ extension QuickEditResponseView { private var promptSection: some View { Text(prompt.instruction) .appFont(.medium13) - .foregroundColor(.white) + .foregroundColor(Color.S_0) .frame(maxWidth: .infinity, minHeight: 24, alignment: .leading) .padding(8) - .background(.gray700) - .addBorder(cornerRadius: 8, lineWidth: 1, stroke: .gray500) + .background(Color.messageBG) + .addBorder(cornerRadius: 8, lineWidth: 1, stroke: Color.genericBorder) } private var responseSection: some View { @@ -100,7 +101,7 @@ extension QuickEditResponseView { Text("Generating...") .appFont(.medium13) - .foregroundColor(.gray300) + .foregroundColor(Color.S_3) } .padding(.vertical, 16) .frame(maxWidth: .infinity, alignment: .leading) @@ -124,9 +125,7 @@ extension QuickEditResponseView { IconButton( icon: .arrowDown, buttonSize: 36, - activeColor: .white, - inactiveColor: .white, - hoverBackground: .gray400, + activeColor: Color.S_0, tooltipPrompt: "Scroll to bottom" ) { hasUserManuallyScrolled = false @@ -142,8 +141,8 @@ extension QuickEditResponseView { } } } - .background(.gray600) - .addBorder(cornerRadius: 18, stroke: .gray400) + .background(GlassBackground()) + .addBorder(cornerRadius: 18, stroke: Color.genericBorder) .transition(.scale.combined(with: .opacity)) .padding(.trailing, 20) } @@ -234,16 +233,16 @@ extension QuickEditResponseView { .mask( VStack(spacing: 0) { LinearGradient( - gradient: Gradient(colors: [Color.clear, Color.white]), + gradient: Gradient(colors: [Color.clear, Color.S_0]), startPoint: .top, endPoint: .bottom ) .frame(height: 20) - Color.white + Color.S_0 LinearGradient( - gradient: Gradient(colors: [Color.white, Color.clear]), + gradient: Gradient(colors: [Color.S_0, Color.clear]), startPoint: .top, endPoint: .bottom ) @@ -270,7 +269,7 @@ extension QuickEditResponseView { ) .buttonStyle(.plain) .frame(height: 24) - .background(.blue400) + .background(Color.blue400) .clipShape(RoundedRectangle(cornerRadius: 5)) } @@ -279,6 +278,7 @@ extension QuickEditResponseView { IconButton( icon: .arrowsSpin, + inactiveColor: Color.S_0, tooltipPrompt: "Retry" ) { if let state = state { diff --git a/macos/Onit/UI/QuickEdit/QuickEditView.swift b/macos/Onit/UI/QuickEdit/QuickEditView.swift index 3f31f8958..0bf1ff384 100644 --- a/macos/Onit/UI/QuickEdit/QuickEditView.swift +++ b/macos/Onit/UI/QuickEdit/QuickEditView.swift @@ -63,8 +63,8 @@ struct QuickEditView: View { var body: some View { mainContent - .background(VibrantVisualEffectView { Color.quickEditBG }) - .addBorder(cornerRadius: 14, lineWidth: 1, stroke: .T_4) + .background(VibrantVisualEffectView { Color.baseBG }) + .addBorder(cornerRadius: 14, lineWidth: 1, stroke: Color.T_4) .frame(minWidth: 360, minHeight: 120, maxHeight: 605) .onAppear(perform: handleOnAppear) .modifier(GeneratingPromptModifier( @@ -107,7 +107,7 @@ struct QuickEditView: View { isEditableElement: quickEditManager.isEditableElement ) - Color.gray500 + Color.genericBorder .frame(height: 1) } } @@ -149,10 +149,9 @@ extension QuickEditView { let windowName = currentWindowInfo.name { ContextTag( text: windowName, - textColor: .T_2, - hoverTextColor: .T_2, - background: .clear, - hoverBackground: .T_8, + hoverTextColor: Color.T_2, + background: Color.clear, + hoverBackground: Color.T_8, maxWidth: 250, isLoading: isAddingContext, iconBundleURL: isAddingContext ? nil : appBundleUrl, @@ -166,6 +165,7 @@ extension QuickEditView { IconButton( icon: .addContext, iconSize: 18, + inactiveColor: Color.S_0, tooltipPrompt: "Add window context" ) { addCurrentWindowToContext() @@ -177,6 +177,7 @@ extension QuickEditView { IconButton( icon: .layoutRight, iconSize: 16, + inactiveColor: Color.S_0, tooltipPrompt: "Open Onit" ) { PanelStateCoordinator.shared.launchPanel(for: windowState, createNewChat: false) @@ -205,7 +206,6 @@ extension QuickEditView { .frame(height: min(textHeight, maxTextHeight)) .padding(.horizontal, 16) .padding(.vertical, 6) - .foregroundStyle(.white) .focused($isFocused) .onAppear { isFocused = true diff --git a/macos/Onit/UI/Settings/AboutTab.swift b/macos/Onit/UI/Settings/AboutTab.swift index 792df577e..c3026b8fe 100644 --- a/macos/Onit/UI/Settings/AboutTab.swift +++ b/macos/Onit/UI/Settings/AboutTab.swift @@ -14,7 +14,7 @@ struct AboutTab: View { Text( "Version \(Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String ?? "1.0.0") (Build \(Bundle.main.infoDictionary?["CFBundleVersion"] as? String ?? "1"))" ) - .foregroundColor(.secondary) + .foregroundColor(Color.secondary) } HStack(spacing: 12) { diff --git a/macos/Onit/UI/Settings/AccessibilityTab.swift b/macos/Onit/UI/Settings/AccessibilityTab.swift index 0b0c1de95..956e791e2 100644 --- a/macos/Onit/UI/Settings/AccessibilityTab.swift +++ b/macos/Onit/UI/Settings/AccessibilityTab.swift @@ -28,7 +28,7 @@ struct AccessibilityTab: View { "With AutoContext, Onit can load context directly from your computer using Apple's screen reader APIs. AutoContext spares you the hassle of manually uploading files or copy/pasting. Data loaded with AutoContext is not uploaded until you submit your conversation. In local mode, no context is ever uploaded." ) .font(.system(size: 12)) - .foregroundStyle(.gray200) + .foregroundStyle(Color.S_2) .lineSpacing(2) if let demoUrl = featureFlagsManager.autocontextDemoVideoUrl { @@ -71,7 +71,7 @@ struct AccessibilityTab: View { } Text("Required for automatic context loading, text insertion, window resizing, and many other Onit features.") .font(.system(size: 12)) - .foregroundStyle(.gray200) + .foregroundStyle(Color.S_2) } } @@ -95,7 +95,7 @@ struct AccessibilityTab: View { } Text("Automatically loads highlighted text as content.") .font(.system(size: 12)) - .foregroundStyle(.gray200) + .foregroundStyle(Color.S_2) } } @@ -118,7 +118,7 @@ struct AccessibilityTab: View { } Text("Loads context from the active window. Note: this feature may not work in every application. ") .font(.system(size: 12)) - .foregroundStyle(.gray200) + .foregroundStyle(Color.S_2) } } } diff --git a/macos/Onit/UI/Settings/DatabaseSettingsView.swift b/macos/Onit/UI/Settings/DatabaseSettingsView.swift index ccda00d6b..74cecde65 100644 --- a/macos/Onit/UI/Settings/DatabaseSettingsView.swift +++ b/macos/Onit/UI/Settings/DatabaseSettingsView.swift @@ -47,7 +47,7 @@ struct DatabaseSettingsView: View { VStack(alignment: .leading, spacing: 8) { HStack { Image(systemName: "database") - .foregroundColor(.blue) + .foregroundColor(Color.blue) Text("Storage Location") .font(.headline) } @@ -56,7 +56,7 @@ struct DatabaseSettingsView: View { HStack { Text("Current Database:") .font(.caption) - .foregroundColor(.secondary) + .foregroundColor(Color.secondary) Spacer() } @@ -64,7 +64,7 @@ struct DatabaseSettingsView: View { .font(.caption) .textSelection(.enabled) .padding(8) - .background(Color.gray.opacity(0.1)) + .background(Color.T_8) .cornerRadius(4) HStack { @@ -73,45 +73,43 @@ struct DatabaseSettingsView: View { .frame(width: 8, height: 8) Text(info.secureExists ? "Database exists" : "Database not found") .font(.caption) - .foregroundColor(.secondary) + .foregroundColor(Color.secondary) } } } .padding() - .background(Color(.controlBackgroundColor)) - .cornerRadius(8) + .addBorder(cornerRadius: 8) } private func migrationStatusCard(_ info: StorageInfo) -> some View { VStack(alignment: .leading, spacing: 8) { HStack { Image(systemName: info.migrationCompleted ? "checkmark.shield" : "clock") - .foregroundColor(info.migrationCompleted ? .green : .orange) + .foregroundColor(info.migrationCompleted ? Color.green : Color.orange500) Text("Migration Status") .font(.headline) } Text(migrationStatusText(info)) .font(.caption) - .foregroundColor(.secondary) + .foregroundColor(Color.secondary) } .padding() - .background(Color(.controlBackgroundColor)) - .cornerRadius(8) + .addBorder(cornerRadius: 8) } private func legacyWarningCard(_ info: StorageInfo) -> some View { VStack(alignment: .leading, spacing: 8) { HStack { Image(systemName: "exclamationmark.triangle") - .foregroundColor(.yellow) + .foregroundColor(Color.yellow) Text("Legacy Database Found") .font(.headline) } Text("A legacy database file was found at the old location. If migration was successful, you can safely delete the backup file.") .font(.caption) - .foregroundColor(.secondary) + .foregroundColor(Color.secondary) Text(info.legacyLocation?.appendingPathExtension("backup").path ?? "") .font(.caption) @@ -128,7 +126,7 @@ struct DatabaseSettingsView: View { } .padding() .background(Color.yellow.opacity(0.1)) - .cornerRadius(8) + .addBorder(cornerRadius: 8) } private func migrationStatusText(_ info: StorageInfo) -> String { diff --git a/macos/Onit/UI/Settings/DebugModeTab.swift b/macos/Onit/UI/Settings/DebugModeTab.swift index 9af0802e2..634cadc65 100644 --- a/macos/Onit/UI/Settings/DebugModeTab.swift +++ b/macos/Onit/UI/Settings/DebugModeTab.swift @@ -69,14 +69,14 @@ struct DebugModeTab: View { } .buttonStyle(.plain) .font(.system(size: 12)) - .foregroundColor(.blue) + .foregroundColor(Color.blue) Button("Clear All") { debugManager.clearOCRComparisonResults() loadedItemsCount = itemsPerPage } .buttonStyle(.plain) - .foregroundColor(.red) + .foregroundColor(Color.red500) .font(.system(size: 12)) } } @@ -98,7 +98,7 @@ struct DebugModeTab: View { searchText = "" } label: { Image(systemName: "xmark.circle.fill") - .foregroundColor(.secondary) + .foregroundColor(Color.secondary) .font(.system(size: 12)) } .buttonStyle(.plain) @@ -111,7 +111,7 @@ struct DebugModeTab: View { Text(resultCountText) .font(.system(size: 12)) - .foregroundColor(.secondary) + .foregroundColor(Color.secondary) if !failingApps.isEmpty { VStack(alignment: .leading, spacing: 8) { @@ -127,7 +127,7 @@ struct DebugModeTab: View { } .buttonStyle(.plain) .font(.system(size: 12)) - .foregroundColor(.blue) + .foregroundColor(Color.blue) .padding(.top, 16) } @@ -158,7 +158,7 @@ struct DebugModeTab: View { .scaleEffect(0.8) Text("Loading more results...") .font(.system(size: 12)) - .foregroundColor(.secondary) + .foregroundColor(Color.secondary) } .padding() } else { @@ -167,7 +167,7 @@ struct DebugModeTab: View { } .buttonStyle(.plain) .font(.system(size: 12)) - .foregroundColor(.blue) + .foregroundColor(Color.blue) .padding() } } diff --git a/macos/Onit/UI/Settings/GeneralTab.swift b/macos/Onit/UI/Settings/GeneralTab.swift index d08e0e0a5..943140800 100644 --- a/macos/Onit/UI/Settings/GeneralTab.swift +++ b/macos/Onit/UI/Settings/GeneralTab.swift @@ -116,6 +116,7 @@ struct GeneralTab: View { .controlSize(.small) } } + .foregroundColor(Color.S_0) .onChange(of: isLaunchAtStartupEnabled, initial: false) { _, _ in toggleLaunchAtStartup() } @@ -148,6 +149,7 @@ struct GeneralTab: View { .opacity(accessibilityGranted ? 1.0 : 0.5) } .buttonStyle(.plain) + .foregroundColor(Color.S_0) .disabled(!accessibilityGranted) Button { @@ -172,13 +174,14 @@ struct GeneralTab: View { .opacity(accessibilityGranted ? 1.0 : 0.5) } .buttonStyle(.plain) + .foregroundColor(Color.S_0) .disabled(!accessibilityGranted) } if !accessibilityGranted { VStack(alignment: .leading, spacing: 8) { Text("To use Pinned or Tethered mode, enable Accessibility permission for Onit.") .font(.system(size: 12)) - .foregroundStyle(.gray200) + .foregroundStyle(Color.S_2) Button(action: { if let url = URL(string: MenuCheckForPermissions.link) { NSWorkspace.shared.open(url) @@ -192,7 +195,7 @@ struct GeneralTab: View { .padding(.vertical, 6) .padding(.horizontal, 12) .background(Color.accentColor) - .foregroundColor(.white) + .foregroundColor(Color.S_0) .clipShape(RoundedRectangle(cornerRadius: 6)) } .buttonStyle(.plain) @@ -202,11 +205,11 @@ struct GeneralTab: View { if isPinnedMode { Text("Onit will always appear on the right side of your screen. You will only have one Onit panel at any given time. Other applications will be resized to make room for Onit.") .font(.system(size: 12)) - .foregroundStyle(.gray200) + .foregroundStyle(Color.S_2) } else { Text("Onit will attach to your applications. There can be one Onit panel for each application window. If you move your app, Onit will move with it.") .font(.system(size: 12)) - .foregroundStyle(.gray200) + .foregroundStyle(Color.S_2) } } } @@ -228,9 +231,11 @@ struct GeneralTab: View { valueType: "Bool" ) } + .foregroundColor(Color.S_0) + Text("Adds context from the current window whenever Onit opens in Tethered mode.") .font(.system(size: 12)) - .foregroundStyle(.gray200) + .foregroundStyle(Color.S_2) } } } @@ -241,9 +246,10 @@ struct GeneralTab: View { VStack(alignment: .leading, spacing: 4) { Text("Hide dock icon") .font(.system(size: 13)) + .foregroundColor(Color.S_0) Text("Show only the menu bar icon") .font(.system(size: 11)) - .foregroundStyle(.gray200) + .foregroundStyle(Color.S_2) } Spacer() @@ -293,15 +299,16 @@ struct GeneralTab: View { } label: { HStack { Image(systemName: stopMode == mode ? "largecircle.fill.circle" : "circle") - .foregroundStyle(stopMode == mode ? .blue : .secondary) + .foregroundStyle(stopMode == mode ? Color.blue : Color.secondary) VStack(alignment: .leading, spacing: 2) { Text(mode == .removePartial ? "Remove Partial" : "Leave Partial") .font(.system(size: 13)) - Text(mode == .removePartial + .foregroundColor(Color.S_0) + Text(mode == .removePartial ? "Removes incomplete responses when stopped" : "Keeps partial responses visible when stopped") .font(.system(size: 11)) - .foregroundStyle(.secondary) + .foregroundStyle(Color.secondary) } Spacer() } @@ -324,6 +331,7 @@ struct GeneralTab: View { HStack { Text("Enable analytics") .font(.system(size: 13)) + .foregroundColor(Color.S_0) Spacer() Toggle("", isOn: $isAnalyticsEnabled) .toggleStyle(.switch) @@ -331,7 +339,7 @@ struct GeneralTab: View { } Text("Help us improve your experience 🚀\nWe collect anonymous usage data to enhance performance and fix issues faster.") .font(.system(size: 12)) - .foregroundStyle(.gray200) + .foregroundStyle(Color.S_2) } .onChange(of: isAnalyticsEnabled, initial: false) { toggleAnalyticsOptOut() @@ -366,6 +374,7 @@ struct GeneralTab: View { .controlSize(.small) } } + .foregroundColor(Color.S_0) VStack(spacing: 8) { HStack { @@ -388,6 +397,7 @@ struct GeneralTab: View { .controlSize(.small) } } + .foregroundColor(Color.S_0) VStack(spacing: 8) { HStack { @@ -410,6 +420,7 @@ struct GeneralTab: View { .controlSize(.small) } } + .foregroundColor(Color.S_0) // VStack(alignment: .leading, spacing: 8) { // Text("Panel Position") @@ -458,6 +469,7 @@ struct GeneralTab: View { .controlSize(.small) } } + .foregroundColor(Color.S_0) VStack(alignment: .leading, spacing: 20) { HStack { @@ -471,6 +483,7 @@ struct GeneralTab: View { .controlSize(.small) } } + .foregroundColor(Color.S_0) } } @@ -485,15 +498,17 @@ struct GeneralTab: View { VStack(alignment: .leading, spacing: 8) { Text("Hide Everywhere") .font(.system(size: 13, weight: .medium)) + .foregroundColor(Color.S_0) if isHideAllAppsTimerActive { HStack { VStack(alignment: .leading, spacing: 2) { Text("Hidden for 1 hour") .font(.system(size: 13)) + .foregroundColor(Color.S_0) Text("Time remaining: \(remainingTimeString)") .font(.system(size: 11)) - .foregroundStyle(.gray300) + .foregroundStyle(Color.S_3) } Spacer() @@ -506,7 +521,7 @@ struct GeneralTab: View { } .padding(.vertical, 6) .padding(.horizontal, 10) - .background(Color.orange.opacity(0.1)) + .background(Color.orange500.opacity(0.1)) .clipShape(RoundedRectangle(cornerRadius: 6)) } else if tetheredButtonHideAllApps { HStack { @@ -523,6 +538,7 @@ struct GeneralTab: View { } .padding(.vertical, 6) .padding(.horizontal, 10) + .foregroundColor(Color.S_0) .background(Color.red.opacity(0.1)) .clipShape(RoundedRectangle(cornerRadius: 6)) } @@ -535,12 +551,12 @@ struct GeneralTab: View { Text("Applications where you've disabled the Onit entry point.") .font(.system(size: 12)) - .foregroundStyle(.gray200) + .foregroundStyle(Color.S_2) if tetheredButtonHiddenApps.isEmpty { Text("You haven't disabled Onit on any apps yet. ") .font(.system(size: 13)) - .foregroundStyle(.gray400) + .foregroundStyle(Color.S_4) .italic() } else { VStack(spacing: 8) { @@ -559,6 +575,7 @@ struct GeneralTab: View { } .padding(.vertical, 4) .padding(.horizontal, 8) + .foregroundColor(Color.S_0) .background(Color.gray.opacity(0.1)) .clipShape(RoundedRectangle(cornerRadius: 6)) } diff --git a/macos/Onit/UI/Settings/GeneralTabAccount.swift b/macos/Onit/UI/Settings/GeneralTabAccount.swift index 2dc8c0546..51667027f 100644 --- a/macos/Onit/UI/Settings/GeneralTabAccount.swift +++ b/macos/Onit/UI/Settings/GeneralTabAccount.swift @@ -38,7 +38,7 @@ struct GeneralTabAccount: View { if !accountDeleteError.isEmpty { Text(accountDeleteError) - .styleText(size: 13, weight: .regular, color: .red) + .styleText(size: 13, weight: .regular, color: Color.red500) } } } @@ -56,7 +56,7 @@ extension GeneralTabAccount { .styleText( size: 13, weight: weight, - color: Color(hex: "#A1A4AF") ?? .gray100 + color: Color.S_1 ) } @@ -82,12 +82,13 @@ extension GeneralTabAccount { SimpleButton( iconSystem: "person.crop.circle", text: "Create an account", + textColor: Color.white, action: { AnalyticsManager.AccountEvents.createAccountPressed() Defaults[.authFlowStatus] = .showSignUp openPanel() }, - background: .blue + background: Color.blue ) } @@ -115,12 +116,12 @@ extension GeneralTabAccount { private var deleteAccountButton: some View { SimpleButton( text: "Delete account", - textColor: .red, + textColor: Color.red500, action: { AnalyticsManager.AccountEvents.deletePressed() showDeleteAccountAlert = true }, - background: .redBrick + background: Color.redDisabledHover ) .sheet(isPresented: $showDeleteAccountAlert) { GeneralTabAccountAlert( diff --git a/macos/Onit/UI/Settings/GeneralTabAccountAlert.swift b/macos/Onit/UI/Settings/GeneralTabAccountAlert.swift index 23ba3609f..62f8ce7c6 100644 --- a/macos/Onit/UI/Settings/GeneralTabAccountAlert.swift +++ b/macos/Onit/UI/Settings/GeneralTabAccountAlert.swift @@ -19,18 +19,6 @@ struct GeneralTabAccountAlert: View { @State private var isHoveredDelete: Bool = false @State private var isPressedDelete: Bool = false - var containerBackgroundColor: Color { - return Color(hex: "#2B2B2B") ?? .gray600 - } - - var customGrayBackgroundColor: Color { - return Color(hex: "#414141") ?? .gray500 - } - - var deleteButtonBorderColor: Color { - return Color(hex: "#7D3535") ?? .red - } - var body: some View { VStack(alignment: .center, spacing: 16) { VStack(alignment: .center, spacing: 10) { @@ -42,7 +30,7 @@ struct GeneralTabAccountAlert: View { .textFieldStyle(PlainTextFieldStyle()) .frame(height: 22) .padding(.horizontal, 7) - .background(customGrayBackgroundColor) + .background(Color.T_9) .cornerRadius(5) .shadow(color: .black.opacity(0.05), radius: 0, x: 0, y: 0) .shadow(color: .black.opacity(0.3), radius: 1.25, x: 0, y: 0.5) @@ -54,7 +42,7 @@ struct GeneralTabAccountAlert: View { } .frame(width: 260) .padding(16) - .background(containerBackgroundColor) + .background(GlassBackground()) .cornerRadius(10) } } @@ -84,14 +72,14 @@ extension GeneralTabAccountAlert { ) -> some View { VStack(alignment: .center) { Text(text) - .styleText(size: 13, weight: .regular, color: isCritical ? .red : Color.primary) + .styleText(size: 13, weight: .regular, color: isCritical ? Color.red500 : Color.S_0) } .frame(height: 28) .frame(maxWidth: .infinity) - .addBorder(cornerRadius: 5, stroke: isCritical ? deleteButtonBorderColor : .clear) + .cornerRadius(5) .addButtonEffects( - background: isCritical ? .redBrick : customGrayBackgroundColor, - hoverBackground: isCritical ? .redBrick.opacity(0.5) : Color(hex: "#3C3C3C") ?? .gray600, + background: isCritical ? Color.redDisabled : Color.T_9, + hoverBackground: isCritical ? Color.redDisabledHover : Color.T_8, cornerRadius: 5, disabled: disabled, allowsHitTesting: allowsHitTesting, diff --git a/macos/Onit/UI/Settings/GeneralTabPlanAndBilling.swift b/macos/Onit/UI/Settings/GeneralTabPlanAndBilling.swift index a15629c09..620916a48 100644 --- a/macos/Onit/UI/Settings/GeneralTabPlanAndBilling.swift +++ b/macos/Onit/UI/Settings/GeneralTabPlanAndBilling.swift @@ -38,7 +38,7 @@ struct GeneralTabPlanAndBilling: View { .styleText( size: 13, weight: .regular, - color: .red + color: Color.red500 ) } @@ -114,6 +114,7 @@ extension GeneralTabPlanAndBilling { SimpleButton( iconText: "🚀", text: "Upgrade to PRO", + textColor: Color.white, action: { AnalyticsManager.Billing.upgradeProPressed() Task { @@ -122,7 +123,7 @@ extension GeneralTabPlanAndBilling { } } }, - background: .blue + background: Color.blue ) } @@ -130,6 +131,7 @@ extension GeneralTabPlanAndBilling { SimpleButton( iconText: "🚀", text: "Start 2-Week PRO Trial", + textColor: Color.white, action: { AnalyticsManager.Billing.startFreeTrialPressed() Task { @@ -138,7 +140,7 @@ extension GeneralTabPlanAndBilling { } } }, - background: .blue + background: Color.blue ) } @@ -146,13 +148,14 @@ extension GeneralTabPlanAndBilling { SimpleButton( iconText: "💫", text: "Renew Subscription", + textColor: Color.white, action: { AnalyticsManager.Billing.renewSubscriptionPressed() Task { await renewSubscription() } }, - background: .blue + background: Color.blue ) } @@ -190,7 +193,7 @@ extension GeneralTabPlanAndBilling { .styleText( size: 13, weight: .regular, - color: Color(hex: "#A1A4AF") ?? .gray100 + color: Color.S_1 ) } diff --git a/macos/Onit/UI/Settings/GeneralTabVoice.swift b/macos/Onit/UI/Settings/GeneralTabVoice.swift index 8a764ac43..44dfc0ac7 100644 --- a/macos/Onit/UI/Settings/GeneralTabVoice.swift +++ b/macos/Onit/UI/Settings/GeneralTabVoice.swift @@ -49,6 +49,7 @@ extension GeneralTabVoice { .controlSize(.small) } } + .foregroundColor(Color.S_0) } var confidenceThreshold: some View { @@ -73,5 +74,6 @@ extension GeneralTabVoice { .controlSize(.small) } } + .foregroundColor(Color.S_0) } } diff --git a/macos/Onit/UI/Settings/Models/CustomProvider/CustomProviderFormView.swift b/macos/Onit/UI/Settings/Models/CustomProvider/CustomProviderFormView.swift index c8d48b915..4670dd7f3 100644 --- a/macos/Onit/UI/Settings/Models/CustomProvider/CustomProviderFormView.swift +++ b/macos/Onit/UI/Settings/Models/CustomProvider/CustomProviderFormView.swift @@ -52,7 +52,7 @@ struct CustomProviderFormView: View { if let errorMessage = errorMessage { Text(errorMessage) - .foregroundColor(.red) + .foregroundColor(Color.red500) } } .padding() diff --git a/macos/Onit/UI/Settings/Models/CustomProvider/CustomProvidersSection.swift b/macos/Onit/UI/Settings/Models/CustomProvider/CustomProvidersSection.swift index 3d3056c51..25947cfc4 100644 --- a/macos/Onit/UI/Settings/Models/CustomProvider/CustomProvidersSection.swift +++ b/macos/Onit/UI/Settings/Models/CustomProvider/CustomProvidersSection.swift @@ -30,7 +30,7 @@ struct CustomProvidersSection: View { } label: { Text("Add new") } - .foregroundStyle(.white) + .foregroundStyle(Color.S_0) .buttonStyle(.borderedProminent) .frame(height: 22) .fontWeight(.regular) diff --git a/macos/Onit/UI/Settings/Models/LocalModelsSection.swift b/macos/Onit/UI/Settings/Models/LocalModelsSection.swift index 6832f635b..fc7280b4a 100644 --- a/macos/Onit/UI/Settings/Models/LocalModelsSection.swift +++ b/macos/Onit/UI/Settings/Models/LocalModelsSection.swift @@ -120,7 +120,7 @@ struct LocalModelsSection: View { fetching = false } }, - background: .blue + background: Color.blue ) } @@ -302,7 +302,7 @@ struct LocalModelsSection: View { } SettingErrorMessage(message: topPError) - Divider() + DividerHorizontal() .padding(.vertical, 4) Button { diff --git a/macos/Onit/UI/Settings/Models/ModelToggle.swift b/macos/Onit/UI/Settings/Models/ModelToggle.swift index e20885b0b..5a09ad022 100644 --- a/macos/Onit/UI/Settings/Models/ModelToggle.swift +++ b/macos/Onit/UI/Settings/Models/ModelToggle.swift @@ -37,7 +37,7 @@ struct ModelToggle: View { Text("NEW") .font(.system(size: 11)) .fontWeight(.bold) - .foregroundColor(.blue400) + .foregroundColor(Color.blue400) } if aiModel.isDeprecated { HStack(spacing: 4) { diff --git a/macos/Onit/UI/Settings/Models/RemoteModelSection.swift b/macos/Onit/UI/Settings/Models/RemoteModelSection.swift index d15cfd6b8..7d41020ec 100644 --- a/macos/Onit/UI/Settings/Models/RemoteModelSection.swift +++ b/macos/Onit/UI/Settings/Models/RemoteModelSection.swift @@ -140,18 +140,18 @@ struct RemoteModelSection: View { SecureField("Enter your \(provider.title) API key", text: $key) .textFieldStyle(PlainTextFieldStyle()) .font(.system(size: 13, weight: .regular)) - .foregroundColor(.primary) // Ensure placeholder text is not dimmed + .foregroundColor(Color.S_0) // Ensure placeholder text is not dimmed .padding(0) .padding(.vertical, 4) .padding(.horizontal, 7) - .background(.systemGray900) - .addBorder(cornerRadius: 5, stroke: .systemGray800) + .background(Color.systemGray900) + .addBorder(cornerRadius: 5, stroke: Color.systemGray800) SimpleButton( isLoading: loading, disabled: validated || state.isValidating, text: verifyButtonText, - textColor: validated ? .black : .white, + textColor: validated ? Color.black : Color.white, action: { if !validated { Task { @@ -164,7 +164,7 @@ struct RemoteModelSection: View { } } }, - background: validated ? .gray400 : .blue + background: validated ? Color.S_4 : Color.blue ) if validated { diff --git a/macos/Onit/UI/Settings/Models/SettingErrorMessage.swift b/macos/Onit/UI/Settings/Models/SettingErrorMessage.swift index 845ad50bd..62e79f8f9 100644 --- a/macos/Onit/UI/Settings/Models/SettingErrorMessage.swift +++ b/macos/Onit/UI/Settings/Models/SettingErrorMessage.swift @@ -6,7 +6,7 @@ struct SettingErrorMessage: View { var body: some View { if let message = message { Text(message) - .foregroundStyle(.red) + .foregroundStyle(Color.red500) .font(.system(size: 10)) .padding(.leading, 4) } diff --git a/macos/Onit/UI/Settings/Models/SettingInfoButton.swift b/macos/Onit/UI/Settings/Models/SettingInfoButton.swift index 4d60a0dd1..865867a9a 100644 --- a/macos/Onit/UI/Settings/Models/SettingInfoButton.swift +++ b/macos/Onit/UI/Settings/Models/SettingInfoButton.swift @@ -13,7 +13,7 @@ struct SettingInfoButton: View { showTooltip.toggle() } label: { Image(systemName: "info.circle") - .foregroundStyle(.primary.opacity(0.65)) + .foregroundStyle(Color.S_0.opacity(0.65)) .font(.system(size: 12)) } .buttonStyle(.plain) @@ -23,7 +23,7 @@ struct SettingInfoButton: View { .font(.system(size: 13, weight: .medium)) Text(description) .font(.system(size: 12)) - Divider() + DividerHorizontal() Group { Text("Type: ").font(.system(size: 12, weight: .medium)) + Text(valueType).font(.system(size: 12)) @@ -35,6 +35,7 @@ struct SettingInfoButton: View { } .padding(12) .frame(width: 300) + .foregroundColor(Color.S_0) } } } diff --git a/macos/Onit/UI/Settings/Models/StreamingToggle.swift b/macos/Onit/UI/Settings/Models/StreamingToggle.swift index 274e2ed09..082332235 100644 --- a/macos/Onit/UI/Settings/Models/StreamingToggle.swift +++ b/macos/Onit/UI/Settings/Models/StreamingToggle.swift @@ -24,14 +24,15 @@ struct StreamingToggle: View { showInfo.toggle() }) { Image(systemName: "info.circle") - .foregroundColor(.accentColor) + .foregroundStyle(Color.S_0.opacity(0.65)) .font(.system(size: 12)) } .buttonStyle(PlainButtonStyle()) .popover(isPresented: $showInfo) { Text("If enabled, Onit streams partial responses from model providers, offering quicker replies. This may not function with all providers.") - .padding() + .padding(12) .frame(width: 200) + .foregroundColor(Color.S_0) } Spacer() diff --git a/macos/Onit/UI/Settings/QuickEditTab.swift b/macos/Onit/UI/Settings/QuickEditTab.swift index cf0ece390..199fa346b 100644 --- a/macos/Onit/UI/Settings/QuickEditTab.swift +++ b/macos/Onit/UI/Settings/QuickEditTab.swift @@ -26,7 +26,7 @@ struct QuickEditTab: View { "Quick Edit enhances your text editing experience by providing instant access to Onit's AI capabilities. When you highlight text in any application, a subtle hint appears, allowing you to quickly transform, analyze, or act upon the selected content. You can customize which applications can trigger Quick Edit, and temporarily pause it for specific apps when needed. All text processing happens locally on your device, ensuring your data remains private." ) .font(.system(size: 12)) - .foregroundStyle(.gray200) + .foregroundStyle(Color.S_2) .lineSpacing(2) } @@ -73,7 +73,7 @@ struct QuickEditTab: View { Text("Display quick edit anywhere") .font(.system(size: 12)) - .foregroundStyle(.gray200) + .foregroundStyle(Color.S_2) } if config.isEnabled { @@ -111,7 +111,7 @@ struct QuickEditTab: View { .renderingMode(.template) .aspectRatio(contentMode: .fit) .frame(width: 16, height: 16) - .foregroundColor(.red) + .foregroundColor(Color.red500) } .buttonStyle(.borderless) } @@ -151,12 +151,12 @@ struct QuickEditTab: View { if let messageToShow = permissionManager.messageToShow { Text(messageToShow) .font(.system(size: 12)) - .foregroundStyle(.orange) + .foregroundStyle(Color.orange500) .transition(.opacity) } else { Text("Required for precise hint positioning. This allows Onit to capture screenshots of highlighted text to accurately position the Quick Edit hint next to your selection.") .font(.system(size: 12)) - .foregroundStyle(.gray200) + .foregroundStyle(Color.S_2) } } } @@ -174,7 +174,7 @@ struct QuickEditTab: View { .font(.system(size: 12)) Text("(until \(pauseEndDate.formatted(date: .omitted, time: .shortened)))") .font(.system(size: 12)) - .foregroundColor(.gray) + .foregroundColor(Color.S_2) Spacer() @@ -186,7 +186,7 @@ struct QuickEditTab: View { .renderingMode(.template) .aspectRatio(contentMode: .fit) .frame(width: 16, height: 16) - .foregroundColor(.red) + .foregroundColor(Color.red500) } .buttonStyle(.borderless) } @@ -207,7 +207,7 @@ struct QuickEditTab: View { .padding(.vertical, 2) Text("Collect and review training data for model to automatically detect text bounds from screenshots.") .font(.system(size: 12)) - .foregroundStyle(.gray200) + .foregroundStyle(Color.S_2) .lineSpacing(2) } } diff --git a/macos/Onit/UI/Settings/SystemPrompt/NewSystemPromptView.swift b/macos/Onit/UI/Settings/SystemPrompt/NewSystemPromptView.swift index 88081d30b..b17b891d6 100644 --- a/macos/Onit/UI/Settings/SystemPrompt/NewSystemPromptView.swift +++ b/macos/Onit/UI/Settings/SystemPrompt/NewSystemPromptView.swift @@ -146,35 +146,35 @@ struct NewSystemPromptView: View { VStack(alignment: .leading, spacing: 8) { Text("Name") .font(.headline) - .foregroundStyle(.gray100) + .foregroundStyle(Color.S_1) TextField("Helpful Assistant", text: $savedPrompt.name) .textFieldStyle(.plain) .padding(8) - .background(.gray700) + .background(Color.T_9) .cornerRadius(5) .overlay( RoundedRectangle(cornerRadius: 8) - .stroke(.gray500) + .stroke(Color.genericBorder) ) } VStack(alignment: .leading, spacing: 8) { Text("System Prompt*") .font(.headline) - .foregroundStyle(.gray100) + .foregroundStyle(Color.S_1) VStack { TextEditor(text: $savedPrompt.prompt) .textEditorStyle(.plain) .frame(height: 100) - .foregroundStyle(promptIsPlaceholder ? .white.opacity(0.3) : .white) + .foregroundStyle(promptIsPlaceholder ? Color.S_0.opacity(0.3) : Color.S_0) .focused($isFocused) } .padding(.vertical, 12) .padding(.horizontal, 3) - .background(.gray700) + .background(Color.T_9) .cornerRadius(5) .overlay( RoundedRectangle(cornerRadius: 8) - .stroke(.gray500) + .stroke(Color.genericBorder) ) } KeyboardShortcuts.Recorder( @@ -185,14 +185,14 @@ struct NewSystemPromptView: View { } } .font(.headline) - .foregroundStyle(.gray100) + .foregroundStyle(Color.S_1) VStack(alignment: .leading, spacing: 8) { Text("Rules for suggestions") .font(.headline) - .foregroundStyle(.gray100) + .foregroundStyle(Color.S_1) Text("Make this system prompt the default suggestion for specific applications and keywords.") - .foregroundStyle(.gray200) + .foregroundStyle(Color.S_2) } applications tags @@ -210,7 +210,7 @@ struct NewSystemPromptView: View { } }) } - .background(.gray800) + .background(GlassBackground()) .frame(maxWidth: 400, alignment: .leading) } @@ -222,8 +222,9 @@ struct NewSystemPromptView: View { dismiss() }) { Image(.smallCross) + .renderingMode(.template) .frame(width: 48, height: 32) - .foregroundStyle(.gray200) + .foregroundStyle(Color.S_2) } .buttonStyle(.plain) Spacer() @@ -231,9 +232,9 @@ struct NewSystemPromptView: View { Text("System Prompt") .frame(maxWidth: .infinity, alignment: .center) - .foregroundStyle(.gray200) + .foregroundStyle(Color.S_2) } - Divider() + DividerHorizontal() } } @@ -241,7 +242,7 @@ struct NewSystemPromptView: View { VStack(alignment: .leading, spacing: 8) { Text("Applications") .font(.headline) - .foregroundStyle(.gray100) + .foregroundStyle(Color.S_1) HStack { Button { @@ -250,7 +251,7 @@ struct NewSystemPromptView: View { Image(systemName: "plus.circle.fill") .resizable() .frame(width: 20, height: 20) - .foregroundColor(.gray100) + .foregroundColor(Color.S_1) } .buttonStyle(.plain) .popover(isPresented: $showAppSelector) { @@ -261,7 +262,7 @@ struct NewSystemPromptView: View { HStack(spacing: 4) { if savedPrompt.applications.isEmpty { Text("No app added") - .foregroundColor(.white.opacity(0.3)) + .foregroundColor(Color.S_0.opacity(0.3)) } else { ForEach(savedPrompt.applications, id: \.self) { url in HStack(spacing: 2) { @@ -276,13 +277,14 @@ struct NewSystemPromptView: View { }) { Image(.smallCross) .resizable() + .renderingMode(.template) .frame(width: 16, height: 16) - .foregroundColor(.gray) + .foregroundColor(Color.S_0) } .buttonStyle(.plain) } .padding(4) - .background(.gray400) + .background(Color.S_4) .cornerRadius(3) } } @@ -292,8 +294,8 @@ struct NewSystemPromptView: View { .frame(height: 34) .background { RoundedRectangle(cornerRadius: 8) - .fill(.gray700) - .stroke(.gray500, lineWidth: 1) + .fill(Color.T_9) + .stroke(Color.genericBorder, lineWidth: 1) } } } @@ -303,18 +305,18 @@ struct NewSystemPromptView: View { VStack(alignment: .leading, spacing: 8) { Text("Tags") .font(.headline) - .foregroundStyle(.gray100) + .foregroundStyle(Color.S_1) TextField("Separate with commas", text: keywordsBinding) .textFieldStyle(.plain) .padding(8) - .background(.gray700) + .background(Color.T_9) .cornerRadius(5) .overlay( RoundedRectangle(cornerRadius: 8) - .stroke(.gray500) + .stroke(Color.genericBorder) ) Text("e.g. frameworks, languages, emails, websites, topics...") - .foregroundStyle(.gray200) + .foregroundStyle(Color.S_2) } } diff --git a/macos/Onit/UI/Settings/SystemPromptTab.swift b/macos/Onit/UI/Settings/SystemPromptTab.swift index 8307fd03c..7576361be 100644 --- a/macos/Onit/UI/Settings/SystemPromptTab.swift +++ b/macos/Onit/UI/Settings/SystemPromptTab.swift @@ -39,16 +39,9 @@ struct SystemPromptTab: View { GeometryReader { geometry in VStack { HStack { - CustomTextField( - text: $searchText, + SearchBar( + searchQuery: $searchText, placeholder: "Search name, prompt or tag...", - config: CustomTextField.Config( - strokeColor: .gray300, - hoverStrokeColor: .gray200, - focusedStrokeColor: .gray100, - clear: true, - leftIcon: .search - ) ) Button { diff --git a/macos/Onit/UI/Settings/WebSearchTab.swift b/macos/Onit/UI/Settings/WebSearchTab.swift index bb934e26b..77350bcf5 100644 --- a/macos/Onit/UI/Settings/WebSearchTab.swift +++ b/macos/Onit/UI/Settings/WebSearchTab.swift @@ -27,9 +27,9 @@ struct WebSearchTab: View { VStack(alignment: .leading, spacing: 16) { Text("Web search can enhance your AI responses with real-time information from the internet.") .font(.system(size: 13)) - .foregroundStyle(.gray200) + .foregroundStyle(Color.S_2) - Divider() + DividerHorizontal() tavilySection } @@ -58,14 +58,13 @@ struct WebSearchTab: View { .font(.system(size: 13)) } - Text("When enabled, web search will be available in local mode. Please note that your queries will be sent to the search provider's servers, and we cannot guarantee that your data won't be stored or logged by the provider.") - .font(.system(size: 12)) - .foregroundStyle(.gray200) - .fixedSize(horizontal: false, vertical: true) - } - .padding(.horizontal, 8) - .padding(.vertical, 12) - .frame(maxWidth: .infinity, alignment: .leading) + Text("When enabled, web search will be available in local mode. Please note that your queries will be sent to the search provider's servers, and we cannot guarantee that your data won't be stored or logged by the provider.") + .font(.system(size: 12)) + .foregroundStyle(Color.S_2) + .padding(.horizontal, 8) + .padding(.vertical, 12) + .frame(maxWidth: .infinity, alignment: .leading) + // .fixedSize(horizontal: false, vertical: true) } } @@ -111,17 +110,17 @@ struct WebSearchTab: View { Text(isTavilyAPITokenValidated ? "Connected" : "Not Connected") .font(.system(size: 12)) .fontWeight(.medium) - .foregroundStyle(isTavilyAPITokenValidated ? .green : .gray100) + .foregroundStyle(isTavilyAPITokenValidated ? Color.green : Color.S_1) .padding(.horizontal, 6) .padding(.vertical, 5) - .background(isTavilyAPITokenValidated ? Color.green.opacity(0.2) : Color.gray200.opacity(0.2)) + .background(isTavilyAPITokenValidated ? Color.green.opacity(0.2) : Color.S_2.opacity(0.2)) .cornerRadius(4) .opacity(isTavilyAPITokenValidated ? 1 : 0.5) } Text("Tavily is a powerful search API that provides real-time information from the web.") .font(.system(size: 13)) - .foregroundStyle(.gray200) + .foregroundStyle(Color.S_2) DisclosureGroup("Tavily API Key\(isTavilyAPITokenValidated ? " ✅" : "")", isExpanded: $showApiKey) { VStack(alignment: .leading, spacing: 8) { @@ -135,7 +134,7 @@ struct WebSearchTab: View { if let error = validationError { Text(error) .font(.system(size: 12)) - .foregroundStyle(.red) + .foregroundStyle(Color.red500) } Text("You can put in [your Tavily API key](https://app.tavily.com) to use Tavily web search at cost.") @@ -146,7 +145,7 @@ struct WebSearchTab: View { .styleText(size: 12, weight: .regular) if isTavilyAPITokenValidated { - Divider() + DividerHorizontal() VStack(alignment: .leading, spacing: 8) { HStack { @@ -156,7 +155,7 @@ struct WebSearchTab: View { Text("When enabled, Onit will use your Tavily token to perform searches instead of Onit credits. By default, Onit uses model provider search tools when available for optimal quality.") .font(.system(size: 12)) - .foregroundStyle(.gray200) + .foregroundStyle(Color.S_2) .fixedSize(horizontal: false, vertical: true) } } diff --git a/macos/Onit/UI/Windows/ContextView.swift b/macos/Onit/UI/Windows/ContextView.swift index cb3d1144c..6e8067fae 100644 --- a/macos/Onit/UI/Windows/ContextView.swift +++ b/macos/Onit/UI/Windows/ContextView.swift @@ -81,6 +81,7 @@ struct ContextView: View { } .frame(idealWidth: 569, minHeight: 370, maxHeight: 569) .fixedSize(horizontal: true, vertical: false) + .background(Color.baseBG) .sheet(isPresented: $showOCRDetails) { // There is a weird SwiftUI bug here. We need to get the OCR result in this closure. // It fails when we try to use the "ocrComparisonResult" variable. @@ -216,7 +217,7 @@ struct ContextView: View { return SetUpDialog( title: errorTitle, icon: "warning", - titleColor: .red, + titleColor: Color.red500, buttonText: buttonText, buttonStyle: .default ) { From 63333d8b9de6545a7ba30ecf85145990eb38f2f4 Mon Sep 17 00:00:00 2001 From: lk340 Date: Thu, 31 Jul 2025 17:15:09 -0400 Subject: [PATCH 2/6] Finish adding theming updates. --- macos/Onit/App.swift | 4 +- .../BorderLocalModel1.colorset/Contents.json | 38 +++++++++++++++++++ .../BorderLocalModel2.colorset/Contents.json | 38 +++++++++++++++++++ .../BorderRemoteModel1.colorset/Contents.json | 38 +++++++++++++++++++ .../BorderRemoteModel2.colorset/Contents.json | 38 +++++++++++++++++++ macos/Onit/General/Styles/ImageStyle.swift | 2 +- macos/Onit/General/Styles/ViewStyle.swift | 6 +-- .../Menu Bar/Content Rows/MenuDivider.swift | 2 +- .../Content Rows/MenuHideTimerStatus.swift | 4 +- .../Content Rows/MenuJoinDiscord.swift | 2 +- .../Content Rows/MenuOpenOnitButton.swift | 4 +- .../Menu Bar/Content Rows/MenuVersion.swift | 2 +- macos/Onit/Menu Bar/MenuBarRow.swift | 2 +- macos/Onit/Menu Bar/MenuButtonStyle.swift | 2 +- macos/Onit/Menu Bar/MenuIcon.swift | 2 +- macos/Onit/OCR/WindowCaptureOCR.swift | 4 +- macos/Onit/UI/Alerts/SubscriptionAlert.swift | 34 ++++------------- .../Onit/UI/Alerts/SubscriptionFeatures.swift | 2 +- macos/Onit/UI/Chat/ChatScrollView.swift | 2 +- macos/Onit/UI/Chat/ChatSystemPromptView.swift | 13 ++++--- macos/Onit/UI/Chat/ChatView.swift | 2 +- macos/Onit/UI/Components/FadeHorizontal.swift | 2 +- .../Onit/UI/Components/GlassBackground.swift | 1 + macos/Onit/UI/Components/IconButton.swift | 4 +- .../UI/Components/RecordingIndicator.swift | 4 +- macos/Onit/UI/Components/TextButton.swift | 8 ++-- .../Onit/UI/Components/TextViewWrapper.swift | 6 +-- macos/Onit/UI/Components/ToolCallView.swift | 26 ++++++------- macos/Onit/UI/Components/TooltipView.swift | 2 +- macos/Onit/UI/Content/ContentView.swift | 1 - macos/Onit/UI/Content/ToolbarRight.swift | 11 +++--- macos/Onit/UI/History/HistoryTitle.swift | 4 +- .../UI/Modifiers/ImageProgressModifier.swift | 2 +- .../UI/Modifiers/LoadingOverlayModifier.swift | 2 +- .../Onboarding/OnboardingAccessibility.swift | 16 ++++---- .../UI/Onboarding/OnboardingAuthButton.swift | 2 +- .../OnboardingSkipAccessibility.swift | 6 +-- .../UI/Onboarding/SubcriptionButton.swift | 10 +++-- .../UI/Onboarding/TetherTutorialOverlay.swift | 6 +-- macos/Onit/UI/Panels/OnitRegularPanel.swift | 2 +- .../UI/Prompt/Dialogs/SetUpButtonStyle.swift | 2 +- .../Files/ContextMenuWindowButton.swift | 12 +++--- .../UI/Prompt/Files/ContextMenuWindows.swift | 4 +- .../Prompt/Files/EnableAutocontextTag.swift | 4 +- macos/Onit/UI/Prompt/Files/FileRow.swift | 4 +- .../UI/Prompt/Files/PaperclipButton.swift | 2 +- macos/Onit/UI/Prompt/FinalContextView.swift | 4 +- .../Prompt/Generated/GeneratedToolbar.swift | 6 +-- macos/Onit/UI/Prompt/GeneratedErrorView.swift | 2 +- macos/Onit/UI/Prompt/GeneratingView.swift | 4 +- macos/Onit/UI/Prompt/MicrophoneButton.swift | 8 ++-- .../Onit/UI/Prompt/ModelSelectionButton.swift | 4 +- macos/Onit/UI/Prompt/PromptCore.swift | 10 ++--- .../UI/Prompt/PromptCoreFooterButton.swift | 2 +- .../Prompt/Selection/ModelSelectionView.swift | 4 +- .../SystemPromptSelectionRowView.swift | 2 +- macos/Onit/UI/Prompt/WebSearchButton.swift | 2 +- .../UI/QuickEdit/QuickEditHintMenuView.swift | 10 ++--- .../UI/QuickEdit/QuickEditResponseView.swift | 2 +- macos/Onit/UI/QuickEdit/QuickEditView.swift | 3 +- macos/Onit/UI/Settings/AccessibilityTab.swift | 2 +- .../UI/Settings/DatabaseSettingsView.swift | 2 +- macos/Onit/UI/Settings/DebugModeTab.swift | 38 +++++++++---------- macos/Onit/UI/Settings/GeneralTab.swift | 4 +- .../UI/Settings/GeneralTabAccountAlert.swift | 4 +- .../CustomProvider/CustomProviderRow.swift | 8 ++-- .../Settings/Models/LocalModelsSection.swift | 4 +- .../UI/Settings/Models/StreamingToggle.swift | 2 +- ...ghtedTextBoundTrainingDataReviewView.swift | 22 +++++------ ...tedTextBoundTrainingSampleDetailView.swift | 38 +++++++++---------- .../SettingsSystemPromptDetail.swift | 4 +- .../SettingsSystemPromptTable.swift | 4 +- macos/Onit/UI/Settings/SystemPromptTab.swift | 2 +- .../UI/Windows/ContextPickerItemView.swift | 6 +-- macos/Onit/UI/Windows/ContextPickerView.swift | 2 +- 75 files changed, 363 insertions(+), 226 deletions(-) create mode 100644 macos/Onit/Assets.xcassets/Colors/BorderLocalModel1.colorset/Contents.json create mode 100644 macos/Onit/Assets.xcassets/Colors/BorderLocalModel2.colorset/Contents.json create mode 100644 macos/Onit/Assets.xcassets/Colors/BorderRemoteModel1.colorset/Contents.json create mode 100644 macos/Onit/Assets.xcassets/Colors/BorderRemoteModel2.colorset/Contents.json diff --git a/macos/Onit/App.swift b/macos/Onit/App.swift index 0c927a512..cea422025 100644 --- a/macos/Onit/App.swift +++ b/macos/Onit/App.swift @@ -91,7 +91,7 @@ struct App: SwiftUI.App { window.setFrame(NSRect(x: 0, y: 0, width: 1, height: 1), display: false) window.isOpaque = false window.hasShadow = false - window.backgroundColor = .clear + window.backgroundColor = NSColor.clear window.isReleasedWhenClosed = false window.level = .floating window.ignoresMouseEvents = true @@ -114,7 +114,7 @@ struct App: SwiftUI.App { .addBorder( cornerRadius: 14, lineWidth: 2, - stroke: .gray600 + stroke: Color.genericBorder ) .edgesIgnoringSafeArea(.top) } diff --git a/macos/Onit/Assets.xcassets/Colors/BorderLocalModel1.colorset/Contents.json b/macos/Onit/Assets.xcassets/Colors/BorderLocalModel1.colorset/Contents.json new file mode 100644 index 000000000..250d4295a --- /dev/null +++ b/macos/Onit/Assets.xcassets/Colors/BorderLocalModel1.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "display-p3", + "components" : { + "alpha" : "1.000", + "blue" : "0x8C", + "green" : "0xCD", + "red" : "0x7E" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "display-p3", + "components" : { + "alpha" : "1.000", + "blue" : "0x8C", + "green" : "0xCD", + "red" : "0x7E" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/macos/Onit/Assets.xcassets/Colors/BorderLocalModel2.colorset/Contents.json b/macos/Onit/Assets.xcassets/Colors/BorderLocalModel2.colorset/Contents.json new file mode 100644 index 000000000..2c6dfe8be --- /dev/null +++ b/macos/Onit/Assets.xcassets/Colors/BorderLocalModel2.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "display-p3", + "components" : { + "alpha" : "1.000", + "blue" : "0xBF", + "green" : "0xA4", + "red" : "0x4A" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "display-p3", + "components" : { + "alpha" : "1.000", + "blue" : "0xBF", + "green" : "0xA4", + "red" : "0x4A" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/macos/Onit/Assets.xcassets/Colors/BorderRemoteModel1.colorset/Contents.json b/macos/Onit/Assets.xcassets/Colors/BorderRemoteModel1.colorset/Contents.json new file mode 100644 index 000000000..295200e82 --- /dev/null +++ b/macos/Onit/Assets.xcassets/Colors/BorderRemoteModel1.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "display-p3", + "components" : { + "alpha" : "1.000", + "blue" : "0xFD", + "green" : "0x6A", + "red" : "0x6D" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "display-p3", + "components" : { + "alpha" : "1.000", + "blue" : "0xFD", + "green" : "0x6A", + "red" : "0x6D" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/macos/Onit/Assets.xcassets/Colors/BorderRemoteModel2.colorset/Contents.json b/macos/Onit/Assets.xcassets/Colors/BorderRemoteModel2.colorset/Contents.json new file mode 100644 index 000000000..7a691fac2 --- /dev/null +++ b/macos/Onit/Assets.xcassets/Colors/BorderRemoteModel2.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "display-p3", + "components" : { + "alpha" : "1.000", + "blue" : "0xDA", + "green" : "0xAD", + "red" : "0xB3" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "display-p3", + "components" : { + "alpha" : "1.000", + "blue" : "0xDA", + "green" : "0xAD", + "red" : "0xB3" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/macos/Onit/General/Styles/ImageStyle.swift b/macos/Onit/General/Styles/ImageStyle.swift index 80023187f..ffe779e3c 100644 --- a/macos/Onit/General/Styles/ImageStyle.swift +++ b/macos/Onit/General/Styles/ImageStyle.swift @@ -9,7 +9,7 @@ import SwiftUI extension Image { func addIconStyles( - foregroundColor: Color = Color.primary, + foregroundColor: Color = Color.S_0, iconSize: CGFloat = 20 ) -> some View { self diff --git a/macos/Onit/General/Styles/ViewStyle.swift b/macos/Onit/General/Styles/ViewStyle.swift index f9eabe130..c9c0c5edc 100644 --- a/macos/Onit/General/Styles/ViewStyle.swift +++ b/macos/Onit/General/Styles/ViewStyle.swift @@ -10,8 +10,8 @@ import SwiftUI // MARK: - General View Styles struct GradientBorder { - var colorOne: Color = Color.white - var colorTwo: Color = Color.white + var colorOne: Color = Color.genericBorder + var colorTwo: Color = Color.genericBorder } struct DefaultBorderValues { @@ -106,7 +106,7 @@ extension View { extension View { func addButtonEffects( - background: Color = .clear, + background: Color = Color.clear, hoverBackground: Color = Color.T_8, cornerRadius: CGFloat = 8, disabled: Bool = false, diff --git a/macos/Onit/Menu Bar/Content Rows/MenuDivider.swift b/macos/Onit/Menu Bar/Content Rows/MenuDivider.swift index 4afba8d7a..b0f3ad6f5 100644 --- a/macos/Onit/Menu Bar/Content Rows/MenuDivider.swift +++ b/macos/Onit/Menu Bar/Content Rows/MenuDivider.swift @@ -9,7 +9,7 @@ import SwiftUI struct MenuDivider: View { var body: some View { - Divider() + DividerHorizontal() .padding(.vertical, 4) .padding(.horizontal, 9) } diff --git a/macos/Onit/Menu Bar/Content Rows/MenuHideTimerStatus.swift b/macos/Onit/Menu Bar/Content Rows/MenuHideTimerStatus.swift index 02960b1f1..37e7bb387 100644 --- a/macos/Onit/Menu Bar/Content Rows/MenuHideTimerStatus.swift +++ b/macos/Onit/Menu Bar/Content Rows/MenuHideTimerStatus.swift @@ -62,14 +62,14 @@ struct MenuHideTimerStatus: View { } leading: { HStack(spacing: 9) { Circle() - .fill(Color.orange) + .fill(Color.orange500) .frame(width: 5, height: 5) Text(statusText) } .padding(.horizontal, 10) } trailing: { Text("Unhide") - .foregroundStyle(.gray200) + .foregroundStyle(Color.S_2) .font(.system(size: 13)) .padding(.trailing, 10) } diff --git a/macos/Onit/Menu Bar/Content Rows/MenuJoinDiscord.swift b/macos/Onit/Menu Bar/Content Rows/MenuJoinDiscord.swift index 87fc2d949..c95070bb2 100644 --- a/macos/Onit/Menu Bar/Content Rows/MenuJoinDiscord.swift +++ b/macos/Onit/Menu Bar/Content Rows/MenuJoinDiscord.swift @@ -18,7 +18,7 @@ struct MenuJoinDiscord: View { } leading: { Text("Join Discord →") .padding(.horizontal, 10) - .foregroundColor(.primary) + .foregroundColor(Color.S_0) } } } diff --git a/macos/Onit/Menu Bar/Content Rows/MenuOpenOnitButton.swift b/macos/Onit/Menu Bar/Content Rows/MenuOpenOnitButton.swift index 9322244d1..0311a945c 100644 --- a/macos/Onit/Menu Bar/Content Rows/MenuOpenOnitButton.swift +++ b/macos/Onit/Menu Bar/Content Rows/MenuOpenOnitButton.swift @@ -17,7 +17,7 @@ struct MenuOpenOnitButton: View { Image(.noodle) .renderingMode(.template) .resizable() - .foregroundStyle(.primary) + .foregroundStyle(Color.S_0) .scaledToFit() .padding(1) .frame(width: 16, height: 16) @@ -29,7 +29,7 @@ struct MenuOpenOnitButton: View { shortcut: KeyboardShortcuts.getShortcut( for: .launchWithAutoContext)?.native ) - .foregroundStyle(.gray200) + .foregroundStyle(Color.S_2) .appFont(.medium13) } } diff --git a/macos/Onit/Menu Bar/Content Rows/MenuVersion.swift b/macos/Onit/Menu Bar/Content Rows/MenuVersion.swift index ab7d99b28..a1370e87d 100644 --- a/macos/Onit/Menu Bar/Content Rows/MenuVersion.swift +++ b/macos/Onit/Menu Bar/Content Rows/MenuVersion.swift @@ -23,7 +23,7 @@ struct MenuVersion: View { HStack { Text(versionText) .font(.system(size: 13, weight: .medium)) - .foregroundStyle(Color.primary.opacity(0.5)) + .foregroundStyle(Color.S_0.opacity(0.5)) Spacer() } .frame(height: 18) diff --git a/macos/Onit/Menu Bar/MenuBarRow.swift b/macos/Onit/Menu Bar/MenuBarRow.swift index b074aa253..d229ead7e 100644 --- a/macos/Onit/Menu Bar/MenuBarRow.swift +++ b/macos/Onit/Menu Bar/MenuBarRow.swift @@ -40,7 +40,7 @@ struct MenuBarRow: View { leading Spacer() trailing - .foregroundStyle(Color.primary.opacity(0.25)) + .foregroundStyle(Color.S_0.opacity(0.25)) } .font(.system(size: 13, weight: .medium)) .frame(height: 22) diff --git a/macos/Onit/Menu Bar/MenuButtonStyle.swift b/macos/Onit/Menu Bar/MenuButtonStyle.swift index b49a9f727..6593be901 100644 --- a/macos/Onit/Menu Bar/MenuButtonStyle.swift +++ b/macos/Onit/Menu Bar/MenuButtonStyle.swift @@ -11,7 +11,7 @@ struct MenuButtonStyle: ButtonStyle { @State private var hovering = false var style: AnyShapeStyle { - hovering ? AnyShapeStyle(.quinary) : AnyShapeStyle(Color.clear) + hovering ? AnyShapeStyle(Color.T_8) : AnyShapeStyle(Color.clear) } func makeBody(configuration: Configuration) -> some View { diff --git a/macos/Onit/Menu Bar/MenuIcon.swift b/macos/Onit/Menu Bar/MenuIcon.swift index e9aba08f5..bb93b1b4f 100644 --- a/macos/Onit/Menu Bar/MenuIcon.swift +++ b/macos/Onit/Menu Bar/MenuIcon.swift @@ -52,7 +52,7 @@ struct MenuIcon: View { var body: some View { Image(iconImage) .renderingMode(.template) // Make sure to use template rendering - .foregroundColor(.primary) // Adapts to menu bar color + .foregroundColor(Color.S_0) // Adapts to menu bar color .onAppear { startTimerUpdateTaskIfNeeded() } diff --git a/macos/Onit/OCR/WindowCaptureOCR.swift b/macos/Onit/OCR/WindowCaptureOCR.swift index 781cc5d09..d1b3a4146 100644 --- a/macos/Onit/OCR/WindowCaptureOCR.swift +++ b/macos/Onit/OCR/WindowCaptureOCR.swift @@ -217,7 +217,7 @@ final class WindowCaptureOCR: Sendable { nsImage.draw(in: NSRect(origin: .zero, size: nsImage.size)) // Set up red highlight - NSColor.red.withAlphaComponent(0.3).set() + NSColor.red500.withAlphaComponent(0.3).set() // Draw rectangles around failed observations for observation in failedObservations { @@ -253,7 +253,7 @@ final class WindowCaptureOCR: Sendable { let font = NSFont.systemFont(ofSize: 10) let attributes: [NSAttributedString.Key: Any] = [ .font: font, - .foregroundColor: NSColor.white, + .foregroundColor: NSColor.S_0, .backgroundColor: NSColor.green.withAlphaComponent(0.8) ] diff --git a/macos/Onit/UI/Alerts/SubscriptionAlert.swift b/macos/Onit/UI/Alerts/SubscriptionAlert.swift index 94b84ffbc..d83d52c5a 100644 --- a/macos/Onit/UI/Alerts/SubscriptionAlert.swift +++ b/macos/Onit/UI/Alerts/SubscriptionAlert.swift @@ -62,7 +62,7 @@ struct SubscriptionAlert: View { .styleText( size: 13, weight: .regular, - color: .red + color: Color.red500 ) } @@ -95,14 +95,14 @@ struct SubscriptionAlert: View { footer } .padding(16) - .background(.gray900) + .background(Color.elevatedBG) .addBorder() .padding(22) .transition(.opacity) } .frame(maxHeight: .infinity) .background( - Color.baseBG + GlassBackground() .onTapGesture { close?() } @@ -118,7 +118,7 @@ extension SubscriptionAlert { close() } label: { Image(.smallCross) - .addIconStyles(foregroundColor: .gray200, iconSize: 18) + .addIconStyles(foregroundColor: Color.S_1, iconSize: 18) } .buttonStyle(PlainButtonStyle()) .offset(x: 6, y: -6) @@ -141,7 +141,7 @@ extension SubscriptionAlert { .styleText( size: 13, weight: .regular, - color: .gray100, + color: Color.S_1, align: .center ) } @@ -160,31 +160,13 @@ extension SubscriptionAlert { .buttonStyle(PlainButtonStyle()) } - private var footerDivider: some View { - Rectangle() - .foregroundColor(.clear) - .frame(height: 1) - .background( - LinearGradient( - stops: [ - Gradient.Stop(color: Color(red: 0.09, green: 0.09, blue: 0.1), location: 0.00), - Gradient.Stop(color: Color(red: 0.2, green: 0.21, blue: 0.23), location: 0.31), - Gradient.Stop(color: Color(red: 0.2, green: 0.21, blue: 0.23), location: 0.73), - Gradient.Stop(color: Color(red: 0.09, green: 0.09, blue: 0.1), location: 1.00), - ], - startPoint: UnitPoint(x: 0, y: 0.5), - endPoint: UnitPoint(x: 1, y: 0.5) - ) - ) - } - private func footerTextView(_ text: String) -> some View { - Text(text).styleText(size: 11, color: .gray200) + Text(text).styleText(size: 11, color: Color.S_2) } private var footer: some View { VStack(alignment: .center, spacing: 16) { - footerDivider + DividerHorizontal() VStack(alignment: .center, spacing: 4) { if let footerSupportingText = footerSupportingText { @@ -197,7 +179,7 @@ extension SubscriptionAlert { Button { openModelSettings() } label: { - Text("Settings").styleText(size: 11, color: .gray100) + Text("Settings").styleText(size: 11, color: Color.S_1) } .buttonStyle(PlainButtonStyle()) } diff --git a/macos/Onit/UI/Alerts/SubscriptionFeatures.swift b/macos/Onit/UI/Alerts/SubscriptionFeatures.swift index cff4f8e6d..653f9265b 100644 --- a/macos/Onit/UI/Alerts/SubscriptionFeatures.swift +++ b/macos/Onit/UI/Alerts/SubscriptionFeatures.swift @@ -27,7 +27,7 @@ struct SubscriptionFeatures: View { .styleText( size: 13, weight: .regular, - color: .red, + color: Color.red500, align: centerErrorText ? .center : .leading ) } else if let features = features { diff --git a/macos/Onit/UI/Chat/ChatScrollView.swift b/macos/Onit/UI/Chat/ChatScrollView.swift index 2ab2fc7b3..340e93fa2 100644 --- a/macos/Onit/UI/Chat/ChatScrollView.swift +++ b/macos/Onit/UI/Chat/ChatScrollView.swift @@ -56,7 +56,7 @@ class ChatScrollView: NSScrollView { autohidesScrollers = true drawsBackground = false - backgroundColor = .clear + backgroundColor = NSColor.clear lastScrollPosition = 0 diff --git a/macos/Onit/UI/Chat/ChatSystemPromptView.swift b/macos/Onit/UI/Chat/ChatSystemPromptView.swift index 2320d462b..469b0c453 100644 --- a/macos/Onit/UI/Chat/ChatSystemPromptView.swift +++ b/macos/Onit/UI/Chat/ChatSystemPromptView.swift @@ -27,10 +27,13 @@ struct ChatSystemPromptView: View { } } label: { HStack(alignment: .center, spacing: 6) { - Image(.chatSettings) - .renderingMode(.template) + Image(.info) + .addIconStyles( + foregroundColor: Color.S_2, + iconSize: 13 + ) Text(systemPrompt.name) - .appFont(.medium14) + .styleText(size: 12, weight: .semibold, color: Color.S_2) .lineLimit(1) Image(.smallChevDown) .renderingMode(.template) @@ -38,7 +41,7 @@ struct ChatSystemPromptView: View { } .frame(maxWidth: .infinity, alignment: .leading) .padding(.vertical, 0) - .foregroundStyle(.blue300) + .foregroundStyle(Color.S_2) } .buttonStyle(DarkerButtonStyle()) @@ -75,7 +78,7 @@ struct ChatSystemPromptView: View { HStack(alignment: .top, spacing: 4) { Image(systemName: "info.circle") .frame(width: 16, height: 16) - .foregroundStyle(.white.opacity(0.5)) + .foregroundStyle(Color.white.opacity(0.5)) VStack(alignment: .leading, spacing: 4) { Text(infoFirstLine) diff --git a/macos/Onit/UI/Chat/ChatView.swift b/macos/Onit/UI/Chat/ChatView.swift index 75dcab3bc..52454c4ec 100644 --- a/macos/Onit/UI/Chat/ChatView.swift +++ b/macos/Onit/UI/Chat/ChatView.swift @@ -85,7 +85,7 @@ struct ChatView: View { .padding(.trailing, 20) } } - .background(.clear) + .background(Color.clear) .padding(.bottom, 4) } } diff --git a/macos/Onit/UI/Components/FadeHorizontal.swift b/macos/Onit/UI/Components/FadeHorizontal.swift index 2acdd999a..115f788ea 100644 --- a/macos/Onit/UI/Components/FadeHorizontal.swift +++ b/macos/Onit/UI/Components/FadeHorizontal.swift @@ -30,7 +30,7 @@ struct FadeHorizontal: View { .fill( LinearGradient( gradient: Gradient( - colors: toRight ? [color, .clear] : [.clear, color] + colors: toRight ? [color, Color.clear] : [Color.clear, color] ), startPoint: .leading, endPoint: .trailing diff --git a/macos/Onit/UI/Components/GlassBackground.swift b/macos/Onit/UI/Components/GlassBackground.swift index c6e7e0c61..55f6bc3a7 100644 --- a/macos/Onit/UI/Components/GlassBackground.swift +++ b/macos/Onit/UI/Components/GlassBackground.swift @@ -11,5 +11,6 @@ struct GlassBackground: View { var body: some View { Rectangle() .fill(.thinMaterial) + .opacity(0.5) } } diff --git a/macos/Onit/UI/Components/IconButton.swift b/macos/Onit/UI/Components/IconButton.swift index dd415d42a..5f6c5fe81 100644 --- a/macos/Onit/UI/Components/IconButton.swift +++ b/macos/Onit/UI/Components/IconButton.swift @@ -71,7 +71,7 @@ struct IconButton: View { var background: Color { if isHovered { return hoverBackground } else if isActive { return activeBackground } - else { return .clear } + else { return Color.clear } } var body: some View { @@ -93,7 +93,7 @@ struct IconButton: View { } .addBorder( cornerRadius: cornerRadius, - stroke: isActive ? activeBorderColor : .clear + stroke: isActive ? activeBorderColor : Color.clear ) .addAnimation(dependency: isActive) .onChange(of: isHovered) { _, isHovering in diff --git a/macos/Onit/UI/Components/RecordingIndicator.swift b/macos/Onit/UI/Components/RecordingIndicator.swift index 7fb9f2371..85457e91b 100644 --- a/macos/Onit/UI/Components/RecordingIndicator.swift +++ b/macos/Onit/UI/Components/RecordingIndicator.swift @@ -52,7 +52,7 @@ struct WaveformIndicator: View { .padding(.horizontal, 8) .background( RoundedRectangle(cornerRadius: 11) - .fill(Color.red.opacity(0.2)) + .fill(Color.red500.opacity(0.2)) ) .onAppear { withAnimation(.linear(duration: animationDuration).repeatForever(autoreverses: false)) { @@ -61,7 +61,7 @@ struct WaveformIndicator: View { } private func bar(for index: Int) -> some View { return RoundedRectangle(cornerRadius: 1) - .fill(Color.red) + .fill(Color.red500) .frame(width: 2, height: barHeight(for: index)) .animation( .easeInOut(duration: 0.1), // Quick response to audio changes diff --git a/macos/Onit/UI/Components/TextButton.swift b/macos/Onit/UI/Components/TextButton.swift index 3a3c4b9c4..57007b4de 100644 --- a/macos/Onit/UI/Components/TextButton.swift +++ b/macos/Onit/UI/Components/TextButton.swift @@ -55,7 +55,7 @@ struct TextButton: View { horizontalPadding: CGFloat = 8, cornerRadius: CGFloat = 8, - background: Color = .clear, + background: Color = Color.clear, hoverBackground: Color = Color.T_8, fontSize: CGFloat = 14, fontWeight: Font.Weight = Font.Weight.medium, @@ -114,7 +114,7 @@ struct TextButton: View { if let icon = icon { Image(icon) .addIconStyles( - foregroundColor: selected ? .blue300 : isHovered ? hoverIconColor : iconColor, + foregroundColor: selected ? Color.blue300 : isHovered ? hoverIconColor : iconColor, iconSize: iconSize ) } @@ -154,8 +154,8 @@ struct TextButton: View { ) } .addButtonEffects( - background: disabled ? .clear : background, - hoverBackground: disabled ? .clear : hoverBackground, + background: disabled ? Color.clear : background, + hoverBackground: disabled ? Color.clear : hoverBackground, cornerRadius: cornerRadius, disabled: disabled, allowsHitTesting: !selected, diff --git a/macos/Onit/UI/Components/TextViewWrapper.swift b/macos/Onit/UI/Components/TextViewWrapper.swift index 47fb80736..5171c7c5f 100644 --- a/macos/Onit/UI/Components/TextViewWrapper.swift +++ b/macos/Onit/UI/Components/TextViewWrapper.swift @@ -26,8 +26,8 @@ struct TextViewWrapper: NSViewRepresentable { var isDisabled: Bool = false var font: NSFont = AppFont.medium14.nsFont - var textColor: NSColor = .S_0 - var placeholderColor: NSColor = .placeholderText + var textColor: NSColor = NSColor.S_0 + var placeholderColor: NSColor = NSColor.placeholderText var detectLinks: Bool = true // TODO remove this once we use TextInputView for prompt editing func makeNSView(context: Self.Context) -> NSScrollView { @@ -283,7 +283,7 @@ private class CustomTextView: NSTextView { override func draw(_ dirtyRect: NSRect) { super.draw(dirtyRect) - insertionPointColor = (audioRecorder.isRecording || audioRecorder.isTranscribing) ? .clear : textColor + insertionPointColor = (audioRecorder.isRecording || audioRecorder.isTranscribing) ? NSColor.clear : textColor if string.isEmpty && !audioRecorder.isRecording && !audioRecorder.isTranscribing, let placeholder = placeholder { let attributes: [NSAttributedString.Key: Any] = [ diff --git a/macos/Onit/UI/Components/ToolCallView.swift b/macos/Onit/UI/Components/ToolCallView.swift index 72b9f49d8..20404c91a 100644 --- a/macos/Onit/UI/Components/ToolCallView.swift +++ b/macos/Onit/UI/Components/ToolCallView.swift @@ -30,16 +30,16 @@ struct ToolCallView: View { HStack(spacing: 10) { // Calendar icon Image(systemName: "calendar") - .foregroundColor(.white) + .foregroundColor(Color.S_0) .frame(width: 16, height: 16) .padding(.vertical, 6) .padding(.horizontal, 8) - .background(Color.red) + .background(Color.red500) .cornerRadius(6) // Tool name Text(displayToolName) - .foregroundColor(.primary) + .foregroundColor(Color.S_0) .font(.system(size: 15, weight: .medium)) Spacer() @@ -47,17 +47,17 @@ struct ToolCallView: View { // Success/Error indicator if let success = response.toolCallSuccess { Image(systemName: success ? "checkmark" : "xmark") - .foregroundColor(success ? .green : .red) + .foregroundColor(success ? Color.green : Color.red500) .font(.system(size: 14, weight: .bold)) .frame(width: 18, height: 18) .background( - Circle().fill(success ? Color.green.opacity(0.1) : Color.red.opacity(0.1))) + Circle().fill(success ? Color.green.opacity(0.1) : Color.red500.opacity(0.1))) } // Expand/Collapse arrow (only show when expandable) if hasExpandableContent { Image(systemName: "chevron.right") - .foregroundColor(.secondary) + .foregroundColor(Color.secondary) .font(.system(size: 12, weight: .medium)) .rotationEffect(.degrees(isExpanded ? 90 : 0)) .animation(.easeInOut(duration: 0.2), value: isExpanded) @@ -90,11 +90,11 @@ struct ToolCallView: View { HStack { Text("Input") .font(.system(size: 13, weight: .semibold)) - .foregroundColor(.secondary) + .foregroundColor(Color.secondary) Image(systemName: "chevron.down") .font(.system(size: 10)) - .foregroundColor(.secondary) + .foregroundColor(Color.secondary) Spacer() } @@ -104,12 +104,12 @@ struct ToolCallView: View { HStack(alignment: .top) { Text("\(argument.key):") .font(.system(size: 14, weight: .medium)) - .foregroundColor(.primary) + .foregroundColor(Color.S_0) .frame(minWidth: 80, alignment: .leading) Text(argument.value) .font(.system(size: 14)) - .foregroundColor(.primary) + .foregroundColor(Color.S_0) .multilineTextAlignment(.leading) Spacer() @@ -127,18 +127,18 @@ struct ToolCallView: View { HStack { Text("Output") .font(.system(size: 13, weight: .semibold)) - .foregroundColor(.secondary) + .foregroundColor(Color.secondary) Image(systemName: "chevron.down") .font(.system(size: 10)) - .foregroundColor(.secondary) + .foregroundColor(Color.secondary) Spacer() } Text(result) .font(.system(size: 14)) - .foregroundColor(.primary) + .foregroundColor(Color.S_0) .multilineTextAlignment(.leading) } } diff --git a/macos/Onit/UI/Components/TooltipView.swift b/macos/Onit/UI/Components/TooltipView.swift index d66410d3a..4a60c1575 100644 --- a/macos/Onit/UI/Components/TooltipView.swift +++ b/macos/Onit/UI/Components/TooltipView.swift @@ -89,7 +89,7 @@ struct TooltipView: View { var tooltipBackground: some View { RoundedRectangle(cornerRadius: 8) .fill(Color.hintBG) - // .shadow(color: .black.opacity(0.36), radius: 2.5, x: 0, y: 0) +// .shadow(color: Color.black.opacity(0.36), radius: 2.5, x: 0, y: 0) } } diff --git a/macos/Onit/UI/Content/ContentView.swift b/macos/Onit/UI/Content/ContentView.swift index aeae2a510..36a5c91e1 100644 --- a/macos/Onit/UI/Content/ContentView.swift +++ b/macos/Onit/UI/Content/ContentView.swift @@ -76,7 +76,6 @@ struct ContentView: View { } } .frame(maxWidth: .infinity, maxHeight: .infinity) - .background(Color.black) .onAppear { if appState.account == nil { authFlowStatus = .showSignUp diff --git a/macos/Onit/UI/Content/ToolbarRight.swift b/macos/Onit/UI/Content/ToolbarRight.swift index 76b35b286..3579839c2 100644 --- a/macos/Onit/UI/Content/ToolbarRight.swift +++ b/macos/Onit/UI/Content/ToolbarRight.swift @@ -18,7 +18,7 @@ struct ToolbarRight: View { @Default(.footerNotifications) var footerNotifications var body: some View { - HStack(alignment: .center, spacing: 6) { + HStack(alignment: .center, spacing: 12) { discord localMode history @@ -29,7 +29,6 @@ struct ToolbarRight: View { } } .padding(.trailing, 6) - .foregroundStyle(.gray200) .padding(.horizontal, 0) .background { escListener } } @@ -53,8 +52,8 @@ struct ToolbarRight: View { iconSize: 22, isActive: mode == .local, activeColor: Color.lime400, - activeBackground: .clear, - activeBorderColor: .clear, + activeBackground: Color.clear, + activeBorderColor: Color.clear, tooltipPrompt: "Local Mode", tooltipShortcut: .keyboardShortcuts(.toggleLocalMode) ) { @@ -125,8 +124,8 @@ struct ToolbarRight: View { IconButton( icon: .lightning, iconSize: 21, - inactiveColor: .blue300, - hoverBackground: .blue300.opacity(0.2), + inactiveColor: Color.blue300, + hoverBackground: Color.blue300.opacity(0.2), tooltipPrompt: "Install Update" ) { appState.checkForAvailableUpdateWithDownload() diff --git a/macos/Onit/UI/History/HistoryTitle.swift b/macos/Onit/UI/History/HistoryTitle.swift index f66343ac1..d595fd787 100644 --- a/macos/Onit/UI/History/HistoryTitle.swift +++ b/macos/Onit/UI/History/HistoryTitle.swift @@ -14,14 +14,14 @@ struct HistoryTitle: View { HStack { Text("History") .appFont(.medium14) - .foregroundStyle(.FG) + .foregroundStyle(Color.S_0) Spacer() Button { state?.showHistory = false } label: { Image(.smallCross) .renderingMode(.template) - .foregroundStyle(.gray200) + .foregroundStyle(Color.S_2) .frame(width: 20, height: 20) } .buttonStyle(BorderlessButtonStyle()) diff --git a/macos/Onit/UI/Modifiers/ImageProgressModifier.swift b/macos/Onit/UI/Modifiers/ImageProgressModifier.swift index 9e15fe999..5d724412f 100644 --- a/macos/Onit/UI/Modifiers/ImageProgressModifier.swift +++ b/macos/Onit/UI/Modifiers/ImageProgressModifier.swift @@ -56,7 +56,7 @@ extension View { #if DEBUG #Preview { - Color.red + Color.red500 .modifier(ImageProgressModifier(url: .applicationDirectory)) } #endif diff --git a/macos/Onit/UI/Modifiers/LoadingOverlayModifier.swift b/macos/Onit/UI/Modifiers/LoadingOverlayModifier.swift index e58f086a5..37854a2d1 100644 --- a/macos/Onit/UI/Modifiers/LoadingOverlayModifier.swift +++ b/macos/Onit/UI/Modifiers/LoadingOverlayModifier.swift @@ -82,7 +82,7 @@ extension View { // MARK: Preview #Preview { - Color.red + Color.red500 .frame(width: 100, height: 100) .loadingOverlay(40, done: true) } diff --git a/macos/Onit/UI/Onboarding/OnboardingAccessibility.swift b/macos/Onit/UI/Onboarding/OnboardingAccessibility.swift index abfc6f04c..dd481feda 100644 --- a/macos/Onit/UI/Onboarding/OnboardingAccessibility.swift +++ b/macos/Onit/UI/Onboarding/OnboardingAccessibility.swift @@ -59,7 +59,7 @@ extension OnboardingAccessibility { private var instructions: some View { VStack(alignment: .leading, spacing: 2) { ForEach(instructionItems, id: \.self) { instruction in - Text(instruction).styleText(size: 13, color: .gray100) + Text(instruction).styleText(size: 13, color: Color.S_1) } } .padding(.bottom, 23) @@ -70,11 +70,11 @@ extension OnboardingAccessibility { height: 40, fillContainer: false, cornerRadius: 9, - background: .blue400, - hoverBackground: .blue350 + background: Color.blue400, + hoverBackground: Color.blue350 ) { Text("Grant access") - .styleText(size: 14, weight: .regular, align: .center) + .styleText(size: 14, weight: .regular, color: Color.white, align: .center) .frame(maxWidth: .infinity) } action: { AnalyticsManager.Onboarding.grandAccessPressed() @@ -83,14 +83,14 @@ extension OnboardingAccessibility { } private func privacyBlurbText(text: String) -> some View { - Text(text).styleText(size: 12, color: .gray200) + Text(text).styleText(size: 12, color: Color.S_2) } private var privacyBlurb: some View { VStack(alignment: .center, spacing: 0) { HStack(alignment: .center, spacing: 2) { Image(.lock).addIconStyles( - foregroundColor: .gray200, + foregroundColor: Color.S_2, iconSize: 13 ) privacyBlurbText(text: "You are always in control of the information") @@ -126,11 +126,11 @@ extension OnboardingAccessibility { var skipText = AttributedString("") var orText = AttributedString("Or, ") - orText.foregroundColor = .gray100 + orText.foregroundColor = Color.S_1 skipText.append(orText) var mainText = AttributedString("use without accessibility →") - mainText.foregroundColor = Color.primary + mainText.foregroundColor = Color.S_0 skipText.append(mainText) return skipText diff --git a/macos/Onit/UI/Onboarding/OnboardingAuthButton.swift b/macos/Onit/UI/Onboarding/OnboardingAuthButton.swift index d1a1c6865..6788b43c4 100644 --- a/macos/Onit/UI/Onboarding/OnboardingAuthButton.swift +++ b/macos/Onit/UI/Onboarding/OnboardingAuthButton.swift @@ -26,7 +26,7 @@ struct OnboardingAuthButton: View { Image(icon) .frame(maxWidth: .infinity) .frame(height: 40) - .foregroundColor(Color.primary) + .foregroundColor(Color.S_0) .addBorder(cornerRadius: 9, stroke: Color.genericBorder) .addButtonEffects( background: isHovered ? Color.T_8 : Color.T_9, diff --git a/macos/Onit/UI/Onboarding/OnboardingSkipAccessibility.swift b/macos/Onit/UI/Onboarding/OnboardingSkipAccessibility.swift index 721ba2fd3..42080d1d6 100644 --- a/macos/Onit/UI/Onboarding/OnboardingSkipAccessibility.swift +++ b/macos/Onit/UI/Onboarding/OnboardingSkipAccessibility.swift @@ -23,7 +23,7 @@ struct OnboardingSkipAccessibility: View { header Text("Onit has been designed to work side-by-side with accessibility permission and relies on it for a lot of its features.") - .styleText(size: 13, color: .gray100) + .styleText(size: 13, color: Color.S_1) .padding(0) HStack { Spacer() @@ -44,7 +44,7 @@ struct OnboardingSkipAccessibility: View { } .frame(maxWidth: .infinity) .padding(16) - .background(.gray900) + .background(Color.elevatedBG) .addBorder() .padding(.bottom, 27) } @@ -66,7 +66,7 @@ extension OnboardingSkipAccessibility { showSkipConfirmation.wrappedValue = false } label: { Image(.smallCross).addIconStyles( - foregroundColor: isHoveringClose ? .white : .gray200 + foregroundColor: isHoveringClose ? Color.S_0 : Color.S_2 ) } .buttonStyle(PlainButtonStyle()) diff --git a/macos/Onit/UI/Onboarding/SubcriptionButton.swift b/macos/Onit/UI/Onboarding/SubcriptionButton.swift index 61d7dec45..f7b9e0354 100644 --- a/macos/Onit/UI/Onboarding/SubcriptionButton.swift +++ b/macos/Onit/UI/Onboarding/SubcriptionButton.swift @@ -33,18 +33,20 @@ struct SubscriptionButton: View { .styleText( size: 13, weight: .regular, - color: .red, + color: Color.red500, align: .center ) } HStack(alignment: .center, spacing: 6) { Image(.rocket) - .shadow(color: .white.opacity(0.7), radius: 10, x: 0, y: 0) + .renderingMode(.template) + .foregroundColor(Color.white) + .shadow(color: Color.white.opacity(0.7), radius: 10, x: 0, y: 0) Text(text) - .styleText(size: 16, weight: .semibold) - .shadow(color: .white.opacity(0.7), radius: 10, x: 0, y: 0) + .styleText(size: 16, weight: .semibold, color: Color.white) + .shadow(color: Color.white.opacity(0.7), radius: 10, x: 0, y: 0) } .frame(maxWidth: .infinity, alignment: .center) .padding(.horizontal, 10) diff --git a/macos/Onit/UI/Onboarding/TetherTutorialOverlay.swift b/macos/Onit/UI/Onboarding/TetherTutorialOverlay.swift index 306785690..a6983eb54 100644 --- a/macos/Onit/UI/Onboarding/TetherTutorialOverlay.swift +++ b/macos/Onit/UI/Onboarding/TetherTutorialOverlay.swift @@ -22,12 +22,12 @@ struct TetherTutorialOverlay: View { Text("Welcome to Onit") .styleText(size: 19, weight: .medium) Text("Click to start") - .styleText(size: 12, color: .gray200) + .styleText(size: 12, color: Color.S_2) } .padding([.top, .bottom, .leading], 20) .padding(.trailing, 40) - .background(TutorialShape().fill(.gray700)) - .overlay(TutorialShape().stroke(Color.gray500, lineWidth: 1)) + .background(TutorialShape().fill(Color.S_7)) + .overlay(TutorialShape().stroke(Color.S_5, lineWidth: 1)) .shadow(color: Color.black.opacity(0.2), radius: 10, x: 0, y: 2) .frame(width: TetherTutorialOverlay.width, height: TetherTutorialOverlay.height, alignment: .center) Spacer() diff --git a/macos/Onit/UI/Panels/OnitRegularPanel.swift b/macos/Onit/UI/Panels/OnitRegularPanel.swift index 2cc737209..4a313369a 100644 --- a/macos/Onit/UI/Panels/OnitRegularPanel.swift +++ b/macos/Onit/UI/Panels/OnitRegularPanel.swift @@ -107,7 +107,7 @@ class OnitRegularPanel: NSPanel { hostingView.layer?.cornerRadius = 14 hostingView.layer?.cornerCurve = .continuous hostingView.layer?.masksToBounds = true - hostingView.layer?.backgroundColor = .clear + hostingView.layer?.backgroundColor = CGColor.clear self.contentView = hostingView self.contentView?.setFrameOrigin(NSPoint(x: 0, y: 0)) diff --git a/macos/Onit/UI/Prompt/Dialogs/SetUpButtonStyle.swift b/macos/Onit/UI/Prompt/Dialogs/SetUpButtonStyle.swift index 618de8eb0..f5a9d400f 100644 --- a/macos/Onit/UI/Prompt/Dialogs/SetUpButtonStyle.swift +++ b/macos/Onit/UI/Prompt/Dialogs/SetUpButtonStyle.swift @@ -54,7 +54,7 @@ struct SetUpButtonStyle: ButtonStyle { private var backgroundColor: Color { switch variant { case .primary: - return .blue400 + return Color.blue400 case .default: return Color.T_8 } diff --git a/macos/Onit/UI/Prompt/Files/ContextMenuWindowButton.swift b/macos/Onit/UI/Prompt/Files/ContextMenuWindowButton.swift index 1965e1064..4dfb02bf7 100644 --- a/macos/Onit/UI/Prompt/Files/ContextMenuWindowButton.swift +++ b/macos/Onit/UI/Prompt/Files/ContextMenuWindowButton.swift @@ -40,7 +40,7 @@ struct ContextMenuWindowButton: View { var body: some View { TextButton( - background: selected ? Color.T_8 : .clear, + background: selected ? Color.T_8 : Color.clear, icon: windowIcon == nil ? .stars : nil, iconImage: windowIcon, text: windowName @@ -65,21 +65,21 @@ extension ContextMenuWindowButton { private var checkEmpty: some View { Circle() .frame(width: 14, height: 14) - .background(.T_8).opacity(0.2) + .background(Color.T_8).opacity(0.2) .addBorder( cornerRadius: 999, - stroke: .T_7 + stroke: Color.T_7 ) } private var checkFilled: some View { Image(.check) - .addIconStyles(iconSize: 8) + .addIconStyles(foregroundColor: Color.white, iconSize: 8) .frame(width: 14, height: 14) - .background(.blue400) + .background(Color.blue400) .addBorder( cornerRadius: 999, - stroke: .blue300 + stroke: Color.blue300 ) } } diff --git a/macos/Onit/UI/Prompt/Files/ContextMenuWindows.swift b/macos/Onit/UI/Prompt/Files/ContextMenuWindows.swift index 5e1327f09..ad7cd7603 100644 --- a/macos/Onit/UI/Prompt/Files/ContextMenuWindows.swift +++ b/macos/Onit/UI/Prompt/Files/ContextMenuWindows.swift @@ -134,7 +134,7 @@ extension ContextMenuWindows { let selected = currentArrowKeyIndex == allBrowserTabsButtonIndex return TextButton( - background: selected ? Color.T_8 : .clear, + background: selected ? Color.T_8 : Color.clear, icon: .compass, text: "All Browser Tabs..." ) { @@ -176,7 +176,7 @@ extension ContextMenuWindows { let selected = currentArrowKeyIndex == uploadFileButtonIndex return TextButton( - background: selected ? Color.T_8 : .clear, + background: selected ? Color.T_8 : Color.clear, icon: .file, text: "Upload File" ) { diff --git a/macos/Onit/UI/Prompt/Files/EnableAutocontextTag.swift b/macos/Onit/UI/Prompt/Files/EnableAutocontextTag.swift index 63846a457..bbbf04f3d 100644 --- a/macos/Onit/UI/Prompt/Files/EnableAutocontextTag.swift +++ b/macos/Onit/UI/Prompt/Files/EnableAutocontextTag.swift @@ -19,7 +19,7 @@ struct EnableAutocontextTag: View { .frame(width: 12, height: 12) Text("Enable AutoContext") .appFont(.medium13) - .foregroundStyle(.white) + .foregroundStyle(Color.S_0) } .padding(.vertical, 3) Button { @@ -29,6 +29,8 @@ struct EnableAutocontextTag: View { .frame(width: 16, height: 16) .overlay { Image(.smallCross) + .renderingMode(.template) + .foregroundColor(Color.S_0) } } } diff --git a/macos/Onit/UI/Prompt/Files/FileRow.swift b/macos/Onit/UI/Prompt/Files/FileRow.swift index 79bc8034d..20e9bbdb4 100644 --- a/macos/Onit/UI/Prompt/Files/FileRow.swift +++ b/macos/Onit/UI/Prompt/Files/FileRow.swift @@ -233,8 +233,8 @@ extension FileRow { if let trackedWindow = trackedWindow { ContextTag( text: WindowHelpers.getWindowName(window: trackedWindow.element), - background: .clear, - hoverBackground: .clear, + background: Color.clear, + hoverBackground: Color.clear, isLoading: true, iconView: LoaderPulse(), removeAction: { diff --git a/macos/Onit/UI/Prompt/Files/PaperclipButton.swift b/macos/Onit/UI/Prompt/Files/PaperclipButton.swift index 6e549102a..2041f0ea1 100644 --- a/macos/Onit/UI/Prompt/Files/PaperclipButton.swift +++ b/macos/Onit/UI/Prompt/Files/PaperclipButton.swift @@ -61,7 +61,7 @@ struct PaperclipButton: View { .styleText( size: 13, weight: .medium, - color: .gray200 + color: Color.S_2 ) } } diff --git a/macos/Onit/UI/Prompt/FinalContextView.swift b/macos/Onit/UI/Prompt/FinalContextView.swift index 54a9b6001..e733a9517 100644 --- a/macos/Onit/UI/Prompt/FinalContextView.swift +++ b/macos/Onit/UI/Prompt/FinalContextView.swift @@ -157,7 +157,7 @@ struct FinalContextView: View { iconSize: 16 ) Text("Final context used") - .appFont(.medium14) + .appFont(.medium13) Image(.smallChevDown) .renderingMode(.template) .rotationEffect(isExpanded ? .degrees(180) : .degrees(0)) @@ -185,7 +185,7 @@ struct FinalContextView: View { }) .background { RoundedRectangle(cornerRadius: 8) - .fill(.clear) + .fill(Color.clear) .strokeBorder(Color.genericBorder) } } diff --git a/macos/Onit/UI/Prompt/Generated/GeneratedToolbar.swift b/macos/Onit/UI/Prompt/Generated/GeneratedToolbar.swift index 43e2082ae..60df938c5 100644 --- a/macos/Onit/UI/Prompt/Generated/GeneratedToolbar.swift +++ b/macos/Onit/UI/Prompt/Generated/GeneratedToolbar.swift @@ -84,15 +84,15 @@ struct GeneratedToolbar: View { // .padding(.vertical, 5) // .background { // RoundedRectangle(cornerRadius: 7) -// .fill(.blue350) +// .fill(Color.blue350) // } // } // .padding(4) // .background { // RoundedRectangle(cornerRadius: 10) -// .fill(mode == .local ? Color.lime400 : .blue400) +// .fill(mode == .local ? Color.lime400 : Color.blue400) // } -// .foregroundStyle(.FG) +// .foregroundStyle(Color.S_0) // } // .keyboardShortcut(insertShortcut) // .buttonStyle(.plain) diff --git a/macos/Onit/UI/Prompt/GeneratedErrorView.swift b/macos/Onit/UI/Prompt/GeneratedErrorView.swift index 2f30ec977..fb2d47bed 100644 --- a/macos/Onit/UI/Prompt/GeneratedErrorView.swift +++ b/macos/Onit/UI/Prompt/GeneratedErrorView.swift @@ -16,7 +16,7 @@ struct GeneratedErrorView: View { ScrollView { Text(errorDescription) .appFont(.medium14) - .foregroundStyle(.warning) + .foregroundStyle(Color.orange500) .textSelection(.enabled) } Spacer() diff --git a/macos/Onit/UI/Prompt/GeneratingView.swift b/macos/Onit/UI/Prompt/GeneratingView.swift index b438c34ad..59ffffe13 100644 --- a/macos/Onit/UI/Prompt/GeneratingView.swift +++ b/macos/Onit/UI/Prompt/GeneratingView.swift @@ -49,9 +49,9 @@ struct GeneratingView: View { var text: some View { HStack(spacing: 4) { Text("Cancel") - .foregroundStyle(.gray200) + .foregroundStyle(Color.S_2) KeyboardShortcutView(shortcut: delete) - .foregroundStyle(.gray300) + .foregroundStyle(Color.S_3) } .appFont(.medium13) } diff --git a/macos/Onit/UI/Prompt/MicrophoneButton.swift b/macos/Onit/UI/Prompt/MicrophoneButton.swift index 9d24f9b51..356f8149f 100644 --- a/macos/Onit/UI/Prompt/MicrophoneButton.swift +++ b/macos/Onit/UI/Prompt/MicrophoneButton.swift @@ -31,13 +31,13 @@ struct MicrophoneButton: View { var body: some View { PromptCoreFooterButton( - iconColor: audioRecorder.isRecording ? .red : Color.S_2, + iconColor: audioRecorder.isRecording ? Color.red500 : Color.S_2, icon: .microphone, text: audioRecorder.isRecording ? "Stop" : "Voice", action: { handleMicrophonePress() }, - background: audioRecorder.isRecording ? Color.red.opacity(0.15) : .clear, - hoverBackground: audioRecorder.isRecording ? Color.red.opacity(0.3) : Color.T_8, - fontColor: audioRecorder.isRecording ? .red : Color.S_2 + background: audioRecorder.isRecording ? Color.red500.opacity(0.15) : Color.clear, + hoverBackground: audioRecorder.isRecording ? Color.red500.opacity(0.3) : Color.T_8, + fontColor: audioRecorder.isRecording ? Color.red500 : Color.S_2 ) .disabled(audioRecorder.isTranscribing) .help(microphoneButtonHelpText) diff --git a/macos/Onit/UI/Prompt/ModelSelectionButton.swift b/macos/Onit/UI/Prompt/ModelSelectionButton.swift index 7ac3951ab..26fb4fac5 100644 --- a/macos/Onit/UI/Prompt/ModelSelectionButton.swift +++ b/macos/Onit/UI/Prompt/ModelSelectionButton.swift @@ -23,12 +23,12 @@ struct ModelSelectionButton: View { horizontalPadding: 4, cornerRadius: 4, fontSize: 13, - fontColor: .gray200, + fontColor: Color.S_2, text: text ) { Image(.smallChevDown) .addIconStyles( - foregroundColor: open ? .white : .gray100, + foregroundColor: open ? Color.S_0 : Color.S_1, iconSize: 18 ) .addAnimation(dependency: open) diff --git a/macos/Onit/UI/Prompt/PromptCore.swift b/macos/Onit/UI/Prompt/PromptCore.swift index 471a18f74..00fe1de11 100644 --- a/macos/Onit/UI/Prompt/PromptCore.swift +++ b/macos/Onit/UI/Prompt/PromptCore.swift @@ -56,13 +56,13 @@ struct PromptCore: View { ) private var remoteBorder = GradientBorder( - colorOne: Color(hex: "#6D6AFD") ?? Color.S_5, - colorTwo: Color(hex: "#B3ADDA") ?? Color.S_5 + colorOne: Color.borderRemoteModel1, + colorTwo: Color.borderRemoteModel2 ) private var localBorder = GradientBorder( - colorOne: Color(hex: "#7ECD8C") ?? Color.S_5, - colorTwo: Color(hex: "#4AA4BF") ?? Color.S_5 + colorOne: Color.borderLocalModel1, + colorTwo: Color.borderLocalModel2 ) private var text: String { @@ -181,7 +181,7 @@ extension PromptCore { .styleText( size: 13, weight: .regular, - color: .red + color: Color.red500 ) } diff --git a/macos/Onit/UI/Prompt/PromptCoreFooterButton.swift b/macos/Onit/UI/Prompt/PromptCoreFooterButton.swift index ff86a655c..a57cefcc8 100644 --- a/macos/Onit/UI/Prompt/PromptCoreFooterButton.swift +++ b/macos/Onit/UI/Prompt/PromptCoreFooterButton.swift @@ -25,7 +25,7 @@ struct PromptCoreFooterButton: View { disabled: Bool = false, action: @escaping () -> Void, - background: Color = .clear, + background: Color = Color.clear, hoverBackground: Color = Color.T_8, fontColor: Color = Color.S_2 ) { diff --git a/macos/Onit/UI/Prompt/Selection/ModelSelectionView.swift b/macos/Onit/UI/Prompt/Selection/ModelSelectionView.swift index 6eba41d44..794a92481 100644 --- a/macos/Onit/UI/Prompt/Selection/ModelSelectionView.swift +++ b/macos/Onit/UI/Prompt/Selection/ModelSelectionView.swift @@ -122,7 +122,7 @@ struct ModelSelectionView: View { var local: some View { MenuSection( titleIcon: availableLocalModels.isEmpty ? .warningSettings : nil, - titleIconColor: .orange, + titleIconColor: Color.orange500, title: "Local", showTopBorder: true, maxScrollHeight: setModelListHeight( @@ -175,7 +175,7 @@ struct ModelSelectionView: View { // HStack { // Text("Custom models") // .appFont(.medium13) -// .foregroundStyle(.white.opacity(0.6)) +// .foregroundStyle(Color.S_0.opacity(0.6)) // Spacer() // if appState.remoteNeedsSetup // || (!appState.remoteNeedsSetup && availableRemoteModels.isEmpty) diff --git a/macos/Onit/UI/Prompt/SystemPrompt/SystemPromptSelectionRowView.swift b/macos/Onit/UI/Prompt/SystemPrompt/SystemPromptSelectionRowView.swift index 1a633d191..d8f466823 100644 --- a/macos/Onit/UI/Prompt/SystemPrompt/SystemPromptSelectionRowView.swift +++ b/macos/Onit/UI/Prompt/SystemPrompt/SystemPromptSelectionRowView.swift @@ -24,7 +24,7 @@ struct SystemPromptSelectionRowView: View { if let shortcut = KeyboardShortcuts.Name(prompt.id).shortcut?.native { KeyboardShortcutView(shortcut: shortcut, characterWidth: 12, spacing: 3) .font(.system(size: 13, weight: .light)) - .foregroundStyle(.gray200) + .foregroundStyle(Color.S_2) } } action: { selectPrompt() diff --git a/macos/Onit/UI/Prompt/WebSearchButton.swift b/macos/Onit/UI/Prompt/WebSearchButton.swift index 306a0c5cc..111e41822 100644 --- a/macos/Onit/UI/Prompt/WebSearchButton.swift +++ b/macos/Onit/UI/Prompt/WebSearchButton.swift @@ -11,7 +11,7 @@ struct WebSearchButton: View { iconSize: 17, isActive: webSearchEnabled, activeColor: Color.S_0, - inactiveColor: webSearchEnabled ? .blue400 : .gray200 + inactiveColor: webSearchEnabled ? Color.blue400 : Color.S_2 ) { toggleWebSearch() } diff --git a/macos/Onit/UI/QuickEdit/QuickEditHintMenuView.swift b/macos/Onit/UI/QuickEdit/QuickEditHintMenuView.swift index 324a6bb33..35f9928f4 100644 --- a/macos/Onit/UI/QuickEdit/QuickEditHintMenuView.swift +++ b/macos/Onit/UI/QuickEdit/QuickEditHintMenuView.swift @@ -22,7 +22,7 @@ struct QuickEditHintMenuView: View { HStack { Text("Onit Quick Edit") .font(.system(size: 13)) - .foregroundColor(.gray100) + .foregroundColor(Color.S_1) Spacer() } .padding(.horizontal, 16) @@ -48,8 +48,8 @@ struct QuickEditHintMenuView: View { } .background( RoundedRectangle(cornerRadius: 12) - .fill(.gray900) - .stroke(.gray500, lineWidth: 1) + .fill(Color.S_9) + .stroke(Color.S_5, lineWidth: 1) ) .frame(width: 240, height: 120) } @@ -71,11 +71,11 @@ struct QuickEditHintMenuView: View { .resizable() .aspectRatio(contentMode: .fit) .frame(width: 18, height: 18) - .foregroundColor(.white) + .foregroundColor(Color.S_0) Text(title) .font(.system(size: 14)) - .foregroundColor(.white) + .foregroundColor(Color.S_0) .multilineTextAlignment(.leading) Spacer() diff --git a/macos/Onit/UI/QuickEdit/QuickEditResponseView.swift b/macos/Onit/UI/QuickEdit/QuickEditResponseView.swift index aaa1e870f..87259833c 100644 --- a/macos/Onit/UI/QuickEdit/QuickEditResponseView.swift +++ b/macos/Onit/UI/QuickEdit/QuickEditResponseView.swift @@ -324,5 +324,5 @@ extension QuickEditResponseView { #Preview { QuickEditResponseView(prompt: Prompt.sample, isEditableElement: true) - .background(.black) + .background(Color.black) } diff --git a/macos/Onit/UI/QuickEdit/QuickEditView.swift b/macos/Onit/UI/QuickEdit/QuickEditView.swift index 0bf1ff384..ad7796502 100644 --- a/macos/Onit/UI/QuickEdit/QuickEditView.swift +++ b/macos/Onit/UI/QuickEdit/QuickEditView.swift @@ -107,8 +107,7 @@ struct QuickEditView: View { isEditableElement: quickEditManager.isEditableElement ) - Color.genericBorder - .frame(height: 1) + DividerHorizontal() } } diff --git a/macos/Onit/UI/Settings/AccessibilityTab.swift b/macos/Onit/UI/Settings/AccessibilityTab.swift index 956e791e2..adbd02a12 100644 --- a/macos/Onit/UI/Settings/AccessibilityTab.swift +++ b/macos/Onit/UI/Settings/AccessibilityTab.swift @@ -44,7 +44,7 @@ struct AccessibilityTab: View { } .padding(.vertical, 6) } - .background(Color(.blue)) + .background(Color.blue) .clipShape(RoundedRectangle(cornerRadius: 6)) } } diff --git a/macos/Onit/UI/Settings/DatabaseSettingsView.swift b/macos/Onit/UI/Settings/DatabaseSettingsView.swift index 74cecde65..95cf0da15 100644 --- a/macos/Onit/UI/Settings/DatabaseSettingsView.swift +++ b/macos/Onit/UI/Settings/DatabaseSettingsView.swift @@ -69,7 +69,7 @@ struct DatabaseSettingsView: View { HStack { Circle() - .fill(info.secureExists ? Color.green : Color.orange) + .fill(info.secureExists ? Color.green : Color.orange500) .frame(width: 8, height: 8) Text(info.secureExists ? "Database exists" : "Database not found") .font(.caption) diff --git a/macos/Onit/UI/Settings/DebugModeTab.swift b/macos/Onit/UI/Settings/DebugModeTab.swift index 634cadc65..92370072c 100644 --- a/macos/Onit/UI/Settings/DebugModeTab.swift +++ b/macos/Onit/UI/Settings/DebugModeTab.swift @@ -83,7 +83,7 @@ struct DebugModeTab: View { HStack { Image(systemName: "magnifyingglass") - .foregroundColor(.secondary) + .foregroundColor(Color.secondary) .font(.system(size: 12)) TextField("Search by app name...", text: $searchText) @@ -301,11 +301,11 @@ struct FailingAppRow: View { private var failureColor: Color { if appSummary.failurePercentage < 30 { - return .green + return Color.green } else if appSummary.failurePercentage <= 50 { - return .yellow + return Color.yellow } else { - return .red + return Color.red500 } } @@ -371,19 +371,19 @@ struct OCRComparisonResultRow: View { if result.appTitle != result.appName { Text(result.appTitle.count > 50 ? result.appTitle.prefix(50) + "..." : result.appTitle) .font(.system(size: 11)) - .foregroundColor(.secondary) + .foregroundColor(Color.secondary) .lineLimit(1) } Text("\(result.matchPercentage)% match") .font(.system(size: 11)) - .foregroundColor(result.matchPercentage < 70 ? .red : .secondary) + .foregroundColor(result.matchPercentage < 70 ? Color.red500 : Color.secondary) } Spacer() Text(DateFormatter.shortDateTime.string(from: result.timestamp)) .font(.system(size: 11)) - .foregroundColor(.secondary) + .foregroundColor(Color.secondary) Button(isExpanded ? "Collapse" : "Details") { withAnimation(.easeInOut(duration: 0.2)) { @@ -392,13 +392,13 @@ struct OCRComparisonResultRow: View { } .buttonStyle(.plain) .font(.system(size: 11)) - .foregroundColor(.blue) + .foregroundColor(Color.blue) Button(role: .destructive) { debugManager.removeOCRComparisonResult(result) } label: { Image(systemName: "trash") - .foregroundColor(.red.opacity(0.8)) + .foregroundColor(Color.red500.opacity(0.8)) .font(.system(size: 11)) } .buttonStyle(.plain) @@ -454,14 +454,14 @@ struct OCRComparisonResultRow: View { if !missingText.isEmpty { Text("Text Missing from Accessibility:") .font(.system(size: 11, weight: .medium)) - .foregroundColor(.red) + .foregroundColor(Color.red500) ScrollView { Text(missingText) .font(.system(size: 10, design: .monospaced)) .frame(maxWidth: .infinity, alignment: .leading) } .padding(8) - .background(Color.red.opacity(0.1)) + .background(Color.red500.opacity(0.1)) .cornerRadius(4) .frame(maxHeight: 100) } @@ -475,7 +475,7 @@ struct OCRComparisonResultRow: View { } .buttonStyle(.plain) .font(.system(size: 11)) - .foregroundColor(.blue) + .foregroundColor(Color.blue) Button("Export OCR Text →") { let ocrText = result.ocrObservations.map(\.text).joined(separator: "\n") @@ -483,14 +483,14 @@ struct OCRComparisonResultRow: View { } .buttonStyle(.plain) .font(.system(size: 11)) - .foregroundColor(.blue) + .foregroundColor(Color.blue) Button("Export Comparison →") { exportComparison() } .buttonStyle(.plain) .font(.system(size: 11)) - .foregroundColor(.blue) + .foregroundColor(Color.blue) Button("Save Screenshot →") { if let screenshot = result.screenshot { @@ -499,7 +499,7 @@ struct OCRComparisonResultRow: View { } .buttonStyle(.plain) .font(.system(size: 11)) - .foregroundColor(.blue) + .foregroundColor(Color.blue) Button("Save OCR Debug Screenshot →") { if let screenshot = result.debugScreenshot { @@ -508,7 +508,7 @@ struct OCRComparisonResultRow: View { } .buttonStyle(.plain) .font(.system(size: 11)) - .foregroundColor(.blue) + .foregroundColor(Color.blue) Button("Save AX Debug Screenshot →") { if let screenshot = result.debugAccessibilityScreenshot { @@ -517,7 +517,7 @@ struct OCRComparisonResultRow: View { } .buttonStyle(.plain) .font(.system(size: 11)) - .foregroundColor(.blue) + .foregroundColor(Color.blue) } Spacer() } @@ -636,11 +636,11 @@ struct ImageViewerSheet: View { if result.appTitle != result.appName { Text(result.appTitle) .font(.subheadline) - .foregroundColor(.secondary) + .foregroundColor(Color.secondary) } Text("\(result.matchPercentage)% accessibility match") .font(.subheadline) - .foregroundColor(result.matchPercentage < 70 ? .red : .green) + .foregroundColor(result.matchPercentage < 70 ? Color.red500 : Color.green) } Spacer() diff --git a/macos/Onit/UI/Settings/GeneralTab.swift b/macos/Onit/UI/Settings/GeneralTab.swift index 943140800..8fcb232e8 100644 --- a/macos/Onit/UI/Settings/GeneralTab.swift +++ b/macos/Onit/UI/Settings/GeneralTab.swift @@ -139,7 +139,7 @@ struct GeneralTab: View { .font(.system(size: 11)) Text("Fixed position") .font(.system(size: 9)) - .foregroundStyle(.secondary) + .foregroundStyle(Color.secondary) } .frame(maxWidth: .infinity) .padding(.vertical, 8) @@ -164,7 +164,7 @@ struct GeneralTab: View { .font(.system(size: 11)) Text("Attaches to apps") .font(.system(size: 9)) - .foregroundStyle(.secondary) + .foregroundStyle(Color.secondary) } .frame(maxWidth: .infinity) .padding(.vertical, 8) diff --git a/macos/Onit/UI/Settings/GeneralTabAccountAlert.swift b/macos/Onit/UI/Settings/GeneralTabAccountAlert.swift index 62f8ce7c6..53810e719 100644 --- a/macos/Onit/UI/Settings/GeneralTabAccountAlert.swift +++ b/macos/Onit/UI/Settings/GeneralTabAccountAlert.swift @@ -32,8 +32,8 @@ struct GeneralTabAccountAlert: View { .padding(.horizontal, 7) .background(Color.T_9) .cornerRadius(5) - .shadow(color: .black.opacity(0.05), radius: 0, x: 0, y: 0) - .shadow(color: .black.opacity(0.3), radius: 1.25, x: 0, y: 0.5) + .shadow(color: Color.black.opacity(0.05), radius: 0, x: 0, y: 0) + .shadow(color: Color.black.opacity(0.3), radius: 1.25, x: 0, y: 0.5) HStack(spacing: 8) { cancelButton diff --git a/macos/Onit/UI/Settings/Models/CustomProvider/CustomProviderRow.swift b/macos/Onit/UI/Settings/Models/CustomProvider/CustomProviderRow.swift index e42045b51..715c50d54 100644 --- a/macos/Onit/UI/Settings/Models/CustomProvider/CustomProviderRow.swift +++ b/macos/Onit/UI/Settings/Models/CustomProvider/CustomProviderRow.swift @@ -55,7 +55,7 @@ struct CustomProviderRow: View { showAlert = true }) { Image(systemName: "trash") - .foregroundColor(.red) + .foregroundColor(Color.red500) } .alert(isPresented: $showAlert) { Alert( @@ -72,7 +72,7 @@ struct CustomProviderRow: View { tokenField if let message = message { Text(message) - .foregroundColor(isErrorMessage ? .red : .gray200) + .foregroundColor(isErrorMessage ? Color.red500 : Color.S_2) } if provider.isEnabled { @@ -108,7 +108,7 @@ struct CustomProviderRow: View { .textFieldStyle(.roundedBorder) .frame(height: 22) .font(.system(size: 13, weight: .regular)) - .foregroundColor(.primary) // Ensure placeholder text is not dimmed + .foregroundColor(Color.S_0) // Ensure placeholder text is not dimmed Button { loading = true @@ -143,7 +143,7 @@ struct CustomProviderRow: View { } } .disabled(loading) - .foregroundStyle(.white) + .foregroundStyle(Color.S_0) .buttonStyle(.borderedProminent) .frame(height: 22) .fontWeight(.regular) diff --git a/macos/Onit/UI/Settings/Models/LocalModelsSection.swift b/macos/Onit/UI/Settings/Models/LocalModelsSection.swift index fc7280b4a..8aeb5aab8 100644 --- a/macos/Onit/UI/Settings/Models/LocalModelsSection.swift +++ b/macos/Onit/UI/Settings/Models/LocalModelsSection.swift @@ -84,7 +84,7 @@ struct LocalModelsSection: View { HStack(alignment: .center) { Text("Endpoint URL:") - .foregroundStyle(.primary.opacity(0.65)) + .foregroundStyle(Color.S_0.opacity(0.65)) .font(.system(size: 12)) .fontWeight(.regular) TextField("", text: $localEndpointString) @@ -369,7 +369,7 @@ struct LocalModelsSection: View { to use Onit with local models. Models running locally on Ollama will be available here. """ )) - .foregroundStyle(.primary.opacity(0.65)) + .foregroundStyle(Color.S_0.opacity(0.65)) .font(.system(size: 12)) .fontWeight(.regular) } diff --git a/macos/Onit/UI/Settings/Models/StreamingToggle.swift b/macos/Onit/UI/Settings/Models/StreamingToggle.swift index 082332235..bc35d676c 100644 --- a/macos/Onit/UI/Settings/Models/StreamingToggle.swift +++ b/macos/Onit/UI/Settings/Models/StreamingToggle.swift @@ -17,7 +17,7 @@ struct StreamingToggle: View { Text("Stream responses") .font(.system(size: 12)) .fontWeight(.regular) - .foregroundStyle(.primary.opacity(0.65)) + .foregroundStyle(Color.S_0.opacity(0.65)) } Button(action: { diff --git a/macos/Onit/UI/Settings/QuickEdit/HighlightedTextBoundTrainingDataReviewView.swift b/macos/Onit/UI/Settings/QuickEdit/HighlightedTextBoundTrainingDataReviewView.swift index 8de44b530..9e98deb4d 100644 --- a/macos/Onit/UI/Settings/QuickEdit/HighlightedTextBoundTrainingDataReviewView.swift +++ b/macos/Onit/UI/Settings/QuickEdit/HighlightedTextBoundTrainingDataReviewView.swift @@ -72,14 +72,14 @@ struct HighlightedTextBoundTrainingDataReviewView: View { HStack { VStack(alignment: .leading, spacing: 4) { Label("\(trainingDataManager.samplesCount) total samples", systemImage: "photo.stack") - .foregroundColor(.secondary) + .foregroundColor(Color.secondary) HStack(spacing: 16) { Label("\(validatedCount) validated", systemImage: "checkmark.circle.fill") - .foregroundColor(.green) + .foregroundColor(Color.green) Label("\(unvalidatedCount) to review", systemImage: "circle") - .foregroundColor(.orange) + .foregroundColor(Color.orange500) } .font(.caption) } @@ -92,14 +92,14 @@ struct HighlightedTextBoundTrainingDataReviewView: View { .scaleEffect(0.7) Text("Capturing...") .font(.caption) - .foregroundColor(.secondary) + .foregroundColor(Color.secondary) } } } Text("Review and edit bounding boxes for training data. Only unvalidated samples are shown. Click on an image to edit its bounding box.") .font(.caption) - .foregroundColor(.secondary) + .foregroundColor(Color.secondary) } } @@ -251,10 +251,10 @@ struct SampleRowView: View { VStack { Image(systemName: "photo") .font(.system(size: 32)) - .foregroundColor(.secondary) + .foregroundColor(Color.secondary) Text("Image not available") .font(.caption) - .foregroundColor(.secondary) + .foregroundColor(Color.secondary) } ) } @@ -270,22 +270,22 @@ struct SampleRowView: View { HStack { Text(sample.appName) .font(.headline) - .foregroundColor(.primary) + .foregroundColor(Color.S_0) Spacer() Text(DateFormatters.mediumWithTime.string(from: sample.createdAt)) .font(.caption) - .foregroundColor(.secondary) + .foregroundColor(Color.secondary) } Text("Highlighted text:") .font(.caption) - .foregroundColor(.secondary) + .foregroundColor(Color.secondary) Text(sample.selectedText) .font(.body) - .foregroundColor(.primary) + .foregroundColor(Color.S_0) .padding(8) .background(Color(NSColor.textBackgroundColor)) .cornerRadius(6) diff --git a/macos/Onit/UI/Settings/QuickEdit/HighlightedTextBoundTrainingSampleDetailView.swift b/macos/Onit/UI/Settings/QuickEdit/HighlightedTextBoundTrainingSampleDetailView.swift index 519dce832..9584ec1e2 100644 --- a/macos/Onit/UI/Settings/QuickEdit/HighlightedTextBoundTrainingSampleDetailView.swift +++ b/macos/Onit/UI/Settings/QuickEdit/HighlightedTextBoundTrainingSampleDetailView.swift @@ -66,7 +66,7 @@ struct HighlightedTextBoundTrainingSampleDetailView: View { }) { Image(systemName: "sidebar.right") .font(.system(size: 18)) - .foregroundColor(.white) + .foregroundColor(Color.S_0) .frame(width: 40, height: 40) .background(Color.black.opacity(0.7)) .cornerRadius(8) @@ -81,7 +81,7 @@ struct HighlightedTextBoundTrainingSampleDetailView: View { }) { Image(systemName: hasChanges ? "checkmark.circle.fill" : "checkmark.circle") .font(.system(size: 16)) - .foregroundColor(.white) + .foregroundColor(Color.S_0) .frame(width: 40, height: 40) .background(hasChanges ? Color.green.opacity(0.8) : Color.gray.opacity(0.7)) .cornerRadius(8) @@ -94,9 +94,9 @@ struct HighlightedTextBoundTrainingSampleDetailView: View { }) { Image(systemName: "trash") .font(.system(size: 16)) - .foregroundColor(.white) + .foregroundColor(Color.S_0) .frame(width: 40, height: 40) - .background(Color.red.opacity(0.8)) + .background(Color.red500.opacity(0.8)) .cornerRadius(8) } .buttonStyle(.plain) @@ -106,7 +106,7 @@ struct HighlightedTextBoundTrainingSampleDetailView: View { }) { Image(systemName: "xmark") .font(.system(size: 16)) - .foregroundColor(.white) + .foregroundColor(Color.S_0) .frame(width: 40, height: 40) .background(Color.black.opacity(0.7)) .cornerRadius(8) @@ -146,10 +146,10 @@ struct HighlightedTextBoundTrainingSampleDetailView: View { VStack { Image(systemName: "photo") .font(.system(size: 48)) - .foregroundColor(.white) + .foregroundColor(Color.S_0) Text("Image not available") .font(.title) - .foregroundColor(.white) + .foregroundColor(Color.S_0) } ) } @@ -161,7 +161,7 @@ struct HighlightedTextBoundTrainingSampleDetailView: View { HStack { Text("Sample Details") .font(.headline) - .foregroundColor(.primary) + .foregroundColor(Color.S_0) Spacer() @@ -172,7 +172,7 @@ struct HighlightedTextBoundTrainingSampleDetailView: View { }) { Image(systemName: "sidebar.right") .font(.system(size: 16)) - .foregroundColor(.secondary) + .foregroundColor(Color.secondary) } .buttonStyle(.plain) } @@ -184,7 +184,7 @@ struct HighlightedTextBoundTrainingSampleDetailView: View { VStack(alignment: .leading, spacing: 8) { Text("Selected Text") .font(.headline) - .foregroundColor(.primary) + .foregroundColor(Color.S_0) ScrollView { Text(sample.selectedText) @@ -204,7 +204,7 @@ struct HighlightedTextBoundTrainingSampleDetailView: View { VStack(alignment: .leading, spacing: 8) { Text("Application") .font(.headline) - .foregroundColor(.primary) + .foregroundColor(Color.S_0) Text(sample.appName) .font(.body) @@ -217,7 +217,7 @@ struct HighlightedTextBoundTrainingSampleDetailView: View { VStack(alignment: .leading, spacing: 8) { Text("Created") .font(.headline) - .foregroundColor(.primary) + .foregroundColor(Color.S_0) Text(DateFormatters.mediumWithTime.string(from: sample.createdAt)) .font(.body) @@ -230,13 +230,13 @@ struct HighlightedTextBoundTrainingSampleDetailView: View { HStack { Text("Status:") .font(.headline) - .foregroundColor(.primary) + .foregroundColor(Color.S_0) HStack(spacing: 4) { Image(systemName: sample.isValidated ? "checkmark.circle.fill" : "circle") - .foregroundColor(sample.isValidated ? .green : .secondary) + .foregroundColor(sample.isValidated ? Color.green : Color.secondary) Text(sample.isValidated ? "Validated" : "Not validated") - .foregroundColor(sample.isValidated ? .green : .secondary) + .foregroundColor(sample.isValidated ? Color.green : Color.secondary) } } } @@ -250,7 +250,7 @@ struct HighlightedTextBoundTrainingSampleDetailView: View { showDeleteAlert = true } .buttonStyle(.bordered) - .foregroundColor(.red) + .foregroundColor(Color.red500) Spacer() @@ -321,8 +321,8 @@ struct EditableBoundingBoxOverlay: View { ZStack(alignment: .topLeading) { Rectangle() - .stroke(Color.red, lineWidth: 1) - .background(Color.red.opacity(0.1)) + .stroke(Color.red500, lineWidth: 1) + .background(Color.red500.opacity(0.1)) .frame(width: displayWidth, height: displayHeight) .offset( x: displayX + (isDragging ? dragOffset.width : 0), @@ -371,7 +371,7 @@ struct EditableBoundingBoxOverlay: View { let (handleOffsetX, handleOffsetY) = handleOffset(for: anchor, displayX: displayX, displayY: displayY, displayWidth: displayWidth, displayHeight: displayHeight) return Circle() - .fill(Color.red.opacity(0.01)) + .fill(Color.red500.opacity(0.01)) .frame(width: handleSize, height: handleSize) .offset( x: handleOffsetX - handleSize/2 + (isDragging ? dragOffset.width : 0), diff --git a/macos/Onit/UI/Settings/SystemPrompt/SettingsSystemPromptDetail.swift b/macos/Onit/UI/Settings/SystemPrompt/SettingsSystemPromptDetail.swift index 1bdbd0bc1..a44063b0a 100644 --- a/macos/Onit/UI/Settings/SystemPrompt/SettingsSystemPromptDetail.swift +++ b/macos/Onit/UI/Settings/SystemPrompt/SettingsSystemPromptDetail.swift @@ -52,7 +52,7 @@ struct SettingsSystemPromptDetail: View { .padding(.vertical, 4) .background { RoundedRectangle(cornerRadius: 5) - .stroke(.gray300) + .stroke(Color.S_3) } } } @@ -71,7 +71,7 @@ struct SettingsSystemPromptDetail: View { .padding(.vertical, 4) .background { RoundedRectangle(cornerRadius: 5) - .stroke(.gray300) + .stroke(Color.S_3) } } } diff --git a/macos/Onit/UI/Settings/SystemPrompt/SettingsSystemPromptTable.swift b/macos/Onit/UI/Settings/SystemPrompt/SettingsSystemPromptTable.swift index 01c10438d..f13b056b8 100644 --- a/macos/Onit/UI/Settings/SystemPrompt/SettingsSystemPromptTable.swift +++ b/macos/Onit/UI/Settings/SystemPrompt/SettingsSystemPromptTable.swift @@ -40,13 +40,13 @@ struct SettingsSystemPromptTable: View { KeyboardShortcutView(shortcut: shortcut, characterWidth: 12, spacing: 3) .font(.system(size: 13, weight: .light)) } else { - Text("record").foregroundColor(.gray) + Text("record").foregroundColor(Color.gray) } } TableColumn("Applications") { prompt in switch prompt.applications.count { case 0: - Text("Add default").foregroundColor(.gray) + Text("Add default").foregroundColor(Color.gray) case 1: Text(prompt.applications.first?.deletingPathExtension().lastPathComponent ?? "") default: diff --git a/macos/Onit/UI/Settings/SystemPromptTab.swift b/macos/Onit/UI/Settings/SystemPromptTab.swift index 7576361be..1c38c5aac 100644 --- a/macos/Onit/UI/Settings/SystemPromptTab.swift +++ b/macos/Onit/UI/Settings/SystemPromptTab.swift @@ -49,7 +49,7 @@ struct SystemPromptTab: View { } label: { Text("Add new") } - .foregroundStyle(.white) + .foregroundStyle(Color.S_0) .buttonStyle(.borderedProminent) .frame(height: 22) .fontWeight(.regular) diff --git a/macos/Onit/UI/Windows/ContextPickerItemView.swift b/macos/Onit/UI/Windows/ContextPickerItemView.swift index dbedeabc2..441190c2b 100644 --- a/macos/Onit/UI/Windows/ContextPickerItemView.swift +++ b/macos/Onit/UI/Windows/ContextPickerItemView.swift @@ -64,19 +64,17 @@ struct ContextPickerItemView: View { VStack(alignment: .leading, spacing: 4) { Text(title) .frame(maxWidth: .infinity, alignment: .leading) - .styleText(size: 14, weight: .regular, color: .white) + .styleText(size: 14, weight: .regular) Text(subtitle) .frame(maxWidth: .infinity, alignment: .leading) - .styleText(size: 13, weight: .regular, color: .gray200) + .styleText(size: 13, weight: .regular, color: Color.S_2) .truncateText() } } .frame(width: 210) .padding(6) .addButtonEffects( - background: .gray600, - hoverBackground: .gray500, cornerRadius: 8, isHovered: $isHovered, isPressed: $isPressed, diff --git a/macos/Onit/UI/Windows/ContextPickerView.swift b/macos/Onit/UI/Windows/ContextPickerView.swift index 0ce927e69..7b94bf6e2 100644 --- a/macos/Onit/UI/Windows/ContextPickerView.swift +++ b/macos/Onit/UI/Windows/ContextPickerView.swift @@ -47,7 +47,7 @@ struct ContextPickerView: View { .allowsHitTesting(!autoContextDisabled) } .padding(6) - .background(Color(.gray600)) + .background(Color.S_6) .cornerRadius(12) } } From d1335653a3c05dd71a28b4668e638d0c0d993c04 Mon Sep 17 00:00:00 2001 From: lk340 Date: Thu, 31 Jul 2025 17:40:48 -0400 Subject: [PATCH 3/6] Update colors post-rebase with main --- macos/Onit/UI/Prompt/Files/ContextImage.swift | 2 +- macos/Onit/UI/Settings/GeneralTab.swift | 2 +- .../UI/Settings/SystemPrompt/NewSystemPromptView.swift | 10 +++++----- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/macos/Onit/UI/Prompt/Files/ContextImage.swift b/macos/Onit/UI/Prompt/Files/ContextImage.swift index ebf63a42f..b2573154a 100644 --- a/macos/Onit/UI/Prompt/Files/ContextImage.swift +++ b/macos/Onit/UI/Prompt/Files/ContextImage.swift @@ -53,7 +53,7 @@ struct ContextImage: View { .clipShape(imageRect) .overlay { imageRect - .strokeBorder(.gray500) + .strokeBorder(Color.S_5) } } diff --git a/macos/Onit/UI/Settings/GeneralTab.swift b/macos/Onit/UI/Settings/GeneralTab.swift index 8fcb232e8..caf6ed9c7 100644 --- a/macos/Onit/UI/Settings/GeneralTab.swift +++ b/macos/Onit/UI/Settings/GeneralTab.swift @@ -539,7 +539,7 @@ struct GeneralTab: View { .padding(.vertical, 6) .padding(.horizontal, 10) .foregroundColor(Color.S_0) - .background(Color.red.opacity(0.1)) + .background(Color.red500.opacity(0.1)) .clipShape(RoundedRectangle(cornerRadius: 6)) } } diff --git a/macos/Onit/UI/Settings/SystemPrompt/NewSystemPromptView.swift b/macos/Onit/UI/Settings/SystemPrompt/NewSystemPromptView.swift index b17b891d6..5d8529d49 100644 --- a/macos/Onit/UI/Settings/SystemPrompt/NewSystemPromptView.swift +++ b/macos/Onit/UI/Settings/SystemPrompt/NewSystemPromptView.swift @@ -71,24 +71,24 @@ struct NewSystemPromptView: View { VStack(alignment: .leading, spacing: 12) { Text("Select Applications") .font(.headline) - .foregroundStyle(.gray100) + .foregroundStyle(Color.S_1) // Search field TextField("Search applications...", text: $appSearchText) .textFieldStyle(.plain) .padding(8) - .background(.gray700) + .background(Color.S_7) .cornerRadius(5) .overlay( RoundedRectangle(cornerRadius: 5) - .stroke(.gray500) + .stroke(Color.S_5) ) // Apps list VStack { if filteredApps.isEmpty { Text("No applications found") - .foregroundStyle(.gray200) + .foregroundStyle(Color.S_2) .padding(.vertical, 8) } else { ScrollView { @@ -123,7 +123,7 @@ struct NewSystemPromptView: View { } .padding(16) .frame(width: 300) - .background(.gray800) + .background(Color.S_8) } // MARK: - Views From 633811cf0ffcbccb799aeecba7498ef23aa5c9b3 Mon Sep 17 00:00:00 2001 From: Loyd Kim <40570343+lk340@users.noreply.github.com> Date: Thu, 14 Aug 2025 10:35:26 -0400 Subject: [PATCH 4/6] Add fix for theme-based text colors on LLMStreamViews. (#372) --- macos/Onit/UI/Prompt/Generated/GeneratedContentView.swift | 8 ++++++-- macos/Onit/UI/QuickEdit/QuickEditResponseView.swift | 8 ++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/macos/Onit/UI/Prompt/Generated/GeneratedContentView.swift b/macos/Onit/UI/Prompt/Generated/GeneratedContentView.swift index ac4ea0650..3d7116e1a 100644 --- a/macos/Onit/UI/Prompt/Generated/GeneratedContentView.swift +++ b/macos/Onit/UI/Prompt/Generated/GeneratedContentView.swift @@ -13,6 +13,7 @@ import SwiftUI struct GeneratedContentView: View { @Environment(\.windowState) private var state @Environment(\.openURL) var openURL + @Environment(\.colorScheme) var colorScheme @Default(.fontSize) var fontSize @Default(.lineHeight) var lineHeight @@ -27,7 +28,10 @@ struct GeneratedContentView: View { var configuration: LLMStreamConfiguration { let font = FontConfiguration(size: fontSize, lineHeight: lineHeight) - let color = ColorConfiguration(textColor: .S_0, + + let textColor = colorScheme == .dark ? Color.white : Color.black + + let color = ColorConfiguration(textColor: textColor, citationBackgroundColor: Color.S_6, citationHoverBackgroundColor: Color.S_4, citationTextColor: Color.S_1) @@ -47,7 +51,7 @@ struct GeneratedContentView: View { configuration: configuration, onUrlClicked: onUrlClicked, onCodeAction: codeAction) - .id("\(fontSize)-\(lineHeight)") // Force recreation when font settings change + .id("\(fontSize)-\(lineHeight)-\(colorScheme.hashValue)") // Force recreation when font settings change .padding(.horizontal, 12) if let response = prompt.currentResponse, response.hasToolCall { diff --git a/macos/Onit/UI/QuickEdit/QuickEditResponseView.swift b/macos/Onit/UI/QuickEdit/QuickEditResponseView.swift index 87259833c..65ff20f27 100644 --- a/macos/Onit/UI/QuickEdit/QuickEditResponseView.swift +++ b/macos/Onit/UI/QuickEdit/QuickEditResponseView.swift @@ -20,6 +20,7 @@ struct ViewOffsetKey: @preconcurrency PreferenceKey { struct QuickEditResponseView: View { @Environment(\.windowState) private var state @Environment(\.openURL) var openURL + @Environment(\.colorScheme) var colorScheme @State private var previousViewOffset: CGFloat = 0 @State private var hasUserManuallyScrolled: Bool = false @@ -54,7 +55,10 @@ struct QuickEditResponseView: View { private var configuration: LLMStreamConfiguration { let font = FontConfiguration(size: fontSize, lineHeight: lineHeight) - let color = ColorConfiguration(textColor: .S_0, + + let textColor = colorScheme == .dark ? Color.white : Color.black + + let color = ColorConfiguration(textColor: textColor, citationBackgroundColor: Color.S_6, citationHoverBackgroundColor: Color.S_4, citationTextColor: Color.S_1) @@ -168,7 +172,7 @@ extension QuickEditResponseView { configuration: configuration, onUrlClicked: onUrlClicked, onCodeAction: codeAction) - .id("\(fontSize)-\(lineHeight)") // Force recreation when font settings change + .id("\(fontSize)-\(lineHeight)-\(colorScheme.hashValue)") // Force recreation when font settings change .frame(maxWidth: .infinity, alignment: .leading) .padding(.vertical, 8) .id("content") From 5ad4f37b456aa28013a56837c81e36e1a25ca06b Mon Sep 17 00:00:00 2001 From: lk340 Date: Thu, 14 Aug 2025 12:48:21 -0400 Subject: [PATCH 5/6] Fix `TetheredButton` hover colors. --- macos/Onit/UI/Content/TetheredButton.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/macos/Onit/UI/Content/TetheredButton.swift b/macos/Onit/UI/Content/TetheredButton.swift index 45e86e989..225b99a0d 100644 --- a/macos/Onit/UI/Content/TetheredButton.swift +++ b/macos/Onit/UI/Content/TetheredButton.swift @@ -78,7 +78,7 @@ struct TetheredButton: View { .buttonStyle(.plain) .background { RoundedRectangle(cornerRadius: Self.width / 2) - .fill(isHovering ? Color.S_8 : Color.baseBG) + .fill(isHovering ? Color.S_6 : Color.S_9.opacity(0.7)) .animation(.easeInOut(duration: 0.15), value: isHovering) } .onHover { hovering in From bf431e387440f80a0b11043c35ee23fc7a0571fa Mon Sep 17 00:00:00 2001 From: lk340 Date: Thu, 14 Aug 2025 13:52:08 -0400 Subject: [PATCH 6/6] Fix post-rebase with `main`: * Shadow on `SimpleButton`. * Spacing and colors on `WebSearchTab`. * Disabled state in `RemoteModelSection` when verifying provider API token. * `Color` prefixes. --- .../Colors/RedBrick.colorset/Contents.json | 6 ++--- macos/Onit/UI/Components/SimpleButton.swift | 2 +- .../Prompt/Selection/RemoteModelButton.swift | 2 +- .../Onit/UI/Settings/GeneralTabAccount.swift | 2 +- .../UI/Settings/GeneralTabAccountAlert.swift | 2 +- .../Settings/Models/LocalModelsSection.swift | 2 +- .../Models/RemoteModelAddCustomModel.swift | 8 +++---- .../Models/RemoteModelRemoveModel.swift | 4 ++-- .../Settings/Models/RemoteModelSection.swift | 10 +++++---- .../SystemPrompt/NewSystemPromptView.swift | 2 +- macos/Onit/UI/Settings/WebSearchTab.swift | 22 +++++++++---------- 11 files changed, 32 insertions(+), 30 deletions(-) diff --git a/macos/Onit/Assets.xcassets/Colors/RedBrick.colorset/Contents.json b/macos/Onit/Assets.xcassets/Colors/RedBrick.colorset/Contents.json index 65780d499..ff2c2c896 100644 --- a/macos/Onit/Assets.xcassets/Colors/RedBrick.colorset/Contents.json +++ b/macos/Onit/Assets.xcassets/Colors/RedBrick.colorset/Contents.json @@ -5,9 +5,9 @@ "color-space" : "srgb", "components" : { "alpha" : "1.000", - "blue" : "0x2B", - "green" : "0x2B", - "red" : "0x44" + "blue" : "0x3A", + "green" : "0x3A", + "red" : "0x76" } }, "idiom" : "universal" diff --git a/macos/Onit/UI/Components/SimpleButton.swift b/macos/Onit/UI/Components/SimpleButton.swift index 29cc45e86..5d50534f9 100644 --- a/macos/Onit/UI/Components/SimpleButton.swift +++ b/macos/Onit/UI/Components/SimpleButton.swift @@ -72,7 +72,7 @@ struct SimpleButton: View { .opacity(disabled ? 0.5 : isPressed ? 0.7 : 1) .allowsHitTesting(allowHitTesting) .shadow(color: Color.black.opacity(0.05), radius: 0, x: 0, y: 0) - .shadow(color: Color.black.opacity(0.4), radius: 1.25, x: 0, y: 0.5) + .shadow(color: Color.black.opacity(0.2), radius: 1.25, x: 0, y: 0.5) .addAnimation(dependency: isHovered) .onHover { isHovering in isHovered = isHovering} .gesture( diff --git a/macos/Onit/UI/Prompt/Selection/RemoteModelButton.swift b/macos/Onit/UI/Prompt/Selection/RemoteModelButton.swift index f1bcdac3a..076d1e2f4 100644 --- a/macos/Onit/UI/Prompt/Selection/RemoteModelButton.swift +++ b/macos/Onit/UI/Prompt/Selection/RemoteModelButton.swift @@ -34,7 +34,7 @@ struct RemoteModelButton: View { text: remoteModel.displayName ) { if planLimitReached { - Circle().fill(.blue300).frame(width: 6, height: 6) + Circle().fill(Color.blue300).frame(width: 6, height: 6) } } action: { AnalyticsManager.ModelPicker.modelSelected(local: false, model: remoteModel.displayName) diff --git a/macos/Onit/UI/Settings/GeneralTabAccount.swift b/macos/Onit/UI/Settings/GeneralTabAccount.swift index 51667027f..cd202a13b 100644 --- a/macos/Onit/UI/Settings/GeneralTabAccount.swift +++ b/macos/Onit/UI/Settings/GeneralTabAccount.swift @@ -116,7 +116,7 @@ extension GeneralTabAccount { private var deleteAccountButton: some View { SimpleButton( text: "Delete account", - textColor: Color.red500, + textColor: Color.red, action: { AnalyticsManager.AccountEvents.deletePressed() showDeleteAccountAlert = true diff --git a/macos/Onit/UI/Settings/GeneralTabAccountAlert.swift b/macos/Onit/UI/Settings/GeneralTabAccountAlert.swift index 53810e719..3c485bdb3 100644 --- a/macos/Onit/UI/Settings/GeneralTabAccountAlert.swift +++ b/macos/Onit/UI/Settings/GeneralTabAccountAlert.swift @@ -72,7 +72,7 @@ extension GeneralTabAccountAlert { ) -> some View { VStack(alignment: .center) { Text(text) - .styleText(size: 13, weight: .regular, color: isCritical ? Color.red500 : Color.S_0) + .styleText(size: 13, weight: .regular, color: isCritical ? Color.red : Color.S_0) } .frame(height: 28) .frame(maxWidth: .infinity) diff --git a/macos/Onit/UI/Settings/Models/LocalModelsSection.swift b/macos/Onit/UI/Settings/Models/LocalModelsSection.swift index 8aeb5aab8..4d9a12893 100644 --- a/macos/Onit/UI/Settings/Models/LocalModelsSection.swift +++ b/macos/Onit/UI/Settings/Models/LocalModelsSection.swift @@ -403,7 +403,7 @@ struct LocalModelsSection: View { fetching = false } }, - background: .blue + background: Color.blue ) } } diff --git a/macos/Onit/UI/Settings/Models/RemoteModelAddCustomModel.swift b/macos/Onit/UI/Settings/Models/RemoteModelAddCustomModel.swift index 91a6b4372..63dc9ddf0 100644 --- a/macos/Onit/UI/Settings/Models/RemoteModelAddCustomModel.swift +++ b/macos/Onit/UI/Settings/Models/RemoteModelAddCustomModel.swift @@ -137,7 +137,7 @@ struct RemoteModelAddCustomModel: View { await verifyAndAdd() } }, - background: .blue + background: Color.blue ) .disabled(submitDisabled) .allowsHitTesting(!submitDisabled) @@ -198,7 +198,7 @@ struct RemoteModelAddCustomModel: View { .styleText( size: 11, weight: .regular, - color: .warning + color: Color.warning ) } } @@ -208,13 +208,13 @@ struct RemoteModelAddCustomModel: View { SearchBar( searchQuery: $removedRemoteModelsSearchQuery, placeholder: "Filter by display name", - background: .clear + background: Color.clear ) if filteredUserRemovedRemoteModels.isEmpty { Text("No models.") .padding(.horizontal, 8) - .styleText(size: 13, color: .gray100) + .styleText(size: 13, color: Color.S_1) } else { ScrollView { LazyVStack(alignment: .leading, spacing: spacingBetweenRemovedModelsButtons) { diff --git a/macos/Onit/UI/Settings/Models/RemoteModelRemoveModel.swift b/macos/Onit/UI/Settings/Models/RemoteModelRemoveModel.swift index f0afb053b..d224e9f95 100644 --- a/macos/Onit/UI/Settings/Models/RemoteModelRemoveModel.swift +++ b/macos/Onit/UI/Settings/Models/RemoteModelRemoveModel.swift @@ -81,7 +81,7 @@ struct RemoteModelRemoveModel: View { SearchBar( searchQuery: $searchQuery, placeholder: "Filter by display name", - background: .clear + background: Color.clear ) DynamicScrollView(maxHeight: 260) { @@ -107,7 +107,7 @@ struct RemoteModelRemoveModel: View { appState.removeRemoteModels(selectedRemoteModels) showRemoveModelsSheet = false }, - background: .redBrick + background: Color.redBrick ) .opacity(noSelectedRemoteModels ? 0.5 : 1) .disabled(noSelectedRemoteModels) diff --git a/macos/Onit/UI/Settings/Models/RemoteModelSection.swift b/macos/Onit/UI/Settings/Models/RemoteModelSection.swift index 7d41020ec..eb317cfb5 100644 --- a/macos/Onit/UI/Settings/Models/RemoteModelSection.swift +++ b/macos/Onit/UI/Settings/Models/RemoteModelSection.swift @@ -149,7 +149,7 @@ struct RemoteModelSection: View { SimpleButton( isLoading: loading, - disabled: validated || state.isValidating, + disabled: loading || validated || state.isValidating, text: verifyButtonText, textColor: validated ? Color.black : Color.white, action: { @@ -248,17 +248,19 @@ struct RemoteModelSection: View { var body: some View { Image(isRemove ? .minusThin : .plusThin) + .renderingMode(.template) + .foregroundColor(Color.S_0) .frame(width: 28, alignment: .center) .frame(height: 28, alignment: .center) .addButtonEffects( - hoverBackground: .gray500, + hoverBackground: Color.T_8, isHovered: $isHovered, isPressed: $isPressed ) { action() } .addAnimation(dependency: isHovered) - .opacity(isHovered ? 1 : isRemove ? 0.3 : 1) + .opacity(isHovered ? 1 : isRemove ? 0.4 : 1) } } @@ -298,8 +300,8 @@ struct RemoteModelSection: View { UpdateAvailableRemoteModelsButton(isRemove: true) { showRemoveModelsSheet = true } - .padding(2) } + .padding(2) } .padding(.vertical, -4) .padding(.horizontal, -4) diff --git a/macos/Onit/UI/Settings/SystemPrompt/NewSystemPromptView.swift b/macos/Onit/UI/Settings/SystemPrompt/NewSystemPromptView.swift index 5d8529d49..092db4a07 100644 --- a/macos/Onit/UI/Settings/SystemPrompt/NewSystemPromptView.swift +++ b/macos/Onit/UI/Settings/SystemPrompt/NewSystemPromptView.swift @@ -111,7 +111,7 @@ struct NewSystemPromptView: View { .buttonStyle(.plain) .padding(.vertical, 6) .padding(.horizontal, 8) - .background(.clear) + .background(Color.clear) .cornerRadius(4) .contentShape(Rectangle()) } diff --git a/macos/Onit/UI/Settings/WebSearchTab.swift b/macos/Onit/UI/Settings/WebSearchTab.swift index 77350bcf5..bc7e1e02a 100644 --- a/macos/Onit/UI/Settings/WebSearchTab.swift +++ b/macos/Onit/UI/Settings/WebSearchTab.swift @@ -52,19 +52,20 @@ struct WebSearchTab: View { var localModeSection: some View { GroupBox { - VStack(alignment: .leading, spacing: 12) { + VStack(alignment: .leading, spacing: 8) { HStack { Toggle("Enable Web Search in Local Mode", isOn: $allowWebSearchInLocalMode) .font(.system(size: 13)) } - - Text("When enabled, web search will be available in local mode. Please note that your queries will be sent to the search provider's servers, and we cannot guarantee that your data won't be stored or logged by the provider.") - .font(.system(size: 12)) - .foregroundStyle(Color.S_2) - .padding(.horizontal, 8) - .padding(.vertical, 12) - .frame(maxWidth: .infinity, alignment: .leading) - // .fixedSize(horizontal: false, vertical: true) + + Text("When enabled, web search will be available in local mode. Please note that your queries will be sent to the search provider's servers, and we cannot guarantee that your data won't be stored or logged by the provider.") + .font(.system(size: 12)) + .foregroundStyle(Color.S_2) + .frame(maxWidth: .infinity, alignment: .leading) + .fixedSize(horizontal: false, vertical: true) + } + .padding(.horizontal, 8) + .padding(.vertical, 12) } } @@ -83,7 +84,7 @@ struct WebSearchTab: View { isLoading: isValidating, disabled: isTavilyAPITokenValidated || tavilyAPIToken.isEmpty || isValidating, text: isValidating ? "Validating" : isTavilyAPITokenValidated ? "Validated" : "Validate", - textColor: isTavilyAPITokenValidated ? .black : .white, + textColor: isTavilyAPITokenValidated ? Color.black : Color.white, action: validateTavilyAPIToken ) @@ -115,7 +116,6 @@ struct WebSearchTab: View { .padding(.vertical, 5) .background(isTavilyAPITokenValidated ? Color.green.opacity(0.2) : Color.S_2.opacity(0.2)) .cornerRadius(4) - .opacity(isTavilyAPITokenValidated ? 1 : 0.5) } Text("Tavily is a powerful search API that provides real-time information from the web.")