|
3 | 3 | Hi! want to
|
4 | 4 | <router-link to="/login" class="text-decoration-none text-primary">login?</router-link>
|
5 | 5 | </v-sheet>
|
6 |
| - |
7 |
| - <v-sheet class="border mx-auto rounded-lg pa-6 mt-16" width="75%"> |
8 |
| - <p class="text-grey-darken-3 mb-7"> |
9 |
| - Lorem ipsum dolor sit, amet consectetur adipisicing elit. Quam totam aliquid libero omnis |
10 |
| - earum iusto! Fugit maiores doloremque veritatis eius ab voluptas? Maxime modi ratione commodi |
11 |
| - recusandae distinctio earum quaerat! |
12 |
| - </p> |
13 |
| - <v-btn @click="deploy" :disabled="isLoading" :loading="isLoading" color="primary" elevation="0"> |
14 |
| - Deploy |
15 |
| - </v-btn> |
16 |
| - </v-sheet> |
17 |
| - |
18 |
| - <v-sheet color="grey-darken-4" width="75%" class="rounded-lg mx-auto pa-5 mt-6"> |
19 |
| - <pre><code ref="content"></code></pre> |
20 |
| - </v-sheet> |
21 | 6 | </template>
|
22 | 7 |
|
23 |
| -<script setup> |
24 |
| -import { ref, onMounted } from 'vue' |
25 |
| -import axios from 'axios' |
26 |
| -
|
27 |
| -const content = ref() |
28 |
| -const isLoading = ref(false) |
29 |
| -
|
30 |
| -onMounted(() => { |
31 |
| - Echo.channel('Deployer').listen('DeployerLine', ({ line }) => { |
32 |
| - content.value.innerHTML = content.value.innerHTML + line + '<br>' |
33 |
| - }) |
34 |
| -}) |
35 |
| -
|
36 |
| -const deploy = () => { |
37 |
| - isLoading.value = true |
38 |
| -
|
39 |
| - // axios.get('/api/deploy').then((res) => { |
40 |
| - // console.log(res) |
41 |
| - // }) |
42 |
| - // Start the AJAX request |
43 |
| - // const eventSource = new EventSource('/api/deploy') |
44 |
| -
|
45 |
| - // eventSource.onmessage = function (event) { |
46 |
| - // Update the output div with the received message |
47 |
| - // console.log(event.data) |
48 |
| - // } |
49 |
| -
|
50 |
| - // eventSource.onerror = function () { |
51 |
| - // Handle any errors |
52 |
| - // console.log('Error occurred') |
53 |
| - // } |
| 8 | +<script> |
| 9 | +export default { |
| 10 | + beforeRouteEnter(_to, _from, next) { |
| 11 | + return next('/test') |
| 12 | + }, |
54 | 13 | }
|
55 | 14 | </script>
|
56 |
| - |
57 |
| -<style> |
58 |
| -#welcome__page { |
59 |
| - background-color: rgba(var(--v-theme-background), 0.25); |
60 |
| -} |
61 |
| -</style> |
0 commit comments