Added elaborate template switching.
This commit is contained in:
@@ -31,19 +31,19 @@
|
||||
|
||||
<StashDialog
|
||||
v-if="showStashDialog"
|
||||
@created="showStashDialog = false; reloadProfile();"
|
||||
@created="showStashDialog = false; reloadStashes();"
|
||||
@close="showStashDialog = false"
|
||||
/>
|
||||
|
||||
<ul class="stashes nolist">
|
||||
<li
|
||||
v-for="stash in profile.stashes"
|
||||
v-for="stash in stashes"
|
||||
:key="`stash-${stash.id}`"
|
||||
>
|
||||
<StashTile
|
||||
:stash="stash"
|
||||
:profile="profile"
|
||||
@reload="reloadProfile"
|
||||
@reload="reloadStashes"
|
||||
/>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -224,14 +224,16 @@ import AlertDialog from '#/components/alerts/create.vue';
|
||||
const pageContext = inject('pageContext');
|
||||
const user = pageContext.user;
|
||||
const profile = ref(pageContext.pageProps.profile);
|
||||
const stashes = ref(pageContext.pageProps.stashes);
|
||||
const alerts = ref(pageContext.pageProps.alerts);
|
||||
|
||||
const done = ref(true);
|
||||
const showStashDialog = ref(false);
|
||||
const showAlertDialog = ref(false);
|
||||
|
||||
async function reloadProfile() {
|
||||
profile.value = await get(`/users/${profile.value.id}`);
|
||||
async function reloadStashes() {
|
||||
// profile.value = await get(`/users/${profile.value.id}`);
|
||||
stashes.value = await get(`/users/${profile.value.id}/stashes`);
|
||||
}
|
||||
|
||||
async function reloadAlerts() {
|
||||
|
||||
Reference in New Issue
Block a user