mirror of
https://github.com/layer-systems/website.git
synced 2026-09-13 06:07:29 +02:00
* new web os frontend * add docs * Add CNAME and restore NIP-05 nostr.json for GitHub Pages The Pages custom domain (layer.systems) is only stored in repo settings; a CNAME file in the build output makes it survive Pages reconfiguration. Restore public/.well-known/nostr.json, which this branch had dropped — removing it would break the existing NIP-05 identifiers on layer.systems. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014YtQoCzkP7Bo8nruhxojPi * Ignore eslint and tsc build caches Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014YtQoCzkP7Bo8nruhxojPi * Rebrand page title and metadata to LAYER.systems The site ships on layer.systems, so the document title, meta and OG description, and the web manifest now carry that name instead of "Nostr OS". OsShell sets the title at runtime, so it is updated too — otherwise the tab would fall back to the old branding after hydration. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014YtQoCzkP7Bo8nruhxojPi * Rename remaining visible "Nostr OS" strings to LAYER.systems Covers the About window heading, the mobile shell header and the app icon's aria-label, so the visible branding matches the page title. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014YtQoCzkP7Bo8nruhxojPi --------- Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
37 lines
965 B
TypeScript
37 lines
965 B
TypeScript
import { useMutation } from "@tanstack/react-query";
|
|
import { BlossomUploader } from '@nostrify/nostrify/uploaders';
|
|
|
|
import { useCurrentUser } from "./useCurrentUser";
|
|
import { useAppContext } from "./useAppContext";
|
|
import { getEffectiveBlossomServers } from "@/lib/appBlossom";
|
|
|
|
export function useUploadFile() {
|
|
const { user } = useCurrentUser();
|
|
const { config } = useAppContext();
|
|
|
|
return useMutation({
|
|
mutationFn: async (file: File) => {
|
|
if (!user) {
|
|
throw new Error('Must be logged in to upload files');
|
|
}
|
|
|
|
const servers = getEffectiveBlossomServers(
|
|
config.blossomServerMetadata,
|
|
config.useAppBlossomServers,
|
|
);
|
|
|
|
if (servers.length === 0) {
|
|
throw new Error('No Blossom servers configured');
|
|
}
|
|
|
|
const uploader = new BlossomUploader({
|
|
servers,
|
|
signer: user.signer,
|
|
});
|
|
|
|
const tags = await uploader.upload(file);
|
|
return tags;
|
|
},
|
|
});
|
|
}
|