From cc74bebc0f44dc452e4489e2bdeba858ef352a70 Mon Sep 17 00:00:00 2001 From: Pranav Raj S Date: Fri, 25 Feb 2022 16:36:36 +0530 Subject: [PATCH] feat: Display Account context in the UI (#4069) --- app/controllers/dashboard_controller.rb | 4 +- .../assets/scss/_utility-helpers.scss | 6 ++ .../sidebarComponents/AccountContext.vue | 36 ++++++++++++ .../layout/sidebarComponents/Secondary.vue | 3 + .../widgets/conversation/OnboardingView.vue | 2 +- .../dashboard/i18n/locale/en/settings.json | 1 + .../dashboard/settings/profile/Index.vue | 7 ++- .../dashboard/routes/login/Login.vue | 2 +- .../dashboard/store/modules/auth.js | 13 +++++ .../store/modules/specs/auth/getters.spec.js | 56 +++++++++++++++++++ app/javascript/dashboard/store/utils/api.js | 6 +- app/javascript/shared/store/globalConfig.js | 2 + config/installation_config.yml | 6 ++ 13 files changed, 138 insertions(+), 6 deletions(-) create mode 100644 app/javascript/dashboard/components/layout/sidebarComponents/AccountContext.vue diff --git a/app/controllers/dashboard_controller.rb b/app/controllers/dashboard_controller.rb index b76ad4015..2bb8e9847 100644 --- a/app/controllers/dashboard_controller.rb +++ b/app/controllers/dashboard_controller.rb @@ -27,7 +27,9 @@ class DashboardController < ActionController::Base 'ANALYTICS_TOKEN', 'ANALYTICS_HOST', 'DIRECT_UPLOADS_ENABLED', - 'HCAPTCHA_SITE_KEY' + 'HCAPTCHA_SITE_KEY', + 'LOGOUT_REDIRECT_LINK', + 'DISABLE_USER_PROFILE_UPDATE' ).merge(app_config) end diff --git a/app/javascript/dashboard/assets/scss/_utility-helpers.scss b/app/javascript/dashboard/assets/scss/_utility-helpers.scss index 7b528d1c2..8a85dc6a5 100644 --- a/app/javascript/dashboard/assets/scss/_utility-helpers.scss +++ b/app/javascript/dashboard/assets/scss/_utility-helpers.scss @@ -54,3 +54,9 @@ .text-y-800 { color: var(--y-800); } + +.text-ellipsis { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} diff --git a/app/javascript/dashboard/components/layout/sidebarComponents/AccountContext.vue b/app/javascript/dashboard/components/layout/sidebarComponents/AccountContext.vue new file mode 100644 index 000000000..1438ac7e8 --- /dev/null +++ b/app/javascript/dashboard/components/layout/sidebarComponents/AccountContext.vue @@ -0,0 +1,36 @@ + + + diff --git a/app/javascript/dashboard/components/layout/sidebarComponents/Secondary.vue b/app/javascript/dashboard/components/layout/sidebarComponents/Secondary.vue index da14cf295..6222490e4 100644 --- a/app/javascript/dashboard/components/layout/sidebarComponents/Secondary.vue +++ b/app/javascript/dashboard/components/layout/sidebarComponents/Secondary.vue @@ -1,5 +1,6 @@