feat: polish on windows

This commit is contained in:
reya
2024-01-27 15:53:19 +07:00
parent b11e2a4291
commit 8295625a44
11 changed files with 48 additions and 178 deletions

View File

@@ -5,7 +5,6 @@ import {
MediaPlayButton,
MediaTimeDisplay,
MediaTimeRange,
MediaVolumeRange,
} from "media-chrome/dist/react";
export function VideoPreview({ url }: { url: string }) {
@@ -24,7 +23,6 @@ export function VideoPreview({ url }: { url: string }) {
<MediaTimeRange />
<MediaTimeDisplay showDuration />
<MediaMuteButton />
<MediaVolumeRange />
</MediaControlBar>
</MediaController>
</div>

View File

@@ -13,6 +13,7 @@ export function UserFollowButton({
const [followed, setFollowed] = useState(false);
const toggleFollow = async () => {
setLoading(true);
if (!followed) {
const add = await ark.createContact(target);
if (add) setFollowed(true);
@@ -20,6 +21,7 @@ export function UserFollowButton({
const remove = await ark.deleteContact(target);
if (remove) setFollowed(false);
}
setLoading(false);
};
useEffect(() => {
@@ -37,7 +39,12 @@ export function UserFollowButton({
}, []);
return (
<button type="button" onClick={toggleFollow} className={cn("", className)}>
<button
type="button"
disabled={loading}
onClick={toggleFollow}
className={cn("", className)}
>
{loading ? (
<LoaderIcon className="size-4 animate-spin" />
) : followed ? (

View File

@@ -8,7 +8,7 @@ export function UserName({ className }: { className?: string }) {
return (
<div
className={cn(
"h-4 w-20 bg-black/20 dark:bg-white/20 rounded animate-pulse",
"h-4 w-20 self-center bg-black/20 dark:bg-white/20 rounded animate-pulse",
className,
)}
/>

View File

@@ -91,6 +91,7 @@ export const LumeProvider = ({ children }: PropsWithChildren<object>) => {
const explicitRelayUrls = normalizeRelayUrlSet([
"wss://nostr.mutinywallet.com/",
"wss://bostr.nokotaro.com/",
"wss://purplepag.es/",
]);
const outboxRelayUrls = normalizeRelayUrlSet(["wss://purplepag.es/"]);
@@ -227,7 +228,7 @@ export const LumeProvider = ({ children }: PropsWithChildren<object>) => {
return (
<div
data-tauri-drag-region
className="relative flex items-center justify-center w-screen h-screen bg-neutral-50 dark:bg-neutral-950"
className="relative flex items-center justify-center w-screen h-screen"
>
<div className="flex flex-col items-start max-w-2xl gap-1">
<h5 className="font-semibold uppercase">TIP:</h5>