feat: UI optimizations
This commit is contained in:
@@ -229,7 +229,7 @@ export const ConnectButton: React.FC<{
|
||||
{isAllRead ? (
|
||||
<BellIcon
|
||||
className={`${
|
||||
size === "base" ? "w-6 h-6" : "w-5 h-5"
|
||||
size === "base" ? "w-7 h-7" : "w-6 h-6"
|
||||
} text-zinc-500 cursor-pointer sm:hover:animate-buzz-out`}
|
||||
onClick={showNotificationModal}
|
||||
/>
|
||||
|
||||
@@ -81,6 +81,12 @@ export const FollowingButton: React.FC<{
|
||||
loadingStatusChange,
|
||||
])
|
||||
|
||||
const isLoading = subscription.data
|
||||
? unsubscribeFromSite.isLoading || subscribeToSite.isLoading
|
||||
: unsubscribeFromSite.isLoading ||
|
||||
subscribeToSite.isLoading ||
|
||||
subscription.isLoading
|
||||
|
||||
return (
|
||||
<Button
|
||||
variant={subscription.data ? "text" : variant}
|
||||
@@ -93,13 +99,7 @@ export const FollowingButton: React.FC<{
|
||||
"opacity-60": subscription.data,
|
||||
},
|
||||
)}
|
||||
isLoading={
|
||||
subscription.data
|
||||
? unsubscribeFromSite.isLoading || subscribeToSite.isLoading
|
||||
: unsubscribeFromSite.isLoading ||
|
||||
subscribeToSite.isLoading ||
|
||||
subscription.isLoading
|
||||
}
|
||||
isLoading={isLoading}
|
||||
size={size}
|
||||
aria-label="follow"
|
||||
isAutoWidth
|
||||
@@ -117,7 +117,9 @@ export const FollowingButton: React.FC<{
|
||||
</>
|
||||
) : (
|
||||
<span className="inline-flex items-center">
|
||||
<span className="icon-[mingcute--user-add-fill] inline-block sm:mr-2"></span>{" "}
|
||||
{!isLoading && (
|
||||
<span className="icon-[mingcute--user-add-fill] inline-block sm:mr-2"></span>
|
||||
)}{" "}
|
||||
<span className="hidden sm:inline">{t("Follow")}</span>
|
||||
</span>
|
||||
)}
|
||||
|
||||
@@ -117,7 +117,12 @@ export const Platform: React.FC<{
|
||||
>
|
||||
<span className="w-6 h-6 inline-block overflow-hidden">
|
||||
{syncMap[platform]?.icon ? (
|
||||
<Image fill src={syncMap[platform]?.icon} alt={platform} />
|
||||
<Image
|
||||
width={24}
|
||||
height={24}
|
||||
src={syncMap[platform]?.icon}
|
||||
alt={platform}
|
||||
/>
|
||||
) : (
|
||||
<span className="rounded-md inline-flex text-white justify-center items-center bg-zinc-300 w-6 h-6">
|
||||
<i className="icon-[mingcute--planet-line] text-xl" />
|
||||
|
||||
@@ -10,8 +10,8 @@ export default function PostMeta({ cover }: { cover?: string }) {
|
||||
className="object-cover rounded"
|
||||
alt="cover"
|
||||
src={cover}
|
||||
width={96}
|
||||
height={96}
|
||||
width={192}
|
||||
height={192}
|
||||
></Image>
|
||||
</div>
|
||||
<div className="xlog-post-cover flex sm:hidden items-center relative w-full h-40 mt-2 sm:ml-4 sm:mt-0">
|
||||
|
||||
@@ -17,6 +17,7 @@ export default async function SiteFooter({
|
||||
const LogoWithLink = () => {
|
||||
return (
|
||||
<UniLink
|
||||
aria-label="xLog"
|
||||
href={SITE_URL}
|
||||
className="inline-flex items-center align-text-top mx-1"
|
||||
>
|
||||
|
||||
@@ -52,6 +52,7 @@ export default function SiteHome({ handle }: { handle: string }) {
|
||||
href={getSlugUrl(`/${post.metadata?.content?.slug}`)}
|
||||
className="xlog-post focus-visible:outline focus-visible:outline-accent sm:hover:bg-hover bg-white transition-colors px-5 py-7 -mx-5 first:-mt-5 sm:rounded-xl flex flex-col sm:flex-row items-center"
|
||||
suppressHydrationWarning
|
||||
aria-label={post.metadata?.content?.title}
|
||||
>
|
||||
<div className="flex-1 flex justify-center flex-col w-full min-w-0">
|
||||
<h3 className="xlog-post-title text-2xl font-bold text-zinc-700">
|
||||
|
||||
@@ -98,6 +98,7 @@ export const FABBase: FC<
|
||||
className,
|
||||
)}
|
||||
onTransitionEnd={handleTransitionEnd}
|
||||
aria-label="back to top"
|
||||
{...rest}
|
||||
>
|
||||
{children}
|
||||
|
||||
Reference in New Issue
Block a user