diff --git a/src/_services/system.service.js b/src/_services/system.service.js index efff8b0..c36039f 100644 --- a/src/_services/system.service.js +++ b/src/_services/system.service.js @@ -16,7 +16,8 @@ export const systemService = { loadMessages, loadTimezones, detectTimezone, - detectLocale + detectLocale, + getAppLinks }; function loadIsActivated () { @@ -108,3 +109,10 @@ function detectLocale () { .then(util.handleBasicResponse) .then(locales => { return locales; }); } + +function getAppLinks (locale) { + const requestOptions = util.userLoggedIn() ? util.getWithAuth() : { method: 'GET' }; + return fetch(`${config.apiUrl}/auth/appLinks/${locale}`, requestOptions) + .then(util.handleBasicResponse) + .then(links => { return links; }); +} diff --git a/src/_store/system.module.js b/src/_store/system.module.js index 1981e63..8535673 100644 --- a/src/_store/system.module.js +++ b/src/_store/system.module.js @@ -53,7 +53,8 @@ const state = { accountDeletionOptions: [], timeDurationOptions: [], timeDurationOptionsReversed: [], - contactTypes: [] + contactTypes: [], + appLinks: null }; const actions = { @@ -145,6 +146,13 @@ const actions = { locales => commit('detectLocaleSuccess', locales), error => commit('detectLocaleFailure', error) ) + }, + getAppLinks({ commit }, locale) { + commit('getAppLinksRequest'); + systemService.getAppLinks(locale).then( + links => commit('getAppLinksSuccess', links), + error => commit('getAppLinksFailure', error) + ) } }; @@ -385,6 +393,14 @@ const mutations = { // keep current value, or assign default if no current value if (state.detectedLocale === null && state.locales && state.locales.length > 0) state.detectedLocale = state.locales[0]; + }, + + getAppLinksRequest(state) {}, + getAppLinksSuccess(state, links) { + state.appLinks = links; + }, + getAppLinksFailure(state, error) { + state.error = error; } }; diff --git a/src/account/NetworkPage.vue b/src/account/NetworkPage.vue index 960a7df..ea325f7 100644 --- a/src/account/NetworkPage.vue +++ b/src/account/NetworkPage.vue @@ -21,37 +21,76 @@
{{messages.label_field_nodes_name}} | -{{messages.label_field_nodes_region}} | -{{messages.label_field_nodes_ip4}} | -{{messages.label_field_nodes_ip6}} | -{{messages.label_field_nodes_state}} | -
---|---|---|---|---|
{{node.fqdn}} | -{{node.region}} | -{{node.ip4}} | -{{node.ip6}} | -{{messages['msg_node_state_'+node.state]}} | -