Migrate code to new history store

This commit is contained in:
Andrew Bastin
2021-05-24 22:08:49 -04:00
parent 8cd3acd205
commit fcac750ad7
5 changed files with 124 additions and 93 deletions

View File

@@ -1,4 +1,5 @@
<template>
<!-- eslint-disable -->
<div class="page">
<div class="content">
<div class="page-columns inner-left">
@@ -651,6 +652,8 @@
</template>
<script>
/* eslint-disable */
import url from "url"
import querystring from "querystring"
import parseCurlCommand from "~/helpers/curlparser"
@@ -1406,10 +1409,8 @@ export default {
entry.url = parseTemplateString(entry.url, environmentVariables)
}
// TODO: Use the history store mechanism instead!
this.$refs.historyComponent.addEntry(entry)
if (fb.currentUser !== null && this.SYNC_COLLECTIONS) {
fb.writeHistory(entry)
}
})()
} catch (error) {
this.runningRequest = false
@@ -1464,10 +1465,8 @@ export default {
entry.url = parseTemplateString(entry.url, environmentVariables)
}
// TODO: Use the history state mechanism instead!
this.$refs.historyComponent.addEntry(entry)
if (fb.currentUser !== null && this.SYNC_HISTORY) {
fb.writeHistory(entry)
}
return
} else {
this.response.status = error.message