Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| efd3c83193 | |||
| 85fa1e2359 | |||
| cd6ba5884f | |||
| bfed56ba13 | |||
| d1018ba8d1 | |||
| a42542c16e | |||
| 26a6ec954c |
@@ -4,10 +4,7 @@
|
||||
"enabled": true
|
||||
},
|
||||
"files": {
|
||||
"ignore": [
|
||||
"./src/routes.gen.ts",
|
||||
"./src/commands.gen.ts"
|
||||
]
|
||||
"ignore": ["./src/routes.gen.ts", "./src/commands.gen.ts"]
|
||||
},
|
||||
"linter": {
|
||||
"enabled": true,
|
||||
|
||||
21
src-tauri/Cargo.lock
generated
21
src-tauri/Cargo.lock
generated
@@ -2987,8 +2987,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "keyring-search"
|
||||
version = "1.2.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8fba83ff0a0efb658afeaaa6de89c7abd3ccd34333f5a36d5dae417334fcd488"
|
||||
source = "git+https://github.com/reyamir/keyring-search#59d54e6a28229f09f87b9b043690ee8a1d63221e"
|
||||
dependencies = [
|
||||
"byteorder",
|
||||
"lazy_static",
|
||||
@@ -3481,7 +3480,7 @@ checksum = "0676bb32a98c1a483ce53e500a81ad9c3d5b3f7c920c28c24e9cb0980d0b5bc8"
|
||||
[[package]]
|
||||
name = "nostr"
|
||||
version = "0.35.0"
|
||||
source = "git+https://github.com/rust-nostr/nostr#7587fba8ee72041689aa46c1436ecfa73d75d381"
|
||||
source = "git+https://github.com/rust-nostr/nostr#497c72f5a255c3d0cdf2a837e85c24be3d162fc0"
|
||||
dependencies = [
|
||||
"aes",
|
||||
"async-trait",
|
||||
@@ -3512,7 +3511,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "nostr-connect"
|
||||
version = "0.35.0"
|
||||
source = "git+https://github.com/rust-nostr/nostr#7587fba8ee72041689aa46c1436ecfa73d75d381"
|
||||
source = "git+https://github.com/rust-nostr/nostr#497c72f5a255c3d0cdf2a837e85c24be3d162fc0"
|
||||
dependencies = [
|
||||
"async-trait",
|
||||
"async-utility",
|
||||
@@ -3526,7 +3525,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "nostr-database"
|
||||
version = "0.35.0"
|
||||
source = "git+https://github.com/rust-nostr/nostr#7587fba8ee72041689aa46c1436ecfa73d75d381"
|
||||
source = "git+https://github.com/rust-nostr/nostr#497c72f5a255c3d0cdf2a837e85c24be3d162fc0"
|
||||
dependencies = [
|
||||
"async-trait",
|
||||
"flatbuffers",
|
||||
@@ -3540,7 +3539,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "nostr-lmdb"
|
||||
version = "0.35.0"
|
||||
source = "git+https://github.com/rust-nostr/nostr#7587fba8ee72041689aa46c1436ecfa73d75d381"
|
||||
source = "git+https://github.com/rust-nostr/nostr#497c72f5a255c3d0cdf2a837e85c24be3d162fc0"
|
||||
dependencies = [
|
||||
"heed",
|
||||
"nostr",
|
||||
@@ -3553,7 +3552,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "nostr-relay-pool"
|
||||
version = "0.35.0"
|
||||
source = "git+https://github.com/rust-nostr/nostr#7587fba8ee72041689aa46c1436ecfa73d75d381"
|
||||
source = "git+https://github.com/rust-nostr/nostr#497c72f5a255c3d0cdf2a837e85c24be3d162fc0"
|
||||
dependencies = [
|
||||
"async-utility",
|
||||
"async-wsocket",
|
||||
@@ -3571,7 +3570,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "nostr-sdk"
|
||||
version = "0.35.0"
|
||||
source = "git+https://github.com/rust-nostr/nostr#7587fba8ee72041689aa46c1436ecfa73d75d381"
|
||||
source = "git+https://github.com/rust-nostr/nostr#497c72f5a255c3d0cdf2a837e85c24be3d162fc0"
|
||||
dependencies = [
|
||||
"async-utility",
|
||||
"atomic-destructor",
|
||||
@@ -3590,7 +3589,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "nostr-zapper"
|
||||
version = "0.35.0"
|
||||
source = "git+https://github.com/rust-nostr/nostr#7587fba8ee72041689aa46c1436ecfa73d75d381"
|
||||
source = "git+https://github.com/rust-nostr/nostr#497c72f5a255c3d0cdf2a837e85c24be3d162fc0"
|
||||
dependencies = [
|
||||
"async-trait",
|
||||
"nostr",
|
||||
@@ -3725,7 +3724,7 @@ version = "0.7.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "af1844ef2428cc3e1cb900be36181049ef3d3193c63e43026cfe202983b27a56"
|
||||
dependencies = [
|
||||
"proc-macro-crate 3.2.0",
|
||||
"proc-macro-crate 1.3.1",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.79",
|
||||
@@ -3734,7 +3733,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "nwc"
|
||||
version = "0.35.0"
|
||||
source = "git+https://github.com/rust-nostr/nostr#7587fba8ee72041689aa46c1436ecfa73d75d381"
|
||||
source = "git+https://github.com/rust-nostr/nostr#497c72f5a255c3d0cdf2a837e85c24be3d162fc0"
|
||||
dependencies = [
|
||||
"async-trait",
|
||||
"async-utility",
|
||||
|
||||
@@ -47,7 +47,7 @@ futures = "0.3.30"
|
||||
linkify = "0.10.0"
|
||||
regex = "1.10.4"
|
||||
keyring = { version = "3", features = ["apple-native", "windows-native"] }
|
||||
keyring-search = "1.2.0"
|
||||
keyring-search = { git = "https://github.com/reyamir/keyring-search" }
|
||||
tracing-subscriber = { version = "0.3.18", features = ["fmt"] }
|
||||
|
||||
[target.'cfg(target_os = "macos")'.dependencies]
|
||||
|
||||
@@ -2,13 +2,8 @@
|
||||
"$schema": "../gen/schemas/desktop-schema.json",
|
||||
"identifier": "window",
|
||||
"description": "Capability for the desktop",
|
||||
"platforms": [
|
||||
"macOS",
|
||||
"windows"
|
||||
],
|
||||
"windows": [
|
||||
"*"
|
||||
],
|
||||
"platforms": ["macOS", "windows"],
|
||||
"windows": ["*"],
|
||||
"permissions": [
|
||||
"core:path:default",
|
||||
"core:event:default",
|
||||
|
||||
@@ -228,12 +228,6 @@ pub fn open_window(window: NewWindow, app_handle: tauri::AppHandle) -> Result<St
|
||||
.transparent(true)
|
||||
.decorations(false)
|
||||
.closable(window.closable)
|
||||
.effects(WindowEffectsConfig {
|
||||
state: None,
|
||||
effects: vec![Effect::Mica],
|
||||
radius: None,
|
||||
color: None,
|
||||
})
|
||||
.build()
|
||||
.unwrap();
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"$schema": "../node_modules/@tauri-apps/cli/config.schema.json",
|
||||
"productName": "Lume",
|
||||
"version": "24.11.0",
|
||||
"version": "24.11.2",
|
||||
"identifier": "nu.lume.Lume",
|
||||
"build": {
|
||||
"beforeDevCommand": "pnpm dev",
|
||||
|
||||
@@ -13,9 +13,7 @@
|
||||
"hiddenTitle": true,
|
||||
"transparent": true,
|
||||
"windowEffects": {
|
||||
"effects": [
|
||||
"underWindowBackground"
|
||||
]
|
||||
"effects": ["underWindowBackground"]
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
@@ -10,12 +10,7 @@
|
||||
"minWidth": 480,
|
||||
"minHeight": 700,
|
||||
"transparent": true,
|
||||
"decorations": false,
|
||||
"windowEffects": {
|
||||
"effects": [
|
||||
"mica"
|
||||
]
|
||||
}
|
||||
"decorations": false
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -3,11 +3,9 @@ import type {
|
||||
MaybePromise,
|
||||
PersistedQuery,
|
||||
} from "@tanstack/query-persist-client-core";
|
||||
import { ask, message, open } from "@tauri-apps/plugin-dialog";
|
||||
import { open } from "@tauri-apps/plugin-dialog";
|
||||
import { readFile } from "@tauri-apps/plugin-fs";
|
||||
import { relaunch } from "@tauri-apps/plugin-process";
|
||||
import type { Store as TauriStore } from "@tauri-apps/plugin-store";
|
||||
import { check } from "@tauri-apps/plugin-updater";
|
||||
import { BitcoinUnit } from "bitcoin-units";
|
||||
import { type ClassValue, clsx } from "clsx";
|
||||
import dayjs from "dayjs";
|
||||
@@ -170,41 +168,6 @@ export function decodeZapInvoice(tags: string[][]) {
|
||||
}
|
||||
}
|
||||
|
||||
export async function checkForAppUpdates(silent: boolean) {
|
||||
const update = await check();
|
||||
|
||||
if (!update) {
|
||||
if (silent) return;
|
||||
|
||||
await message("You are on the latest version. Stay awesome!", {
|
||||
title: "No Update Available",
|
||||
kind: "info",
|
||||
okLabel: "OK",
|
||||
});
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (update?.available) {
|
||||
const yes = await ask(
|
||||
`Update to ${update.version} is available!\n\nRelease notes: ${update.body}`,
|
||||
{
|
||||
title: "Update Available",
|
||||
kind: "info",
|
||||
okLabel: "Update",
|
||||
cancelLabel: "Cancel",
|
||||
},
|
||||
);
|
||||
|
||||
if (yes) {
|
||||
await update.downloadAndInstall();
|
||||
await relaunch();
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
export async function upload(filePath?: string) {
|
||||
const allowExts = [
|
||||
"png",
|
||||
|
||||
@@ -31,6 +31,7 @@ import { Route as ColumnsLayoutStoriesIdImport } from './routes/columns/_layout/
|
||||
import { Route as ColumnsLayoutNewsfeedIdImport } from './routes/columns/_layout/newsfeed.$id'
|
||||
import { Route as ColumnsLayoutInterestsIdImport } from './routes/columns/_layout/interests.$id'
|
||||
import { Route as ColumnsLayoutGroupsIdImport } from './routes/columns/_layout/groups.$id'
|
||||
import { Route as ColumnsLayoutEventsIdImport } from './routes/columns/_layout/events.$id'
|
||||
import { Route as ColumnsLayoutCreateNewsfeedUsersImport } from './routes/columns/_layout/create-newsfeed.users'
|
||||
import { Route as ColumnsLayoutCreateNewsfeedF2fImport } from './routes/columns/_layout/create-newsfeed.f2f'
|
||||
|
||||
@@ -75,9 +76,6 @@ const ColumnsLayoutNotificationIdLazyImport = createFileRoute(
|
||||
const ColumnsLayoutLaunchpadIdLazyImport = createFileRoute(
|
||||
'/columns/_layout/launchpad/$id',
|
||||
)()
|
||||
const ColumnsLayoutEventsIdLazyImport = createFileRoute(
|
||||
'/columns/_layout/events/$id',
|
||||
)()
|
||||
|
||||
// Create/Update Routes
|
||||
|
||||
@@ -326,14 +324,6 @@ const ColumnsLayoutLaunchpadIdLazyRoute =
|
||||
import('./routes/columns/_layout/launchpad.$id.lazy').then((d) => d.Route),
|
||||
)
|
||||
|
||||
const ColumnsLayoutEventsIdLazyRoute = ColumnsLayoutEventsIdLazyImport.update({
|
||||
id: '/events/$id',
|
||||
path: '/events/$id',
|
||||
getParentRoute: () => ColumnsLayoutRoute,
|
||||
} as any).lazy(() =>
|
||||
import('./routes/columns/_layout/events.$id.lazy').then((d) => d.Route),
|
||||
)
|
||||
|
||||
const ColumnsLayoutStoriesIdRoute = ColumnsLayoutStoriesIdImport.update({
|
||||
id: '/stories/$id',
|
||||
path: '/stories/$id',
|
||||
@@ -366,6 +356,14 @@ const ColumnsLayoutGroupsIdRoute = ColumnsLayoutGroupsIdImport.update({
|
||||
import('./routes/columns/_layout/groups.$id.lazy').then((d) => d.Route),
|
||||
)
|
||||
|
||||
const ColumnsLayoutEventsIdRoute = ColumnsLayoutEventsIdImport.update({
|
||||
id: '/events/$id',
|
||||
path: '/events/$id',
|
||||
getParentRoute: () => ColumnsLayoutRoute,
|
||||
} as any).lazy(() =>
|
||||
import('./routes/columns/_layout/events.$id.lazy').then((d) => d.Route),
|
||||
)
|
||||
|
||||
const ColumnsLayoutCreateNewsfeedUsersRoute =
|
||||
ColumnsLayoutCreateNewsfeedUsersImport.update({
|
||||
id: '/users',
|
||||
@@ -580,6 +578,13 @@ declare module '@tanstack/react-router' {
|
||||
preLoaderRoute: typeof ColumnsLayoutCreateNewsfeedUsersImport
|
||||
parentRoute: typeof ColumnsLayoutCreateNewsfeedImport
|
||||
}
|
||||
'/columns/_layout/events/$id': {
|
||||
id: '/columns/_layout/events/$id'
|
||||
path: '/events/$id'
|
||||
fullPath: '/columns/events/$id'
|
||||
preLoaderRoute: typeof ColumnsLayoutEventsIdImport
|
||||
parentRoute: typeof ColumnsLayoutImport
|
||||
}
|
||||
'/columns/_layout/groups/$id': {
|
||||
id: '/columns/_layout/groups/$id'
|
||||
path: '/groups/$id'
|
||||
@@ -608,13 +613,6 @@ declare module '@tanstack/react-router' {
|
||||
preLoaderRoute: typeof ColumnsLayoutStoriesIdImport
|
||||
parentRoute: typeof ColumnsLayoutImport
|
||||
}
|
||||
'/columns/_layout/events/$id': {
|
||||
id: '/columns/_layout/events/$id'
|
||||
path: '/events/$id'
|
||||
fullPath: '/columns/events/$id'
|
||||
preLoaderRoute: typeof ColumnsLayoutEventsIdLazyImport
|
||||
parentRoute: typeof ColumnsLayoutImport
|
||||
}
|
||||
'/columns/_layout/launchpad/$id': {
|
||||
id: '/columns/_layout/launchpad/$id'
|
||||
path: '/launchpad/$id'
|
||||
@@ -691,11 +689,11 @@ interface ColumnsLayoutRouteChildren {
|
||||
ColumnsLayoutOnboardingLazyRoute: typeof ColumnsLayoutOnboardingLazyRoute
|
||||
ColumnsLayoutSearchLazyRoute: typeof ColumnsLayoutSearchLazyRoute
|
||||
ColumnsLayoutTrendingLazyRoute: typeof ColumnsLayoutTrendingLazyRoute
|
||||
ColumnsLayoutEventsIdRoute: typeof ColumnsLayoutEventsIdRoute
|
||||
ColumnsLayoutGroupsIdRoute: typeof ColumnsLayoutGroupsIdRoute
|
||||
ColumnsLayoutInterestsIdRoute: typeof ColumnsLayoutInterestsIdRoute
|
||||
ColumnsLayoutNewsfeedIdRoute: typeof ColumnsLayoutNewsfeedIdRoute
|
||||
ColumnsLayoutStoriesIdRoute: typeof ColumnsLayoutStoriesIdRoute
|
||||
ColumnsLayoutEventsIdLazyRoute: typeof ColumnsLayoutEventsIdLazyRoute
|
||||
ColumnsLayoutLaunchpadIdLazyRoute: typeof ColumnsLayoutLaunchpadIdLazyRoute
|
||||
ColumnsLayoutNotificationIdLazyRoute: typeof ColumnsLayoutNotificationIdLazyRoute
|
||||
ColumnsLayoutRelaysUrlLazyRoute: typeof ColumnsLayoutRelaysUrlLazyRoute
|
||||
@@ -715,11 +713,11 @@ const ColumnsLayoutRouteChildren: ColumnsLayoutRouteChildren = {
|
||||
ColumnsLayoutOnboardingLazyRoute: ColumnsLayoutOnboardingLazyRoute,
|
||||
ColumnsLayoutSearchLazyRoute: ColumnsLayoutSearchLazyRoute,
|
||||
ColumnsLayoutTrendingLazyRoute: ColumnsLayoutTrendingLazyRoute,
|
||||
ColumnsLayoutEventsIdRoute: ColumnsLayoutEventsIdRoute,
|
||||
ColumnsLayoutGroupsIdRoute: ColumnsLayoutGroupsIdRoute,
|
||||
ColumnsLayoutInterestsIdRoute: ColumnsLayoutInterestsIdRoute,
|
||||
ColumnsLayoutNewsfeedIdRoute: ColumnsLayoutNewsfeedIdRoute,
|
||||
ColumnsLayoutStoriesIdRoute: ColumnsLayoutStoriesIdRoute,
|
||||
ColumnsLayoutEventsIdLazyRoute: ColumnsLayoutEventsIdLazyRoute,
|
||||
ColumnsLayoutLaunchpadIdLazyRoute: ColumnsLayoutLaunchpadIdLazyRoute,
|
||||
ColumnsLayoutNotificationIdLazyRoute: ColumnsLayoutNotificationIdLazyRoute,
|
||||
ColumnsLayoutRelaysUrlLazyRoute: ColumnsLayoutRelaysUrlLazyRoute,
|
||||
@@ -786,11 +784,11 @@ export interface FileRoutesByFullPath {
|
||||
'/columns/trending': typeof ColumnsLayoutTrendingLazyRoute
|
||||
'/columns/create-newsfeed/f2f': typeof ColumnsLayoutCreateNewsfeedF2fRoute
|
||||
'/columns/create-newsfeed/users': typeof ColumnsLayoutCreateNewsfeedUsersRoute
|
||||
'/columns/events/$id': typeof ColumnsLayoutEventsIdRoute
|
||||
'/columns/groups/$id': typeof ColumnsLayoutGroupsIdRoute
|
||||
'/columns/interests/$id': typeof ColumnsLayoutInterestsIdRoute
|
||||
'/columns/newsfeed/$id': typeof ColumnsLayoutNewsfeedIdRoute
|
||||
'/columns/stories/$id': typeof ColumnsLayoutStoriesIdRoute
|
||||
'/columns/events/$id': typeof ColumnsLayoutEventsIdLazyRoute
|
||||
'/columns/launchpad/$id': typeof ColumnsLayoutLaunchpadIdLazyRoute
|
||||
'/columns/notification/$id': typeof ColumnsLayoutNotificationIdLazyRoute
|
||||
'/columns/relays/$url': typeof ColumnsLayoutRelaysUrlLazyRoute
|
||||
@@ -825,11 +823,11 @@ export interface FileRoutesByTo {
|
||||
'/columns/trending': typeof ColumnsLayoutTrendingLazyRoute
|
||||
'/columns/create-newsfeed/f2f': typeof ColumnsLayoutCreateNewsfeedF2fRoute
|
||||
'/columns/create-newsfeed/users': typeof ColumnsLayoutCreateNewsfeedUsersRoute
|
||||
'/columns/events/$id': typeof ColumnsLayoutEventsIdRoute
|
||||
'/columns/groups/$id': typeof ColumnsLayoutGroupsIdRoute
|
||||
'/columns/interests/$id': typeof ColumnsLayoutInterestsIdRoute
|
||||
'/columns/newsfeed/$id': typeof ColumnsLayoutNewsfeedIdRoute
|
||||
'/columns/stories/$id': typeof ColumnsLayoutStoriesIdRoute
|
||||
'/columns/events/$id': typeof ColumnsLayoutEventsIdLazyRoute
|
||||
'/columns/launchpad/$id': typeof ColumnsLayoutLaunchpadIdLazyRoute
|
||||
'/columns/notification/$id': typeof ColumnsLayoutNotificationIdLazyRoute
|
||||
'/columns/relays/$url': typeof ColumnsLayoutRelaysUrlLazyRoute
|
||||
@@ -867,11 +865,11 @@ export interface FileRoutesById {
|
||||
'/columns/_layout/trending': typeof ColumnsLayoutTrendingLazyRoute
|
||||
'/columns/_layout/create-newsfeed/f2f': typeof ColumnsLayoutCreateNewsfeedF2fRoute
|
||||
'/columns/_layout/create-newsfeed/users': typeof ColumnsLayoutCreateNewsfeedUsersRoute
|
||||
'/columns/_layout/events/$id': typeof ColumnsLayoutEventsIdRoute
|
||||
'/columns/_layout/groups/$id': typeof ColumnsLayoutGroupsIdRoute
|
||||
'/columns/_layout/interests/$id': typeof ColumnsLayoutInterestsIdRoute
|
||||
'/columns/_layout/newsfeed/$id': typeof ColumnsLayoutNewsfeedIdRoute
|
||||
'/columns/_layout/stories/$id': typeof ColumnsLayoutStoriesIdRoute
|
||||
'/columns/_layout/events/$id': typeof ColumnsLayoutEventsIdLazyRoute
|
||||
'/columns/_layout/launchpad/$id': typeof ColumnsLayoutLaunchpadIdLazyRoute
|
||||
'/columns/_layout/notification/$id': typeof ColumnsLayoutNotificationIdLazyRoute
|
||||
'/columns/_layout/relays/$url': typeof ColumnsLayoutRelaysUrlLazyRoute
|
||||
@@ -909,11 +907,11 @@ export interface FileRouteTypes {
|
||||
| '/columns/trending'
|
||||
| '/columns/create-newsfeed/f2f'
|
||||
| '/columns/create-newsfeed/users'
|
||||
| '/columns/events/$id'
|
||||
| '/columns/groups/$id'
|
||||
| '/columns/interests/$id'
|
||||
| '/columns/newsfeed/$id'
|
||||
| '/columns/stories/$id'
|
||||
| '/columns/events/$id'
|
||||
| '/columns/launchpad/$id'
|
||||
| '/columns/notification/$id'
|
||||
| '/columns/relays/$url'
|
||||
@@ -947,11 +945,11 @@ export interface FileRouteTypes {
|
||||
| '/columns/trending'
|
||||
| '/columns/create-newsfeed/f2f'
|
||||
| '/columns/create-newsfeed/users'
|
||||
| '/columns/events/$id'
|
||||
| '/columns/groups/$id'
|
||||
| '/columns/interests/$id'
|
||||
| '/columns/newsfeed/$id'
|
||||
| '/columns/stories/$id'
|
||||
| '/columns/events/$id'
|
||||
| '/columns/launchpad/$id'
|
||||
| '/columns/notification/$id'
|
||||
| '/columns/relays/$url'
|
||||
@@ -987,11 +985,11 @@ export interface FileRouteTypes {
|
||||
| '/columns/_layout/trending'
|
||||
| '/columns/_layout/create-newsfeed/f2f'
|
||||
| '/columns/_layout/create-newsfeed/users'
|
||||
| '/columns/_layout/events/$id'
|
||||
| '/columns/_layout/groups/$id'
|
||||
| '/columns/_layout/interests/$id'
|
||||
| '/columns/_layout/newsfeed/$id'
|
||||
| '/columns/_layout/stories/$id'
|
||||
| '/columns/_layout/events/$id'
|
||||
| '/columns/_layout/launchpad/$id'
|
||||
| '/columns/_layout/notification/$id'
|
||||
| '/columns/_layout/relays/$url'
|
||||
@@ -1098,11 +1096,11 @@ export const routeTree = rootRoute
|
||||
"/columns/_layout/onboarding",
|
||||
"/columns/_layout/search",
|
||||
"/columns/_layout/trending",
|
||||
"/columns/_layout/events/$id",
|
||||
"/columns/_layout/groups/$id",
|
||||
"/columns/_layout/interests/$id",
|
||||
"/columns/_layout/newsfeed/$id",
|
||||
"/columns/_layout/stories/$id",
|
||||
"/columns/_layout/events/$id",
|
||||
"/columns/_layout/launchpad/$id",
|
||||
"/columns/_layout/notification/$id",
|
||||
"/columns/_layout/relays/$url",
|
||||
@@ -1193,6 +1191,10 @@ export const routeTree = rootRoute
|
||||
"filePath": "columns/_layout/create-newsfeed.users.tsx",
|
||||
"parent": "/columns/_layout/create-newsfeed"
|
||||
},
|
||||
"/columns/_layout/events/$id": {
|
||||
"filePath": "columns/_layout/events.$id.tsx",
|
||||
"parent": "/columns/_layout"
|
||||
},
|
||||
"/columns/_layout/groups/$id": {
|
||||
"filePath": "columns/_layout/groups.$id.tsx",
|
||||
"parent": "/columns/_layout"
|
||||
@@ -1209,10 +1211,6 @@ export const routeTree = rootRoute
|
||||
"filePath": "columns/_layout/stories.$id.tsx",
|
||||
"parent": "/columns/_layout"
|
||||
},
|
||||
"/columns/_layout/events/$id": {
|
||||
"filePath": "columns/_layout/events.$id.lazy.tsx",
|
||||
"parent": "/columns/_layout"
|
||||
},
|
||||
"/columns/_layout/launchpad/$id": {
|
||||
"filePath": "columns/_layout/launchpad.$id.lazy.tsx",
|
||||
"parent": "/columns/_layout"
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { commands } from "@/commands.gen";
|
||||
import { cn } from "@/commons";
|
||||
import { Spinner } from "@/components";
|
||||
import type { Metadata, NostrEvent } from "@/types";
|
||||
import { type QueryClient, queryOptions } from "@tanstack/react-query";
|
||||
@@ -36,7 +37,7 @@ export const Route = createRootRouteWithContext<RouterContext>()({
|
||||
});
|
||||
|
||||
function Screen() {
|
||||
const { queryClient } = Route.useRouteContext();
|
||||
const { queryClient, platform } = Route.useRouteContext();
|
||||
|
||||
useEffect(() => {
|
||||
const unlisten = getCurrentWindow().listen<string>(
|
||||
@@ -60,7 +61,16 @@ function Screen() {
|
||||
};
|
||||
}, []);
|
||||
|
||||
return <Outlet />;
|
||||
return (
|
||||
<div
|
||||
className={cn(
|
||||
"size-full",
|
||||
platform === "windows" ? "bg-neutral-100 dark:bg-neutral-900" : "",
|
||||
)}
|
||||
>
|
||||
<Outlet />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
function Pending() {
|
||||
|
||||
@@ -22,10 +22,19 @@ export const Route = createLazyFileRoute("/_app")({
|
||||
});
|
||||
|
||||
function Layout() {
|
||||
const { platform } = Route.useRouteContext();
|
||||
|
||||
return (
|
||||
<div className="flex flex-col w-screen h-screen">
|
||||
<Topbar />
|
||||
<div className="flex-1 bg-neutral-100 dark:bg-neutral-900 border-t-[.5px] border-black/20 dark:border-white/30">
|
||||
<div
|
||||
className={cn(
|
||||
"flex-1 bg-neutral-100 dark:bg-neutral-900 border-t-[.5px]",
|
||||
platform === "windows"
|
||||
? "border-black/10 dark:border-white/10"
|
||||
: "border-black/20 dark:border-white/30",
|
||||
)}
|
||||
>
|
||||
<Outlet />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,14 +1,41 @@
|
||||
import { commands } from '@/commands.gen'
|
||||
import { createFileRoute, redirect } from '@tanstack/react-router'
|
||||
import { commands } from "@/commands.gen";
|
||||
import { createFileRoute, redirect } from "@tanstack/react-router";
|
||||
import { ask } from "@tauri-apps/plugin-dialog";
|
||||
import { relaunch } from "@tauri-apps/plugin-process";
|
||||
import { check } from "@tauri-apps/plugin-updater";
|
||||
|
||||
export const Route = createFileRoute('/_app')({
|
||||
beforeLoad: async () => {
|
||||
const accounts = await commands.getAccounts()
|
||||
async function checkForAppUpdates() {
|
||||
const update = await check();
|
||||
|
||||
if (!accounts.length) {
|
||||
throw redirect({ to: '/new', replace: true })
|
||||
}
|
||||
if (update?.available) {
|
||||
const yes = await ask(
|
||||
`Update to ${update.version} is available!\n\nRelease notes: ${update.body}`,
|
||||
{
|
||||
title: "Update Available",
|
||||
kind: "info",
|
||||
okLabel: "Update",
|
||||
cancelLabel: "Cancel",
|
||||
},
|
||||
);
|
||||
|
||||
return { accounts }
|
||||
},
|
||||
})
|
||||
if (yes) {
|
||||
await update.downloadAndInstall();
|
||||
await relaunch();
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
export const Route = createFileRoute("/_app")({
|
||||
beforeLoad: async () => {
|
||||
await checkForAppUpdates();
|
||||
const accounts = await commands.getAccounts();
|
||||
|
||||
if (!accounts.length) {
|
||||
throw redirect({ to: "/new", replace: true });
|
||||
}
|
||||
|
||||
return { accounts };
|
||||
},
|
||||
});
|
||||
|
||||
@@ -60,9 +60,9 @@ function Screen() {
|
||||
|
||||
const renderItem = useCallback(
|
||||
(item: NostrEvent) => {
|
||||
const users = item.tags.filter((tag) => tag[0] === "p");
|
||||
const name =
|
||||
item.tags.find((tag) => tag[0] === "title")?.[1] || "Unnamed";
|
||||
|
||||
const label = item.tags.find((tag) => tag[0] === "d")?.[1] || nanoid();
|
||||
|
||||
return (
|
||||
@@ -71,32 +71,24 @@ function Screen() {
|
||||
className="mb-3 group flex flex-col rounded-xl overflow-hidden bg-white dark:bg-neutral-800/50 shadow-lg shadow-primary dark:ring-1 dark:ring-neutral-800"
|
||||
>
|
||||
<div className="px-2 pt-2">
|
||||
<ScrollArea.Root
|
||||
type={"scroll"}
|
||||
scrollHideDelay={300}
|
||||
className="overflow-hidden size-full"
|
||||
>
|
||||
<ScrollArea.Viewport className="p-3 h-16 bg-neutral-100 dark:bg-neutral-800 rounded-lg">
|
||||
<div className="flex flex-wrap items-center justify-center gap-2">
|
||||
{item.tags
|
||||
.filter((tag) => tag[0] === "p")
|
||||
.map((tag) => (
|
||||
<User.Provider key={tag[1]} pubkey={tag[1]}>
|
||||
<User.Root>
|
||||
<User.Avatar className="size-8 rounded-full" />
|
||||
</User.Root>
|
||||
</User.Provider>
|
||||
))}
|
||||
</div>
|
||||
</ScrollArea.Viewport>
|
||||
<ScrollArea.Scrollbar
|
||||
className="flex select-none touch-none p-0.5 duration-[160ms] ease-out data-[orientation=vertical]:w-2"
|
||||
orientation="vertical"
|
||||
>
|
||||
<ScrollArea.Thumb className="flex-1 bg-black/10 dark:bg-white/10 rounded-full relative before:content-[''] before:absolute before:top-1/2 before:left-1/2 before:-translate-x-1/2 before:-translate-y-1/2 before:w-full before:h-full before:min-w-[44px] before:min-h-[44px]" />
|
||||
</ScrollArea.Scrollbar>
|
||||
<ScrollArea.Corner className="bg-transparent" />
|
||||
</ScrollArea.Root>
|
||||
<div className="p-3 h-16 bg-neutral-100 dark:bg-neutral-800 rounded-lg">
|
||||
<div className="flex flex-wrap items-center justify-center gap-2">
|
||||
{users.slice(0, 5).map((tag) => (
|
||||
<User.Provider key={tag[1]} pubkey={tag[1]}>
|
||||
<User.Root>
|
||||
<User.Avatar className="size-8 rounded-full" />
|
||||
</User.Root>
|
||||
</User.Provider>
|
||||
))}
|
||||
{users.length > 5 ? (
|
||||
<div className="size-8 rounded-full inline-flex items-center justify-center bg-neutral-300 dark:bg-neutral-700">
|
||||
<p className="truncate leading-tight text-[8px] font-medium">
|
||||
+{users.length - 5}
|
||||
</p>
|
||||
</div>
|
||||
) : null}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className="p-2 flex items-center justify-between">
|
||||
<div className="inline-flex items-center gap-2">
|
||||
|
||||
@@ -183,7 +183,6 @@ function ReplyList() {
|
||||
"event",
|
||||
async (data) => {
|
||||
const event = LumeEvent.from(data.payload.raw, data.payload.parsed);
|
||||
console.log(event);
|
||||
|
||||
await queryClient.setQueryData(
|
||||
["replies", id],
|
||||
@@ -200,6 +199,16 @@ function ReplyList() {
|
||||
};
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
const unlisten = getCurrentWindow().listen(id, async () => {
|
||||
await queryClient.invalidateQueries({ queryKey: ["replies", id] });
|
||||
});
|
||||
|
||||
return () => {
|
||||
unlisten.then((f) => f());
|
||||
};
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<div className="px-3">
|
||||
<div className="flex items-center text-sm font-semibold h-14 text-neutral-600 dark:text-white/30">
|
||||
|
||||
9
src/routes/columns/_layout/events.$id.tsx
Normal file
9
src/routes/columns/_layout/events.$id.tsx
Normal file
@@ -0,0 +1,9 @@
|
||||
import { commands } from "@/commands.gen";
|
||||
import { createFileRoute } from "@tanstack/react-router";
|
||||
|
||||
export const Route = createFileRoute("/columns/_layout/events/$id")({
|
||||
beforeLoad: async () => {
|
||||
const accounts = await commands.getAccounts();
|
||||
return { accounts };
|
||||
},
|
||||
});
|
||||
@@ -62,11 +62,11 @@ function Newsfeeds() {
|
||||
|
||||
const renderItem = useCallback(
|
||||
(item: NostrEvent) => {
|
||||
const users = item.tags.filter((tag) => tag[0] === "p");
|
||||
const name =
|
||||
item.kind === 3
|
||||
? "Contacts"
|
||||
: item.tags.find((tag) => tag[0] === "title")?.[1] || "Unnamed";
|
||||
|
||||
const label =
|
||||
item.kind === 3
|
||||
? `newsfeed-${id.slice(0, 5)}`
|
||||
@@ -78,32 +78,24 @@ function Newsfeeds() {
|
||||
className="group flex flex-col rounded-xl overflow-hidden bg-white dark:bg-neutral-800/50 shadow-lg shadow-primary dark:ring-1 dark:ring-neutral-800"
|
||||
>
|
||||
<div className="px-2 pt-2">
|
||||
<ScrollArea.Root
|
||||
type={"scroll"}
|
||||
scrollHideDelay={300}
|
||||
className="overflow-hidden size-full"
|
||||
>
|
||||
<ScrollArea.Viewport className="p-3 h-16 bg-neutral-100 dark:bg-neutral-800 rounded-lg">
|
||||
<div className="flex flex-wrap items-center justify-center gap-2">
|
||||
{item.tags
|
||||
.filter((tag) => tag[0] === "p")
|
||||
.map((tag) => (
|
||||
<User.Provider key={tag[1]} pubkey={tag[1]}>
|
||||
<User.Root>
|
||||
<User.Avatar className="size-8 rounded-full" />
|
||||
</User.Root>
|
||||
</User.Provider>
|
||||
))}
|
||||
</div>
|
||||
</ScrollArea.Viewport>
|
||||
<ScrollArea.Scrollbar
|
||||
className="flex select-none touch-none p-0.5 duration-[160ms] ease-out data-[orientation=vertical]:w-2"
|
||||
orientation="vertical"
|
||||
>
|
||||
<ScrollArea.Thumb className="flex-1 bg-black/10 dark:bg-white/10 rounded-full relative before:content-[''] before:absolute before:top-1/2 before:left-1/2 before:-translate-x-1/2 before:-translate-y-1/2 before:w-full before:h-full before:min-w-[44px] before:min-h-[44px]" />
|
||||
</ScrollArea.Scrollbar>
|
||||
<ScrollArea.Corner className="bg-transparent" />
|
||||
</ScrollArea.Root>
|
||||
<div className="p-3 h-16 bg-neutral-100 dark:bg-neutral-800 rounded-lg">
|
||||
<div className="flex flex-wrap items-center justify-center gap-2">
|
||||
{users.slice(0, 5).map((tag) => (
|
||||
<User.Provider key={tag[1]} pubkey={tag[1]}>
|
||||
<User.Root>
|
||||
<User.Avatar className="size-8 rounded-full" />
|
||||
</User.Root>
|
||||
</User.Provider>
|
||||
))}
|
||||
{users.length > 5 ? (
|
||||
<div className="size-8 rounded-full inline-flex items-center justify-center bg-neutral-300 dark:bg-neutral-700">
|
||||
<p className="truncate leading-tight text-[8px] font-medium">
|
||||
+{users.length - 5}
|
||||
</p>
|
||||
</div>
|
||||
) : null}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className="p-2 flex items-center justify-between">
|
||||
<div className="inline-flex items-center gap-2">
|
||||
|
||||
@@ -8,6 +8,7 @@ import type { Metadata } from "@/types";
|
||||
import { CaretDown } from "@phosphor-icons/react";
|
||||
import { createLazyFileRoute, useAwaited } from "@tanstack/react-router";
|
||||
import { Menu, MenuItem } from "@tauri-apps/api/menu";
|
||||
import { getCurrentWindow } from "@tauri-apps/api/window";
|
||||
import { message } from "@tauri-apps/plugin-dialog";
|
||||
import {
|
||||
useCallback,
|
||||
@@ -170,9 +171,7 @@ function Screen() {
|
||||
setText("");
|
||||
setIsPublish(true);
|
||||
|
||||
await queryClient.invalidateQueries({
|
||||
queryKey: ["replies", reply_to],
|
||||
});
|
||||
await getCurrentWindow().emit(reply_to, {});
|
||||
} else {
|
||||
setError(res.error);
|
||||
}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { cn } from "@/commons";
|
||||
import { createLazyFileRoute } from "@tanstack/react-router";
|
||||
|
||||
export const Route = createLazyFileRoute("/new")({
|
||||
@@ -5,10 +6,17 @@ export const Route = createLazyFileRoute("/new")({
|
||||
});
|
||||
|
||||
function Screen() {
|
||||
const { platform } = Route.useRouteContext();
|
||||
|
||||
return (
|
||||
<div
|
||||
data-tauri-drag-region
|
||||
className="bg-white/50 dark:bg-black/50 relative size-full flex items-center justify-center"
|
||||
className={cn(
|
||||
"relative size-full flex items-center justify-center",
|
||||
platform === "windows"
|
||||
? "bg-neutral-200 dark:bg-neutral-900"
|
||||
: "bg-white/20 dark:bg-black/20",
|
||||
)}
|
||||
>
|
||||
<div className="w-[350px] flex flex-col gap-8">
|
||||
<div className="flex flex-col gap-1 text-center">
|
||||
|
||||
@@ -1,10 +1,7 @@
|
||||
/** @type {import('tailwindcss').Config} */
|
||||
|
||||
export default {
|
||||
content: [
|
||||
"./src/**/*.{js,ts,jsx,tsx}",
|
||||
"index.html",
|
||||
],
|
||||
content: ["./src/**/*.{js,ts,jsx,tsx}", "index.html"],
|
||||
theme: {
|
||||
extend: {
|
||||
keyframes: {
|
||||
|
||||
@@ -2,19 +2,12 @@
|
||||
"compilerOptions": {
|
||||
"target": "ESNext",
|
||||
"useDefineForClassFields": true,
|
||||
"lib": [
|
||||
"ESNext",
|
||||
"ES2020",
|
||||
"DOM",
|
||||
"DOM.Iterable"
|
||||
],
|
||||
"lib": ["ESNext", "ES2020", "DOM", "DOM.Iterable"],
|
||||
"module": "ESNext",
|
||||
"skipLibCheck": true,
|
||||
"baseUrl": "./",
|
||||
"paths": {
|
||||
"@/*": [
|
||||
"./src/*"
|
||||
]
|
||||
"@/*": ["./src/*"]
|
||||
},
|
||||
"moduleResolution": "bundler",
|
||||
"allowImportingTsExtensions": true,
|
||||
@@ -26,11 +19,9 @@
|
||||
"noUnusedLocals": true,
|
||||
"noImplicitAny": false,
|
||||
"noUnusedParameters": true,
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
"noFallthroughCasesInSwitch": true
|
||||
},
|
||||
"include": [
|
||||
"src"
|
||||
],
|
||||
"include": ["src"],
|
||||
"references": [
|
||||
{
|
||||
"path": "./tsconfig.node.json"
|
||||
|
||||
@@ -6,7 +6,5 @@
|
||||
"moduleResolution": "bundler",
|
||||
"allowSyntheticDefaultImports": true
|
||||
},
|
||||
"include": [
|
||||
"vite.config.ts"
|
||||
]
|
||||
"include": ["vite.config.ts"]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user