mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-19 09:45:37 -04:00
Add prettier for codestyle and re-format everything (#1294)
This commit is contained in:
parent
8b78154075
commit
0aae1f70d2
319 changed files with 4809 additions and 3936 deletions
|
@ -13,7 +13,7 @@ import { fetchFrontendConfig } from './fetch-frontend-config'
|
|||
|
||||
const customDelay: () => Promise<void> = async () => {
|
||||
if (window.localStorage.getItem('customDelay')) {
|
||||
return new Promise(resolve => setTimeout(resolve, 5000))
|
||||
return new Promise((resolve) => setTimeout(resolve, 5000))
|
||||
} else {
|
||||
return Promise.resolve()
|
||||
}
|
||||
|
@ -24,28 +24,39 @@ export interface InitTask {
|
|||
task: Promise<void>
|
||||
}
|
||||
|
||||
export const createSetUpTaskList = (frontendAssetsUrl: string, customizeAssetsUrl: string, backendBaseUrl: string): InitTask[] => {
|
||||
export const createSetUpTaskList = (
|
||||
frontendAssetsUrl: string,
|
||||
customizeAssetsUrl: string,
|
||||
backendBaseUrl: string
|
||||
): InitTask[] => {
|
||||
setApiUrl({
|
||||
apiUrl: `${ backendBaseUrl }api/private/`
|
||||
apiUrl: `${backendBaseUrl}api/private/`
|
||||
})
|
||||
|
||||
return [{
|
||||
name: 'Load Translations',
|
||||
task: setUpI18n(frontendAssetsUrl)
|
||||
}, {
|
||||
name: 'Load config',
|
||||
task: fetchFrontendConfig()
|
||||
}, {
|
||||
name: 'Fetch user information',
|
||||
task: fetchAndSetUser()
|
||||
}, {
|
||||
name: 'Banner',
|
||||
task: fetchAndSetBanner(customizeAssetsUrl)
|
||||
}, {
|
||||
name: 'Load history state',
|
||||
task: refreshHistoryState()
|
||||
}, {
|
||||
name: 'Add Delay',
|
||||
task: customDelay()
|
||||
}]
|
||||
return [
|
||||
{
|
||||
name: 'Load Translations',
|
||||
task: setUpI18n(frontendAssetsUrl)
|
||||
},
|
||||
{
|
||||
name: 'Load config',
|
||||
task: fetchFrontendConfig()
|
||||
},
|
||||
{
|
||||
name: 'Fetch user information',
|
||||
task: fetchAndSetUser()
|
||||
},
|
||||
{
|
||||
name: 'Banner',
|
||||
task: fetchAndSetBanner(customizeAssetsUrl)
|
||||
},
|
||||
{
|
||||
name: 'Load history state',
|
||||
task: refreshHistoryState()
|
||||
},
|
||||
{
|
||||
name: 'Add Delay',
|
||||
task: customDelay()
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue