update news picture
This commit is contained in:
parent
bde80bc3b7
commit
3966628644
@ -2,145 +2,147 @@
|
||||
import { computed } from 'vue';
|
||||
|
||||
const props = defineProps({
|
||||
version: {
|
||||
type: String,
|
||||
default: '0.1.9'
|
||||
},
|
||||
changelogs: {
|
||||
type: Array as () => string[],
|
||||
default: () => [
|
||||
'Brand new VSCode WebView adaptation, smoother experience https://example.com/image1.png',
|
||||
'Support for AI Mock, toolchain visualization https://example.com/diagram.jpg and automatic topology detection',
|
||||
'Multi-model concurrency, enhanced plugin capabilities https://example.com/arch.svg'
|
||||
]
|
||||
}
|
||||
version: {
|
||||
type: String,
|
||||
default: '0.1.9'
|
||||
},
|
||||
changelogs: {
|
||||
type: Array as () => string[],
|
||||
default: () => [
|
||||
'Brand new VSCode WebView adaptation, smoother experience https://example.com/image1.png',
|
||||
'Support for AI Mock, toolchain visualization https://example.com/diagram.jpg and automatic topology detection',
|
||||
'Multi-model concurrency, enhanced plugin capabilities https://example.com/arch.svg'
|
||||
]
|
||||
}
|
||||
});
|
||||
|
||||
// 处理变更日志,提取文本和图片
|
||||
const processedChangelogs = computed(() => {
|
||||
return props.changelogs.map(log => {
|
||||
// 提取所有https图片链接
|
||||
const imageRegex = /(https:\/\/[^\s]+?\.(?:png|jpg|jpeg|gif|svg|webp))/gi;
|
||||
const images = [];
|
||||
let match;
|
||||
|
||||
// 从文本中提取所有匹配的图片URL
|
||||
while ((match = imageRegex.exec(log)) !== null) {
|
||||
images.push(match[1]);
|
||||
}
|
||||
|
||||
// 从原始文本中移除图片URL
|
||||
const text = log.replace(imageRegex, '').replace(/\s{2,}/g, ' ').trim();
|
||||
|
||||
return { text, images };
|
||||
});
|
||||
return props.changelogs.map(log => {
|
||||
// 提取所有https图片链接
|
||||
const imageRegex = /(https:\/\/[^\s]+?\.(?:png|jpg|jpeg|gif|svg|webp))/gi;
|
||||
const images = [];
|
||||
let match;
|
||||
|
||||
// 从文本中提取所有匹配的图片URL
|
||||
while ((match = imageRegex.exec(log)) !== null) {
|
||||
images.push(match[1]);
|
||||
}
|
||||
|
||||
// 从原始文本中移除图片URL
|
||||
const text = log.replace(imageRegex, '').replace(/\s{2,}/g, ' ').trim();
|
||||
|
||||
return { text, images };
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<section class="news-section">
|
||||
<div class="news-title">
|
||||
<span>📣 What's New in <span class="highlight">{{ props.version }}</span></span>
|
||||
</div>
|
||||
<div class="news-content">
|
||||
<ul class="news-list">
|
||||
<li v-for="(item, index) in processedChangelogs" :key="index">
|
||||
<span class="news-badge">{{ '/' }}</span>
|
||||
<div class="log-content">
|
||||
<span>{{ item.text }}</span>
|
||||
<div v-if="item.images.length" class="image-container">
|
||||
<a v-for="(img, imgIndex) in item.images" :key="imgIndex" :href="img" target="_blank" rel="noopener">
|
||||
<img :src="img" alt="Changelog image" class="changelog-image" />
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
<br>
|
||||
<a class="release-link" href="https://openmcp.kirigaya.cn/preview/changelog.html" target="_blank"
|
||||
rel="noopener">View History Changelog →</a>
|
||||
</div>
|
||||
</section>
|
||||
<section class="news-section">
|
||||
<div class="news-title">
|
||||
<span>📣 What's New in <span class="highlight">{{ props.version }}</span></span>
|
||||
</div>
|
||||
<div class="news-content">
|
||||
<ul class="news-list">
|
||||
<li v-for="(item, index) in processedChangelogs" :key="index">
|
||||
<span class="news-badge">{{ '/' }}</span>
|
||||
<div class="log-content">
|
||||
<span>{{ item.text }}</span>
|
||||
<div v-if="item.images.length" class="image-container">
|
||||
<a v-for="(img, imgIndex) in item.images" :key="imgIndex" :href="img" target="_blank"
|
||||
rel="noopener">
|
||||
<img :src="img" alt="Changelog image" class="changelog-image" />
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
<br>
|
||||
<a class="release-link" href="https://openmcp.kirigaya.cn/preview/changelog.html" target="_blank"
|
||||
rel="noopener">View History Changelog →</a>
|
||||
</div>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<style>
|
||||
.news-section {
|
||||
margin-bottom: 20px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.news-title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 1.5rem;
|
||||
font-weight: bold;
|
||||
color: #B988D1;
|
||||
margin-bottom: 10px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 1.5rem;
|
||||
font-weight: bold;
|
||||
color: #B988D1;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.news-title .logo {
|
||||
width: 38px;
|
||||
height: 38px;
|
||||
margin-right: 12px;
|
||||
vertical-align: middle;
|
||||
width: 38px;
|
||||
height: 38px;
|
||||
margin-right: 12px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.news-title .highlight {
|
||||
color: #B988D1;
|
||||
color: #B988D1;
|
||||
}
|
||||
|
||||
.news-content {
|
||||
border-radius: 12px;
|
||||
padding: 2rem;
|
||||
margin: 2rem 0;
|
||||
background-color: var(--vscode-sideBar-background);
|
||||
box-shadow: 0 2px 8px var(--vscode-widget-shadow);
|
||||
border-radius: 12px;
|
||||
padding: 2rem;
|
||||
margin: 2rem 0;
|
||||
background-color: var(--vscode-sideBar-background);
|
||||
box-shadow: 0 2px 8px var(--vscode-widget-shadow);
|
||||
}
|
||||
|
||||
.news-content li {
|
||||
margin-bottom: 1.5rem;
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
margin-bottom: 1.5rem;
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
.news-badge {
|
||||
display: inline-block;
|
||||
margin-right: 10px;
|
||||
color: #B988D1;
|
||||
font-weight: bold;
|
||||
display: inline-block;
|
||||
margin-right: 10px;
|
||||
color: #B988D1;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.log-content {
|
||||
flex: 1;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.image-container {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 10px;
|
||||
margin-top: 10px;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 10px;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.changelog-image {
|
||||
max-height: 250px;
|
||||
border-radius: 6px;
|
||||
border: 1px solid var(--vscode-widget-border);
|
||||
object-fit: contain;
|
||||
background-color: var(--vscode-editor-background);
|
||||
padding: 4px;
|
||||
box-sizing: border-box;
|
||||
transition: transform 0.2s ease;
|
||||
max-width: 100%;
|
||||
max-height: 350px;
|
||||
border-radius: 6px;
|
||||
border: 1px solid var(--vscode-widget-border);
|
||||
object-fit: contain;
|
||||
background-color: var(--vscode-editor-background);
|
||||
padding: 4px;
|
||||
box-sizing: border-box;
|
||||
transition: transform 0.2s ease;
|
||||
}
|
||||
|
||||
|
||||
.release-link {
|
||||
color: #B988D1;
|
||||
text-decoration: none;
|
||||
font-weight: 500;
|
||||
display: inline-block;
|
||||
margin-top: 10px;
|
||||
color: #B988D1;
|
||||
text-decoration: none;
|
||||
font-weight: 500;
|
||||
display: inline-block;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.release-link:hover {
|
||||
text-decoration: underline;
|
||||
text-decoration: underline;
|
||||
}
|
||||
</style>
|
@ -1,12 +1,15 @@
|
||||
{
|
||||
"version": "0.1.9",
|
||||
"version": "0.1.10",
|
||||
"changelogs": [
|
||||
"Add mook functionality: Automatically fill in test tool form data using random seeds or AI generation.",
|
||||
"Add tool self-check functionality: Under openmcp's tool, click 'Tool Self-Check' on the right side of 'Tool Module' to enter self-check mode. In this mode, users can define the topological order of tool execution and perform automatic detection in one go.",
|
||||
"Fix issue #44: Complete platform adaptation for link redirection. https://picx.zhimg.com/80/v2-87c2a29abdd2dd56a4d18cc4a8b946ff_1440w.png",
|
||||
"Fix issue #36: Ensure successful startup when not opening a folder. https://picx.zhimg.com/80/v2-87c2a29abdd2dd56a4d18cc4a8b946ff_1440w.png",
|
||||
"Fix issue #45: Array type parameters are not supported.",
|
||||
"Fix the issue of abnormal dialog styles when pasting multi-line conversations into the dialog box."
|
||||
"Fix issue #48: Correct the wrong boot path.",
|
||||
"Support kimi's usage counting + support kimi's system prompt.",
|
||||
"Implement parallel execution and pause functionality for openmcp tool testing. https://picx.zhimg.com/80/v2-4e09958d91dcf561c578294d8b6f3349_1440w.png",
|
||||
"Revise the API speed test algorithm, splitting it into tps + queue time. https://picx.zhimg.com/80/v2-1cc3044a3ec3d5d21cb265dd67518ca0_1440w.png",
|
||||
"The large model API speed test now supports custom prompts. https://picx.zhimg.com/80/v2-ff70af72254b82c11a941fe9cc29eeb8_1440w.png",
|
||||
"Implement issue#49, tool module, debugging now supports markdown rendering echo. https://picx.zhimg.com/80/v2-5d708ccab00f33fdf63a656a0066bf23_1440w.png",
|
||||
"Implement issue#54, right-click on the server list name to rename the server. https://picx.zhimg.com/80/v2-87c2a29abdd2dd56a4d18cc4a8b946ff_1440w.png",
|
||||
"Fix some hot update issues related to resources and prompts.",
|
||||
"Update the title of the tab created by vscode. https://picx.zhimg.com/80/v2-4d40c20f3eaa032573e4de58298c859f_1440w.png"
|
||||
],
|
||||
"contributors": [
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user