Skip to content

Commit 66c42c2

Browse files
committed
all: tweak iconography and colors
1 parent eea59ce commit 66c42c2

3 files changed

Lines changed: 12 additions & 6 deletions

File tree

‎src/components/colors/index.ts‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import { Color } from "@raycast/api";
2+
3+
export const ColorDefault = Color.Blue;
4+
export const ColorPrivate = Color.SecondaryText;
5+
export const ColorEmphasis = Color.Yellow;

‎src/components/findNotebooks.tsx‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import {
33
List,
44
OpenInBrowserAction,
55
ToastStyle,
6-
Color,
76
Icon,
87
useNavigation,
98
randomId,
@@ -20,6 +19,7 @@ import { Sourcegraph, instanceName } from "../sourcegraph";
2019
import { findNotebooks, SearchNotebook } from "../sourcegraph/gql";
2120
import checkAuthEffect from "../hooks/checkAuthEffect";
2221
import { copyShortcut, secondaryActionShortcut } from "./shortcuts";
22+
import { ColorDefault, ColorEmphasis, ColorPrivate } from "./colors";
2323

2424
export default function FindNotebooksCommand(src: Sourcegraph) {
2525
const { state, find } = useNotebooks(src);
@@ -94,12 +94,13 @@ function NotebookResultItem({
9494
notebook.stars?.totalCount
9595
? {
9696
source: Icon.Star,
97+
tintColor: notebook.viewerHasStarred ? ColorEmphasis : undefined,
9798
}
9899
: undefined
99100
}
100101
icon={{
101-
source: notebook.viewerHasStarred ? Icon.Star : Icon.Dot,
102-
tintColor: notebook.public ? Color.Blue : Color.Yellow,
102+
source: Icon.Document,
103+
tintColor: notebook.public ? ColorDefault : ColorPrivate,
103104
}}
104105
actions={
105106
<ActionPanel>

‎src/components/search.tsx‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import {
88
randomId,
99
PushAction,
1010
Detail,
11-
Color,
1211
Icon,
1312
ImageLike,
1413
copyTextToClipboard,
@@ -26,6 +25,7 @@ import { copyShortcut, secondaryActionShortcut, tertiaryActionShortcut } from ".
2625
import { Sourcegraph, instanceName } from "../sourcegraph";
2726
import { performSearch, SearchResult, Suggestion } from "../sourcegraph/stream-search";
2827
import { ContentMatch, SearchMatch, SymbolMatch } from "../sourcegraph/stream-search/stream";
28+
import { ColorDefault, ColorPrivate } from "./colors";
2929

3030
export default function SearchCommand(src: Sourcegraph) {
3131
const { state, search } = useSearch(src);
@@ -133,7 +133,7 @@ function SearchResultItem({
133133
let url = searchResult.url;
134134
let multiResult = false;
135135

136-
const icon: ImageLike = { source: Icon.Dot, tintColor: Color.Blue };
136+
const icon: ImageLike = { source: Icon.Dot, tintColor: ColorDefault };
137137
switch (match.type) {
138138
case "repo":
139139
if (match.fork) {
@@ -144,7 +144,7 @@ function SearchResultItem({
144144
}
145145
// TODO color results of all matches based on repo privacy
146146
if (match.private) {
147-
icon.tintColor = Color.Yellow;
147+
icon.tintColor = ColorPrivate;
148148
}
149149
title = match.repository;
150150
subtitle = match.description || "";

0 commit comments

Comments
 (0)