From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server-vie001.gnuweeb.org X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,URIBL_ZEN_BLOCKED_OPENDNS autolearn=ham autolearn_force=no version=3.4.6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gnuweeb.org; s=default; t=1737247199; bh=uXREjJ2HQYR2yF8L/MULa+TqsOwlC0vY9C0oTx2okbI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Transfer-Encoding:Message-ID:Date:From: Reply-To:Subject:To:Cc:In-Reply-To:References:Resent-Date: Resent-From:Resent-To:Resent-Cc:User-Agent:Content-Type: Content-Transfer-Encoding; b=K0CC+xS3xdAg+jozOzYvY2XxOnHFQeXQhE/pLHaISYuegKqlb78cJ/nJU+7DGPx98 o8bzn9+Q46TjX05EMHaus9AHinTfskkSDFcDjqJEyf594M4NoVFSmHwo2+a5VcDc0Y F8UsbbmEuABKeleUWAzazJhlNCXJXcFDGEb0H/qwis4Fft79IETycmLLaDG4w35tmQ rJWVMg+gVGp2OjL1Vf06g7z8lVmY1FkyyZwNw02hmGsFjG4IeNvu5vg2qfRTute6H/ gjiuBnSbLIwvS4rikl1aRI9fyxjhH2uhQjZsXNkrP+QamAUXRdny+h0wI75Ai90KqC uO/af3cP6sQtA== Received: from localhost.localdomain (unknown [101.128.125.239]) by server-vie001.gnuweeb.org (Postfix) with ESMTPSA id 7ABC82061C0B; Sun, 19 Jan 2025 00:39:58 +0000 (UTC) From: Muhammad Rizki To: Ammar Faizi Cc: Kiizuha Kanazawa , Alviro Iskandar Setiawan , Dwiky Rizky Ananditya , GNU/Weeb Mailing List Subject: [PATCH v1 06/16] feat(constants): add navigations and mail-config constant Date: Sun, 19 Jan 2025 07:38:59 +0700 Message-ID: <20250119003911.1183-7-kiizuha@gnuweeb.org> X-Mailer: git-send-email 2.45.2.windows.1 In-Reply-To: <20250119003911.1183-1-kiizuha@gnuweeb.org> References: <20250119003911.1183-1-kiizuha@gnuweeb.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: From: Kiizuha Kanazawa added navigations data for sidebar menu navigations and breadcrumb path. added mail-config to display it to the home page. Signed-off-by: Kiizuha Kanazawa --- src/lib/constants/index.ts | 4 +++ src/lib/constants/mail-config.ts | 48 ++++++++++++++++++++++++++++++++ src/lib/constants/navigations.ts | 15 ++++++++++ src/lib/typings/common.d.ts | 19 +++++++++++++ src/lib/typings/index.ts | 3 ++ 5 files changed, 89 insertions(+) create mode 100644 src/lib/constants/index.ts create mode 100644 src/lib/constants/mail-config.ts create mode 100644 src/lib/constants/navigations.ts create mode 100644 src/lib/typings/common.d.ts create mode 100644 src/lib/typings/index.ts diff --git a/src/lib/constants/index.ts b/src/lib/constants/index.ts new file mode 100644 index 0000000..fa59f7d --- /dev/null +++ b/src/lib/constants/index.ts @@ -0,0 +1,4 @@ +import { mailConfig } from "./mail-config"; +import { navigations } from "./navigations"; + +export { navigations, mailConfig }; diff --git a/src/lib/constants/mail-config.ts b/src/lib/constants/mail-config.ts new file mode 100644 index 0000000..7ca2d60 --- /dev/null +++ b/src/lib/constants/mail-config.ts @@ -0,0 +1,48 @@ +import * as typing from "$typings"; + +export const mailConfig: typing.MailConfig = { + incoming: [ + { + label: "Server", + value: "mail1.gnuweeb.org" + }, + { + label: "Protocol", + value: "IMAP" + }, + { + label: "Port", + value: "143" + }, + { + label: "SSL", + value: "STARTTLS" + }, + { + label: "Auth", + value: "Normal Password" + } + ], + outgoing: [ + { + label: "Server", + value: "mail1.gnuweeb.org" + }, + { + label: "Protocol", + value: "SMTP" + }, + { + label: "Port", + value: "587" + }, + { + label: "SSL", + value: "STARTTLS" + }, + { + label: "Auth", + value: "Normal Password" + } + ] +} as const; diff --git a/src/lib/constants/navigations.ts b/src/lib/constants/navigations.ts new file mode 100644 index 0000000..fc626aa --- /dev/null +++ b/src/lib/constants/navigations.ts @@ -0,0 +1,15 @@ +import * as typing from "$typings"; +import { Home, Settings } from "lucide-svelte"; + +export const navigations: typing.Navigations[] = [ + { + name: "Home", + icon: Home, + url: "/home" + }, + { + name: "Settings", + icon: Settings, + url: "/settings" + } +] as const; diff --git a/src/lib/typings/common.d.ts b/src/lib/typings/common.d.ts new file mode 100644 index 0000000..e2c0164 --- /dev/null +++ b/src/lib/typings/common.d.ts @@ -0,0 +1,19 @@ +import type { Icon as IconType } from "lucide-svelte"; + +export type RecordString = Record; + +export interface Navigations { + name: string; + icon?: typeof IconType; + url: string; +} + +export interface LabelAndValue { + label: string; + value: string; +} + +export interface MailConfig { + incoming: LabelAndValue[]; + outgoing: LabelAndValue[]; +} diff --git a/src/lib/typings/index.ts b/src/lib/typings/index.ts new file mode 100644 index 0000000..26ded78 --- /dev/null +++ b/src/lib/typings/index.ts @@ -0,0 +1,3 @@ +import type { RecordString, Navigations, LabelAndValue, MailConfig } from "./common"; + +export type { RecordString, Navigations, LabelAndValue, MailConfig }; -- Muhammad Rizki