forked from quoid/userscripts
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLoader.svelte
More file actions
44 lines (39 loc) · 1.05 KB
/
Copy pathLoader.svelte
File metadata and controls
44 lines (39 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<script>
import {fade} from "svelte/transition";
import {state} from "../../store.js";
import iconLoader from "../../img/icon-loader.svg";
function abort() {
safari.extension.dispatchMessage("REQ_CANCEL_ALL_REMOTE_REQUESTS");
}
</script>
<style>
.container {
align-items: center;
background-color: inherit;
display: flex;
flex-direction: column;
height: 100%;
justify-content: center;
left: 0;
position: absolute;
top: 0;
width: 100%;
z-index: 90;
}
.container :global(svg) {
height: 2rem;
width: 2rem;
}
.container div {
color: var(--text-color-disabled);
font: var(--text-small);
letter-spacing: var(--letter-spacing-small);
margin-top: 1rem;
}
</style>
<div class="container" out:fade="{{duration: 125}}">
{@html iconLoader}
{#if $state.includes("fetching")}
<div>Fetching resources, <span class="link" on:click={abort}>cancel request</span></div>
{/if}
</div>