Fix CORS and Mixed-Content issue & Bug Fixes

This fixes the following issues:
- Text selection color was incorrect
- The 'send again' button glitched on page load

This also adds some finishing touches to the proxy code (closes #199)
and that in turn resolves #175 and resolves #2

Finally, this adds the fonts to the application assets allowing
them to be cached by the service worker.
This commit is contained in:
NBTX
2019-10-20 01:57:47 +01:00
parent a73d8053b1
commit f839189121
14 changed files with 159 additions and 84 deletions

View File

@@ -9,9 +9,13 @@
<h3>API request builder</h3>
</div>
<nav>
<nuxt-link to="/">HTTP</nuxt-link>
<nuxt-link to="/websocket">WebSocket</nuxt-link>
<nuxt-link v-tooltip="'Settings'" to="/settings" aria-label="Settings">
<!--
We're using manual checks for linkActive because the query string
seems to mess up the nuxt-link active class.
-->
<nuxt-link to="/" :class="linkActive('/')">HTTP</nuxt-link>
<nuxt-link to="/websocket" :class="linkActive('/websocket')">WebSocket</nuxt-link>
<nuxt-link to="/settings" :class="linkActive('/settings')" v-tooltip="'Settings'" aria-label="Settings">
<!-- Settings cog -->
<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24">
<path d="M24 13.616v-3.232c-1.651-.587-2.694-.752-3.219-2.019v-.001c-.527-1.271.1-2.134.847-3.707l-2.285-2.285c-1.561.742-2.433 1.375-3.707.847h-.001c-1.269-.526-1.435-1.576-2.019-3.219h-3.232c-.582 1.635-.749 2.692-2.019 3.219h-.001c-1.271.528-2.132-.098-3.707-.847l-2.285 2.285c.745 1.568 1.375 2.434.847 3.707-.527 1.271-1.584 1.438-3.219 2.02v3.232c1.632.58 2.692.749 3.219 2.019.53 1.282-.114 2.166-.847 3.707l2.285 2.286c1.562-.743 2.434-1.375 3.707-.847h.001c1.27.526 1.436 1.579 2.019 3.219h3.232c.582-1.636.75-2.69 2.027-3.222h.001c1.262-.524 2.12.101 3.698.851l2.285-2.286c-.744-1.563-1.375-2.433-.848-3.706.527-1.271 1.588-1.44 3.221-2.021zm-12 2.384c-2.209 0-4-1.791-4-4s1.791-4 4-4 4 1.791 4 4-1.791 4-4 4z"/>
@@ -147,6 +151,15 @@
logo
},
methods: {
linkActive (path) {
return {
'nuxt-link-exact-active': this.$route.path === path,
'nuxt-link-active': this.$route.path === path
};
}
},
data() {
return {
// Once the PWA code is initialized, this holds a method
@@ -179,6 +192,10 @@
},
mounted() {
if(process.client){
document.body.classList.add('afterLoad');
}
// Initializes the PWA code - checks if the app is installed,
// etc.
(async () => {
@@ -201,6 +218,12 @@
});
}
})();
},
watch: {
$route () {
this.$toast.clear();
}
}
}