Skip to content

Commit c1fa740

Browse files
committed
docs(demo): publish demo access and persistent test account policy
1 parent 51078c8 commit c1fa740

3 files changed

Lines changed: 28 additions & 0 deletions

File tree

‎data/products.ts‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ export interface Product {
2626
github: string;
2727
gitee: string;
2828
tags: string[];
29+
demo?: {url: string; username: string; password: string};
2930
}
3031

3132
export const products: Product[] = [
@@ -65,6 +66,7 @@ export const products: Product[] = [
6566
docs: "/docs/iotsharp/",
6667
websiteLabel: "在线演示",
6768
website: "https://iotsharp.online/",
69+
demo: {url: "https://iotsharp.online/#/login", username: "demo@iotsharp.online", password: "P@ssw0rd"},
6870
github: "https://github.com/IoTSharp/IoTSharp",
6971
gitee: "https://gitee.com/IoTSharp/IoTSharp",
7072
tags: ["设备接入", "数字孪生", "规则链"]
@@ -105,6 +107,7 @@ export const products: Product[] = [
105107
docs: "/docs/sonnetdb/",
106108
websiteLabel: "产品官网",
107109
website: "https://www.sonnetdb.com/",
110+
demo: {url: "https://iotsharp.online/sonnetdb/admin/login", username: "demo@iotsharp.online", password: "P@ssw0rd"},
108111
github: "https://github.com/IoTSharp/SonnetDB",
109112
gitee: "https://gitee.com/IoTSharp/SonnetDB",
110113
tags: ["时序", "多模型", ".NET 10"]

‎pages/[slug].tsx‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,15 @@ const ProductPage: NextPage<ProductPageProps> = ({product}) => {
6060
<ExternalLink size={17} aria-hidden="true"/> Gitee
6161
</a>
6262
</div>
63+
{product.demo && (
64+
<section className={styles.demoAccess} aria-label={`${product.name} 在线演示`}>
65+
<h2>在线演示</h2>
66+
<a href={product.demo.url} target="_blank" rel="noreferrer">打开 {product.name} 演示</a>
67+
<p>账号:<code>{product.demo.username}</code><br/>密码:<code>{product.demo.password}</code></p>
68+
<p>仅公共演示账号的用户名和密码每半小时恢复一次。</p>
69+
<p><strong>正常注册账号可用于测试服务,账号、密码和业务数据均不参与演示重置,长期保留。</strong></p>
70+
</section>
71+
)}
6372
</div>
6473
<div className={styles.heroIndex} aria-hidden="true">
6574
<span>IoTSharp portfolio</span>

‎pages/product.module.scss‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,22 @@
55
background: var(--fluent-canvas);
66
}
77

8+
.demoAccess {
9+
max-width: 42rem;
10+
margin-top: 2rem;
11+
padding: 1.25rem;
12+
border: 1px solid rgba(245, 247, 255, 0.38);
13+
border-radius: 0.3rem;
14+
background: rgba(20, 25, 72, 0.35);
15+
font-size: 0.9rem;
16+
line-height: 1.75;
17+
overflow-wrap: anywhere;
18+
19+
h2 { margin: 0 0 0.5rem; font-size: 1.1rem; }
20+
p { margin: 0.5rem 0 0; }
21+
a { color: var(--fluent-accent-light); text-decoration: underline; text-underline-offset: 3px; }
22+
}
23+
824
.eyebrow {
925
margin: 0;
1026
color: var(--fluent-teal);

0 commit comments

Comments
 (0)