mirror of
https://github.com/luminous-devs/lume.git
synced 2024-09-19 11:43:30 +00:00
minor updates
This commit is contained in:
parent
3cc24dc8c1
commit
7ec284d4a5
@ -407,14 +407,14 @@ packages:
|
|||||||
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
|
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/@floating-ui/core@1.3.0:
|
/@floating-ui/core@1.3.1:
|
||||||
resolution: {integrity: sha512-vX1WVAdPjZg9DkDkC+zEx/tKtnST6/qcNpwcjeBgco3XRNHz5PUA+ivi/yr6G3o0kMR60uKBJcfOdfzOFI7PMQ==}
|
resolution: {integrity: sha512-Bu+AMaXNjrpjh41znzHqaz3r2Nr8hHuHZT6V2LBKMhyMl0FgKA62PNYbqnfgmzOhoWZj70Zecisbo4H1rotP5g==}
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/@floating-ui/dom@1.3.0:
|
/@floating-ui/dom@1.4.0:
|
||||||
resolution: {integrity: sha512-qIAwejE3r6NeA107u4ELDKkH8+VtgRKdXqtSPaKflL2S2V+doyN+Wt9s5oHKXPDo4E8TaVXaHT3+6BbagH31xw==}
|
resolution: {integrity: sha512-b4F0iWffLiqb/TpP2PWVOixrZqE6ni+6VT64AmFH7sJIF3SFPLbe6/h3jQ5Cwffs+HaC9A8V0TQzCPBwVvziIA==}
|
||||||
dependencies:
|
dependencies:
|
||||||
'@floating-ui/core': 1.3.0
|
'@floating-ui/core': 1.3.1
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/@floating-ui/react-dom@1.3.0(react-dom@18.2.0)(react@18.2.0):
|
/@floating-ui/react-dom@1.3.0(react-dom@18.2.0)(react@18.2.0):
|
||||||
@ -423,7 +423,7 @@ packages:
|
|||||||
react: '>=16.8.0'
|
react: '>=16.8.0'
|
||||||
react-dom: '>=16.8.0'
|
react-dom: '>=16.8.0'
|
||||||
dependencies:
|
dependencies:
|
||||||
'@floating-ui/dom': 1.3.0
|
'@floating-ui/dom': 1.4.0
|
||||||
react: 18.2.0
|
react: 18.2.0
|
||||||
react-dom: 18.2.0(react@18.2.0)
|
react-dom: 18.2.0(react@18.2.0)
|
||||||
dev: false
|
dev: false
|
||||||
@ -1370,7 +1370,7 @@ packages:
|
|||||||
postcss: ^8.1.0
|
postcss: ^8.1.0
|
||||||
dependencies:
|
dependencies:
|
||||||
browserslist: 4.21.9
|
browserslist: 4.21.9
|
||||||
caniuse-lite: 1.0.30001503
|
caniuse-lite: 1.0.30001504
|
||||||
fraction.js: 4.2.0
|
fraction.js: 4.2.0
|
||||||
normalize-range: 0.1.2
|
normalize-range: 0.1.2
|
||||||
picocolors: 1.0.0
|
picocolors: 1.0.0
|
||||||
@ -1414,7 +1414,7 @@ packages:
|
|||||||
engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7}
|
engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7}
|
||||||
hasBin: true
|
hasBin: true
|
||||||
dependencies:
|
dependencies:
|
||||||
caniuse-lite: 1.0.30001503
|
caniuse-lite: 1.0.30001504
|
||||||
electron-to-chromium: 1.4.433
|
electron-to-chromium: 1.4.433
|
||||||
node-releases: 2.0.12
|
node-releases: 2.0.12
|
||||||
update-browserslist-db: 1.0.11(browserslist@4.21.9)
|
update-browserslist-db: 1.0.11(browserslist@4.21.9)
|
||||||
@ -1482,8 +1482,8 @@ packages:
|
|||||||
engines: {node: '>=6'}
|
engines: {node: '>=6'}
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/caniuse-lite@1.0.30001503:
|
/caniuse-lite@1.0.30001504:
|
||||||
resolution: {integrity: sha512-Sf9NiF+wZxPfzv8Z3iS0rXM1Do+iOy2Lxvib38glFX+08TCYYYGR5fRJXk4d77C4AYwhUjgYgMsMudbh2TqCKw==}
|
resolution: {integrity: sha512-5uo7eoOp2mKbWyfMXnGO9rJWOGU8duvzEiYITW+wivukL7yHH4gX9yuRaobu6El4jPxo6jKZfG+N6fB621GD/Q==}
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/chalk@2.4.2:
|
/chalk@2.4.2:
|
||||||
|
@ -1,133 +1,141 @@
|
|||||||
{
|
{
|
||||||
"build": {
|
"build": {
|
||||||
"beforeDevCommand": "pnpm dev",
|
"beforeDevCommand": "pnpm dev",
|
||||||
"beforeBuildCommand": "pnpm build",
|
"beforeBuildCommand": "pnpm build",
|
||||||
"devPath": "http://localhost:3000",
|
"devPath": "http://localhost:3000",
|
||||||
"distDir": "../dist/client",
|
"distDir": "../dist/client",
|
||||||
"withGlobalTauri": true
|
"withGlobalTauri": true
|
||||||
},
|
},
|
||||||
"package": {
|
"package": {
|
||||||
"productName": "Lume",
|
"productName": "Lume",
|
||||||
"version": "1.0.0"
|
"version": "1.0.0"
|
||||||
},
|
},
|
||||||
"tauri": {
|
"tauri": {
|
||||||
"allowlist": {
|
"allowlist": {
|
||||||
"all": false,
|
"all": false,
|
||||||
"app": {
|
"app": {
|
||||||
"all": false
|
"all": false
|
||||||
},
|
},
|
||||||
"os": {
|
"os": {
|
||||||
"all": true
|
"all": true
|
||||||
},
|
},
|
||||||
"http": {
|
"http": {
|
||||||
"all": true,
|
"all": true,
|
||||||
"request": true,
|
"request": true,
|
||||||
"scope": ["https://void.cat/*", "https://skrape.dev/*"]
|
"scope": ["https://void.cat/*", "https://skrape.dev/*"]
|
||||||
},
|
},
|
||||||
"fs": {
|
"fs": {
|
||||||
"all": false,
|
"all": false,
|
||||||
"readFile": true,
|
"readFile": true,
|
||||||
"readDir": true,
|
"readDir": true,
|
||||||
"scope": [
|
"scope": [
|
||||||
"$APPDATA/*",
|
"$APPDATA/*",
|
||||||
"$DATA/*",
|
"$DATA/*",
|
||||||
"$LOCALDATA/*",
|
"$LOCALDATA/*",
|
||||||
"$DESKTOP/*",
|
"$DESKTOP/*",
|
||||||
"$DOCUMENT/*",
|
"$DOCUMENT/*",
|
||||||
"$DOWNLOAD/*",
|
"$DOWNLOAD/*",
|
||||||
"$HOME/*",
|
"$HOME/*",
|
||||||
"$PICTURE/*",
|
"$PICTURE/*",
|
||||||
"$PUBLIC/*",
|
"$PUBLIC/*",
|
||||||
"$VIDEO/*"
|
"$VIDEO/*"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"shell": {
|
"shell": {
|
||||||
"all": false,
|
"all": false,
|
||||||
"open": true
|
"open": true
|
||||||
},
|
},
|
||||||
"clipboard": {
|
"clipboard": {
|
||||||
"all": false,
|
"all": false,
|
||||||
"writeText": true,
|
"writeText": true,
|
||||||
"readText": true
|
"readText": true
|
||||||
},
|
},
|
||||||
"dialog": {
|
"dialog": {
|
||||||
"all": false,
|
"all": false,
|
||||||
"open": true
|
"open": true
|
||||||
},
|
},
|
||||||
"notification": {
|
"notification": {
|
||||||
"all": true
|
"all": true
|
||||||
},
|
},
|
||||||
"window": {
|
"window": {
|
||||||
"startDragging": true,
|
"startDragging": true,
|
||||||
"close": true
|
"close": true
|
||||||
},
|
},
|
||||||
"process": {
|
"process": {
|
||||||
"all": false,
|
"all": false,
|
||||||
"exit": false,
|
"exit": false,
|
||||||
"relaunch": true,
|
"relaunch": true,
|
||||||
"relaunchDangerousAllowSymlinkMacos": false
|
"relaunchDangerousAllowSymlinkMacos": false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"bundle": {
|
"bundle": {
|
||||||
"active": true,
|
"active": true,
|
||||||
"category": "SocialNetworking",
|
"category": "SocialNetworking",
|
||||||
"copyright": "",
|
"copyright": "",
|
||||||
"appimage": {
|
"appimage": {
|
||||||
"bundleMediaFramework": true
|
"bundleMediaFramework": true
|
||||||
},
|
},
|
||||||
"deb": {
|
"deb": {
|
||||||
"depends": []
|
"depends": []
|
||||||
},
|
},
|
||||||
"externalBin": [],
|
"externalBin": [],
|
||||||
"icon": ["icons/32x32.png", "icons/128x128.png", "icons/128x128@2x.png", "icons/icon.icns", "icons/icon.ico"],
|
"icon": [
|
||||||
"identifier": "com.lume.nu",
|
"icons/32x32.png",
|
||||||
"longDescription": "",
|
"icons/128x128.png",
|
||||||
"macOS": {
|
"icons/128x128@2x.png",
|
||||||
"entitlements": null,
|
"icons/icon.icns",
|
||||||
"exceptionDomain": "",
|
"icons/icon.ico"
|
||||||
"frameworks": [],
|
],
|
||||||
"providerShortName": null,
|
"identifier": "com.lume.nu",
|
||||||
"signingIdentity": null
|
"longDescription": "",
|
||||||
},
|
"macOS": {
|
||||||
"resources": [],
|
"entitlements": null,
|
||||||
"shortDescription": "",
|
"exceptionDomain": "",
|
||||||
"targets": "all",
|
"frameworks": [],
|
||||||
"windows": {
|
"providerShortName": null,
|
||||||
"certificateThumbprint": null,
|
"signingIdentity": null
|
||||||
"digestAlgorithm": "sha256",
|
},
|
||||||
"timestampUrl": ""
|
"resources": [],
|
||||||
}
|
"shortDescription": "",
|
||||||
},
|
"targets": "all",
|
||||||
"security": {
|
"windows": {
|
||||||
"csp": "upgrade-insecure-requests"
|
"certificateThumbprint": null,
|
||||||
},
|
"digestAlgorithm": "sha256",
|
||||||
"updater": {
|
"timestampUrl": ""
|
||||||
"active": true,
|
}
|
||||||
"endpoints": ["https://releases.lume.nu/{{target}}/{{arch}}/{{current_version}}"],
|
},
|
||||||
"dialog": true,
|
"security": {
|
||||||
"pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IDIyOUI0Qjc1MTBCOUNGNUEKUldSYXo3a1FkVXViSWxYTlhhS0E4UjRIcEkzd04yN1Y0dys4QWY5WjRybEF5eElLcGFXZmJnRzQK",
|
"csp": "upgrade-insecure-requests"
|
||||||
"windows": {
|
},
|
||||||
"installMode": "passive"
|
"updater": {
|
||||||
}
|
"active": true,
|
||||||
},
|
"endpoints": [
|
||||||
"systemTray": {
|
"https://releases.lume.nu/{{target}}/{{arch}}/{{current_version}}"
|
||||||
"iconPath": "icons/icon.png",
|
],
|
||||||
"iconAsTemplate": true
|
"dialog": true,
|
||||||
},
|
"pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IDIyOUI0Qjc1MTBCOUNGNUEKUldSYXo3a1FkVXViSWxYTlhhS0E4UjRIcEkzd04yN1Y0dys4QWY5WjRybEF5eElLcGFXZmJnRzQK",
|
||||||
"windows": [
|
"windows": {
|
||||||
{
|
"installMode": "passive"
|
||||||
"title": "Lume",
|
}
|
||||||
"theme": "Dark",
|
},
|
||||||
"titleBarStyle": "Overlay",
|
"systemTray": {
|
||||||
"hiddenTitle": true,
|
"iconPath": "icons/icon.png",
|
||||||
"transparent": false,
|
"iconAsTemplate": true
|
||||||
"fullscreen": false,
|
},
|
||||||
"resizable": true,
|
"windows": [
|
||||||
"width": 1100,
|
{
|
||||||
"height": 800,
|
"title": "Lume",
|
||||||
"minWidth": 800,
|
"theme": "Dark",
|
||||||
"minHeight": 700
|
"titleBarStyle": "Overlay",
|
||||||
}
|
"hiddenTitle": true,
|
||||||
]
|
"transparent": false,
|
||||||
}
|
"fullscreen": false,
|
||||||
|
"resizable": true,
|
||||||
|
"width": 1080,
|
||||||
|
"height": 800,
|
||||||
|
"minWidth": 1080,
|
||||||
|
"minHeight": 720
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,7 @@ export function Page() {
|
|||||||
return (
|
return (
|
||||||
<div className="flex flex-col justify-between h-full w-full">
|
<div className="flex flex-col justify-between h-full w-full">
|
||||||
<div className="w-full h-full flex flex-col justify-center items-center gap-4 overflow-hidden">
|
<div className="w-full h-full flex flex-col justify-center items-center gap-4 overflow-hidden">
|
||||||
<h1 className="animate-moveBg bg-gradient-to-r from-fuchsia-400 via-green-200 to-orange-400 bg-clip-text text-5xl font-bold leading-none text-transparent">
|
<h1 className="text-white text-5xl font-bold leading-none text-transparent">
|
||||||
Preserve your freedom
|
Preserve your freedom
|
||||||
</h1>
|
</h1>
|
||||||
<div className="mt-4 flex flex-col gap-1.5">
|
<div className="mt-4 flex flex-col gap-1.5">
|
||||||
|
@ -107,7 +107,7 @@ export function Page() {
|
|||||||
async function fetchChannelMessages() {
|
async function fetchChannelMessages() {
|
||||||
try {
|
try {
|
||||||
const ids = [];
|
const ids = [];
|
||||||
const channels: any = await getChannels(10, 0);
|
const channels: any = await getChannels();
|
||||||
channels.forEach((channel) => {
|
channels.forEach((channel) => {
|
||||||
ids.push(channel.event_id);
|
ids.push(channel.event_id);
|
||||||
});
|
});
|
||||||
|
@ -56,7 +56,7 @@ export function FeedBlock({ params }: { params: any }) {
|
|||||||
}, [notes.length, rowVirtualizer.getVirtualItems()]);
|
}, [notes.length, rowVirtualizer.getVirtualItems()]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="shrink-0 w-[420px] border-r border-zinc-900">
|
<div className="shrink-0 w-[400px] border-r border-zinc-900">
|
||||||
<div
|
<div
|
||||||
data-tauri-drag-region
|
data-tauri-drag-region
|
||||||
className="h-11 w-full flex items-center justify-between px-3 border-b border-zinc-900"
|
className="h-11 w-full flex items-center justify-between px-3 border-b border-zinc-900"
|
||||||
|
@ -103,7 +103,7 @@ export function FollowingBlock({ block }: { block: number }) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="shrink-0 w-[420px] border-r border-zinc-900">
|
<div className="shrink-0 w-[400px] border-r border-zinc-900">
|
||||||
<div
|
<div
|
||||||
data-tauri-drag-region
|
data-tauri-drag-region
|
||||||
className="h-11 w-full inline-flex items-center justify-center border-b border-zinc-900"
|
className="h-11 w-full inline-flex items-center justify-center border-b border-zinc-900"
|
||||||
|
@ -10,7 +10,7 @@ export function ImageBlock({ params }: { params: any }) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="shrink-0 w-[360px] flex-col flex border-r border-zinc-900">
|
<div className="shrink-0 w-[350px] flex-col flex border-r border-zinc-900">
|
||||||
<div
|
<div
|
||||||
data-tauri-drag-region
|
data-tauri-drag-region
|
||||||
className="h-11 w-full flex items-center justify-between px-3 border-b border-zinc-900"
|
className="h-11 w-full flex items-center justify-between px-3 border-b border-zinc-900"
|
||||||
|
@ -23,7 +23,7 @@ export function ThreadBlock({ params }: { params: any }) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="shrink-0 w-[420px] border-r border-zinc-900">
|
<div className="shrink-0 w-[400px] border-r border-zinc-900">
|
||||||
<div
|
<div
|
||||||
data-tauri-drag-region
|
data-tauri-drag-region
|
||||||
className="h-11 w-full flex items-center justify-between px-3 border-b border-zinc-900"
|
className="h-11 w-full flex items-center justify-between px-3 border-b border-zinc-900"
|
||||||
|
@ -262,11 +262,9 @@ export async function createReplyNote(
|
|||||||
}
|
}
|
||||||
|
|
||||||
// get all channels
|
// get all channels
|
||||||
export async function getChannels(limit: number, offset: number) {
|
export async function getChannels() {
|
||||||
const db = await connect();
|
const db = await connect();
|
||||||
return await db.select(
|
return await db.select("SELECT * FROM channels ORDER BY created_at DESC;");
|
||||||
`SELECT * FROM channels ORDER BY created_at DESC LIMIT "${limit}" OFFSET "${offset}";`,
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// get channel by id
|
// get channel by id
|
||||||
|
@ -11,7 +11,7 @@ export function Kind1({
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div className="select-text whitespace-pre-line break-words text-base text-zinc-100">
|
<div className="select-text whitespace-pre-line break-words text-base text-zinc-100">
|
||||||
{truncate ? truncateContent(content.parsed, 120) : content.parsed}
|
{truncate ? truncateContent(content.original, 100) : content.parsed}
|
||||||
</div>
|
</div>
|
||||||
{Array.isArray(content.images) && content.images.length ? (
|
{Array.isArray(content.images) && content.images.length ? (
|
||||||
<ImagePreview urls={content.images} />
|
<ImagePreview urls={content.images} />
|
||||||
|
@ -28,7 +28,7 @@ export function LinkPreview({ urls }: { urls: string[] }) {
|
|||||||
<Image
|
<Image
|
||||||
src={data["og:image"]}
|
src={data["og:image"]}
|
||||||
alt={urls[0]}
|
alt={urls[0]}
|
||||||
className="w-full h-auto object-cover rounded-t-lg"
|
className="w-full h-44 object-cover rounded-t-lg bg-white"
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
<div className="flex flex-col gap-2 px-3 py-3">
|
<div className="flex flex-col gap-2 px-3 py-3">
|
||||||
|
@ -21,7 +21,11 @@ export function User({
|
|||||||
const avatarHeight = size === "small" ? "h-6" : "h-11";
|
const avatarHeight = size === "small" ? "h-6" : "h-11";
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Popover className="relative flex items-start gap-3">
|
<Popover
|
||||||
|
className={`relative flex gap-3 ${
|
||||||
|
size === "small" ? "items-center" : "items-start"
|
||||||
|
}`}
|
||||||
|
>
|
||||||
<Popover.Button
|
<Popover.Button
|
||||||
className={`${avatarWidth} ${avatarHeight} shrink-0 overflow-hidden rounded-md bg-zinc-900`}
|
className={`${avatarWidth} ${avatarHeight} shrink-0 overflow-hidden rounded-md bg-zinc-900`}
|
||||||
>
|
>
|
||||||
@ -32,7 +36,11 @@ export function User({
|
|||||||
/>
|
/>
|
||||||
</Popover.Button>
|
</Popover.Button>
|
||||||
<div className="flex flex-wrap items-baseline gap-1">
|
<div className="flex flex-wrap items-baseline gap-1">
|
||||||
<h5 className="text-zinc-200 max-w-[10rem] font-medium leading-none truncate">
|
<h5
|
||||||
|
className={`text-zinc-200 font-medium leading-none truncate ${
|
||||||
|
size === "small" ? "max-w-[7rem]" : "max-w-[10rem]"
|
||||||
|
}`}
|
||||||
|
>
|
||||||
{user?.nip05 || user?.name || shortenKey(pubkey)}
|
{user?.nip05 || user?.name || shortenKey(pubkey)}
|
||||||
</h5>
|
</h5>
|
||||||
{repost && (
|
{repost && (
|
||||||
|
@ -11,7 +11,7 @@ export const useChannels = create(
|
|||||||
immer((set) => ({
|
immer((set) => ({
|
||||||
channels: [],
|
channels: [],
|
||||||
fetch: async () => {
|
fetch: async () => {
|
||||||
const response = await getChannels(10, 0);
|
const response = await getChannels();
|
||||||
set({ channels: response });
|
set({ channels: response });
|
||||||
},
|
},
|
||||||
add: (event) => {
|
add: (event) => {
|
||||||
|
@ -1,16 +1,12 @@
|
|||||||
export const APP_VERSION = "1.0.0";
|
export const APP_VERSION = "1.0.0";
|
||||||
|
|
||||||
export const DEFAULT_AVATAR = "https://void.cat/d/KmypFh2fBdYCEvyJrPiN89.webp";
|
export const DEFAULT_AVATAR = "https://void.cat/d/PZcdCxNc24rCCxV8QXbdFQ";
|
||||||
|
|
||||||
export const DEFAULT_CHANNEL_BANNER =
|
|
||||||
"https://bafybeiacwit7hjmdefqggxqtgh6ht5dhth7ndptwn2msl5kpkodudsr7py.ipfs.w3s.link/banner-1.jpg";
|
|
||||||
|
|
||||||
export const OPENGRAPH_KEY = "9EJG4SY-19Q4M5J-H8R29C9-091XPCC";
|
export const OPENGRAPH_KEY = "9EJG4SY-19Q4M5J-H8R29C9-091XPCC";
|
||||||
|
|
||||||
export const FULL_RELAYS = [
|
export const FULL_RELAYS = [
|
||||||
"wss://welcome.nostr.wine",
|
|
||||||
"wss://relay.nostr.band",
|
|
||||||
"wss://relay.damus.io",
|
"wss://relay.damus.io",
|
||||||
|
"wss://relay.nostr.band/all",
|
||||||
"wss://relay.nostrich.land",
|
"wss://relay.nostrich.land",
|
||||||
"wss://nostr.mutinywallet.com",
|
"wss://relay.nostrgraph.net",
|
||||||
];
|
];
|
||||||
|
@ -3,7 +3,7 @@ import destr from "destr";
|
|||||||
import { nip19 } from "nostr-tools";
|
import { nip19 } from "nostr-tools";
|
||||||
|
|
||||||
export function truncateContent(str, n) {
|
export function truncateContent(str, n) {
|
||||||
return str.length > n ? `${str.slice(0, n - 1)}…` : str;
|
return str.length > n ? `${str.slice(0, n - 1)}...` : str;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function setToArray(tags: any) {
|
export function setToArray(tags: any) {
|
||||||
|
Loading…
Reference in New Issue
Block a user