mirror of
https://github.com/diced/zipline.git
synced 2025-12-05 20:40:12 -08:00
Merge branch 'trunk' into drizzle
This commit is contained in:
@@ -25,7 +25,7 @@ import { createRoutes } from './routes';
|
||||
|
||||
export const getFile = async (id: string) =>
|
||||
prisma.file.findFirst({
|
||||
where: { name: id as string },
|
||||
where: { name: decodeURIComponent(id) },
|
||||
select: {
|
||||
...fileSelect,
|
||||
password: true,
|
||||
|
||||
@@ -7,7 +7,7 @@ import { useNavigate } from 'react-router-dom';
|
||||
import { settingsOnSubmit } from '../settingsOnSubmit';
|
||||
|
||||
const DOMAIN_REGEX =
|
||||
/^[a-zA-Z0-9][a-zA-Z0-9-_]{0,61}[a-zA-Z0-9]{0,1}\.([a-zA-Z]{1,6}|[a-zA-Z0-9-]{1,30}\.[a-zA-Z]{2,3})$/gim;
|
||||
/^[a-zA-Z0-9][a-zA-Z0-9-_]{0,61}[a-zA-Z0-9]{0,1}\.([a-zA-Z]{1,6}|[a-zA-Z0-9-]{1,30}\.[a-zA-Z]{2,30})$/gim;
|
||||
|
||||
export default function Domains({
|
||||
swr: { data, isLoading },
|
||||
|
||||
@@ -10,5 +10,5 @@ export function useTitle(title?: string) {
|
||||
useEffect(() => {
|
||||
if (!data || error || isLoading) return;
|
||||
document.title = title ? `${data.website.title} – ${title}` : data.website.title || 'Zipline';
|
||||
}, [title, location]);
|
||||
}, [title, location, data, isLoading]);
|
||||
}
|
||||
|
||||
@@ -321,7 +321,7 @@ export default fastifyPlugin(
|
||||
z
|
||||
.string()
|
||||
.regex(
|
||||
/^[a-zA-Z0-9][a-zA-Z0-9-_]{0,61}[a-zA-Z0-9]{0,1}\.([a-zA-Z]{1,6}|[a-zA-Z0-9-]{1,30}\.[a-zA-Z]{2,3})$/gi,
|
||||
/^[a-zA-Z0-9][a-zA-Z0-9-_]{0,61}[a-zA-Z0-9]{0,1}\.([a-zA-Z]{1,6}|[a-zA-Z0-9-]{1,30}\.[a-zA-Z]{2,30})$/gi,
|
||||
'Invalid Domain',
|
||||
),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user