-
Notifications
You must be signed in to change notification settings - Fork 0
UI Improvements for GC Landing page #35
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
Merged
Merged
Changes from 19 commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
9f0c7e1
feat: build out landing page
conservationtimothy c23ec72
remove redudant styles
conservationtimothy ff516f0
update apache
conservationtimothy 0c17f66
minor improvements
conservationtimothy 77277e0
mobile language picker accordion + actually change language
conservationtimothy ea70026
Update i18n/locales/en.json
conservationtimothy 050c80f
Update pages/index.vue
conservationtimothy 4cb098e
Update pages/index.vue
conservationtimothy 32f93ea
Update i18n/locales/en.json
conservationtimothy 22b5212
Update pages/index.vue
conservationtimothy 899c1e7
Update pages/index.vue
conservationtimothy 71de764
Update pages/index.vue
conservationtimothy 7e5ba85
Update pages/index.vue
conservationtimothy 191d450
Update pages/index.vue
conservationtimothy 846e5db
Update pages/index.vue
conservationtimothy 8033a99
Update i18n/locales/en.json
conservationtimothy e443a58
minor improvements and pnpm prettier
conservationtimothy 429eee1
Revert Prettier formatting from unintended files (keep index.vue chan…
conservationtimothy 62aced7
fix minor type issues
conservationtimothy b644c2c
improveemnts and refinements to UI
conservationtimothy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,126 @@ | ||
| <script lang="ts" setup> | ||
| import { ref, computed, onMounted, onUnmounted } from "vue"; | ||
| import type { SupportedLocale } from "~/types/types"; | ||
| const { locale, locales, setLocale } = useI18n(); | ||
| const { t } = useI18n(); | ||
| interface Props { | ||
| theme?: 'purple' | 'white' | 'dark'; | ||
| } | ||
| const props = withDefaults(defineProps<Props>(), { | ||
| theme: 'white' | ||
| }); | ||
| // Populate available locales from i18n plugin | ||
| const availableLocales = computed(() => locales.value); | ||
| const currentLocaleName = computed(() => { | ||
| const currentLocale = locales.value.find( | ||
| (lang) => lang.code === locale.value, | ||
| ); | ||
| return currentLocale?.name || ""; | ||
| }); | ||
| const dropdownOpen = ref(false); | ||
| // Close dropdown when clicking outside | ||
| const handleClickOutside = (event: MouseEvent) => { | ||
| const target = event.target as HTMLElement; | ||
| if (!target.closest('.language-picker-container')) { | ||
| dropdownOpen.value = false; | ||
| } | ||
| }; | ||
| // Load locale from session storage on mount and set up click outside handler | ||
| onMounted(() => { | ||
| const savedLocale = sessionStorage.getItem("locale"); | ||
| if (savedLocale && locales.value.some((lang) => lang.code === savedLocale)) { | ||
| setLocale(savedLocale as SupportedLocale); | ||
| } | ||
| document.addEventListener('click', handleClickOutside); | ||
| }); | ||
| onUnmounted(() => { | ||
| document.removeEventListener('click', handleClickOutside); | ||
| }); | ||
| const changeLocale = (locale: { code: string }): void => { | ||
| setLocale(locale.code as SupportedLocale); | ||
| sessionStorage.setItem("locale", locale.code); | ||
| dropdownOpen.value = false; | ||
| }; | ||
| const dropdownClasses = computed(() => { | ||
| switch (props.theme) { | ||
| case 'white': | ||
| return "origin-top-right absolute right-0 mt-2 w-56 rounded-md shadow-lg bg-white ring-1 ring-black ring-opacity-5 z-50"; | ||
| case 'dark': | ||
| return "origin-top-right absolute right-0 mt-2 w-56 rounded-md shadow-lg bg-gray-800 ring-1 ring-gray-600 z-50"; | ||
| case 'purple': | ||
| default: | ||
| return "origin-top-right absolute right-0 mt-2 w-56 rounded-md shadow-lg bg-white ring-1 ring-gray-200 z-50"; | ||
| } | ||
| }); | ||
| const itemClasses = computed(() => { | ||
| switch (props.theme) { | ||
| case 'white': | ||
| return "block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 transition-colors"; | ||
| case 'dark': | ||
| return "block px-4 py-2 text-sm text-white hover:bg-gray-700 transition-colors"; | ||
| case 'purple': | ||
| default: | ||
| return "block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 transition-colors"; | ||
| } | ||
| }); | ||
| </script> | ||
|
|
||
| <template> | ||
| <div class="relative inline-block text-left language-picker-container"> | ||
| <div> | ||
| <button | ||
| type="button" | ||
| class="relative w-10 h-10 rounded-full bg-white flex items-center justify-center hover:bg-gray-50 transition-colors focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-purple-500" | ||
| @click.stop="dropdownOpen = !dropdownOpen" | ||
| :title="t('header.languagePicker')" | ||
| > | ||
| <svg | ||
| class="w-5 h-5 text-gray-600" | ||
| xmlns="http://www.w3.org/2000/svg" | ||
| fill="none" | ||
| viewBox="0 0 24 24" | ||
| stroke="currentColor" | ||
| > | ||
| <path | ||
| stroke-linecap="round" | ||
| stroke-linejoin="round" | ||
| stroke-width="2" | ||
| d="M3.055 11H5a2 2 0 012 2v1a2 2 0 002 2 2 2 0 012 2v2.945M8 3.935V5.5A2.5 2.5 0 0010.5 8h.5a2 2 0 012 2 2 2 0 104 0 2 2 0 012-2h1.064M15 20.488V18a2 2 0 012-2h3.064M21 12a9 9 0 11-18 0 9 9 0 0118 0z" | ||
| /> | ||
| </svg> | ||
| </button> | ||
| </div> | ||
| <div | ||
| v-if="dropdownOpen" | ||
| :class="dropdownClasses" | ||
| @click.stop | ||
| > | ||
| <div class="py-1"> | ||
| <a | ||
| v-for="lang in availableLocales" | ||
| :key="lang.code" | ||
| href="#" | ||
| :class="itemClasses" | ||
| @click=" | ||
| ($event.preventDefault(), | ||
| $event.stopPropagation(), | ||
| changeLocale(lang)) | ||
| " | ||
| > | ||
| {{ lang.name }} | ||
| </a> | ||
| </div> | ||
| </div> | ||
| </div> | ||
| </template> | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,8 +2,8 @@ | |
| "app": { | ||
| "title": "Guardian Connector Landing Page", | ||
| "community": "Community", | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Revert. Let's use |
||
| "welcome": "Welcome to the Guardian Connector platform for {communityName}", | ||
| "welcomeSubtitle": "Access your community tools and resources in one place" | ||
| "welcome": "Your community's data, your control.", | ||
| "welcomeSubtitle": "Access your dashboards, manage workflows, and explore data securely within your Guardian Connector." | ||
| }, | ||
| "auth": { | ||
| "signIn": "Sign In", | ||
|
|
@@ -25,8 +25,10 @@ | |
| "filebrowser": "Filebrowser", | ||
| "filebrowserDescription": "Secure file management and sharing", | ||
| "noServicesAvailable": "No Services Available", | ||
| "noServicesDescription": "No community services are currently deployed or accessible.", | ||
| "communityService": "Community service" | ||
| "noServicesDescription": "No services are currently deployed or accessible.", | ||
| "needHelp": "Need help? Visit the Guardian Connector", | ||
| "documentationWebsite": "documentation website", | ||
|
Comment on lines
+29
to
+30
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| "service": "Service" | ||
| }, | ||
| "userManagement": { | ||
| "title": "User Management", | ||
|
|
@@ -66,5 +68,9 @@ | |
| "copyright": "© 2025 Guardian Connector.", | ||
| "community": "Community: {communityName}", | ||
| "services": "Services: {count}" | ||
| }, | ||
| "header": { | ||
| "adminAccess": "Admin Access", | ||
| "languagePicker": "Language Picker" | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.

There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's use the same icon on
UserManagementThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also,
Auth0Loginhas a warning complaining about the absence ofLanguagePickercomponent. Could implement this there too to resolve that warning.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In fact, I now see there is also a
LanguagePicker. Can we just use one?I'm not sure and haven't looked into it, but I suspect this warning for the
Auth0Loginpage could also be related:There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah this is kinda nicer I think since we've redesigned maybe we use this one thru out
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see you didn't do this, which is fine. Shall we create an issue to do this work?
Actually, maybe that issue can just request implementing the same folder+tab header design for the User Management page. In order to have a consistent design across all pages of the this application.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, and then separately, an issue to track the warnings / errors in
Auth0LoginThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#38