mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-05-13 08:45:01 +00:00
Merge remote-tracking branch 'origin/version-v1.8.1' into version-v1.8.1
# Conflicts: # app/Http/Controllers/FileFunctions/ShareController.php # public/mix-manifest.json
This commit is contained in:
@@ -24,10 +24,10 @@ export default {
|
|||||||
props: ['isError', 'label'],
|
props: ['isError', 'label'],
|
||||||
computed: {
|
computed: {
|
||||||
getCharactersLength() {
|
getCharactersLength() {
|
||||||
return this.emails.join('').length
|
return this.emails.join( '' ).length
|
||||||
},
|
},
|
||||||
placeHolder() {
|
placeHolder() {
|
||||||
return !this.emails.length ? this.$t('shared_form.email_placeholder') : ''
|
return !this.emails.length ? this.$t( 'shared_form.email_placeholder' ) : ''
|
||||||
},
|
},
|
||||||
inputSize() {
|
inputSize() {
|
||||||
return this.email && this.email.length > 14 ? this.email.length : 14
|
return this.email && this.email.length > 14 ? this.email.length : 14
|
||||||
@@ -40,36 +40,44 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
removeEmail(email) {
|
removeEmail( email ) {
|
||||||
this.emails = this.emails.filter(item => item !== email)
|
this.emails = this.emails.filter( item => item !== email )
|
||||||
|
|
||||||
|
// After romove email send new emails list to parent
|
||||||
|
events.$emit( 'emailsInputValues', this.emails )
|
||||||
},
|
},
|
||||||
removeLastEmail(event) {
|
removeLastEmail( event ) {
|
||||||
|
|
||||||
// If is input empty and presse backspace remove last email from array
|
// If is input empty and presse backspace remove last email from array
|
||||||
if (event.code === 'Backspace' && this.email === '')
|
if ( event.code === 'Backspace' && this.email === '' )
|
||||||
this.emails.pop()
|
this.emails.pop()
|
||||||
},
|
},
|
||||||
handleEmail() {
|
handleEmail() {
|
||||||
|
|
||||||
if (this.email.length > 0) {
|
if ( this.email.length > 0 ) {
|
||||||
// Get index of @ and last dot
|
// Get index of @ and last dot
|
||||||
let lastDot = this.email.lastIndexOf('.')
|
let lastDot = this.email.lastIndexOf( '.' )
|
||||||
let at = this.email.indexOf('@')
|
let at = this.email.indexOf( '@' )
|
||||||
|
|
||||||
// Check if is after @ some dot, if email have @ anf if dont have more like one
|
// Check if is after @ some dot, if email have @ anf if dont have more like one
|
||||||
if (lastDot < at || at === -1 || this.email.match(/@/g).length > 1) return
|
if ( lastDot < at || at === -1 || this.email.match(/@/g).length > 1 ) return
|
||||||
|
|
||||||
|
// First email dont need to be separated by comma or space to be sended
|
||||||
|
if( this.emails.length === 0 )
|
||||||
|
events.$emit('emailsInputValues', [this.email])
|
||||||
|
|
||||||
|
|
||||||
// After come or backspace push the single email to array or emails
|
// After come or backspace push the single email to array or emails
|
||||||
if (this.email.includes(',') || this.email.includes(' ')) {
|
if ( this.email.includes(',') || this.email.includes(' ') ) {
|
||||||
|
|
||||||
let email = this.email.replace(/[","," "]/, '')
|
let email = this.email.replace( /[","," "]/, '' )
|
||||||
|
|
||||||
this.email = ''
|
this.email = ''
|
||||||
|
|
||||||
// Push single email to aray of emails
|
// Push single email to aray of emails
|
||||||
this.emails.push(email)
|
this.emails.push( email )
|
||||||
|
|
||||||
events.$emit('emailsInputValues', this.emails)
|
events.$emit( 'emailsInputValues', this.emails )
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
|
|
||||||
<!--<SetFolderIcon v-if="isMoreOptions" :folderData="pickedItem" :unique_id="pickedItem.unique_id" />-->
|
<!--<SetFolderIcon v-if="isMoreOptions" :folderData="pickedItem" :unique_id="pickedItem.unique_id" />-->
|
||||||
|
|
||||||
<ActionButton v-if="pickedItem.type === 'folder'" @click.native.stop="moreOptions" :icon="isMoreOptions ? 'x' : 'pencil-alt'">{{ moreOptionsTitle }}</ActionButton>
|
<!-- <ActionButton v-if="pickedItem.type === 'folder'" @click.native.stop="moreOptions" :icon="isMoreOptions ? 'x' : 'pencil-alt'">{{ moreOptionsTitle }}</ActionButton> -->
|
||||||
|
|
||||||
</ValidationObserver>
|
</ValidationObserver>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user