72 lines
2.6 KiB
HTML
72 lines
2.6 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width,initial-scale=1" />
|
|
<link rel="stylesheet" href="popup.css">
|
|
<script defer src="popup.build.js"></script>
|
|
</head>
|
|
|
|
<body x-data="popup">
|
|
<div class="profiles">
|
|
<label for="profile">Active Profile</label>
|
|
<div class="profile-buttons">
|
|
<select x-model.number="profileIndex" name="profile" id="profile">
|
|
<template x-for="(prof, index) in profileNames" :key="index">
|
|
<option x-text="prof" :value="index"></option>
|
|
</template>
|
|
</select>
|
|
<button @click="newProfile">New</button>
|
|
<button @click="confirmDelete = true" x-show="!confirmDelete"
|
|
:disabled="profileNames.length <= 1">Delete</button>
|
|
<button @click="await deleteProfile()" x-show="confirmDelete">Confirm Delete</button>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="profile-name">
|
|
<label for="profile-name">Profile Name</label>
|
|
<input type="text" id="profile-name" x-model="name">
|
|
</div>
|
|
|
|
<div class="key">
|
|
<label for="priv-key">Private Key</label>
|
|
<input id="priv-key" x-model="privKey" :type="visibleKey ? 'text' : 'password'">
|
|
</div>
|
|
|
|
<div class="buttons">
|
|
<button @click="visibleKey = !visibleKey" x-text="visibleKey ? 'Hide' : 'Show'"></button>
|
|
<button @click="await saveProfile()" :disabled="!needsSaving">Save</button>
|
|
<button @click="confirmClear = true" x-show="!confirmClear">Clear Data</button>
|
|
<button @click="await clearData()" x-show="confirmClear">Confirm Clear</button>
|
|
</div>
|
|
|
|
<div x-show="hasValidPubKey">
|
|
<label for="pub-key">Pub Key:</label>
|
|
<input type="text" id="pub-key" x-model="pubKey" disabled>
|
|
</div>
|
|
|
|
<div class="allowed-sites" x-show="hosts.length > 0">
|
|
<h3>Allowed Sites</h3>
|
|
<table>
|
|
<template x-for="(host, index) in hosts" :key="host.host">
|
|
<tr>
|
|
<td class="allowed" x-text="host.allowed ? 'Yes' : 'No'"></td>
|
|
<td x-text="host.host"></td>
|
|
<td><button @click="deleteSite(index)">Delete</button></td>
|
|
</tr>
|
|
</template>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="help">
|
|
<button @click='window.open("https://ursus.camp/nostore", "_blank")'>Get Help</button>
|
|
</div>
|
|
|
|
<div class="disclaimer">
|
|
No user data is collected or transmitted.
|
|
All private keys are stored in the extension's sequestered local browser storage.
|
|
</div>
|
|
</body>
|
|
|
|
</html> |