This commit is contained in:
j3d1 2023-05-11 04:09:26 +02:00
parent a83083d0eb
commit 86003a8582
10 changed files with 20860 additions and 100 deletions

View file

@ -72,9 +72,11 @@ export default {
async getInventoryItems() {
try {
const servers = await this.getFriends().then(friends => friends.map(friend => this.getFriendServer({username: friend})))
const urls = servers.map(server => server.then(s => `http://${s}/api/inventory_items/`))
const urls = servers.map(server => server.then(s => {
return {host: `http://${s}`, target: "/api/inventory_items/"}
}))
urls.map(url => url.then(u => this.apiFederatedGet(u).then(items => {
this.setInventoryItems({url: u, items})
this.setInventoryItems({url: u.domain, items})
}).catch(e => {
}))) // TODO: handle error
} catch (e) {

View file

@ -3,8 +3,8 @@
</script>
<template>
<BaseLayout :username="username">
<main class="container">
<BaseLayout>
<main class="content">
<div class="row">
<div class="col">
<div class="card">

View file

@ -3,8 +3,8 @@
</script>
<template>
<BaseLayout :username="username">
<main class="container">
<BaseLayout>
<main class="content">
<div class="row">
<div class="col">
<div class="card">

View file

@ -3,8 +3,8 @@
</script>
<template>
<BaseLayout :username="username">
<main class="container">
<BaseLayout>
<main class="content">
<div class="row">
<div class="col">
<div class="card">