generated from coulomb/repo-seed
Add local tag server check, archive on delete, and first-run pin reminder
- Local tag is now clickable - checks if document exists on server by ID or filename, and re-links if found - Delete from server now archives the proxy instead of removing it, making it a local-only document that can be re-uploaded - Added first-run pin reminder banner to help users pin the extension - Added issue report modal with context sections (extension info, browser info, document status, recent errors) and copy to clipboard as Markdown - Added clearServerFields and attachServerDocument functions to pdf-queue - Improved local tag styling with hover states and visual feedback Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -19,6 +19,8 @@ import {
|
||||
removePDF,
|
||||
cleanupOldEntries,
|
||||
syncFromServer,
|
||||
clearServerFields,
|
||||
attachServerDocument,
|
||||
PDFStatus,
|
||||
PDFStatusMeta
|
||||
} from '../utils/pdf-queue';
|
||||
@@ -334,6 +336,44 @@ chrome.runtime.onMessage.addListener((request, sender, sendResponse) => {
|
||||
return true;
|
||||
}
|
||||
|
||||
// Clear server fields from a proxy (when deleted from server)
|
||||
if (request.action === 'clearServerFields') {
|
||||
clearServerFields(request.id).then(() => {
|
||||
return updateBadge();
|
||||
}).then(() => {
|
||||
sendResponse({ success: true });
|
||||
});
|
||||
return true;
|
||||
}
|
||||
|
||||
// Attach a server document to a local proxy
|
||||
if (request.action === 'attachServerDocument') {
|
||||
const { id, binectDocumentId, binectStatusCode, binectStatusText, price, recipientAddress, errorMessage } = request as {
|
||||
id: string;
|
||||
binectDocumentId: number;
|
||||
binectStatusCode: number;
|
||||
binectStatusText: string;
|
||||
price?: number;
|
||||
recipientAddress?: string;
|
||||
errorMessage?: string;
|
||||
};
|
||||
|
||||
attachServerDocument(id, binectDocumentId, binectStatusCode, binectStatusText, price, recipientAddress, errorMessage)
|
||||
.then(() => {
|
||||
return updateBadge();
|
||||
})
|
||||
.then(() => {
|
||||
sendResponse({ success: true });
|
||||
})
|
||||
.catch(error => {
|
||||
sendResponse({
|
||||
success: false,
|
||||
error: error instanceof Error ? error.message : 'Failed to attach document'
|
||||
});
|
||||
});
|
||||
return true;
|
||||
}
|
||||
|
||||
// Legacy handlers for backward compatibility
|
||||
if (request.action === 'getLastPDF') {
|
||||
getPendingPDFs().then(entries => {
|
||||
|
||||
Reference in New Issue
Block a user