mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-05-28 07:14:42 +00:00
MultiEmailInput first email dont need to be separated by comma or space, RenameItem comment ActionButton for more options
This commit is contained in:
@@ -79,5 +79,27 @@
|
|||||||
"/js/main.a7dbc5836b9344e3e26d.hot-update.js": "/js/main.a7dbc5836b9344e3e26d.hot-update.js",
|
"/js/main.a7dbc5836b9344e3e26d.hot-update.js": "/js/main.a7dbc5836b9344e3e26d.hot-update.js",
|
||||||
"/chunks/app-index.a7dbc5836b9344e3e26d.hot-update.js": "/chunks/app-index.a7dbc5836b9344e3e26d.hot-update.js",
|
"/chunks/app-index.a7dbc5836b9344e3e26d.hot-update.js": "/chunks/app-index.a7dbc5836b9344e3e26d.hot-update.js",
|
||||||
"/chunks/files~chunks/shared-files~chunks/shared-page.a7dbc5836b9344e3e26d.hot-update.js": "/chunks/files~chunks/shared-files~chunks/shared-page.a7dbc5836b9344e3e26d.hot-update.js",
|
"/chunks/files~chunks/shared-files~chunks/shared-page.a7dbc5836b9344e3e26d.hot-update.js": "/chunks/files~chunks/shared-files~chunks/shared-page.a7dbc5836b9344e3e26d.hot-update.js",
|
||||||
"/chunks/landing-page.a7dbc5836b9344e3e26d.hot-update.js": "/chunks/landing-page.a7dbc5836b9344e3e26d.hot-update.js"
|
"/chunks/landing-page.a7dbc5836b9344e3e26d.hot-update.js": "/chunks/landing-page.a7dbc5836b9344e3e26d.hot-update.js",
|
||||||
|
"/js/main.58e20853c0060fabb694.hot-update.js": "/js/main.58e20853c0060fabb694.hot-update.js",
|
||||||
|
"/js/main.d36b7327b7ceaf48dc23.hot-update.js": "/js/main.d36b7327b7ceaf48dc23.hot-update.js",
|
||||||
|
"/js/main.9056b6a318b4426467c6.hot-update.js": "/js/main.9056b6a318b4426467c6.hot-update.js",
|
||||||
|
"/js/main.a5fba33e4585e691dfb5.hot-update.js": "/js/main.a5fba33e4585e691dfb5.hot-update.js",
|
||||||
|
"/js/main.3f82c127a8cdfffb8c3b.hot-update.js": "/js/main.3f82c127a8cdfffb8c3b.hot-update.js",
|
||||||
|
"/js/main.99a11c7584bb53f9658d.hot-update.js": "/js/main.99a11c7584bb53f9658d.hot-update.js",
|
||||||
|
"/js/main.e54fbdcbcaa3e8b1973d.hot-update.js": "/js/main.e54fbdcbcaa3e8b1973d.hot-update.js",
|
||||||
|
"/js/main.74fd773f486eb60eed39.hot-update.js": "/js/main.74fd773f486eb60eed39.hot-update.js",
|
||||||
|
"/js/main.f3711fed88e414972ddd.hot-update.js": "/js/main.f3711fed88e414972ddd.hot-update.js",
|
||||||
|
"/js/main.9fb564020f9aa4ea00bc.hot-update.js": "/js/main.9fb564020f9aa4ea00bc.hot-update.js",
|
||||||
|
"/js/main.6efe9661a328f278feb0.hot-update.js": "/js/main.6efe9661a328f278feb0.hot-update.js",
|
||||||
|
"/js/main.cc811fdbaeca808728a1.hot-update.js": "/js/main.cc811fdbaeca808728a1.hot-update.js",
|
||||||
|
"/js/main.7e7e628c5fedbb621b23.hot-update.js": "/js/main.7e7e628c5fedbb621b23.hot-update.js",
|
||||||
|
"/js/main.2021da8323a75241a20d.hot-update.js": "/js/main.2021da8323a75241a20d.hot-update.js",
|
||||||
|
"/js/main.07ef3eb8bf1bebbe0567.hot-update.js": "/js/main.07ef3eb8bf1bebbe0567.hot-update.js",
|
||||||
|
"/js/main.ff29433b11932e0747e8.hot-update.js": "/js/main.ff29433b11932e0747e8.hot-update.js",
|
||||||
|
"/js/main.65b0d39be7a6dc0bebb7.hot-update.js": "/js/main.65b0d39be7a6dc0bebb7.hot-update.js",
|
||||||
|
"/js/main.1860fe9ef49b805cfc53.hot-update.js": "/js/main.1860fe9ef49b805cfc53.hot-update.js",
|
||||||
|
"/js/main.faedd50fd36ecf8b5ae2.hot-update.js": "/js/main.faedd50fd36ecf8b5ae2.hot-update.js",
|
||||||
|
"/js/main.7228d3845cd3e5c790c8.hot-update.js": "/js/main.7228d3845cd3e5c790c8.hot-update.js",
|
||||||
|
"/js/main.691fbeffd45e163fe5e1.hot-update.js": "/js/main.691fbeffd45e163fe5e1.hot-update.js",
|
||||||
|
"/js/main.e804714e7fba8134c127.hot-update.js": "/js/main.e804714e7fba8134c127.hot-update.js"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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