-
-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #70 from covidpass-org/dev
Color selector and translation fixes
- Loading branch information
Showing
19 changed files
with
161 additions
and
106 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
import React, {useState} from 'react' | ||
import {RadioGroup} from '@headlessui/react' | ||
import {COLORS, rgbToHex} from "../src/colors"; | ||
|
||
interface ColorsProps { | ||
initialValue: COLORS, | ||
onChange(value: COLORS): void; | ||
} | ||
|
||
function Colors(props: ColorsProps): JSX.Element { | ||
let [color, setColor] = useState(props.initialValue) | ||
|
||
return ( | ||
<RadioGroup<"div", COLORS> | ||
className="flex flex-wrap" value={color} | ||
onChange={function (value) { | ||
setColor(value); | ||
props.onChange(value); | ||
} | ||
}> | ||
{Object.values(COLORS).map((color) => { | ||
return ( | ||
<RadioGroup.Option value={color} key={color} className="outline-none"> | ||
{({checked}) => ( | ||
<div | ||
key={color} | ||
className={`${color !== COLORS.WHITE ? 'ring-white' : 'ring-black'} ring-2 shadow-xl cursor-pointer rounded-md w-10 h-10 flex items-center justify-center m-2`} | ||
style={{backgroundColor: rgbToHex(color), WebkitAppearance: 'none'}} | ||
> | ||
{checked && | ||
<svg className={`${color !== COLORS.WHITE ? 'text-white' : 'text-black'} h-6 w-6`} fill="none" | ||
viewBox="0 0 24 24" stroke="currentColor"> | ||
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth="2.5" d="M5 13l4 4L19 7"/> | ||
</svg> | ||
} | ||
</div> | ||
)} | ||
</RadioGroup.Option> | ||
) | ||
})} | ||
</RadioGroup> | ||
) | ||
} | ||
|
||
export default Colors; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
title: CovidPass | ||
subtitle: Aggiungi i tuoi certificati digitali europei COVID alle tue app Wallet preferite. | ||
privacyPolicy: Politica sulla Riservatezza | ||
subtitle: Aggiungi i tuoi Certificati COVID Digitali UE alle tue wallet app preferite. | ||
privacyPolicy: Privacy Policy | ||
donate: Donazione | ||
gitHub: GitHub | ||
imprint: Menzioni legali | ||
imprint: Menzioni legali |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,20 @@ | ||
noFileOrQrCode: Perfavore scannerizza un Codice QR, o seleziona un file | ||
signatureFailed: Errore durante la firma del pass sul server | ||
decodingFailed: Impossibile decodificare il payload del Codice QR | ||
decodingFailed: Impossibile decodificare il contenuto del codice QR | ||
invalidColor: Colore non valido | ||
certificateData: Impossibile leggere i dati del certificato | ||
nameMissing: Impossibile leggere il nome | ||
dobMissing: Impossibile leggere la data di nascita | ||
invalidMedicalProduct: Prodotto medico non valido | ||
invalidCountryCode: Codice paese non valido | ||
invalidCountryCode: Codice del paese non valido | ||
invalidManufacturer: Produttore non valido | ||
invalidFileType: Tipo di file non valido | ||
couldNotDecode: Impossibile decodificare il Codice QR dal file | ||
couldNotFindQrCode: Impossibile trovare il Codice QR nel Codice QR fornito dal file | ||
couldNotFindQrCode: Impossibile trovare il Codice QR nel file | ||
invalidQrCode: Codice QR non valido | ||
certificateType: Nessun tipo di certificato valido trovato | ||
invalidTestResult: Risultato del test non valido | ||
invalidTestType: Tipo di test non valido | ||
noCameraAccess: Impossibile accedere alla fotocamera. Controlla le autorizzazioni in Impostazioni > Safari > Fotocamera. | ||
noCameraFound: Impossibile trovare la fotocamera. | ||
safariSupportOnly: Su iOS, usa il browser Safari. | ||
safariSupportOnly: Su iOS, usa il browser Safari. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.