mirror of
https://github.com/ivabus/gui
synced 2025-04-23 14:07:14 +03:00
Co-authored-by: neil <neil@neils-MacBook-Pro.local>
This commit is contained in:
parent
beb57ce015
commit
dd6fd4d299
5 changed files with 32 additions and 82 deletions
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@tea/desktop",
|
||||
"version": "0.0.3",
|
||||
"version": "0.0.4",
|
||||
"private": true,
|
||||
"description": "tea gui app",
|
||||
"author": "tea.xyz",
|
||||
|
|
|
@ -4,14 +4,14 @@
|
|||
import Preloader from '@tea/ui/Preloader/Preloader.svelte';
|
||||
import Package from "$components/packages/package.svelte";
|
||||
import { PackageStates } from '$libs/types';
|
||||
import Posts from '@tea/ui/posts/posts.svelte';
|
||||
// import Posts from '@tea/ui/posts/posts.svelte';
|
||||
|
||||
import { installPackage } from '@native';
|
||||
import type { AirtablePost } from '@tea/ui/types';
|
||||
let term: string;
|
||||
let packages: GUIPackage[] = [];
|
||||
let articles: AirtablePost[] = []; // news, blogs, etc
|
||||
let workshops: AirtablePost[] = []; // workshops, course
|
||||
// let articles: AirtablePost[] = []; // news, blogs, etc
|
||||
// let workshops: AirtablePost[] = []; // workshops, course
|
||||
let loading = true;
|
||||
|
||||
searchStore.subscribe((v) => {
|
||||
|
@ -20,21 +20,21 @@
|
|||
searchStore.packagesSearch.subscribe((pkgs) => {
|
||||
packages = pkgs;
|
||||
});
|
||||
searchStore.postsSearch.subscribe((posts) => {
|
||||
let partialArticles: AirtablePost[] = [];
|
||||
let partialWorkshops: AirtablePost[] = [];
|
||||
for (let post of posts) {
|
||||
if (post.tags.includes('news')) {
|
||||
partialArticles.push(post);
|
||||
}
|
||||
if (post.tags.includes('course') || post.tags.includes('featured_course')) {
|
||||
partialWorkshops.push(post);
|
||||
}
|
||||
}
|
||||
// searchStore.postsSearch.subscribe((posts) => {
|
||||
// let partialArticles: AirtablePost[] = [];
|
||||
// let partialWorkshops: AirtablePost[] = [];
|
||||
// for (let post of posts) {
|
||||
// if (post.tags.includes('news')) {
|
||||
// partialArticles.push(post);
|
||||
// }
|
||||
// if (post.tags.includes('course') || post.tags.includes('featured_course')) {
|
||||
// partialWorkshops.push(post);
|
||||
// }
|
||||
// }
|
||||
|
||||
articles = partialArticles;
|
||||
workshops = partialWorkshops;
|
||||
});
|
||||
// articles = partialArticles;
|
||||
// workshops = partialWorkshops;
|
||||
// });
|
||||
|
||||
searchStore.searching.subscribe((v) => (loading = v));
|
||||
|
||||
|
@ -54,8 +54,8 @@
|
|||
</header>
|
||||
<menu class="bg-accent flex h-8 w-full gap-4 px-4 text-xs">
|
||||
<button>packages ({packages.length})</button>
|
||||
<button>articles ({articles.length})</button>
|
||||
<button>workshops ({workshops.length})</button>
|
||||
<!-- <button>articles ({articles.length})</button>
|
||||
<button>workshops ({workshops.length})</button> -->
|
||||
</menu>
|
||||
<header class="text-primary p-4 text-lg">
|
||||
Top Package Results ({packages.length})
|
||||
|
@ -86,7 +86,7 @@
|
|||
{/each}
|
||||
{/if}
|
||||
</ul>
|
||||
<header class="text-primary p-4 text-lg">
|
||||
<!-- <header class="text-primary p-4 text-lg">
|
||||
Top Article Results ({articles.length})
|
||||
</header>
|
||||
{#if articles.length}
|
||||
|
@ -105,7 +105,7 @@
|
|||
<section class="border-gray h-64 border bg-black p-4">
|
||||
<Preloader />
|
||||
</section>
|
||||
{/if}
|
||||
{/if} -->
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
|
|
@ -35,15 +35,15 @@
|
|||
placeholder={$t("store-search-placeholder")}
|
||||
{onSearch}
|
||||
/>
|
||||
<ul class="text-gray flex gap-4 pr-4 pt-2 align-middle">
|
||||
<!-- <ul class="text-gray flex gap-4 pr-4 pt-2 align-middle">
|
||||
<button class="icon-filter hover:text-white" />
|
||||
<button class="icon-share hover:text-white" />
|
||||
<button class="icon-star-empty hover:text-white" />
|
||||
</ul>
|
||||
<ProfileNavButton />
|
||||
</ul> -->
|
||||
<SelectLang />
|
||||
<ProfileNavButton />
|
||||
</header>
|
||||
<menu
|
||||
<!-- <menu
|
||||
class="border-gray text-gray flex h-10 gap-4 border border-l-0 border-r-0 border-t-0 pl-4 align-middle leading-10"
|
||||
>
|
||||
<a href="/cli" class={currentPath === '/cli' ? 'active' : ''}>{$t('cli.install')}</a>
|
||||
|
@ -53,20 +53,13 @@
|
|||
<a href="https://github.com/teaxyz" target="_blank" rel="noreferrer">
|
||||
<i class="icon-star-empty" /> Github (5.2k)
|
||||
</a>
|
||||
</menu>
|
||||
</menu> -->
|
||||
|
||||
<style>
|
||||
@tailwind base;
|
||||
@tailwind components;
|
||||
@tailwind utilities;
|
||||
|
||||
menu > a:hover {
|
||||
color: white;
|
||||
}
|
||||
menu a.active {
|
||||
color: white;
|
||||
}
|
||||
|
||||
ul button {
|
||||
pointer-events: none;
|
||||
}
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
{#each $notificationStore as notification}
|
||||
<Notification {notification} />
|
||||
{/each}
|
||||
<section class="relative pt-24" bind:this={view}>
|
||||
<section class="relative pt-4" bind:this={view}>
|
||||
<div class="content">
|
||||
<TeaUpdate />
|
||||
</div>
|
||||
|
|
|
@ -1,53 +1,10 @@
|
|||
<!-- home / discover / welcome page -->
|
||||
<script lang="ts">
|
||||
<script>
|
||||
import '$appcss';
|
||||
import { t } from '$libs/translations';
|
||||
import PageHeader from '$components/page-header/page-header.svelte';
|
||||
import EssentialWorkshops from '$components/essential-workshops/essential-workshops.svelte';
|
||||
import Packages from '$components/packages/packages.svelte';
|
||||
import News from '$components/news/news.svelte';
|
||||
|
||||
import HeaderCard from '@tea/ui/header-card/header-card.svelte';
|
||||
import TopPackages from '$components/top-packages/top-packages.svelte';
|
||||
import TopScripts from '$components/top-scripts/top-scripts.svelte';
|
||||
import SearchPackages from '$components/search-packages/search-packages.svelte';
|
||||
</script>
|
||||
|
||||
<div>
|
||||
<PageHeader coverUrl="/images/headers/header_bg_1.png">{$t("home.discover-title")}</PageHeader>
|
||||
<section class="mt-8 mb-8">
|
||||
<Packages title={$t("package.foundation-essentials-title")} category="foundation_essentials" />
|
||||
</section>
|
||||
<PageHeader coverUrl="/images/headers/header_bg_1.png">{$t("home.asset-title")}</PageHeader>
|
||||
<section class="mt-8 mb-8 flex gap-4">
|
||||
<div>
|
||||
<HeaderCard
|
||||
title={$t("package.browse-cta")}
|
||||
imgUrl="/images/bored-ape.png"
|
||||
ctaUrl="/packages"
|
||||
ctaLabel={`${$t("package.browse-cta")} >`}
|
||||
articleTitle={$t("package.what-title")}
|
||||
description={$t("package.short-description")}
|
||||
/>
|
||||
<TopPackages />
|
||||
</div>
|
||||
<div>
|
||||
<HeaderCard
|
||||
title={$t("script.browse-cta")}
|
||||
imgUrl="/images/bored-ape.png"
|
||||
ctaUrl="/packages"
|
||||
ctaLabel={`${$t("script.browse-cta")} >`}
|
||||
articleTitle={$t("script.what-title")}
|
||||
description={$t("script.short-description")}
|
||||
/>
|
||||
<TopScripts/>
|
||||
</div>
|
||||
</section>
|
||||
<PageHeader coverUrl="/images/headers/header_bg_1.png">{$t("home.tutorials-title")}</PageHeader>
|
||||
<section class="mt-8 mb-8">
|
||||
<EssentialWorkshops title={$t("post.workshops-title")} ctaLabel={`${$t('post.article-more-cta')} >`} />
|
||||
</section>
|
||||
<PageHeader coverUrl="/images/headers/header_bg_1.png">{$t("home.os-news-title")}</PageHeader>
|
||||
<section class="mt-8">
|
||||
<News />
|
||||
</section>
|
||||
<PageHeader>Packages</PageHeader>
|
||||
<SearchPackages />
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue