Migrate code to new history store
This commit is contained in:
@@ -481,7 +481,6 @@ import { commonHeaders } from "~/helpers/headers"
|
||||
import { getPlatformSpecialKey } from "~/helpers/platformutils"
|
||||
import { sendNetworkRequest } from "~/helpers/network"
|
||||
import { getSettingSubject } from "~/newstore/settings"
|
||||
import { fb } from "~/helpers/fb"
|
||||
|
||||
export default {
|
||||
beforeRouteLeave(_to, _from, next) {
|
||||
@@ -853,12 +852,8 @@ export default {
|
||||
duration,
|
||||
}
|
||||
|
||||
// TODO: Use history store system mechanism instead!
|
||||
this.$refs.graphqlHistoryComponent.addEntry(entry)
|
||||
if (fb.currentUser !== null && fb.currentSettings[2]) {
|
||||
if (fb.currentSettings[2].value) {
|
||||
fb.writeGraphqlHistory(entry)
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
this.response = `${error}. ${this.$t("check_console_details")}`
|
||||
this.$nuxt.$loading.finish()
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user