Secure send: guests by setting, and a custom view count
This commit is contained in:
@@ -53,12 +53,17 @@
|
||||
</label>
|
||||
<label class="field">
|
||||
<span class="field-label">Can be opened</span>
|
||||
<select v-model.number="views" class="form-control">
|
||||
<option :value="1">Once</option>
|
||||
<option :value="2">Twice</option>
|
||||
<option :value="3">3 times</option>
|
||||
<option :value="5">5 times</option>
|
||||
</select>
|
||||
<input
|
||||
v-model.number="views"
|
||||
type="number"
|
||||
class="form-control"
|
||||
min="1"
|
||||
:max="MAX_VIEWS"
|
||||
/>
|
||||
<span class="field-hint">
|
||||
{{ views === 1 ? 'Once, then destroyed' : views + ' times, then destroyed' }}
|
||||
(1 to {{ MAX_VIEWS }})
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
@@ -99,6 +104,11 @@ import {
|
||||
|
||||
const supported = cryptoAvailable()
|
||||
|
||||
// Matches the server's ceiling. A free number rather than a dropdown because
|
||||
// "how many people need this password" is the sender's business - a shift
|
||||
// handover is not the same as one colleague on a call.
|
||||
const MAX_VIEWS = 100
|
||||
|
||||
const plaintext = ref('')
|
||||
const expiryhours = ref(24)
|
||||
const views = ref(1)
|
||||
@@ -205,6 +215,7 @@ function reset() {
|
||||
.options { display: flex; gap: 1rem; flex-wrap: wrap; }
|
||||
.options .field { flex: 1 1 12rem; }
|
||||
.counter { font-size: 0.8125rem; color: var(--text-light); margin: 0 0 0.5rem; }
|
||||
.field-hint { display: block; font-size: 0.8125rem; color: var(--text-light); margin-top: 4px; }
|
||||
.counter.over { color: var(--warning); font-weight: 600; }
|
||||
.control-note { color: var(--warning); font-size: 0.875rem; margin: 8px 0; }
|
||||
.control-hint { color: var(--text-light); font-size: 0.8125rem; margin: 8px 0 12px; }
|
||||
|
||||
Reference in New Issue
Block a user