-
-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Svelte 5 Migration 5: fixes after global CSS switch (#691)
* improve dev proxying * create template for global state via runes * further `app.html` cleanup * many CSS fixes * fix flex issues in lots of places after global css migration * improve vite dev proxying * fix events infinite re-render * fix account and password policy css * fix some button width because of bigger font
- Loading branch information
Showing
29 changed files
with
743 additions
and
632 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
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 |
---|---|---|
|
@@ -59,7 +59,6 @@ | |
<Button | ||
on:click={generateSecret} | ||
level={1} | ||
width="130px" | ||
> | ||
GENERATE NEW | ||
</Button> | ||
|
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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
let _isDev = $state(typeof (process) !== 'undefined' && process.env.DEV_MODE === 'true'); | ||
|
||
export function useIsDev() { | ||
if (typeof (process) !== 'undefined') { | ||
_isDev = process.env.DEV_MODE === 'true'; | ||
} else if (typeof (window) !== 'undefined') { | ||
// We can take advantage of the fast that SSR template values will not exist during local dev. | ||
// TODO needs adjustment as soon as this has been converted into a template | ||
let elem = window.document.getElementsByName('rauthy-csrf-token')[0]; | ||
_isDev = elem.id === '{{ csrf_token }}'; | ||
} | ||
console.log('isDev: ', _isDev); | ||
|
||
return { | ||
get(): boolean { | ||
return _isDev; | ||
}, | ||
set(value: boolean) { | ||
_isDev = value; | ||
} | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<script lang="ts"> | ||
import {type Snippet} from "svelte"; | ||
let {children}: { children: Snippet } = $props(); | ||
</script> | ||
|
||
<div> | ||
{@render children()} | ||
</div> | ||
|
||
|
||
<style> | ||
div { | ||
width: 100%; | ||
height: 100%; | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
} | ||
</style> |
Oops, something went wrong.