mirror of
https://github.com/luminous-devs/lume.git
synced 2024-09-18 11:13:30 +00:00
expt: disable note metadata
This commit is contained in:
parent
4309f734b6
commit
37668393f1
@ -18,7 +18,7 @@ export const SimpleNote = memo(function SimpleNote({ id }: { id: string }) {
|
|||||||
const openThread = (event, thread: string) => {
|
const openThread = (event, thread: string) => {
|
||||||
const selection = window.getSelection();
|
const selection = window.getSelection();
|
||||||
if (selection.toString().length === 0) {
|
if (selection.toString().length === 0) {
|
||||||
setWidget(db, { kind: WidgetKinds.thread, title: 'Thread', content: thread });
|
setWidget(db, { kind: WidgetKinds.local.thread, title: 'Thread', content: thread });
|
||||||
} else {
|
} else {
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
}
|
}
|
||||||
|
@ -61,7 +61,7 @@ export function NoteActions({
|
|||||||
type="button"
|
type="button"
|
||||||
onClick={() =>
|
onClick={() =>
|
||||||
setWidget(db, {
|
setWidget(db, {
|
||||||
kind: WidgetKinds.thread,
|
kind: WidgetKinds.local.thread,
|
||||||
title: 'Thread',
|
title: 'Thread',
|
||||||
content: id,
|
content: id,
|
||||||
})
|
})
|
||||||
|
@ -5,7 +5,6 @@ import {
|
|||||||
ArticleNote,
|
ArticleNote,
|
||||||
FileNote,
|
FileNote,
|
||||||
NoteActions,
|
NoteActions,
|
||||||
NoteMetadata,
|
|
||||||
NoteSkeleton,
|
NoteSkeleton,
|
||||||
RepostUser,
|
RepostUser,
|
||||||
TextNote,
|
TextNote,
|
||||||
@ -62,7 +61,7 @@ export function Repost({ event }: { event: NDKEvent }) {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="h-min w-full px-3 pb-3">
|
<div className="h-min w-full px-3 pb-3">
|
||||||
<div className="relative overflow-hidden rounded-xl bg-white/10 px-3 pt-3 backdrop-blur-xl">
|
<div className="relative overflow-hidden rounded-xl bg-white/10 px-3 py-3 backdrop-blur-xl">
|
||||||
<div className="relative flex flex-col">
|
<div className="relative flex flex-col">
|
||||||
<div className="isolate flex flex-col -space-y-4">
|
<div className="isolate flex flex-col -space-y-4">
|
||||||
<RepostUser pubkey={event.pubkey} />
|
<RepostUser pubkey={event.pubkey} />
|
||||||
@ -75,7 +74,6 @@ export function Repost({ event }: { event: NDKEvent }) {
|
|||||||
<NoteActions id={repostID} pubkey={data.pubkey} />
|
<NoteActions id={repostID} pubkey={data.pubkey} />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<NoteMetadata id={repostID} />
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -95,7 +95,7 @@ export function NoteMetadata({ id }: { id: string }) {
|
|||||||
type="button"
|
type="button"
|
||||||
onClick={() =>
|
onClick={() =>
|
||||||
setWidget(db, {
|
setWidget(db, {
|
||||||
kind: WidgetKinds.thread,
|
kind: WidgetKinds.local.thread,
|
||||||
title: 'Thread',
|
title: 'Thread',
|
||||||
content: id,
|
content: id,
|
||||||
})
|
})
|
||||||
|
@ -1,26 +1,24 @@
|
|||||||
import { NDKEvent } from '@nostr-dev-kit/ndk';
|
import { NDKEvent } from '@nostr-dev-kit/ndk';
|
||||||
import { ReactNode } from 'react';
|
import { ReactNode } from 'react';
|
||||||
|
|
||||||
import { ChildNote, NoteActions, NoteMetadata } from '@shared/notes';
|
import { ChildNote, NoteActions } from '@shared/notes';
|
||||||
import { User } from '@shared/user';
|
import { User } from '@shared/user';
|
||||||
|
|
||||||
export function NoteWrapper({
|
export function NoteWrapper({
|
||||||
event,
|
event,
|
||||||
children,
|
children,
|
||||||
meta = true,
|
|
||||||
root,
|
root,
|
||||||
reply,
|
reply,
|
||||||
}: {
|
}: {
|
||||||
event: NDKEvent;
|
event: NDKEvent;
|
||||||
children: ReactNode;
|
children: ReactNode;
|
||||||
repost?: boolean;
|
repost?: boolean;
|
||||||
meta?: boolean;
|
|
||||||
root?: string;
|
root?: string;
|
||||||
reply?: string;
|
reply?: string;
|
||||||
}) {
|
}) {
|
||||||
return (
|
return (
|
||||||
<div className="h-min w-full px-3 pb-3">
|
<div className="h-min w-full px-3 pb-3">
|
||||||
<div className="relative overflow-hidden rounded-xl bg-white/10 px-3 pt-3 backdrop-blur-xl">
|
<div className="relative overflow-hidden rounded-xl bg-white/10 px-3 py-3 backdrop-blur-xl">
|
||||||
<div className="relative">{root && <ChildNote id={root} />}</div>
|
<div className="relative">{root && <ChildNote id={root} />}</div>
|
||||||
<div className="relative">{reply && <ChildNote id={reply} root={root} />}</div>
|
<div className="relative">{reply && <ChildNote id={reply} root={root} />}</div>
|
||||||
<div className="relative flex flex-col">
|
<div className="relative flex flex-col">
|
||||||
@ -32,7 +30,6 @@ export function NoteWrapper({
|
|||||||
<NoteActions id={event.id} pubkey={event.pubkey} />
|
<NoteActions id={event.id} pubkey={event.pubkey} />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{meta ? <NoteMetadata id={event.id} /> : <div className="pb-3" />}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user