Skip to content
Merged
Show file tree
Hide file tree
Changes from 19 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions assets/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,31 @@
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
transition-duration: 150ms;
}

/* Tab trigger styles */
.tab-trigger {
border: 0px;
outline: none;
padding: 0px 10px;
height: 40px;
display: flex;
align-items: center;
position: relative;
background-color: #fff;
}

.tab-trigger svg {
position: absolute;
height: 40px;
color: #fff;
}

.tab-trigger .left-curve {
left: 1px;
transform: translateX(-100%) rotateY(180deg);
}

.tab-trigger .right-curve {
right: 1px;
transform: translateX(100%);
}
126 changes: 126 additions & 0 deletions components/shared/GlobeLanguagePicker.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
<script lang="ts" setup>
Copy link
Member

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 UserManagement

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, Auth0Login has a warning complaining about the absence of LanguagePicker component. Could implement this there too to resolve that warning.

Copy link
Member

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 Auth0Login page could also be related:

 WARN  [Vue warn]: Component <Anonymous> is missing template or render function. 
  at <Anonymous theme="white" > 
  at <Auth0Login error-message="" > 
  at <Login onVnodeUnmounted=fn<onVnodeUnmounted> ref=Ref< undefined > > 

Copy link
Contributor Author

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

Copy link
Member

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.

Copy link
Member

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 Auth0Login

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#38

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>
14 changes: 10 additions & 4 deletions i18n/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"app": {
"title": "Guardian Connector Landing Page",
"community": "Community",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Revert. Let's use community instead of partner where needed.

"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",
Expand All @@ -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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see this implemented on index.vue. Can we add?

This is what I had in mind btw;

image

"service": "Service"
},
"userManagement": {
"title": "User Management",
Expand Down Expand Up @@ -66,5 +68,9 @@
"copyright": "© 2025 Guardian Connector.",
"community": "Community: {communityName}",
"services": "Services: {count}"
},
"header": {
"adminAccess": "Admin Access",
"languagePicker": "Language Picker"
}
}
10 changes: 8 additions & 2 deletions i18n/locales/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"app": {
"title": "Página de Inicio de Guardian Connector",
"community": "Comunidad",
"welcome": "Bienvenido a la plataforma Guardian Connector para {communityName}",
"welcomeSubtitle": "Accede a las herramientas y recursos de tu comunidad en un solo lugar"
"welcome": "Empodera a {communityName} con soberanía de datos y autodeterminación.",
"welcomeSubtitle": "Aquí puedes encontrar datos y gestionar los activos de {communityName}."
},
"auth": {
"signIn": "Iniciar Sesión",
Expand All @@ -26,6 +26,8 @@
"filebrowserDescription": "Gestión y compartición segura de archivos",
"noServicesAvailable": "No Hay Servicios Disponibles",
"noServicesDescription": "No hay servicios de la comunidad actualmente desplegados o accesibles.",
"needHelp": "¿Necesitas ayuda? Visita el",
"documentationWebsite": "sitio web de documentación de Guardian Connector",
"communityService": "Servicio de la comunidad"
},
"userManagement": {
Expand Down Expand Up @@ -66,5 +68,9 @@
"copyright": "© 2025 Guardian Connector.",
"community": "Comunidad: {communityName}",
"services": "Servicios: {count}"
},
"header": {
"adminAccess": "Acceso de Administrador",
"languagePicker": "Selector de Idioma"
}
}
12 changes: 9 additions & 3 deletions i18n/locales/nl.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"app": {
"title": "Guardian Connector Startpagina",
"community": "Gemeenschap",
"welcome": "Welkom bij het Guardian Connector‑platform voor {communityName}",
"welcomeSubtitle": "Toegang tot uw gemeenschapstools en -bronnen op één plek"
"welcome": "Geef {communityName} macht met data soevereiniteit en zelfbeschikking.",
"welcomeSubtitle": "Hier kunt u gegevens vinden en de activa van {communityName} beheren."
},
"auth": {
"signIn": "Inloggen",
Expand All @@ -13,7 +13,7 @@
"welcome": "Welkom, {user}",
"userManagement": "Gebruikersbeheer",
"secureAccessRequired": "Veilige Toegang Vereist",
"pleaseSignInToAccess": "Gelieve in te loggen om toegang te krijgen tot uw gemeenschapstools"
"pleaseSignInToAccess": "Gelieve in te loggen om toegang te krijgen tot uw gemeenschap tools"
},
"services": {
"superset": "Superset",
Expand All @@ -26,6 +26,8 @@
"filebrowserDescription": "Veilig bestandsbeheer en -deling",
"noServicesAvailable": "Geen Services Beschikbaar",
"noServicesDescription": "Geen gemeenschapsservices zijn momenteel geïmplementeerd of toegankelijk.",
"needHelp": "Hulp nodig? Bezoek de",
"documentationWebsite": "Guardian Connector documentatie website",
"communityService": "Gemeenschapsservice"
},
"userManagement": {
Expand Down Expand Up @@ -66,5 +68,9 @@
"copyright": "© 2025 Guardian Connector.",
"community": "Gemeenschap: {communityName}",
"services": "Services: {count}"
},
"header": {
"adminAccess": "Beheerders Toegang",
"languagePicker": "Taal Selector"
}
}
10 changes: 8 additions & 2 deletions i18n/locales/pt.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"app": {
"title": "Página Inicial do Guardian Connector",
"community": "Comunidade",
"welcome": "Bem-vindo à plataforma Guardian Connector para {communityName}",
"welcomeSubtitle": "Acesse suas ferramentas e recursos da comunidade em um só lugar"
"welcome": "Capacite {communityName} com soberania de dados e autodeterminação.",
"welcomeSubtitle": "Aqui você pode encontrar dados e gerenciar os ativos de {communityName}."
},
"auth": {
"signIn": "Entrar",
Expand All @@ -26,6 +26,8 @@
"filebrowserDescription": "Gerenciamento e compartilhamento seguro de arquivos",
"noServicesAvailable": "Nenhum Serviço Disponível",
"noServicesDescription": "Nenhum serviço da comunidade está atualmente implantado ou acessível.",
"needHelp": "Precisa de ajuda? Visite o",
"documentationWebsite": "site de documentação do Guardian Connector",
"communityService": "Serviço da comunidade"
},
"userManagement": {
Expand Down Expand Up @@ -66,5 +68,9 @@
"copyright": "© 2025 Guardian Connector.",
"community": "Comunidade: {communityName}",
"services": "Serviços: {count}"
},
"header": {
"adminAccess": "Acesso de Administrador",
"languagePicker": "Seletor de Idioma"
}
}
Loading