Skip to content

Commit

Permalink
🤖 🎨 Autoformat
Browse files Browse the repository at this point in the history
  • Loading branch information
dmihalcik-virtru authored and github-actions[bot] committed May 9, 2024
1 parent ce69b8b commit 5d1853e
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 15 deletions.
26 changes: 16 additions & 10 deletions web-app/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,6 @@ function App() {
return false;
}
for (const inputSource of inputSources) {

const inputFileName = fileNameFor(inputSource);
console.log(`Encrypting [${inputFileName}] as ${encryptContainerType} to ${sinkType}`);
switch (encryptContainerType) {
Expand Down Expand Up @@ -533,7 +532,6 @@ function App() {
return false;
}
for (const inputSource of inputSources) {

const dfn = decryptedFileName(fileNameFor(inputSource));
console.log(
`Decrypting ${decryptContainerType} ${JSON.stringify(inputSource)} to ${sinkType} ${dfn}`
Expand Down Expand Up @@ -662,20 +660,18 @@ function App() {
<pre id="user_token">{JSON.stringify(authState?.user, null, ' ')}</pre>
);

const detailsList = inputSources.map((inputSource) =>
const detailsList = inputSources.map((inputSource) => (
<>
<h2>{fileNameFor(inputSource)}</h2>
{inputSource.type == 'file' && (
<>
<div id="contentType">Content Type: {inputSource.file.type}</div>
<div>
Last Modified: {new Date(inputSource.file.lastModified).toLocaleString()}
</div>
<div>Last Modified: {new Date(inputSource.file.lastModified).toLocaleString()}</div>
<div>Size: {new Intl.NumberFormat().format(inputSource.file.size)} bytes</div>
</>
)}
</>
);
));

return (
<div className="App">
Expand Down Expand Up @@ -707,9 +703,17 @@ function App() {
) : (
<>
<label htmlFor="fileSelector">Select file:</label>
<input type="file" name="file" id="fileSelector" onChange={setFileHandler} multiple />
<input
type="file"
name="file"
id="fileSelector"
onChange={setFileHandler}
multiple
/>
<div>OR</div>
<div className={clsx({ selected: inputSources.length && 'url' in inputSources[0] })}>
<div
className={clsx({ selected: inputSources.length && 'url' in inputSources[0] })}
>
<label htmlFor="urlSelector">Load from URL:</label>
<input
id="urlSelector"
Expand All @@ -720,7 +724,9 @@ function App() {
/>
</div>
<div>OR:</div>
<div className={clsx({ selected: inputSources.length && 'length' in inputSources[0] })}>
<div
className={clsx({ selected: inputSources.length && 'length' in inputSources[0] })}
>
<label htmlFor="randomSelector">Random Bytes:</label>
<input
id="randomSelector"
Expand Down
6 changes: 1 addition & 5 deletions web-app/src/session.ts
Original file line number Diff line number Diff line change
Expand Up @@ -371,11 +371,7 @@ export class OidcClient implements AuthProvider {
await crypto.subtle.exportKey('jwk', signingKey.publicKey)
)}`
);
headers.DPoP = await dpopFn(
signingKey,
config.token_endpoint,
'POST'
);
headers.DPoP = await dpopFn(signingKey, config.token_endpoint, 'POST');
const response = await fetch(config.token_endpoint, {
method: 'POST',
headers,
Expand Down

0 comments on commit 5d1853e

Please sign in to comment.