feat: per-app initial scale config

This commit is contained in:
2026-08-17 20:01:01 +08:00
parent b65a0400a6
commit bb714d8de3
5 changed files with 23 additions and 12 deletions
@@ -8,10 +8,11 @@ import top.yeij.hearth.webapp.Tab
// multi-WebView lifecycle, visibility, and navigation, and syncing tab state
// back to the desktop H5 topbar
interface WebAppHost {
// 创建内容 WebView 加载 url 并显示(已存在则切换到该标签);ua 为清单声明的 UA
// 创建内容 WebView 加载 url 并显示(已存在则切换到该标签);ua 为清单声明的 UA
// scale 为清单声明的初始缩放百分比(可为 null)
// Create a content WebView loading url and show it (switch if already open);
// ua is the UA declared in the manifest
fun openWebView(id: String, url: String, ua: String?)
// ua is the manifest-declared UA, scale is the initial zoom percentage (nullable)
fun openWebView(id: String, url: String, ua: String?, scale: Int?)
// 销毁对应内容 WebView
// Destroy the corresponding content WebView