fix(06.2): shared badge and recipient handle missing in FileManagerView
- shares.py grant_share: include recipient_handle in response so ShareModal shows the name immediately without reload - FileManagerView: add Shared pill badge next to document name (badge only existed in DocumentCard, not the main file manager view) - FileManagerView ShareModal: wire @unshared to clear is_shared flag when last recipient is removed Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -152,6 +152,7 @@ async def grant_share(
|
|||||||
"document_id": str(share.document_id),
|
"document_id": str(share.document_id),
|
||||||
"owner_id": str(share.owner_id),
|
"owner_id": str(share.owner_id),
|
||||||
"recipient_id": str(share.recipient_id),
|
"recipient_id": str(share.recipient_id),
|
||||||
|
"recipient_handle": recipient.handle,
|
||||||
"permission": share.permission,
|
"permission": share.permission,
|
||||||
"created_at": share.created_at.isoformat() if share.created_at else None,
|
"created_at": share.created_at.isoformat() if share.created_at else None,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -152,7 +152,10 @@
|
|||||||
|
|
||||||
<!-- Name + topics -->
|
<!-- Name + topics -->
|
||||||
<div class="min-w-0">
|
<div class="min-w-0">
|
||||||
|
<div class="flex items-center gap-2">
|
||||||
<p class="text-sm font-medium text-gray-900 truncate">{{ doc.original_name }}</p>
|
<p class="text-sm font-medium text-gray-900 truncate">{{ doc.original_name }}</p>
|
||||||
|
<span v-if="doc.is_shared" class="shrink-0 bg-indigo-50 text-indigo-600 text-xs font-medium px-2 py-0.5 rounded-full">Shared</span>
|
||||||
|
</div>
|
||||||
<div v-if="doc.topics?.length" class="flex items-center gap-1 mt-0.5 flex-wrap">
|
<div v-if="doc.topics?.length" class="flex items-center gap-1 mt-0.5 flex-wrap">
|
||||||
<TopicBadge v-for="t in doc.topics.slice(0, 3)" :key="t" :name="t" :color="topicColor(t)" />
|
<TopicBadge v-for="t in doc.topics.slice(0, 3)" :key="t" :name="t" :color="topicColor(t)" />
|
||||||
</div>
|
</div>
|
||||||
@@ -245,6 +248,7 @@
|
|||||||
v-if="shareDoc"
|
v-if="shareDoc"
|
||||||
:doc="shareDoc"
|
:doc="shareDoc"
|
||||||
@close="shareDoc = null"
|
@close="shareDoc = null"
|
||||||
|
@unshared="(id) => { const d = docsStore.documents.find(x => x.id === id); if (d) d.is_shared = false }"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
Reference in New Issue
Block a user