Reset file input value after operations - fixed #1124
This commit is contained in:
@@ -32,7 +32,7 @@
|
|||||||
<input
|
<input
|
||||||
type="file"
|
type="file"
|
||||||
@change="replaceWithJSON"
|
@change="replaceWithJSON"
|
||||||
style="display: none;"
|
style="display: none"
|
||||||
ref="inputChooseFileToReplaceWith"
|
ref="inputChooseFileToReplaceWith"
|
||||||
accept="application/json"
|
accept="application/json"
|
||||||
/>
|
/>
|
||||||
@@ -47,7 +47,7 @@
|
|||||||
<input
|
<input
|
||||||
type="file"
|
type="file"
|
||||||
@change="importFromJSON"
|
@change="importFromJSON"
|
||||||
style="display: none;"
|
style="display: none"
|
||||||
ref="inputChooseFileToImportFrom"
|
ref="inputChooseFileToImportFrom"
|
||||||
accept="application/json"
|
accept="application/json"
|
||||||
/>
|
/>
|
||||||
@@ -126,6 +126,7 @@ export default {
|
|||||||
this.syncToFBCollections()
|
this.syncToFBCollections()
|
||||||
}
|
}
|
||||||
reader.readAsText(this.$refs.inputChooseFileToReplaceWith.files[0])
|
reader.readAsText(this.$refs.inputChooseFileToReplaceWith.files[0])
|
||||||
|
this.$refs.inputChooseFileToReplaceWith.value = ""
|
||||||
},
|
},
|
||||||
importFromJSON() {
|
importFromJSON() {
|
||||||
let reader = new FileReader()
|
let reader = new FileReader()
|
||||||
@@ -147,6 +148,7 @@ export default {
|
|||||||
this.syncToFBCollections()
|
this.syncToFBCollections()
|
||||||
}
|
}
|
||||||
reader.readAsText(this.$refs.inputChooseFileToImportFrom.files[0])
|
reader.readAsText(this.$refs.inputChooseFileToImportFrom.files[0])
|
||||||
|
this.$refs.inputChooseFileToImportFrom.value = ""
|
||||||
},
|
},
|
||||||
exportJSON() {
|
exportJSON() {
|
||||||
let text = this.collectionJson
|
let text = this.collectionJson
|
||||||
|
|||||||
@@ -32,7 +32,7 @@
|
|||||||
<input
|
<input
|
||||||
type="file"
|
type="file"
|
||||||
@change="replaceWithJSON"
|
@change="replaceWithJSON"
|
||||||
style="display: none;"
|
style="display: none"
|
||||||
ref="inputChooseFileToReplaceWith"
|
ref="inputChooseFileToReplaceWith"
|
||||||
accept="application/json"
|
accept="application/json"
|
||||||
/>
|
/>
|
||||||
@@ -47,7 +47,7 @@
|
|||||||
<input
|
<input
|
||||||
type="file"
|
type="file"
|
||||||
@change="importFromJSON"
|
@change="importFromJSON"
|
||||||
style="display: none;"
|
style="display: none"
|
||||||
ref="inputChooseFileToImportFrom"
|
ref="inputChooseFileToImportFrom"
|
||||||
accept="application/json"
|
accept="application/json"
|
||||||
/>
|
/>
|
||||||
@@ -116,6 +116,7 @@ export default {
|
|||||||
reader.readAsText(this.$refs.inputChooseFileToReplaceWith.files[0])
|
reader.readAsText(this.$refs.inputChooseFileToReplaceWith.files[0])
|
||||||
this.fileImported()
|
this.fileImported()
|
||||||
this.syncToFBEnvironments()
|
this.syncToFBEnvironments()
|
||||||
|
this.$refs.inputChooseFileToReplaceWith.value = ""
|
||||||
},
|
},
|
||||||
importFromJSON() {
|
importFromJSON() {
|
||||||
let reader = new FileReader()
|
let reader = new FileReader()
|
||||||
@@ -133,6 +134,7 @@ export default {
|
|||||||
}
|
}
|
||||||
reader.readAsText(this.$refs.inputChooseFileToImportFrom.files[0])
|
reader.readAsText(this.$refs.inputChooseFileToImportFrom.files[0])
|
||||||
this.syncToFBEnvironments()
|
this.syncToFBEnvironments()
|
||||||
|
this.$refs.inputChooseFileToImportFrom.value = ""
|
||||||
},
|
},
|
||||||
importFromPostwoman(environments) {
|
importFromPostwoman(environments) {
|
||||||
let confirmation = this.$t("file_imported")
|
let confirmation = this.$t("file_imported")
|
||||||
|
|||||||
@@ -354,6 +354,7 @@ export default {
|
|||||||
icon: "attach_file",
|
icon: "attach_file",
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
this.$refs.collectionUpload.value = ""
|
||||||
},
|
},
|
||||||
|
|
||||||
getDoc() {
|
getDoc() {
|
||||||
|
|||||||
@@ -484,12 +484,12 @@
|
|||||||
})
|
})
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
<option value="query" :selected="param.type === 'query'">{{
|
<option value="query" :selected="param.type === 'query'">
|
||||||
$t("query")
|
{{ $t("query") }}
|
||||||
}}</option>
|
</option>
|
||||||
<option value="path" :selected="param.type === 'path'">{{
|
<option value="path" :selected="param.type === 'path'">
|
||||||
$t("path")
|
{{ $t("path") }}
|
||||||
}}</option>
|
</option>
|
||||||
</select>
|
</select>
|
||||||
</span>
|
</span>
|
||||||
</li>
|
</li>
|
||||||
@@ -2570,6 +2570,7 @@ export default {
|
|||||||
icon: "attach_file",
|
icon: "attach_file",
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
this.$refs.attachment.value = ""
|
||||||
},
|
},
|
||||||
uploadPayload() {
|
uploadPayload() {
|
||||||
this.rawInput = true
|
this.rawInput = true
|
||||||
@@ -2588,6 +2589,7 @@ export default {
|
|||||||
icon: "attach_file",
|
icon: "attach_file",
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
this.$refs.payload.value = ""
|
||||||
},
|
},
|
||||||
async handleAccessTokenRequest() {
|
async handleAccessTokenRequest() {
|
||||||
if (this.oidcDiscoveryUrl === "" && (this.authUrl === "" || this.accessTokenUrl === "")) {
|
if (this.oidcDiscoveryUrl === "" && (this.authUrl === "" || this.accessTokenUrl === "")) {
|
||||||
|
|||||||
Reference in New Issue
Block a user