mirror of
https://github.com/go-gitea/gitea.git
synced 2026-05-08 14:34:49 +09:00
Refactor htmx and fetch-action related code (#37186)
This is the first step (the hardest part): * repo file list last commit message lazy load * admin server status monitor * watch/unwatch (normal page, watchers page) * star/unstar (normal page, watchers page) * project view, delete column * workflow dispatch, switch the branch * commit page: load branches and tags referencing this commit The legacy "data-redirect" attribute is removed, it only makes the page reload (sometimes using an incorrect link). Also did cleanup for some devtest pages.
This commit is contained in:
@@ -84,11 +84,6 @@ export function parseIssuePageInfo(): IssuePageInfo {
|
||||
};
|
||||
}
|
||||
|
||||
/** parse a URL, either relative '/path' or absolute 'https://localhost/path' */
|
||||
export function parseUrl(str: string): URL {
|
||||
return new URL(str, str.startsWith('http') ? undefined : window.location.origin);
|
||||
}
|
||||
|
||||
/** return current locale chosen by user */
|
||||
export function getCurrentLocale(): string {
|
||||
return document.documentElement.lang;
|
||||
|
||||
Reference in New Issue
Block a user