Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 16 additions & 2 deletions src/lib/components/fallback/Decrypt.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

import YiviQRCode from '$lib/components/filesharing/YiviQRCode.svelte'
import Chip from '$lib/components/Chip.svelte'
import { isMobile } from '$lib/browser-detect'

const STATES = {
Uninit: 'Uninit',
Expand All @@ -26,6 +27,7 @@
}

let decryptState = $state(STATES.Uninit)
const isMobileDevice = isMobile()

let policies = $state()
let keylist = $state()
Expand Down Expand Up @@ -295,16 +297,28 @@
{:else if decryptState === STATES.Qr}
<div class="decrypt-card">
<h3>
{$_('fallback.decrypt.scanQr', { default: 'Scan QR code' })}
{$_('fallback.decrypt.scanQr', {
default: 'Scan QR code with Yivi',
})}
</h3>
<p class="card-subtitle">
{$_('fallback.decrypt.scanQrDesc', {
default:
'Verify your identity by scanning this QR code with the free Yivi app on your phone.',
})}
</p>
{#if showHints}
<div class="hints">
{#each hints as hint (hint)}
<span class="hint-chip">{hint}</span>
{/each}
</div>
{/if}
<YiviQRCode id="yivi-fallback" responsive />
<YiviQRCode
id="yivi-fallback"
responsive
mode={isMobileDevice ? 'deeplink' : 'qr'}
/>
</div>
{:else if decryptState === STATES.Decrypting}
<div class="spinner-wrapper">
Expand Down
13 changes: 13 additions & 0 deletions src/lib/components/filesharing/SendButton.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,13 @@
<div class="qr-code-wrapper">
<YiviQRCode />
</div>

<HelpToggle
title={$_('filesharing.encryptPanel.yiviInfo')}
content={$_('filesharing.encryptPanel.yiviInfoText')}
linkText={$_('filesharing.encryptPanel.yiviInfoLink')}
linkUrl="https://yivi.app"
/>
</div>
<div class="popup-arrow"></div>
</div>
Expand Down Expand Up @@ -476,6 +483,12 @@
{$_('filesharing.sign.scanQR')}
</p>
<div class="qr-code-wrapper"><YiviQRCode /></div>
<HelpToggle
title={$_('filesharing.encryptPanel.yiviInfo')}
content={$_('filesharing.encryptPanel.yiviInfoText')}
linkText={$_('filesharing.encryptPanel.yiviInfoLink')}
linkUrl="https://yivi.app"
/>
<Chip
text={$_('filesharing.sign.close')}
onclick={() => {
Expand Down
6 changes: 3 additions & 3 deletions src/lib/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@
"tryAgain": "Try again",
"cancel": "Cancel",
"sign": {
"scanQR": "Scan this QR code with your Yivi app.",
"scanQR": "Verify your identity by scanning this QR code with the free Yivi app on your phone.",
"close": "Close",
"signOtherDevice": "Sign with Yivi on another device",
"followSteps": "Follow the steps in the Yivi app",
Expand All @@ -148,9 +148,9 @@
"header": "Download your files",
"pageDescription": "To download the files, you need to decrypt them. You do this by proving who you are with Yivi.",
"downloadDecrypt": "Downloading & Decrypting...",
"irmaInstructionHeaderQr": "Decrypt",
"irmaInstructionHeaderQr": "Decrypt with Yivi",
"irmaInstructionHeaderMobile": "Prove your identity with Yivi",
"irmaInstructionQr": "Scan this QR code with your Yivi app.",
"irmaInstructionQr": "Decrypt the files by verifying your e-mail address. Scan the QR code below with the free Yivi app on your phone.",
"irmaInstructionMobile": "Decrypt the files by verifying your e-mail address. Please click the button below to open the Yivi-app.",
"noIrma": "Don't have the Yivi-app yet?",
"decrypting": "Your files are being downloaded and decrypted afterwards.",
Expand Down
6 changes: 3 additions & 3 deletions src/lib/locales/nl.json
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@
"tryAgain": "Probeer opnieuw",
"cancel": "Annuleer",
"sign": {
"scanQR": "Scan deze QR-code met je Yivi app.",
"scanQR": "Bewijs wie je bent door deze QR-code te scannen met de gratis Yivi-app op je telefoon.",
"close": "Sluit",
"signOtherDevice": "Onderteken met Yivi op een ander apparaat",
"followSteps": "Volg de stappen in de Yivi app",
Expand All @@ -148,9 +148,9 @@
"header": "Download je bestanden",
"pageDescription": "Om de bestanden te downloaden, moet je ze ontsleutelen. Dit doe je door te bewijzen wie je bent met Yivi.",
"downloadDecrypt": "Downloading & ontsleutelen...",
"irmaInstructionHeaderQr": "Ontsleutel",
"irmaInstructionHeaderQr": "Ontsleutel met Yivi",
"irmaInstructionHeaderMobile": "Bewijs identiteit met Yivi",
"irmaInstructionQr": "Scan deze QR code met je Yivi app.",
"irmaInstructionQr": "Ontsleutel de bestanden door je e-mailadres te verifiëren. Scan de onderstaande QR-code met de gratis Yivi-app op je telefoon.",
"irmaInstructionMobile": "Ontsleutel het bestand door je e-mailadres te tonen. Click daarvoor op de onderstaande knop om naar de identificatie app Yivi te gaan.",
"noIrma": "Nog geen Yivi-app?",
"decrypting": "Jouw bestand wordt gedownload en vervolgens ontsleuteld.",
Expand Down
24 changes: 15 additions & 9 deletions src/routes/(app)/decrypt/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -131,15 +131,21 @@
</div>
<div class="fallback-container">
<div class="left-panel">
<label class="upload-area">
<Icon icon="mdi:upload-lock" width="28px" aria-hidden="true" />
<span>{$_('fallback.drop')}</span>
<input
type="file"
onchange={onFile}
aria-label={$_('fallback.drop')}
/>
</label>
{#if !hashMode}
<label class="upload-area">
<Icon
icon="mdi:upload-lock"
width="28px"
aria-hidden="true"
/>
<span>{$_('fallback.drop')}</span>
<input
type="file"
onchange={onFile}
aria-label={$_('fallback.drop')}
/>
</label>
{/if}

<div class="search-bar">
<div class="search-input-wrapper">
Expand Down
Loading