fix(新手引导): 新手教程中的系统名称调整为动态指定

--bug=1046104 --user=兰永辉
https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001046104
This commit is contained in:
lan-yonghui 2024-10-18 09:33:06 +08:00 committed by Craftsman
parent 7e667578dd
commit 93f32c27d7
8 changed files with 28 additions and 20 deletions

View File

@ -138,7 +138,8 @@ export default {
} }
if (response.data && response.data[6] && response.data[6].paramValue) { if (response.data && response.data[6] && response.data[6].paramValue) {
this.sysTitle = response.data[6].paramValue; this.sysTitle = response.data[6].paramValue || "MeterSphere";
localStorage.setItem("default-sys-title", this.sysTitle);
} }
let title = response.data[4].paramValue; let title = response.data[4].paramValue;

View File

@ -192,6 +192,11 @@ export default {
this.loginTitle = response.data[3].paramValue; this.loginTitle = response.data[3].paramValue;
} }
if (response.data && response.data[6] && response.data[6].paramValue) {
this.sysTitle = response.data[6].paramValue || "MeterSphere";
localStorage.setItem("default-sys-title", this.sysTitle);
}
let title = response.data[4].paramValue; let title = response.data[4].paramValue;
if (title) { if (title) {
document.title = title; document.title = title;

View File

@ -137,7 +137,7 @@ export default {
} }
], ],
title: _this.$t("shepherd.step1.title"), title: _this.$t("shepherd.step1.title"),
text: _this.$t("shepherd.step1.text") text: _this.$t("shepherd.step1.text", [localStorage.getItem("default-sys-title") || "MeterSphere"])
}, },
{ {
attachTo: { attachTo: {
@ -188,7 +188,7 @@ export default {
} }
], ],
title: _this.$t("shepherd.step3.title"), title: _this.$t("shepherd.step3.title"),
text: _this.$t("shepherd.step3.text") text: _this.$t("shepherd.step3.text", [localStorage.getItem("default-sys-title") || "MeterSphere"])
}, },
{ {
attachTo: { attachTo: {

View File

@ -5,9 +5,9 @@
<div class="card" v-if="!nextVisible"> <div class="card" v-if="!nextVisible">
<img src="/assets/guide/visual-collaboration.png" class="image" alt="MS"> <img src="/assets/guide/visual-collaboration.png" class="image" alt="MS">
<div class="content"> <div class="content">
<p class="title" ><img src="../../../assets/guide/hard.png" alt="MS">{{ $t("guide.home.title") }}</p> <p class="title" ><img src="../../../assets/guide/hard.png" alt="MS">{{ $t("guide.home.title", [defaultSysTitle]) }}</p>
<div class="bottom clearfix"> <div class="bottom clearfix">
<p class="desc">{{ $t("guide.home.desc") }}</p> <p class="desc">{{ $t("guide.home.desc", [defaultSysTitle]) }}</p>
<el-button type="primary" round size="small" class="button" @click="openNext"> <el-button type="primary" round size="small" class="button" @click="openNext">
{{ $t("guide.home.button") }} {{ $t("guide.home.button") }}
</el-button> </el-button>
@ -95,10 +95,12 @@ export default {
button: 'guide.performance.button', button: 'guide.performance.button',
id: 3 id: 3
} }
] ],
defaultSysTitle: ''
} }
}, },
created() { mounted() {
this.defaultSysTitle = localStorage.getItem("default-sys-title") || "MeterSphere";
}, },
methods: { methods: {
openNext() { openNext() {

View File

@ -3474,7 +3474,7 @@ const message = {
shepherd: { shepherd: {
step1: { step1: {
title: 'A Workspaces and Projects', title: 'A Workspaces and Projects',
text: 'MeterSphere uses [workspace] and [project] to isolate test data, and you can switch between workspace and project in the top menu.', text: '{0} uses [workspace] and [project] to isolate test data, and you can switch between workspace and project in the top menu.',
}, },
step2: { step2: {
title: 'Side navigation menu', title: 'Side navigation menu',
@ -3482,7 +3482,7 @@ const message = {
}, },
step3: { step3: {
title: 'One workspace holds multiple projects', title: 'One workspace holds multiple projects',
text: 'A "project" is a collection of use cases and members. Various types of tests on MeterSphere are viewed and managed through projects.', text: 'A "project" is a collection of use cases and members. Various types of tests on {0} are viewed and managed through projects.',
}, },
step4: { step4: {
title: 'Top function menu', title: 'Top function menu',
@ -3498,8 +3498,8 @@ const message = {
}, },
guide: { guide: {
home: { home: {
title: 'Welcome to MeterSphere!', title: 'Welcome to {0}!',
desc: 'A quickstart guide to see what MeterSphere can do for you.', desc: 'A quickstart guide to see what {0} can do for you.',
button: 'Lets get started', button: 'Lets get started',
}, },
test: { test: {

View File

@ -3427,7 +3427,7 @@ const message = {
shepherd: { shepherd: {
step1: { step1: {
title: '工作空间和项目', title: '工作空间和项目',
text: 'MeterSphere 使用 [工作空间] 和 [项目] 来隔离测试数据, 你可以在顶部菜单进行工作空间和项目切换。', text: '{0} 使用 [工作空间] 和 [项目] 来隔离测试数据, 你可以在顶部菜单进行工作空间和项目切换。',
}, },
step2: { step2: {
title: '功能主菜单', title: '功能主菜单',
@ -3435,7 +3435,7 @@ const message = {
}, },
step3: { step3: {
title: '一个空间可以创建多个项目', title: '一个空间可以创建多个项目',
text: '「项目」是一组用例和成员的集合。MeterSphere 上各种类型的测试均通过项目进行分权分域查看和管理。', text: '「项目」是一组用例和成员的集合。{0} 上各种类型的测试均通过项目进行分权分域查看和管理。',
}, },
step4: { step4: {
title: '一级功能菜单', title: '一级功能菜单',
@ -3451,8 +3451,8 @@ const message = {
}, },
guide: { guide: {
home: { home: {
title: '欢迎来到 MeterSphere', title: '欢迎来到 {0}',
desc: '通过一个快捷指引来了解 MeterSphere 究竟能为你做哪些事。', desc: '通过一个快捷指引来了解 {0} 究竟能为你做哪些事。',
button: '让我们开始吧', button: '让我们开始吧',
}, },
test: { test: {

View File

@ -3424,7 +3424,7 @@ const message = {
shepherd: { shepherd: {
step1: { step1: {
title: '工作空間和項目', title: '工作空間和項目',
text: 'MeterSphere 使用 [工作空間] 和 [項目] 來隔離測試數據, 你可以在頂部菜單進行工作空間和項目切換。', text: '{0} 使用 [工作空間] 和 [項目] 來隔離測試數據, 你可以在頂部菜單進行工作空間和項目切換。',
}, },
step2: { step2: {
title: '功能主菜單', title: '功能主菜單',
@ -3432,7 +3432,7 @@ const message = {
}, },
step3: { step3: {
title: '一個空間可以創建多個項目', title: '一個空間可以創建多個項目',
text: '「項目」是一組用例和成員的集合。 MeterSphere 上各種類型的測試均通過項目進行分權分域查看和管理。', text: '「項目」是一組用例和成員的集合。 {0} 上各種類型的測試均通過項目進行分權分域查看和管理。',
}, },
step4: { step4: {
title: '一級功能菜單', title: '一級功能菜單',
@ -3448,8 +3448,8 @@ const message = {
}, },
guide: { guide: {
home: { home: {
title: '歡迎來到 MeterSphere', title: '歡迎來到 {0}',
desc: '通過一個快捷指引來了解 MeterSphere 究竟能為你做哪些事。', desc: '通過一個快捷指引來了解 {0} 究竟能為你做哪些事。',
button: '讓我們開始吧', button: '讓我們開始吧',
}, },
test: { test: {

View File

@ -231,7 +231,7 @@ export default {
} }
], ],
title: _this.$t("shepherd.step3.title"), title: _this.$t("shepherd.step3.title"),
text: _this.$t("shepherd.step3.text") text: _this.$t("shepherd.step3.text", [localStorage.getItem("default-sys-title") || "MeterSphere"])
}, },
{ {
attachTo: { attachTo: {