Skip to content

Commit

Permalink
add mdx
Browse files Browse the repository at this point in the history
  • Loading branch information
pacholoamit committed May 23, 2023
1 parent 213fd26 commit b17dfe5
Show file tree
Hide file tree
Showing 121 changed files with 1,248 additions and 6 deletions.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
"@mantine/form": "^6.0.10",
"@mantine/hooks": "^6.0.10",
"@mantine/notifications": "^6.0.10",
"@mdx-js/mdx": "next",
"@mdx-js/react": "^2.3.0",
"@mdx-js/rollup": "^2.3.0",
"@tabler/icons-react": "^2.17.0",
"@tauri-apps/api": "^1.3.0",
"apexcharts": "^3.40.0",
Expand Down
3 changes: 3 additions & 0 deletions src/features/settings/mdx/about.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# 💯 Motivation

The inspiration for Pachtop stems mainly from using [Stacer](https://oguzhaninan.github.io/Stacer-Web/) which is a comprehensive System optimizer and monitoring solution. Although, Pachtop does not implement any system optimizer functionality (yet!), It provides more in-depth metrics and information about your system. I wanted to create a similar application to Stacer but with a more modern UI and a more robust codebase. I also wanted to learn Rust and this seemed like a good opportunity to do so. If you hadn't guessed, Pachtop is named after the legendary [top](<https://en.wikipedia.org/wiki/Top_(software)>) linux program that displays information about CPU and memory utilization. Pachtop will always remain open-source and free to use.
12 changes: 10 additions & 2 deletions src/features/settings/pages/settings.page.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,21 @@
import React from "react";
import AutoStartSettingsView from "@/features/settings/views/autostart.view";
import AboutView from "@/features/settings/views/about.view";
import PageWrapper from "@/components/page-wrapper";
import Card from "@/components/card";

import { Icon24Hours } from "@tabler/icons-react";
import { Icon24Hours, IconGitBranch } from "@tabler/icons-react";
import { Center, Grid, NavLink } from "@mantine/core";
import { useState } from "react";

const settings = [{ icon: Icon24Hours, label: "Auto Start", view: <AutoStartSettingsView /> }];
const settings = [
{ icon: Icon24Hours, label: "Auto Start", view: <AutoStartSettingsView /> },
{
icon: IconGitBranch,
label: "About",
view: <AboutView />,
},
];

const SettingsPage = () => {
const [active, setActive] = useState(0);
Expand Down
7 changes: 7 additions & 0 deletions src/features/settings/views/about.view.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import About from "@/features/settings/mdx/about.mdx";

const AboutView = () => {
return <About />;
};

export default AboutView;
14 changes: 12 additions & 2 deletions vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,20 @@
import { defineConfig } from "vite";
import { defineConfig, optimizeDeps } from "vite";
import react from "@vitejs/plugin-react";
import mdx from "@mdx-js/rollup";
import * as path from "path";

// https://vitejs.dev/config/
export default defineConfig({
plugins: [react()],
optimizeDeps: {
include: ["react/jsx-runtime"],
},
plugins: [
react(),

mdx({
remarkPlugins: [],
}),
],
resolve: {
alias: { "@": path.resolve(__dirname, "src") },
},
Expand Down
Loading

0 comments on commit b17dfe5

Please sign in to comment.