This commit is contained in:
axolotle 2023-03-24 21:35:31 +01:00
parent dceae397b4
commit 91074f4e31
9 changed files with 49 additions and 47 deletions

View file

@ -25,7 +25,10 @@ module.exports = {
camelcase: 'warn', camelcase: 'warn',
indent: 'off', indent: 'off',
'no-irregular-whitespace': 'off', 'no-irregular-whitespace': 'off',
'no-unused-vars': 'warn', 'no-unused-vars': [
'warn',
{ varsIgnorePattern: '^_', destructuredArrayIgnorePattern: '^_' }
],
quotes: 'warn', quotes: 'warn',
'no-multiple-empty-lines': [ 'no-multiple-empty-lines': [
'error', 'error',

View file

@ -1,10 +1,13 @@
<template> <template>
<b-input-group v-bind="$attrs"> <b-input-group v-bind="$attrs">
<input-item <input-item
:id="id" :placeholder="placeholder" :id="id"
:state="state" :aria-describedby="id + 'local-part-desc'" :value="value.localPart"
v-model="value.localPart" :placeholder="placeholder"
v-on="listeners" :state="state"
:aria-describedby="id + 'local-part-desc'"
@input="onInput('localPart', $event)"
@blur="$parent.$emit('touch')"
/> />
<b-input-group-append> <b-input-group-append>
@ -13,9 +16,11 @@
<b-input-group-append> <b-input-group-append>
<select-item <select-item
v-model="value.domain" :value="value.domain"
:choices="choices" :choices="choices"
:aria-describedby="id + 'domain-desc'" :aria-describedby="id + 'domain-desc'"
@input="onInput('domain', $event)"
@blur="$parent.$emit('touch')"
/> />
</b-input-group-append> </b-input-group-append>
@ -40,24 +45,12 @@ export default {
type: { type: String, default: 'email' } type: { type: String, default: 'email' }
}, },
computed: { methods: {
listeners: function () { onInput (key, value) {
return Object.assign({}, this.$emit('input', {
// Forwards all parent events listeners ...this.value,
this.$listeners, [key]: value
// Overwrite input behavior so this component can work with v-model })
{
input: (event) => {
this.$parent.$emit('touch')
this.$emit('input', this.value)
},
blur: event => {
this.$parent.$emit('touch')
this.$emit('blur', this.value)
}
}
)
} }
} }
} }

View file

@ -16,7 +16,7 @@ export default {
theme: localStorage.getItem('theme') === 'true', theme: localStorage.getItem('theme') === 'true',
experimental: localStorage.getItem('experimental') === 'true', experimental: localStorage.getItem('experimental') === 'true',
spinner: 'pacman', spinner: 'pacman',
supportedLocales: supportedLocales supportedLocales
}, },
mutations: { mutations: {

View file

@ -6,7 +6,7 @@
> >
<slot name="default" /> <slot name="default" />
<template v-slot:overlay> <template #overlay>
<b-card no-body class="card-overlay"> <b-card no-body class="card-overlay">
<b-card-header header-bg-variant="white"> <b-card-header header-bg-variant="white">
<query-header :request="error || currentRequest" status-size="lg" /> <query-header :request="error || currentRequest" status-size="lg" />

View file

@ -396,13 +396,15 @@ export default {
? app.from_catalog.potential_alternative_to.join(this.$i18n.t('words.separator')) ? app.from_catalog.potential_alternative_to.join(this.$i18n.t('words.separator'))
: null, : null,
description: DESCRIPTION ? formatI18nField(DESCRIPTION) : app.description, description: DESCRIPTION ? formatI18nField(DESCRIPTION) : app.description,
integration: app.manifest.packaging_format >= 2 ? { integration: app.manifest.packaging_format >= 2
? {
archs: Array.isArray(archs) ? archs.join(this.$i18n.t('words.separator')) : archs, archs: Array.isArray(archs) ? archs.join(this.$i18n.t('words.separator')) : archs,
ldap: ldap === 'not_relevant' ? null : ldap, ldap: ldap === 'not_relevant' ? null : ldap,
sso: sso === 'not_relevant' ? null : sso, sso: sso === 'not_relevant' ? null : sso,
multi_instance, multi_instance,
resources: { ram: ram.runtime, disk } resources: { ram: ram.runtime, disk }
} : null, }
: null,
links: [ links: [
['license', `https://spdx.org/licenses/${app.manifest.upstream.license}`], ['license', `https://spdx.org/licenses/${app.manifest.upstream.license}`],
...['website', 'admindoc', 'userdoc', 'code'].map((key) => ([key, app.manifest.upstream[key]])), ...['website', 'admindoc', 'userdoc', 'code'].map((key) => ([key, app.manifest.upstream[key]])),
@ -411,9 +413,11 @@ export default {
doc: { doc: {
notifications: { notifications: {
postInstall: notifs.POST_INSTALL && notifs.POST_INSTALL.main ? [['main', formatI18nField(notifs.POST_INSTALL.main)]] : [], postInstall: notifs.POST_INSTALL && notifs.POST_INSTALL.main ? [['main', formatI18nField(notifs.POST_INSTALL.main)]] : [],
postUpgrade: notifs.POST_UPGRADE ? Object.entries(notifs.POST_UPGRADE).map(([key, content]) => { postUpgrade: notifs.POST_UPGRADE
? Object.entries(notifs.POST_UPGRADE).map(([key, content]) => {
return [key, formatI18nField(content)] return [key, formatI18nField(content)]
}) : [] })
: []
}, },
admin: [ admin: [
['admin', formatI18nField(ADMIN)], ['admin', formatI18nField(ADMIN)],

View file

@ -254,13 +254,15 @@ export default {
demo: _app.upstream.demo, demo: _app.upstream.demo,
version, version,
license: _app.upstream.license, license: _app.upstream.license,
integration: _app.packaging_format >= 2 ? { integration: _app.packaging_format >= 2
? {
archs: Array.isArray(archs) ? archs.join(this.$i18n.t('words.separator')) : archs, archs: Array.isArray(archs) ? archs.join(this.$i18n.t('words.separator')) : archs,
ldap: ldap === 'not_relevant' ? null : ldap, ldap: ldap === 'not_relevant' ? null : ldap,
sso: sso === 'not_relevant' ? null : sso, sso: sso === 'not_relevant' ? null : sso,
multi_instance, multi_instance,
resources: { ram: ram.runtime, disk } resources: { ram: ram.runtime, disk }
} : null, }
: null,
links: [ links: [
['license', `https://spdx.org/licenses/${_app.upstream.license}`], ['license', `https://spdx.org/licenses/${_app.upstream.license}`],
...['website', 'admindoc', 'userdoc', 'code'].map((key) => ([key, _app.upstream[key]])), ...['website', 'admindoc', 'userdoc', 'code'].map((key) => ([key, _app.upstream[key]])),

View file

@ -16,7 +16,7 @@
<b-list-group> <b-list-group>
<b-list-group-item <b-list-group-item
v-for="{ id, name, description, label } in filteredApps" :key="id" v-for="{ id, description, label } in filteredApps" :key="id"
:to="{ name: 'app-info', params: { id }}" :to="{ name: 'app-info', params: { id }}"
class="d-flex justify-content-between align-items-center pr-0" class="d-flex justify-content-between align-items-center pr-0"
> >

View file

@ -84,7 +84,7 @@ export default {
if (!confirmed) return if (!confirmed) return
} }
var requestArgs = {} const requestArgs = {}
Object.assign(requestArgs, this.form) Object.assign(requestArgs, this.form)
if (!requestArgs.delete) delete requestArgs.delete if (!requestArgs.delete) delete requestArgs.delete
if (!requestArgs.update) delete requestArgs.update if (!requestArgs.update) delete requestArgs.update