Commit 07042c3b authored by Alexander Sachs's avatar Alexander Sachs

added query params to automatically fill the form

parent fb8205dc
Pipeline #36912 passed with stages
in 2 minutes and 58 seconds
......@@ -29,13 +29,15 @@
<b-form-input type="text"
v-model="form.metadata"
required
placeholder="Enter your metadata">
placeholder="Enter your metadata"
:value="metadataSend">
</b-form-input>
<br>
<b-form-input type="text"
v-model="form.data"
required
placeholder="Enter your data">
placeholder="Enter your data"
:value="dataSend">
</b-form-input>
</b-form-group>
......@@ -64,13 +66,15 @@
<b-form-input type="text"
v-model="tx.id"
required
placeholder="Enter your transaction ID">
placeholder="Enter your transaction ID"
:value="transactionIdCheck">
</b-form-input>
<br>
<b-form-input type="text"
v-model="tx.data"
required
placeholder="Enter your data">
placeholder="Enter your data"
:value="dataCheck">
</b-form-input>
</b-form-group>
<!--<b-button type="reset" variant="danger">Reset</b-button>-->
......@@ -90,7 +94,7 @@
</div>
</b-col>
</b-row>
<p>{{to}}</p>
</b-container>
</div>
</template>
......@@ -100,6 +104,7 @@
let host = 'http://ec2-18-195-253-223.eu-central-1.compute.amazonaws.com:3000/'
export default {
props: ['metadataSend', 'dataSend', 'transactionIdCheck', 'dataCheck'],
name: 'rtlsfrontend',
data() {
return {
......
......@@ -4,12 +4,34 @@ import rtlsfrontend from '@/components/rtlsfrontend'
Vue.use(Router)
/*
export default new Router({
routes: [
{
path: '/',
name: 'rtlsfrontend',
component: rtlsfrontend
}
},
]
})
*/
export default new Router({
mode: 'history',
/*
We just add one route
*/
routes: [{
// Wildcard path
path: '*',
// Specify the component to be rendered for this route
component: rtlsfrontend,
// Inject props based on route.query values (our query parameters!)
props: (route) => ({
metadataSend: route.query.metadataSend,
dataSend: route.query.dataSend,
transactionIdCheck: route.query.transactionIdCheck,
dataCheck: route.query.dataCheck,
})
}]
});
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment