Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2020-05-08 11:01:54 +0300
committernpmbuildbot[bot] <npmbuildbot[bot]@users.noreply.github.com>2020-05-11 15:06:29 +0300
commit7daced619b8307838aed2a1cf40608b7485d136d (patch)
tree3ed0fd4b570c16e2478118ebb67508051ae614ee /apps/settings/src/components
parent09c209d4683ce844da5e0319acc6dc83c00f372a (diff)
Fix some linter warnings in settings
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl> Signed-off-by: npmbuildbot[bot] <npmbuildbot[bot]@users.noreply.github.com>
Diffstat (limited to 'apps/settings/src/components')
-rw-r--r--apps/settings/src/components/AdminTwoFactor.vue5
-rw-r--r--apps/settings/src/components/AppList/AppScore.vue4
-rw-r--r--apps/settings/src/components/AuthTokenSection.vue3
-rw-r--r--apps/settings/src/components/AuthTokenSetupDialogue.vue5
-rw-r--r--apps/settings/src/components/WebAuthn/AddDevice.vue4
-rw-r--r--apps/settings/src/components/WebAuthn/Section.vue2
6 files changed, 14 insertions, 9 deletions
diff --git a/apps/settings/src/components/AdminTwoFactor.vue b/apps/settings/src/components/AdminTwoFactor.vue
index 3470ebfc2f8..4d34f8ab937 100644
--- a/apps/settings/src/components/AdminTwoFactor.vue
+++ b/apps/settings/src/components/AdminTwoFactor.vue
@@ -69,6 +69,7 @@
import axios from '@nextcloud/axios'
import { Multiselect } from '@nextcloud/vue'
import _ from 'lodash'
+import { generateUrl, generateOcsUrl } from '@nextcloud/router'
export default {
name: 'AdminTwoFactor',
@@ -124,7 +125,7 @@ export default {
methods: {
searchGroup: _.debounce(function(query) {
this.loadingGroups = true
- axios.get(OC.linkToOCS(`cloud/groups?offset=0&search=${encodeURIComponent(query)}&limit=20`, 2))
+ axios.get(generateOcsUrl(`cloud/groups?offset=0&search=${encodeURIComponent(query)}&limit=20`, 2))
.then(res => res.data.ocs)
.then(ocs => ocs.data.groups)
.then(groups => { this.groups = _.sortedUniq(_.uniq(this.groups.concat(groups))) })
@@ -140,7 +141,7 @@ export default {
enforcedGroups: this.enforcedGroups,
excludedGroups: this.excludedGroups,
}
- axios.put(OC.generateUrl('/settings/api/admin/twofactorauth'), data)
+ axios.put(generateUrl('/settings/api/admin/twofactorauth'), data)
.then(resp => resp.data)
.then(state => {
this.state = state
diff --git a/apps/settings/src/components/AppList/AppScore.vue b/apps/settings/src/components/AppList/AppScore.vue
index f3ff80b7792..0569d687e88 100644
--- a/apps/settings/src/components/AppList/AppScore.vue
+++ b/apps/settings/src/components/AppList/AppScore.vue
@@ -24,6 +24,8 @@
<img :src="scoreImage" class="app-score-image">
</template>
<script>
+import { imagePath } from '@nextcloud/router'
+
export default {
name: 'AppScore',
props: ['score'],
@@ -31,7 +33,7 @@ export default {
scoreImage() {
const score = Math.round(this.score * 10)
const imageName = 'rating/s' + score + '.svg'
- return OC.imagePath('core', imageName)
+ return imagePath('core', imageName)
},
},
}
diff --git a/apps/settings/src/components/AuthTokenSection.vue b/apps/settings/src/components/AuthTokenSection.vue
index 6e574c86cab..9c59d749e96 100644
--- a/apps/settings/src/components/AuthTokenSection.vue
+++ b/apps/settings/src/components/AuthTokenSection.vue
@@ -37,6 +37,7 @@
<script>
import axios from '@nextcloud/axios'
import confirmPassword from '@nextcloud/password-confirmation'
+import { generateUrl } from '@nextcloud/router'
import AuthTokenList from './AuthTokenList'
import AuthTokenSetupDialogue from './AuthTokenSetupDialogue'
@@ -80,7 +81,7 @@ export default {
},
data() {
return {
- baseUrl: OC.generateUrl('/settings/personal/authtokens'),
+ baseUrl: generateUrl('/settings/personal/authtokens'),
}
},
methods: {
diff --git a/apps/settings/src/components/AuthTokenSetupDialogue.vue b/apps/settings/src/components/AuthTokenSetupDialogue.vue
index eaf58734530..410b0073c0b 100644
--- a/apps/settings/src/components/AuthTokenSetupDialogue.vue
+++ b/apps/settings/src/components/AuthTokenSetupDialogue.vue
@@ -29,7 +29,7 @@
<button class="button"
:disabled="loading"
@click="submit">
- {{ t('settings', 'Create new app password') }}
+ {{ t('settings', 'Create new app password') }}
</button>
</div>
<div v-else>
@@ -79,6 +79,7 @@
<script>
import QR from '@chenfengyuan/vue-qrcode'
import confirmPassword from '@nextcloud/password-confirmation'
+import { getRootUrl } from '@nextcloud/router'
export default {
name: 'AuthTokenSetupDialogue',
@@ -141,7 +142,7 @@ export default {
this.loginName = token.loginName
this.appPassword = token.token
- const server = window.location.protocol + '//' + window.location.host + OC.getRootPath()
+ const server = window.location.protocol + '//' + window.location.host + getRootUrl()
this.qrUrl = `nc://login/user:${token.loginName}&password:${token.token}&server:${server}`
this.$nextTick(() => {
diff --git a/apps/settings/src/components/WebAuthn/AddDevice.vue b/apps/settings/src/components/WebAuthn/AddDevice.vue
index ad57b3b55ba..722c28b5147 100644
--- a/apps/settings/src/components/WebAuthn/AddDevice.vue
+++ b/apps/settings/src/components/WebAuthn/AddDevice.vue
@@ -87,8 +87,8 @@ export default {
httpWarning: Boolean,
isHttps: {
type: Boolean,
- default: false
- }
+ default: false,
+ },
},
data() {
return {
diff --git a/apps/settings/src/components/WebAuthn/Section.vue b/apps/settings/src/components/WebAuthn/Section.vue
index a0cef9f753a..672ff3b44cb 100644
--- a/apps/settings/src/components/WebAuthn/Section.vue
+++ b/apps/settings/src/components/WebAuthn/Section.vue
@@ -40,7 +40,7 @@
{{ t('settings', 'Your browser does not support WebAuthn.') }}
</p>
- <AddDevice v-if="hasPublicKeyCredential" :isHttps="isHttps" @added="deviceAdded" />
+ <AddDevice v-if="hasPublicKeyCredential" :is-https="isHttps" @added="deviceAdded" />
</div>
</template>