diff --git a/file-uploader/README.md b/file-uploader/README.md new file mode 100644 index 0000000..dd74350 --- /dev/null +++ b/file-uploader/README.md @@ -0,0 +1 @@ +this is not my best work diff --git a/file-uploader/prisma/migrations/20250609195945_add_modified_at/migration.sql b/file-uploader/prisma/migrations/20250609195945_add_modified_at/migration.sql new file mode 100644 index 0000000..15d0c31 --- /dev/null +++ b/file-uploader/prisma/migrations/20250609195945_add_modified_at/migration.sql @@ -0,0 +1,2 @@ +-- AlterTable +ALTER TABLE "File" ADD COLUMN "modifiedAt" TIMESTAMP(3) NOT NULL DEFAULT '2020-03-19 14:21:00 +02:00'; diff --git a/file-uploader/prisma/migrations/20250615005234_updated_dir_creation_date/migration.sql b/file-uploader/prisma/migrations/20250615005234_updated_dir_creation_date/migration.sql new file mode 100644 index 0000000..751fc9e --- /dev/null +++ b/file-uploader/prisma/migrations/20250615005234_updated_dir_creation_date/migration.sql @@ -0,0 +1,9 @@ +/* + Warnings: + + - You are about to drop the column `creation_date` on the `Folder` table. All the data in the column will be lost. + +*/ +-- AlterTable +ALTER TABLE "Folder" DROP COLUMN "creation_date", +ADD COLUMN "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP; diff --git a/file-uploader/public/js/form.js b/file-uploader/public/js/form.js index f83c9a0..f994225 100644 --- a/file-uploader/public/js/form.js +++ b/file-uploader/public/js/form.js @@ -34,8 +34,7 @@ const passwordValid = () => { const passwordValidityCheck = (password) => { if (!/\d/.test(password)) return false; - if (!/[\!@#%\^&\*\(\)\_\+\-=\[\]{}\|;':",\.\/\<\>\~\`]/.test(password)) - return false; + if (!/[!@#%^&*()_+\-=[\]{}|;':",./<>~`]/.test(password)) return false; if (password.length < 8) return false; return true; diff --git a/file-uploader/public/js/script.js b/file-uploader/public/js/script.js new file mode 100644 index 0000000..bee992b --- /dev/null +++ b/file-uploader/public/js/script.js @@ -0,0 +1,10 @@ +function directoryButton() { + const btn = document.querySelector('.new-directory>form>.container>button'); + const formItem = document.querySelector( + '.new-directory>form>.container>div.form-item', + ); + console.log(btn); + // formItem.style.display = 'none'; +} + +directoryButton(); diff --git a/file-uploader/src/routes/fileRouter.js b/file-uploader/src/routes/fileRouter.js index 8382642..4f05ba0 100644 --- a/file-uploader/src/routes/fileRouter.js +++ b/file-uploader/src/routes/fileRouter.js @@ -11,6 +11,6 @@ fileRouter.post( ); fileRouter.post('/directory', loggedIn, fileController.createDirectory); fileRouter.get('/directory', loggedIn, fileController.directoryContents); -fileRouter.get('/file', loggedIn, fileController.getFileData); +fileRouter.get('/detail', loggedIn, fileController.getFileData); module.exports = fileRouter; diff --git a/file-uploader/src/views/partials/directoryListing.ejs b/file-uploader/src/views/partials/directoryListing.ejs index 8f2d060..80b53be 100644 --- a/file-uploader/src/views/partials/directoryListing.ejs +++ b/file-uploader/src/views/partials/directoryListing.ejs @@ -19,7 +19,7 @@ <% if (isDirectory) { %> d <%= item.name %> / <% } else { %> - - <%= item.name %> Details + - <%= item.name %> Details <% } %>
diff --git a/file-uploader/src/views/partials/fileInfo.ejs b/file-uploader/src/views/partials/fileInfo.ejs index a7446b7..0ab1a99 100644 --- a/file-uploader/src/views/partials/fileInfo.ejs +++ b/file-uploader/src/views/partials/fileInfo.ejs @@ -1,10 +1,12 @@ -
- - - Back -
+<%- include('header', {pageTitle: file.name}) %> +
+
+ + Back +
+
diff --git a/file-uploader/src/views/partials/footer.ejs b/file-uploader/src/views/partials/footer.ejs index 15b9011..b25681f 100644 --- a/file-uploader/src/views/partials/footer.ejs +++ b/file-uploader/src/views/partials/footer.ejs @@ -1,3 +1,4 @@ + diff --git a/file-uploader/src/views/partials/newDirectory.ejs b/file-uploader/src/views/partials/newDirectory.ejs index 8b23ee3..2142675 100644 --- a/file-uploader/src/views/partials/newDirectory.ejs +++ b/file-uploader/src/views/partials/newDirectory.ejs @@ -1,10 +1,12 @@ -
-
-
- - +
+ +
+
+ + +
+ > +
- > - -
- + +