fix notecreator layout

This commit is contained in:
Martti Malmi
2023-12-12 14:04:38 +02:00
parent fce7cc70a3
commit dcb3389aa1
4 changed files with 7 additions and 2 deletions

View File

@ -78,6 +78,7 @@
justify-content: center; justify-content: center;
width: 32px; width: 32px;
height: 32px; height: 32px;
cursor: pointer;
} }
.note-creator-icon.pfp .avatar { .note-creator-icon.pfp .avatar {

View File

@ -498,7 +498,7 @@ export function NoteCreator() {
function noteCreatorFooter() { function noteCreatorFooter() {
return ( return (
<div className="flex items-center justify-between"> <div className="flex justify-between">
<div className="flex items-center g8"> <div className="flex items-center g8">
<ProfileImage <ProfileImage
pubkey={login.publicKey ?? ""} pubkey={login.publicKey ?? ""}
@ -506,6 +506,7 @@ export function NoteCreator() {
link="" link=""
showUsername={false} showUsername={false}
showFollowDistance={false} showFollowDistance={false}
showProfileCard={false}
/> />
{note.pollOptions === undefined && !note.replyTo && ( {note.pollOptions === undefined && !note.replyTo && (
<AsyncIcon <AsyncIcon
@ -598,6 +599,7 @@ export function NoteCreator() {
options={{ options={{
showFooter: false, showFooter: false,
showContextMenu: false, showContextMenu: false,
showProfileCard: false,
showTime: false, showTime: false,
canClick: false, canClick: false,
showMedia: false, showMedia: false,
@ -681,7 +683,7 @@ export function NoteCreator() {
if (!note.show) return null; if (!note.show) return null;
return ( return (
<Modal id="note-creator" className="note-creator-modal" onClose={reset}> <Modal id="note-creator" bodyClassName="modal-body flex flex-col gap-4" className="note-creator-modal" onClose={reset}>
{noteCreatorForm()} {noteCreatorForm()}
</Modal> </Modal>
); );

View File

@ -26,6 +26,7 @@ export interface NoteProps {
isRoot?: boolean; isRoot?: boolean;
showHeader?: boolean; showHeader?: boolean;
showContextMenu?: boolean; showContextMenu?: boolean;
showProfileCard?: boolean;
showTime?: boolean; showTime?: boolean;
showPinned?: boolean; showPinned?: boolean;
showBookmarked?: boolean; showBookmarked?: boolean;

View File

@ -335,6 +335,7 @@ export function NoteInner(props: NoteProps) {
pubkey={ev.pubkey} pubkey={ev.pubkey}
subHeader={replyTag() ?? undefined} subHeader={replyTag() ?? undefined}
link={opt?.canClick === undefined ? undefined : ""} link={opt?.canClick === undefined ? undefined : ""}
showProfileCard={options.showProfileCard ?? true}
/> />
<div className="info"> <div className="info">
{props.context} {props.context}