You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
59 lines
1.4 KiB
Vue
59 lines
1.4 KiB
Vue
<template>
|
|
<div id="app" class="flex flex-column items-center">
|
|
<div id="logo" class="w-100 flex justify-center items-end">
|
|
<a href="/" class="logo-titla f1 lh-title tracked">BIT4SAT</a>
|
|
</div>
|
|
<div class="main h-100 w-100 flex mt4 items-start justify-center">
|
|
<router-view />
|
|
</div>
|
|
</div>
|
|
</template>
|
|
|
|
<script charset="utf-8">
|
|
import GetWorker from './workerInterface.js';
|
|
const Worker = GetWorker('main');
|
|
|
|
export default {
|
|
|
|
mounted(){
|
|
|
|
this.worker = Worker
|
|
|
|
// listen and route
|
|
this.worker.listenTo('upload-invoice', (e) => {
|
|
console.log("received invoice ", e.data)
|
|
this.$store.commit('setInvoice', e.data.invoice)
|
|
this.$store.commit('setStatus', e.data.status)
|
|
|
|
// if we are not on upload route go there
|
|
if ( this.$router.currentRoute.name !== 'upload' ) {
|
|
this.$router.push({name: 'upload', params: { uploadId: e.data.upload_id }})
|
|
}
|
|
// self.invoice = e.data.invoice;
|
|
// self.uploadId = e.data.upload_id;
|
|
// self.status = e.data.status;
|
|
|
|
})
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style>
|
|
#app {
|
|
height: 100vh;
|
|
}
|
|
|
|
#logo {
|
|
height: 25%;
|
|
}
|
|
|
|
#logo a {
|
|
color: #FF725C;
|
|
font-style: italic;
|
|
font-weight: bolder;
|
|
text-shadow: 2px 3px #444, -2px -2px #444;
|
|
text-decoration: none;
|
|
}
|
|
|
|
</style>
|