25 |
26 |
27 | Status:
28 |
29 | {result.response.status}
30 |  • 
31 | {statusCode}
32 |
33 |
34 |
35 |
36 | Time:
37 |
38 | {Math.floor(result.response.time)} ms
39 |
40 |
41 |
42 |
43 | Size:
44 |
45 | {formatBytes(result.response.blob.size, 2)}
46 |
47 |
48 |
49 |
50 |
--------------------------------------------------------------------------------
/src/lib/components/mode-watcher/without-transition.ts:
--------------------------------------------------------------------------------
1 | // Original Source: https://reemus.dev/article/disable-css-transition-color-scheme-change#heading-ultimate-solution-for-changing-color-scheme-without-transitions
2 |
3 | let timeoutAction: number;
4 | let timeoutEnable: number;
5 |
6 | // Perform a task without any css transitions
7 | // eslint-disable-next-line ts/no-explicit-any
8 | export function withoutTransition(action: () => any) {
9 | if (typeof document === 'undefined') return;
10 | // Clear fallback timeouts
11 | clearTimeout(timeoutAction);
12 | clearTimeout(timeoutEnable);
13 |
14 | // Create style element to disable transitions
15 | const style = document.createElement('style');
16 | const css = document.createTextNode(`* {
17 | -webkit-transition: none !important;
18 | -moz-transition: none !important;
19 | -o-transition: none !important;
20 | -ms-transition: none !important;
21 | transition: none !important;
22 | }`);
23 | style.appendChild(css);
24 |
25 | // Functions to insert and remove style element
26 | const disable = () => document.head.appendChild(style);
27 | const enable = () => document.head.removeChild(style);
28 |
29 | // Best method, getComputedStyle forces browser to repaint
30 | if (typeof window.getComputedStyle !== 'undefined') {
31 | disable();
32 | action();
33 | const _ = window.getComputedStyle(style).opacity;
34 | enable();
35 | return;
36 | }
37 |
38 | // Better method, requestAnimationFrame processes function before next repaint
39 | if (typeof window.requestAnimationFrame !== 'undefined') {
40 | disable();
41 | action();
42 | window.requestAnimationFrame(enable);
43 | return;
44 | }
45 |
46 | // Fallback
47 | disable();
48 | timeoutAction = window.setTimeout(() => {
49 | action();
50 | timeoutEnable = window.setTimeout(enable, 120);
51 | }, 120);
52 | }
53 |
--------------------------------------------------------------------------------
/src/lib/features/rest/views/view-welcome/view-welcome.view.svelte:
--------------------------------------------------------------------------------
1 |
12 |
13 |
16 |
17 |