Skip to content

Commit

Permalink
fix: eagle icon
Browse files Browse the repository at this point in the history
Signed-off-by: Innei <i@innei.in>
  • Loading branch information
Innei committed Jul 31, 2024
1 parent d181771 commit 021dfab
Show file tree
Hide file tree
Showing 9 changed files with 39 additions and 59 deletions.
48 changes: 0 additions & 48 deletions src/renderer/public/eagle.svg

This file was deleted.

18 changes: 18 additions & 0 deletions src/renderer/src/components/ui/platform-icon/collections/eagle.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import type { SVGProps } from "react"

export function SimpleIconsEagle(props: SVGProps<SVGSVGElement>) {
return (
<svg
xmlns="http://www.w3.org/2000/svg"
width="1em"
height="1em"
viewBox="0 0 24 24"
{...props}
>
<path
fill="currentColor"
d="M12 0C5.373 0 0 5.373 0 12s5.373 12 12 12s12-5.373 12-12S18.627 0 12 0m.04 3.858c1.32.019 2.634.335 3.78.989c.549.31.957.642 1.238.895a6.9 6.9 0 0 0-2.25 3.04c-.06.165-.123.354-.183.546a7 7 0 0 0-.252 1.605c-.003.162.002.374.003.578c.012.242.05.519.08.789a7 7 0 0 0 1.753 3.586a6.9 6.9 0 0 0 1.87 1.42a7.8 7.8 0 0 1-2.629 2.166a7.7 7.7 0 0 1-3.846.808l-.22-.013a7.7 7.7 0 0 1-1.504-.247a8.2 8.2 0 0 1-2.83-1.354a7.1 7.1 0 0 1-1.894-2.1c-.22-.38-1.49-2.644-.769-5.452A7.26 7.26 0 0 1 5.93 8.18a5.5 5.5 0 0 0-2.105 1.082C4.12 8.573 5.306 6 8.217 4.66a8.9 8.9 0 0 1 3.823-.8zm5.702 2.508c.202.126.464.309.736.572c.108.103.478.468.82 1.054c.413.703.549 1.327.62 1.65a5.5 5.5 0 0 1 .013 2.302a7.1 7.1 0 0 0-2.044-1.688a7.2 7.2 0 0 0-1.551.3a7 7 0 0 0-1.05.422a6 6 0 0 1 .267-1.563a6 6 0 0 1 .806-1.643a6.3 6.3 0 0 1 1.383-1.406"
/>
</svg>
)
}
1 change: 1 addition & 0 deletions src/renderer/src/components/ui/platform-icon/icons.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from "./collections/eagle"
11 changes: 8 additions & 3 deletions src/renderer/src/hooks/biz/useEntryActions.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { SimpleIconsEagle } from "@renderer/components/ui/platform-icon/icons"
import { COPY_MAP } from "@renderer/constants"
import { shortcuts } from "@renderer/constants/shortcuts"
import { tipcClient } from "@renderer/lib/client"
Expand All @@ -11,6 +12,7 @@ import { useFeedById } from "@renderer/store/feed"
import { useMutation, useQuery } from "@tanstack/react-query"
import type { FetchError } from "ofetch"
import { ofetch } from "ofetch"
import type { ReactNode } from "react"
import { useMemo } from "react"
import { toast } from "sonner"

Expand Down Expand Up @@ -99,7 +101,7 @@ export const useEntryActions = ({
className?: string
shortcut?: string
name: string
icon?: string
icon?: ReactNode
disabled?: boolean
onClick: () => void
}[] = [
Expand Down Expand Up @@ -159,7 +161,7 @@ export const useEntryActions = ({
},
{
name: "Save Media to Eagle",
icon: "/eagle.svg",
icon: <SimpleIconsEagle />,
key: "saveToEagle",
disabled:
(checkEagle.isLoading ? true : !checkEagle.data) ||
Expand Down Expand Up @@ -189,7 +191,10 @@ export const useEntryActions = ({
{
name: "Share",
key: "share",
className: getOS() === "macOS" ? `i-mgc-share-3-cute-re` : "i-mgc-share-forward-cute-re",
className:
getOS() === "macOS" ?
`i-mgc-share-3-cute-re` :
"i-mgc-share-forward-cute-re",
shortcut: shortcuts.entry.share.key,
disabled: !window.electron && !navigator.share,

Expand Down
2 changes: 1 addition & 1 deletion src/renderer/src/modules/discover/form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ export function DiscoverForm({ type }: { type: string }) {
</StyledButton>
)}
<div className="ml-6 text-zinc-500">
<span className="font-medium text-zinc-800">
<span className="font-medium text-zinc-800 dark:text-zinc-200">
{item.subscriptionCount}
</span>
{" "}
Expand Down
5 changes: 4 additions & 1 deletion src/renderer/src/modules/entry-content/header.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { Slot } from "@radix-ui/react-slot"
import { ActionButton } from "@renderer/components/ui/button"
import { useEntryActions } from "@renderer/hooks/biz/useEntryActions"
import { cn } from "@renderer/lib/utils"
Expand Down Expand Up @@ -73,7 +74,9 @@ export function EntryHeader({
<ActionButton
icon={
item.icon ? (
<img className="size-4 grayscale" src={item.icon} />
<Slot className="size-4">
{item.icon}
</Slot>
) : (
<i className={item.className} />
)
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/src/modules/entry-content/read-history.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export const EntryReadHistory: Component<{ entryId: string }> = ({
right: "80px",
zIndex: 11,
}}
className="relative z-[11] flex size-8 items-center justify-center rounded-full border border-border bg-muted ring ring-background"
className="relative z-[11] flex size-7 items-center justify-center rounded-full border border-border bg-muted ring ring-background"
>
<span className="text-[10px] font-medium text-muted-foreground">
+
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/src/modules/settings/modal/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export function SettingModalLayout(
onPointerDown={handleDrag}
/>
)}
<div className="flex h-0 flex-1 bg-theme-tooltip-background">
<div className="flex h-0 flex-1 bg-theme-modal-background-opaque">
<div className="w-44 border-r px-2 py-6">
<div className="mb-4 flex h-8 items-center gap-2 px-2 font-bold">
<Logo className="mr-1 size-6" />
Expand Down
9 changes: 5 additions & 4 deletions src/renderer/src/styles/colors.css
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
--fo-inactive: 0, 0%, 80%;
--fo-disabled: 0, 0%, 70%;

--fo-item-active: theme(colors.native.active/0.4);
--fo-item-hover: theme(colors.native.active/0.2);
--fo-item-active: theme(colors.zinc.400/0.3);
--fo-item-hover: theme(colors.zinc.400/0.2);

--fo-modal-background: theme(colors.zinc.50/0.8);
--fo-modal-background-opaque: theme(colors.zinc.50);
Expand All @@ -28,8 +28,9 @@

--fo-vibrancy-background: theme(colors.native.active);

--fo-item-active: theme(colors.neutral.700/0.4);
--fo-item-hover: theme(colors.native.active/0.2);
--fo-item-active: theme(colors.neutral.600/0.4);
--fo-item-hover: theme(colors.neutral.700/0.3);

--fo-tooltip-background: 0, 0%, 15%;
--fo-tooltip-foreground: 0, 0%, 96%;

Expand Down

0 comments on commit 021dfab

Please sign in to comment.