mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-11 12:46:35 -05:00
14a22de754
[SettingsPage] Small Fixes 3 GitOrigin-RevId: 98accb3c53c802e83f2939e5c25d13fcf3b5e054
35 lines
852 B
JavaScript
35 lines
852 B
JavaScript
const MOCK_DELAY = 1000
|
|
|
|
export function defaultSetupMocks(fetchMock) {
|
|
fetchMock.post(
|
|
/\/user\/password\/update/,
|
|
{
|
|
status: 200,
|
|
body: {
|
|
message: {
|
|
type: 'success',
|
|
email: 'tim.alby@overleaf.com',
|
|
text: 'Password changed',
|
|
},
|
|
},
|
|
},
|
|
{
|
|
delay: MOCK_DELAY,
|
|
}
|
|
)
|
|
}
|
|
|
|
export function setDefaultMeta() {
|
|
window.metaAttributesCache = window.metaAttributesCache || new Map()
|
|
window.metaAttributesCache.set('ol-ExposedSettings', {
|
|
...window.metaAttributesCache.get('ol-ExposedSettings'),
|
|
isOverleaf: true,
|
|
})
|
|
window.metaAttributesCache.set('ol-isExternalAuthenticationSystemUsed', false)
|
|
window.metaAttributesCache.set('ol-hasPassword', true)
|
|
window.metaAttributesCache.set('ol-passwordStrengthOptions', {
|
|
length: {
|
|
min: 2,
|
|
},
|
|
})
|
|
}
|