2019-08-24 03:06:57 +00:00
|
|
|
<template>
|
2019-11-01 11:15:53 +00:00
|
|
|
<div class="wrapper">
|
|
|
|
|
<div class="content">
|
|
|
|
|
<div class="columns">
|
2021-03-01 03:58:14 +00:00
|
|
|
<AppSidenav />
|
2021-03-31 15:44:26 +00:00
|
|
|
<main>
|
2021-03-01 03:58:14 +00:00
|
|
|
<AppHeader />
|
2021-06-12 11:10:12 +00:00
|
|
|
<nuxt class="container" />
|
2021-03-01 03:58:14 +00:00
|
|
|
<AppFooter />
|
2020-09-24 17:22:17 +00:00
|
|
|
</main>
|
2019-11-01 11:15:53 +00:00
|
|
|
</div>
|
|
|
|
|
</div>
|
2019-09-02 04:48:01 +00:00
|
|
|
</div>
|
2019-08-24 03:06:57 +00:00
|
|
|
</template>
|
2019-10-25 08:14:34 +00:00
|
|
|
|
2019-09-02 04:48:01 +00:00
|
|
|
<script>
|
2021-06-21 04:27:45 +00:00
|
|
|
import {
|
|
|
|
|
setupLocalPersistence,
|
|
|
|
|
getLocalConfig,
|
|
|
|
|
} from "~/newstore/localpersistence"
|
2021-03-23 15:18:14 +00:00
|
|
|
import { performMigrations } from "~/helpers/migrations"
|
2021-05-14 00:16:10 +00:00
|
|
|
import { initUserInfo } from "~/helpers/teams/BackendUserInfo"
|
2021-05-14 03:40:53 +00:00
|
|
|
import { registerApolloAuthUpdate } from "~/helpers/apollo"
|
2021-06-14 04:07:30 +00:00
|
|
|
import { initializeFirebase } from "~/helpers/fb"
|
2021-03-23 15:18:14 +00:00
|
|
|
|
2019-11-12 04:18:57 +00:00
|
|
|
export default {
|
|
|
|
|
beforeMount() {
|
2021-05-14 03:40:53 +00:00
|
|
|
registerApolloAuthUpdate()
|
|
|
|
|
|
2021-06-21 04:27:45 +00:00
|
|
|
const color = getLocalConfig("THEME_COLOR") || "green"
|
2020-09-24 02:52:54 +00:00
|
|
|
document.documentElement.setAttribute("data-accent", color)
|
2019-11-12 04:18:57 +00:00
|
|
|
},
|
2021-01-23 11:52:54 +00:00
|
|
|
async mounted() {
|
2021-03-23 15:18:14 +00:00
|
|
|
performMigrations()
|
2021-03-14 03:24:15 +00:00
|
|
|
|
2020-01-09 00:31:31 +00:00
|
|
|
console.log(
|
2020-02-25 02:06:23 +00:00
|
|
|
"%cWe ❤︎ open source!",
|
|
|
|
|
"background-color:white;padding:8px 16px;border-radius:8px;font-size:32px;color:red;"
|
2020-02-24 18:44:50 +00:00
|
|
|
)
|
2020-01-09 00:31:31 +00:00
|
|
|
console.log(
|
2020-08-13 11:20:02 +00:00
|
|
|
"%cContribute: https://github.com/hoppscotch/hoppscotch",
|
2020-02-25 02:06:23 +00:00
|
|
|
"background-color:black;padding:4px 8px;border-radius:8px;font-size:16px;color:white;"
|
2020-02-24 18:44:50 +00:00
|
|
|
)
|
2021-04-26 09:37:18 +00:00
|
|
|
|
2021-01-23 11:52:54 +00:00
|
|
|
const workbox = await window.$workbox
|
|
|
|
|
if (workbox) {
|
|
|
|
|
workbox.addEventListener("installed", (event) => {
|
|
|
|
|
if (event.isUpdate) {
|
|
|
|
|
this.$toast.show(this.$t("new_version_found"), {
|
|
|
|
|
icon: "info",
|
|
|
|
|
duration: 0,
|
|
|
|
|
theme: "toasted-primary",
|
|
|
|
|
action: [
|
|
|
|
|
{
|
|
|
|
|
text: this.$t("reload"),
|
2021-05-18 06:26:59 +00:00
|
|
|
onClick: (_, toastObject) => {
|
2021-01-23 11:52:54 +00:00
|
|
|
toastObject.goAway(0)
|
2021-05-18 16:09:55 +00:00
|
|
|
window.location.reload()
|
2021-01-23 11:52:54 +00:00
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
2021-03-23 15:18:14 +00:00
|
|
|
|
|
|
|
|
setupLocalPersistence()
|
2021-05-14 00:16:10 +00:00
|
|
|
|
2021-06-14 04:07:30 +00:00
|
|
|
initializeFirebase()
|
2021-05-14 00:16:10 +00:00
|
|
|
initUserInfo()
|
2019-11-12 04:18:57 +00:00
|
|
|
},
|
2020-01-30 15:05:22 +00:00
|
|
|
beforeDestroy() {
|
2020-02-25 02:06:23 +00:00
|
|
|
document.removeEventListener("keydown", this._keyListener)
|
2020-02-24 18:44:50 +00:00
|
|
|
},
|
|
|
|
|
}
|
2019-08-24 03:06:57 +00:00
|
|
|
</script>
|