remove welcome banner (#549)

Co-authored-by: neil molina <neil@neils-MacBook-Pro.local>
This commit is contained in:
Neil 2023-05-04 08:07:59 +08:00 committed by GitHub
parent 9169664f9d
commit 7f7efdffac
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 1 additions and 69 deletions

View file

@ -1,62 +0,0 @@
<script lang="ts">
import Button from "@tea/ui/button/button.svelte";
import clickOutside from "@tea/ui/lib/clickOutside";
import { authStore } from "$libs/stores";
const close = () => {
authStore.updateSession({ hide_welcome: true });
};
</script>
<section class="fixed left-0 top-0 z-50 flex items-center justify-center">
<aside class="relative" use:clickOutside on:click_outside={() => close()}>
<article class="margin-auto flex rounded-md border border-gray p-2">
<figure>
<img class="object-contain" src="/images/welcome-bg.png" alt="welcome" />
</figure>
<div class="relative mt-20 flex-grow px-12">
<h1 class="mb-4 text-4xl text-primary">tea, the open store</h1>
<p class="mb-4 font-inter">
tea is your gateway to the vibrant world of open-source software; a treasure-trove of
apps, frameworks, libraries, tools, utilities and games. previously only accessible to the
tech-savvy, tea unleashes the power of open source for everyone. install packages, get
updates and stay secure—all in the click of a button. under the hood is the invisible yet
powerful tea/cli.
</p>
<Button type="plain" color="secondary" class="w-7/12" onClick={() => close()}>
START EXPLORING
</Button>
</div>
</article>
<button
class="icon-tea-x-btn absolute right-5 top-5 text-gray"
on:click={() => {
close();
}}
/>
</aside>
</section>
<style>
section {
width: 100%;
height: 100vh;
background: rgba(0, 0, 0, 0.5);
}
article {
height: 472px;
width: 725px;
background: rgba(0, 0, 0, 0.8);
}
figure {
min-width: 140px;
}
img {
height: 100%;
}
</style>

View file

@ -57,7 +57,6 @@ export interface Session {
key?: string;
user?: Developer;
locale?: string;
hide_welcome?: boolean;
}
export enum SideMenuOptions {

View file

@ -4,20 +4,18 @@
import { page } from "$app/stores";
import { t } from "$libs/translations";
import { afterNavigate } from "$app/navigation";
import { packagesStore, authStore } from "$libs/stores";
import { packagesStore } from "$libs/stores";
import Packages from "$components/packages/packages.svelte";
import DiscoverPackages from "$components/discover-packages/discover-packages.svelte";
import { PackageStates, SideMenuOptions, type GUIPackage } from "$libs/types";
// import SortingButtons from "$components/search-packages/sorting-buttons.svelte";
import SideMenu from "$components/side-menu/side-menu.svelte";
import NotificationBar from "$components/notification-bar/notification-bar.svelte";
import WelcomeModal from "$components/welcome-modal/welcome-modal.svelte";
import Button from "@tea/ui/button/button.svelte";
import log from "$libs/logger";
import { formatPercent } from "@tea/ui/lib/percent";
const { packageList } = packagesStore;
const { session } = authStore;
const url = $page.url;
@ -112,9 +110,6 @@
</div>
<SideMenu bind:activeOption={sideMenuOption} />
{#if !$session.hide_welcome}
<WelcomeModal />
{/if}
<style>
#content {