refactor: 个人自用,移除登录与云同步全链路
站点只给本人用,云乐坊 SSO 授权、收藏/历史云同步、获客归因和账号切换记账都没有收益,却被登录状态检查和同步失败提示持续打扰。 - 删除 useYunlefunAuth / yunlefunAuth / yunlefunSsoConfig / yunlefunAuth 适配器、useUserDataSync / userDataSync / userData 适配器、三个 client 插件与 /auth/callback 回调页 - 抽出 adapters/cloudbase.ts,让「反馈一下」和匿名筛选信号不再依赖登录态;cook-feedback 云函数保留 - 删除 cook-user-data 云函数与 cook_user_data 权限规则,移除 @yunlefun/sso 依赖 - 「我的」页删掉登录按钮、账号卡、四个统计格和退出登录;「关于」页删掉项目作者、致谢名单和上游宣传链接 - 本地收藏/历史与导出导入保留,删除同步专用的 lastUid 记账 取舍见 docs/decisions/0005-drop-login-and-sync.md
This commit is contained in:
@@ -1,116 +0,0 @@
|
||||
<script setup lang="ts">
|
||||
import type { PersonalAcknowledgement } from '~/constants/acknowledgements'
|
||||
import { acknowledgements, personalAcknowledgements } from '~/constants/acknowledgements'
|
||||
|
||||
// 图标映射表(提取为常量以提升性能)
|
||||
const ICON_MAP: Record<string, string> = {
|
||||
github: 'i-ri-github-line',
|
||||
bilibili: 'i-ri-bilibili-line',
|
||||
weibo: 'i-ri-weibo-line',
|
||||
twitter: 'i-ri-twitter-x-line',
|
||||
wechat: 'i-ri-wechat-2-line',
|
||||
blog: 'i-ri-article-line',
|
||||
website: 'i-ri-global-line',
|
||||
email: 'i-ri-mail-line',
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据链接类型返回对应的图标类名
|
||||
*/
|
||||
function getIconClass(type?: string): string {
|
||||
return ICON_MAP[type || 'website'] || 'i-ri-links-line'
|
||||
}
|
||||
|
||||
function getLinkKey(ackIndex: number, linkIndex: number): string {
|
||||
return `link-${ackIndex}-${linkIndex}`
|
||||
}
|
||||
|
||||
function getPersonKey(person: PersonalAcknowledgement, index: number): string {
|
||||
return person.link ? `${person.name}-${person.link}` : `${person.name}-${index}`
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<ion-page>
|
||||
<ion-header>
|
||||
<ion-toolbar>
|
||||
<ion-buttons slot="start">
|
||||
<ion-back-button default-href="/about" />
|
||||
</ion-buttons>
|
||||
<ion-title>致谢</ion-title>
|
||||
</ion-toolbar>
|
||||
</ion-header>
|
||||
|
||||
<ion-content>
|
||||
<!-- 个人致谢名单 -->
|
||||
<ion-list-header>
|
||||
<ion-label class="text-sm op-50">
|
||||
感谢以下朋友在项目早期的支持与帮助
|
||||
</ion-label>
|
||||
</ion-list-header>
|
||||
<ion-list v-if="personalAcknowledgements.length > 0" :inset="true">
|
||||
<!-- 使用 ion-item 展示每个个人 -->
|
||||
<ion-item
|
||||
v-for="(person, index) in personalAcknowledgements"
|
||||
:key="getPersonKey(person, index)"
|
||||
:href="person.link"
|
||||
:target="person.link ? '_blank' : undefined"
|
||||
:button="!!person.link"
|
||||
:detail="!!person.link"
|
||||
lines="full"
|
||||
>
|
||||
<div slot="start" class="h-6 w-6 inline-flex items-center justify-center text-5 color-[var(--ion-color-medium)]" i-ri-user-3-line />
|
||||
<ion-label>
|
||||
<h3 class="m-0 text-[17px] color-[var(--ion-text-color)] font-normal">
|
||||
{{ person.name }}
|
||||
</h3>
|
||||
</ion-label>
|
||||
</ion-item>
|
||||
</ion-list>
|
||||
|
||||
<!-- 团队/组织致谢 -->
|
||||
<template v-for="(ack, index) in acknowledgements" :key="index">
|
||||
<ion-list-header>
|
||||
<ion-label class="tracking-wide uppercase opacity-50 text-[13px]! font-medium!">
|
||||
{{ ack.description }}
|
||||
</ion-label>
|
||||
</ion-list-header>
|
||||
<ion-list :inset="true">
|
||||
<!-- 链接列表 -->
|
||||
<ion-item
|
||||
v-for="(link, linkIndex) in ack.links"
|
||||
:key="getLinkKey(index, linkIndex)"
|
||||
:href="link.href"
|
||||
:target="link.target || '_blank'"
|
||||
:detail="true"
|
||||
button
|
||||
>
|
||||
<div v-if="link.type" slot="start" class="inline-flex" :class="getIconClass(link.type)" />
|
||||
<ion-label>{{ link.label }}</ion-label>
|
||||
</ion-item>
|
||||
</ion-list>
|
||||
</template>
|
||||
|
||||
<!-- 底部说明 -->
|
||||
<div class="px-4 pb-8 pt-4">
|
||||
<p class="m-0 text-center text-[13px] leading-[1.4] opacity-50">
|
||||
感谢所有支持和帮助过本项目的人们 ❤️
|
||||
</p>
|
||||
</div>
|
||||
</ion-content>
|
||||
</ion-page>
|
||||
</template>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
ion-list-header {
|
||||
ion-label {
|
||||
margin-top: 0px;
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
}
|
||||
|
||||
ion-list {
|
||||
margin-top: 8px !important;
|
||||
margin-bottom: 8px !important;
|
||||
}
|
||||
</style>
|
||||
@@ -1,7 +1,7 @@
|
||||
<script setup lang="ts">
|
||||
import { isClient } from '@vueuse/core'
|
||||
import pkg from '~/../package.json'
|
||||
import { icp, links } from '~/constants'
|
||||
import { icp } from '~/constants'
|
||||
|
||||
const displayICP = ref(true)
|
||||
|
||||
@@ -52,14 +52,7 @@ onBeforeMount(() => {
|
||||
<div class="label">
|
||||
<b>Commit Hash</b>
|
||||
</div>
|
||||
<a
|
||||
class="value"
|
||||
:href="`https://github.com/YunYouJun/cook/commit/${commitSha}`"
|
||||
target="_blank"
|
||||
rel="noopener"
|
||||
>
|
||||
{{ commitSha }}
|
||||
</a>
|
||||
<span class="value">{{ commitSha }}</span>
|
||||
</div>
|
||||
<div v-if="displayICP" class="ledger-setting-row">
|
||||
<div class="label">
|
||||
@@ -74,13 +67,12 @@ onBeforeMount(() => {
|
||||
|
||||
<section class="ledger-section">
|
||||
<div class="ledger-section-head">
|
||||
<h2>项目</h2>
|
||||
<h2>数据来源</h2>
|
||||
</div>
|
||||
<div class="ledger-menu">
|
||||
<a href="https://www.bilibili.com/blackboard/dynamic/306882" target="_blank" rel="noopener">
|
||||
<span class="ico"><ion-icon :icon="ioniconsPlayOutline" aria-hidden="true" /></span>
|
||||
<span class="label">数据来源</span>
|
||||
<span class="value">哔哩哔哩</span>
|
||||
<span class="label">哔哩哔哩</span>
|
||||
<span class="chev"><ion-icon :icon="ioniconsChevronForwardOutline" aria-hidden="true" /></span>
|
||||
</a>
|
||||
<a href="https://github.com/YunYouJun/cook" target="_blank" rel="noopener">
|
||||
@@ -89,65 +81,48 @@ onBeforeMount(() => {
|
||||
<span class="value">GitHub</span>
|
||||
<span class="chev"><ion-icon :icon="ioniconsChevronForwardOutline" aria-hidden="true" /></span>
|
||||
</a>
|
||||
<NuxtLink to="/about/me">
|
||||
<span class="ico"><ion-icon :icon="ioniconsPersonOutline" aria-hidden="true" /></span>
|
||||
<span class="label">项目作者</span>
|
||||
<span class="value">云游君</span>
|
||||
<span class="chev"><ion-icon :icon="ioniconsChevronForwardOutline" aria-hidden="true" /></span>
|
||||
</NuxtLink>
|
||||
<NuxtLink to="/about/acknowledgements">
|
||||
<span class="ico"><ion-icon :icon="ioniconsHeartOutline" aria-hidden="true" /></span>
|
||||
<span class="label">致谢名单</span>
|
||||
<span class="chev"><ion-icon :icon="ioniconsChevronForwardOutline" aria-hidden="true" /></span>
|
||||
</NuxtLink>
|
||||
<a :href="links.cook" target="_blank" rel="noopener">
|
||||
<span class="ico"><ion-icon :icon="ioniconsGlobeOutline" aria-hidden="true" /></span>
|
||||
<span class="label">网页版本</span>
|
||||
<span class="value">cook.yunyoujun.cn</span>
|
||||
<span class="chev"><ion-icon :icon="ioniconsChevronForwardOutline" aria-hidden="true" /></span>
|
||||
</a>
|
||||
<a :href="links.yyj.bilibiliOpus" target="_blank" rel="noopener">
|
||||
<span class="ico"><ion-icon :icon="ioniconsMicOutline" aria-hidden="true" /></span>
|
||||
<span class="label">旅程的起点</span>
|
||||
<span class="value">动态</span>
|
||||
<span class="chev"><ion-icon :icon="ioniconsChevronForwardOutline" aria-hidden="true" /></span>
|
||||
</a>
|
||||
<a :href="links.yyj.mpArticle" target="_blank" rel="noopener">
|
||||
<span class="ico"><ion-icon :icon="ioniconsDocumentTextOutline" aria-hidden="true" /></span>
|
||||
<span class="label">关于食用手册的前世今生</span>
|
||||
<span class="value">文章</span>
|
||||
<span class="chev"><ion-icon :icon="ioniconsChevronForwardOutline" aria-hidden="true" /></span>
|
||||
</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ledger-mobile-only">
|
||||
<TheAboutList />
|
||||
<ion-list :inset="true">
|
||||
<ion-item>
|
||||
<ion-label>当前版本</ion-label>
|
||||
<ion-text>v{{ pkg.version }}</ion-text>
|
||||
</ion-item>
|
||||
|
||||
<ion-item>
|
||||
<ion-label>构建时间</ion-label>
|
||||
<ion-text>{{ buildDate }}</ion-text>
|
||||
</ion-item>
|
||||
|
||||
<ion-item v-if="commitSha" :href="`https://github.com/YunYouJun/cook/commit/${commitSha}`" target="_blank">
|
||||
<ion-label>Commit Hash</ion-label>
|
||||
<ion-text>{{ commitSha }}</ion-text>
|
||||
</ion-item>
|
||||
|
||||
<ion-item v-if="displayICP" href="https://beian.miit.gov.cn/" target="_blank">
|
||||
<ion-label>备案号</ion-label>
|
||||
<ion-text>{{ icp }}</ion-text>
|
||||
</ion-item>
|
||||
</ion-list>
|
||||
|
||||
<ion-list :inset="true">
|
||||
<ion-item :href="links.cook" target="_blank">
|
||||
<ion-label>网页版本</ion-label>
|
||||
<ion-text class="inline-flex items-center justify-center">
|
||||
<div class="inline-flex" i-ri-global-line />
|
||||
<span m="l-1" class="inline-flex">cook.yunyoujun.cn</span>
|
||||
</ion-text>
|
||||
</ion-item>
|
||||
|
||||
<ion-item :href="links.yyj.bilibiliOpus" target="_blank">
|
||||
<ion-label>旅程的起点</ion-label>
|
||||
<ion-item href="https://www.bilibili.com/blackboard/dynamic/306882" target="_blank">
|
||||
<ion-label>数据来源</ion-label>
|
||||
<ion-text class="inline-flex items-center justify-center">
|
||||
<div class="inline-flex" i-ri-bilibili-line />
|
||||
<span m="l-1" class="inline-flex">动态</span>
|
||||
<span m="l-1" class="inline-flex">哔哩哔哩</span>
|
||||
</ion-text>
|
||||
</ion-item>
|
||||
|
||||
<ion-item :href="links.yyj.mpArticle" target="_blank">
|
||||
<ion-label>关于食用手册的前世今生</ion-label>
|
||||
<ion-item href="https://github.com/YunYouJun/cook" target="_blank">
|
||||
<ion-label>开源代码</ion-label>
|
||||
<ion-text class="inline-flex items-center justify-center">
|
||||
<div class="inline-flex" i-ri-wechat-2-line />
|
||||
<span m="l-1" class="inline-flex">文章</span>
|
||||
<div class="inline-flex" i-ri-github-line />
|
||||
<span m="l-1" class="inline-flex">GitHub</span>
|
||||
</ion-text>
|
||||
</ion-item>
|
||||
</ion-list>
|
||||
|
||||
@@ -1,52 +0,0 @@
|
||||
<script setup lang="ts">
|
||||
import { links } from '~/constants'
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<ion-page>
|
||||
<ion-header>
|
||||
<ion-toolbar>
|
||||
<ion-buttons slot="start">
|
||||
<ion-back-button default-href="/my" />
|
||||
</ion-buttons>
|
||||
<ion-title>关于作者</ion-title>
|
||||
</ion-toolbar>
|
||||
</ion-header>
|
||||
|
||||
<ion-content>
|
||||
<ion-list :inset="true">
|
||||
<ion-item :href="links.yyj.bilibili" target="_blank">
|
||||
<div slot="start" class="inline-flex" i-ri-bilibili-line />
|
||||
<ion-label>哔哩哔哩</ion-label>
|
||||
<ion-text class="inline-flex items-center justify-center">
|
||||
<span m="l-1" class="inline-flex">云游君</span>
|
||||
</ion-text>
|
||||
</ion-item>
|
||||
|
||||
<ion-item :href="links.yyj.github" target="_blank">
|
||||
<div slot="start" class="inline-flex" i-ri-github-line />
|
||||
<ion-label>GitHub</ion-label>
|
||||
<ion-text class="inline-flex items-center justify-center">
|
||||
<span m="l-1" class="inline-flex">YunYouJun</span>
|
||||
</ion-text>
|
||||
</ion-item>
|
||||
|
||||
<ion-item :href="links.yyj.blog" target="_blank">
|
||||
<div slot="start" class="inline-flex" i-ri-article-line />
|
||||
<ion-label>博客</ion-label>
|
||||
<ion-text class="inline-flex items-center justify-center">
|
||||
云游君的小站
|
||||
</ion-text>
|
||||
</ion-item>
|
||||
|
||||
<ion-item :href="links.yyj.mp" target="_blank">
|
||||
<div slot="start" class="inline-flex" i-ri-wechat-2-line />
|
||||
<ion-label>公众号</ion-label>
|
||||
<ion-text class="inline-flex items-center justify-center">
|
||||
云游君
|
||||
</ion-text>
|
||||
</ion-item>
|
||||
</ion-list>
|
||||
</ion-content>
|
||||
</ion-page>
|
||||
</template>
|
||||
Reference in New Issue
Block a user