Compare commits
No commits in common. "bebf2eba999d8a3ff43b05d71cee7720561188a7" and "b7794293469e1392e007055b02333e2ed22429be" have entirely different histories.
bebf2eba99
...
b779429346
|
@ -19,7 +19,7 @@
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
{/if}
|
{/if}
|
||||||
{#if config.showRefresh}
|
{#if config.showRefresh}
|
||||||
<button class:refreshing={config.refreshing} on:click={config.onRefresh} aria-label="Refresh">
|
<button on:click={config.onRefresh} aria-label="Refresh">
|
||||||
<IconRefresh />
|
<IconRefresh />
|
||||||
</button>
|
</button>
|
||||||
{/if}
|
{/if}
|
||||||
|
@ -67,11 +67,6 @@
|
||||||
gap: 0px;
|
gap: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.refreshing {
|
|
||||||
animation: spin 1.5s linear infinite;
|
|
||||||
transform-origin: 50% 45%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.content {
|
.content {
|
||||||
margin-top: 5px;
|
margin-top: 5px;
|
||||||
}
|
}
|
||||||
|
@ -87,18 +82,4 @@
|
||||||
button:hover {
|
button:hover {
|
||||||
color: var(--island-header-color);
|
color: var(--island-header-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
@keyframes spin {
|
|
||||||
0% {
|
|
||||||
transform: rotate(0deg);
|
|
||||||
color: white;
|
|
||||||
}
|
|
||||||
50% {
|
|
||||||
color: rgb(185, 185, 255);
|
|
||||||
}
|
|
||||||
100% {
|
|
||||||
transform: rotate(-360deg);
|
|
||||||
color: white;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -4,7 +4,6 @@ export interface CardConfig {
|
||||||
showRefresh: boolean;
|
showRefresh: boolean;
|
||||||
helpText: string;
|
helpText: string;
|
||||||
onRefresh: () => void;
|
onRefresh: () => void;
|
||||||
refreshing: boolean;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface LookupCardConfig {
|
export interface LookupCardConfig {
|
||||||
|
|
|
@ -10,7 +10,6 @@
|
||||||
showRefresh: false,
|
showRefresh: false,
|
||||||
helpText: config.helpText,
|
helpText: config.helpText,
|
||||||
onRefresh: () => {},
|
onRefresh: () => {},
|
||||||
refreshing: false,
|
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,6 @@
|
||||||
showRefresh: true,
|
showRefresh: true,
|
||||||
helpText: "Your location may not be accurate on desktop and laptop devices.",
|
helpText: "Your location may not be accurate on desktop and laptop devices.",
|
||||||
onRefresh: refresh,
|
onRefresh: refresh,
|
||||||
refreshing: false,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
function turnOnLocation() {
|
function turnOnLocation() {
|
||||||
|
@ -29,7 +28,6 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
function refresh() {
|
function refresh() {
|
||||||
config.refreshing = true;
|
|
||||||
stations = [];
|
stations = [];
|
||||||
getNearestStations();
|
getNearestStations();
|
||||||
}
|
}
|
||||||
|
@ -43,8 +41,6 @@
|
||||||
stations = apiResponse;
|
stations = apiResponse;
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
errorMessage = err as string;
|
errorMessage = err as string;
|
||||||
} finally {
|
|
||||||
config.refreshing = false;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue