107 lines
4.5 KiB
HTML
107 lines
4.5 KiB
HTML
<!DOCTYPE html>
|
||
<html lang="en">
|
||
<head>
|
||
<meta charset="UTF-8">
|
||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||
<title>BridgeSwarm – Data API</title>
|
||
<link rel="stylesheet" href="../shared/theme.css">
|
||
<link rel="stylesheet" href="../shared/chrome.css">
|
||
<link rel="stylesheet" href="style.css">
|
||
<script src="../shared/boot.js"></script>
|
||
<script>if (BridgeSwarmExamples.guardFileProtocol('data-demo/')) { /* blocked */ }</script>
|
||
</head>
|
||
<body>
|
||
<div class="bs-page">
|
||
<a class="bs-back" href="../">← Examples</a>
|
||
<p class="bs-brand">BridgeSwarm</p>
|
||
<h1 class="bs-title">Data API</h1>
|
||
<p class="bs-lede">Hypercore, Hyperbee, Hyperdrive, Autobase, and Hyperdb via <code>BridgeSwarm.request</code>.</p>
|
||
<div class="bs-meta" id="publicKey">Your public key: (loading…)</div>
|
||
|
||
<div class="bs-tabs" role="tablist">
|
||
<button type="button" class="bs-tab is-active" data-tab="core" aria-selected="true">Hypercore</button>
|
||
<button type="button" class="bs-tab" data-tab="bee" aria-selected="false">Hyperbee</button>
|
||
<button type="button" class="bs-tab" data-tab="drive" aria-selected="false">Hyperdrive</button>
|
||
<button type="button" class="bs-tab" data-tab="autobase" aria-selected="false">Autobase</button>
|
||
<button type="button" class="bs-tab" data-tab="hyperdb" aria-selected="false">Hyperdb</button>
|
||
<button type="button" class="bs-tab" data-tab="notes" aria-selected="false">Notes</button>
|
||
</div>
|
||
|
||
<div class="bs-section bs-tab-panel" data-panel="core">
|
||
<h2>Hypercore</h2>
|
||
<div class="bs-row">
|
||
<button class="primary" id="coreInfo">Core info</button>
|
||
<input type="text" id="coreAppend" placeholder="Data to append">
|
||
<button class="secondary" id="coreAppendBtn">Append</button>
|
||
</div>
|
||
<div class="bs-row">
|
||
<button class="secondary" id="coreOpenNamed">Open named core</button>
|
||
<button class="secondary" id="coreAppendNamed">Append to named</button>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="bs-section bs-tab-panel" data-panel="bee" hidden>
|
||
<h2>Hyperbee</h2>
|
||
<div class="bs-row">
|
||
<input type="text" id="beeKey" placeholder="Key">
|
||
<input type="text" id="beeValue" placeholder="Value">
|
||
<button class="primary" id="beePut">Put</button>
|
||
<button class="secondary" id="beeGet">Get</button>
|
||
<button class="secondary" id="beeDel">Del</button>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="bs-section bs-tab-panel" data-panel="drive" hidden>
|
||
<h2>Hyperdrive</h2>
|
||
<div class="bs-row">
|
||
<input type="text" id="drivePath" placeholder="Path" value="/readme.txt">
|
||
<input type="text" id="driveContent" placeholder="Content">
|
||
<button class="primary" id="drivePut">Put</button>
|
||
<button class="secondary" id="driveGet">Get</button>
|
||
<button class="secondary" id="driveList">List /</button>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="bs-section bs-tab-panel" data-panel="autobase" hidden>
|
||
<h2>Autobase</h2>
|
||
<div class="bs-row">
|
||
<input type="text" id="autobaseValue" placeholder="Value to append">
|
||
<button class="primary" id="autobaseAppend">Append</button>
|
||
<button class="secondary" id="autobaseInfo">Info</button>
|
||
<button class="secondary" id="autobaseView">Read view (0..4)</button>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="bs-section bs-tab-panel" data-panel="hyperdb" hidden>
|
||
<h2>Hyperdb records</h2>
|
||
<div class="bs-row">
|
||
<input type="text" id="hyperdbId" placeholder="Id">
|
||
<input type="text" id="hyperdbValue" placeholder="Value">
|
||
<button class="primary" id="hyperdbPut">Put</button>
|
||
<button class="secondary" id="hyperdbGet">Get</button>
|
||
<button class="secondary" id="hyperdbDel">Del</button>
|
||
<button class="secondary" id="hyperdbFind">Find all</button>
|
||
<button class="secondary" id="hyperdbFlush">Flush</button>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="bs-section bs-tab-panel" data-panel="notes" hidden>
|
||
<h2>Hyperdb notes</h2>
|
||
<div class="bs-row">
|
||
<input type="text" id="noteId" placeholder="Note id">
|
||
<input type="text" id="noteTitle" placeholder="Title">
|
||
<input type="text" id="noteBody" placeholder="Body">
|
||
<button class="primary" id="notePut">Put note</button>
|
||
<button class="secondary" id="noteGet">Get note</button>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="bs-section">
|
||
<h2>Log</h2>
|
||
<div class="bs-log" id="log"></div>
|
||
</div>
|
||
</div>
|
||
<script src="app.js"></script>
|
||
</body>
|
||
</html>
|