Skip to content

Commit

Permalink
feat: timeline button width
Browse files Browse the repository at this point in the history
  • Loading branch information
DIYgod committed Feb 13, 2025
1 parent 4303da2 commit c475ecd
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ const ViewSwitchButton: FC<{
ELECTRON ? "hover:!bg-theme-item-hover" : "",
isOver && "border-theme-accent-400 bg-theme-accent-400/60",
)}
size="lg"
onClick={(e) => {
startTransition(() => {
setActive()
Expand Down Expand Up @@ -151,6 +152,7 @@ const ListSwitchButton: FC<{
"hover:!bg-theme-item-hover",
isActive && "!bg-theme-item-active grayscale-0",
)}
size="lg"
onClick={handleNavigate}
{...contextMenuProps}
>
Expand Down Expand Up @@ -201,6 +203,7 @@ const InboxSwitchButton: FC<{
ELECTRON ? "hover:!bg-theme-item-hover" : "",
isActive && "text-black dark:text-white",
)}
size="lg"
onClick={handleNavigate}
>
<FeedIcon fallback feed={inbox} size={22} noMargin />
Expand Down
2 changes: 1 addition & 1 deletion apps/renderer/src/modules/timeline-column/index.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
mask:
linear-gradient(to right, white, transparent) 0 50% / 0.8rem 100% no-repeat,
linear-gradient(white, white) 50% 50% / 100% 100% no-repeat,
linear-gradient(to right, transparent, white) 100% 50% / 0.8rem 100% no-repeat;
linear-gradient(to right, transparent, white) 100% 50% / 1.6rem 100% no-repeat;
mask-composite: exclude;
animation:
mask-left both linear,
Expand Down
6 changes: 3 additions & 3 deletions apps/renderer/src/modules/timeline-column/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -215,18 +215,18 @@ const TimelineSelector = ({ timelineId }: { timelineId: string | undefined }) =>
ref={scrollRef}
className={clsx(
styles["mask-scroller"],
"flex h-11 justify-between gap-2 overflow-auto px-3 text-xl text-theme-vibrancyFg scrollbar-none",
"flex h-11 justify-between gap-0.5 overflow-auto px-2 text-xl text-theme-vibrancyFg scrollbar-none",
)}
>
{timelineList.views.map((timelineId) => (
<TimelineSwitchButton key={timelineId} timelineId={timelineId} />
))}

{timelineList.inboxes.length > 0 && <DividerVertical className="mx-2 my-auto h-8" />}
{timelineList.inboxes.length > 0 && <DividerVertical className="mx-1 my-auto h-8" />}
{timelineList.inboxes.map((timelineId) => (
<TimelineSwitchButton key={timelineId} timelineId={timelineId} />
))}
{timelineList.lists.length > 0 && <DividerVertical className="mx-2 my-auto h-8" />}
{timelineList.lists.length > 0 && <DividerVertical className="mx-1 my-auto h-8" />}
{timelineList.lists.map((timelineId) => (
<TimelineSwitchButton key={timelineId} timelineId={timelineId} />
))}
Expand Down
7 changes: 6 additions & 1 deletion apps/renderer/src/store/subscription/hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,12 @@ export const useViewWithSubscription = () =>
useSubscriptionStore(
useCallback((state) => {
return viewList.filter((view) => {
if (view === FeedViewType.Articles) {
if (
view === FeedViewType.Articles ||
view === FeedViewType.SocialMedia ||
view === FeedViewType.Pictures ||
view === FeedViewType.Videos
) {
return true
} else {
return state.feedIdByView[view].length > 0
Expand Down
3 changes: 2 additions & 1 deletion packages/components/src/ui/button/action-button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export interface ActionButtonProps {
shortcut?: string
disableTriggerShortcut?: boolean
enableHoverableContent?: boolean
size?: "sm" | "base"
size?: "sm" | "base" | "lg"

/**
* @description only trigger shortcut when focus with in `<Focusable />`
Expand All @@ -30,6 +30,7 @@ export interface ActionButtonProps {

const actionButtonStyleVariant = {
size: {
lg: tw`text-xl size-10`,
base: tw`text-xl size-8`,
sm: tw`text-sm size-6`,
},
Expand Down

0 comments on commit c475ecd

Please sign in to comment.