From de391916245dc67d38ad899833f20744dff91efd Mon Sep 17 00:00:00 2001 From: Summayya Date: Thu, 23 Dec 2021 23:04:52 +0530 Subject: [PATCH 01/58] refactor: my-account page --- frappe/www/me.html | 97 ++++++++++++++++++++++++++++++++++++++-------- frappe/www/me.py | 3 +- 2 files changed, 82 insertions(+), 18 deletions(-) diff --git a/frappe/www/me.html b/frappe/www/me.html index 4f9a59cac5..196457ae0b 100644 --- a/frappe/www/me.html +++ b/frappe/www/me.html @@ -1,31 +1,94 @@ +{% from "frappe/templates/includes/avatar_macro.html" import avatar %} {% extends "templates/web.html" %} - -{% block title %}{{ _("My Account") }}{% endblock %} -{% block header %}

{{ _("My Account") }}

{% endblock %} - +{% block title %} +{{ _("My Account") }} +{% endblock %} +{% block header %} +

{{_("My Account") }}

+{% endblock %} {% block page_content %} -
-
- +
-
+
-{% endblock %} +{% endblock %} \ No newline at end of file diff --git a/frappe/www/me.py b/frappe/www/me.py index fbb6d53ac6..0ec73117ac 100644 --- a/frappe/www/me.py +++ b/frappe/www/me.py @@ -10,5 +10,6 @@ no_cache = 1 def get_context(context): if frappe.session.user=='Guest': frappe.throw(_("You need to be logged in to access this page"), frappe.PermissionError) - + + context.current_user = frappe.get_doc("User", frappe.session.user) context.show_sidebar=True \ No newline at end of file From 92ac6d9c995fb5161928d24cdf5c6dbcf0277e5b Mon Sep 17 00:00:00 2001 From: Summayya Date: Thu, 23 Dec 2021 23:05:21 +0530 Subject: [PATCH 02/58] fix: my-account page styles --- frappe/public/scss/website/index.scss | 1 + frappe/public/scss/website/my_account.scss | 116 +++++++++++++++++++++ 2 files changed, 117 insertions(+) create mode 100644 frappe/public/scss/website/my_account.scss diff --git a/frappe/public/scss/website/index.scss b/frappe/public/scss/website/index.scss index c4f66b803b..0dea8fa612 100644 --- a/frappe/public/scss/website/index.scss +++ b/frappe/public/scss/website/index.scss @@ -27,6 +27,7 @@ @import 'navbar'; @import 'footer'; @import 'error-state'; +@import 'my_account'; .ql-editor.read-mode { padding: 0; diff --git a/frappe/public/scss/website/my_account.scss b/frappe/public/scss/website/my_account.scss new file mode 100644 index 0000000000..929f3d2876 --- /dev/null +++ b/frappe/public/scss/website/my_account.scss @@ -0,0 +1,116 @@ +//styles for my account and edit-profile page +@include media-breakpoint-up(sm) { + body[data-path="me"] { + background-color: var(--bg-gray); + } +} + +@include media-breakpoint-down(sm) { + #page-me { + .side-list { + .list-group { + display: none; + } + } + } +} + +.my-account-header { + color: var(--gray-900); + margin-bottom: var(--margin-lg); + font-weight: bold; + + @include media-breakpoint-down(sm) { + margin-left: -1rem; + } +} + +.account-info { + background-color: var(--fg-color); + border-radius: var(--border-radius-md); + padding: var(--padding-sm) 25px; + max-width: 850px; + + @include media-breakpoint-up(sm) { + margin-left: 0; + } + + @include media-breakpoint-down(sm) { + padding: 0; + } + + .my-account-name, + .my-account-item { + color: var(--gray-900); + font-weight: var(--text-bold); + } + + .my-account-avatar { + + .avatar { + height: 60px; + width: 60px; + } + } + + .my-account-item-desc { + color: var(--gray-700); + font-size: var(--font-size-sm); + } + + .my-account-item-link { + font-size: var(--font-size-sm); + + a { + text-decoration: none; + + .edit-profile-icon { + stroke: var(--blue-500); + } + } + + .right-icon { + @include media-breakpoint-up(sm) { + display: none; + } + } + + .item-link-text { + @include media-breakpoint-down(sm) { + display: none; + } + } + } + + .col { + padding: var(--padding-md) 0; + border-bottom: 1px solid var(--border-color); + + .form-group { + margin-right: var(--margin-lg); + } + } + + :last-child { + border: 0; + } +} + +//styles for third party apps page +//center wrt to outer most container and not immediate parent +.empty-apps-state { + position: relative; + padding-top: 18rem; + margin-left: -250px; + margin-top: -150px; + text-align: center; + + @include media-breakpoint-down(sm) { + margin: auto; + padding-top: 5rem; + } + + @include media-breakpoint-down(md) { + margin-left: 0; + } +} \ No newline at end of file From 06ac314ab45340e6e92f0323a90dead578fd4acc Mon Sep 17 00:00:00 2001 From: Summayya Date: Thu, 23 Dec 2021 23:12:18 +0530 Subject: [PATCH 03/58] refactor: add svg for empty state --- frappe/public/images/ui-states/empty-app-state.svg | 6 ++++++ frappe/www/third_party_apps.html | 10 ++++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 frappe/public/images/ui-states/empty-app-state.svg diff --git a/frappe/public/images/ui-states/empty-app-state.svg b/frappe/public/images/ui-states/empty-app-state.svg new file mode 100644 index 0000000000..b7e346f310 --- /dev/null +++ b/frappe/public/images/ui-states/empty-app-state.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/frappe/www/third_party_apps.html b/frappe/www/third_party_apps.html index db31a4d1c8..0763382f70 100644 --- a/frappe/www/third_party_apps.html +++ b/frappe/www/third_party_apps.html @@ -2,7 +2,7 @@ {% block title %} {{ _("Third Party Apps") }} {% endblock %} {% block header %} -

{{ _("Third Party Apps") }}

+ {% endblock %} {% block page_sidebar %} @@ -52,9 +52,15 @@
{% endfor %} {% else %} -
+
+ +
{{ _("No Active Sessions")}}
+
+ {{ _("Looks like you haven’t added any third party apps.")}} +
+
{% endif %}