I think I'm passing???!!!???

This commit is contained in:
Annika
2022-08-04 15:28:33 -06:00
parent 8687926934
commit 09169feb9f
7 changed files with 15 additions and 7 deletions
+2 -1
View File
@@ -6,7 +6,8 @@ $info: #5d0149;
$warning: #fbcf33; $warning: #fbcf33;
$danger: #ea0606; $danger: #ea0606;
$light: #e9ecef; $light: #e9ecef;
$dark: #111927; // $dark: #111927;
$dark: #44132d;
$grey: #cbcbcb; $grey: #cbcbcb;
$font-sans-serif: Open Sans; $font-sans-serif: Open Sans;
@@ -3,12 +3,12 @@
<div class="d-flex align-items-end"> <div class="d-flex align-items-end">
<div class="btn-group me-5" role="group"> <div v-show="account.id" class="btn-group me-5" role="group">
<button id="addToVaultGroup" class="btn btn-outline-primary dropdown-toggle" data-bs-toggle="dropdown" <button id="addToVaultGroup" class="btn btn-outline-primary dropdown-toggle" data-bs-toggle="dropdown"
aria-expanded="false">Add to Vault</button> aria-expanded="false">Add to Vault</button>
<ul class="dropdown-menu" aria-labelledby="addToVaultGroup"> <ul class="dropdown-menu" aria-labelledby="addToVaultGroup">
<li v-for="v in myVaults" :key="v.id"><a @click="addToVault(v.id)" class="dropdown-item">{{v.name}}</a></li> <li v-for="v in myVaults" :key="v.id"><a @click="addToVault(v.id)" class="dropdown-item">{{v.name}}</a></li>
</ul> </ul>
</div> </div>
<!-- account is empty... --> <!-- account is empty... -->
@@ -1,5 +1,6 @@
<template> <template>
<div class="d-flex justify-content-between align-items-end"> <div class="d-flex justify-content-between align-items-end">
<div></div>
<button v-if="account.id == vault.creatorId" @click="removeFromVault(keep.id)" class="btn btn-outline-secondary">Remove from Vault</button> <button v-if="account.id == vault.creatorId" @click="removeFromVault(keep.id)" class="btn btn-outline-secondary">Remove from Vault</button>
<i v-show="account.id == keep.creatorId" @click="deleteKeep()" class="mdi mdi-delete-outline text-secondary" title="Delete"></i> <i v-show="account.id == keep.creatorId" @click="deleteKeep()" class="mdi mdi-delete-outline text-secondary" title="Delete"></i>
+3 -1
View File
@@ -36,7 +36,9 @@ export default {
keeps: computed(() => AppState.keeps), keeps: computed(() => AppState.keeps),
activeKeep: computed(() => AppState.activeKeep), activeKeep: computed(() => AppState.activeKeep),
viewKeep(keep) { viewKeep(keep) {
AppState.activeKeep = keep; // AppState.activeKeep = keep;
// make API call to trigger view counter
keepsService.getById(keep.id)
Modal.getOrCreateInstance(document.getElementById("keepModal")).show(); Modal.getOrCreateInstance(document.getElementById("keepModal")).show();
} }
}; };
+3 -1
View File
@@ -82,7 +82,9 @@ export default {
async viewKeep(keep) { async viewKeep(keep) {
keep.creator = AppState.activeProfile; keep.creator = AppState.activeProfile;
AppState.activeKeep = keep; // AppState.activeKeep = keep
// make API call to trigger view counter
keepsService.getById(keep.id)
Modal.getOrCreateInstance(document.getElementById("keepModal")).show(); Modal.getOrCreateInstance(document.getElementById("keepModal")).show();
}, },
+3 -1
View File
@@ -53,7 +53,9 @@ export default {
account: computed(() => AppState.account), account: computed(() => AppState.account),
viewKeep(keep) { viewKeep(keep) {
AppState.activeKeep = keep // AppState.activeKeep = keep
// make API call to trigger view counter
keepsService.getById(keep.id)
Modal.getOrCreateInstance(document.getElementById('keepModal')).show() Modal.getOrCreateInstance(document.getElementById('keepModal')).show()
}, },
+1 -1
View File
@@ -17,7 +17,7 @@ class KeepsService {
async getById(id) { async getById(id) {
try { try {
const res = await api.get('api/keeps/' + id) const res = await api.get('api/keeps/' + id)
AppState.keeps = res.data AppState.activeKeep = res.data
} catch (error) { } catch (error) {
logger.error(error) logger.error(error)
Pop.error(error) Pop.error(error)