Skip to content

Commit ff52dee

Browse files
committed
Add button to add private from project view
1 parent f860946 commit ff52dee

2 files changed

Lines changed: 13 additions & 2 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "geolocatorexplorer",
33
"private": true,
4-
"version": "1.1.0",
4+
"version": "1.1.1",
55
"type": "module",
66
"packageManager": "npm@11.7.0",
77
"description": "Explore the migration movements of small birds tracked with multi-sensor geolocators and open GeoLocator Data Packages.",

src/pages/Project.vue

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,6 +363,14 @@
363363
<p class="mt-2 font-display text-lg text-white">
364364
Under Embargo until {{ embargoNotice }}
365365
</p>
366+
<button
367+
type="button"
368+
class="mt-4 inline-flex items-center gap-1 text-[10px] uppercase tracking-[0.18em] text-white/45 transition hover:text-white"
369+
@click="openPrivateModal(selectedProject?.record_id || '')"
370+
>
371+
<span class="text-[color:var(--teal)]">+</span>
372+
<span>Add as private</span>
373+
</button>
366374
</div>
367375
</div>
368376
</div>
@@ -840,9 +848,12 @@ const refreshProjects = async () => {
840848
privateRecords.value = cachedRecords.map(summarizePrivateDatapackage);
841849
};
842850
843-
const openPrivateModal = async () => {
851+
const openPrivateModal = async (prefillRecordId) => {
844852
privateError.value = "";
845853
privateStatus.value = "";
854+
if (prefillRecordId !== undefined) {
855+
zenodoRecordInput.value = String(prefillRecordId || "");
856+
}
846857
await refreshPrivateRecords();
847858
isPrivateModalOpen.value = true;
848859
};

0 commit comments

Comments
 (0)