Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

File manager fixes #137

Merged
merged 2 commits into from
Aug 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ export function FileModal({
{/* backdrop */}
<DialogBackdrop
transition
className="fixed inset-0 z-50 bg-black/50 transition duration-300 ease-out data-[closed]:opacity-0"
className="fixed inset-0 z-[200] bg-black/50 transition duration-300 ease-out data-[closed]:opacity-0"
/>

<div className="fixed inset-0 z-50 flex flex-col items-center overflow-y-auto p-4 pt-8 sm:pt-12">
<div className="fixed inset-0 z-[200] flex flex-col items-center overflow-y-auto p-4 pt-8 sm:pt-12">
{/* panel */}
<DialogPanel
transition
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ export default function RenameModal(props: { path: string } & FileModalProps) {
},
);
if (errors || !data?.cmsFileMove) {
console.log(errors?.[0].code ?? errors);
notifications.show({
color: 'red',
message: 'An error occurred.',
Expand Down
1 change: 1 addition & 0 deletions server/src/db/schema/CMSFile/functions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ export const cmsFileCreateFolder = h<
M.MutationResolvers['cmsFileCreateFolder']
>(async ({ args: { root } }) => {
// validate folder name
if (!root.length) return true; // "creates" the root folder
if (!root.match(/^\w/)) throw err('BAD_FOLDER_NAME');
if (!root.match(/\/$/)) throw err('ROOT_FOLDER_MISSING_TRAILING_SLASH');

Expand Down