Server : LiteSpeed
System : Linux server51.dnsbootclub.com 4.18.0-553.62.1.lve.el8.x86_64 #1 SMP Mon Jul 21 17:50:35 UTC 2025 x86_64
User : nandedex ( 1060)
PHP Version : 8.1.33
Disable Function : NONE
Directory :  /home/nandedex/www/wp-content/plugins/ml-slider/admin/assets/js/app/slides/import/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]


Current File : /home/nandedex/www/wp-content/plugins/ml-slider/admin/assets/js/app/slides/import/PreviewImport.vue
<script>
import { EventManager } from '../../utils'
import { Axios } from '../../api'
import Swal from 'sweetalert2'
import QS from 'qs'
import { mapGetters } from 'vuex'

export default {
	mounted() {
		EventManager.$on('import-notice', themeId => {
			this.showNotice(themeId)
		})
	},
	computed: mapGetters({
		current: 'slideshows/getCurrent'
	}),
	methods: {
		showNotice(themeId) {
			Swal.fire({
				title: this.__('Import Slides', 'ml-slider'),
				confirmButtonText: this.__('Import slides', 'ml-slider'),
				showCancelButton: true,
				icon: 'info',
				iconHtml: '<div class="dashicons dashicons-megaphone" style="transform: scale(3.5);"></div>',
				customClass: 'shadow-lg',
				html: '<p class="text-base">' + this.__('You currently do not have any slides to preview. If you want, we can import some image slides for you.', 'ml-slider') + '</p>',
				showLoaderOnConfirm: true,
				allowOutsideClick: () => !Swal.isLoading(),
				preConfirm: () => {

					// Make the request to import images
					return Axios.post('import/images', QS.stringify({
						action: 'ms_import_images',
						slideshow_id: this.current.id,
						theme_id: themeId
					})).catch(error => {
						Swal.showValidationMessage(error)
					})
				}
			}).then(result => {

				// User didnt cancel (esc btn, click cancel, etc)
				if (!result.dismiss) {
					window.location.reload(true)
				}
			})
		}
	},
	render: () => {
		return true
	}
}
</script>

F1le Man4ger