Skip to content

Commit 388b858

Browse files
committed
fix(MobilePadTitle): replace comment icon with notification icon and adjust layout for better responsiveness
1 parent 4c4c8c5 commit 388b858

1 file changed

Lines changed: 10 additions & 7 deletions

File tree

packages/webapp/src/components/TipTap/pad-title-section/MobilePadTitle.tsx

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import React, { useState } from 'react'
77
import { Avatar } from '@components/ui/Avatar'
88
import Button from '@components/ui/Button'
99
import { useAuthStore } from '@stores'
10-
import { MdMenu, MdInsertComment } from 'react-icons/md'
10+
import { MdMenu, MdNotifications } from 'react-icons/md'
1111
import ProfilePanel from '@components/pages/panels/profile/ProfilePanel'
1212
import TabLayout from '@components/pages/TabLayout'
1313
import SignInPanel from '@components/pages/panels/SignInPanel'
@@ -79,9 +79,12 @@ const NotificationButton = () => {
7979
className="btn-ghost tooltip tooltip-bottom relative p-2"
8080
data-tip="Notifications"
8181
onClick={openNotifications}>
82-
<MdInsertComment size={26} className="text-docsy" />
82+
<MdNotifications
83+
size={26}
84+
className={`text-docsy ${unreadCount > 0 ? 'text-docsy' : 'text-docsy/80'}`}
85+
/>
8386
{unreadCount > 0 && (
84-
<div className="absolute top-[2px] right-[2px] flex h-5 w-5 items-center justify-center rounded-full bg-red-500 text-xs text-white">
87+
<div className="absolute top-[2px] right-[2px] flex h-4.5 w-4.5 items-center justify-center rounded-full bg-red-500 text-xs text-white">
8588
{unreadCount}
8689
</div>
8790
)}
@@ -124,20 +127,20 @@ const MobilePadTitle = () => {
124127
<>
125128
<div className="docTitle sticky top-0 left-0 z-10 h-auto w-full bg-white">
126129
<div className="relative z-10 flex min-h-12 w-full flex-col items-center border-b border-gray-300 bg-white p-2">
127-
<div className="flex w-full flex-row items-center justify-between gap-4">
128-
<div className="flex w-[80%] items-center gap-2">
130+
<div className="flex w-full flex-row items-center justify-between gap-2">
131+
<div className="flex min-w-0 flex-1 items-center gap-2">
129132
<EditableToggle isEditable={isEditable} />
130133

131134
{isEditable ? (
132135
<UndoRedoButtons editor={editor} className="ml-4" />
133136
) : (
134-
<div className="w-[calc(100%-40px)] overflow-hidden">
137+
<div className="min-w-0 flex-1 overflow-hidden">
135138
<DocTitle className="truncate text-sm font-medium" />
136139
</div>
137140
)}
138141
</div>
139142

140-
<div className="flex w-[20%] items-center justify-end gap-2">
143+
<div className="flex shrink-0 items-center gap-1">
141144
<ReadOnlyIndicator />
142145
<NotificationButton />
143146
<UserProfileButton user={user} onProfileClick={() => setProfileModalOpen(true)} />

0 commit comments

Comments
 (0)