- Added the magic mystery key wooo
This commit is contained in:
@@ -2,6 +2,8 @@ import axios from "axios"
|
||||
|
||||
const url = "http://localhost:2814/api"
|
||||
|
||||
axios.defaults.headers.common['auracle_key'] = process.env.VUE_APP_API_KEY
|
||||
|
||||
export default axios.create({
|
||||
baseURL: url
|
||||
})
|
||||
5
client/package-lock.json
generated
5
client/package-lock.json
generated
@@ -11905,6 +11905,11 @@
|
||||
"integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==",
|
||||
"dev": true
|
||||
},
|
||||
"v-clipboard": {
|
||||
"version": "2.2.3",
|
||||
"resolved": "https://registry.npmjs.org/v-clipboard/-/v-clipboard-2.2.3.tgz",
|
||||
"integrity": "sha512-Wg+ObZoYK6McHb5OOCFWvm0R7xHp0/p0G1ocx/8bO22jvA/yVY05rADbfiztwCokXBNfQuGv/XSd1ozcTFgekw=="
|
||||
},
|
||||
"v8-compile-cache": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.1.0.tgz",
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
"core-js": "^3.6.4",
|
||||
"jquery": "^3.5.1",
|
||||
"popper.js": "^1.16.1",
|
||||
"v-clipboard": "^2.2.3",
|
||||
"vue": "^2.6.11",
|
||||
"vue-masonry": "^0.11.8"
|
||||
},
|
||||
|
||||
@@ -143,6 +143,8 @@ export default {
|
||||
ingredients: ingredientsData,
|
||||
}
|
||||
|
||||
console.log(data)
|
||||
|
||||
Spells.addSpell(data)
|
||||
.then(v => {
|
||||
this.$emit('addSpell', v.data)
|
||||
|
||||
@@ -3,23 +3,55 @@
|
||||
:class="main_school"
|
||||
class="col-12 col-sm-6 col-lg-4 col-xl-3 mb-4 grid-item grid-sizer">
|
||||
<div class="spellcard bg-white p-4 rounded text-dark shadow" style="border-left-width:4px;border-left-style:solid;">
|
||||
<div class="h3 font-display font-weight-bold text-wrap word-break" :title="spell.name" style="line-height:100%;">
|
||||
|
||||
<div :title="spell.name" class="h3 font-display font-weight-bold text-wrap word-break" style="line-height:100%;">
|
||||
<a class="text-decoration-none" href="#">{{spell.name}}</a>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<div class="font-weight-700 text-muted d-inline-block">Niveau {{spell.level}}</div><span> · </span>
|
||||
<div class="font-weight-700 text-muted d-inline-block">Niveau {{spell.level}}</div>
|
||||
<span> · </span>
|
||||
<div class="text-muted d-inline-block">
|
||||
<span v-for="(school,index) in spell.schools" :key="index"><span v-if="index!=0">, </span><a :href="'/school/'+school.id" class="text-secondary">{{school.name}}</a></span>
|
||||
<span v-for="(school,index) in spell.schools" :key="index">
|
||||
<span v-if="index!=0">, </span>
|
||||
<a :href="'/school/'+school.id" class="text-secondary">{{school.name}}</a>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="spell.charge!=0" class="small font-weight-bold">Charge {{spell.charge}} tour(s)</div>
|
||||
<div v-if="spell.ingredients.length>0" class="small"><span class="font-weight-bold">Nécessite</span> <span v-for="(ingredient,index) in spell.ingredients" :key="index"><span v-if="index!=0">, </span>{{ingredient.name}}</span></div>
|
||||
<div class="small text-muted font-italic mt-2">{{spell.description}}</div>
|
||||
|
||||
<div v-if="spell.charge!=0" class="small font-weight-bold">
|
||||
<span>Charge {{spell.charge}} tour(s)</span>
|
||||
</div>
|
||||
|
||||
<div v-if="spell.ingredients.length>0" class="small">
|
||||
<span class="font-weight-bold">Nécessite</span>
|
||||
<span v-for="(ingredient,index) in spell.ingredients" :key="index">
|
||||
<span v-if="index!=0">, </span>
|
||||
<span>{{ingredient.name}}</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div
|
||||
v-clipboard="spell.description"
|
||||
:id="'spell_description_' + spell.id"
|
||||
v-b-tooltip.click
|
||||
placement="bottom"
|
||||
title="Description copiée !"
|
||||
class="small text-muted font-italic mt-2">
|
||||
<span>{{spell.description}}</span>
|
||||
</div>
|
||||
|
||||
<div class="mt-2">
|
||||
<div class="font-weight-bold d-inline-block">Coût {{spell.cost}}</div>
|
||||
<div class="font-weight-bold d-inline-block"><span>Coût </span>{{spell.cost}}</div>
|
||||
<div v-if="spell.variables.length>0" class="small d-inline-block">, où :</div>
|
||||
<div class=small>
|
||||
<span v-for="(variable,index) in spell.variables" :key="index"><span class="font-weight-bold"><span v-if="index!=0"><br></span>{{String.fromCharCode(120+index)}}</span> = {{variable.description}}</span>
|
||||
<span v-for="(variable,index) in spell.variables" :key="index">
|
||||
<span class="font-weight-bold">
|
||||
<span v-if="index!=0"><br></span>
|
||||
<span>{{String.fromCharCode(120+index)}}</span>
|
||||
</span>
|
||||
<span> = {{variable.description}}</span>
|
||||
</span>
|
||||
</div>
|
||||
<div class="text-right">
|
||||
<a class="h5 text-secondary mr-1">
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
<template>
|
||||
<div class="spell-list-wrapper">
|
||||
<button type="button" class="btn font-display font-weight-bold btn-lg btn-outline-dark btn-block shadow-sm mb-4" @click="showAdd"><i class="mad">add</i> Ajouter un sort</button>
|
||||
<button type="button" class="btn font-display font-weight-bold btn-lg btn-outline-dark btn-block shadow-sm mb-4" @click="showAdd">
|
||||
<i class="mad">add</i>
|
||||
<span>Ajouter un sort</span>
|
||||
</button>
|
||||
<div v-masonry transition-duration=".5s" item-selector=".spell-card" class="row spells-list">
|
||||
<spell-card v-masonry-tile class="spell-card" v-for="(spell) in spells" :key="spell.id" v-bind:spell="spell" @editSpell="editSpell" @deleteSpell="deleteSpell"/>
|
||||
</div>
|
||||
|
||||
@@ -3,29 +3,37 @@ import Vue from 'vue'
|
||||
import VueRouter from 'vue-router'
|
||||
import App from './app.vue'
|
||||
|
||||
import { VueMasonryPlugin } from 'vue-masonry';
|
||||
// Auth
|
||||
require('dotenv').config()
|
||||
|
||||
import { BootstrapVue } from 'bootstrap-vue'
|
||||
// Router
|
||||
import routes from './routes'
|
||||
Vue.use(VueRouter)
|
||||
|
||||
// Jquery
|
||||
import jquery from 'jquery'
|
||||
window.$ = jquery
|
||||
window.jquery = jquery
|
||||
|
||||
// Global styles
|
||||
import './assets/scss/_global.scss'
|
||||
|
||||
// Bootstrap
|
||||
import 'bootstrap/dist/css/bootstrap.css'
|
||||
import 'bootstrap-vue/dist/bootstrap-vue.css'
|
||||
import 'bootstrap/dist/js/bootstrap.js'
|
||||
import { BootstrapVue } from 'bootstrap-vue'
|
||||
Vue.use(BootstrapVue)
|
||||
|
||||
// Styles
|
||||
import './assets/scss/_global.scss'
|
||||
// Masonry
|
||||
import { VueMasonryPlugin } from 'vue-masonry';
|
||||
Vue.use(VueMasonryPlugin)
|
||||
|
||||
// Clipboard plugin
|
||||
import clipboard from 'v-clipboard'
|
||||
Vue.use(clipboard)
|
||||
|
||||
Vue.config.productionTip = false
|
||||
Vue.use(VueRouter)
|
||||
Vue.use(VueMasonryPlugin)
|
||||
Vue.use(BootstrapVue)
|
||||
|
||||
var filter = function(text, length, clamp){
|
||||
clamp = clamp || '...';
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
module.exports = {
|
||||
|
||||
};
|
||||
Reference in New Issue
Block a user