mirror of
https://github.com/lnbits/lnbits.git
synced 2025-10-09 20:12:34 +02:00
fix: last_payment on userlist was broken (#2796)
* fix: last_payment on userlist was broken
This commit is contained in:
2
lnbits/static/bundle.min.js
vendored
2
lnbits/static/bundle.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -104,6 +104,9 @@ window.app = Vue.createApp({
|
|||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
|
formatDate(dateString) {
|
||||||
|
return LNbits.utils.formatDateString(dateString)
|
||||||
|
},
|
||||||
async fetchAudit(props) {
|
async fetchAudit(props) {
|
||||||
try {
|
try {
|
||||||
const params = LNbits.utils.prepareFilterQuery(this.auditTable, props)
|
const params = LNbits.utils.prepareFilterQuery(this.auditTable, props)
|
||||||
@@ -198,9 +201,6 @@ window.app = Vue.createApp({
|
|||||||
this.auditDetailsDialog.data = JSON.stringify(details, null, 4)
|
this.auditDetailsDialog.data = JSON.stringify(details, null, 4)
|
||||||
this.auditDetailsDialog.show = true
|
this.auditDetailsDialog.show = true
|
||||||
},
|
},
|
||||||
formatDate: function (value) {
|
|
||||||
return Quasar.date.formatDate(new Date(value), 'YYYY-MM-DD HH:mm')
|
|
||||||
},
|
|
||||||
shortify(value) {
|
shortify(value) {
|
||||||
valueLength = (value || '').length
|
valueLength = (value || '').length
|
||||||
if (valueLength <= 10) {
|
if (valueLength <= 10) {
|
||||||
|
@@ -1,4 +1,5 @@
|
|||||||
window.LOCALE = 'en'
|
window.LOCALE = 'en'
|
||||||
|
window.dateFormat = 'YYYY-MM-DD HH:mm'
|
||||||
window.i18n = new VueI18n.createI18n({
|
window.i18n = new VueI18n.createI18n({
|
||||||
locale: window.LOCALE,
|
locale: window.LOCALE,
|
||||||
fallbackLocale: window.LOCALE,
|
fallbackLocale: window.LOCALE,
|
||||||
@@ -274,11 +275,11 @@ window.LNbits = {
|
|||||||
fiat_currency: data.fiat_currency
|
fiat_currency: data.fiat_currency
|
||||||
}
|
}
|
||||||
|
|
||||||
obj.date = Quasar.date.formatDate(new Date(obj.time), 'YYYY-MM-DD HH:mm')
|
obj.date = Quasar.date.formatDate(new Date(obj.time), window.dateFormat)
|
||||||
obj.dateFrom = moment(obj.date).fromNow()
|
obj.dateFrom = moment(obj.date).fromNow()
|
||||||
obj.expirydate = Quasar.date.formatDate(
|
obj.expirydate = Quasar.date.formatDate(
|
||||||
new Date(obj.expiry),
|
new Date(obj.expiry),
|
||||||
'YYYY-MM-DD HH:mm'
|
window.dateFormat
|
||||||
)
|
)
|
||||||
obj.expirydateFrom = moment(obj.expirydate).fromNow()
|
obj.expirydateFrom = moment(obj.expirydate).fromNow()
|
||||||
obj.msat = obj.amount
|
obj.msat = obj.amount
|
||||||
@@ -322,12 +323,15 @@ window.LNbits = {
|
|||||||
.join('')
|
.join('')
|
||||||
return hashHex
|
return hashHex
|
||||||
},
|
},
|
||||||
formatDate: function (timestamp) {
|
formatDate(timestamp) {
|
||||||
return Quasar.date.formatDate(
|
return Quasar.date.formatDate(
|
||||||
new Date(timestamp * 1000),
|
new Date(timestamp * 1000),
|
||||||
'YYYY-MM-DD HH:mm'
|
window.dateFormat
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
|
formatDateString(isoDateString) {
|
||||||
|
return Quasar.date.formatDate(new Date(isoDateString), window.dateFormat)
|
||||||
|
},
|
||||||
formatCurrency: function (value, currency) {
|
formatCurrency: function (value, currency) {
|
||||||
return new Intl.NumberFormat(window.LOCALE, {
|
return new Intl.NumberFormat(window.LOCALE, {
|
||||||
style: 'currency',
|
style: 'currency',
|
||||||
|
@@ -248,10 +248,7 @@ window.app.component('lnbits-date', {
|
|||||||
props: ['ts'],
|
props: ['ts'],
|
||||||
computed: {
|
computed: {
|
||||||
date: function () {
|
date: function () {
|
||||||
return Quasar.date.formatDate(
|
return LNbits.utils.formatDate(this.ts)
|
||||||
new Date(this.ts * 1000),
|
|
||||||
'YYYY-MM-DD HH:mm'
|
|
||||||
)
|
|
||||||
},
|
},
|
||||||
dateFrom: function () {
|
dateFrom: function () {
|
||||||
return moment(this.date).fromNow()
|
return moment(this.date).fromNow()
|
||||||
|
@@ -172,8 +172,8 @@ window.app = Vue.createApp({
|
|||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
formatDate: function (value) {
|
formatDate(date) {
|
||||||
return LNbits.utils.formatDate(value)
|
return LNbits.utils.formatDateString(date)
|
||||||
},
|
},
|
||||||
formatSat: function (value) {
|
formatSat: function (value) {
|
||||||
return LNbits.utils.formatSat(Math.floor(value / 1000))
|
return LNbits.utils.formatSat(Math.floor(value / 1000))
|
||||||
|
Reference in New Issue
Block a user