public inbox for [email protected]
 help / color / mirror / Atom feed
From: Muhammad Rizki <[email protected]>
To: Ammar Faizi <[email protected]>
Cc: Kiizuha Kanazawa <[email protected]>,
	Alviro Iskandar Setiawan <[email protected]>,
	Dwiky Rizky Ananditya <[email protected]>,
	GNU/Weeb Mailing List <[email protected]>
Subject: [PATCH v1 06/16] feat(constants): add navigations and mail-config constant
Date: Sun, 19 Jan 2025 07:38:59 +0700	[thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>

From: Kiizuha Kanazawa <[email protected]>

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 <[email protected]>
---
 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<string, string>;
+
+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


  parent reply	other threads:[~2025-01-19  0:39 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-19  0:38 [PATCH v1 00/16] Refactor GNU/Weeb Mail Site Muhammad Rizki
2025-01-19  0:38 ` [PATCH v1 01/16] feat(routes): configure page layout options Muhammad Rizki
2025-01-19  0:38 ` [PATCH v1 02/16] feat(fonts): add Google fonts Muhammad Rizki
2025-01-19  0:38 ` [PATCH v1 03/16] feat(components): add shadcn-svelte components Muhammad Rizki
2025-01-19  0:38 ` [PATCH v1 04/16] feat(deps): add `axios` as HTTP client Muhammad Rizki
2025-01-19  0:38 ` [PATCH v1 05/16] feat(deps): add `svelte-copy` dependency Muhammad Rizki
2025-01-19  0:38 ` Muhammad Rizki [this message]
2025-01-19  0:39 ` [PATCH v1 07/16] feat(components): add loading spinner component Muhammad Rizki
2025-01-19  0:39 ` [PATCH v1 08/16] feat(components): add header component Muhammad Rizki
2025-01-19  0:39 ` [PATCH v1 09/16] feat: initial hooks, schemas, typings for the login functions Muhammad Rizki
2025-01-19  0:39 ` [PATCH v1 10/16] feat(components): add app-sidebar component Muhammad Rizki
2025-01-19  0:39 ` [PATCH v1 11/16] feat(routes): create initial settings page Muhammad Rizki
2025-01-19  0:39 ` [PATCH v1 12/16] feat(routes): add home page Muhammad Rizki
2025-01-19  0:39 ` [PATCH v1 13/16] feat(routes): add main layout for the protected routes Muhammad Rizki
2025-01-19  0:39 ` [PATCH v1 14/16] feat(routes): add login page Muhammad Rizki
2025-01-19  0:39 ` [PATCH v1 15/16] chore(.gitignore): add patch files ignore Muhammad Rizki
2025-01-19  0:39 ` [PATCH v1 16/16] chore: update README.md Muhammad Rizki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox