Compare commits

...

3 Commits

Author SHA1 Message Date
aminecmi
16028ba07e Removed second router link.
Some checks reported errors
continuous-integration/drone/push Build is passing
continuous-integration/drone Build was killed
2022-08-06 15:06:02 +02:00
aminecmi
3039f3a415 Router link and modal issue? 2022-08-06 15:05:34 +02:00
aminecmi
884877572b New drone config. 2022-08-06 15:05:16 +02:00
2 changed files with 59 additions and 15 deletions

View File

@ -1,5 +1,6 @@
kind: pipeline
type: docker
name: analyseAndBuild
steps:
- name: code-analysis
@ -26,7 +27,17 @@ steps:
environment:
VUE_APP_API_BASE_URL:
from_secret: baseurl
trigger:
event:
- push
- pull_request
---
kind: pipeline
type: docker
name: CopyToServer
steps:
- name: scp files
image: appleboy/drone-scp
settings:
@ -37,6 +48,34 @@ steps:
port: 22
target: /home/ubuntu/courses
source: dist/*
when:
branch:
- main
trigger:
event:
- promote
target:
- production
---
kind: pipeline
type: ssh
name: Deploy
server:
host: amine-louveau.fr
user: ubuntu
ssh_key:
from_secret: ssh_key
steps:
- name: copy
commands:
- cd /home/ubuntu/courses
- mv dist/* ./
- sudo chown www-data:www-data ./*
- sudo rm -rf /var/www/amine/courses/*
- sudo mv ./* /var/www/amine/courses/
trigger:
event:
- promote
target:
- production

View File

@ -11,7 +11,7 @@
</div>
<div class="level-right">
<button class="button is-large" v-on:click="toggleModal">
<button class="button is-large" v-on:click="newItem">
<span class="icon is-medium">
<ion-icon name="add-outline"></ion-icon>
</span>
@ -20,18 +20,19 @@
</nav>
<div class="columns">
<div class="column is-one-quarter" v-for="item in lists" :key="item.id">
<div class="card">
<div class="card-content">
<p class="title">
{{item.name}}
</p>
<router-link :to="{ name: 'List', params: { id: item.id }}" custom v-slot="{ navigate }">
<div class="card" @click="navigate">
<div class="card-content">
<p class="title">
{{item.name}}
</p>
</div>
<footer class="card-footer">
<a href="#" class="card-footer-item" v-on:click.prevent="selectItem(item)">Edit</a>
<a href="#" class="card-footer-item" v-on:click.prevent="deleteItem(item)">Delete</a>
</footer>
</div>
<footer class="card-footer">
<router-link class="card-footer-item" :to="{ name: 'List', params: { id: item.id }}">Select</router-link>
<a href="#" class="card-footer-item" v-on:click="selectItem(item)">Edit</a>
<a href="#" class="card-footer-item" v-on:click="deleteItem(item)">Delete</a>
</footer>
</div>
</router-link>
</div>
</div>
</div>
@ -81,6 +82,10 @@ export default {
toggleModal: function () {
this.addModalShown = !this.addModalShown;
},
newItem: function () {
this.selectedItem = null;
this.toggleModal();
},
selectItem: function (item) {
this.selectedItem = item;
this.toggleModal();