chore: vip label translate

pull/453/head
xiaojunnuo 2025-06-29 17:41:54 +08:00
parent 2d1504a057
commit 3fb3cee423
7 changed files with 25 additions and 9 deletions

View File

@ -65,7 +65,6 @@ async function addItem() {
return; return;
} }
debugger;
if (emails.value.find(item => item.value === email)) { if (emails.value.find(item => item.value === email)) {
notification.warning({ notification.warning({
message: "此邮箱已存在", message: "此邮箱已存在",

View File

@ -287,7 +287,7 @@ function openUpgrade() {
}, },
maskClosable: true, maskClosable: true,
okText: t("vip.activate"), okText: t("vip.activate"),
width: 1000, width: 1100,
content: () => { content: () => {
let activationCodeGetWay = ( let activationCodeGetWay = (
<span> <span>
@ -419,7 +419,7 @@ onMounted(() => {
padding: 10px; padding: 10px;
border: 1px solid #eee; border: 1px solid #eee;
border-radius: 5px; border-radius: 5px;
height: 250px; height: 275px;
//background-color: rgba(250, 237, 167, 0.79); //background-color: rgba(250, 237, 167, 0.79);
&.current { &.current {

View File

@ -1,4 +1,9 @@
export default { export default {
label: {
comm: "Business Edition",
plus: "Professional Edition",
free: "Basic Edition",
},
comm: { comm: {
name: "{vipLabel} Activated", name: "{vipLabel} Activated",
title: "Expires on: {expire}", title: "Expires on: {expire}",

View File

@ -1,4 +1,9 @@
export default { export default {
label: {
comm: "商业版",
plus: "专业版",
free: "基础版",
},
comm: { comm: {
name: "{vipLabel}已开通", name: "{vipLabel}已开通",
title: "到期时间:{expire}", title: "到期时间:{expire}",

View File

@ -10,7 +10,7 @@ import { updatePreferences } from "/@/vben/preferences";
import { useTitle } from "@vueuse/core"; import { useTitle } from "@vueuse/core";
import { utils } from "/@/utils"; import { utils } from "/@/utils";
import { cloneDeep, merge } from "lodash-es"; import { cloneDeep, merge } from "lodash-es";
import { useI18n } from "/src/locales";
export interface SettingState { export interface SettingState {
sysPublic?: SysPublicSetting; sysPublic?: SysPublicSetting;
installInfo?: { installInfo?: {
@ -129,10 +129,11 @@ export const useSettingStore = defineStore({
return this.isComm || this.isAgent; return this.isComm || this.isAgent;
}, },
vipLabel(): string { vipLabel(): string {
const { t } = useI18n();
const vipLabelMap: any = { const vipLabelMap: any = {
free: "基础版", free: t("vip.label.free"),
plus: "专业版", plus: t("vip.label.plus"),
comm: "商业版", comm: t("vip.label.comm"),
}; };
return vipLabelMap[this.plusInfo?.vipType || "free"]; return vipLabelMap[this.plusInfo?.vipType || "free"];
}, },

View File

@ -1,9 +1,12 @@
<template> <template>
<fs-page> <fs-page>
<template #header> <template #header>
<div class="title"> <div class="title flex items-center">
流水线模版 流水线模版
<span class="sub">可根据模版批量创建流水线</span> <span class="ml-10 sub flex items-center">
<span>可根据模版批量创建流水线 </span>
<vip-button class="ml-10" mode="button" />
</span>
</div> </div>
</template> </template>
<fs-crud ref="crudRef" v-bind="crudBinding"> </fs-crud> <fs-crud ref="crudRef" v-bind="crudBinding"> </fs-crud>

View File

@ -1,6 +1,7 @@
import {ALL, Body, Controller, Inject, Post, Provide, Query} from '@midwayjs/core'; import {ALL, Body, Controller, Inject, Post, Provide, Query} from '@midwayjs/core';
import {Constants, CrudController} from '@certd/lib-server'; import {Constants, CrudController} from '@certd/lib-server';
import { TemplateService } from '../../../modules/pipeline/service/template-service.js'; import { TemplateService } from '../../../modules/pipeline/service/template-service.js';
import { checkPlus } from '@certd/plus-core';
/** /**
* 线 * 线
@ -42,6 +43,7 @@ export class TemplateController extends CrudController<TemplateService> {
@Post('/add', { summary: Constants.per.authOnly }) @Post('/add', { summary: Constants.per.authOnly })
async add(@Body(ALL) bean) { async add(@Body(ALL) bean) {
bean.userId = this.getUserId(); bean.userId = this.getUserId();
checkPlus()
return super.add(bean); return super.add(bean);
} }
@ -77,6 +79,7 @@ export class TemplateController extends CrudController<TemplateService> {
@Post('/createPipelineByTemplate', { summary: Constants.per.authOnly }) @Post('/createPipelineByTemplate', { summary: Constants.per.authOnly })
async createPipelineByTemplate(@Body(ALL) body: any) { async createPipelineByTemplate(@Body(ALL) body: any) {
body.userId = this.getUserId(); body.userId = this.getUserId();
checkPlus()
const res = await this.service.createPipelineByTemplate(body); const res = await this.service.createPipelineByTemplate(body);
return this.ok(res); return this.ok(res);
} }