chore: upgrade to tauri v2 stable
This commit is contained in:
@@ -1,14 +1,16 @@
|
||||
import { appSettings, cn } from "@/commons";
|
||||
import { Spinner } from "@/components";
|
||||
import { RepostIcon, Spinner } from "@/components";
|
||||
import { LumeWindow } from "@/system";
|
||||
import { Repeat } from "@phosphor-icons/react";
|
||||
import { useStore } from "@tanstack/react-store";
|
||||
import { Menu, MenuItem } from "@tauri-apps/api/menu";
|
||||
import { message } from "@tauri-apps/plugin-dialog";
|
||||
import { useCallback, useState } from "react";
|
||||
import { useNoteContext } from "../provider";
|
||||
|
||||
export function NoteRepost({ large = false }: { large?: boolean }) {
|
||||
export function NoteRepost({
|
||||
label = false,
|
||||
smol = false,
|
||||
}: { label?: boolean; smol?: boolean }) {
|
||||
const visible = useStore(appSettings, (state) => state.display_repost_button);
|
||||
const event = useNoteContext();
|
||||
|
||||
@@ -65,7 +67,7 @@ export function NoteRepost({ large = false }: { large?: boolean }) {
|
||||
onClick={(e) => showContextMenu(e)}
|
||||
className={cn(
|
||||
"inline-flex items-center justify-center text-neutral-800 dark:text-neutral-200",
|
||||
large
|
||||
label
|
||||
? "rounded-full h-7 gap-1.5 w-24 text-sm font-medium hover:bg-black/10 dark:hover:bg-white/10"
|
||||
: "size-7",
|
||||
)}
|
||||
@@ -73,9 +75,14 @@ export function NoteRepost({ large = false }: { large?: boolean }) {
|
||||
{loading ? (
|
||||
<Spinner className="size-4" />
|
||||
) : (
|
||||
<Repeat className={cn("size-4", isRepost ? "text-blue-500" : "")} />
|
||||
<RepostIcon
|
||||
className={cn(
|
||||
smol ? "size-4" : "size-5",
|
||||
isRepost ? "text-blue-500" : "",
|
||||
)}
|
||||
/>
|
||||
)}
|
||||
{large ? "Repost" : null}
|
||||
{label ? "Repost" : null}
|
||||
</button>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user