Compare commits
No commits in common. "master" and "refactor/nuxtjs" have entirely different histories.
master
...
refactor/n
@ -22,8 +22,8 @@ const { t } = useI18n()
|
|||||||
const projects: { [id: string]: [string, string] } = {
|
const projects: { [id: string]: [string, string] } = {
|
||||||
"solar-network": ["Solar Network", "https://solsynth.dev/products/solar-network"],
|
"solar-network": ["Solar Network", "https://solsynth.dev/products/solar-network"],
|
||||||
"capital": ["Capital", "https://git.solsynth.dev/Goatworks/Capital"],
|
"capital": ["Capital", "https://git.solsynth.dev/Goatworks/Capital"],
|
||||||
"passport": ["HyperNet.Passport", "https://git.solsynth.dev/HyperNet/Passport"],
|
"passport": ["Hydrogen.Passport", "https://git.solsynth.dev/Hydrogen/Passport"],
|
||||||
"paperclip": ["HyperNet.Paperclip", "https://git.solsynth.dev/HyperNet/Paperclip"],
|
"paperclip": ["Hydrogen.Paperclip", "https://git.solsynth.dev/Hydrogen/Paperclip"],
|
||||||
"roadsign": ["RoadSign", "https://git.solsynth.dev/Goatworks/RoadSign"],
|
"roadsign": ["RoadSign", "https://git.solsynth.dev/Goatworks/RoadSign"],
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
@ -35,9 +35,8 @@ As used herein, account number, account, and Solarpass refer to the User's accou
|
|||||||
- Partial deactivation: Partial disabling of the user's rights, e.g. uploading of files, publishing of posts, etc.
|
- Partial deactivation: Partial disabling of the user's rights, e.g. uploading of files, publishing of posts, etc.
|
||||||
- Disablement: The user's entire account and all rights of Solsynth LLC to use other services are disabled. We also reserve the right to delete the relevant data.
|
- Disablement: The user's entire account and all rights of Solsynth LLC to use other services are disabled. We also reserve the right to delete the relevant data.
|
||||||
5. A natural person can register and own only one Solarpass account, and we reserve the right to take action against other sub-accounts of the same User for deletion of data.
|
5. A natural person can register and own only one Solarpass account, and we reserve the right to take action against other sub-accounts of the same User for deletion of data.
|
||||||
6. The transfer and sale of Solarpass accounts are strictly prohibited. If such behavior is discovered, measures will be taken to delete the relevant data immediately.
|
6. If a user opens a sub-account in any way during the penalty period in an attempt to evade the penalty, the sub-account shall be subject to deletion of data and the penalty shall be escalated or the time limit extended, as the case may be.
|
||||||
7. If a user opens a sub-account in any way during the penalty period in an attempt to evade the penalty, the sub-account shall be subject to deletion of data and the penalty shall be escalated or the time limit extended, as the case may be.
|
7. Bot accounts opened through the Developer Portal are not considered sub-accounts. *For more information on the use of bot accounts, please refer to the Developer Rules (/terms/developer-rules).
|
||||||
8. Bot accounts opened through the Developer Portal are not considered sub-accounts. *For more information on the use of bot accounts, please refer to the Developer Rules (/terms/developer-rules).
|
|
||||||
|
|
||||||
## 4. User Generated Content
|
## 4. User Generated Content
|
||||||
|
|
||||||
|
@ -35,9 +35,8 @@ date: 2025-03-19T16:12:21.897Z
|
|||||||
- 部份停权:禁用用户的部份权利,例如上传文件、发布帖子等。
|
- 部份停权:禁用用户的部份权利,例如上传文件、发布帖子等。
|
||||||
- 禁用:禁用用户的整个帐号和所有 Solsynth LLC 使用其他服务的权利。同时我们保留删除相关数据的权利。
|
- 禁用:禁用用户的整个帐号和所有 Solsynth LLC 使用其他服务的权利。同时我们保留删除相关数据的权利。
|
||||||
5. 一个自然人只能注册、拥有一个 Solarpass 帐号,我们有权对其他同用户的子帐号采取删除数据的措施。
|
5. 一个自然人只能注册、拥有一个 Solarpass 帐号,我们有权对其他同用户的子帐号采取删除数据的措施。
|
||||||
6. 关于 Solarpass 帐号的转让、出售是绝对禁止的行为,关于发现相关行为将立即采取删除相关数据的措施。
|
6. 若用户在处罚期间采取任何方式开设子帐号试图逃避处罚,应当对子帐号采取删除数据的措施,并且视情况升级处罚或延长时限。
|
||||||
7. 若用户在处罚期间采取任何方式开设子帐号试图逃避处罚,应当对子帐号采取删除数据的措施,并且视情况升级处罚或延长时限。
|
7. 通过「开发者门户」开设的机器人帐号不属于子帐号范畴。*关于「机器人帐号」的使用规定,详见 [开发者守则](/terms/developer-rules)*
|
||||||
8. 通过「开发者门户」开设的机器人帐号不属于子帐号范畴。*关于「机器人帐号」的使用规定,详见 [开发者守则](/terms/developer-rules)*
|
|
||||||
|
|
||||||
## 4. 用户生成内容
|
## 4. 用户生成内容
|
||||||
|
|
||||||
|
@ -1,35 +1,24 @@
|
|||||||
<template>
|
<template>
|
||||||
<v-app-bar app flat color="surface" class="app-bar-blur">
|
<v-app-bar app flat color="surface" class="app-bar-blur">
|
||||||
<v-container fluid class="mx-auto d-flex align-center justify-center pr-8 relative">
|
<v-container fluid class="mx-auto d-flex align-center justify-center pr-8">
|
||||||
<v-app-bar-nav-icon @click="openDrawer = !openDrawer" class="z-10" />
|
<v-app-bar-nav-icon @click="openDrawer = !openDrawer" />
|
||||||
|
|
||||||
<nuxt-link to="/" exact class="z-10">
|
<nuxt-link to="/" exact>
|
||||||
<h2 v-if="isLargeScreen">Solsynth LLC</h2>
|
<h2>Solsynth LLC</h2>
|
||||||
<v-icon v-else icon="mdi-home" />
|
|
||||||
</nuxt-link>
|
</nuxt-link>
|
||||||
|
|
||||||
<v-spacer></v-spacer>
|
<v-spacer></v-spacer>
|
||||||
|
|
||||||
<div class="absolute left-0 right-0 flex justify-center gap-2 w-screen">
|
<div class="flex gap-2">
|
||||||
<v-btn v-if="isLargeScreen" v-for="item in navItems" :to="item.to" exact :prepend-icon="item.icon">{{
|
<v-btn to="/products" exact prepend-icon="mdi-shape">{{ t("navProducts") }}</v-btn>
|
||||||
t(item.title)
|
<v-btn to="/posts" exact prepend-icon="mdi-note-text">{{ t("navPosts") }}</v-btn>
|
||||||
}}</v-btn>
|
<v-btn to="/gallery" exact prepend-icon="mdi-image-multiple">{{ t("navGallery") }}</v-btn>
|
||||||
<v-menu location="bottom center" v-else>
|
|
||||||
<template v-slot:activator="{ props }">
|
|
||||||
<v-btn v-bind="props" icon="mdi-dots-horizontal-circle" slim size="small" />
|
|
||||||
</template>
|
|
||||||
<v-list nav slim class="w-[280px]">
|
|
||||||
<v-list-item v-for="item in navItems" :to="item.to" :prepend-icon="item.icon">
|
|
||||||
<v-list-item-title>{{ t(item.title) }}</v-list-item-title>
|
|
||||||
</v-list-item>
|
|
||||||
</v-list>
|
|
||||||
</v-menu>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<v-spacer></v-spacer>
|
<v-spacer></v-spacer>
|
||||||
|
|
||||||
<locale-select class="z-10" />
|
<locale-select />
|
||||||
<user-menu class="z-10" />
|
<user-menu />
|
||||||
</v-container>
|
</v-container>
|
||||||
</v-app-bar>
|
</v-app-bar>
|
||||||
|
|
||||||
@ -58,38 +47,9 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { useBreakpoints, breakpointsVuetifyV3 } from "@vueuse/core"
|
|
||||||
|
|
||||||
const { t } = useI18n()
|
const { t } = useI18n()
|
||||||
|
|
||||||
const openDrawer = ref(false)
|
const openDrawer = ref(false)
|
||||||
|
|
||||||
const breakpoints = useBreakpoints(breakpointsVuetifyV3)
|
|
||||||
const isLargeScreen = computed(() => breakpoints.isGreaterOrEqual("md").valueOf())
|
|
||||||
|
|
||||||
interface NavItem {
|
|
||||||
icon: string
|
|
||||||
title: string
|
|
||||||
to: string
|
|
||||||
}
|
|
||||||
|
|
||||||
const navItems: NavItem[] = [
|
|
||||||
{
|
|
||||||
icon: "mdi-shape",
|
|
||||||
title: "navProducts",
|
|
||||||
to: "/products",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
icon: "mdi-note-text",
|
|
||||||
title: "navPosts",
|
|
||||||
to: "/posts",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
icon: "mdi-image-multiple",
|
|
||||||
title: "navGallery",
|
|
||||||
to: "/gallery",
|
|
||||||
},
|
|
||||||
]
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="css" scoped>
|
<style lang="css" scoped>
|
||||||
|
@ -1,6 +0,0 @@
|
|||||||
export default defineNuxtRouteMiddleware((to) => {
|
|
||||||
// No further supported path prefix localization
|
|
||||||
if (to.path.startsWith("/zh-CN")) {
|
|
||||||
return navigateTo(to.fullPath.replace("/zh-CN", ""))
|
|
||||||
}
|
|
||||||
})
|
|
@ -53,8 +53,8 @@ export default defineNuxtConfig({
|
|||||||
},
|
},
|
||||||
|
|
||||||
routeRules: {
|
routeRules: {
|
||||||
"/.well-known/**": {
|
"/.well-known/openid-configuration": {
|
||||||
proxy: "/api/well-known/**",
|
proxy: "/api/well-known/openid-configuration",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -143,12 +143,6 @@ export default defineNuxtConfig({
|
|||||||
transpile: ["vuetify"],
|
transpile: ["vuetify"],
|
||||||
},
|
},
|
||||||
|
|
||||||
umami: {
|
|
||||||
id: "eef151fb-07e2-461b-8b7f-2547aab735d4",
|
|
||||||
host: "https://us.umami.is",
|
|
||||||
autoTrack: true,
|
|
||||||
},
|
|
||||||
|
|
||||||
modules: [
|
modules: [
|
||||||
"@unocss/nuxt",
|
"@unocss/nuxt",
|
||||||
"@nuxt/content",
|
"@nuxt/content",
|
||||||
@ -158,7 +152,6 @@ export default defineNuxtConfig({
|
|||||||
"@nuxtjs/i18n",
|
"@nuxtjs/i18n",
|
||||||
"nuxt-schema-org",
|
"nuxt-schema-org",
|
||||||
"@vueuse/motion/nuxt",
|
"@vueuse/motion/nuxt",
|
||||||
"nuxt-umami",
|
|
||||||
(_options, nuxt) => {
|
(_options, nuxt) => {
|
||||||
nuxt.hooks.hook("vite:extendConfig", (config) => {
|
nuxt.hooks.hook("vite:extendConfig", (config) => {
|
||||||
// @ts-expect-error
|
// @ts-expect-error
|
||||||
@ -167,6 +160,10 @@ export default defineNuxtConfig({
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|
||||||
|
gtag: {
|
||||||
|
id: "G-ZFJ7RX0JXF",
|
||||||
|
},
|
||||||
|
|
||||||
vite: {
|
vite: {
|
||||||
vue: {
|
vue: {
|
||||||
template: {
|
template: {
|
||||||
|
@ -18,13 +18,11 @@
|
|||||||
"@nuxtjs/sitemap": "^6.1.5",
|
"@nuxtjs/sitemap": "^6.1.5",
|
||||||
"@octokit/rest": "^21.1.1",
|
"@octokit/rest": "^21.1.1",
|
||||||
"@pinia/nuxt": "^0.5.5",
|
"@pinia/nuxt": "^0.5.5",
|
||||||
"@vueuse/core": "^13.0.0",
|
|
||||||
"@vueuse/motion": "^3.0.3",
|
"@vueuse/motion": "^3.0.3",
|
||||||
"feed": "^4.2.2",
|
"feed": "^4.2.2",
|
||||||
"nuxt": "^3.16.0",
|
"nuxt": "^3.16.0",
|
||||||
"nuxt-gtag": "^2.1.0",
|
"nuxt-gtag": "^2.1.0",
|
||||||
"nuxt-schema-org": "^3.5.0",
|
"nuxt-schema-org": "^3.5.0",
|
||||||
"nuxt-umami": "3.2.0",
|
|
||||||
"pinia": "^2.3.1",
|
"pinia": "^2.3.1",
|
||||||
"rehype-sanitize": "^6.0.0",
|
"rehype-sanitize": "^6.0.0",
|
||||||
"rehype-stringify": "^10.0.1",
|
"rehype-stringify": "^10.0.1",
|
||||||
|
@ -46,8 +46,8 @@
|
|||||||
<span>Solar Network Attachment Web Preview</span>
|
<span>Solar Network Attachment Web Preview</span>
|
||||||
<span
|
<span
|
||||||
>Powered by
|
>Powered by
|
||||||
<a class="underline" target="_blank" href="https://git.solsynth.dev/HyperNet/Paperclip"
|
<a class="underline" target="_blank" href="https://git.solsynth.dev/Hydrogen/Paperclip"
|
||||||
>HyperNet.Paperclip</a
|
>Hydrogen.Paperclip</a
|
||||||
></span
|
></span
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
enter: {
|
enter: {
|
||||||
y: 0,
|
y: 0,
|
||||||
opacity: 1,
|
opacity: 1,
|
||||||
transition: { duration: 0.8 },
|
transition: { duration: 0.8 }
|
||||||
},
|
},
|
||||||
}"
|
}"
|
||||||
:src="Logo"
|
:src="Logo"
|
||||||
@ -107,13 +107,11 @@ const { data: products } = await useAsyncData("products", () => {
|
|||||||
const canvasRef = ref(null)
|
const canvasRef = ref(null)
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
const isDarkMode = window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches
|
|
||||||
|
|
||||||
const canvas: HTMLCanvasElement = canvasRef.value!
|
const canvas: HTMLCanvasElement = canvasRef.value!
|
||||||
const ctx = canvas.getContext("2d")!
|
const ctx = canvas.getContext("2d")!
|
||||||
const dpr = window.devicePixelRatio || 1
|
const dpr = window.devicePixelRatio || 1;
|
||||||
canvas.width = window.innerWidth * dpr
|
canvas.width = window.innerWidth * dpr;
|
||||||
canvas.height = window.innerHeight * dpr
|
canvas.height = window.innerHeight * dpr;
|
||||||
|
|
||||||
let particles: Particle[] = []
|
let particles: Particle[] = []
|
||||||
const numParticles = 100
|
const numParticles = 100
|
||||||
@ -141,10 +139,10 @@ onMounted(() => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
draw() {
|
draw() {
|
||||||
ctx.beginPath()
|
ctx.beginPath();
|
||||||
ctx.arc(this.x * dpr, this.y * dpr, this.size * dpr, 0, Math.PI * 2)
|
ctx.arc(this.x * dpr, this.y * dpr, this.size * dpr, 0, Math.PI * 2);
|
||||||
ctx.fillStyle = isDarkMode ? "rgba(255, 255, 255, 0.8)" : "rgba(0, 0, 0, 0.8)"
|
ctx.fillStyle = 'rgba(255, 255, 255, 0.8)';
|
||||||
ctx.fill()
|
ctx.fill();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -158,17 +156,17 @@ onMounted(() => {
|
|||||||
function drawLines() {
|
function drawLines() {
|
||||||
for (let i = 0; i < particles.length; i++) {
|
for (let i = 0; i < particles.length; i++) {
|
||||||
for (let j = i + 1; j < particles.length; j++) {
|
for (let j = i + 1; j < particles.length; j++) {
|
||||||
let dx = particles[i].x - particles[j].x
|
let dx = particles[i].x - particles[j].x;
|
||||||
let dy = particles[i].y - particles[j].y
|
let dy = particles[i].y - particles[j].y;
|
||||||
let distance = Math.sqrt(dx * dx + dy * dy)
|
let distance = Math.sqrt(dx * dx + dy * dy);
|
||||||
|
|
||||||
if (distance < 100) {
|
if (distance < 100) {
|
||||||
ctx.beginPath()
|
ctx.beginPath();
|
||||||
ctx.moveTo(particles[i].x * dpr, particles[i].y * dpr)
|
ctx.moveTo(particles[i].x * dpr, particles[i].y * dpr);
|
||||||
ctx.lineTo(particles[j].x * dpr, particles[j].y * dpr)
|
ctx.lineTo(particles[j].x * dpr, particles[j].y * dpr);
|
||||||
ctx.strokeStyle = isDarkMode ? "rgba(255, 255, 255, 0.2)" : "rgba(0, 0, 0, 0.2)"
|
ctx.strokeStyle = 'rgba(255, 255, 255, 0.2)';
|
||||||
ctx.lineWidth = 0.5 * dpr
|
ctx.lineWidth = 0.5 * dpr;
|
||||||
ctx.stroke()
|
ctx.stroke();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -6,34 +6,25 @@
|
|||||||
<div class="my-5 mx-4 flex flex-row gap-4">
|
<div class="my-5 mx-4 flex flex-row gap-4">
|
||||||
<v-avatar :image="urlOfAvatar" />
|
<v-avatar :image="urlOfAvatar" />
|
||||||
<div class="flex flex-col">
|
<div class="flex flex-col">
|
||||||
<span
|
<span>{{ account?.nick }} <span class="text-xs">@{{ account?.name }}</span></span>
|
||||||
>{{ account?.nick }} <span class="text-xs">@{{ account?.name }}</span></span
|
<span class="text-sm">{{ account?.description }}</span>
|
||||||
>
|
|
||||||
<p>
|
|
||||||
{{ accountStatus.status ? accountStatus.status.label : accountStatus["is_online"] ? "Online" : "Offline" }}
|
|
||||||
</p>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="mb-7">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
<v-row>
|
<v-row>
|
||||||
<v-col cols="12" lg="8">
|
<v-col row="12" lg="8">
|
||||||
<v-card>
|
<post-list class="mx-[-2.5ch] mt-[-16px]" v-if="account" :author="account.name" />
|
||||||
<v-card-text v-if="accountPageStatus.valueOf() === 'success'">
|
|
||||||
<div class="prose prose-sm" style="max-width: unset">
|
|
||||||
<m-d-c :value="accountPage.content" />
|
|
||||||
</div>
|
|
||||||
</v-card-text>
|
|
||||||
<v-card-text v-else>
|
|
||||||
<p class="font-italic">The user has no account page.</p>
|
|
||||||
</v-card-text>
|
|
||||||
</v-card>
|
|
||||||
</v-col>
|
</v-col>
|
||||||
<v-col cols="12" lg="4" order="first" order-lg="last">
|
<v-col row="12" lg="4" order="first" order-lg="last">
|
||||||
<div class="sticky top-0 h-fit">
|
<div class="sticky top-0 h-fit">
|
||||||
<v-card prepend-icon="mdi-identifier" title="About">
|
<v-card prepend-icon="mdi-identifier" title="About">
|
||||||
<v-card-text>
|
<v-card-text>
|
||||||
<p><b>Description</b></p>
|
<p><b>Description</b></p>
|
||||||
<p>{{ account?.profile.description }}</p>
|
<p>{{ account.description }}</p>
|
||||||
<p class="mt-3"><b>Joined At</b></p>
|
<p class="mt-3"><b>Joined At</b></p>
|
||||||
<p>{{ new Date(account.created_at).toLocaleString() }}</p>
|
<p>{{ new Date(account.created_at).toLocaleString() }}</p>
|
||||||
</v-card-text>
|
</v-card-text>
|
||||||
@ -50,6 +41,8 @@ const { t } = useI18n()
|
|||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
const config = useRuntimeConfig()
|
const config = useRuntimeConfig()
|
||||||
|
|
||||||
|
const tab = ref(1)
|
||||||
|
|
||||||
const { data: account } = await useFetch<any>(`${config.public.solarNetworkApi}/cgi/id/users/${route.params.name}`)
|
const { data: account } = await useFetch<any>(`${config.public.solarNetworkApi}/cgi/id/users/${route.params.name}`)
|
||||||
|
|
||||||
if (account.value == null) {
|
if (account.value == null) {
|
||||||
@ -59,17 +52,6 @@ if (account.value == null) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
const { data: accountPage, status: accountPageStatus } = await useFetch<any>(
|
const urlOfAvatar = computed(() => account.value?.avatar ? `${config.public.solarNetworkApi}/cgi/uc/attachments/${account.value.avatar}` : void 0)
|
||||||
`${config.public.solarNetworkApi}/cgi/id/users/${route.params.name}/page`,
|
const urlOfBanner = computed(() => account.value?.banner ? `${config.public.solarNetworkApi}/cgi/uc/attachments/${account.value.banner}` : void 0)
|
||||||
)
|
|
||||||
const { data: accountStatus, status: accountStatusStatus } = await useFetch<any>(
|
|
||||||
`${config.public.solarNetworkApi}/cgi/id/users/${route.params.name}/status`,
|
|
||||||
)
|
|
||||||
|
|
||||||
const urlOfAvatar = computed(() =>
|
|
||||||
account.value?.avatar ? `${config.public.solarNetworkApi}/cgi/uc/attachments/${account.value.avatar}` : void 0,
|
|
||||||
)
|
|
||||||
const urlOfBanner = computed(() =>
|
|
||||||
account.value?.banner ? `${config.public.solarNetworkApi}/cgi/uc/attachments/${account.value.banner}` : void 0,
|
|
||||||
)
|
|
||||||
</script>
|
</script>
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
<v-avatar :image="urlOfAvatar" />
|
<v-avatar :image="urlOfAvatar" />
|
||||||
<div class="flex flex-col">
|
<div class="flex flex-col">
|
||||||
<span>{{ auth.userinfo?.nick }} <span class="text-xs">@{{ auth.userinfo?.name }}</span></span>
|
<span>{{ auth.userinfo?.nick }} <span class="text-xs">@{{ auth.userinfo?.name }}</span></span>
|
||||||
<span class="text-sm">{{ auth.userinfo?.profile?.description }}</span>
|
<span class="text-sm">{{ auth.userinfo?.description }}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -39,7 +39,7 @@
|
|||||||
</v-card-text>
|
</v-card-text>
|
||||||
</v-card>
|
</v-card>
|
||||||
|
|
||||||
<v-card class="w-28 aspect-square" href="https://kb.solsynth.dev" target="_blank">
|
<v-card class="w-28 aspect-square" to="/docs">
|
||||||
<v-card-text class="flex flex-col justify-center items-center text-center h-full">
|
<v-card-text class="flex flex-col justify-center items-center text-center h-full">
|
||||||
<v-icon icon="mdi-library" size="32" />
|
<v-icon icon="mdi-library" size="32" />
|
||||||
<span class="text-sm mt-1.75">Knowledge Base</span>
|
<span class="text-sm mt-1.75">Knowledge Base</span>
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 15 KiB |
Binary file not shown.
Before Width: | Height: | Size: 15 KiB |
Binary file not shown.
Before Width: | Height: | Size: 18 KiB |
@ -5,7 +5,7 @@ export default defineSitemapEventHandler(async () => {
|
|||||||
const result = await res.json()
|
const result = await res.json()
|
||||||
|
|
||||||
return result.data.map((item: any) => asSitemapUrl({
|
return result.data.map((item: any) => asSitemapUrl({
|
||||||
loc: item.alias ? `/posts/${item.alias_prefix}/${item.alias}` : `/posts/${item.id}`,
|
loc: item.alias ? `/posts/${item.area_alias}/${item.alias}` : `/posts/${item.id}`,
|
||||||
lastmod: item.edited_at ?? item.published_at,
|
lastmod: item.edited_at ?? item.published_at,
|
||||||
priority: 0.7,
|
priority: 0.7,
|
||||||
_sitemap: "posts",
|
_sitemap: "posts",
|
||||||
|
@ -1,9 +0,0 @@
|
|||||||
import { defineEventHandler } from 'h3'
|
|
||||||
|
|
||||||
export default defineEventHandler(async () => {
|
|
||||||
const config = useRuntimeConfig();
|
|
||||||
|
|
||||||
const resp = await fetch(`${config.public.solarNetworkApi}/cgi/id/well-known/jwks`)
|
|
||||||
|
|
||||||
return await resp.json()
|
|
||||||
})
|
|
@ -1,20 +1,31 @@
|
|||||||
import { defineEventHandler } from 'h3'
|
export default defineEventHandler((event) => {
|
||||||
|
const config = useRuntimeConfig()
|
||||||
|
|
||||||
export default defineEventHandler(async () => {
|
return {
|
||||||
const config = useRuntimeConfig();
|
"authorization_endpoint": `${config.public.siteUrl}/auth/authorize`,
|
||||||
const siteUrl = config.public.siteUrl
|
"grant_types_supported": [
|
||||||
|
"authorization_code",
|
||||||
const resp = await fetch(`${config.public.solarNetworkApi}/cgi/id/well-known/openid-configuration`)
|
"implicit",
|
||||||
const out: Record<string, any> = await resp.json()
|
"refresh_token",
|
||||||
|
],
|
||||||
out['authorization_endpoint'] = `${siteUrl}/auth/authorize`
|
"id_token_signing_alg_values_supported": [
|
||||||
out['jwks_uri'] = `${siteUrl}/.well-known/jwks`
|
"HS512",
|
||||||
|
],
|
||||||
for (const [k, v] of Object.entries(out)) {
|
"issuer": config.public.siteUrl,
|
||||||
if (typeof v === 'string' && v.startsWith('https://id.solsynth.dev/api')) {
|
"response_types_supported": [
|
||||||
out[k] = v.replace('https://id.solsynth.dev/api', `${config.public.solarNetworkApi}/cgi/id`)
|
"code",
|
||||||
}
|
"token",
|
||||||
|
],
|
||||||
|
"subject_types_supported": [
|
||||||
|
"public",
|
||||||
|
],
|
||||||
|
"token_endpoint": `${config.public.solarNetworkApi}/cgi/id/auth/token`,
|
||||||
|
"token_endpoint_auth_methods_supported": [
|
||||||
|
"client_secret_post",
|
||||||
|
],
|
||||||
|
"token_endpoint_auth_signing_alg_values_supported": [
|
||||||
|
"HS512",
|
||||||
|
],
|
||||||
|
"userinfo_endpoint": `${config.public.solarNetworkApi}/cgi/id/users/me`,
|
||||||
}
|
}
|
||||||
|
})
|
||||||
return out
|
|
||||||
})
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user