Skip to content

Commit

Permalink
V2.0.0 beta.33: debug mode
Browse files Browse the repository at this point in the history
  • Loading branch information
mateomorris committed Aug 31, 2023
1 parent 7efef7e commit d95cd28
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 15 deletions.
26 changes: 13 additions & 13 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"dependencies": {
"@fontsource/fira-code": "^5.0.5",
"@iconify/svelte": "^2.2.1",
"@primocms/builder": "^0.1.18",
"@primocms/builder": "^0.1.20",
"@rollup/browser": "^3.28.0",
"@supabase/auth-helpers-sveltekit": "^0.10.2",
"@supabase/supabase-js": "^2.31.0",
Expand Down
1 change: 1 addition & 0 deletions src/routes/+layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
registerProcessors({ html, css })
})
setContext('track', () => {})
setContext('DEBUGGING', new URLSearchParams(window.location.search).has('debug'))
}
</script>
Expand Down
8 changes: 7 additions & 1 deletion src/routes/+page.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script>
import { tick } from 'svelte'
import { tick, getContext } from 'svelte'
import Icon from '@iconify/svelte'
import { page } from '$app/stores'
import axios from 'axios'
Expand Down Expand Up @@ -89,6 +89,12 @@
{/if}
</div>
<span class="site-url">{site.url}</span>
{#if getContext('DEBUGGING')}
<button style="font-size:0.75rem;cursor:pointer;text-align:left" on:click={(e) => {
navigator.clipboard.writeText(e.target.innerText);
e.target.style.opacity = '0.5'
}}>{site.id}</button>
{/if}
{#if $page.data.user.admin}
<div class="buttons">
<button
Expand Down

0 comments on commit d95cd28

Please sign in to comment.