diff --git a/.gitignore b/.gitignore index 47a62bf..156fc4a 100644 --- a/.gitignore +++ b/.gitignore @@ -21,4 +21,4 @@ yarn-error.log* *.sw? # creds -/database/credentials.json \ No newline at end of file +.env \ No newline at end of file diff --git a/client/api/api.js b/client/api/api.js index 5524972..5f9c36c 100644 --- a/client/api/api.js +++ b/client/api/api.js @@ -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 }) \ No newline at end of file diff --git a/client/package-lock.json b/client/package-lock.json index aaae885..e53b9cb 100644 --- a/client/package-lock.json +++ b/client/package-lock.json @@ -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", diff --git a/client/package.json b/client/package.json index fdd97af..dea18a1 100644 --- a/client/package.json +++ b/client/package.json @@ -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" }, diff --git a/client/src/components/spells/add-spell-card.vue b/client/src/components/spells/add-spell-card.vue index 50b645f..52b4de2 100644 --- a/client/src/components/spells/add-spell-card.vue +++ b/client/src/components/spells/add-spell-card.vue @@ -143,6 +143,8 @@ export default { ingredients: ingredientsData, } + console.log(data) + Spells.addSpell(data) .then(v => { this.$emit('addSpell', v.data) diff --git a/client/src/components/spells/spell-card.vue b/client/src/components/spells/spell-card.vue index eec3f94..e3769d8 100644 --- a/client/src/components/spells/spell-card.vue +++ b/client/src/components/spells/spell-card.vue @@ -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">
-
+ + +
-
Niveau {{spell.level}}
· +
Niveau {{spell.level}}
+ ·
-
Charge {{spell.charge}} tour(s)
-
Nécessite , {{ingredient.name}}
-
{{spell.description}}
+ +
+ Charge {{spell.charge}} tour(s) +
+ +
+ Nécessite + + , + {{ingredient.name}} + +
+ +
+ {{spell.description}} +
+
-
Coût {{spell.cost}}
+
Coût {{spell.cost}}
, où :
-
{{String.fromCharCode(120+index)}}
= {{variable.description}}
+ + +
+ {{String.fromCharCode(120+index)}} +
+ = {{variable.description}} +