Skip to content
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

feat(xo-lite): add links to user menu #8114

Open
wants to merge 11 commits into
base: lite/update-user-menu-icon
Choose a base branch
from
23 changes: 17 additions & 6 deletions @xen-orchestra/lite/src/components/account-menu/AccountMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,20 @@
/>
</template>
<MenuItem :icon="faGear" @click="openSettings">{{ $t('settings') }}</MenuItem>
<MenuItem :icon="faMessage" @click="openFeedbackUrl">
{{ $t('send-us-feedback') }}
<MenuItem :icon="faBook" @click="openUrl('https://docs.xcp-ng.org?utm_campaign=xolite&utm_term=xcpdoc')">
{{ $t('documentation-name', { name: 'XCP-ng' }) }}
</MenuItem>
<MenuItem
:icon="faHeadset"
@click="openUrl('https://vates.tech/pricing-and-support?utm_campaign=xolite&utm_term=pricing')"
>
{{ $t('professional-support') }}
</MenuItem>
<MenuItem
:icon="faComments"
@click="openUrl('https://xcp-ng.org/forum/topic/4731/xen-orchestra-lite?utm_campaign=xolite&utm_term=forum')"
>
{{ $t('access-forum') }}
</MenuItem>
<MenuItem :icon="faArrowRightFromBracket" class="menu-item-logout" @click="logout">
{{ $t('log-out') }}
Expand All @@ -24,7 +36,7 @@ import MenuItem from '@core/components/menu/MenuItem.vue'
import MenuList from '@core/components/menu/MenuList.vue'
import UiAccountMenuButton from '@core/components/ui/account-menu-button/UiAccountMenuButton.vue'
import { vTooltip } from '@core/directives/tooltip.directive'
import { faArrowRightFromBracket, faGear, faMessage } from '@fortawesome/free-solid-svg-icons'
import { faArrowRightFromBracket, faBook, faComments, faGear, faHeadset } from '@fortawesome/free-solid-svg-icons'
import { nextTick } from 'vue'
import { useRouter } from 'vue-router'

Expand All @@ -36,10 +48,9 @@ const logout = () => {
nextTick(() => router.push({ name: 'home' }))
}

const openFeedbackUrl = () => {
window.open('https://xcp-ng.org/forum/topic/4731/xen-orchestra-lite', '_blank', 'noopener')
const openUrl = (url: string) => {
window.open(url, '_blank', 'noopener noreferrer')
}

const openSettings = () => router.push({ name: 'settings' })
</script>

Expand Down
8 changes: 7 additions & 1 deletion @xen-orchestra/lite/src/views/settings/SettingsView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
<template #key>{{ $t('support') }}</template>
<template #value>
<a target="_blank" rel="noopener noreferrer" href="https://xcp-ng.com/">
{{ $t('support-name', { name: 'XCP-ng' }) }}
{{ $t('professional-support') }}
</a>
</template>
</UiKeyValueRow>
Expand Down Expand Up @@ -162,9 +162,11 @@ h5 {
.about .sections {
display: flex;
gap: 2em;

div {
flex-grow: 1;
}

@media (--mobile) {
flex-direction: column;
}
Expand All @@ -173,20 +175,24 @@ h5 {
.appearance .options {
display: flex;
gap: 25px;

.option {
display: flex;
flex-direction: column;
gap: 1.6em;

&.selected {
color: var(--color-info-txt-base);

img {
outline: solid 2px var(--color-info-txt-base);
}
}

&:not(.selected) {
cursor: pointer;
}

img {
box-shadow: var(--shadow-100);
border-radius: 8px;
Expand Down
2 changes: 2 additions & 0 deletions @xen-orchestra/web-core/lib/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
"dark-mode.disable": "Disable dark mode",
"dark-mode.auto": "Auto dark mode",

"access-forum": "Access forum",
"dashboard": "Dashboard",
"documentation-name": "{name} documentation",
"hosts": "Hosts",
Expand All @@ -53,6 +54,7 @@
"other": "Other",
"patches": "Patches",
"power-on-for-console": "Power on your VM to access its console",
"professional-support": "Professional support",
"running-vm": "Running VM | Running VMs",
"see-all": "See all",
"stats": "Stats",
Expand Down
2 changes: 2 additions & 0 deletions @xen-orchestra/web-core/lib/locales/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
"dark-mode.disable": "Désactiver le mode sombre",
"dark-mode.auto": "Mode sombre automatique",

"access-forum": "Accès au forum",
"dashboard": "Tableau de bord",
"documentation-name": "Documentation {name}",
"hosts": "Hôtes",
Expand All @@ -53,6 +54,7 @@
"other": "Autre",
"patches": "Patches",
"power-on-for-console": "Allumez votre VM pour accéder à sa console",
"professional-support": "Support professionel",
"running-vm": "VM en cours d'exécution | VMs en cours d'exécution",
"see-all": "Voir tout",
"stats": "Stats",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
rel="noopener noreferrer"
target="_blank"
>
{{ $t('support-name', { name: 'XCP-ng' }) }}
{{ $t('professional-support') }}
</a>
</MenuItem>
<MenuItem :icon="faArrowRightFromBracket" class="logout" @click="logout()">
Expand Down
Loading