forgejo/templates/repo/settings
oliverpool 83ea43cf49 frontend: generic lazy loader for webcomponents (#8510)
After seeing #8111 use a webcomponent, I think that they are a neat usecase for Forgejo where most of the frontend is backend-generated, with some "island of enhancements".

I am considering using a webcomponent for the CITATION management (last occurrence of [`Blob.GetBlobContent`](https://codeberg.org/forgejo/forgejo/issues/8222)), however I noticed that the developer experience wasn't ideal.

With this PR it would be very easy to declare a webcomponent, which will be loaded only if needed (I converted `model-viewer` and `pdf-object` to this technique).

Some cleanup in the neighbor webcomponents.

## Testing

1) Create a new repository or use an existing one.
2) Upload a `.pdf` or `.glb`  file (such as https://codeberg.org/forgejo/forgejo/src/branch/forgejo/tests/testdata/data/viewer/Unicode%E2%9D%A4%E2%99%BBTest.glb)
3) Open the Network inspector and view the file in the repository.
    - After a short loading spinner, the PDF or 3D model should be rendered in a viewer
    - the related JS should have been loaded (e.g. http://localhost:3000/assets/js/model-viewer.494bf0cd.js)
    - visiting another page and check that this JS file isn't loaded

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/8510
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
Reviewed-by: Beowulf <beowulf@beocode.eu>
Co-authored-by: oliverpool <git@olivier.pfad.fr>
Co-committed-by: oliverpool <git@olivier.pfad.fr>
2025-07-23 04:10:50 +02:00
..
units feat: allow changing default branch update style 2024-12-23 18:55:25 +03:00
webhook chore(ui): clean up hashbox CSS, small design changes (#7822) 2025-05-25 12:51:27 +02:00
actions.tmpl Support configuration variables on Gitea Actions (#24724) 2023-06-20 22:54:15 +00:00
branches.tmpl Migrate margin and padding helpers to tailwind (#30043) 2024-03-30 07:17:29 +01:00
collaboration.tmpl ui: fix wrong string used in a search box (#4258) 2024-06-28 16:28:03 +00:00
deploy_keys.tmpl [PORT] Refactor DateUtils and merge TimeSince (gitea#32409) 2024-11-10 22:23:27 +01:00
githook_edit.tmpl Migrate gt-hidden to tw-hidden (#30046) 2024-03-30 07:17:29 +01:00
githooks.tmpl Migrate margin and padding helpers to tailwind (#30043) 2024-03-30 07:17:29 +01:00
layout_footer.tmpl Change to vertical navbar layout for secondary navbar for repo/user/admin settings (#24246) 2023-04-23 18:21:21 +08:00
layout_head.tmpl Use flex-container for repo and org settings (#27418) 2023-10-04 08:47:54 +02:00
lfs.tmpl chore(ui): always use primary button color inside modals (#7161) 2025-03-09 07:45:58 +00:00
lfs_file.tmpl frontend: generic lazy loader for webcomponents (#8510) 2025-07-23 04:10:50 +02:00
lfs_file_find.tmpl chore(ui): clean up hashbox CSS, small design changes (#7822) 2025-05-25 12:51:27 +02:00
lfs_locks.tmpl [PORT] Refactor DateUtils and merge TimeSince (gitea#32409) 2024-11-10 22:23:27 +01:00
lfs_pointers.tmpl Migrate font-family to tailwind (#30118) 2024-03-30 07:17:32 +01:00
navbar.tmpl fix(ui): repo settings units overview anchor (#8322) 2025-07-01 01:07:19 +02:00
options.tmpl fix(ui): improve branch filter help (#8509) 2025-07-14 19:31:26 +02:00
protected_branch.tmpl Remove urls from translations (#31950) 2024-09-12 17:28:58 +05:00
push_mirror_sync_modal.tmpl fix(ui): improve branch filter help (#8509) 2025-07-14 19:31:26 +02:00
runner_edit.tmpl Change to vertical navbar layout for secondary navbar for repo/user/admin settings (#24246) 2023-04-23 18:21:21 +08:00
secrets.tmpl Change to vertical navbar layout for secondary navbar for repo/user/admin settings (#24246) 2023-04-23 18:21:21 +08:00
tags.tmpl Remove urls from translations (#31950) 2024-09-12 17:28:58 +05:00
units.tmpl Split out repository unit settings 2024-02-13 22:42:09 +01:00