lint
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue'
|
||||
import { ref } from "vue"
|
||||
|
||||
import { useATProtoLogin } from '@/hooks/useATProtoLogin.hook'
|
||||
import { useATProtoLogin } from "@/hooks/useATProtoLogin.hook"
|
||||
|
||||
const { handle, isLoggedIn, signIn, signOut } = useATProtoLogin()
|
||||
|
||||
const inputHandle = ref('')
|
||||
const inputHandle = ref("")
|
||||
|
||||
const onSignIn = () => {
|
||||
if (inputHandle.value) {
|
||||
@@ -24,7 +24,7 @@ const onSignIn = () => {
|
||||
v-model="inputHandle"
|
||||
class="input input-sm"
|
||||
type="text"
|
||||
placeholder="yourhandle.bsky.social"
|
||||
placeholder="alice.bsky.social"
|
||||
@keyup.enter="onSignIn"
|
||||
/>
|
||||
<button class="btn btn-sm" @click="onSignIn">Sign in with Bluesky</button>
|
||||
|
||||
@@ -1,9 +1,12 @@
|
||||
import { BrowserOAuthClient, buildLoopbackClientId } from '@atproto/oauth-client-browser'
|
||||
import {
|
||||
BrowserOAuthClient,
|
||||
buildLoopbackClientId,
|
||||
} from "@atproto/oauth-client-browser"
|
||||
|
||||
const getClientId = () =>
|
||||
import.meta.env.DEV
|
||||
? buildLoopbackClientId(new URL(window.location.origin))
|
||||
: 'https://remanso.space/client-metadata.json'
|
||||
: "https://remanso.space/client-metadata.json"
|
||||
|
||||
let clientPromise: Promise<BrowserOAuthClient> | null = null
|
||||
|
||||
@@ -11,7 +14,7 @@ export const getOAuthClient = (): Promise<BrowserOAuthClient> => {
|
||||
if (!clientPromise) {
|
||||
clientPromise = BrowserOAuthClient.load({
|
||||
clientId: getClientId(),
|
||||
handleResolver: 'https://bsky.social',
|
||||
handleResolver: "https://bsky.social",
|
||||
})
|
||||
}
|
||||
return clientPromise
|
||||
|
||||
Reference in New Issue
Block a user