Skip to content

Commit 13d5648

Browse files
committed
Lots of UI fixes
1 parent 7f440dc commit 13d5648

14 files changed

+68
-46
lines changed

bun.lockb

-445 Bytes
Binary file not shown.

macos/.xcode.env.local

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
export NODE_BINARY=/Users/osp/.local/share/mise/installs/node/20/bin/node
2+

macos/Podfile.lock

+4-10
Original file line numberDiff line numberDiff line change
@@ -1059,8 +1059,6 @@ PODS:
10591059
- React-perflogger (= 0.73.35)
10601060
- RNCAsyncStorage (1.24.0):
10611061
- React-Core
1062-
- RNCPicker (2.10.2):
1063-
- React-Core
10641062
- RNReanimated (3.16.6):
10651063
- glog
10661064
- RCT-Folly (= 2022.05.16.00)
@@ -1152,7 +1150,6 @@ DEPENDENCIES:
11521150
- React-utils (from `../node_modules/react-native-macos/ReactCommon/react/utils`)
11531151
- ReactCommon/turbomodule/core (from `../node_modules/react-native-macos/ReactCommon`)
11541152
- "RNCAsyncStorage (from `../node_modules/@react-native-async-storage/async-storage`)"
1155-
- "RNCPicker (from `../node_modules/@react-native-picker/picker`)"
11561153
- RNReanimated (from `../node_modules/react-native-reanimated`)
11571154
- "RNSentry (from `../node_modules/@sentry/react-native`)"
11581155
- SocketRocket (from `../node_modules/react-native-macos/third-party-podspecs/SocketRocket.podspec`)
@@ -1269,8 +1266,6 @@ EXTERNAL SOURCES:
12691266
:path: "../node_modules/react-native-macos/ReactCommon"
12701267
RNCAsyncStorage:
12711268
:path: "../node_modules/@react-native-async-storage/async-storage"
1272-
RNCPicker:
1273-
:path: "../node_modules/@react-native-picker/picker"
12741269
RNReanimated:
12751270
:path: "../node_modules/react-native-reanimated"
12761271
RNSentry:
@@ -1282,16 +1277,16 @@ EXTERNAL SOURCES:
12821277

12831278
SPEC CHECKSUMS:
12841279
boost: 0686b6af8cbd638c784fea5afb789be66699823c
1285-
DoubleConversion: ca54355f8932558971f6643521d62b9bc8231cee
1280+
DoubleConversion: c914223d2d29c914635ef1b0721d8a77cca6a732
12861281
FBLazyVector: 6b5639f7d70150fe6a91cfbdcbbfee7930799d82
12871282
FBReactNativeSpec: 956febc0d5ab01f66e9add48644d30aa9f9fbfcf
1288-
fmt: 03574da4b7ba40de39da59677ca66610ce8c4a02
1289-
glog: 3a72874c0322c7caf24931d3a2777cb7a3090529
1283+
fmt: cca1eb84179ad528ae1ba9fdf135ed1ac49e19cb
1284+
glog: 750f96a379703a2d724d2f1fc6cb3a3eff000817
12901285
hermes-engine: d992945b77c506e5164e6a9a77510c9d57472c59
12911286
HotKey: e96d8a2ddbf4591131e2bb3f54e69554d90cdca6
12921287
KeychainAccess: c0c4f7f38f6fc7bbe58f5702e25f7bd2f65abf51
12931288
libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913
1294-
RCT-Folly: 68e9c0fd4c0f05964afd447041d3ac2d67298f27
1289+
RCT-Folly: ee9cea19970b26e81481301934279081b7a575e2
12951290
RCTRequired: 8f165b521fb1031cdeae4e5cabaa116bbeef00a5
12961291
RCTTypeSafety: 84dde8c83ecfb87e5b7a601191c0a606435aaa37
12971292
React: c05c8ec2d476327c4c75dff743b030d0767ba21e
@@ -1334,7 +1329,6 @@ SPEC CHECKSUMS:
13341329
React-utils: a6fa5b0ef04c43eb88d9c7b28c551d2c993a21a6
13351330
ReactCommon: d55bdb1eba205b1f019235ed1f33adb0e2c43e57
13361331
RNCAsyncStorage: b6410dead2732b5c72a7fdb1ecb5651bbcf4674b
1337-
RNCPicker: d8662eb6615e3401acb590c44b97b2af3beb1e53
13381332
RNReanimated: 7acfc29c304e3ddf28723a87b72f4ddb203e928a
13391333
RNSentry: 92311c14e158209fb26592900713bfd73569922e
13401334
Sentry: ee060c09b2f7ec1240e95c766ab44c04c7bdb052

