mirror of
https://github.com/Luzifer/ots.git
synced 2024-10-01 01:06:09 -04:00
UX: Auto-select secret URL after creation
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
7f72d1a423
commit
693a057c06
2
Makefile
2
Makefile
@ -12,7 +12,7 @@ default: generate
|
|||||||
|
|
||||||
generate: download_libs
|
generate: download_libs
|
||||||
docker run --rm -ti -v $(CURDIR):$(CURDIR) -w $(CURDIR)/src node:10-alpine \
|
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
|
go generate
|
||||||
|
|
||||||
publish:
|
publish:
|
||||||
|
File diff suppressed because one or more lines are too long
@ -79,8 +79,10 @@
|
|||||||
<p v-html="$t('text-pre-url')" />
|
<p v-html="$t('text-pre-url')" />
|
||||||
<b-form-group>
|
<b-form-group>
|
||||||
<b-form-input
|
<b-form-input
|
||||||
|
ref="secretUrl"
|
||||||
:value="secretUrl"
|
:value="secretUrl"
|
||||||
readonly
|
readonly
|
||||||
|
@focus="$refs.secretUrl.select()"
|
||||||
/>
|
/>
|
||||||
</b-form-group>
|
</b-form-group>
|
||||||
<p v-html="$t('text-burn-hint')" />
|
<p v-html="$t('text-burn-hint')" />
|
||||||
@ -170,6 +172,9 @@ export default {
|
|||||||
.then(resp => {
|
.then(resp => {
|
||||||
this.secretId = resp.data.secret_id
|
this.secretId = resp.data.secret_id
|
||||||
this.secret = ''
|
this.secret = ''
|
||||||
|
|
||||||
|
// Give the interface a moment to transistion and focus
|
||||||
|
window.setTimeout(() => this.$refs.secretUrl.focus(), 100)
|
||||||
})
|
})
|
||||||
.catch(err => {
|
.catch(err => {
|
||||||
switch (err.response.status) {
|
switch (err.response.status) {
|
||||||
|
Loading…
Reference in New Issue
Block a user