chore: initialize Gitea v1.27.2 fork
giteabot backport / giteabot (push) Canceled after 0s
giteabot / giteabot (push) Canceled after 0s
release-nightly / nightly-binary (push) Canceled after 0s
release-nightly / nightly-container (push) Canceled after 0s
cache-seeder / gobuild (push) Canceled after 0s
cache-seeder / lint (bindata, lint-backend) (push) Canceled after 0s
release-nightly-snapcraft / build-and-publish (push) Canceled after 0s

Includes direct password setup links in registration emails.

Assisted-by: Codex:GPT-5
This commit is contained in:
2026-08-15 22:56:18 +08:00
commit e4afba3416
6210 changed files with 802505 additions and 0 deletions
@@ -0,0 +1,41 @@
import {createApp} from 'vue';
import {toggleElem} from '../utils/dom.ts';
import {POST} from '../modules/fetch.ts';
import ViewFileTree from '../components/ViewFileTree.vue';
import {registerGlobalEventFunc} from '../modules/observer.ts';
const {appSubUrl} = window.config;
function isUserSignedIn() {
return Boolean(document.querySelector('#navbar .user-menu'));
}
async function toggleSidebar(btn: HTMLElement) {
const elToggleShow = document.querySelector('.repo-view-file-tree-toggle[data-toggle-action="show"]')!;
const elFileTreeContainer = document.querySelector('.repo-view-file-tree-container')!;
const shouldShow = btn.getAttribute('data-toggle-action') === 'show';
toggleElem(elFileTreeContainer, shouldShow);
toggleElem(elToggleShow, !shouldShow);
// FIXME: need to remove "full height" style from parent element
if (!isUserSignedIn()) return;
await POST(`${appSubUrl}/user/settings/update_preferences`, {
data: {codeViewShowFileTree: shouldShow},
});
}
export async function initRepoViewFileTree() {
const sidebar = document.querySelector<HTMLElement>('.repo-view-file-tree-container');
const repoViewContent = document.querySelector('.repo-view-content');
if (!sidebar || !repoViewContent) return;
registerGlobalEventFunc('click', 'onRepoViewFileTreeToggle', toggleSidebar);
const fileTree = sidebar.querySelector('#view-file-tree')!;
createApp(ViewFileTree, {
repoLink: fileTree.getAttribute('data-repo-link'),
treePath: fileTree.getAttribute('data-tree-path'),
currentRefNameSubURL: fileTree.getAttribute('data-current-ref-name-sub-url'),
}).mount(fileTree);
}