Skip to content

Commit 06dfa4d

Browse files
committed
feat: enhance standalone uploader UI with improved layout and dataset display
1 parent 806a254 commit 06dfa4d

File tree

2 files changed

+67
-7
lines changed

2 files changed

+67
-7
lines changed

src/standalone-uploader/dvwebloaderV2.html

Lines changed: 67 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,76 @@
1313
disableMD5Checksum: false // Calculate MD5 checksums
1414
};
1515
</script>
16+
<style>
17+
body {
18+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
19+
margin: 0;
20+
padding: 20px;
21+
background-color: #f8f9fa;
22+
}
23+
.page-container {
24+
max-width: 1200px;
25+
margin: 0 auto;
26+
}
27+
.page-header h1 {
28+
margin: 0 0 10px 0;
29+
font-size: 1.75rem;
30+
font-weight: 500;
31+
}
32+
.dataset-info {
33+
margin: 0 0 15px 0;
34+
font-size: 0.9rem;
35+
}
36+
.dataset-info code {
37+
color: #d63384;
38+
background: #f8f9fa;
39+
padding: 2px 6px;
40+
border-radius: 4px;
41+
}
42+
.helper-text {
43+
font-size: 0.85rem;
44+
color: #6c757d;
45+
margin-bottom: 15px;
46+
}
47+
.helper-text a {
48+
color: #0d6efd;
49+
}
50+
.footer {
51+
margin-top: 30px;
52+
padding-top: 20px;
53+
border-top: 1px solid #dee2e6;
54+
text-align: center;
55+
font-size: 0.85rem;
56+
color: #6c757d;
57+
}
58+
.footer a {
59+
color: #0d6efd;
60+
}
61+
</style>
1662
<!-- The bundle includes all CSS inlined via vite-plugin-css-injected-by-js -->
1763
<script type="module" src="dvwebloader-v2.js"></script>
1864
</head>
1965
<body>
20-
<div id="root"></div>
66+
<div class="page-container">
67+
<header class="page-header">
68+
<h1>Upload Files</h1>
69+
<p class="dataset-info">Uploading to dataset: <code id="dataset-pid"></code></p>
70+
</header>
71+
72+
<!-- React uploader mounts here -->
73+
<div id="root"></div>
74+
75+
<footer class="footer">
76+
<a href="https://github.com/gdcc/dvwebloader" target="_blank" rel="noreferrer">DVWebloader V2</a>
77+
<span> - Powered by Dataverse Frontend</span>
78+
</footer>
79+
</div>
80+
81+
<script>
82+
// Extract datasetPid from URL and display it
83+
const urlParams = new URLSearchParams(window.location.search);
84+
const datasetPid = urlParams.get('datasetPid') || 'Unknown';
85+
document.getElementById('dataset-pid').textContent = datasetPid;
86+
</script>
2187
</body>
2288
</html>

src/standalone-uploader/index.tsx

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -160,12 +160,6 @@ async function init() {
160160
<StrictMode>
161161
<div className="standalone-uploader-container">
162162
<ToastContainer position="top-right" autoClose={5000} />
163-
<header className="standalone-uploader-header">
164-
<h1>Upload Files</h1>
165-
<p className="standalone-uploader-dataset-info">
166-
Uploading to dataset: <code>{config.datasetPid}</code>
167-
</p>
168-
</header>
169163
<StandaloneUploaderWrapper
170164
fileRepository={fileRepository}
171165
datasetPersistentId={config.datasetPid}

0 commit comments

Comments
 (0)