UX: Auto-select secret URL after creation

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2019-07-14 18:20:16 +02:00
parent 7f72d1a423
commit 693a057c06
Signed by: luzifer
GPG key ID: DC2729FDD34BE99E
4 changed files with 5765 additions and 5758 deletions

View file

@ -12,7 +12,7 @@ default: generate
generate: download_libs
docker run --rm -ti -v $(CURDIR):$(CURDIR) -w $(CURDIR)/src node:10-alpine \
sh -exc "npm ci && npm run build && rm -rf node_modules && chown -R $(shell id -u) ../frontend"
sh -exc "npx npm@lts ci && npx npm@lts run build && chown -R $(shell id -u) ../frontend node_modules"
go generate
publish:

11510
assets.go

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

View file

@ -79,8 +79,10 @@
<p v-html="$t('text-pre-url')" />
<b-form-group>
<b-form-input
ref="secretUrl"
:value="secretUrl"
readonly
@focus="$refs.secretUrl.select()"
/>
</b-form-group>
<p v-html="$t('text-burn-hint')" />
@ -170,6 +172,9 @@ export default {
.then(resp => {
this.secretId = resp.data.secret_id
this.secret = ''
// Give the interface a moment to transistion and focus
window.setTimeout(() => this.$refs.secretUrl.focus(), 100)
})
.catch(err => {
switch (err.response.status) {