restructure

This commit is contained in:
Ren Amamiya 2023-05-11 16:43:07 +07:00
parent 62d6f06b39
commit 2804d25f06
18 changed files with 105 additions and 8 deletions

View File

@ -31,6 +31,8 @@
"react-markdown": "^8.0.7",
"react-virtuoso": "^4.3.5",
"remark-gfm": "^3.0.1",
"slate": "^0.94.1",
"slate-react": "^0.94.0",
"swr": "^2.1.5",
"tailwind-merge": "^1.12.0",
"tauri-plugin-sql-api": "github:tauri-apps/tauri-plugin-sql",

View File

@ -52,6 +52,12 @@ dependencies:
remark-gfm:
specifier: ^3.0.1
version: 3.0.1
slate:
specifier: ^0.94.1
version: 0.94.1
slate-react:
specifier: ^0.94.0
version: 0.94.0(react-dom@18.2.0)(react@18.2.0)(slate@0.94.1)
swr:
specifier: ^2.1.5
version: 2.1.5(react@18.2.0)
@ -702,6 +708,11 @@ packages:
'@jridgewell/resolve-uri': 3.1.0
'@jridgewell/sourcemap-codec': 1.4.14
/@juggle/resize-observer@3.4.0:
resolution:
{ integrity: sha512-dfLbk+PwWvFzSxwk3n5ySL0hfBog779o8h68wK/7/APo/7cgyWp5jcXockbxdk5kFRkbeXWm4Fbi9FrdN381sA== }
dev: false
/@maverick-js/signals@5.9.4:
resolution:
{ integrity: sha512-NJizvl2Pk0pWOjB+h0u2k+9pbdcF/zQf3Msohc79cldwhHXbWoPakIAQphrRdxtLUHBM1hm3ZJwVndI+on0+Zg== }
@ -1102,11 +1113,21 @@ packages:
'@types/unist': 2.0.6
dev: false
/@types/is-hotkey@0.1.7:
resolution:
{ integrity: sha512-yB5C7zcOM7idwYZZ1wKQ3pTfjA9BbvFqRWvKB46GFddxnJtHwi/b9y84ykQtxQPg5qhdpg4Q/kWU3EGoCTmLzQ== }
dev: false
/@types/json-schema@7.0.11:
resolution:
{ integrity: sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ== }
dev: true
/@types/lodash@4.14.194:
resolution:
{ integrity: sha512-r22s9tAS7imvBt2lyHC9B8AGwWnXaYb1tY09oyLkXDs4vArpYJzw09nj8MLx5VfciBPGIb+ZwG0ssYnEPJxn/g== }
dev: false
/@types/mdast@3.0.11:
resolution:
{ integrity: sha512-Y/uImid8aAwrEA24/1tcRZwpxX3pIFTSilcNDKSPn+Y2iDywSEachzRuvgAYYLR3wpGXAsMbv5lvKLDZLeYPAw== }
@ -1725,6 +1746,11 @@ packages:
engines: { node: '>= 6' }
dev: true
/compute-scroll-into-view@1.0.20:
resolution:
{ integrity: sha512-UCB0ioiyj8CRjtrvaceBLqqhZCVP+1B8+NWQhmdsm0VXOJtobBCf1dBQmebCCo34qZmUwZfIH2MZLqNHazrfjg== }
dev: false
/concat-map@0.0.1:
resolution:
{ integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== }
@ -1828,6 +1854,12 @@ packages:
path-type: 4.0.0
dev: true
/direction@1.0.4:
resolution:
{ integrity: sha512-GYqKi1aH7PJXxdhTeZBFrg8vUBeKXi+cNprXsC1kpJcbcVnV9wBsrOu1cQEdG0WeQwlfHiy3XvnKfIrJ2R0NzQ== }
hasBin: true
dev: false
/dlv@1.1.3:
resolution:
{ integrity: sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA== }
@ -2522,6 +2554,11 @@ packages:
engines: { node: '>= 4' }
dev: true
/immer@9.0.21:
resolution:
{ integrity: sha512-bc4NBHqOqSfRW7POMkHd51LvClaeMXpm8dx0e8oE2GORbq5aRK7Bxl4FyzVLdGtLmvLKL7BTDBG5ACQm4HWjTA== }
dev: false
/import-fresh@3.3.0:
resolution:
{ integrity: sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw== }
@ -2657,6 +2694,11 @@ packages:
is-extglob: 2.1.1
dev: true
/is-hotkey@0.1.8:
resolution:
{ integrity: sha512-qs3NZ1INIS+H+yeo7cD9pDfwYV/jqRh1JG9S9zYrNudkoUQg7OL7ziXqRKu+InFjUIDoP2o6HIkLYMh1pcWgyQ== }
dev: false
/is-negative-zero@2.0.2:
resolution:
{ integrity: sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA== }
@ -2689,6 +2731,12 @@ packages:
engines: { node: '>=12' }
dev: false
/is-plain-object@5.0.0:
resolution:
{ integrity: sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q== }
engines: { node: '>=0.10.0' }
dev: false
/is-regex@1.1.4:
resolution:
{ integrity: sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg== }
@ -2923,7 +2971,6 @@ packages:
/lodash@4.17.21:
resolution:
{ integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== }
dev: true
/log-update@4.0.0:
resolution:
@ -4162,6 +4209,13 @@ packages:
loose-envify: 1.4.0
dev: false
/scroll-into-view-if-needed@2.2.31:
resolution:
{ integrity: sha512-dGCXy99wZQivjmjIqihaBQNjryrz5rueJY7eHfTdyWEiR4ttYpsajb14rn9s5d4DY4EcY6+4+U/maARBXJedkA== }
dependencies:
compute-scroll-into-view: 1.0.20
dev: false
/semver@6.3.0:
resolution:
{ integrity: sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== }
@ -4221,6 +4275,37 @@ packages:
engines: { node: '>=8' }
dev: true
/slate-react@0.94.0(react-dom@18.2.0)(react@18.2.0)(slate@0.94.1):
resolution:
{ integrity: sha512-8LW3HdC3Rya+3E1Gm5voyXdEfQrJGvm0QYl0bgtW2C06Dh82imxhGIPqRv2sj8j2Zf869oJGNp2bGUoCuNBJ6g== }
peerDependencies:
react: '>=16.8.0'
react-dom: '>=16.8.0'
slate: '>=0.65.3'
dependencies:
'@juggle/resize-observer': 3.4.0
'@types/is-hotkey': 0.1.7
'@types/lodash': 4.14.194
direction: 1.0.4
is-hotkey: 0.1.8
is-plain-object: 5.0.0
lodash: 4.17.21
react: 18.2.0
react-dom: 18.2.0(react@18.2.0)
scroll-into-view-if-needed: 2.2.31
slate: 0.94.1
tiny-invariant: 1.0.6
dev: false
/slate@0.94.1:
resolution:
{ integrity: sha512-GH/yizXr1ceBoZ9P9uebIaHe3dC/g6Plpf9nlUwnvoyf6V1UOYrRwkabtOCd3ZfIGxomY4P7lfgLr7FPH8/BKA== }
dependencies:
immer: 9.0.21
is-plain-object: 5.0.0
tiny-warning: 1.0.3
dev: false
/slice-ansi@3.0.0:
resolution:
{ integrity: sha512-pSyv7bSTC7ig9Dcgbw9AuRNUb5k5V6oDudjZoMBSr13qpLBG7tB+zgCkARjq7xIUgdz5P1Qe8u+rSGdouOOIyQ== }
@ -4485,6 +4570,16 @@ packages:
{ integrity: sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg== }
dev: true
/tiny-invariant@1.0.6:
resolution:
{ integrity: sha512-FOyLWWVjG+aC0UqG76V53yAWdXfH8bO6FNmyZOuUrzDzK8DI3/JRY25UD7+g49JWM1LXwymsKERB+DzI0dTEQA== }
dev: false
/tiny-warning@1.0.3:
resolution:
{ integrity: sha512-lBN9zLN/oAf68o3zNXYrdCt1kP8WsiGW8Oo2ka41b2IM5JL/S1CTyX1rW0mb/zSuJun0ZUrDxx4sqvYS2FWzPA== }
dev: false
/to-fast-properties@2.0.0:
resolution:
{ integrity: sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog== }

