Update backend address

This commit is contained in:
2026-08-27 21:05:25 +08:00
parent 11feb7f606
commit d7b70892cd
5 files changed
+6 -6

No files matched your search

+1 -1
View File
@@ -3,7 +3,7 @@ import {ArrowLeft, ArrowUpRight, FileCode2, RefreshCw, Terminal} from 'lucide-re
import {languageLabel, rawSnippetUrl} from '@/lib/snippet-utils' import {languageLabel, rawSnippetUrl} from '@/lib/snippet-utils'
import {SnippetEditor} from '@/components/snippet-editor' import {SnippetEditor} from '@/components/snippet-editor'
const API_BASE = 'http://127.0.0.1:6868' const API_BASE = 'https://snippets.rtast.cn'
type Snippet = { createdAt?: string; filename: string; content: string } type Snippet = { createdAt?: string; filename: string; content: string }
+1 -1
View File
@@ -4,7 +4,7 @@ import {FormEvent, useState} from 'react'
import {ArrowUpRight, Check, Copy, FileCode2, Loader2, Send, Terminal, X} from 'lucide-react' import {ArrowUpRight, Check, Copy, FileCode2, Loader2, Send, Terminal, X} from 'lucide-react'
import {languageLabel, rawSnippetUrl, SnippetEditor, snippetUrl} from '@/components/snippet-editor' import {languageLabel, rawSnippetUrl, SnippetEditor, snippetUrl} from '@/components/snippet-editor'
const API_BASE = 'http://127.0.0.1:6868' const API_BASE = 'https://snippets.rtast.cn'
async function copyToClipboard(text: string) { async function copyToClipboard(text: string) {
if (navigator.clipboard && window.isSecureContext) { if (navigator.clipboard && window.isSecureContext) {
@@ -78,7 +78,7 @@ export function languageLabel(filename: string) {
} }
export function rawSnippetUrl(id: string) { export function rawSnippetUrl(id: string) {
return `http://127.0.0.1:6868/${encodeURIComponent(id)}?mode=raw` return `https://snippets.rtast.cn/${encodeURIComponent(id)}?mode=raw`
} }
export function snippetUrl(id: string) { export function snippetUrl(id: string) {
+1 -1
View File
@@ -4,7 +4,7 @@ export function languageLabel(filename: string) {
} }
export function rawSnippetUrl(id: string) { export function rawSnippetUrl(id: string) {
return `http://127.0.0.1:6868/${encodeURIComponent(id)}?mode=raw` return `https://snippets.rtast.cn/${encodeURIComponent(id)}?mode=raw`
} }
export function snippetUrl(id: string) { export function snippetUrl(id: string) {
+2 -2
View File
@@ -1,7 +1,7 @@
/// <reference types="next" /> /// <reference types="next" />
/// <reference types="next/image-types/global" /> /// <reference types="next/image-types/global" />
import "./.next/dev/types/routes.d.ts"; import "./.next/types/routes.d.ts";
import "./.next/dev/types/root-params.d.ts"; import "./.next/types/root-params.d.ts";
// NOTE: This file should not be edited // NOTE: This file should not be edited
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information. // see https://nextjs.org/docs/app/api-reference/config/typescript for more information.