Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion src/miniapp-market-web/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,20 @@
| `src/styles.css` | 响应式布局与视觉样式 |
| `src/api.test.ts` | API 客户端契约测试 |
| `vite.config.ts` | `/miniapp/` base、本地端口和 API proxy |
| `public/` | 网页静态资源 |
| `public/` | 网页静态资源;见下方"站点图标" |
| `dist/` | 本地构建产物;由构建生成,不手工修改、不单独部署 |

### 站点图标

`public/favicon.svg` 是唯一的图标源文件,画的是 BitFun 立方体标志的简化
等轴测版本(16px 下仍然可辨认)。`favicon.ico`、`apple-touch-icon.png`、
`icon-192.png`、`icon-512.png` 都是按同一份几何数据栅格化出来的产物:小尺寸
去掉了面与面之间的缝隙并放大立方体,否则 16px 下三个面会糊成一团。

改图标时先改 `favicon.svg`,再重新生成这几个 PNG/ICO,保证两者不会漂移。
`index.html` 里的 `<link rel="icon">` 必须带 `/miniapp/` 前缀——站点不在
域名根目录下,浏览器默认探测的 `/favicon.ico` 会被 Nginx 挡在 404。

BitFun 桌面端内嵌的原生市场 Scene 不在这里。它位于
`src/web-ui/src/app/scenes/miniapps/`,通过
`src/apps/desktop/src/api/miniapp_market_api.rs` 访问市场。
Expand Down
8 changes: 6 additions & 2 deletions src/miniapp-market-web/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,16 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta
name="description"
content="Discover reviewed MiniApps that install safely inside BitFun."
content="Single-purpose tools that open inside BitFun, where the assistant can already see them. Every release is read by a human and locked to a hash."
/>
<link rel="icon" href="/miniapp/favicon.ico" sizes="32x32" />
<link rel="icon" href="/miniapp/favicon.svg" type="image/svg+xml" />
<link rel="apple-touch-icon" href="/miniapp/apple-touch-icon.png" />
<link rel="manifest" href="/miniapp/site.webmanifest" />
<meta property="og:title" content="BitFun MiniApp Market" />
<meta
property="og:description"
content="Reviewed tools, immutable packages, and permissions you control."
content="Open a tool inside BitFun and ask about what is on screen. Reviewed source, hash-locked packages, permissions you approve."
/>
<meta property="og:image" content="/miniapp/og.png" />
<meta name="twitter:card" content="summary_large_image" />
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/miniapp-market-web/public/favicon.ico
Binary file not shown.
8 changes: 8 additions & 0 deletions src/miniapp-market-web/public/favicon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/miniapp-market-web/public/icon-192.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/miniapp-market-web/public/icon-512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions src/miniapp-market-web/public/site.webmanifest
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"name": "BitFun MiniApp Market",
"short_name": "MiniApp Market",
"start_url": "/miniapp/",
"scope": "/miniapp/",
"display": "standalone",
"background_color": "#0e0e10",
"theme_color": "#0e0e10",
"icons": [
{ "src": "/miniapp/icon-192.png", "sizes": "192x192", "type": "image/png" },
{ "src": "/miniapp/icon-512.png", "sizes": "512x512", "type": "image/png" },
{ "src": "/miniapp/favicon.svg", "sizes": "any", "type": "image/svg+xml" }
]
}
15 changes: 11 additions & 4 deletions src/miniapp-market-web/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -606,7 +606,7 @@ function AppCard({
<div className="card-body">
<div className="card-topline">
<span className="category-chip">{categoryLabel(app.category, t)}</span>
<span>BitFun {app.minBitfunVersion}+</span>
<span className="card-version">v{app.latestRelease}</span>
</div>
<div className="card-heading">
<span className="app-icon">
Expand All @@ -621,16 +621,22 @@ function AppCard({
</div>
<p className="card-description">{localized.description}</p>
<div className="card-meta">
<span>
<span title={t('ratingLabel')}>
<Star weight={app.ratingAverage > 0 ? 'fill' : 'regular'} aria-hidden="true" />
{app.ratingAverage.toFixed(1)}
<small>{app.ratingCount}</small>
<span className="sr-only">{t('ratingLabel')}</span>
</span>
<span className={`card-favorites ${app.isFavorited ? 'active' : ''}`} title={t('favoritesLabel')}>
<Heart weight={app.isFavorited ? 'fill' : 'regular'} aria-hidden="true" />
{formatCompactNumber(app.favoriteCount, locale)}
<span className="sr-only">{t('favoritesLabel')}</span>
</span>
<span>
<span title={t('downloadsLabel')}>
<DownloadSimple aria-hidden="true" />
{formatCompactNumber(app.downloadCount, locale)}
<span className="sr-only">{t('downloadsLabel')}</span>
</span>
<span className="card-version">v{app.latestRelease}</span>
<ArrowRight className="card-arrow" aria-hidden="true" />
</div>
</div>
Expand Down Expand Up @@ -745,6 +751,7 @@ function DetailPage({
>
<Heart weight={app.isFavorited ? 'fill' : 'regular'} aria-hidden="true" />
{app.isFavorited ? t('favorited') : t('favorite')}
<small>{formatCompactNumber(app.favoriteCount, locale)}</small>
</button>
{owner && webSubmissionsEnabled && (
<button
Expand Down
Loading
Loading