forked from e621ng/e621ng
[PostReplacements] Allow setting additional_source
& reason
in url (#667)
This commit is contained in:
parent
994494814b
commit
8a535ebb95
@ -22,7 +22,7 @@
|
|||||||
<div class="sect_red error_message" v-if="showErrors && errorMessage !== undefined">
|
<div class="sect_red error_message" v-if="showErrors && errorMessage !== undefined">
|
||||||
{{ errorMessage }}
|
{{ errorMessage }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<button @click="submit" :disabled="(showErrors && preventUpload) || submitting">
|
<button @click="submit" :disabled="(showErrors && preventUpload) || submitting">
|
||||||
{{ submitting ? "Uploading..." : "Upload" }}
|
{{ submitting ? "Uploading..." : "Upload" }}
|
||||||
</button>
|
</button>
|
||||||
@ -59,6 +59,14 @@ export default {
|
|||||||
submittedReason: undefined,
|
submittedReason: undefined,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
mounted() {
|
||||||
|
const params = new URLSearchParams(window.location.search);
|
||||||
|
if (params.has("additional_source"))
|
||||||
|
this.sources = [params.get("additional_source")];
|
||||||
|
|
||||||
|
if (params.has("reason"))
|
||||||
|
this.reason = params.get("reason");
|
||||||
|
},
|
||||||
computed: {
|
computed: {
|
||||||
preventUpload() {
|
preventUpload() {
|
||||||
return this.sourceWarning;
|
return this.sourceWarning;
|
||||||
|
Loading…
Reference in New Issue
Block a user