From 97afef9ac057c2d3adba9611f2ecb6da7445025c Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Tue, 10 Oct 2023 10:54:13 +0200 Subject: [PATCH] fix user dashboard --- idhub/user/__init__.py | 0 idhub/user/views.py | 66 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 66 insertions(+) create mode 100644 idhub/user/__init__.py create mode 100644 idhub/user/views.py diff --git a/idhub/user/__init__.py b/idhub/user/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/idhub/user/views.py b/idhub/user/views.py new file mode 100644 index 0000000..66bba56 --- /dev/null +++ b/idhub/user/views.py @@ -0,0 +1,66 @@ +import logging + +from django.utils.translation import gettext_lazy as _ +from django.urls import reverse_lazy +from django.contrib import messages +from idhub.mixins import UserView + + +class MyProfile(UserView): + title = _("My profile") + section = "MyProfile" + + +class MyWallet(UserView): + title = _("My Wallet") + section = "MyWallet" + + +class UserDashboardView(UserView): + template_name = "idhub/user_dashboard.html" + title = _('Dashboard') + subtitle = _('Success') + icon = 'bi bi-bell' + section = "Home" + + +class UserProfileView(MyProfile): + template_name = "idhub/user_profile.html" + subtitle = _('My personal Data') + icon = 'bi bi-person' + + +class UserRolesView(MyProfile): + template_name = "idhub/user_roles.html" + subtitle = _('My roles') + icon = 'fa-brands fa-critical-role' + + +class UserGDPRView(MyProfile): + template_name = "idhub/user_gdpr.html" + subtitle = _('GDPR info') + icon = 'bi bi-file-earmark-medical' + + +class UserIdentitiesView(MyWallet): + template_name = "idhub/user_identities.html" + subtitle = _('Identities (DID)') + icon = 'bi bi-patch-check-fill' + + +class UserCredentialsView(MyWallet): + template_name = "idhub/user_credentials.html" + subtitle = _('Credentials') + icon = 'bi bi-patch-check-fill' + + +class UserCredentialsRequiredView(MyWallet): + template_name = "idhub/user_credentials_required.html" + subtitle = _('Credentials required') + icon = 'bi bi-patch-check-fill' + + +class UserCredentialsPresentationView(MyWallet): + template_name = "idhub/user_credentials_presentation.html" + subtitle = _('Credentials Presentation') + icon = 'bi bi-patch-check-fill'