Browser based potokens
This commit is contained in:
1 parent
5e798f19de
commit
63f9ac693a
27 files changed
+722
-499
No files matched your search
@@ -0,0 +1,26 @@
|
||||
<script lang="ts">
|
||||
import { PlayletApi } from "lib/Api/PlayletApi";
|
||||
import { translate } from "lib/Stores";
|
||||
import { get } from "svelte/store";
|
||||
|
||||
const textSizes = ["text-2xl", "text-lg", "text-base", "text-sm", "text-xs"];
|
||||
|
||||
export let displayText: string = "";
|
||||
// svelte-ignore unused-export-let
|
||||
export let key: string = "";
|
||||
export let description: string = "";
|
||||
export let level: number = 0;
|
||||
|
||||
async function clearPoTokens() {
|
||||
await PlayletApi.clearPoTokens();
|
||||
alert(get(translate)("PoTokens cleared."));
|
||||
}
|
||||
</script>
|
||||
|
||||
<div class="m-5">
|
||||
<div class={textSizes[level]}>{$translate(displayText)}</div>
|
||||
<div class="text-xs text-gray-500">{@html $translate(description)}</div>
|
||||
<button class="btn m-1" on:click={clearPoTokens}
|
||||
>{$translate("Clear PoTokens")}</button
|
||||
>
|
||||
</div>
|
||||
Reference in new issue
Block a user