formatting
VSCode configuration: * editor.detectIndentation = false * editor.indentSize = 2
This commit is contained in:
parent
2af23ff409
commit
0712568273
|
@ -5,6 +5,14 @@
|
|||
</div>
|
||||
</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>
|
||||
import NavBar from './components/NavBar'
|
||||
export default {
|
||||
|
@ -13,12 +21,6 @@ export default {
|
|||
}
|
||||
</script>
|
||||
|
||||
<script setup>
|
||||
import { useSession } from './stores/session';
|
||||
const session = useSession()
|
||||
session.init()
|
||||
</script>
|
||||
|
||||
<style>
|
||||
html,
|
||||
body {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<div>home</div>
|
||||
<div>home</div>
|
||||
</template>
|
||||
|
||||
<script></script>
|
||||
<script></script>
|
||||
|
|
|
@ -1,25 +1,25 @@
|
|||
<template>
|
||||
<a v-if="lnurl" :href="'lightning:' + lnurl">
|
||||
<img v-if="qr" :src="'data:image/png;base64,' + qr" />
|
||||
</a>
|
||||
<a v-if="lnurl" :href="'lightning:' + lnurl">
|
||||
<img v-if="qr" :src="'data:image/png;base64,' + qr" />
|
||||
</a>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref } from 'vue';
|
||||
import { useSession } from '@/stores/session';
|
||||
import { ref } from 'vue'
|
||||
import { useSession } from '@/stores/session'
|
||||
|
||||
let qr = ref(null)
|
||||
let lnurl = ref(null)
|
||||
|
||||
const session = useSession()
|
||||
await (async () => {
|
||||
try {
|
||||
if (session.isAuthenticated) return
|
||||
const s = await session.login()
|
||||
qr = s.qr
|
||||
lnurl = s.lnurl
|
||||
} catch (err) {
|
||||
console.error("error:", err.reason || err)
|
||||
}
|
||||
try {
|
||||
if (session.isAuthenticated) return
|
||||
const s = await session.login()
|
||||
qr = s.qr
|
||||
lnurl = s.lnurl
|
||||
} catch (err) {
|
||||
console.error('error:', err.reason || err)
|
||||
}
|
||||
})()
|
||||
</script>
|
||||
</script>
|
||||
|
|
|
@ -1,25 +1,25 @@
|
|||
<template>
|
||||
<!-- eslint-disable -->
|
||||
<pre>
|
||||
<!-- eslint-disable -->
|
||||
<pre>
|
||||
_ _
|
||||
| | ___ __ _(_)_ __
|
||||
| |/ _ \ / _` | | '_ \
|
||||
| | (_) | (_| | | | | |
|
||||
|_|\___/ \__, |_|_| |_|
|
||||
|___/ </pre>
|
||||
<!-- eslint-enable -->
|
||||
<Suspense>
|
||||
<LoginQRCode class="flex justify-center m-3" />
|
||||
</Suspense>
|
||||
<!-- eslint-enable -->
|
||||
<Suspense>
|
||||
<LoginQRCode class="flex justify-center m-3" />
|
||||
</Suspense>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import LoginQRCode from './LoginQRCode.vue';
|
||||
import LoginQRCode from './LoginQRCode.vue'
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
pre {
|
||||
font-family: monospace;
|
||||
font-weight: bold;
|
||||
font-family: monospace;
|
||||
font-weight: bold;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
<template>
|
||||
<header class="flex flex-row text-center justify-center pt-1">
|
||||
<nav>
|
||||
<router-link to="/">home</router-link>
|
||||
<router-link to="/user" v-if="session.isAuthenticated">user</router-link>
|
||||
<router-link to="/login" v-else href="/login">login</router-link>
|
||||
</nav>
|
||||
</header>
|
||||
<header class="flex flex-row text-center justify-center pt-1">
|
||||
<nav>
|
||||
<router-link to="/">home</router-link>
|
||||
<router-link to="/user" v-if="session.isAuthenticated">user</router-link>
|
||||
<router-link to="/login" v-else href="/login">login</router-link>
|
||||
</nav>
|
||||
</header>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
|
@ -15,26 +15,26 @@ const session = useSession()
|
|||
|
||||
<style scoped>
|
||||
nav {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
a {
|
||||
color: #8787a4;
|
||||
text-decoration: underline;
|
||||
color: #8787a4;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
color: #ffffff;
|
||||
background: #8787A4;
|
||||
color: #ffffff;
|
||||
background: #8787A4;
|
||||
}
|
||||
|
||||
a.selected {
|
||||
color: #ffffff;
|
||||
background: #8787A4;
|
||||
color: #ffffff;
|
||||
background: #8787A4;
|
||||
}
|
||||
|
||||
nav>a {
|
||||
margin: 0 3px;
|
||||
margin: 0 3px;
|
||||
}
|
||||
</style>
|
||||
|
|
Loading…
Reference in New Issue