feat: update to Vue3 (#2677)
* update packages for vue3 * fix make bundle and make checkbundle to include bundle-components * add lnbits/static/bundle-components.js --------- Co-authored-by: Pavol Rusnak <pavol@rusnak.io>
This commit is contained in:
+11
-16
@@ -1,15 +1,10 @@
|
||||
/* globals crypto, moment, Vue, axios, Quasar, _ */
|
||||
|
||||
Vue.use(VueI18n)
|
||||
|
||||
window.LOCALE = 'en'
|
||||
window.i18n = new VueI18n({
|
||||
window.i18n = new VueI18n.createI18n({
|
||||
locale: window.LOCALE,
|
||||
fallbackLocale: window.LOCALE,
|
||||
messages: window.localisation
|
||||
})
|
||||
|
||||
window.EventHub = new Vue()
|
||||
window.LNbits = {
|
||||
api: {
|
||||
request: function (method, url, apiKey, data) {
|
||||
@@ -264,12 +259,12 @@ window.LNbits = {
|
||||
fiat_currency: data.fiat_currency
|
||||
}
|
||||
|
||||
obj.date = Quasar.utils.date.formatDate(
|
||||
obj.date = Quasar.date.formatDate(
|
||||
new Date(obj.time * 1000),
|
||||
'YYYY-MM-DD HH:mm'
|
||||
)
|
||||
obj.dateFrom = moment(obj.date).fromNow()
|
||||
obj.expirydate = Quasar.utils.date.formatDate(
|
||||
obj.expirydate = Quasar.date.formatDate(
|
||||
new Date(obj.expiry * 1000),
|
||||
'YYYY-MM-DD HH:mm'
|
||||
)
|
||||
@@ -294,7 +289,7 @@ window.LNbits = {
|
||||
},
|
||||
utils: {
|
||||
confirmDialog: function (msg) {
|
||||
return Quasar.plugins.Dialog.create({
|
||||
return Quasar.Dialog.create({
|
||||
message: msg,
|
||||
ok: {
|
||||
flat: true,
|
||||
@@ -411,14 +406,14 @@ window.LNbits = {
|
||||
)
|
||||
.join('\r\n')
|
||||
|
||||
var status = Quasar.utils.exportFile(
|
||||
var status = Quasar.exportFile(
|
||||
`${fileName || 'table-export'}.csv`,
|
||||
content,
|
||||
'text/csv'
|
||||
)
|
||||
|
||||
if (status !== true) {
|
||||
Quasar.plugins.Notify.create({
|
||||
Quasar.Notify.create({
|
||||
message: 'Browser denied file download...',
|
||||
color: 'negative',
|
||||
icon: null
|
||||
@@ -432,16 +427,16 @@ window.LNbits = {
|
||||
return converter.makeHtml(text)
|
||||
},
|
||||
hexToRgb: function (hex) {
|
||||
return Quasar.utils.colors.hexToRgb(hex)
|
||||
return Quasar.colors.hexToRgb(hex)
|
||||
},
|
||||
hexDarken: function (hex, percent) {
|
||||
return Quasar.utils.colors.lighten(hex, percent)
|
||||
return Quasar.colors.lighten(hex, percent)
|
||||
},
|
||||
hexAlpha: function (hex, alpha) {
|
||||
return Quasar.utils.colors.changeAlpha(hex, alpha)
|
||||
return Quasar.colors.changeAlpha(hex, alpha)
|
||||
},
|
||||
getPaletteColor: function (color) {
|
||||
return Quasar.utils.colors.getPaletteColor(color)
|
||||
return Quasar.colors.getPaletteColor(color)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -494,7 +489,7 @@ window.windowMixin = {
|
||||
},
|
||||
copyText: function (text, message, position) {
|
||||
var notify = this.$q.notify
|
||||
Quasar.utils.copyToClipboard(text).then(function () {
|
||||
Quasar.copyToClipboard(text).then(function () {
|
||||
notify({
|
||||
message: message || 'Copied to clipboard!',
|
||||
position: position || 'bottom'
|
||||
|
||||
Reference in New Issue
Block a user