✨ Fit Hydrogen.Identity
This commit is contained in:
parent
a229faf013
commit
ad863b4844
@ -2,9 +2,9 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<link rel="icon" href="/favicon.svg">
|
||||
<link rel="icon" type="image/xml+svg" href="/favicon.svg">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Goatplaza</title>
|
||||
<title>Solarplaza</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
|
File diff suppressed because one or more lines are too long
Before Width: | Height: | Size: 8.1 KiB After Width: | Height: | Size: 51 KiB |
@ -11,15 +11,19 @@
|
||||
|
||||
<v-divider class="mt-2 mb-3 border-opacity-50 mx-[-1rem]" />
|
||||
|
||||
<v-btn block prepend-icon="mdi-pencil" variant="plain" @click="leaveComment">Leave your comment</v-btn>
|
||||
<v-btn block prepend-icon="mdi-pencil" variant="plain" :disabled="!id.userinfo.isLoggedIn" @click="leaveComment">
|
||||
Leave your comment
|
||||
</v-btn>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { request } from "@/scripts/request"
|
||||
import { reactive, ref, watch } from "vue"
|
||||
import { useEditor } from "@/stores/editor"
|
||||
import { useUserinfo } from "@/stores/userinfo"
|
||||
import PostItem from "@/components/posts/PostItem.vue"
|
||||
|
||||
const id = useUserinfo()
|
||||
const editor = useEditor()
|
||||
|
||||
const props = defineProps<{
|
||||
|
@ -5,7 +5,7 @@
|
||||
color="grey-lighten-2"
|
||||
icon="mdi-account-circle"
|
||||
class="rounded-card"
|
||||
:src="props.item?.author.avatar"
|
||||
:image="props.item?.author.avatar"
|
||||
/>
|
||||
</div>
|
||||
|
||||
|
@ -12,7 +12,9 @@
|
||||
|
||||
<v-menu v-if="!props.readonly" location="bottom center">
|
||||
<template v-slot:activator="{ props: binding }">
|
||||
<v-chip v-bind="binding" :size="props.size" prepend-icon="mdi-emoticon-plus"> React </v-chip>
|
||||
<v-chip v-if="id.userinfo.isLoggedIn" v-bind="binding" :size="props.size" prepend-icon="mdi-emoticon-plus">
|
||||
React
|
||||
</v-chip>
|
||||
</template>
|
||||
|
||||
<v-list density="compact" lines="one">
|
||||
@ -35,9 +37,11 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { request } from "@/scripts/request"
|
||||
import { getAtk } from "@/stores/userinfo"
|
||||
import { getAtk, useUserinfo } from "@/stores/userinfo"
|
||||
import { reactive, ref } from "vue"
|
||||
|
||||
const id = useUserinfo()
|
||||
|
||||
const emits = defineEmits(["update"])
|
||||
const props = defineProps<{
|
||||
size?: string
|
||||
|
@ -4,10 +4,25 @@
|
||||
<v-list>
|
||||
<v-list-item :subtitle="username" :title="nickname">
|
||||
<template #prepend>
|
||||
<v-avatar icon="mdi-account-circle" :src="id.userinfo.data?.avatar" />
|
||||
<v-avatar icon="mdi-account-circle" :image="id.userinfo.data?.avatar" />
|
||||
</template>
|
||||
<template #append>
|
||||
<v-btn icon="mdi-menu-down" size="small" variant="text"></v-btn>
|
||||
<v-menu v-if="id.userinfo.isLoggedIn">
|
||||
<template #activator="{ props }">
|
||||
<v-btn v-bind="props" icon="mdi-menu-down" size="small" variant="text" />
|
||||
</template>
|
||||
|
||||
<v-list density="compact">
|
||||
<v-list-item
|
||||
title="Solarpass"
|
||||
prepend-icon="mdi-passport-biometric"
|
||||
target="_blank"
|
||||
:href="passportUrl"
|
||||
/>
|
||||
</v-list>
|
||||
</v-menu>
|
||||
|
||||
<v-btn v-else icon="mdi-login-variant" size="small" variant="text" :href="signinUrl" />
|
||||
</template>
|
||||
</v-list-item>
|
||||
</v-list>
|
||||
@ -28,7 +43,7 @@
|
||||
<v-app-bar-nav-icon variant="text" @click.stop="toggleDrawer" />
|
||||
|
||||
<router-link :to="{ name: 'explore' }">
|
||||
<h2 class="ml-2 text-lg font-500">Goatplaza</h2>
|
||||
<h2 class="ml-2 text-lg font-500">Solarplaza</h2>
|
||||
</router-link>
|
||||
|
||||
<v-spacer />
|
||||
@ -54,7 +69,15 @@
|
||||
transition="scroll-y-reverse-transition"
|
||||
>
|
||||
<template v-slot:activator="{ props }">
|
||||
<v-fab v-bind="props" class="editor-fab" icon="mdi-pencil" color="primary" size="64" appear />
|
||||
<v-fab
|
||||
v-bind="props"
|
||||
appear
|
||||
class="editor-fab"
|
||||
icon="mdi-pencil"
|
||||
color="primary"
|
||||
size="64"
|
||||
:active="id.userinfo.isLoggedIn"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<div class="flex flex-col items-center gap-4 mb-4">
|
||||
@ -70,6 +93,7 @@
|
||||
import { computed, ref } from "vue"
|
||||
import { useEditor } from "@/stores/editor"
|
||||
import { useUserinfo } from "@/stores/userinfo"
|
||||
import { useWellKnown } from "@/stores/wellKnown"
|
||||
import PostAction from "@/components/publish/PostAction.vue"
|
||||
|
||||
const id = useUserinfo()
|
||||
@ -93,6 +117,17 @@ const nickname = computed(() => {
|
||||
|
||||
id.readProfiles()
|
||||
|
||||
const meta = useWellKnown()
|
||||
|
||||
const signinUrl = computed(() => {
|
||||
return meta.wellKnown?.components?.identity + `/auth/sign-in?redirect_uri=${encodeURIComponent(location.href)}`
|
||||
})
|
||||
const passportUrl = computed(() => {
|
||||
return meta.wellKnown?.components?.identity
|
||||
})
|
||||
|
||||
meta.readWellKnown()
|
||||
|
||||
const drawerOpen = ref(true)
|
||||
|
||||
function toggleDrawer() {
|
||||
|
@ -3,7 +3,7 @@ import { defineStore } from "pinia"
|
||||
import { ref } from "vue"
|
||||
|
||||
export const useWellKnown = defineStore("well-known", () => {
|
||||
const wellKnown = ref({})
|
||||
const wellKnown = ref<any>(null)
|
||||
|
||||
async function readWellKnown() {
|
||||
const res = await request("/.well-known")
|
||||
|
@ -9,7 +9,7 @@
|
||||
color="grey-lighten-2"
|
||||
icon="mdi-account-circle"
|
||||
class="rounded-card"
|
||||
:src="post?.author.avatar"
|
||||
:image="post?.author.avatar"
|
||||
/>
|
||||
|
||||
<div>
|
||||
|
@ -1,6 +1,6 @@
|
||||
debug = true
|
||||
|
||||
name = "Goatplaza"
|
||||
name = "Solarplaza"
|
||||
maintainer = "SmartSheep Studio"
|
||||
|
||||
bind = "0.0.0.0:8445"
|
||||
@ -10,7 +10,7 @@ secret = "LtTjzAGFLshwXhN4ZD4nG5KlMv1MWcsvfv03TSZYnT1VhiAnLIZFTnHUwR0XhGgi"
|
||||
content = "uploads"
|
||||
|
||||
[identity]
|
||||
client_id = "goatplaza"
|
||||
client_id = "solarplaza"
|
||||
client_secret = "Z9k9AFTj^p"
|
||||
endpoint = "http://localhost:8444"
|
||||
grpc_endpoint = "127.0.0.1:7444"
|
||||
|
Loading…
Reference in New Issue
Block a user