Skip to content

Commit

Permalink
Tauri CSP fixes, + bannerfix
Browse files Browse the repository at this point in the history
  • Loading branch information
Sindrir committed Dec 18, 2024
1 parent 7efdb40 commit 68b4209
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 12 deletions.
Binary file added public/banner.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 0 additions & 6 deletions public/tauri.svg

This file was deleted.

1 change: 0 additions & 1 deletion public/vite.svg

This file was deleted.

2 changes: 1 addition & 1 deletion src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
},
"enable": true
},
"csp": "default-src 'self'; img-src 'self' asset: https://asset.localhost; connect-src ipc: http://ipc.localhost"
"csp": "default-src 'self'; img-src 'self' asset: https://asset.localhost; connect-src 'self' https://sentry.nb.no ipc: http://ipc.localhost"
},
"windows": [
{
Expand Down
6 changes: 3 additions & 3 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ const Content: React.FC<ContentProps> = ({ openSettings, setOpenSettings }) => {
if (loggedOut && !isLoggingIn) {
return (
<div className={'w-screen h-screen flex flex-col justify-center items-center text-center'}>
<img alt={'Trøkk logo'} src="banner.png" className={'w-96 pb-10'}></img>
<img alt={'Trøkk logo'} src="/banner.png" className={'w-96 pb-10'}></img>
<Button className={'w-[150px] h-[75px] text-2xl'} onClick={login}>Logg inn</Button>
</div>
);
Expand All @@ -105,7 +105,7 @@ const Content: React.FC<ContentProps> = ({ openSettings, setOpenSettings }) => {
if (isLoggingIn && !authResponse) {
return (
<div className={'w-screen h-screen flex flex-col justify-center items-center text-center'}>
<img alt={'Trøkk logo'} src="banner.png" className={'w-96 pb-10'}></img>
<img alt={'Trøkk logo'} src="/banner.png" className={'w-96 pb-10'}></img>
<h2 className={'h-[75px]'}>Nytt innloggingsvindu åpnet, vennligst logg inn der...</h2>
</div>
);
Expand All @@ -114,7 +114,7 @@ const Content: React.FC<ContentProps> = ({ openSettings, setOpenSettings }) => {
if (!authResponse) {
return (
<div className={'w-screen h-screen flex flex-col justify-center items-center text-center'}>
<img alt={'Trøkk logo'} src="banner.png" className={'w-96 pb-10'}></img>
<img alt={'Trøkk logo'} src="/banner.png" className={'w-96 pb-10'}></img>
<Button className={'w-[150px] h-[75px] text-2xl'} onClick={login}>Logg inn</Button>
</div>
);
Expand Down
1 change: 0 additions & 1 deletion vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ const host = process.env.TAURI_DEV_HOST;
// https://vitejs.dev/config/
export default defineConfig(async () => ({
plugins: [react()],

// Vite options tailored for Tauri development and only applied in `tauri dev` or `tauri build`
//
// 1. prevent vite from obscuring rust errors
Expand Down

0 comments on commit 68b4209

Please sign in to comment.