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

Add login endpoint with templates and pinia #23

Merged
merged 20 commits into from
Nov 16, 2023
Merged

Conversation

delano
Copy link
Contributor

@delano delano commented Nov 16, 2023

This pull request includes several changes to improve the website's navigation, add a login endpoint, and introduce pinia for local state management. The changes include:

  • Add footer navigation to App.vue

  • Add login endpoint and remove unused crispy-forms settings.

  • Add axios and @types/axios, and pinia

  • Add axios and pinia configurations.

  • Add login view and add axios as plugin

  • Add env file and load it in Vite config.

  • Add env variable usage and update axios import.

  • Remove axios plugin.

  • Remove unused postcss.config.js file.

  • Introduced App.vue layout structure

  • Refactor routes in Vue router

  • Updated LoginPage UI and added Node types.

  • Add CORS headers middleware

  • Remove unused Vueform plugin and its config

  • Add Werkzeug to dev dependencies

  • Update tailwind.config.ts to include @tailwindcss/aspect-ratio and @tailwindcss/forms as plugins.

  • Add @types/node to the devDependencies in package.json and to the types in tsconfig.json for better Node.js compatibility.

  • Workaround for postcss config

Fixes #1234

delano added 20 commits November 6, 2023 08:40
Modified App.vue file to improve the website's navigation. Each section of the website both on 'lg' screen size and mobile is labelled accordingly. The user info section is updated to fetch user data asynchronously from /api/user endpoint. In case of failure, default guest user info is assigned. The footer section is enhanced to display a new layout. Also, rearranged the mobile menu button and added notifications bell.

Signed-off-by: delano <[email protected]>
Signed-off-by: delano <[email protected]>
- Fix axios baseURL option (was baseUrl, coming from the how-to-use example).

Signed-off-by: delano <[email protected]>
Signed-off-by: delano <[email protected]>
- Werkzeug debugger to development server (./manage.py runserver_plus)
- Pinia for local state management.

Signed-off-by: delano <[email protected]>
- Removed the Tailwind CSS configuration comments and detailed component structure from `App.vue`.
- Simplified the template by replacing static HTML layout with a dynamic `<component>` that uses metadata from `$route` to determine the layout.
- Deleted unnecessary sample UI components and their associated instructions.
- Wrapped the `<router-view>` with a layout component determined by route metadata.

Signed-off-by: delano <[email protected]>
In the Vue router, this revision introduces several enhancements.
Firstly, the `RouteRecordRaw` import from 'vue-router' is added. The
`privateApplicationRoute`, `publicApplicationRoute`, and
`publicLoginRoute` are introduced for meta data of respective routes.
Additionally, `publicRoutes` and `applicationRoutes` arrays were created
to separate the routes and provide clearer distinction between public
and private ones. Lastly, the construction of the `routes` variable was
modified to be an array of the concatenated `publicRoutes` and
`applicationRoutes`. Several comments and unnecessary lines were removed
in this process to enhance tidiness and clarity.

Signed-off-by: delano <[email protected]>
- Introduced changes to `LoginPage.vue`, where the layout was updated.
Additional divs and classes were added for better styling.
- Adjustments made to `DashboardView.vue` and `LoginView.vue`. The use
of `ApplicationPage` within these files was removed.
- Updated `tailwind.config.ts`. Modified the file structure to
TypeScript conventions and included `@tailwindcss/aspect-ratio` and
`@tailwindcss/forms` as plugins.
- Added @types/node to the devDependencies in `package.json` and to the
types in `tsconfig.json` for better Node.js compatibility.
- Finally, a new yarn.lock file reflecting the addition of Node types
was generated.

Signed-off-by: delano <[email protected]>
• Removed the Twitter and GitHub login options from the code.
• Commented out sections potentially for future use.
• Altered the alt text for the image from 'AFB logo' to 'Become an AFB
member today' aiming to improve the website's SEO performance and
accessibility.

Signed-off-by: delano <[email protected]>
@delano delano self-assigned this Nov 16, 2023
@delano delano merged commit d70902d into main Nov 16, 2023
@delano delano deleted the feature/20231106-login-ui branch November 16, 2023 22:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: ✔️ Done
Development

Successfully merging this pull request may close these issues.

1 participant