summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorMarcel Klehr <mklehr@gmx.net>2023-07-25 14:47:27 +0200
committerMarcel Klehr <mklehr@gmx.net>2023-08-09 10:27:46 +0200
commit8507112f90f95e233f39ab015885966c29b0c507 (patch)
tree5ab0463150b97695a44d1ed9d405297ec07a21aa /apps
parent832e0d392d5ba85619f5f0ba87c2606d269264dc (diff)
downloadnextcloud-server-8507112f90f95e233f39ab015885966c29b0c507.tar.gz
nextcloud-server-8507112f90f95e233f39ab015885966c29b0c507.zip
AI admin settings: lint:fix
Signed-off-by: Marcel Klehr <mklehr@gmx.net> (cherry picked from commit 112268a48aebf2f2025ee106f41fd6186b08bb59)
Diffstat (limited to 'apps')
-rw-r--r--apps/settings/src/admin.js2
-rw-r--r--apps/settings/src/components/AdminAI.vue2
-rw-r--r--apps/settings/src/components/AdminDelegation/GroupSelect.vue4
-rw-r--r--apps/settings/src/components/AuthTokenSection.vue2
-rw-r--r--apps/settings/src/components/Markdown.vue2
-rw-r--r--apps/settings/src/components/PersonalInfo/AvatarSection.vue12
-rw-r--r--apps/settings/src/components/PersonalInfo/DetailsSection.vue20
-rw-r--r--apps/settings/src/components/PersonalInfo/DisplayNameSection.vue2
-rw-r--r--apps/settings/src/components/PersonalInfo/EmailSection/EmailSection.vue6
-rw-r--r--apps/settings/src/components/PersonalInfo/LanguageSection/Language.vue2
-rw-r--r--apps/settings/src/components/PersonalInfo/LocaleSection/Locale.vue4
-rw-r--r--apps/settings/src/components/PersonalInfo/shared/AccountPropertySection.vue2
-rw-r--r--apps/settings/src/components/PersonalInfo/shared/HeaderBar.vue2
-rw-r--r--apps/settings/src/main-admin-ai.js39
-rw-r--r--apps/settings/src/main-admin-security.js2
15 files changed, 73 insertions, 30 deletions
diff --git a/apps/settings/src/admin.js b/apps/settings/src/admin.js
index 8bdfa1d0770..6d84405c8b8 100644
--- a/apps/settings/src/admin.js
+++ b/apps/settings/src/admin.js
@@ -227,7 +227,7 @@ window.addEventListener('DOMContentLoaded', () => {
OC.SetupChecks.checkSetup(),
OC.SetupChecks.checkGeneric(),
OC.SetupChecks.checkWOFF2Loading(OC.filePath('core', '', 'fonts/NotoSans-Regular-latin.woff2'), OC.theme.docPlaceholderUrl),
- OC.SetupChecks.checkDataProtected()
+ OC.SetupChecks.checkDataProtected(),
).then((check1, check2, check3, check4, check5, check6, check7, check8, check9, check10, check11) => {
const messages = [].concat(check1, check2, check3, check4, check5, check6, check7, check8, check9, check10, check11)
const $el = $('#postsetupchecks')
diff --git a/apps/settings/src/components/AdminAI.vue b/apps/settings/src/components/AdminAI.vue
index 5461e3f69d8..05175bb7988 100644
--- a/apps/settings/src/components/AdminAI.vue
+++ b/apps/settings/src/components/AdminAI.vue
@@ -88,7 +88,7 @@ export default {
methods: {
async saveChanges() {
this.loading = true
- const data = {settings: this.settings}
+ const data = { settings: this.settings }
try {
await axios.put(generateUrl('/settings/api/admin/ai'), data)
} catch (err) {
diff --git a/apps/settings/src/components/AdminDelegation/GroupSelect.vue b/apps/settings/src/components/AdminDelegation/GroupSelect.vue
index 82b5e51fb45..91593516760 100644
--- a/apps/settings/src/components/AdminDelegation/GroupSelect.vue
+++ b/apps/settings/src/components/AdminDelegation/GroupSelect.vue
@@ -1,6 +1,6 @@
<template>
- <NcSelect :input-id="setting.id"
- v-model="selected"
+ <NcSelect v-model="selected"
+ :input-id="setting.id"
class="group-select"
:placeholder="t('settings', 'None')"
label="displayName"
diff --git a/apps/settings/src/components/AuthTokenSection.vue b/apps/settings/src/components/AuthTokenSection.vue
index 01a85f4ae1b..bb9bd3fb065 100644
--- a/apps/settings/src/components/AuthTokenSection.vue
+++ b/apps/settings/src/components/AuthTokenSection.vue
@@ -49,7 +49,7 @@ const confirm = () => {
t('settings', 'Do you really want to wipe your data from this device?'),
t('settings', 'Confirm wipe'),
resolve,
- true
+ true,
)
})
}
diff --git a/apps/settings/src/components/Markdown.vue b/apps/settings/src/components/Markdown.vue
index fbbbf7456a1..dcbd44b186b 100644
--- a/apps/settings/src/components/Markdown.vue
+++ b/apps/settings/src/components/Markdown.vue
@@ -100,7 +100,7 @@ export default {
'del',
'blockquote',
],
- }
+ },
)
},
},
diff --git a/apps/settings/src/components/PersonalInfo/AvatarSection.vue b/apps/settings/src/components/PersonalInfo/AvatarSection.vue
index a69cf368d9f..d6fa8d52367 100644
--- a/apps/settings/src/components/PersonalInfo/AvatarSection.vue
+++ b/apps/settings/src/components/PersonalInfo/AvatarSection.vue
@@ -22,7 +22,9 @@
<template>
<section id="vue-avatar-section">
- <h3 class="hidden-visually"> {{ t('settings', 'Your profile information') }} </h3>
+ <h3 class="hidden-visually">
+ {{ t('settings', 'Your profile information') }}
+ </h3>
<HeaderBar :input-id="avatarChangeSupported ? inputId : null"
:readable="avatar.readable"
:scope.sync="avatar.scope" />
@@ -30,13 +32,13 @@
<div v-if="!showCropper" class="avatar__container">
<div class="avatar__preview">
<NcAvatar v-if="!loading"
+ :key="version"
:user="userId"
:aria-label="t('settings', 'Your profile picture')"
:disabled-menu="true"
:disabled-tooltip="true"
:show-user-status="false"
- :size="180"
- :key="version" />
+ :size="180" />
<div v-else class="icon-loading" />
</div>
<template v-if="avatarChangeSupported">
@@ -62,8 +64,8 @@
</NcButton>
</div>
<span>{{ t('settings', 'The file must be a PNG or JPG') }}</span>
- <input ref="input"
- :id="inputId"
+ <input :id="inputId"
+ ref="input"
type="file"
:accept="validMimeTypes.join(',')"
@change="onChange">
diff --git a/apps/settings/src/components/PersonalInfo/DetailsSection.vue b/apps/settings/src/components/PersonalInfo/DetailsSection.vue
index 10f9b757220..075ed6f71e2 100644
--- a/apps/settings/src/components/PersonalInfo/DetailsSection.vue
+++ b/apps/settings/src/components/PersonalInfo/DetailsSection.vue
@@ -29,7 +29,9 @@
<Account :size="20" />
<div class="details__groups-info">
<p>{{ t('settings', 'You are a member of the following groups:') }}</p>
- <p class="details__groups-list">{{ groups.join(', ') }}</p>
+ <p class="details__groups-list">
+ {{ groups.join(', ') }}
+ </p>
</div>
</div>
<div class="details__quota">
@@ -69,6 +71,13 @@ export default {
NcProgressBar,
},
+ data() {
+ return {
+ groups,
+ usageRelative,
+ }
+ },
+
computed: {
quotaText() {
if (quota === SPACE_UNLIMITED) {
@@ -79,14 +88,7 @@ export default {
'You are using <strong>{usage}</strong> of <strong>{totalSpace}</strong> (<strong>{usageRelative}%</strong>)',
{ usage, totalSpace, usageRelative },
)
- }
- },
-
- data() {
- return {
- groups,
- usageRelative,
- }
+ },
},
}
</script>
diff --git a/apps/settings/src/components/PersonalInfo/DisplayNameSection.vue b/apps/settings/src/components/PersonalInfo/DisplayNameSection.vue
index b88f52e0df4..00a629c4d54 100644
--- a/apps/settings/src/components/PersonalInfo/DisplayNameSection.vue
+++ b/apps/settings/src/components/PersonalInfo/DisplayNameSection.vue
@@ -66,6 +66,6 @@ export default {
}
emit('settings:display-name:updated', value)
},
- }
+ },
}
</script>
diff --git a/apps/settings/src/components/PersonalInfo/EmailSection/EmailSection.vue b/apps/settings/src/components/PersonalInfo/EmailSection/EmailSection.vue
index 613b90356c3..980af3e62b0 100644
--- a/apps/settings/src/components/PersonalInfo/EmailSection/EmailSection.vue
+++ b/apps/settings/src/components/PersonalInfo/EmailSection/EmailSection.vue
@@ -153,7 +153,7 @@ export default {
this.handleResponse(
'error',
t('settings', 'Unable to update primary email address'),
- e
+ e,
)
}
},
@@ -166,7 +166,7 @@ export default {
this.handleResponse(
'error',
t('settings', 'Unable to delete additional email address'),
- e
+ e,
)
}
},
@@ -178,7 +178,7 @@ export default {
this.handleResponse(
'error',
t('settings', 'Unable to delete additional email address'),
- {}
+ {},
)
}
},
diff --git a/apps/settings/src/components/PersonalInfo/LanguageSection/Language.vue b/apps/settings/src/components/PersonalInfo/LanguageSection/Language.vue
index 959e7153e17..bacc687c58e 100644
--- a/apps/settings/src/components/PersonalInfo/LanguageSection/Language.vue
+++ b/apps/settings/src/components/PersonalInfo/LanguageSection/Language.vue
@@ -88,7 +88,7 @@ export default {
allLanguages() {
return Object.freeze(
[...this.commonLanguages, ...this.otherLanguages]
- .reduce((acc, { code, name }) => ({ ...acc, [code]: name }), {})
+ .reduce((acc, { code, name }) => ({ ...acc, [code]: name }), {}),
)
},
},
diff --git a/apps/settings/src/components/PersonalInfo/LocaleSection/Locale.vue b/apps/settings/src/components/PersonalInfo/LocaleSection/Locale.vue
index 7bb78f74cc2..6f296a6c124 100644
--- a/apps/settings/src/components/PersonalInfo/LocaleSection/Locale.vue
+++ b/apps/settings/src/components/PersonalInfo/LocaleSection/Locale.vue
@@ -50,7 +50,7 @@
<span>{{ example.time }}</span>
</p>
<p>
- {{ t('settings', 'Week starts on {firstDayOfWeek}', { firstDayOfWeek: this.example.firstDayOfWeek }) }}
+ {{ t('settings', 'Week starts on {firstDayOfWeek}', { firstDayOfWeek: example.firstDayOfWeek }) }}
</p>
</div>
</div>
@@ -107,7 +107,7 @@ export default {
allLocales() {
return Object.freeze(
[...this.localesForLanguage, ...this.otherLocales]
- .reduce((acc, { code, name }) => ({ ...acc, [code]: name }), {})
+ .reduce((acc, { code, name }) => ({ ...acc, [code]: name }), {}),
)
},
},
diff --git a/apps/settings/src/components/PersonalInfo/shared/AccountPropertySection.vue b/apps/settings/src/components/PersonalInfo/shared/AccountPropertySection.vue
index 2329cf123f5..59cccc54714 100644
--- a/apps/settings/src/components/PersonalInfo/shared/AccountPropertySection.vue
+++ b/apps/settings/src/components/PersonalInfo/shared/AccountPropertySection.vue
@@ -38,8 +38,8 @@
autocorrect="off"
@input="onPropertyChange" />
<input v-else
- ref="input"
:id="inputId"
+ ref="input"
:placeholder="placeholder"
:type="type"
:value="value"
diff --git a/apps/settings/src/components/PersonalInfo/shared/HeaderBar.vue b/apps/settings/src/components/PersonalInfo/shared/HeaderBar.vue
index 8db2a43f6bc..b149d8405f4 100644
--- a/apps/settings/src/components/PersonalInfo/shared/HeaderBar.vue
+++ b/apps/settings/src/components/PersonalInfo/shared/HeaderBar.vue
@@ -100,7 +100,7 @@ export default {
isHeading: {
type: Boolean,
default: false,
- }
+ },
},
data() {
diff --git a/apps/settings/src/main-admin-ai.js b/apps/settings/src/main-admin-ai.js
new file mode 100644
index 00000000000..485b219ed78
--- /dev/null
+++ b/apps/settings/src/main-admin-ai.js
@@ -0,0 +1,39 @@
+/**
+ * @copyright Copyright (c) 2016 Christoph Wurst <christoph@winzerhof-wurst.at>
+ *
+ * @author Christoph Wurst <christoph@winzerhof-wurst.at>
+ * @author John Molakvoæ <skjnldsv@protonmail.com>
+ * @author Roeland Jago Douma <roeland@famdouma.nl>
+ *
+ * @license AGPL-3.0-or-later
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+import Vue from 'vue'
+
+import ArtificialIntelligence from './components/AdminAI.vue'
+
+// eslint-disable-next-line camelcase
+__webpack_nonce__ = btoa(OC.requestToken)
+
+Vue.prototype.t = t
+
+// Not used here but required for legacy templates
+window.OC = window.OC || {}
+window.OC.Settings = window.OC.Settings || {}
+
+const View = Vue.extend(ArtificialIntelligence)
+new View().$mount('#ai-settings')
diff --git a/apps/settings/src/main-admin-security.js b/apps/settings/src/main-admin-security.js
index f3279f45c93..a5c239683e7 100644
--- a/apps/settings/src/main-admin-security.js
+++ b/apps/settings/src/main-admin-security.js
@@ -39,7 +39,7 @@ window.OC = window.OC || {}
window.OC.Settings = window.OC.Settings || {}
store.replaceState(
- loadState('settings', 'mandatory2FAState')
+ loadState('settings', 'mandatory2FAState'),
)
const View = Vue.extend(AdminTwoFactor)