Skip to content

Commit 1e9ad0a

Browse files
committed
various design change from #4343
Signed-off-by: Yujong Lee <yujonglee.dev@gmail.com>
1 parent de2686e commit 1e9ad0a

File tree

8 files changed

+36
-16
lines changed

8 files changed

+36
-16
lines changed

apps/desktop/src/routes/app/main/_layout.index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ function Component() {
7272

7373
return (
7474
<div
75-
className="flex h-full gap-1 overflow-hidden p-1"
75+
className="flex h-full gap-1 overflow-hidden bg-stone-50 p-1"
7676
data-testid="main-app-shell"
7777
>
7878
{leftsidebar.expanded && !isOnboarding && <LeftSidebar />}

apps/desktop/src/session/components/shared.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ export function useCurrentNoteTab(
5959
}
6060

6161
export function RecordingIcon() {
62-
return <div className="size-2 rounded-full bg-red-500" />;
62+
return <div className="size-3 rounded-full bg-red-500" />;
6363
}
6464

6565
export function useListenButtonState(sessionId: string) {

apps/desktop/src/shared/tabs.tsx

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,18 @@ const accentColors: Record<
3737
}
3838
> = {
3939
neutral: {
40-
selected: ["bg-neutral-50", "text-black", "border-stone-400"],
41-
unselected: ["bg-neutral-50", "text-neutral-500", "border-transparent"],
40+
selected: [
41+
"bg-neutral-50",
42+
"hover:bg-stone-100",
43+
"text-black",
44+
"border-stone-400",
45+
],
46+
unselected: [
47+
"bg-neutral-50",
48+
"hover:bg-stone-100",
49+
"text-neutral-500",
50+
"border-transparent",
51+
],
4252
hover: {
4353
selected: "text-neutral-700 hover:text-neutral-900",
4454
unselected: "text-neutral-500 hover:text-neutral-700",

apps/desktop/src/sidebar/index.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ export function LeftSidebar() {
4949
"h-9 w-full py-1",
5050
isLinux ? "justify-between pl-3" : "justify-end pl-20",
5151
"shrink-0",
52-
"rounded-xl bg-neutral-50",
5352
])}
5453
>
5554
{isLinux && <TrafficLights />}

apps/desktop/src/sidebar/profile/index.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ export function ProfileSection({ onExpandChange }: ProfileSectionProps = {}) {
212212
transition={{ duration: 0.2, ease: "easeInOut" }}
213213
className="absolute right-0 bottom-full left-0 mb-1"
214214
>
215-
<div className="overflow-hidden rounded-xl border bg-neutral-50 shadow-xs">
215+
<div className="overflow-hidden rounded-xl border bg-white shadow-xs">
216216
<div className="py-1">
217217
<AnimatePresence mode="wait">
218218
{currentView === "main" ? (
@@ -269,7 +269,7 @@ export function ProfileSection({ onExpandChange }: ProfileSectionProps = {}) {
269269
)}
270270
</AnimatePresence>
271271

272-
<div className="overflow-hidden rounded-xl bg-neutral-50">
272+
<div className="overflow-hidden">
273273
<ProfileButton
274274
isExpanded={isExpanded}
275275
onClick={() => setIsExpanded(!isExpanded)}
@@ -312,12 +312,12 @@ function ProfileButton({
312312
return (
313313
<button
314314
className={cn([
315-
"flex w-full cursor-pointer items-center gap-2.5",
315+
"flex w-full cursor-pointer items-center gap-2.5 rounded-lg",
316316
"px-4 py-2",
317317
"text-left",
318318
"transition-all duration-300",
319-
"hover:bg-neutral-100",
320-
isExpanded && "border-t border-neutral-100 bg-neutral-50",
319+
"hover:bg-neutral-200/50",
320+
isExpanded && "border-neutral-300 bg-neutral-200/50",
321321
])}
322322
onClick={onClick}
323323
>

apps/desktop/src/sidebar/search-input.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ export function SidebarSearchInput() {
120120
"text-sm placeholder:text-sm placeholder:text-neutral-400",
121121
"h-full w-full pl-8",
122122
query ? "pr-8" : showShortcut ? "pr-14" : "pr-4",
123-
"rounded-lg bg-neutral-100",
123+
"rounded-lg border border-neutral-200 bg-neutral-200/50",
124124
"focus:bg-neutral-200 focus:outline-hidden",
125125
])}
126126
/>

apps/desktop/src/sidebar/timeline/item.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ function ItemBase({
113113
"w-full cursor-pointer rounded-lg px-3 py-2 text-left",
114114
multiSelected && "bg-neutral-200",
115115
!multiSelected && selected && "bg-neutral-200",
116-
!multiSelected && !selected && "hover:bg-neutral-100",
116+
!multiSelected && !selected && "hover:bg-neutral-200/50",
117117
ignored && "opacity-40",
118118
])}
119119
>

apps/desktop/src/store/zustand/tabs/basic.ts

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export type BasicState = {
2222

2323
export type BasicActions = {
2424
openCurrent: (tab: TabInput) => void;
25-
openNew: (tab: TabInput) => void;
25+
openNew: (tab: TabInput, options?: { position?: "start" | "end" }) => void;
2626
select: (tab: Tab) => void;
2727
selectNext: () => void;
2828
selectPrev: () => void;
@@ -72,9 +72,9 @@ export const createBasicSlice = <
7272
view: tab.type,
7373
});
7474
},
75-
openNew: (tab) => {
75+
openNew: (tab, options) => {
7676
const { tabs, history, addRecentlyOpened } = get();
77-
set(openTab(tabs, tab, history, true));
77+
set(openTab(tabs, tab, history, true, options?.position));
7878

7979
if (tab.type === "sessions") {
8080
addRecentlyOpened(tab.id);
@@ -271,6 +271,7 @@ const openTab = <T extends BasicState & NavigationState>(
271271
newTab: TabInput,
272272
history: Map<string, TabHistory>,
273273
forceNewTab: boolean,
274+
position?: "start" | "end",
274275
): Partial<T> => {
275276
const tabWithDefaults: Tab = {
276277
...getDefaultState(newTab),
@@ -317,7 +318,17 @@ const openTab = <T extends BasicState & NavigationState>(
317318
} else {
318319
activeTab = { ...tabWithDefaults, active: true, slotId: id() };
319320
const deactivated = deactivateAll(tabs);
320-
nextTabs = [...deactivated, activeTab];
321+
322+
if (position === "start") {
323+
const pinnedCount = deactivated.filter((t) => t.pinned).length;
324+
nextTabs = [
325+
...deactivated.slice(0, pinnedCount),
326+
activeTab,
327+
...deactivated.slice(pinnedCount),
328+
];
329+
} else {
330+
nextTabs = [...deactivated, activeTab];
331+
}
321332

322333
return updateWithHistory(nextTabs, activeTab, history);
323334
}

0 commit comments

Comments
 (0)