mirror of
https://github.com/go-gitea/gitea.git
synced 2026-09-05 20:43:24 +09:00
refactor: improve types in the frontend, misc fixes (#39142)
This commit is contained in:
Vendored
+14
-5
@@ -1,5 +1,8 @@
|
||||
interface JQuery {
|
||||
fomanticExt: any; // fomantic extension
|
||||
fomanticExt: {
|
||||
onDropdownAfterFiltered?: (this: HTMLElement) => void,
|
||||
onModalBeforeHidden?: (this: HTMLElement) => void,
|
||||
}; // fomantic extension
|
||||
api: any, // fomantic
|
||||
dimmer: any, // fomantic
|
||||
dropdown: any; // fomantic
|
||||
@@ -23,7 +26,7 @@ interface Window {
|
||||
sharedWorkerUri: string,
|
||||
runModeIsProd: boolean,
|
||||
customEmojis: Record<string, string>,
|
||||
pageData: Record<string, any> & {
|
||||
pageData: {
|
||||
adminUserListSearchForm?: {
|
||||
SortType: string,
|
||||
StatusFilterMap: Record<string, string>,
|
||||
@@ -37,8 +40,14 @@ interface Window {
|
||||
FolderIcon?: string,
|
||||
FolderOpenIcon?: string,
|
||||
repoLink?: string,
|
||||
repoActivityTopAuthors?: any[],
|
||||
dashboardRepoList?: Record<string, any>,
|
||||
repoActivityTopAuthors?: Array<{
|
||||
avatar_link: string,
|
||||
commits: number,
|
||||
home_link: string,
|
||||
login: string,
|
||||
name: string,
|
||||
}>,
|
||||
dashboardRepoList?: Record<string, unknown>,
|
||||
},
|
||||
notificationSettings: {
|
||||
MinTimeout: number,
|
||||
@@ -69,7 +78,7 @@ interface Window {
|
||||
giteaExternalRenderHelper?: {
|
||||
isValidCssColor(s: string | null): boolean,
|
||||
queryParams: URLSearchParams,
|
||||
postIframeMsg(cmd: string, data: Record<string, any> = {}),
|
||||
postIframeMsg(cmd: 'resize' | 'open-link', data: Record<string, string | number | null>): void,
|
||||
}
|
||||
|
||||
// do not add more properties here unless it is a must
|
||||
|
||||
Reference in New Issue
Block a user