mirror of
https://github.com/lumehq/lume.git
synced 2025-03-18 05:41:53 +01:00
chore: follow-up #236
This commit is contained in:
parent
090a815f99
commit
8c6aea8050
@ -11,10 +11,10 @@
|
||||
{
|
||||
"default": true,
|
||||
"official": true,
|
||||
"label": "columns_gallery",
|
||||
"name": "Columns Gallery",
|
||||
"label": "Launchpad",
|
||||
"name": "Launchpad",
|
||||
"description": "Expand your experiences.",
|
||||
"url": "/columns/gallery",
|
||||
"url": "/columns/launchpad",
|
||||
"picture": ""
|
||||
},
|
||||
{
|
||||
|
@ -1,2 +1,3 @@
|
||||
wss://relay.damus.io,
|
||||
wss://relay.nostr.net,
|
||||
wss://nos.lol,
|
||||
|
@ -60,8 +60,8 @@ const ColumnsLayoutOnboardingLazyImport = createFileRoute(
|
||||
const ColumnsLayoutNotificationLazyImport = createFileRoute(
|
||||
'/columns/_layout/notification',
|
||||
)()
|
||||
const ColumnsLayoutGalleryLazyImport = createFileRoute(
|
||||
'/columns/_layout/gallery',
|
||||
const ColumnsLayoutLaunchpadLazyImport = createFileRoute(
|
||||
'/columns/_layout/launchpad',
|
||||
)()
|
||||
const ColumnsLayoutUsersIdLazyImport = createFileRoute(
|
||||
'/columns/_layout/users/$id',
|
||||
@ -199,11 +199,13 @@ const ColumnsLayoutNotificationLazyRoute =
|
||||
import('./routes/columns/_layout/notification.lazy').then((d) => d.Route),
|
||||
)
|
||||
|
||||
const ColumnsLayoutGalleryLazyRoute = ColumnsLayoutGalleryLazyImport.update({
|
||||
path: '/gallery',
|
||||
getParentRoute: () => ColumnsLayoutRoute,
|
||||
} as any).lazy(() =>
|
||||
import('./routes/columns/_layout/gallery.lazy').then((d) => d.Route),
|
||||
const ColumnsLayoutLaunchpadLazyRoute = ColumnsLayoutLaunchpadLazyImport.update(
|
||||
{
|
||||
path: '/launchpad',
|
||||
getParentRoute: () => ColumnsLayoutRoute,
|
||||
} as any,
|
||||
).lazy(() =>
|
||||
import('./routes/columns/_layout/launchpad.lazy').then((d) => d.Route),
|
||||
)
|
||||
|
||||
const ColumnsLayoutStoriesRoute = ColumnsLayoutStoriesImport.update({
|
||||
@ -525,11 +527,11 @@ declare module '@tanstack/react-router' {
|
||||
preLoaderRoute: typeof ColumnsLayoutStoriesImport
|
||||
parentRoute: typeof ColumnsLayoutImport
|
||||
}
|
||||
'/columns/_layout/gallery': {
|
||||
id: '/columns/_layout/gallery'
|
||||
path: '/gallery'
|
||||
fullPath: '/columns/gallery'
|
||||
preLoaderRoute: typeof ColumnsLayoutGalleryLazyImport
|
||||
'/columns/_layout/launchpad': {
|
||||
id: '/columns/_layout/launchpad'
|
||||
path: '/launchpad'
|
||||
fullPath: '/columns/launchpad'
|
||||
preLoaderRoute: typeof ColumnsLayoutLaunchpadLazyImport
|
||||
parentRoute: typeof ColumnsLayoutImport
|
||||
}
|
||||
'/columns/_layout/notification': {
|
||||
@ -682,7 +684,7 @@ interface ColumnsLayoutRouteChildren {
|
||||
ColumnsLayoutGlobalRoute: typeof ColumnsLayoutGlobalRoute
|
||||
ColumnsLayoutNewsfeedRoute: typeof ColumnsLayoutNewsfeedRoute
|
||||
ColumnsLayoutStoriesRoute: typeof ColumnsLayoutStoriesRoute
|
||||
ColumnsLayoutGalleryLazyRoute: typeof ColumnsLayoutGalleryLazyRoute
|
||||
ColumnsLayoutLaunchpadLazyRoute: typeof ColumnsLayoutLaunchpadLazyRoute
|
||||
ColumnsLayoutNotificationLazyRoute: typeof ColumnsLayoutNotificationLazyRoute
|
||||
ColumnsLayoutOnboardingLazyRoute: typeof ColumnsLayoutOnboardingLazyRoute
|
||||
ColumnsLayoutSearchLazyRoute: typeof ColumnsLayoutSearchLazyRoute
|
||||
@ -700,7 +702,7 @@ const ColumnsLayoutRouteChildren: ColumnsLayoutRouteChildren = {
|
||||
ColumnsLayoutGlobalRoute: ColumnsLayoutGlobalRoute,
|
||||
ColumnsLayoutNewsfeedRoute: ColumnsLayoutNewsfeedRoute,
|
||||
ColumnsLayoutStoriesRoute: ColumnsLayoutStoriesRoute,
|
||||
ColumnsLayoutGalleryLazyRoute: ColumnsLayoutGalleryLazyRoute,
|
||||
ColumnsLayoutLaunchpadLazyRoute: ColumnsLayoutLaunchpadLazyRoute,
|
||||
ColumnsLayoutNotificationLazyRoute: ColumnsLayoutNotificationLazyRoute,
|
||||
ColumnsLayoutOnboardingLazyRoute: ColumnsLayoutOnboardingLazyRoute,
|
||||
ColumnsLayoutSearchLazyRoute: ColumnsLayoutSearchLazyRoute,
|
||||
@ -753,7 +755,7 @@ export interface FileRoutesByFullPath {
|
||||
'/columns/global': typeof ColumnsLayoutGlobalRoute
|
||||
'/columns/newsfeed': typeof ColumnsLayoutNewsfeedRoute
|
||||
'/columns/stories': typeof ColumnsLayoutStoriesRoute
|
||||
'/columns/gallery': typeof ColumnsLayoutGalleryLazyRoute
|
||||
'/columns/launchpad': typeof ColumnsLayoutLaunchpadLazyRoute
|
||||
'/columns/notification': typeof ColumnsLayoutNotificationLazyRoute
|
||||
'/columns/onboarding': typeof ColumnsLayoutOnboardingLazyRoute
|
||||
'/columns/search': typeof ColumnsLayoutSearchLazyRoute
|
||||
@ -793,7 +795,7 @@ export interface FileRoutesByTo {
|
||||
'/columns/global': typeof ColumnsLayoutGlobalRoute
|
||||
'/columns/newsfeed': typeof ColumnsLayoutNewsfeedRoute
|
||||
'/columns/stories': typeof ColumnsLayoutStoriesRoute
|
||||
'/columns/gallery': typeof ColumnsLayoutGalleryLazyRoute
|
||||
'/columns/launchpad': typeof ColumnsLayoutLaunchpadLazyRoute
|
||||
'/columns/notification': typeof ColumnsLayoutNotificationLazyRoute
|
||||
'/columns/onboarding': typeof ColumnsLayoutOnboardingLazyRoute
|
||||
'/columns/search': typeof ColumnsLayoutSearchLazyRoute
|
||||
@ -837,7 +839,7 @@ export interface FileRoutesById {
|
||||
'/columns/_layout/global': typeof ColumnsLayoutGlobalRoute
|
||||
'/columns/_layout/newsfeed': typeof ColumnsLayoutNewsfeedRoute
|
||||
'/columns/_layout/stories': typeof ColumnsLayoutStoriesRoute
|
||||
'/columns/_layout/gallery': typeof ColumnsLayoutGalleryLazyRoute
|
||||
'/columns/_layout/launchpad': typeof ColumnsLayoutLaunchpadLazyRoute
|
||||
'/columns/_layout/notification': typeof ColumnsLayoutNotificationLazyRoute
|
||||
'/columns/_layout/onboarding': typeof ColumnsLayoutOnboardingLazyRoute
|
||||
'/columns/_layout/search': typeof ColumnsLayoutSearchLazyRoute
|
||||
@ -879,7 +881,7 @@ export interface FileRouteTypes {
|
||||
| '/columns/global'
|
||||
| '/columns/newsfeed'
|
||||
| '/columns/stories'
|
||||
| '/columns/gallery'
|
||||
| '/columns/launchpad'
|
||||
| '/columns/notification'
|
||||
| '/columns/onboarding'
|
||||
| '/columns/search'
|
||||
@ -918,7 +920,7 @@ export interface FileRouteTypes {
|
||||
| '/columns/global'
|
||||
| '/columns/newsfeed'
|
||||
| '/columns/stories'
|
||||
| '/columns/gallery'
|
||||
| '/columns/launchpad'
|
||||
| '/columns/notification'
|
||||
| '/columns/onboarding'
|
||||
| '/columns/search'
|
||||
@ -960,7 +962,7 @@ export interface FileRouteTypes {
|
||||
| '/columns/_layout/global'
|
||||
| '/columns/_layout/newsfeed'
|
||||
| '/columns/_layout/stories'
|
||||
| '/columns/_layout/gallery'
|
||||
| '/columns/_layout/launchpad'
|
||||
| '/columns/_layout/notification'
|
||||
| '/columns/_layout/onboarding'
|
||||
| '/columns/_layout/search'
|
||||
@ -1091,7 +1093,7 @@ export const routeTree = rootRoute
|
||||
"/columns/_layout/global",
|
||||
"/columns/_layout/newsfeed",
|
||||
"/columns/_layout/stories",
|
||||
"/columns/_layout/gallery",
|
||||
"/columns/_layout/launchpad",
|
||||
"/columns/_layout/notification",
|
||||
"/columns/_layout/onboarding",
|
||||
"/columns/_layout/search",
|
||||
@ -1173,8 +1175,8 @@ export const routeTree = rootRoute
|
||||
"filePath": "columns/_layout/stories.tsx",
|
||||
"parent": "/columns/_layout"
|
||||
},
|
||||
"/columns/_layout/gallery": {
|
||||
"filePath": "columns/_layout/gallery.lazy.tsx",
|
||||
"/columns/_layout/launchpad": {
|
||||
"filePath": "columns/_layout/launchpad.lazy.tsx",
|
||||
"parent": "/columns/_layout"
|
||||
},
|
||||
"/columns/_layout/notification": {
|
||||
|
@ -217,16 +217,16 @@ function ManageButton() {
|
||||
|
||||
const menuItems = await Promise.all([
|
||||
MenuItem.new({
|
||||
text: "Open Columns Gallery",
|
||||
text: "Open Launchpad",
|
||||
action: () => LumeWindow.openColumnsGallery(),
|
||||
}),
|
||||
PredefinedMenuItem.new({ item: "Separator" }),
|
||||
MenuItem.new({
|
||||
text: "Add local feeds",
|
||||
text: "Open Newsfeed",
|
||||
action: () => LumeWindow.openLocalFeeds(),
|
||||
}),
|
||||
MenuItem.new({
|
||||
text: "Add notification",
|
||||
text: "Open Notification",
|
||||
action: () => LumeWindow.openNotification(),
|
||||
}),
|
||||
]);
|
||||
|
@ -10,7 +10,7 @@ import { resolveResource } from "@tauri-apps/api/path";
|
||||
import { readTextFile } from "@tauri-apps/plugin-fs";
|
||||
import { useCallback } from "react";
|
||||
|
||||
export const Route = createLazyFileRoute("/columns/_layout/gallery")({
|
||||
export const Route = createLazyFileRoute("/columns/_layout/launchpad")({
|
||||
component: Screen,
|
||||
});
|
||||
|
||||
@ -116,7 +116,8 @@ function MyGroups() {
|
||||
|
||||
const renderItem = useCallback(
|
||||
(item: NostrEvent) => {
|
||||
const name = item.tags.filter((tag) => tag[0] === "d")[0][1] ?? "unnamed";
|
||||
const name =
|
||||
item.tags.find((tag) => tag[0] === "title")?.[1] || "Unnamed";
|
||||
|
||||
return (
|
||||
<div
|
||||
@ -225,7 +226,8 @@ function MyInterests() {
|
||||
|
||||
const renderItem = useCallback(
|
||||
(item: NostrEvent) => {
|
||||
const name = item.tags.filter((tag) => tag[0] === "d")[0][1] ?? "unnamed";
|
||||
const name =
|
||||
item.tags.find((tag) => tag[0] === "title")?.[1] || "Unnamed";
|
||||
|
||||
return (
|
||||
<div
|
@ -10,7 +10,7 @@ import { useState, useTransition } from "react";
|
||||
|
||||
const TOPICS = [
|
||||
{
|
||||
title: "Popular",
|
||||
title: "Popular hashtags",
|
||||
content: [
|
||||
"#nostr",
|
||||
"#introductions",
|
||||
@ -119,6 +119,24 @@ function Screen() {
|
||||
<ScrollArea.Viewport className="bg-white dark:bg-black h-full p-3">
|
||||
<div className="mb-3 flex flex-col gap-2">
|
||||
<span className="text-sm font-semibold">Added</span>
|
||||
<div className="flex gap-2">
|
||||
<input
|
||||
name="hashtag"
|
||||
placeholder="#nostr"
|
||||
onChange={(e) => setHashtag(e.target.value)}
|
||||
onKeyDown={(event) => {
|
||||
if (event.key === "Enter") addHashtag();
|
||||
}}
|
||||
className="w-full px-3 text-sm border-none rounded-lg h-9 bg-neutral-100 dark:bg-neutral-900 placeholder:text-neutral-600 focus:border-neutral-500 focus:ring-0 dark:placeholder:text-neutral-400"
|
||||
/>
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => addHashtag()}
|
||||
className="inline-flex items-center justify-center text-neutral-500 rounded-lg size-9 bg-neutral-200 dark:bg-neutral-800 shrink-0 hover:bg-blue-500 hover:text-white"
|
||||
>
|
||||
<Plus className="size-5" />
|
||||
</button>
|
||||
</div>
|
||||
<div className="flex flex-col gap-2">
|
||||
{hashtags.length ? (
|
||||
hashtags.map((item: string) => (
|
||||
@ -139,50 +157,29 @@ function Screen() {
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
<div className="flex flex-col gap-2">
|
||||
<span className="text-sm font-semibold">Hashtags</span>
|
||||
<div className="flex gap-2">
|
||||
<input
|
||||
name="hashtag"
|
||||
placeholder="#nostr"
|
||||
onChange={(e) => setHashtag(e.target.value)}
|
||||
onKeyDown={(event) => {
|
||||
if (event.key === "Enter") addHashtag();
|
||||
}}
|
||||
className="w-full px-3 text-sm border-none rounded-lg h-9 bg-neutral-100 dark:bg-neutral-900 placeholder:text-neutral-600 focus:border-neutral-500 focus:ring-0 dark:placeholder:text-neutral-400"
|
||||
/>
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => addHashtag()}
|
||||
className="inline-flex items-center justify-center text-neutral-500 rounded-lg size-9 bg-neutral-200 dark:bg-neutral-800 shrink-0 hover:bg-blue-500 hover:text-white"
|
||||
>
|
||||
<Plus className="size-5" />
|
||||
</button>
|
||||
</div>
|
||||
<div className="mt-2 flex flex-col gap-4">
|
||||
{TOPICS.map((topic) => (
|
||||
<div key={topic.title} className="flex flex-col gap-2">
|
||||
<div className="text-sm font-semibold">{topic.title}</div>
|
||||
<div className="flex flex-wrap gap-2">
|
||||
{topic.content.map((item) => (
|
||||
<button
|
||||
key={item}
|
||||
type="button"
|
||||
onClick={() => toggleHashtag(item)}
|
||||
className={cn(
|
||||
"text-sm p-2 rounded-full",
|
||||
hashtags.includes(item)
|
||||
? "bg-blue-500 text-white"
|
||||
: "bg-neutral-100 dark:bg-neutral-900",
|
||||
)}
|
||||
>
|
||||
{item}
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
<div className="flex flex-col gap-4">
|
||||
{TOPICS.map((topic) => (
|
||||
<div key={topic.title} className="flex flex-col gap-2">
|
||||
<div className="text-sm font-semibold">{topic.title}</div>
|
||||
<div className="flex flex-wrap gap-2">
|
||||
{topic.content.map((item) => (
|
||||
<button
|
||||
key={item}
|
||||
type="button"
|
||||
onClick={() => toggleHashtag(item)}
|
||||
className={cn(
|
||||
"text-sm p-2 rounded-full",
|
||||
hashtags.includes(item)
|
||||
? "bg-blue-500 text-white"
|
||||
: "bg-neutral-100 dark:bg-neutral-900",
|
||||
)}
|
||||
>
|
||||
{item}
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</ScrollArea.Viewport>
|
||||
<ScrollArea.Scrollbar
|
||||
|
@ -15,9 +15,9 @@ export const LumeWindow = {
|
||||
await getCurrentWindow().emit("columns", {
|
||||
type: "add",
|
||||
column: {
|
||||
label: "columns_gallery",
|
||||
name: "Columns Gallery",
|
||||
url: "/columns/gallery",
|
||||
label: "launchpad",
|
||||
name: "Launchpad",
|
||||
url: "/columns/launchpad",
|
||||
},
|
||||
});
|
||||
},
|
||||
@ -25,8 +25,8 @@ export const LumeWindow = {
|
||||
await getCurrentWindow().emit("columns", {
|
||||
type: "add",
|
||||
column: {
|
||||
label: "local_feeds",
|
||||
name: "Local Feeds",
|
||||
label: "newsfeed",
|
||||
name: "Newsfeed",
|
||||
url: "/columns/newsfeed",
|
||||
},
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user