<!doctype html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>SVFS 演示插件</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<main>
  <header>
    <img src="icon.svg" width="44" height="44" alt="icon">
    <div>
      <h1>SVFS 演示插件</h1>
      <p id="version">正在连接宿主…</p>
    </div>
  </header>

  <section class="card" id="missing" hidden>
    这个页面不在客户端里打开（没有检测到 svfs 桥）。
    在 SVFS Client 中安装并启用本插件即可看到完整功能。
  </section>

  <section class="card">
    <h2>宿主信息</h2>
    <dl id="host-info"><dt>加载中…</dt></dl>
  </section>

  <section class="card">
    <h2>存储（storage 权限，按插件隔离）</h2>
    <p>这个插件被打开了 <b id="count">…</b> 次</p>
    <button id="reset">计数清零</button>
    <button id="add10">再加 10 次</button>
  </section>

  <section class="card">
    <h2>接口服务（net 权限，经宿主请求服务器 API）</h2>
    <button id="ping">请求 /api/ping</button>
    <pre id="net-out" class="note">未请求。相对 path 会拼在客户端配置的服务器地址后。</pre>
  </section>

  <section class="card">
    <h2>通知与标题（notify / title 权限）</h2>
    <button id="notify">发一条原生通知</button>
    <button id="paint">随机换个标题颜色</button>
    <p class="note" id="changelog"></p>
  </section>
</main>
<script src="app.js"></script>
</body>
</html>