macos/sol-macOS/AppDelegate.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -405,14 +405,14 @@ class AppDelegate: NSObject, NSApplicationDelegate,
405405
}
406406

407407
@objc func hideWindow() {
408-
// #if !DEBUG
408+
#if !DEBUG
409409
if mainWindow.isVisible {
410410
overlayWindow.orderOut(self)
411411
mainWindow.orderOut(self)
412412
SolEmitter.sharedInstance.onHide()
413413
settingsHotKey.isPaused = true
414414
}
415-
// #endif
415+
#endif
416416
}
417417

418418
func setHorizontalArrowCatch(catchHorizontalArrowPress: Bool) {

macos/sol-macOS/views/Panel.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ final class Panel: NSPanel, NSWindowDelegate {
1313

1414
self.hasShadow = true
1515
self.level = .mainMenu + 3
16-
self.collectionBehavior.insert(.fullScreenAuxiliary) // Allows the pannel to appear in a fullscreen space
16+
self.collectionBehavior.insert(.fullScreenAuxiliary)
1717
self.collectionBehavior.insert(.canJoinAllSpaces)
1818
self.titleVisibility = .hidden
1919
self.titlebarAppearsTransparent = true

macos/sol.xcodeproj/project.pbxproj

+2
Original file line numberDiff line numberDiff line change
@@ -477,12 +477,14 @@
477477
"${PODS_CONFIGURATION_BUILD_DIR}/RNCAsyncStorage/RNCAsyncStorage_resources.bundle",
478478
"${PODS_CONFIGURATION_BUILD_DIR}/React-Core/RCTI18nStrings.bundle",
479479
"${PODS_CONFIGURATION_BUILD_DIR}/Sentry/Sentry.bundle",
480+
"${PODS_CONFIGURATION_BUILD_DIR}/glog/glog_privacy.bundle",
480481
);
481482
name = "[CP] Copy Pods Resources";
482483
outputPaths = (
483484
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/RNCAsyncStorage_resources.bundle",
484485
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/RCTI18nStrings.bundle",
485486
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Sentry.bundle",
487+
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/glog_privacy.bundle",
486488
);
487489
runOnlyForDeploymentPostprocessing = 0;
488490
shellPath = /bin/sh;

package.json

-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
"dependencies": {
2222
"@expo/plist": "^0.0.20",
2323
"@react-native-async-storage/async-storage": "^1.23.1",
24-
"@react-native-picker/picker": "^2.4.0",
2524
"@sentry/react-native": "5.35.0",
2625
"assert": "^2.0.0",
2726
"axios": "^0.25.0",

src/components/FullCalendar.tsx

+5-3
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,15 @@ export let FullCalendar: FC = observer(() => {
1717

1818
return (
1919
<ScrollView
20-
className="max-h-full"
21-
contentContainerClassName="py-2"
20+
className="max-h-full border-t border-neutral-200 dark:border-neutral-800"
21+
contentContainerClassName="py-2 gap-2 px-4"
2222
showsVerticalScrollIndicator={false}>
2323
{Object.entries(store.calendar.groupedEvents).map(([key, group]) => {
2424
let shouldShowRelative = group.date.diffNow('days').days <= 5
2525
return (
26-
<View key={key} className="px-4 pb-4 gap-2">
26+
<View
27+
key={key}
28+
className="py-2 gap-2 border-b border-neutral-200 dark:border-neutral-800">
2729
<View className="flex-row items-center gap-1">
2830
<Text className="capitalize font-medium text-neutral-500 dark:text-neutral-400">
2931
{shouldShowRelative

src/components/MyRadioButton.tsx

+7-2
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,17 @@ export const MyRadioButton: FC<Props> = ({
2525
className={clsx(
2626
'w-4 h-4 mr-2 rounded-full bg-neutral-300 dark:bg-neutral-700 p-0.5 items-center justify-center',
2727
{
28-
'bg-blue-500': selected,
28+
'bg-blue-500 dark:bg-blue-500': selected,
2929
},
3030
)}>
3131
{selected && <View className="rounded-full bg-white w-[6px] h-[6px]" />}
3232
</View>
33-
<Text>{label}</Text>
33+
<Text
34+
className={clsx({
35+
'opacity-70': !selected,
36+
})}>
37+
{label}
38+
</Text>
3439
</TouchableOpacity>
3540
)
3641
}

src/components/SelectableButton.tsx

+11-7
Original file line numberDiff line numberDiff line change
@@ -37,16 +37,20 @@ export const SelectableButton: FC<SelectableButtonProps> = ({
3737
// @ts-expect-error
3838
enableFocusRing={false}>
3939
<View
40-
className={clsx('p-2 flex-row items-center gap-1 rounded', className, {
41-
'rounded-full': rounded,
42-
highlight: selected,
43-
'bg-neutral-400 dark:bg-neutral-700': hovered,
44-
})}>
40+
className={clsx(
41+
'px-2 py-1.5 flex-row items-center gap-1 rounded',
42+
className,
43+
{
44+
'rounded-full': rounded,
45+
'bg-accent-strong': selected,
46+
'bg-accent': hovered,
47+
},
48+
)}>
4549
{leftItem}
4650
{!!title && (
4751
<Text
48-
className={clsx(`text-sm text`, {
49-
'text-blue-500 dark:text-blue-500': selected,
52+
className={clsx(`text-sm`, {
53+
'text-white': selected,
5054
})}>
5155
{title}
5256
</Text>

src/stores/keystroke.store.ts

+12
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,18 @@ export const createKeystrokeStore = (root: IRootStore) => {
284284
)
285285
})
286286
break
287+
case 'perplexity':
288+
Linking.openURL(
289+
`https://perplexity.ai/search/new?q=${encodeURI(
290+
root.ui.query,
291+
)}`,
292+
).catch(e => {
293+
solNative.showToast(
294+
`Could not open URL: ${root.ui.query}, error: ${e}`,
295+
'error',
296+
)
297+
})
298+
break
287299
}
288300

289301
solNative.hideWindow()

src/stores/ui.store.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ let minisearch = new MiniSearch({
113113
})
114114

115115
export type UIStore = ReturnType<typeof createUIStore>
116-
type SearchEngine = 'google' | 'bing' | 'duckduckgo'
116+
type SearchEngine = 'google' | 'bing' | 'duckduckgo' | 'perplexity'
117117

118118
export const createUIStore = (root: IRootStore) => {
119119
let persist = async () => {

src/widgets/settings.widget.tsx

+20-19
Original file line numberDiff line numberDiff line change
@@ -29,30 +29,30 @@ export const SettingsWidget: FC = observer(() => {
2929
const [selected, setSelected] = useState<ITEM>('GENERAL')
3030

3131
return (
32-
<View className="h-full">
33-
<View className="px-4 py-3 flex-row gap-2 subBg">
34-
<View className="flex-1">
35-
<BackButton onPress={() => store.ui.focusWidget(Widget.SEARCH)} />
36-
</View>
32+
<View className="h-full flex-row">
33+
<View className="px-4 py-3 gap-1 border-r border-lightBorder dark:border-darkBorder">
34+
<BackButton
35+
onPress={() => store.ui.focusWidget(Widget.SEARCH)}
36+
className="mb-2"
37+
/>
3738
<SelectableButton
38-
className="w-24 items-center justify-center"
39+
className="w-26 items-center"
3940
selected={selected === 'GENERAL'}
4041
onPress={() => setSelected('GENERAL')}
4142
title="General"
4243
/>
4344
<SelectableButton
44-
className="w-24 items-center justify-center"
45+
className="w-26 items-center "
4546
selected={selected === 'TRANSLATE'}
4647
onPress={() => setSelected('TRANSLATE')}
47-
title="Translate"
48+
title="Translation"
4849
/>
4950
<SelectableButton
50-
className="w-24 items-center justify-center"
51+
className="w-26 items-center "
5152
selected={selected === 'ABOUT'}
5253
onPress={() => setSelected('ABOUT')}
5354
title="About"
5455
/>
55-
<View className="flex-1" />
5656
</View>
5757

5858
<View className="flex-1 h-full">
@@ -89,16 +89,16 @@ export const SettingsWidget: FC = observer(() => {
8989
<ScrollView
9090
className="flex-1 h-full"
9191
contentContainerClassName="justify-center p-5 gap-2">
92-
<View className="flex-row items-center p-3 subBg rounded">
92+
<View className="flex-row items-center p-3 subBg rounded-lg border border-lightBorder dark:border-darkBorder">
9393
<Text className="flex-1 text-sm text">Launch on start</Text>
9494
<MySwitch
9595
value={store.ui.launchAtLogin}
9696
onValueChange={store.ui.setLaunchAtLogin}
9797
/>
9898
</View>
99-
<View className="p-3 subBg rounded gap-3">
99+
<View className="p-3 subBg rounded gap-3 rounded-lg border border-lightBorder dark:border-darkBorder">
100100
<View className="gap-3">
101-
<Text className="flex-1 text-sm">Global shortcut</Text>
101+
<Text className="flex-1 text-sm">Global Shortcut</Text>
102102
<View className="flex-1">
103103
{[
104104
{label: '⌘ Space', value: 'command' as const},
@@ -173,6 +173,7 @@ export const SettingsWidget: FC = observer(() => {
173173
{label: 'Google', value: 'google' as const},
174174
{label: 'DuckDuckGo', value: 'duckduckgo' as const},
175175
{label: 'Bing', value: 'bing' as const},
176+
{label: 'Perplexity', value: 'perplexity' as const},
176177
].map(({label, value}, idx) => {
177178
return (
178179
<MyRadioButton
@@ -190,12 +191,12 @@ export const SettingsWidget: FC = observer(() => {
190191
</View>
191192
</View>
192193

193-
<View className="p-3 subBg rounded gap-3">
194-
<Text>File Search Paths</Text>
195-
{store.ui.searchFolders.map((folder, index) => {
194+
<View className="p-3 subBg rounded gap-2 rounded-lg border border-lightBorder dark:border-darkBorder">
195+
<Text className="mb-1">File Search Paths</Text>
196+
{store.ui.searchFolders.map(folder => {
196197
return (
197-
<View className="flex-row items-center gap-2">
198-
<Text className="flex-1 text-neutral-500 dark:text-neutral-200">
198+
<View className="flex-row items-center border-b border-lightBorder dark:border-darkBorder pb-2">
199+
<Text className="flex-1 text-neutral-500 dark:text-neutral-400">
199200
{folder}
200201
</Text>
201202
<TouchableOpacity
@@ -226,7 +227,7 @@ export const SettingsWidget: FC = observer(() => {
226227
</View>
227228
</View>
228229

229-
<View className="p-3 subBg rounded gap-3">
230+
<View className="p-3 subBg rounded gap-3 rounded-lg border border-lightBorder dark:border-darkBorder">
230231
<View className="gap-3">
231232
<Text className="">Show window on</Text>
232233
<View className="flex-1">

tailwind.config.js

+1
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ module.exports = {
4444
subBgLight: '#FFFFFF77',
4545
inputLight: '#00000010',
4646
inputDark: '#00000050',
47+
'accent-strong': 'rgb(var(--color-accent) / .65)',
4748
accent: 'rgb(var(--color-accent) / .25)',
4849
'accent-dark': 'rgb(var(--color-accent) / .14)',
4950
},

0 commit comments

Comments
 (0)