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

@@ -41,7 +41,7 @@ Configuring aspects of the hosted ALVINN PWA is done through the `conf.yaml` fil
The following site settings are avaible:
| name | description | values | default |
| --- | --- | --- | --- |
| `agreeExpire` | number of months before users are shown the site agreement dialog again | integer >= 1 | 3 |
| `agreeExpire` | number of months before users are shown the site agreement dialog again - set to 0 to display dialog on every reload | integer >= 0 | 3 |
| `demo` | set to **true** to enable demo mode by default | boolean | false
| `regions` | array of regions names to enable | thorax, abdomen, limbs, head | [thorax, abdomen, limbs, head] |
| `useExternal` | detemines the ability to use an external detection server:<br />**none** - external server cannot be configured<br />**optional** - external server can be configured in the app's settings page<br />**list** - external server can be selected in the app's settings page but only the configured server(s) may be selected<br />**required** - external server settings from conf file will be used by default and disable server options in the settings page | none, optional, list, required | **optional** |

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