Skip to content

Commit 5f6e5f8

Browse files
committed
overlay: fix proxy helper usage in attachment rows; bump v0.1.11
1 parent 443894c commit 5f6e5f8

File tree

4 files changed

+8
-7
lines changed

4 files changed

+8
-7
lines changed

.env.portainer.example

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Portainer stack environment (example values). Copy to `.env.portainer` for Portainer UI deployment.
22

33
# GHCR images to deploy (choose tags built by CI) — default to a pinned release tag
4-
PDF_PROXY_IMAGE=ghcr.io/joonsoome/on-prem-zotero-webui/pdf-proxy:v0.1.10
5-
WEB_LIBRARY_IMAGE=ghcr.io/joonsoome/on-prem-zotero-webui/web-library:v0.1.10
4+
PDF_PROXY_IMAGE=ghcr.io/joonsoome/on-prem-zotero-webui/pdf-proxy:v0.1.11
5+
WEB_LIBRARY_IMAGE=ghcr.io/joonsoome/on-prem-zotero-webui/web-library:v0.1.11
66

77
# Host path for Zotero WebDAV data mounted into the proxy container
88
ZOTERO_ROOT_HOST_PATH=/volume1/Reference/zotero

.env.stage.example

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Staging/NAS environment configuration (example values). Copy to `.env.stage` on the staging host.
22

33
# GHCR images to deploy (choose tags built by CI) — default to a pinned release tag
4-
PDF_PROXY_IMAGE=ghcr.io/joonsoome/on-prem-zotero-webui/pdf-proxy:v0.1.10
5-
WEB_LIBRARY_IMAGE=ghcr.io/joonsoome/on-prem-zotero-webui/web-library:v0.1.10
4+
PDF_PROXY_IMAGE=ghcr.io/joonsoome/on-prem-zotero-webui/pdf-proxy:v0.1.11
5+
WEB_LIBRARY_IMAGE=ghcr.io/joonsoome/on-prem-zotero-webui/web-library:v0.1.11
66

77
# Host path for Zotero WebDAV data mounted into the proxy container
88
ZOTERO_ROOT_HOST_PATH=/volume1/Reference/zotero

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
**Self-hosted Zotero WebUI Opensource Library + WebDAV-based PDF viewer **Avoid storage fees, keep privacy, and still enjoy a full browser-based Zotero library.
44

55
## It is PoC
6-
It(v0.1.10) is still fully not properly works, please keep on watching to be ready for production.
6+
It(v0.1.11) is still fully not properly works, please keep on watching to be ready for production.
77

88
---
99

app/web-library-overlay/src/js/component/item-details/attachments.jsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,7 @@ const Attachment = memo(props => {
296296
const libraryKey = useSelector(state => state.current.libraryKey);
297297
const attachmentKey = useSelector(state => state.current.attachmentKey);
298298
const isTouchOrSmall = useSelector(state => state.device.isTouchOrSmall);
299+
const proxyHref = useSelector(state => getProxyPdfUrl(state, attachment.key));
299300

300301
const [isFocused, setIsFocused] = useState(false);
301302
const [_, dragRef] = useDrag({ // eslint-disable-line no-unused-vars
@@ -318,7 +319,7 @@ const Attachment = memo(props => {
318319
const isFile = attachment.linkMode.startsWith('imported') &&
319320
attachment[Symbol.for('links')].enclosure;
320321
const isLink = attachment.linkMode === 'linked_url';
321-
const hasLink = isFile || isLink || Boolean(useSelector(state => getProxyPdfUrl(state, attachment.key)));
322+
const hasLink = isFile || isLink || Boolean(proxyHref);
322323

323324
const handleKeyDown = useCallback(ev => {
324325
if (ev.key === 'ArrowRight') {
@@ -362,7 +363,7 @@ const Attachment = memo(props => {
362363
ev.preventDefault();
363364
console.log('[proxy-debug] row double-click', {
364365
key: attachment.key,
365-
proxyHref: getProxyPdfUrl({ ...state }, attachment.key), // log helper result
366+
proxyHref,
366367
linkMode: attachment.linkMode,
367368
contentType: attachment.contentType,
368369
});

0 commit comments

Comments
 (0)