diff --git a/frontend/src/store.js b/frontend/src/store.js index 483072c..4e8141d 100644 --- a/frontend/src/store.js +++ b/frontend/src/store.js @@ -619,12 +619,16 @@ export default createStore({ const {domain} = splitGroupHandle(groupHandle) const servers = await dispatch('getFriendServers', {username: 'x@' + domain}) const items = await servers.get(getters.signAuth, '/api/v1/inventory_items/' + encodeHandleForUrl(groupHandle) + '/') - // Keyed by the full handle, not a bare id: a group pk is only unique within its own - // backend's database, so two different domains could otherwise collide on the same - // item_map key - the handle already carries the domain, so no separate namespacing is needed. commit('setInventoryItems', {url: '/' + groupHandle, items}) return items }, + async fetchFriendInventoryItems({commit, dispatch, getters}, {friendHandle}) { + const servers = await dispatch('getFriendServers', {username: friendHandle}) + const items = await servers.get(getters.signAuth, '/api/v1/inventory_items/' + encodeHandleForUrl(friendHandle) + '/') + items.map(item => item.files.map(file => file.owner = item.owner)) + commit('setInventoryItems', {url: '/' + friendHandle, items}) + return items + }, async fetchFiles({state, commit, dispatch, getters}) { if (state.last_load.files > Date.now() - 1000 * 60 * 60 * 24) { return state.files diff --git a/frontend/src/views/GroupDetail.vue b/frontend/src/views/GroupDetail.vue index b079b59..e50f6da 100644 --- a/frontend/src/views/GroupDetail.vue +++ b/frontend/src/views/GroupDetail.vue @@ -4,7 +4,7 @@
| Name | -Availability Policy | -Amount | -Actions | -
|---|---|---|---|
|
- |
- - {{ item.availability_policy }} - | -{{ item.owned_quantity }} | -
- |
-
| Name | -Path | -Category | -Actions | -
|---|---|---|---|
|
- |
- - {{ location.path }} - | -- {{ location.category }} - - - | -
- |
-