-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
29 changed files
with
172 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+286 KB
src/Umbraco.Web.UI.Client/src/mocks/handlers/backoffice/assets/login.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions
1
src/Umbraco.Web.UI.Client/src/mocks/handlers/backoffice/assets/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
51 changes: 51 additions & 0 deletions
51
src/Umbraco.Web.UI.Client/src/mocks/handlers/backoffice/assets/logo_dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
51 changes: 51 additions & 0 deletions
51
src/Umbraco.Web.UI.Client/src/mocks/handlers/backoffice/assets/logo_light.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
28 changes: 12 additions & 16 deletions
28
...src/mocks/handlers/backoffice.handlers.ts → ...andlers/backoffice/backoffice.handlers.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,50 +1,46 @@ | ||
const { rest } = window.MockServiceWorker; | ||
import { umbracoPath } from '@umbraco-cms/backoffice/utils'; | ||
|
||
import logoUrl from '../../../../Umbraco.Cms.StaticAssets/wwwroot/umbraco/assets/logo.svg'; | ||
import loginLogoUrl from '../../../../Umbraco.Cms.StaticAssets/wwwroot/umbraco/assets/logo_light.svg'; | ||
import loginLogoAlternativeUrl from '../../../../Umbraco.Cms.StaticAssets/wwwroot/umbraco/assets/logo_dark.svg'; | ||
import loginBackgroundUrl from '../../../../Umbraco.Cms.StaticAssets/wwwroot/umbraco/assets/login.jpg'; | ||
const logoUrl = './src/mocks/handlers/backoffice/assets/logo.svg'; | ||
const loginLogoUrl = './src/mocks/handlers/backoffice/assets/logo_light.svg'; | ||
const loginLogoAlternativeUrl = './src/mocks/handlers/backoffice/assets/logo_dark.svg'; | ||
const loginBackgroundUrl = './src/mocks/handlers/backoffice/assets/login.jpg'; | ||
|
||
export const handlers = [ | ||
rest.get(umbracoPath('/security/back-office/graphics/logo'), async (req, res, ctx) => { | ||
const imageBuffer = await fetch(logoUrl) | ||
.then((res) => res.arrayBuffer()); | ||
const imageBuffer = await fetch(logoUrl).then((res) => res.arrayBuffer()); | ||
|
||
return res( | ||
ctx.set('Content-Length', imageBuffer.byteLength.toString()), | ||
ctx.set('Content-Type', 'image/svg+xml'), | ||
ctx.body(imageBuffer) | ||
ctx.body(imageBuffer), | ||
); | ||
}), | ||
rest.get(umbracoPath('/security/back-office/graphics/login-logo'), async (req, res, ctx) => { | ||
const imageBuffer = await fetch(loginLogoUrl) | ||
.then((res) => res.arrayBuffer()); | ||
const imageBuffer = await fetch(loginLogoUrl).then((res) => res.arrayBuffer()); | ||
|
||
return res( | ||
ctx.set('Content-Length', imageBuffer.byteLength.toString()), | ||
ctx.set('Content-Type', 'image/svg+xml'), | ||
ctx.body(imageBuffer) | ||
ctx.body(imageBuffer), | ||
); | ||
}), | ||
rest.get(umbracoPath('/security/back-office/graphics/login-logo-alternative'), async (req, res, ctx) => { | ||
const imageBuffer = await fetch(loginLogoAlternativeUrl) | ||
.then((res) => res.arrayBuffer()); | ||
const imageBuffer = await fetch(loginLogoAlternativeUrl).then((res) => res.arrayBuffer()); | ||
|
||
return res( | ||
ctx.set('Content-Length', imageBuffer.byteLength.toString()), | ||
ctx.set('Content-Type', 'image/svg+xml'), | ||
ctx.body(imageBuffer) | ||
ctx.body(imageBuffer), | ||
); | ||
}), | ||
rest.get(umbracoPath('/security/back-office/graphics/login-background'), async (req, res, ctx) => { | ||
const imageBuffer = await fetch(loginBackgroundUrl) | ||
.then((res) => res.arrayBuffer()); | ||
const imageBuffer = await fetch(loginBackgroundUrl).then((res) => res.arrayBuffer()); | ||
|
||
return res( | ||
ctx.set('Content-Length', imageBuffer.byteLength.toString()), | ||
ctx.set('Content-Type', 'image/jpeg'), | ||
ctx.body(imageBuffer) | ||
ctx.body(imageBuffer), | ||
); | ||
}), | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.