Changeset View
Changeset View
Standalone View
Standalone View
src/resources/js/app.js
Show First 20 Lines • Show All 394 Lines • ▼ Show 20 Lines | methods: { | ||||
} | } | ||||
if (!user.isImapReady || !user.isLdapReady) { | if (!user.isImapReady || !user.isLdapReady) { | ||||
return this.$t('status.notready') | return this.$t('status.notready') | ||||
} | } | ||||
return this.$t('status.active') | return this.$t('status.active') | ||||
}, | }, | ||||
// Append some wallet properties to the object | |||||
userWalletProps(object) { | |||||
let wallet = store.state.authInfo.accounts[0] | |||||
if (!wallet) { | |||||
wallet = store.state.authInfo.wallets[0] | |||||
} | |||||
if (wallet) { | |||||
object.currency = wallet.currency | |||||
if (wallet.discount) { | |||||
object.discount = wallet.discount | |||||
object.discount_description = wallet.discount_description | |||||
} | |||||
} | |||||
}, | |||||
updateBodyClass(name) { | updateBodyClass(name) { | ||||
// Add 'class' attribute to the body, different for each page | // Add 'class' attribute to the body, different for each page | ||||
// so, we can apply page-specific styles | // so, we can apply page-specific styles | ||||
document.body.className = 'page-' + (name || this.pageName()).replace(/\/.*$/, '') | document.body.className = 'page-' + (name || this.pageName()).replace(/\/.*$/, '') | ||||
} | } | ||||
} | } | ||||
}) | }) | ||||
▲ Show 20 Lines • Show All 115 Lines • Show Last 20 Lines |