Компоненты
parent
cc64ab1318
commit
34044cb800
@ -0,0 +1,52 @@
|
|||||||
|
<script>
|
||||||
|
import { Weed, StartFarDownloads, StartFarBooks } from "../wailsjs/go/main/App.js";
|
||||||
|
|
||||||
|
export let cnt_pic = "0";
|
||||||
|
export let downloads = "";
|
||||||
|
export let pics = true;
|
||||||
|
|
||||||
|
function weed() {
|
||||||
|
Weed().then(() => {
|
||||||
|
// Вызываем событие для обновления статуса
|
||||||
|
dispatch('status');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
import { createEventDispatcher } from 'svelte';
|
||||||
|
const dispatch = createEventDispatcher();
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<div class="container mx-auto pt-4 mb-8">
|
||||||
|
<h1 class="text-blue-200 text-2xl">УТИЛИТЫ</h1>
|
||||||
|
<div class="flex flex-col h-full justify-between">
|
||||||
|
<div class="h-24">
|
||||||
|
<div class="flex justify-between px-4">
|
||||||
|
<button class="text-teal-600 hover:text-teal-200 hover:font-normal hover:underline hover:underline-offset-2 cursor-pointer" on:click={weed}> Weed (python) </button>
|
||||||
|
|
||||||
|
<div class="text-neutral-300">
|
||||||
|
<span class={pics ? "warning" : "info"}>{cnt_pic}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="flex justify-between px-4">
|
||||||
|
<button class="text-teal-600 hover:text-teal-200 hover:font-normal hover:underline hover:underline-offset-2 cursor-pointer"
|
||||||
|
on:click={StartFarDownloads}> Download </button>
|
||||||
|
<div class="text-neutral-300">
|
||||||
|
<span class="info">{downloads}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="flex justify-between px-4">
|
||||||
|
<button class="text-teal-600 hover:text-teal-200 hover:font-normal hover:underline hover:underline-offset-2 cursor-pointer"
|
||||||
|
on:click={StartFarBooks}> Books </button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.info {
|
||||||
|
color: lightgreen;
|
||||||
|
}
|
||||||
|
.warning {
|
||||||
|
color: orange;
|
||||||
|
}
|
||||||
|
</style>
|
Loading…
Reference in New Issue