formatting

VSCode configuration:

* editor.detectIndentation = false
* editor.indentSize = 2
This commit is contained in:
ekzyis 2023-11-07 09:01:54 +01:00
parent 2af23ff409
commit 0712568273
5 changed files with 49 additions and 47 deletions

View File

@ -5,6 +5,14 @@
</div> </div>
</template> </template>
<script setup>
import { useSession } from './stores/session'
const session = useSession()
session.init()
</script>
<!-- eslint-disable -->
<!-- eslint wants to combine this <script> and <script setup> which breaks the code ... -->
<script> <script>
import NavBar from './components/NavBar' import NavBar from './components/NavBar'
export default { export default {
@ -13,12 +21,6 @@ export default {
} }
</script> </script>
<script setup>
import { useSession } from './stores/session';
const session = useSession()
session.init()
</script>
<style> <style>
html, html,
body { body {

View File

@ -1,5 +1,5 @@
<template> <template>
<div>home</div> <div>home</div>
</template> </template>
<script></script> <script></script>

View File

@ -1,25 +1,25 @@
<template> <template>
<a v-if="lnurl" :href="'lightning:' + lnurl"> <a v-if="lnurl" :href="'lightning:' + lnurl">
<img v-if="qr" :src="'data:image/png;base64,' + qr" /> <img v-if="qr" :src="'data:image/png;base64,' + qr" />
</a> </a>
</template> </template>
<script setup> <script setup>
import { ref } from 'vue'; import { ref } from 'vue'
import { useSession } from '@/stores/session'; import { useSession } from '@/stores/session'
let qr = ref(null) let qr = ref(null)
let lnurl = ref(null) let lnurl = ref(null)
const session = useSession() const session = useSession()
await (async () => { await (async () => {
try { try {
if (session.isAuthenticated) return if (session.isAuthenticated) return
const s = await session.login() const s = await session.login()
qr = s.qr qr = s.qr
lnurl = s.lnurl lnurl = s.lnurl
} catch (err) { } catch (err) {
console.error("error:", err.reason || err) console.error('error:', err.reason || err)
} }
})() })()
</script> </script>

View File

@ -1,25 +1,25 @@
<template> <template>
<!-- eslint-disable --> <!-- eslint-disable -->
<pre> <pre>
_ _ _ _
| | ___ __ _(_)_ __ | | ___ __ _(_)_ __
| |/ _ \ / _` | | '_ \ | |/ _ \ / _` | | '_ \
| | (_) | (_| | | | | | | | (_) | (_| | | | | |
|_|\___/ \__, |_|_| |_| |_|\___/ \__, |_|_| |_|
|___/ </pre> |___/ </pre>
<!-- eslint-enable --> <!-- eslint-enable -->
<Suspense> <Suspense>
<LoginQRCode class="flex justify-center m-3" /> <LoginQRCode class="flex justify-center m-3" />
</Suspense> </Suspense>
</template> </template>
<script setup> <script setup>
import LoginQRCode from './LoginQRCode.vue'; import LoginQRCode from './LoginQRCode.vue'
</script> </script>
<style scoped> <style scoped>
pre { pre {
font-family: monospace; font-family: monospace;
font-weight: bold; font-weight: bold;
} }
</style> </style>

View File

@ -1,11 +1,11 @@
<template> <template>
<header class="flex flex-row text-center justify-center pt-1"> <header class="flex flex-row text-center justify-center pt-1">
<nav> <nav>
<router-link to="/">home</router-link> <router-link to="/">home</router-link>
<router-link to="/user" v-if="session.isAuthenticated">user</router-link> <router-link to="/user" v-if="session.isAuthenticated">user</router-link>
<router-link to="/login" v-else href="/login">login</router-link> <router-link to="/login" v-else href="/login">login</router-link>
</nav> </nav>
</header> </header>
</template> </template>
<script setup> <script setup>
@ -15,26 +15,26 @@ const session = useSession()
<style scoped> <style scoped>
nav { nav {
display: flex; display: flex;
justify-content: center; justify-content: center;
} }
a { a {
color: #8787a4; color: #8787a4;
text-decoration: underline; text-decoration: underline;
} }
a:hover { a:hover {
color: #ffffff; color: #ffffff;
background: #8787A4; background: #8787A4;
} }
a.selected { a.selected {
color: #ffffff; color: #ffffff;
background: #8787A4; background: #8787A4;
} }
nav>a { nav>a {
margin: 0 3px; margin: 0 3px;
} }
</style> </style>