mirror of
https://github.com/YunoHost/yunohost-admin.git
synced 2024-09-03 20:06:15 +02:00
header sso link based on main domain or fallback to hostname
This commit is contained in:
parent
237b36e2e2
commit
e5a3f5df2b
2 changed files with 8 additions and 3 deletions
|
@ -18,7 +18,7 @@
|
||||||
<b-navbar-nav class="ml-auto">
|
<b-navbar-nav class="ml-auto">
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<b-button
|
<b-button
|
||||||
href="/yunohost/sso"
|
:href="ssoLink"
|
||||||
variant="primary" size="sm" block
|
variant="primary" size="sm" block
|
||||||
>
|
>
|
||||||
{{ $t('user_interface_link') }} <icon iname="user" />
|
{{ $t('user_interface_link') }} <icon iname="user" />
|
||||||
|
@ -100,7 +100,8 @@ export default {
|
||||||
'transitions',
|
'transitions',
|
||||||
'transitionName',
|
'transitionName',
|
||||||
'waiting',
|
'waiting',
|
||||||
'theme'
|
'theme',
|
||||||
|
'ssoLink'
|
||||||
])
|
])
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -142,6 +142,7 @@ export default {
|
||||||
// and login prompt will be shown automaticly
|
// and login prompt will be shown automaticly
|
||||||
await dispatch('GET_YUNOHOST_INFOS')
|
await dispatch('GET_YUNOHOST_INFOS')
|
||||||
commit('SET_CONNECTED', true)
|
commit('SET_CONNECTED', true)
|
||||||
|
await dispatch('GET', { uri: 'domains', storeKey: 'domains' })
|
||||||
},
|
},
|
||||||
|
|
||||||
'RESET_CONNECTED' ({ commit }) {
|
'RESET_CONNECTED' ({ commit }) {
|
||||||
|
@ -383,6 +384,9 @@ export default {
|
||||||
},
|
},
|
||||||
routerKey: state => state.routerKey,
|
routerKey: state => state.routerKey,
|
||||||
breadcrumb: state => state.breadcrumb,
|
breadcrumb: state => state.breadcrumb,
|
||||||
transitionName: state => state.transitionName
|
transitionName: state => state.transitionName,
|
||||||
|
ssoLink: (state, getters) => {
|
||||||
|
return `//${getters.mainDomain ?? state.host}/yunohost/sso`
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue