mirror of
https://github.com/ankitects/anki.git
synced 2025-11-06 12:47:11 -05:00
add components
This commit is contained in:
parent
c08f86ce5d
commit
54d9a19a1c
2 changed files with 83 additions and 0 deletions
55
qt/launcher-gui/src/routes/ErrorState.svelte
Normal file
55
qt/launcher-gui/src/routes/ErrorState.svelte
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
<!--
|
||||
Copyright: Ankitects Pty Ltd and contributors
|
||||
License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||
-->
|
||||
|
||||
<script lang="ts">
|
||||
import Icon from "$lib/components/Icon.svelte";
|
||||
import IconConstrain from "$lib/components/IconConstrain.svelte";
|
||||
import { alertIcon } from "$lib/components/icons";
|
||||
|
||||
let {
|
||||
title,
|
||||
detail,
|
||||
footer = $bindable(),
|
||||
}: { title: string; detail: string; footer: any } = $props();
|
||||
|
||||
footer = null;
|
||||
</script>
|
||||
|
||||
<div class="outer">
|
||||
<div class="inner">
|
||||
<IconConstrain iconSize={300}>
|
||||
<Icon icon={alertIcon} />
|
||||
</IconConstrain>
|
||||
</div>
|
||||
<div class="title">{title}</div>
|
||||
<div class="detail">{detail}</div>
|
||||
</div>
|
||||
|
||||
<style lang="scss">
|
||||
.outer {
|
||||
margin-top: 50px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.inner {
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
margin: 0 auto;
|
||||
|
||||
& :global(svg) {
|
||||
position: relative;
|
||||
}
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: x-large;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.detail {
|
||||
font-size: medium;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
28
qt/launcher-gui/src/routes/Uninstall.svelte
Normal file
28
qt/launcher-gui/src/routes/Uninstall.svelte
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
<!--
|
||||
Copyright: Ankitects Pty Ltd and contributors
|
||||
License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||
-->
|
||||
|
||||
<script lang="ts">
|
||||
let { footer = $bindable() }: { footer: any } = $props();
|
||||
|
||||
footer = null;
|
||||
</script>
|
||||
|
||||
<div class="outer">
|
||||
<div id="label">TODO: Uninstall</div>
|
||||
</div>
|
||||
|
||||
<style lang="scss">
|
||||
.outer {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
}
|
||||
|
||||
#label {
|
||||
font-size: x-large;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
Loading…
Reference in a new issue