feat: 基础版不再限制流水线数量

This commit is contained in:
xiaojunnuo
2024-12-23 23:33:13 +08:00
parent bb4910f4e5
commit cb27d4b490
16 changed files with 158 additions and 62 deletions
@@ -229,27 +229,41 @@ function openUpgrade() {
const vipTypeDefine = {
free: {
title: "基础版",
desc: "免费使用",
desc: "社区免费版",
type: "free",
privilege: ["证书申请功能无限制", "证书流水线数量无限制", "常用的主机、云平台、cdn等部署插件"]
privilege: ["证书申请无限制", "域名数量无限制", "证书流水线数量无限制", "常用的主机、云平台、cdn等部署插件", "邮件、webhook通知方式"]
},
plus: {
title: "专业版",
desc: "功能增强,适用于个人企业内部使用",
desc: "开源需要您的赞助支持",
type: "plus",
privilege: ["可加VIP群,需求优先实现", "宝塔、群晖、1Panel、易盾等部署插件", "站点证书监控", "更多通知种类"],
privilege: ["可加VIP群,需求优先实现", "站点证书监控无限制", "更多通知方式", "更多强大部署插件,宝塔、群晖、1Panel等"],
trial: {
title: "7天试用",
title: "点击获取7天试用",
click: () => {
openStarModal();
}
},
price: 29.9,
get() {
return (
<a-tooltip title="爱发电赞助“VIP会员”后获取一年期专业版激活码,开源需要您的支持">
<a-button size="small" type="primary" href="https://afdian.com/a/greper" target="_blank">
爱发电赞助后获取
</a-button>
</a-tooltip>
);
}
},
comm: {
title: "商业版",
desc: "商业授权,可对外运营",
type: "comm",
privilege: ["拥有专业版所有特权", "允许商用,可修改logo、标题", "数据统计", "插件管理", "多用户无限制", "支持用户支付(敬请期待)"]
privilege: ["拥有专业版所有特权", "允许商用,可修改logo、标题", "数据统计", "插件管理", "多用户无限制", "支持用户支付"],
price: 399,
get() {
return <a-button size="small">请联系作者获取</a-button>;
}
}
};
@@ -260,28 +274,16 @@ function openUpgrade() {
},
maskClosable: true,
okText: "激活",
width: 900,
width: 1000,
content: () => {
let activationCodeGetWay: any = null;
if (settingStore.siteEnv.agent.enabled != null) {
const agent = settingStore.siteEnv.agent;
if (agent.enabled === false) {
activationCodeGetWay = (
<span>
<a href="https://afdian.com/a/greper" target="_blank">
爱发电赞助VIP会员¥29.9后获取一年期专业版激活码
</a>
<span> 商业版请直接联系作者</span>
</span>
);
} else {
activationCodeGetWay = (
<a href={agent.contactLink} target="_blank">
{agent.contactText}
</a>
);
}
}
let activationCodeGetWay = (
<span>
<a href="https://afdian.com/a/greper" target="_blank">
爱发电赞助VIP会员后获取一年期专业版激活码
</a>
<span> 商业版请直接联系作者</span>
</span>
);
const vipLabel = settingStore.vipLabel;
const slots = [];
for (const key in vipTypeDefine) {
@@ -301,15 +303,31 @@ function openUpgrade() {
</span>
)}
</h3>
<div>{item.desc}</div>
<ul>
<div style="color:green">{item.desc}</div>
<ul class="flex-1">
{item.privilege.map((p: string) => (
<li>
<li class="flex-baseline">
<fs-icon class="color-green" icon="ion:checkmark-sharp" />
{p}
</li>
))}
</ul>
<div class="footer flex-between flex-vc">
<div class="price-show">
{item.price && (
<span>
<span class="price-text">¥{item.price}</span>
/
</span>
)}
{!item.price && (
<span>
<span class="price-text">免费</span>
</span>
)}
</div>
<div class="get-show">{item.get && <div>{item.get()}</div>}</div>
</div>
</div>
</a-col>
);
@@ -372,10 +390,12 @@ onMounted(() => {
.vip-active-modal {
.vip-block {
display: flex;
flex-direction: column;
padding: 10px;
border: 1px solid #eee;
border-radius: 5px;
height: 195px;
height: 250px;
//background-color: rgba(250, 237, 167, 0.79);
&.current {
border-color: green;
@@ -389,6 +409,16 @@ onMounted(() => {
font-wight: 400;
}
}
.footer {
padding-top: 5px;
margin-top: 0px;
border-top: 1px solid #eee;
.price-text {
font-size: 18px;
color: red;
}
}
}
ul {
@@ -46,10 +46,6 @@ export const certdResources = [
path: "/certd/monitor/site",
component: "/certd/monitor/site/index.vue",
meta: {
show: () => {
const settingStore = useSettingStore();
return settingStore.isPlus;
},
icon: "ion:videocam-outline",
auth: true
}
@@ -160,7 +160,7 @@ export const useSettingStore = defineStore({
async checkUrlBound() {
const userStore = useUserStore();
const settingStore = useSettingStore();
if (!userStore.isAdmin || !settingStore.isPlus) {
if (!userStore.isAdmin) {
return;
}
+11 -1
View File
@@ -54,15 +54,25 @@ h1, h2, h3, h4, h5, h6 {
justify-content: center;
align-items: center;
}
.flex-vc{
align-items: center;
}
.flex-vb{
align-items: baseline;
}
.flex-o {
display: flex !important;
align-items: center;
}
.flex-baseline{
display: flex !important;
align-items: baseline;
}
.flex-between {
display: flex;
justify-content: space-between;
align-items: baseline;
}
.flex {
@@ -23,8 +23,10 @@
</a-tag>
</a-badge>
</template>
<a-divider type="vertical" />
<suite-card class="m-0"></suite-card>
<template v-if="settingsStore.isComm">
<a-divider type="vertical" />
<suite-card class="m-0"></suite-card>
</template>
</div>
</div>
</div>
@@ -92,7 +94,7 @@
<a-row :gutter="10">
<a-col v-for="item of pluginGroups.groups.all.plugins" :key="item.name" class="plugin-item-col" :span="4">
<a-card>
<a-tooltip :title="item.desc">
<a-tooltip :title="item.desc" class="flex-between">
<div class="plugin-item pointer">
<div class="icon">
<fs-icon :icon="item.icon" class="font-size-16 color-blue" />
@@ -101,6 +103,7 @@
<div class="title">{{ item.title }}</div>
</div>
</div>
<div class="flex-o"><vip-button v-if="item.needPlus" mode="icon" class="" /></div>
</a-tooltip>
</a-card>
</a-col>
@@ -158,7 +161,7 @@ const settingStore = useSettingStore();
const siteInfo: Ref<SiteInfo> = computed(() => {
return settingStore.siteInfo;
});
const settingsStore = useSettingStore();
const userStore = useUserStore();
const userInfo: ComputedRef<UserInfoRes> = computed(() => {
return userStore.getUserInfo;
@@ -1,5 +1,5 @@
<template>
<div class="my-suite-card">
<div v-if="detail.enabled" class="my-suite-card">
<div class="flex-o">
<a-popover>
<template #content>
@@ -52,6 +52,7 @@ type SuiteValue = {
used: number;
};
type SuiteDetail = {
enabled?: boolean;
suites?: any[];
expiresTime?: number;
pipelineCount?: SuiteValue;