swh.web 0.16.3__py3-none-any.whl → 0.16.4__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- swh/web/add_forge_now/templates/add-forge-request-dashboard.html +5 -2
- swh/web/api/views/origin.py +2 -2
- swh/web/archive_coverage/views.py +4 -7
- swh/web/badges/__init__.py +1 -1
- swh/web/badges/assets/index.js +40 -14
- swh/web/browse/assets/browse/browse.css +5 -0
- swh/web/browse/assets/browse/sidetabs.js +3 -16
- swh/web/browse/templates/browse-iframe.html +9 -7
- swh/web/browse/templates/browse-origin-visits.html +2 -2
- swh/web/browse/templates/browse-revision.html +5 -3
- swh/web/browse/templates/includes/content-display.html +10 -5
- swh/web/browse/templates/includes/readme-display.html +3 -2
- swh/web/browse/templates/includes/show-metadata.html +3 -2
- swh/web/browse/templates/includes/sidetabs.html +9 -7
- swh/web/browse/templates/includes/top-navigation.html +2 -1
- swh/web/browse/tests/views/test_origin.py +3 -1
- swh/web/deposit/templates/deposit-admin.html +6 -1
- swh/web/static/css/{archive_coverage.70eba3d32ed75472d638.css → archive_coverage.df54ae8fe40453ecd972.css} +2 -2
- swh/web/static/css/archive_coverage.df54ae8fe40453ecd972.css.map +1 -0
- swh/web/static/css/browse.633076034514e6a3977d.css +2 -0
- swh/web/static/css/browse.633076034514e6a3977d.css.map +1 -0
- swh/web/static/css/guided_tour.d496a0c252e1bb193496.css +2 -0
- swh/web/static/css/{guided_tour.62c03630e944b8b8d9ad.css.map → guided_tour.d496a0c252e1bb193496.css.map} +1 -1
- swh/web/static/css/{highlightjs.0c1b181eb006699a4c3e.css → highlightjs.37238c93749cb449800d.css} +2 -2
- swh/web/static/css/highlightjs.37238c93749cb449800d.css.map +1 -0
- swh/web/static/css/origin_visits.9a796c4df6606bd9905f.css +2 -0
- swh/web/static/css/origin_visits.9a796c4df6606bd9905f.css.map +1 -0
- swh/web/static/css/vendors.a4844da6ce54cbc04960.css +24 -0
- swh/web/static/css/vendors.a4844da6ce54cbc04960.css.map +1 -0
- swh/web/static/css/{webapp.4655323082740f1a4862.css → webapp.e995faa24f8c84db0d06.css} +2 -2
- swh/web/static/css/webapp.e995faa24f8c84db0d06.css.map +1 -0
- swh/web/static/js/add_forge_now.e85d09463e38c1e19632.js +3 -0
- swh/web/static/js/add_forge_now.e85d09463e38c1e19632.js.map +1 -0
- swh/web/static/js/auth.06c697ab58b81d08ebce.js +3 -0
- swh/web/static/js/auth.06c697ab58b81d08ebce.js.map +1 -0
- swh/web/static/js/badges.50941e27bf5e4453b0e0.js +3 -0
- swh/web/static/js/badges.50941e27bf5e4453b0e0.js.LICENSE.txt +6 -0
- swh/web/static/js/badges.50941e27bf5e4453b0e0.js.map +1 -0
- swh/web/static/js/browse.3f22819b69002c8b6407.js +3 -0
- swh/web/static/js/browse.3f22819b69002c8b6407.js.map +1 -0
- swh/web/static/js/deposit.d47e18177b16ccdbdb84.js.map +1 -1
- swh/web/static/js/{highlightjs.14fc09414685bf90c554.js → highlightjs.516e784a1e62011c7605.js} +3 -3
- swh/web/static/js/highlightjs.516e784a1e62011c7605.js.map +1 -0
- swh/web/static/js/mailmap.de04f685e56eff5b627f.js +3 -0
- swh/web/static/js/mailmap.de04f685e56eff5b627f.js.map +1 -0
- swh/web/static/js/mathjax.98ef576f318f1a0b0c4a.js.map +1 -1
- swh/web/static/js/pdf.worker.min.js +1 -1
- swh/web/static/js/pdfjs.018d9890c044b3612ece.js +3 -0
- swh/web/static/js/pdfjs.018d9890c044b3612ece.js.map +1 -0
- swh/web/static/js/{revision.61c9277f4a4c63df0f45.js → revision.122a31614a5f9abffc3c.js} +3 -3
- swh/web/static/js/revision.122a31614a5f9abffc3c.js.map +1 -0
- swh/web/static/js/save_code_now.d4d8fc47420a4badb683.js +3 -0
- swh/web/static/js/save_code_now.d4d8fc47420a4badb683.js.map +1 -0
- swh/web/static/js/vault.d2ec3dd1d84a8d038a6c.js +3 -0
- swh/web/static/js/vault.d2ec3dd1d84a8d038a6c.js.map +1 -0
- swh/web/static/js/vendors.f62cb86cf3b92ae280ee.js +3 -0
- swh/web/static/js/{vendors.9fc5b97b8e4691b7272e.js.LICENSE.txt → vendors.f62cb86cf3b92ae280ee.js.LICENSE.txt} +5 -1
- swh/web/static/js/vendors.f62cb86cf3b92ae280ee.js.map +1 -0
- swh/web/static/js/webapp.e93873983e400db67bf8.js +3 -0
- swh/web/static/js/{webapp.c5e37f8f7bfc8bb87ad8.js.map → webapp.e93873983e400db67bf8.js.map} +1 -1
- swh/web/static/jssources/assets/src/utils/functions.js +4 -4
- swh/web/static/jssources/datatables.net/js/dataTables.mjs +108 -44
- swh/web/static/jssources/datatables.net-fixedheader/js/dataTables.fixedHeader.mjs +10 -4
- swh/web/static/jssources/datatables.net-fixedheader/node_modules/datatables.net/js/dataTables.mjs +14027 -0
- swh/web/static/jssources/datatables.net-fixedheader-bs5/node_modules/datatables.net/js/dataTables.mjs +14027 -0
- swh/web/static/jssources/datatables.net-fixedheader-bs5/node_modules/datatables.net-bs5/js/dataTables.bootstrap5.mjs +81 -0
- swh/web/static/jssources/highlightjs-macaulay2/dist/macaulay2.min.js +3 -3
- swh/web/static/jssources/jslicenses.json +1 -1
- swh/web/static/jssources/pdfjs-dist/build/pdf.worker.mjs +885 -596
- swh/web/static/jssources/pdfjs-dist/legacy/build/pdf.mjs +4982 -4566
- swh/web/static/jssources/swh/web/badges/assets/index.js +40 -14
- swh/web/static/jssources/swh/web/browse/assets/browse/sidetabs.js +3 -16
- swh/web/static/jssources/swh/web/vault/assets/vault-ui.js +6 -4
- swh/web/static/jssources/swh/web/webapp/assets/webapp/webapp-utils.js +18 -1
- swh/web/static/security.txt +3 -0
- swh/web/static/webpack-stats.json +240 -235
- swh/web/utils/swh_templatetags.py +8 -13
- swh/web/vault/assets/vault-ui.js +6 -4
- swh/web/webapp/assets/webapp/webapp-utils.js +18 -1
- swh/web/webapp/assets/webapp/webapp.css +8 -0
- swh/web/webapp/templates/layout.html +13 -10
- swh/web/webapp/tests/test_views.py +16 -1
- {swh_web-0.16.3.dist-info → swh_web-0.16.4.dist-info}/METADATA +2 -3
- {swh_web-0.16.3.dist-info → swh_web-0.16.4.dist-info}/RECORD +98 -93
- swh/web/static/css/archive_coverage.70eba3d32ed75472d638.css.map +0 -1
- swh/web/static/css/browse.0a250d3b07ce628588a5.css +0 -2
- swh/web/static/css/browse.0a250d3b07ce628588a5.css.map +0 -1
- swh/web/static/css/guided_tour.62c03630e944b8b8d9ad.css +0 -2
- swh/web/static/css/highlightjs.0c1b181eb006699a4c3e.css.map +0 -1
- swh/web/static/css/origin_visits.88099d68a63f86af2f8e.css +0 -2
- swh/web/static/css/origin_visits.88099d68a63f86af2f8e.css.map +0 -1
- swh/web/static/css/vendors.1cfc8080eed63af482cf.css +0 -24
- swh/web/static/css/vendors.1cfc8080eed63af482cf.css.map +0 -1
- swh/web/static/css/webapp.4655323082740f1a4862.css.map +0 -1
- swh/web/static/js/add_forge_now.e25d1ad2ab6c45e60b67.js +0 -3
- swh/web/static/js/add_forge_now.e25d1ad2ab6c45e60b67.js.map +0 -1
- swh/web/static/js/auth.bd2f475f49caa9f84e99.js +0 -3
- swh/web/static/js/auth.bd2f475f49caa9f84e99.js.map +0 -1
- swh/web/static/js/badges.f02607179ad0264e7522.js +0 -2
- swh/web/static/js/badges.f02607179ad0264e7522.js.map +0 -1
- swh/web/static/js/browse.fc5d5fafca71e03d2add.js +0 -3
- swh/web/static/js/browse.fc5d5fafca71e03d2add.js.map +0 -1
- swh/web/static/js/highlightjs.14fc09414685bf90c554.js.map +0 -1
- swh/web/static/js/mailmap.631c53127ba5511ebda7.js +0 -3
- swh/web/static/js/mailmap.631c53127ba5511ebda7.js.map +0 -1
- swh/web/static/js/pdfjs.40675676ebcbdde8baab.js +0 -3
- swh/web/static/js/pdfjs.40675676ebcbdde8baab.js.map +0 -1
- swh/web/static/js/revision.61c9277f4a4c63df0f45.js.map +0 -1
- swh/web/static/js/save_code_now.4211098f5dd740dc49b4.js +0 -3
- swh/web/static/js/save_code_now.4211098f5dd740dc49b4.js.map +0 -1
- swh/web/static/js/vault.4eaa8dbf376ebe9cdc7f.js +0 -3
- swh/web/static/js/vault.4eaa8dbf376ebe9cdc7f.js.map +0 -1
- swh/web/static/js/vendors.9fc5b97b8e4691b7272e.js +0 -3
- swh/web/static/js/vendors.9fc5b97b8e4691b7272e.js.map +0 -1
- swh/web/static/js/webapp.c5e37f8f7bfc8bb87ad8.js +0 -3
- /swh/web/static/js/{add_forge_now.e25d1ad2ab6c45e60b67.js.LICENSE.txt → add_forge_now.e85d09463e38c1e19632.js.LICENSE.txt} +0 -0
- /swh/web/static/js/{auth.bd2f475f49caa9f84e99.js.LICENSE.txt → auth.06c697ab58b81d08ebce.js.LICENSE.txt} +0 -0
- /swh/web/static/js/{browse.fc5d5fafca71e03d2add.js.LICENSE.txt → browse.3f22819b69002c8b6407.js.LICENSE.txt} +0 -0
- /swh/web/static/js/{highlightjs.14fc09414685bf90c554.js.LICENSE.txt → highlightjs.516e784a1e62011c7605.js.LICENSE.txt} +0 -0
- /swh/web/static/js/{mailmap.631c53127ba5511ebda7.js.LICENSE.txt → mailmap.de04f685e56eff5b627f.js.LICENSE.txt} +0 -0
- /swh/web/static/js/{pdfjs.40675676ebcbdde8baab.js.LICENSE.txt → pdfjs.018d9890c044b3612ece.js.LICENSE.txt} +0 -0
- /swh/web/static/js/{revision.61c9277f4a4c63df0f45.js.LICENSE.txt → revision.122a31614a5f9abffc3c.js.LICENSE.txt} +0 -0
- /swh/web/static/js/{save_code_now.4211098f5dd740dc49b4.js.LICENSE.txt → save_code_now.d4d8fc47420a4badb683.js.LICENSE.txt} +0 -0
- /swh/web/static/js/{vault.4eaa8dbf376ebe9cdc7f.js.LICENSE.txt → vault.d2ec3dd1d84a8d038a6c.js.LICENSE.txt} +0 -0
- /swh/web/static/js/{webapp.c5e37f8f7bfc8bb87ad8.js.LICENSE.txt → webapp.e93873983e400db67bf8.js.LICENSE.txt} +0 -0
- {swh_web-0.16.3.dist-info → swh_web-0.16.4.dist-info}/WHEEL +0 -0
- {swh_web-0.16.3.dist-info → swh_web-0.16.4.dist-info}/licenses/AUTHORS +0 -0
- {swh_web-0.16.3.dist-info → swh_web-0.16.4.dist-info}/licenses/LICENSE +0 -0
- {swh_web-0.16.3.dist-info → swh_web-0.16.4.dist-info}/top_level.txt +0 -0
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright (C) 2019-
|
|
2
|
+
* Copyright (C) 2019-2025 The Software Heritage developers
|
|
3
3
|
* See the AUTHORS file at the top-level directory of this distribution
|
|
4
4
|
* License: GNU Affero General Public License version 3, or any later version
|
|
5
5
|
* See top-level LICENSE file for more information
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
+
import ClipboardJS from 'clipboard';
|
|
9
|
+
|
|
8
10
|
import './badges.css';
|
|
9
11
|
|
|
10
12
|
export function showBadgeInfoModal(objectType, objectSWHID) {
|
|
@@ -35,22 +37,46 @@ export function showBadgeInfoModal(objectType, objectSWHID) {
|
|
|
35
37
|
<a href="${absoluteBadgeLinkUrl}">
|
|
36
38
|
<img class="swh-badge" src="${absoluteBadgeImageUrl}" alt="Archived | ${objectSWHID}"/>
|
|
37
39
|
</a>
|
|
38
|
-
<
|
|
39
|
-
<
|
|
40
|
-
|
|
41
|
-
|
|
40
|
+
<ul class="nav nav-tabs">
|
|
41
|
+
<li class="nav-item">
|
|
42
|
+
<a class="nav-link active" data-bs-toggle="tab" href="#swh-badge-html">HTML</a>
|
|
43
|
+
</li>
|
|
44
|
+
<li class="nav-item">
|
|
45
|
+
<a class="nav-link" data-bs-toggle="tab" href="#swh-badge-markdown">Markdown</a>
|
|
46
|
+
</li>
|
|
47
|
+
<li class="nav-item">
|
|
48
|
+
<a class="nav-link" data-bs-toggle="tab" href="#swh-badge-rst">reStructuredText</a>
|
|
49
|
+
</li>
|
|
50
|
+
</ul>
|
|
51
|
+
<div class="tab-content swh-badges-integrations">
|
|
52
|
+
<div class="tab-pane active" id="swh-badge-html">
|
|
53
|
+
<pre><code class="swh-badge-html html"><a href="${absoluteBadgeLinkUrl}">
|
|
54
|
+
<img src="${absoluteBadgeImageUrl}" alt="Archived | ${objectCoreSWHID}"/>
|
|
42
55
|
</a></code></pre>
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
56
|
+
</div>
|
|
57
|
+
<div class="tab-pane" id="swh-badge-markdown">
|
|
58
|
+
<pre><code class="swh-badge-md markdown">[](${absoluteBadgeLinkUrl})</code></pre>
|
|
59
|
+
</div>
|
|
60
|
+
<div class="tab-pane" id="swh-badge-rst">
|
|
61
|
+
<pre class="swh-badge-rst">.. image:: ${absoluteBadgeImageUrl}
|
|
62
|
+
:target: ${absoluteBadgeLinkUrl}</pre>
|
|
63
|
+
</div>
|
|
64
|
+
<button type="button"
|
|
65
|
+
class="btn btn-secondary btn-sm btn-swh-copy-badge-code float-end"
|
|
66
|
+
title="Copy badge code to clipboard">
|
|
67
|
+
<i class="mdi mdi-content-copy mdi-fw" aria-hidden="true"></i>Copy badge code
|
|
68
|
+
</button>
|
|
52
69
|
</div>`;
|
|
53
70
|
swh.webapp.showModalHtml('Software Heritage badge integration', html);
|
|
54
71
|
swh.webapp.highlightCode(false, '.swh-badge-html');
|
|
55
72
|
swh.webapp.highlightCode(false, '.swh-badge-md');
|
|
73
|
+
new ClipboardJS('.btn-swh-copy-badge-code', {
|
|
74
|
+
text: () => {
|
|
75
|
+
return $('.swh-badges-integrations .tab-pane.active pre').text();
|
|
76
|
+
},
|
|
77
|
+
container: document.getElementById('swh-web-modal-html')
|
|
78
|
+
}).on('success', function(e) {
|
|
79
|
+
swh.webapp.toggleButtonText(e.trigger, 'Copied!');
|
|
80
|
+
e.clearSelection();
|
|
81
|
+
});
|
|
56
82
|
}
|
|
@@ -183,26 +183,13 @@ export async function generateCitationForObjectType(event) {
|
|
|
183
183
|
export async function initSideTabs() {
|
|
184
184
|
|
|
185
185
|
$(document).ready(() => {
|
|
186
|
-
const toggleButtonText = (button, text) => {
|
|
187
|
-
const currentLabel = button.innerHTML;
|
|
188
|
-
|
|
189
|
-
if (currentLabel === text) {
|
|
190
|
-
return;
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
button.innerHTML = text;
|
|
194
|
-
setTimeout(function() {
|
|
195
|
-
button.innerHTML = currentLabel;
|
|
196
|
-
}, 1000);
|
|
197
|
-
};
|
|
198
|
-
|
|
199
186
|
new ClipboardJS('.btn-swhid-copy', {
|
|
200
187
|
text: trigger => {
|
|
201
188
|
const swhId = $(trigger).closest('.swhid-ui').find('.swhid').text();
|
|
202
189
|
return swhId.replace(/;\n/g, ';');
|
|
203
190
|
}
|
|
204
191
|
}).on('success', function(e) {
|
|
205
|
-
toggleButtonText(e.trigger, 'Copied!');
|
|
192
|
+
swh.webapp.toggleButtonText(e.trigger, 'Copied!');
|
|
206
193
|
e.clearSelection();
|
|
207
194
|
});
|
|
208
195
|
|
|
@@ -212,7 +199,7 @@ export async function initSideTabs() {
|
|
|
212
199
|
return window.location.origin + swhIdUrl;
|
|
213
200
|
}
|
|
214
201
|
}).on('success', function(e) {
|
|
215
|
-
toggleButtonText(e.trigger, 'Copied!');
|
|
202
|
+
swh.webapp.toggleButtonText(e.trigger, 'Copied!');
|
|
216
203
|
e.clearSelection();
|
|
217
204
|
});
|
|
218
205
|
|
|
@@ -310,7 +297,7 @@ export async function initSideTabs() {
|
|
|
310
297
|
return citation;
|
|
311
298
|
}
|
|
312
299
|
}).on('success', function(e) {
|
|
313
|
-
toggleButtonText(e.trigger, 'Copied!');
|
|
300
|
+
swh.webapp.toggleButtonText(e.trigger, 'Copied!');
|
|
314
301
|
});
|
|
315
302
|
|
|
316
303
|
const tabSlideOptionsCitations = {
|
|
@@ -181,15 +181,17 @@ async function checkVaultCookingTasks() {
|
|
|
181
181
|
});
|
|
182
182
|
try {
|
|
183
183
|
const responses = await Promise.all(cookingTaskRequests);
|
|
184
|
-
handleFetchErrors(responses);
|
|
184
|
+
handleFetchErrors(responses, [404]);
|
|
185
185
|
const cookingTasks = await Promise.all(responses.map(r => r.json()));
|
|
186
186
|
|
|
187
187
|
const table = $('#vault-cooking-tasks tbody');
|
|
188
188
|
for (let i = 0; i < cookingTasks.length; ++i) {
|
|
189
189
|
const cookingTask = tasks[cookingTasks[i].swhid];
|
|
190
|
-
cookingTask
|
|
191
|
-
|
|
192
|
-
|
|
190
|
+
if (cookingTask) {
|
|
191
|
+
cookingTask.status = cookingTasks[i].status;
|
|
192
|
+
cookingTask.fetch_url = cookingTasks[i].fetch_url;
|
|
193
|
+
cookingTask.progress_message = cookingTasks[i].progress_message;
|
|
194
|
+
}
|
|
193
195
|
}
|
|
194
196
|
for (let i = 0; i < vaultCookingTasks.length; ++i) {
|
|
195
197
|
const cookingTask = vaultCookingTasks[i];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright (C) 2018-
|
|
2
|
+
* Copyright (C) 2018-2025 The Software Heritage developers
|
|
3
3
|
* See the AUTHORS file at the top-level directory of this distribution
|
|
4
4
|
* License: GNU Affero General Public License version 3, or any later version
|
|
5
5
|
* See top-level LICENSE file for more information
|
|
@@ -399,3 +399,20 @@ export function mirrorConfig() {
|
|
|
399
399
|
export function resizeIframe() {
|
|
400
400
|
return iframeResize.apply(null, arguments)[0].iframeResizer;
|
|
401
401
|
}
|
|
402
|
+
|
|
403
|
+
export function parseJsonScript(scriptElementId) {
|
|
404
|
+
return JSON.parse($(`#${scriptElementId}`).text());
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
export function toggleButtonText(button, text) {
|
|
408
|
+
const currentLabel = button.innerHTML;
|
|
409
|
+
|
|
410
|
+
if (currentLabel === text) {
|
|
411
|
+
return;
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
button.innerHTML = text;
|
|
415
|
+
setTimeout(function() {
|
|
416
|
+
button.innerHTML = currentLabel;
|
|
417
|
+
}, 1000);
|
|
418
|
+
};
|