mirror of
https://github.com/luminous-devs/lume.git
synced 2024-09-18 11:13: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}
|
||||
dev: false
|
||||
|
||||
/@floating-ui/core@1.3.0:
|
||||
resolution: {integrity: sha512-vX1WVAdPjZg9DkDkC+zEx/tKtnST6/qcNpwcjeBgco3XRNHz5PUA+ivi/yr6G3o0kMR60uKBJcfOdfzOFI7PMQ==}
|
||||
/@floating-ui/core@1.3.1:
|
||||
resolution: {integrity: sha512-Bu+AMaXNjrpjh41znzHqaz3r2Nr8hHuHZT6V2LBKMhyMl0FgKA62PNYbqnfgmzOhoWZj70Zecisbo4H1rotP5g==}
|
||||
dev: false
|
||||
|
||||
/@floating-ui/dom@1.3.0:
|
||||
resolution: {integrity: sha512-qIAwejE3r6NeA107u4ELDKkH8+VtgRKdXqtSPaKflL2S2V+doyN+Wt9s5oHKXPDo4E8TaVXaHT3+6BbagH31xw==}
|
||||
/@floating-ui/dom@1.4.0:
|
||||
resolution: {integrity: sha512-b4F0iWffLiqb/TpP2PWVOixrZqE6ni+6VT64AmFH7sJIF3SFPLbe6/h3jQ5Cwffs+HaC9A8V0TQzCPBwVvziIA==}
|
||||
dependencies:
|
||||
'@floating-ui/core': 1.3.0
|
||||
'@floating-ui/core': 1.3.1
|
||||
dev: false
|
||||
|
||||
/@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-dom: '>=16.8.0'
|
||||
dependencies:
|
||||
'@floating-ui/dom': 1.3.0
|
||||
'@floating-ui/dom': 1.4.0
|
||||
react: 18.2.0
|
||||
react-dom: 18.2.0(react@18.2.0)
|
||||
dev: false
|
||||
@ -1370,7 +1370,7 @@ packages:
|
||||
postcss: ^8.1.0
|
||||
dependencies:
|
||||
browserslist: 4.21.9
|
||||
caniuse-lite: 1.0.30001503
|
||||
caniuse-lite: 1.0.30001504
|
||||
fraction.js: 4.2.0
|
||||
normalize-range: 0.1.2
|
||||
picocolors: 1.0.0
|
||||
@ -1414,7 +1414,7 @@ packages:
|
||||
engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7}
|
||||
hasBin: true
|
||||
dependencies:
|
||||
caniuse-lite: 1.0.30001503
|
||||
caniuse-lite: 1.0.30001504
|
||||
electron-to-chromium: 1.4.433
|
||||
node-releases: 2.0.12
|
||||
update-browserslist-db: 1.0.11(browserslist@4.21.9)
|
||||
@ -1482,8 +1482,8 @@ packages:
|
||||
engines: {node: '>=6'}
|
||||
dev: false
|
||||
|
||||
/caniuse-lite@1.0.30001503:
|
||||
resolution: {integrity: sha512-Sf9NiF+wZxPfzv8Z3iS0rXM1Do+iOy2Lxvib38glFX+08TCYYYGR5fRJXk4d77C4AYwhUjgYgMsMudbh2TqCKw==}
|
||||
/caniuse-lite@1.0.30001504:
|
||||
resolution: {integrity: sha512-5uo7eoOp2mKbWyfMXnGO9rJWOGU8duvzEiYITW+wivukL7yHH4gX9yuRaobu6El4jPxo6jKZfG+N6fB621GD/Q==}
|
||||
dev: true
|
||||
|
||||
/chalk@2.4.2:
|
||||
|
@ -1,133 +1,141 @@
|
||||
{
|
||||
"build": {
|
||||
"beforeDevCommand": "pnpm dev",
|
||||
"beforeBuildCommand": "pnpm build",
|
||||
"devPath": "http://localhost:3000",
|
||||
"distDir": "../dist/client",
|
||||
"withGlobalTauri": true
|
||||
},
|
||||
"package": {
|
||||
"productName": "Lume",
|
||||
"version": "1.0.0"
|
||||
},
|
||||
"tauri": {
|
||||
"allowlist": {
|
||||
"all": false,
|
||||
"app": {
|
||||
"all": false
|
||||
},
|
||||
"os": {
|
||||
"all": true
|
||||
},
|
||||
"http": {
|
||||
"all": true,
|
||||
"request": true,
|
||||
"scope": ["https://void.cat/*", "https://skrape.dev/*"]
|
||||
},
|
||||
"fs": {
|
||||
"all": false,
|
||||
"readFile": true,
|
||||
"readDir": true,
|
||||
"scope": [
|
||||
"$APPDATA/*",
|
||||
"$DATA/*",
|
||||
"$LOCALDATA/*",
|
||||
"$DESKTOP/*",
|
||||
"$DOCUMENT/*",
|
||||
"$DOWNLOAD/*",
|
||||
"$HOME/*",
|
||||
"$PICTURE/*",
|
||||
"$PUBLIC/*",
|
||||
"$VIDEO/*"
|
||||
]
|
||||
},
|
||||
"shell": {
|
||||
"all": false,
|
||||
"open": true
|
||||
},
|
||||
"clipboard": {
|
||||
"all": false,
|
||||
"writeText": true,
|
||||
"readText": true
|
||||
},
|
||||
"dialog": {
|
||||
"all": false,
|
||||
"open": true
|
||||
},
|
||||
"notification": {
|
||||
"all": true
|
||||
},
|
||||
"window": {
|
||||
"startDragging": true,
|
||||
"close": true
|
||||
},
|
||||
"process": {
|
||||
"all": false,
|
||||
"exit": false,
|
||||
"relaunch": true,
|
||||
"relaunchDangerousAllowSymlinkMacos": false
|
||||
}
|
||||
},
|
||||
"bundle": {
|
||||
"active": true,
|
||||
"category": "SocialNetworking",
|
||||
"copyright": "",
|
||||
"appimage": {
|
||||
"bundleMediaFramework": true
|
||||
},
|
||||
"deb": {
|
||||
"depends": []
|
||||
},
|
||||
"externalBin": [],
|
||||
"icon": ["icons/32x32.png", "icons/128x128.png", "icons/128x128@2x.png", "icons/icon.icns", "icons/icon.ico"],
|
||||
"identifier": "com.lume.nu",
|
||||
"longDescription": "",
|
||||
"macOS": {
|
||||
"entitlements": null,
|
||||
"exceptionDomain": "",
|
||||
"frameworks": [],
|
||||
"providerShortName": null,
|
||||
"signingIdentity": null
|
||||
},
|
||||
"resources": [],
|
||||
"shortDescription": "",
|
||||
"targets": "all",
|
||||
"windows": {
|
||||
"certificateThumbprint": null,
|
||||
"digestAlgorithm": "sha256",
|
||||
"timestampUrl": ""
|
||||
}
|
||||
},
|
||||
"security": {
|
||||
"csp": "upgrade-insecure-requests"
|
||||
},
|
||||
"updater": {
|
||||
"active": true,
|
||||
"endpoints": ["https://releases.lume.nu/{{target}}/{{arch}}/{{current_version}}"],
|
||||
"dialog": true,
|
||||
"pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IDIyOUI0Qjc1MTBCOUNGNUEKUldSYXo3a1FkVXViSWxYTlhhS0E4UjRIcEkzd04yN1Y0dys4QWY5WjRybEF5eElLcGFXZmJnRzQK",
|
||||
"windows": {
|
||||
"installMode": "passive"
|
||||
}
|
||||
},
|
||||
"systemTray": {
|
||||
"iconPath": "icons/icon.png",
|
||||
"iconAsTemplate": true
|
||||
},
|
||||
"windows": [
|
||||
{
|
||||
"title": "Lume",
|
||||
"theme": "Dark",
|
||||
"titleBarStyle": "Overlay",
|
||||
"hiddenTitle": true,
|
||||
"transparent": false,
|
||||
"fullscreen": false,
|
||||
"resizable": true,
|
||||
"width": 1100,
|
||||
"height": 800,
|
||||
"minWidth": 800,
|
||||
"minHeight": 700
|
||||
}
|
||||
]
|
||||
}
|
||||
"build": {
|
||||
"beforeDevCommand": "pnpm dev",
|
||||
"beforeBuildCommand": "pnpm build",
|
||||
"devPath": "http://localhost:3000",
|
||||
"distDir": "../dist/client",
|
||||
"withGlobalTauri": true
|
||||
},
|
||||
"package": {
|
||||
"productName": "Lume",
|
||||
"version": "1.0.0"
|
||||
},
|
||||
"tauri": {
|
||||
"allowlist": {
|
||||
"all": false,
|
||||
"app": {
|
||||
"all": false
|
||||
},
|
||||
"os": {
|
||||
"all": true
|
||||
},
|
||||
"http": {
|
||||
"all": true,
|
||||
"request": true,
|
||||
"scope": ["https://void.cat/*", "https://skrape.dev/*"]
|
||||
},
|
||||
"fs": {
|
||||
"all": false,
|
||||
"readFile": true,
|
||||
"readDir": true,
|
||||
"scope": [
|
||||
"$APPDATA/*",
|
||||
"$DATA/*",
|
||||
"$LOCALDATA/*",
|
||||
"$DESKTOP/*",
|
||||
"$DOCUMENT/*",
|
||||
"$DOWNLOAD/*",
|
||||
"$HOME/*",
|
||||
"$PICTURE/*",
|
||||
"$PUBLIC/*",
|
||||
"$VIDEO/*"
|
||||
]
|
||||
},
|
||||
"shell": {
|
||||
"all": false,
|
||||
"open": true
|
||||
},
|
||||
"clipboard": {
|
||||
"all": false,
|
||||
"writeText": true,
|
||||
"readText": true
|
||||
},
|
||||
"dialog": {
|
||||
"all": false,
|
||||
"open": true
|
||||
},
|
||||
"notification": {
|
||||
"all": true
|
||||
},
|
||||
"window": {
|
||||
"startDragging": true,
|
||||
"close": true
|
||||
},
|
||||
"process": {
|
||||
"all": false,
|
||||
"exit": false,
|
||||
"relaunch": true,
|
||||
"relaunchDangerousAllowSymlinkMacos": false
|
||||
}
|
||||
},
|
||||
"bundle": {
|
||||
"active": true,
|
||||
"category": "SocialNetworking",
|
||||
"copyright": "",
|
||||
"appimage": {
|
||||
"bundleMediaFramework": true
|
||||
},
|
||||
"deb": {
|
||||
"depends": []
|
||||
},
|
||||
"externalBin": [],
|
||||
"icon": [
|
||||
"icons/32x32.png",
|
||||
"icons/128x128.png",
|
||||
"icons/128x128@2x.png",
|
||||
"icons/icon.icns",
|
||||
"icons/icon.ico"
|
||||
],
|
||||
"identifier": "com.lume.nu",
|
||||
"longDescription": "",
|
||||
"macOS": {
|
||||
"entitlements": null,
|
||||
"exceptionDomain": "",
|
||||
"frameworks": [],
|
||||
"providerShortName": null,
|
||||
"signingIdentity": null
|
||||
},
|
||||
"resources": [],
|
||||
"shortDescription": "",
|
||||
"targets": "all",
|
||||
"windows": {
|
||||
"certificateThumbprint": null,
|
||||
"digestAlgorithm": "sha256",
|
||||
"timestampUrl": ""
|
||||
}
|
||||
},
|
||||
"security": {
|
||||
"csp": "upgrade-insecure-requests"
|
||||
},
|
||||
"updater": {
|
||||
"active": true,
|
||||
"endpoints": [
|
||||
"https://releases.lume.nu/{{target}}/{{arch}}/{{current_version}}"
|
||||
],
|
||||
"dialog": true,
|
||||
"pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IDIyOUI0Qjc1MTBCOUNGNUEKUldSYXo3a1FkVXViSWxYTlhhS0E4UjRIcEkzd04yN1Y0dys4QWY5WjRybEF5eElLcGFXZmJnRzQK",
|
||||
"windows": {
|
||||
"installMode": "passive"
|
||||
}
|
||||
},
|
||||
"systemTray": {
|
||||
"iconPath": "icons/icon.png",
|
||||
"iconAsTemplate": true
|
||||
},
|
||||
"windows": [
|
||||
{
|
||||
"title": "Lume",
|
||||
"theme": "Dark",
|
||||
"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 (
|
||||
<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">
|
||||
<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
|
||||
</h1>
|
||||
<div className="mt-4 flex flex-col gap-1.5">
|
||||
|
@ -107,7 +107,7 @@ export function Page() {
|
||||
async function fetchChannelMessages() {
|
||||
try {
|
||||
const ids = [];
|
||||
const channels: any = await getChannels(10, 0);
|
||||
const channels: any = await getChannels();
|
||||
channels.forEach((channel) => {
|
||||
ids.push(channel.event_id);
|
||||
});
|
||||
|
@ -56,7 +56,7 @@ export function FeedBlock({ params }: { params: any }) {
|
||||
}, [notes.length, rowVirtualizer.getVirtualItems()]);
|
||||
|
||||
return (
|
||||
<div className="shrink-0 w-[420px] border-r border-zinc-900">
|
||||
<div className="shrink-0 w-[400px] border-r border-zinc-900">
|
||||
<div
|
||||
data-tauri-drag-region
|
||||
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 (
|
||||
<div className="shrink-0 w-[420px] border-r border-zinc-900">
|
||||
<div className="shrink-0 w-[400px] border-r border-zinc-900">
|
||||
<div
|
||||
data-tauri-drag-region
|
||||
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 (
|
||||
<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
|
||||
data-tauri-drag-region
|
||||
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 (
|
||||
<div className="shrink-0 w-[420px] border-r border-zinc-900">
|
||||
<div className="shrink-0 w-[400px] border-r border-zinc-900">
|
||||
<div
|
||||
data-tauri-drag-region
|
||||
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
|
||||
export async function getChannels(limit: number, offset: number) {
|
||||
export async function getChannels() {
|
||||
const db = await connect();
|
||||
return await db.select(
|
||||
`SELECT * FROM channels ORDER BY created_at DESC LIMIT "${limit}" OFFSET "${offset}";`,
|
||||
);
|
||||
return await db.select("SELECT * FROM channels ORDER BY created_at DESC;");
|
||||
}
|
||||
|
||||
// get channel by id
|
||||
|
@ -11,7 +11,7 @@ export function Kind1({
|
||||
return (
|
||||
<>
|
||||
<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>
|
||||
{Array.isArray(content.images) && content.images.length ? (
|
||||
<ImagePreview urls={content.images} />
|
||||
|
@ -28,7 +28,7 @@ export function LinkPreview({ urls }: { urls: string[] }) {
|
||||
<Image
|
||||
src={data["og:image"]}
|
||||
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">
|
||||
|
@ -21,7 +21,11 @@ export function User({
|
||||
const avatarHeight = size === "small" ? "h-6" : "h-11";
|
||||
|
||||
return (
|
||||
<Popover className="relative flex items-start gap-3">
|
||||
<Popover
|
||||
className={`relative flex gap-3 ${
|
||||
size === "small" ? "items-center" : "items-start"
|
||||
}`}
|
||||
>
|
||||
<Popover.Button
|
||||
className={`${avatarWidth} ${avatarHeight} shrink-0 overflow-hidden rounded-md bg-zinc-900`}
|
||||
>
|
||||
@ -32,7 +36,11 @@ export function User({
|
||||
/>
|
||||
</Popover.Button>
|
||||
<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)}
|
||||
</h5>
|
||||
{repost && (
|
||||
|
@ -11,7 +11,7 @@ export const useChannels = create(
|
||||
immer((set) => ({
|
||||
channels: [],
|
||||
fetch: async () => {
|
||||
const response = await getChannels(10, 0);
|
||||
const response = await getChannels();
|
||||
set({ channels: response });
|
||||
},
|
||||
add: (event) => {
|
||||
|
@ -1,16 +1,12 @@
|
||||
export const APP_VERSION = "1.0.0";
|
||||
|
||||
export const DEFAULT_AVATAR = "https://void.cat/d/KmypFh2fBdYCEvyJrPiN89.webp";
|
||||
|
||||
export const DEFAULT_CHANNEL_BANNER =
|
||||
"https://bafybeiacwit7hjmdefqggxqtgh6ht5dhth7ndptwn2msl5kpkodudsr7py.ipfs.w3s.link/banner-1.jpg";
|
||||
export const DEFAULT_AVATAR = "https://void.cat/d/PZcdCxNc24rCCxV8QXbdFQ";
|
||||
|
||||
export const OPENGRAPH_KEY = "9EJG4SY-19Q4M5J-H8R29C9-091XPCC";
|
||||
|
||||
export const FULL_RELAYS = [
|
||||
"wss://welcome.nostr.wine",
|
||||
"wss://relay.nostr.band",
|
||||
"wss://relay.damus.io",
|
||||
"wss://relay.nostr.band/all",
|
||||
"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";
|
||||
|
||||
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) {
|
||||
|
Loading…
Reference in New Issue
Block a user