From b11e7978d040f066fdc1eb395c89c64fcbb5917b Mon Sep 17 00:00:00 2001 From: Mike Smith <89040888+smiggiddy@users.noreply.github.com> Date: Thu, 26 Jun 2025 16:30:30 -0400 Subject: [PATCH] not doing any more --- file-uploader/README.md | 1 + .../migration.sql | 2 ++ .../migration.sql | 9 ++++++++ file-uploader/public/js/form.js | 3 +-- file-uploader/public/js/script.js | 10 +++++++++ file-uploader/src/routes/fileRouter.js | 2 +- .../src/views/partials/directoryListing.ejs | 2 +- file-uploader/src/views/partials/fileInfo.ejs | 22 ++++++++++--------- file-uploader/src/views/partials/footer.ejs | 1 + .../src/views/partials/newDirectory.ejs | 20 +++++++++-------- 10 files changed, 49 insertions(+), 23 deletions(-) create mode 100644 file-uploader/README.md create mode 100644 file-uploader/prisma/migrations/20250609195945_add_modified_at/migration.sql create mode 100644 file-uploader/prisma/migrations/20250615005234_updated_dir_creation_date/migration.sql create mode 100644 file-uploader/public/js/script.js 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 <% } %>