From b1f61db08f392a6368439a92d0c8b883887f66e3 Mon Sep 17 00:00:00 2001 From: Ashley Date: Mon, 18 Sep 2023 22:05:58 +0100 Subject: [PATCH] feat: Update ESLint settings and add new modal functionality - Updated ESLint settings to include additional file types and validate specific languages. - Added new modal functionality to display modals with customizable title, body, footer, and buttons. - The modal can be closed by clicking on the overlay or pressing the escape key. - The modal component can be created and destroyed programmatically using the `$modal.create` and `$modal.destroy` methods. - Added a confirm modal method that prompts the user with a title and message and returns a promise that resolves to a boolean value. --- frontend/.vscode/settings.json | 21 +- frontend/src/App.vue | 18 +- .../InvitationList/InvitationItem.vue | 4 +- frontend/src/components/UserList/UserItem.vue | 4 +- frontend/src/components/UserList/UserList.vue | 6 +- frontend/src/main.ts | 29 +-- .../src/modules/admin/pages/Invitations.vue | 15 +- frontend/src/plugins/modal.tsx | 186 ++++++++++++++++++ 8 files changed, 252 insertions(+), 31 deletions(-) create mode 100644 frontend/src/plugins/modal.tsx diff --git a/frontend/.vscode/settings.json b/frontend/.vscode/settings.json index 727f876ad..21efc1366 100644 --- a/frontend/.vscode/settings.json +++ b/frontend/.vscode/settings.json @@ -16,21 +16,28 @@ "source.fixAll.eslint": true, "source.organizeImports": false }, - "vetur.validation.template": false, - "eslint.validate": ["javascript", "javascriptreact", "typescript", "typescriptreact", "vue"], + "eslint.validate": [ + "javascript", + "javascriptreact", + "typescript", + "typescriptreact", + "vue" + ], "[nunjucks]": { "editor.defaultFormatter": "okitavera.vscode-nunjucks-formatter" }, "[html]": { "editor.defaultFormatter": "vscode.html-language-features" }, - "files.associations": { - "*.vue": "vue" - }, "prettier.configPath": ".prettierrc.js", - "vetur.format.defaultFormatter.js": "vscode-typescript", "editor.wordWrap": "off", "[xml]": { "editor.defaultFormatter": "fabianlauer.vs-code-xml-format" + }, + // hide node_modules folder + "files.exclude": { + "**/.git": true, + "**/.DS_Store": true, + "**/node_modules": true, } -} +} \ No newline at end of file diff --git a/frontend/src/App.vue b/frontend/src/App.vue index 2c38efb2f..dde2e72c6 100644 --- a/frontend/src/App.vue +++ b/frontend/src/App.vue @@ -4,7 +4,7 @@ - +