mirror of
https://github.com/YunoHost/yunohost-admin.git
synced 2024-09-03 20:06:15 +02:00
Compare commits
11 commits
dev
...
debian/12.
Author | SHA1 | Date | |
---|---|---|---|
|
f578b19130 | ||
|
7859b221fc | ||
|
2cce638d90 | ||
|
dd4bedeeb4 | ||
|
cc7952a454 | ||
|
cbea05fa9b | ||
|
1d892350cd | ||
|
8db7691fe2 | ||
|
9dd29dff18 | ||
|
60934cf772 | ||
|
06bb22f45d |
9 changed files with 53 additions and 35 deletions
|
@ -217,12 +217,12 @@ export default {
|
||||||
const api = this
|
const api = this
|
||||||
|
|
||||||
function reconnect(n) {
|
function reconnect(n) {
|
||||||
api
|
store
|
||||||
.get('logout', {}, { key: 'reconnecting' })
|
.dispatch('GET_YUNOHOST_INFOS')
|
||||||
.then(resolve)
|
.then(resolve)
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
if (err.name === 'APIUnauthorizedError') {
|
if (err.name === 'APIUnauthorizedError') {
|
||||||
resolve()
|
reject(err)
|
||||||
} else if (n < 1) {
|
} else if (n < 1) {
|
||||||
reject(err)
|
reject(err)
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
<slot name="tab-top" />
|
<slot name="tab-top" />
|
||||||
|
|
||||||
<template v-if="panel.help" #disclaimer>
|
<template v-if="panel.help" #disclaimer>
|
||||||
<div class="alert alert-info" v-html="help" />
|
<div class="alert alert-info" v-html="panel.help" />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<slot name="tab-before" />
|
<slot name="tab-before" />
|
||||||
|
|
|
@ -120,18 +120,13 @@ function addEvaluationGetter(prop, obj, expr, ctx, nested) {
|
||||||
* @return {Object} an formated argument containing formItem props, validation and base value.
|
* @return {Object} an formated argument containing formItem props, validation and base value.
|
||||||
*/
|
*/
|
||||||
export function formatYunoHostArgument(arg) {
|
export function formatYunoHostArgument(arg) {
|
||||||
let value =
|
let value = arg.value !== undefined ? arg.value : null
|
||||||
arg.value !== undefined
|
|
||||||
? arg.value
|
|
||||||
: arg.current_value !== undefined
|
|
||||||
? arg.current_value
|
|
||||||
: null
|
|
||||||
const validation = {}
|
const validation = {}
|
||||||
const error = { message: null }
|
const error = { message: null }
|
||||||
arg.ask = formatI18nField(arg.ask)
|
arg.ask = formatI18nField(arg.ask)
|
||||||
const field = {
|
const field = {
|
||||||
is: arg.readonly ? 'ReadOnlyField' : 'FormField',
|
is: arg.readonly ? 'ReadOnlyField' : 'FormField',
|
||||||
visible: [undefined, true, '"true"'].includes(arg.visible),
|
visible: arg.visible,
|
||||||
props: {
|
props: {
|
||||||
label: arg.ask,
|
label: arg.ask,
|
||||||
component: undefined,
|
component: undefined,
|
||||||
|
@ -168,11 +163,11 @@ export function formatYunoHostArgument(arg) {
|
||||||
name: 'InputItem',
|
name: 'InputItem',
|
||||||
props: defaultProps.concat(['type', 'min', 'max', 'step']),
|
props: defaultProps.concat(['type', 'min', 'max', 'step']),
|
||||||
callback: function () {
|
callback: function () {
|
||||||
if (!isNaN(parseInt(arg.min))) {
|
if (arg.min !== undefined) {
|
||||||
validation.minValue = validators.minValue(parseInt(arg.min))
|
validation.minValue = validators.minValue(arg.min)
|
||||||
}
|
}
|
||||||
if (!isNaN(parseInt(arg.max))) {
|
if (arg.max !== undefined) {
|
||||||
validation.maxValue = validators.maxValue(parseInt(arg.max))
|
validation.maxValue = validators.maxValue(arg.max)
|
||||||
}
|
}
|
||||||
validation.numValue = validators.integer
|
validation.numValue = validators.integer
|
||||||
},
|
},
|
||||||
|
@ -278,10 +273,9 @@ export function formatYunoHostArgument(arg) {
|
||||||
|
|
||||||
// Default type management if no one is filled
|
// Default type management if no one is filled
|
||||||
if (arg.type !== 'tags' && arg.choices && arg.choices.length) {
|
if (arg.type !== 'tags' && arg.choices && arg.choices.length) {
|
||||||
arg.type = 'select'
|
arg.type = 'select'
|
||||||
}
|
} else if (arg.type === undefined) {
|
||||||
if (arg.type === undefined) {
|
arg.type = 'string'
|
||||||
arg.type = 'string'
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Search the component bind to the type
|
// Search the component bind to the type
|
||||||
|
@ -328,9 +322,6 @@ export function formatYunoHostArgument(arg) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Default value if still `null`
|
// Default value if still `null`
|
||||||
if (value === null && arg.current_value) {
|
|
||||||
value = arg.current_value
|
|
||||||
}
|
|
||||||
if (value === null && arg.default) {
|
if (value === null && arg.default) {
|
||||||
value = arg.default
|
value = arg.default
|
||||||
}
|
}
|
||||||
|
@ -433,12 +424,12 @@ export function formatYunoHostConfigPanels(data) {
|
||||||
const section = {
|
const section = {
|
||||||
id: _section.id,
|
id: _section.id,
|
||||||
isActionSection: _section.is_action_section,
|
isActionSection: _section.is_action_section,
|
||||||
visible: [undefined, true, '"true"'].includes(_section.visible),
|
visible: _section.visible,
|
||||||
}
|
}
|
||||||
if (_section.help) section.help = formatI18nField(_section.help)
|
if (_section.help) section.help = formatI18nField(_section.help)
|
||||||
if (_section.name) section.name = formatI18nField(_section.name)
|
if (_section.name) section.name = formatI18nField(_section.name)
|
||||||
if (_section.visible && ![false, '"false"'].includes(_section.visible)) {
|
if (typeof _section.visible === 'string') {
|
||||||
addEvaluationGetter('visible', section, _section.visible, result.forms)
|
addEvaluationGetter('visible', section, section.visible, result.forms)
|
||||||
}
|
}
|
||||||
|
|
||||||
const { form, fields, validations, errors } = formatYunoHostArguments(
|
const { form, fields, validations, errors } = formatYunoHostArguments(
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
"unknown": "Connection with the server has been closed for unknown reasons.",
|
"unknown": "Connection with the server has been closed for unknown reasons.",
|
||||||
"upgrade_system": "Connection with the server has been closed due to YunoHost upgrade. Waiting for the server to be reachable again…"
|
"upgrade_system": "Connection with the server has been closed due to YunoHost upgrade. Waiting for the server to be reachable again…"
|
||||||
},
|
},
|
||||||
"success": "The server is now reachable! You can try to login",
|
"session_expired": "The server is now reachable! But it looks like your session expired, please login.",
|
||||||
"title": "Trying to communicate with the server…"
|
"title": "Trying to communicate with the server…"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -179,10 +179,9 @@ export default {
|
||||||
return api.get('logout')
|
return api.get('logout')
|
||||||
},
|
},
|
||||||
|
|
||||||
TRY_TO_RECONNECT({ commit, dispatch }, args = {}) {
|
TRY_TO_RECONNECT({ commit }, args = {}) {
|
||||||
// FIXME This is very ugly arguments forwarding, will use proper component way of doing this when switching to Vue 3 (teleport)
|
// FIXME This is very ugly arguments forwarding, will use proper component way of doing this when switching to Vue 3 (teleport)
|
||||||
commit('SET_RECONNECTING', args)
|
commit('SET_RECONNECTING', args)
|
||||||
dispatch('RESET_CONNECTED')
|
|
||||||
},
|
},
|
||||||
|
|
||||||
GET_YUNOHOST_INFOS({ commit }) {
|
GET_YUNOHOST_INFOS({ commit }) {
|
||||||
|
|
|
@ -28,8 +28,8 @@
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template v-if="status === 'success'">
|
<template v-if="status === 'expired'">
|
||||||
<BAlert variant="success" v-t="'api.reconnecting.success'" />
|
<BAlert variant="success" v-t="'api.reconnecting.session_expired'" />
|
||||||
|
|
||||||
<LoginView force-reload />
|
<LoginView force-reload />
|
||||||
</template>
|
</template>
|
||||||
|
@ -66,10 +66,14 @@ export default {
|
||||||
api
|
api
|
||||||
.tryToReconnect({ ...this.reconnecting, initialDelay })
|
.tryToReconnect({ ...this.reconnecting, initialDelay })
|
||||||
.then(() => {
|
.then(() => {
|
||||||
this.status = 'success'
|
this.$store.commit('SET_RECONNECTING', null)
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch((err) => {
|
||||||
this.status = 'failed'
|
if (err.name === 'APIUnauthorizedError') {
|
||||||
|
this.status = 'expired'
|
||||||
|
} else {
|
||||||
|
this.status = 'failed'
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
24
debian/changelog
vendored
24
debian/changelog
vendored
|
@ -1,3 +1,27 @@
|
||||||
|
yunohost-admin (12.0.2) testing; urgency=low
|
||||||
|
|
||||||
|
- config panels: fix panel help message not being displayed (7859b221)
|
||||||
|
|
||||||
|
Thanks to all contributors <3 ! (axolotle)
|
||||||
|
|
||||||
|
-- Alexandre Aubin <alex.aubin@mailoo.org> Sat, 31 Aug 2024 20:09:29 +0200
|
||||||
|
|
||||||
|
yunohost-admin (12.0.1) testing; urgency=low
|
||||||
|
|
||||||
|
- Reflect change in the core about pydantic/config panels (06bb22f4, 60934cf7)
|
||||||
|
- No need anymore to the server after yunohost upgrades because the session should still be valid (1d892350)
|
||||||
|
- i18n: Translations updated for Basque, Chinese (Simplified), Danish, Dutch, French, Galician, German, Indonesian, Italian, Polish, Russian, Slovak, Spanish
|
||||||
|
|
||||||
|
Thanks to all contributors <3 ! (Andreas Gammelgaard Damsbo, axolotle, Boudewijn, bruno van den bosch, cjdw, Émile, Ivan Davydov, José M, Jose Riha, Kuba Bazan, Øjvind Fritjof Arnfred, OniriCorpe, Poesty Li, rosbeef andino, Tagadda, Titus PiJean, Tommi, xabirequejo)
|
||||||
|
|
||||||
|
-- Alexandre Aubin <alex.aubin@mailoo.org> Fri, 26 Jul 2024 22:30:32 +0200
|
||||||
|
|
||||||
|
yunohost (12.0.0) unstable; urgency=low
|
||||||
|
|
||||||
|
- Tmp changelog to prepare Bookworm
|
||||||
|
|
||||||
|
-- Tagada <tagada@cant.at> Fri, 12 May 2023 16:20:28 +0000
|
||||||
|
|
||||||
yunohost-admin (11.2.7) stable; urgency=low
|
yunohost-admin (11.2.7) stable; urgency=low
|
||||||
|
|
||||||
- Disable sending referer when clicking on links to external websites ([#573](http://github.com/YunoHost/yunohost-admin/pull/573))
|
- Disable sending referer when clicking on links to external websites ([#573](http://github.com/YunoHost/yunohost-admin/pull/573))
|
||||||
|
|
2
debian/control
vendored
2
debian/control
vendored
|
@ -10,7 +10,7 @@ Homepage: https://yunohost.org/
|
||||||
Package: yunohost-admin
|
Package: yunohost-admin
|
||||||
Architecture: all
|
Architecture: all
|
||||||
Depends: ${misc:Depends}
|
Depends: ${misc:Depends}
|
||||||
, yunohost (>= 11.1)
|
, yunohost (>= 12.0)
|
||||||
Description: web administration interface for yunohost
|
Description: web administration interface for yunohost
|
||||||
YunoHost aims to make self-hosting accessible to everyone. It configures
|
YunoHost aims to make self-hosting accessible to everyone. It configures
|
||||||
an email, Web and IM server alongside a LDAP base. It also provides
|
an email, Web and IM server alongside a LDAP base. It also provides
|
||||||
|
|
2
debian/rules
vendored
2
debian/rules
vendored
|
@ -17,7 +17,7 @@ TMPDIR = $$(pwd)/debian/yunohost-admin
|
||||||
override_dh_auto_build:
|
override_dh_auto_build:
|
||||||
/usr/bin/curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | gpg --dearmor | tee /usr/share/keyrings/nodesource.gpg >/dev/null
|
/usr/bin/curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | gpg --dearmor | tee /usr/share/keyrings/nodesource.gpg >/dev/null
|
||||||
/usr/bin/curl -s https://dl.yarnpkg.com/debian/pubkey.gpg | gpg --dearmor | tee /etc/apt/trusted.gpg.d/yarn.gpg >/dev/null
|
/usr/bin/curl -s https://dl.yarnpkg.com/debian/pubkey.gpg | gpg --dearmor | tee /etc/apt/trusted.gpg.d/yarn.gpg >/dev/null
|
||||||
echo 'deb [signed-by=/usr/share/keyrings/nodesource.gpg] https://deb.nodesource.com/node_14.x bullseye main' > /etc/apt/sources.list.d/nodesource.list
|
echo 'deb [signed-by=/usr/share/keyrings/nodesource.gpg] https://deb.nodesource.com/node_14.x bookworm main' > /etc/apt/sources.list.d/nodesource.list
|
||||||
echo "deb [signed-by=/etc/apt/trusted.gpg.d/yarn.gpg] https://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list
|
echo "deb [signed-by=/etc/apt/trusted.gpg.d/yarn.gpg] https://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list
|
||||||
/usr/bin/apt update
|
/usr/bin/apt update
|
||||||
/usr/bin/apt install nodejs yarn -y
|
/usr/bin/apt install nodejs yarn -y
|
||||||
|
|
Loading…
Add table
Reference in a new issue