mirror of
https://github.com/filebrowser/filebrowser.git
synced 2025-05-10 04:02:57 +00:00

Former-commit-id: 8578bf0b790ea4b8b5c5da4876fbccd2ead42d3c [formerly b67d35502fb0c9a3c57226b812dd2b869c5fcae1] [formerly 506eb279c974a86b232be57f87a11ec283b3b742 [formerly f658394dd7836b26f7e96baba2dc32e3885719e4]] Former-commit-id: e9565ce6a4ef229943f132fb6e05c5ec853447ed [formerly d0b2c24f6df2a74c403ded829cfd0746659e7d5f] Former-commit-id: 2f4afe92081915821dd5b2fe745faf1492bdcabf
55 lines
1.1 KiB
JavaScript
55 lines
1.1 KiB
JavaScript
import Vue from 'vue'
|
|
import App from './App'
|
|
import store from './store'
|
|
import router from './router'
|
|
import i18n from './i18n'
|
|
import Noty from 'noty'
|
|
|
|
Vue.config.productionTip = true
|
|
|
|
const notyDefault = {
|
|
type: 'info',
|
|
layout: 'bottomRight',
|
|
timeout: 1000,
|
|
progressBar: true
|
|
}
|
|
|
|
Vue.prototype.$noty = function (opts) {
|
|
new Noty(Object.assign({}, notyDefault, opts)).show()
|
|
}
|
|
|
|
Vue.prototype.$showSuccess = function (message) {
|
|
new Noty(Object.assign({}, notyDefault, {
|
|
text: message,
|
|
type: 'success'
|
|
})).show()
|
|
}
|
|
|
|
Vue.prototype.$showError = function (error) {
|
|
let n = new Noty(Object.assign({}, notyDefault, {
|
|
text: error,
|
|
type: 'error',
|
|
timeout: null,
|
|
buttons: [
|
|
Noty.button(i18n.t('buttons.reportIssue'), '', function () {
|
|
window.open('https://github.com/hacdias/filemanager/issues/new')
|
|
}),
|
|
Noty.button(i18n.t('buttons.close'), '', function () {
|
|
n.close()
|
|
})
|
|
]
|
|
}))
|
|
|
|
n.show()
|
|
}
|
|
|
|
/* eslint-disable no-new */
|
|
new Vue({
|
|
el: '#app',
|
|
store,
|
|
router,
|
|
i18n,
|
|
template: '<App/>',
|
|
components: { App }
|
|
})
|