fix: use anchor tag for marketplace submission to improve reliability

This commit is contained in:
Aleix Soler 2026-03-18 15:39:37 +01:00
parent 6a643548ad
commit 307163b3b7
2 changed files with 24 additions and 8 deletions

View file

@ -100,16 +100,16 @@ export const TemplateItem: React.FC<TemplateItemProps> = ({
</SelectableListItem>
<div className="template-item-actions">
{isCustom && (
<button
onClick={(e) => {
e.stopPropagation();
window.open(submissionUrl, "_blank");
}}
<a
href={submissionUrl}
target="_blank"
rel="noopener noreferrer"
onClick={(e) => e.stopPropagation()}
title="Submit to Marketplace"
className="template-marketplace-btn"
>
<ObsidianIcon name="share" size={16} />
</button>
</a>
)}
{onEdit && (
<button

View file

@ -141,13 +141,29 @@
justify-content: center;
}
.template-item-actions button:hover {
.template-item-actions button,
.template-item-actions a {
display: flex;
align-items: center;
justify-content: center;
padding: var(--size-4-1);
border-radius: var(--radius-s);
color: var(--text-muted);
background: transparent;
border: none;
cursor: pointer;
transition: all var(--anim-duration-fast) ease;
text-decoration: none !important;
}
.template-item-actions button:hover,
.template-item-actions a:hover {
background: var(--interactive-hover);
color: var(--text-normal);
}
.template-marketplace-btn {
color: var(--text-accent);
color: var(--text-accent) !important;
}
/* Template Editor Modal */