Expand agreeExpire config to force dialog

Signed-off-by: Justin Georgi <justin.georgi@gmail.com>
This commit is contained in:
2024-04-11 20:18:28 -07:00
parent b732d001dc
commit 12f916f646
2 changed files with 3 additions and 3 deletions

View File

@@ -33,7 +33,7 @@
ALVINN is for educational purposes only. It may not be used for medical diagnosis, intervention, or treatment.
</h3>
<div style="display: flex; justify-content: space-around; flex-direction: row; align-items: center;">
<span style="height: min-content;">
<span v-if="!siteConf || !siteConf.agreeExpire == 0" style="height: min-content;">
<f7-checkbox v-model:checked="rememberAgreement"/> Don't show again
</span>
<f7-button text="I agree" fill @click="setAgreement" />
@@ -89,7 +89,7 @@
const curDate = new Date ()
const expireMonth = (this.dateAgreement?.getMonth() || 0) + (this.siteConf?.agreeExpire || 3)
const agreeStillValid = this.dateAgreement && (curDate < this.dateAgreement.setMonth(expireMonth))
if (this.siteAgreement && this.rememberAgreement && agreeStillValid) {
if (this.siteAgreement && this.rememberAgreement && agreeStillValid && !this.siteConf?.agreeExpire == 0) {
store().agree()
} else {
this.showDisclaimer = true