diff --git a/.prettierignore b/.prettierignore index 973b913e..39344cd6 100644 --- a/.prettierignore +++ b/.prettierignore @@ -5,3 +5,4 @@ out/ dist/ test-fixtures/ node_modules/ +src-tauri/ diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index d4500810..c753450b 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -119,7 +119,7 @@ "resizable": true, "width": 1100, "height": 800, - "minWidth": 1000, + "minWidth": 800, "minHeight": 700 } ] diff --git a/src/app/daily/components/header.tsx b/src/app/daily/components/header.tsx new file mode 100644 index 00000000..4398328e --- /dev/null +++ b/src/app/daily/components/header.tsx @@ -0,0 +1,12 @@ +import { CreateViewModal } from '@lume/app/daily/components/views/createModal'; + +export const Header = () => { + return ( +
+ + +
+ ); +}; diff --git a/src/app/daily/components/views/createModal.tsx b/src/app/daily/components/views/createModal.tsx new file mode 100644 index 00000000..1495383c --- /dev/null +++ b/src/app/daily/components/views/createModal.tsx @@ -0,0 +1,94 @@ +import CancelIcon from '@lume/shared/icons/cancel'; +import PlusIcon from '@lume/shared/icons/plus'; +import { getNoteAuthors } from '@lume/utils/storage'; + +import { Dialog, Transition } from '@headlessui/react'; +import { Fragment, useState } from 'react'; +import useSWR from 'swr'; + +const fetcher = () => getNoteAuthors(); + +export const CreateViewModal = () => { + const { data, error }: any = useSWR('authors', fetcher); + const [isOpen, setIsOpen] = useState(false); + + const closeModal = () => { + setIsOpen(false); + }; + + const openModal = () => { + setIsOpen(true); + }; + + return ( + <> + + + + +
+ +
+ + +
+
+
+ + Create a view + + +
+ + View is specific feature help you pin who you want to see in your feed. You can add maximum 5 + people in a view. + +
+
+
+ {error && <>failed to fetch} + {!data ? <>loading... : data.map((author) =>
{author.pubkey}
)} +
+
+
+
+
+
+ + ); +}; diff --git a/src/app/daily/pages/index.page.tsx b/src/app/daily/pages/index.page.tsx index ee0a4e4e..ed0fcaf1 100644 --- a/src/app/daily/pages/index.page.tsx +++ b/src/app/daily/pages/index.page.tsx @@ -1,3 +1,4 @@ +import { Header } from '@lume/app/daily/components/header'; import NoteBase from '@lume/app/note/components/base'; import { NoteQuoteRepost } from '@lume/app/note/components/quoteRepost'; import { getNotes } from '@lume/utils/storage'; @@ -50,7 +51,9 @@ export function Page() { className="scrollbar-hide flex h-full flex-col justify-between gap-1.5 overflow-y-auto" style={{ contain: 'strict' }} > -
+
+
+
{status === 'loading' ? (