View File

@ -1,3 +1,5 @@
import User from '@app/auth/components/user';
import { RelayContext } from '@shared/relayProvider';
import CheckCircleIcon from '@icons/checkCircle';
@ -13,8 +15,6 @@ import { getEventHash, signEvent } from 'nostr-tools';
import { useContext, useState } from 'react';
import { navigate } from 'vite-plugin-ssr/client/router';
import User from '../../../components/user';
const initialList = [
{ pubkey: '82341f882b6eabcd2ba7f1ef90aad961cf074af15b9ef44a09f9d2a8fbfbe6a2' },
{ pubkey: 'a341f45ff9758f570a21b000c17d4e53a3a497c8397f26c0e6d61e5acffc7a98' },

View File

@ -177,7 +177,7 @@ export function Page() {
() => {
updateLastLogin(dateToUnix(now.current));
timeout = setTimeout(() => {
navigate('/app/radar', { overwriteLastHistoryEntry: true });
navigate('/app/today', { overwriteLastHistoryEntry: true });
}, 5000);
}
);

View File

@ -1,4 +1,4 @@
import { CreateViewModal } from '@app/radar/components/views/createModal';
import { CreateViewModal } from '@app/today/components/views/createModal';
export function Header() {
return (

View File

@ -1,7 +1,7 @@
import { NoteBase } from '@app/note/components/base';
import { NoteQuoteRepost } from '@app/note/components/quoteRepost';
import { NoteSkeleton } from '@app/note/components/skeleton';
import { Header } from '@app/radar/components/header';
import { Header } from '@app/today/components/header';
import { getNotes } from '@utils/storage';

View File

@ -26,14 +26,14 @@ export default function Navigation() {
</div>
<div className="flex flex-col text-zinc-400">
<ActiveLink
href="/app/radar"
href="/app/today"
className="flex h-8 items-center gap-2.5 rounded-md px-2.5 text-[13px] font-semibold hover:text-zinc-200"
activeClassName=""
>
<span className="inline-flex h-5 w-5 items-center justify-center rounded bg-zinc-900">
<WorldIcon width={12} height={12} className="text-zinc-200" />
</span>
<span>Radar</span>
<span>Today</span>
</ActiveLink>
<ActiveLink
href="/app/threads"