diff --git a/moon/apps/web/components/Issues/IssueNewPage.tsx b/moon/apps/web/components/Issues/IssueNewPage.tsx index 7ba42ab16..feee4073a 100644 --- a/moon/apps/web/components/Issues/IssueNewPage.tsx +++ b/moon/apps/web/components/Issues/IssueNewPage.tsx @@ -6,6 +6,8 @@ import { ItemInput } from '@primer/react/lib/deprecated/ActionList' import { useRouter } from 'next/router' import toast from 'react-hot-toast' +import '@primer/primitives/dist/css/functional/themes/light.css' + import { Button, HelpIcon, Link, PicturePlusIcon } from '@gitmono/ui' import { EMPTY_HTML } from '@/atoms/markdown' @@ -183,19 +185,21 @@ export default function IssueNewPage() {
-
- - Add a title - setTitle(e.target.value)} - className='w-full' - /> - - +
+
+ + Add a title + setTitle(e.target.value)} + className='new-issue-input no-border-input w-full' + /> + +
+ Add a description -
+
{ return ( diff --git a/moon/apps/web/components/SimpleNoteEditor/SimpleNoteContent.tsx b/moon/apps/web/components/SimpleNoteEditor/SimpleNoteContent.tsx index c97de8b53..e35f9c718 100644 --- a/moon/apps/web/components/SimpleNoteEditor/SimpleNoteContent.tsx +++ b/moon/apps/web/components/SimpleNoteEditor/SimpleNoteContent.tsx @@ -1,34 +1,25 @@ -import { - DragEvent, - forwardRef, - KeyboardEvent, - memo, - MouseEvent, - useImperativeHandle, - useRef, - useState -} from 'react' +import { DragEvent, forwardRef, KeyboardEvent, memo, MouseEvent, useImperativeHandle, useRef, useState } from 'react' import { Editor as TTEditor } from '@tiptap/core' import { EditorContent } from '@tiptap/react' import { ActiveEditorComment, BlurAtTopOptions } from '@gitmono/editor' import { LayeredHotkeys } from '@gitmono/ui' -import { AttachmentLightbox } from '@/components/AttachmentLightbox' -import { MentionList } from '@/components/MarkdownEditor/MentionList' -import { ReactionList } from '@/components/MarkdownEditor/ReactionList' -import { ResourceMentionList } from '@/components/MarkdownEditor/ResourceMentionList' -import { ADD_ATTACHMENT_SHORTCUT, SlashCommand } from '@/components/Post/Notes/SlashCommand' -import { useAutoScroll } from '@/hooks/useAutoScroll' import { EMPTY_HTML } from '@/atoms/markdown' +import { AttachmentLightbox } from '@/components/AttachmentLightbox' import { CodeBlockLanguagePicker } from '@/components/CodeBlockLanguagePicker' import { EditorBubbleMenu } from '@/components/EditorBubbleMenu' import { MentionInteractivity } from '@/components/InlinePost/MemberHovercard' +import { MentionList } from '@/components/MarkdownEditor/MentionList' +import { ReactionList } from '@/components/MarkdownEditor/ReactionList' +import { ResourceMentionList } from '@/components/MarkdownEditor/ResourceMentionList' import { DropProps, useEditorFileHandlers } from '@/components/MarkdownEditor/useEditorFileHandlers' import { HighlightCommentPopover } from '@/components/NoteComments/HighlightCommentPopover' import { useUploadNoteAttachments } from '@/components/Post/Notes/Attachments/useUploadAttachments' import { NoteCommentPreview } from '@/components/Post/Notes/CommentRenderer' +import { ADD_ATTACHMENT_SHORTCUT, SlashCommand } from '@/components/Post/Notes/SlashCommand' import { useSimpleNoteEditor } from '@/components/SimpleNoteEditor/useSimpleNoteEditor' +import { useAutoScroll } from '@/hooks/useAutoScroll' interface Props { commentId: string @@ -130,7 +121,7 @@ export const SimpleNoteContent = memo( }) return ( -
+
{ @@ -191,4 +182,4 @@ export const SimpleNoteContent = memo( }) ) -SimpleNoteContent.displayName = 'SimpleNoteContent' \ No newline at end of file +SimpleNoteContent.displayName = 'SimpleNoteContent' diff --git a/moon/apps/web/pages/[org]/issue/new/index.tsx b/moon/apps/web/pages/[org]/issue/new/index.tsx index d5dfb98d0..9b7fc8796 100644 --- a/moon/apps/web/pages/[org]/issue/new/index.tsx +++ b/moon/apps/web/pages/[org]/issue/new/index.tsx @@ -1,8 +1,6 @@ import { BaseStyles, ThemeProvider } from '@primer/react' import { useRouter } from 'next/router' -import '@primer/primitives/dist/css/functional/themes/light.css' - import IssueNewPage from '@/components/Issues/IssueNewPage' import { AppLayout } from '@/components/Layout/AppLayout' import { AuthAppProviders } from '@/components/Providers/AuthAppProviders' diff --git a/moon/apps/web/styles/global.css b/moon/apps/web/styles/global.css index bab2ecc78..2c1f28630 100644 --- a/moon/apps/web/styles/global.css +++ b/moon/apps/web/styles/global.css @@ -99,6 +99,20 @@ --base-shadow-color: rgb(0 0 0 / 0.05); } } + + .no-border-input input:focus, + .no-border-input input:focus-visible { + @apply outline-none; /* Tailwind 内置类,去除默认轮廓 */ + border-color: transparent !important; + box-shadow: none !important; + } + .new-issue-input { + height: 24px !important; + line-height: 24px !important; + } + .new-issue-side-input input { + line-height: 1 !important; + } } .dark, @@ -216,7 +230,7 @@ body.grabbing * { } } .copyable-text { - @apply select-text; + @apply select-text; } }