Skip to content

Commit 5e7e03b

Browse files
committed
UI Changes
1 parent 70debf9 commit 5e7e03b

File tree

2 files changed

+53
-27
lines changed

2 files changed

+53
-27
lines changed

src/lib/HealthLinkLTT.svelte

+53-27
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
import QRCode from 'qrcode';
33
import { getContext, setContext } from 'svelte';
44
import {
5+
Accordion,
6+
AccordionItem,
57
Button,
68
Card,
79
CardHeader,
@@ -84,10 +86,17 @@
8486
shlClient.deleteShl($shlStore);
8587
toggle();
8688
// TODO: Implement post-deactivation flow
87-
location.reload(true);
89+
location.reload();
8890
}
8991
90-
async function renewShl() {}
92+
let pasteHeader = "Click here to see how";
93+
function updatePasteHeader({ detail }) {
94+
pasteHeader = detail ? "Click here to close" : "Click here to see how";
95+
}
96+
let qrHeader = "Click here to see how";
97+
function updateQRHeader({ detail }) {
98+
qrHeader = detail ? "Click here to close" : "Click here to see how";
99+
}
91100
</script>
92101
<div transition:fade>
93102
<Row class="justify-content-center">
@@ -111,14 +120,27 @@
111120
{/if}
112121
</Button>
113122
</Col>
123+
<Col xs="5">
124+
{#await href then href}
125+
<Button size="sm" color="success" {href} target="_blank">
126+
<Icon name="box-arrow-up-right" /> Open Report
127+
</Button>
128+
{/await}
129+
</Col>
114130
</Row>
115131
<li>
116132
Then, open your email and start a new message to the person you want to send it to.
117133
</li>
118134
<li>
119-
Paste the link into the body of the email. Here’s how: After you have clicked the button
120-
above, right-click, then choose “Paste” from the pop-up menu. Or, if you’re using a PC,
121-
press the Ctrl and V buttons at the same time. On a Mac, press Command and V.
135+
Paste the link into the body of the email.
136+
<Accordion>
137+
<AccordionItem on:toggle={updatePasteHeader}>
138+
<h6 slot="header" class="my-2">{pasteHeader}</h6>
139+
After you have clicked the button
140+
above, right-click, then choose “Paste” from the pop-up menu. Or, if you’re using a PC,
141+
press the Ctrl and V buttons at the same time. On a Mac, press Command and V.
142+
</AccordionItem>
143+
</Accordion>
122144
</li>
123145
<li>
124146
Send the email. The person you send it to will receive the link to be able to see your
@@ -127,27 +149,29 @@
127149
</ul>
128150
</li>
129151
<li>
130-
<strong>Share a QR code:</strong> Point your phone’s camera at the QR code so that it's clearly
131-
visible within your smartphone's screen. The phone automatically scans the code. On some QR readers,
132-
you have to tap a button to scan the code. If necessary, tap the button. Your smartphone
133-
reads the code and navigates to a page showing your Choices Report.
152+
<strong>Share a QR code:</strong>
134153
</li>
154+
<Accordion>
155+
<AccordionItem on:toggle={updateQRHeader}>
156+
<h6 slot="header" class="my-2">{qrHeader}</h6>
157+
<Row>
158+
<Col>
159+
Point your phone’s camera at the QR code so that it's clearly
160+
visible within your smartphone's screen. The phone automatically scans the code. On some QR readers,
161+
you have to tap a button to scan the code. If necessary, tap the button. Your smartphone
162+
reads the code and navigates to a page showing your Choices Report.
163+
</Col>
164+
<Col>
165+
<img src="/img/qrphone.png" alt="Scan a QR Code"/>
166+
</Col>
167+
</Row>
168+
</AccordionItem>
169+
</Accordion>
135170
</ol>
136171
<Row class="justify-content-center mx-4">
137172
<Col>
138173
<Row class="justify-content-center">
139174
<Card class="mb-2 p-0" color="light">
140-
<CardHeader>
141-
<strong>
142-
{#if expDisplay}
143-
{#if exp > today}
144-
Expires {expDisplay}
145-
{:else}
146-
<span class="text-danger">Expired {expDisplay}</span>
147-
{/if}
148-
{/if}
149-
</strong>
150-
</CardHeader>
151175
<CardBody>
152176
<CardText>
153177
{#await qrCode then qrImage}
@@ -173,13 +197,15 @@
173197
</CardText>
174198
</CardBody>
175199
<CardFooter>
176-
{#await href then href}
177-
<Row class="justify-content-center mx-auto">
178-
<Button size="sm" color="success" {href} target="_blank">
179-
<Icon name="box-arrow-up-right" /> View Report
180-
</Button>
181-
</Row>
182-
{/await}
200+
<strong>
201+
{#if expDisplay}
202+
{#if exp > today}
203+
Expires {expDisplay}
204+
{:else}
205+
<span class="text-danger">Expired {expDisplay}</span>
206+
{/if}
207+
{/if}
208+
</strong>
183209
</CardFooter>
184210
</Card>
185211
</Row>

static/img/qrphone.png

83.5 KB
Loading

0 commit comments

Comments
 (0)