mirror of
https://github.com/nextcloud/server.git
synced 2026-02-03 20:41:22 -05:00
refactor: adjust password confirmation for new @nextcloud/package-confirmation package
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
This commit is contained in:
parent
fb49c91ca7
commit
b1a7eeaacb
16 changed files with 9 additions and 44 deletions
|
|
@ -82,8 +82,6 @@ import NcCheckboxRadioSwitch from '@nextcloud/vue/components/NcCheckboxRadioSwit
|
|||
import NcSettingsSection from '@nextcloud/vue/components/NcSettingsSection'
|
||||
import logger from '../services/logger.ts'
|
||||
|
||||
import '@nextcloud/password-confirmation/dist/style.css'
|
||||
|
||||
export default {
|
||||
name: 'AdminSettings',
|
||||
|
||||
|
|
|
|||
|
|
@ -77,8 +77,6 @@ import NcNoteCard from '@nextcloud/vue/components/NcNoteCard'
|
|||
import NcSettingsSection from '@nextcloud/vue/components/NcSettingsSection'
|
||||
import logger from '../../logger.ts'
|
||||
|
||||
import '@nextcloud/password-confirmation/dist/style.css'
|
||||
|
||||
const lastCron = loadState('settings', 'lastCron')
|
||||
const cronMaxAge = loadState('settings', 'cronMaxAge', '')
|
||||
const backgroundJobsMode = loadState('settings', 'backgroundJobsMode', 'cron')
|
||||
|
|
|
|||
|
|
@ -63,10 +63,8 @@ import {
|
|||
startRegistration,
|
||||
} from '../../service/WebAuthnRegistrationSerice.ts'
|
||||
|
||||
import '@nextcloud/password-confirmation/dist/style.css'
|
||||
|
||||
/**
|
||||
* @param {string} text
|
||||
* @param {string} text The text to log
|
||||
*/
|
||||
function logAndPass(text) {
|
||||
return (data) => {
|
||||
|
|
|
|||
|
|
@ -48,8 +48,6 @@ import WebAuthnDevice from './WebAuthnDevice.vue'
|
|||
import logger from '../../logger.ts'
|
||||
import { removeRegistration } from '../../service/WebAuthnRegistrationSerice.js'
|
||||
|
||||
import '@nextcloud/password-confirmation/dist/style.css'
|
||||
|
||||
const sortByName = sortBy('name')
|
||||
|
||||
export default {
|
||||
|
|
|
|||
|
|
@ -9,8 +9,6 @@ import VTooltipPlugin from 'v-tooltip'
|
|||
import Vue from 'vue'
|
||||
import AuthTokenSection from './components/AuthTokenSection.vue'
|
||||
|
||||
import '@nextcloud/password-confirmation/dist/style.css'
|
||||
|
||||
__webpack_nonce__ = getCSPNonce()
|
||||
|
||||
const pinia = createPinia()
|
||||
|
|
|
|||
|
|
@ -9,8 +9,6 @@ import { confirmPassword } from '@nextcloud/password-confirmation'
|
|||
import { generateOcsUrl } from '@nextcloud/router'
|
||||
import { ACCOUNT_PROPERTY_ENUM, SCOPE_SUFFIX } from '../../constants/AccountPropertyConstants.ts'
|
||||
|
||||
import '@nextcloud/password-confirmation/dist/style.css'
|
||||
|
||||
/**
|
||||
* Save the primary email of the user
|
||||
*
|
||||
|
|
|
|||
|
|
@ -9,8 +9,6 @@ import { confirmPassword } from '@nextcloud/password-confirmation'
|
|||
import { generateOcsUrl } from '@nextcloud/router'
|
||||
import { SCOPE_SUFFIX } from '../../constants/AccountPropertyConstants.ts'
|
||||
|
||||
import '@nextcloud/password-confirmation/dist/style.css'
|
||||
|
||||
/**
|
||||
* Save the primary account property value for the user
|
||||
*
|
||||
|
|
|
|||
|
|
@ -8,8 +8,6 @@ import axios from '@nextcloud/axios'
|
|||
import { confirmPassword } from '@nextcloud/password-confirmation'
|
||||
import { generateOcsUrl } from '@nextcloud/router'
|
||||
|
||||
import '@nextcloud/password-confirmation/dist/style.css'
|
||||
|
||||
/**
|
||||
* Save the visibility of the profile parameter
|
||||
*
|
||||
|
|
|
|||
|
|
@ -6,10 +6,8 @@
|
|||
import axios from '@nextcloud/axios'
|
||||
import { confirmPassword } from '@nextcloud/password-confirmation'
|
||||
|
||||
import '@nextcloud/password-confirmation/dist/style.css'
|
||||
|
||||
/**
|
||||
* @param url
|
||||
* @param {string} url - The url to sanitize
|
||||
*/
|
||||
function sanitize(url) {
|
||||
return url.replace(/\/$/, '') // Remove last url slash
|
||||
|
|
|
|||
|
|
@ -11,8 +11,6 @@ import { generateUrl } from '@nextcloud/router'
|
|||
import { defineStore } from 'pinia'
|
||||
import logger from '../logger.ts'
|
||||
|
||||
import '@nextcloud/password-confirmation/dist/style.css'
|
||||
|
||||
const BASE_URL = generateUrl('/settings/personal/authtokens')
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -33,8 +33,6 @@ import NcCheckboxRadioSwitch from '@nextcloud/vue/components/NcCheckboxRadioSwit
|
|||
import NcSettingsSection from '@nextcloud/vue/components/NcSettingsSection'
|
||||
import { logger } from '../logger.ts'
|
||||
|
||||
import '@nextcloud/password-confirmation/dist/style.css'
|
||||
|
||||
export default {
|
||||
name: 'AdminSettings',
|
||||
components: {
|
||||
|
|
|
|||
|
|
@ -65,8 +65,6 @@ import NcLoadingIcon from '@nextcloud/vue/components/NcLoadingIcon'
|
|||
import { logger } from '../logger.ts'
|
||||
import { print } from '../service/PrintService.js'
|
||||
|
||||
import '@nextcloud/password-confirmation/dist/style.css'
|
||||
|
||||
export default {
|
||||
name: 'PersonalSettings',
|
||||
components: {
|
||||
|
|
|
|||
|
|
@ -10,8 +10,6 @@ import Vue from 'vue'
|
|||
import Vuex, { Store } from 'vuex'
|
||||
import { getApiUrl } from './helpers/api.js'
|
||||
|
||||
import '@nextcloud/password-confirmation/dist/style.css'
|
||||
|
||||
Vue.use(Vuex)
|
||||
|
||||
const store = new Store({
|
||||
|
|
|
|||
|
|
@ -12,5 +12,6 @@
|
|||
@use 'mobile';
|
||||
@use 'tooltip';
|
||||
// If you include .css, it will be imported as url
|
||||
@use '../../node_modules/@nextcloud/dialogs/dist/style';
|
||||
@use '../../node_modules/@nextcloud/dialogs/dist/style' as *;
|
||||
@use '../../node_modules/@nextcloud/password-confirmation/dist/style' as *;
|
||||
@use 'public';
|
||||
|
|
|
|||
|
|
@ -5,13 +5,14 @@
|
|||
|
||||
import { confirmPassword, isPasswordConfirmationRequired } from '@nextcloud/password-confirmation'
|
||||
|
||||
import '@nextcloud/password-confirmation/dist/style.css'
|
||||
|
||||
/**
|
||||
* @namespace OC.PasswordConfirmation
|
||||
*/
|
||||
export default {
|
||||
|
||||
/**
|
||||
* @deprecated 28.0.0 use methods from '@nextcloud/password-confirmation'
|
||||
*/
|
||||
requiresPasswordConfirmation() {
|
||||
return isPasswordConfirmationRequired()
|
||||
},
|
||||
|
|
@ -20,6 +21,8 @@ export default {
|
|||
* @param {Function} callback success callback function
|
||||
* @param {object} options options currently not used by confirmPassword
|
||||
* @param {Function} rejectCallback error callback function
|
||||
*
|
||||
* @deprecated 28.0.0 use methods from '@nextcloud/password-confirmation'
|
||||
*/
|
||||
requirePasswordConfirmation(callback, options, rejectCallback) {
|
||||
confirmPassword().then(callback, rejectCallback)
|
||||
|
|
|
|||
|
|
@ -91,16 +91,3 @@ body.theme--dark .oc-dialog-dim {
|
|||
width: 100%;
|
||||
max-width: 550px;
|
||||
}
|
||||
|
||||
.oc-dialog.password-confirmation {
|
||||
.oc-dialog-content {
|
||||
width: auto;
|
||||
|
||||
input[type=password] {
|
||||
width: 100%;
|
||||
}
|
||||
label {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue