Skip to content

Commit

Permalink
fix: ui improve
Browse files Browse the repository at this point in the history
Signed-off-by: Innei <i@innei.in>
  • Loading branch information
Innei committed Jul 9, 2023
1 parent dbf1dd4 commit 18e7bdd
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/components/widgets/note/NoteActionAside.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ const ShareButton = () => {
else {
present({
title: '分享此内容',
clickOutsideToDismiss: true,
content: () => <ShareModal text={text} title={title} url={url} />,
})
}
Expand Down
1 change: 1 addition & 0 deletions src/components/widgets/post/PostActionAside.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ const ShareButton = () => {
else {
present({
title: '分享此内容',
clickOutsideToDismiss: true,
content: () => <ShareModal text={text} title={title} url={url} />,
})
}
Expand Down
9 changes: 7 additions & 2 deletions src/components/widgets/shared/WithArticleSelectionAction.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { useEffect, useRef, useState } from 'react'
import clsx from 'clsx'
import { AnimatePresence, m } from 'framer-motion'

import { useIsMobile } from '~/atoms'
Expand Down Expand Up @@ -68,8 +69,10 @@ export const WithArticleSelectionAction: Component<{
<AnimatePresence>
{show && (
<m.div
className="absolute z-10 rounded-md border border-slate-200/90 bg-slate-100 px-4 py-3 text-sm dark:border-neutral-800/90 dark:bg-zinc-900"
data-event="selection-action"
className={clsx(
'absolute z-10 rounded-lg bg-gradient-to-b from-zinc-50/50 to-white/90 p-1 text-sm shadow-lg shadow-zinc-800/5 ring-1 ring-zinc-900/5',
'dark:from-zinc-900/50 dark:to-zinc-800/90 dark:ring-white/10 dark:hover:ring-white/20',
)}
style={{
left: pos.x,
top: pos.y,
Expand All @@ -82,6 +85,8 @@ export const WithArticleSelectionAction: Component<{
}}
>
<MotionButtonBase
data-event="selection-comment"
className="rounded-md px-2 py-1 hover:bg-slate-100/80 dark:hover:bg-zinc-900/90"
onClick={() => {
present({
title: '评论',
Expand Down

1 comment on commit 18e7bdd

@vercel
Copy link

@vercel vercel bot commented on 18e7bdd Jul 9, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

shiro – ./

springtide.vercel.app
shiro-innei.vercel.app
shiro-git-main-innei.vercel.app
innei.in

Please sign in to comment.