mirror of
https://github.com/TECHNOFAB11/svelte-oidc.git
synced 2025-12-13 00:20:07 +01:00
feat: highlight json
- update svelte to 3.23.0 - add svelte highlight - add highlight to home page json.
This commit is contained in:
parent
c6f7bcef5f
commit
b7d9c345fa
3 changed files with 92 additions and 7 deletions
|
|
@ -1,4 +1,7 @@
|
|||
<script>
|
||||
import { Highlight } from 'svelte-highlight';
|
||||
import { json } from 'svelte-highlight/languages';
|
||||
import { arduinoLight as highlightTheme } from "svelte-highlight/styles";
|
||||
import {
|
||||
OidcContext,
|
||||
authError,
|
||||
|
|
@ -12,6 +15,10 @@ import {
|
|||
} from './components/components.module.js';
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
{@html highlightTheme}
|
||||
</svelte:head>
|
||||
|
||||
<div class="container">
|
||||
<OidcContext
|
||||
issuer="process.env.OIDC_ISSUER"
|
||||
|
|
@ -31,7 +38,7 @@ import {
|
|||
<tr><td>isAuthenticated</td><td>{$isAuthenticated}</td></tr>
|
||||
<tr><td>accessToken</td><td>{$accessToken}</td></tr>
|
||||
<tr><td>idToken</td><td style="word-break: break-all;">{$idToken}</td></tr>
|
||||
<tr><td>userInfo</td><td><pre>{JSON.stringify($userInfo, null, 2)}<pre></td></tr>
|
||||
<tr><td>userInfo</td><td><Highlight language={json} code={JSON.stringify($userInfo, null, 2) || ''} /></td></tr>
|
||||
<tr><td>authError</td><td>{$authError}</td></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue