From 95b2c508a7a3e9c6c3958e9b12c1e42a2519e657 Mon Sep 17 00:00:00 2001 From: amhsirak Date: Fri, 6 Dec 2024 04:29:40 +0530 Subject: [PATCH 01/41] chore: proper spacing --- src/components/molecules/IntegrationSettings.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/components/molecules/IntegrationSettings.tsx b/src/components/molecules/IntegrationSettings.tsx index c31605de..a8c19961 100644 --- a/src/components/molecules/IntegrationSettings.tsx +++ b/src/components/molecules/IntegrationSettings.tsx @@ -15,11 +15,13 @@ import { useGlobalInfoStore } from "../../context/globalInfo"; import { getStoredRecording } from "../../api/storage"; import { apiUrl } from "../../apiConfig.js"; import Cookies from 'js-cookie'; + interface IntegrationProps { isOpen: boolean; handleStart: (data: IntegrationSettings) => void; handleClose: () => void; } + export interface IntegrationSettings { spreadsheetId: string; spreadsheetName: string; From 4550718e4d6079ee46c96d4c15348d20b73e9b05 Mon Sep 17 00:00:00 2001 From: amhsirak Date: Fri, 6 Dec 2024 04:37:39 +0530 Subject: [PATCH 02/41] chore: lint --- src/components/molecules/IntegrationSettings.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/components/molecules/IntegrationSettings.tsx b/src/components/molecules/IntegrationSettings.tsx index a8c19961..b34bc0e9 100644 --- a/src/components/molecules/IntegrationSettings.tsx +++ b/src/components/molecules/IntegrationSettings.tsx @@ -77,8 +77,7 @@ export const IntegrationSettingsModal = ({ ); notify( "error", - `Error fetching spreadsheet files: ${ - error.response?.data?.message || error.message + `Error fetching spreadsheet files: ${error.response?.data?.message || error.message }` ); } From a6f4d0436b28298cdb6b0c388470ef1b2d4a33e2 Mon Sep 17 00:00:00 2001 From: amhsirak Date: Fri, 6 Dec 2024 04:56:31 +0530 Subject: [PATCH 03/41] feat: show maxun version --- src/components/molecules/NavBar.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/components/molecules/NavBar.tsx b/src/components/molecules/NavBar.tsx index ee8c80e8..8d195ebc 100644 --- a/src/components/molecules/NavBar.tsx +++ b/src/components/molecules/NavBar.tsx @@ -11,6 +11,7 @@ import { SaveRecording } from '../molecules/SaveRecording'; import DiscordIcon from '../atoms/DiscordIcon'; import { apiUrl } from '../../apiConfig'; import MaxunLogo from "../../assets/maxunlogo.png"; +import packageJson from "../../../package.json" interface NavBarProps { recordingName: string; @@ -57,7 +58,11 @@ export const NavBar: React.FC = ({ recordingName, isRecording }) => justifyContent: 'flex-start', }}> -
Maxun
+
Maxun
{ user ? ( From bbf9699dfd314021f4164794c779289d1838e470 Mon Sep 17 00:00:00 2001 From: amhsirak Date: Fri, 6 Dec 2024 04:57:09 +0530 Subject: [PATCH 04/41] chore: lint --- src/components/molecules/NavBar.tsx | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/components/molecules/NavBar.tsx b/src/components/molecules/NavBar.tsx index 8d195ebc..bc373576 100644 --- a/src/components/molecules/NavBar.tsx +++ b/src/components/molecules/NavBar.tsx @@ -58,11 +58,13 @@ export const NavBar: React.FC = ({ recordingName, isRecording }) => justifyContent: 'flex-start', }}> -
Maxun
+
Maxun + +
{ user ? ( From 8a0f2b6ca54705bf6168bc269e4ae09161d966f9 Mon Sep 17 00:00:00 2001 From: amhsirak Date: Fri, 6 Dec 2024 05:00:46 +0530 Subject: [PATCH 05/41] feat: format version chip --- src/components/molecules/NavBar.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/molecules/NavBar.tsx b/src/components/molecules/NavBar.tsx index bc373576..6b2bfa92 100644 --- a/src/components/molecules/NavBar.tsx +++ b/src/components/molecules/NavBar.tsx @@ -58,14 +58,14 @@ export const NavBar: React.FC = ({ recordingName, isRecording }) => justifyContent: 'flex-start', }}> -
Maxun +
Maxun
- { user ? (
From 76255c21eaffd2eb705f234357d0be4b4ccff29a Mon Sep 17 00:00:00 2001 From: amhsirak Date: Fri, 6 Dec 2024 05:05:25 +0530 Subject: [PATCH 06/41] chore: remove unused chip import --- src/components/molecules/Pair.tsx | 2 +- src/components/molecules/RobotDuplicate.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/molecules/Pair.tsx b/src/components/molecules/Pair.tsx index b05b912d..3c332600 100644 --- a/src/components/molecules/Pair.tsx +++ b/src/components/molecules/Pair.tsx @@ -1,5 +1,5 @@ import React, { FC, useState } from 'react'; -import { Stack, Button, IconButton, Tooltip, Chip, Badge } from "@mui/material"; +import { Stack, Button, IconButton, Tooltip, Badge } from "@mui/material"; import { AddPair, deletePair, UpdatePair } from "../../api/workflow"; import { WorkflowFile } from "maxun-core"; import { ClearButton } from "../atoms/buttons/ClearButton"; diff --git a/src/components/molecules/RobotDuplicate.tsx b/src/components/molecules/RobotDuplicate.tsx index 850614b0..38b7b422 100644 --- a/src/components/molecules/RobotDuplicate.tsx +++ b/src/components/molecules/RobotDuplicate.tsx @@ -1,6 +1,6 @@ import React, { useState, useEffect } from 'react'; import { GenericModal } from "../atoms/GenericModal"; -import { TextField, Typography, Box, Button, Chip } from "@mui/material"; +import { TextField, Typography, Box, Button } from "@mui/material"; import { modalStyle } from "./AddWhereCondModal"; import { useGlobalInfoStore } from '../../context/globalInfo'; import { duplicateRecording, getStoredRecording } from '../../api/storage'; From 2ea64385c389178972e7d2a00930f55b7dfdab1e Mon Sep 17 00:00:00 2001 From: amhsirak Date: Sun, 8 Dec 2024 20:26:34 +0530 Subject: [PATCH 07/41] feat: youtube icon --- src/components/molecules/NavBar.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/molecules/NavBar.tsx b/src/components/molecules/NavBar.tsx index 6b2bfa92..6ecf9b61 100644 --- a/src/components/molecules/NavBar.tsx +++ b/src/components/molecules/NavBar.tsx @@ -4,7 +4,7 @@ import styled from "styled-components"; import { stopRecording } from "../../api/recording"; import { useGlobalInfoStore } from "../../context/globalInfo"; import { IconButton, Menu, MenuItem, Typography, Avatar, Chip, } from "@mui/material"; -import { AccountCircle, Logout, Clear } from "@mui/icons-material"; +import { AccountCircle, Logout, Clear, YouTube } from "@mui/icons-material"; import { useNavigate } from 'react-router-dom'; import { AuthContext } from '../../context/auth'; import { SaveRecording } from '../molecules/SaveRecording'; @@ -114,6 +114,9 @@ export const NavBar: React.FC = ({ recordingName, isRecording }) => { handleMenuClose(); logout(); }}> Logout + { handleMenuClose(); logout(); }}> + YouTube + ) : ( From e2cb4c7613d570b0fd4cd7f8a826fe3a6e019c85 Mon Sep 17 00:00:00 2001 From: amhsirak Date: Sun, 8 Dec 2024 20:29:53 +0530 Subject: [PATCH 08/41] feat: youtube link --- src/components/molecules/NavBar.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/molecules/NavBar.tsx b/src/components/molecules/NavBar.tsx index 6ecf9b61..9e0f6642 100644 --- a/src/components/molecules/NavBar.tsx +++ b/src/components/molecules/NavBar.tsx @@ -114,7 +114,9 @@ export const NavBar: React.FC = ({ recordingName, isRecording }) => { handleMenuClose(); logout(); }}> Logout - { handleMenuClose(); logout(); }}> + { + window.open('https://www.youtube.com/@MaxunOSS/videos', '_blank'); + }}> YouTube From 99d62101cb512ff675b465959391c8dfe68c80ff Mon Sep 17 00:00:00 2001 From: amhsirak Date: Sun, 8 Dec 2024 20:30:11 +0530 Subject: [PATCH 09/41] chore: lint --- src/components/molecules/NavBar.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/molecules/NavBar.tsx b/src/components/molecules/NavBar.tsx index 9e0f6642..d6855184 100644 --- a/src/components/molecules/NavBar.tsx +++ b/src/components/molecules/NavBar.tsx @@ -114,8 +114,8 @@ export const NavBar: React.FC = ({ recordingName, isRecording }) => { handleMenuClose(); logout(); }}> Logout - { - window.open('https://www.youtube.com/@MaxunOSS/videos', '_blank'); + { + window.open('https://www.youtube.com/@MaxunOSS/videos', '_blank'); }}> YouTube From 69757050a9ac59a6ceca27a5c74a880551aba120 Mon Sep 17 00:00:00 2001 From: amhsirak Date: Sun, 8 Dec 2024 20:32:41 +0530 Subject: [PATCH 10/41] feat: x link --- src/components/molecules/NavBar.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/components/molecules/NavBar.tsx b/src/components/molecules/NavBar.tsx index d6855184..28ca959a 100644 --- a/src/components/molecules/NavBar.tsx +++ b/src/components/molecules/NavBar.tsx @@ -4,7 +4,7 @@ import styled from "styled-components"; import { stopRecording } from "../../api/recording"; import { useGlobalInfoStore } from "../../context/globalInfo"; import { IconButton, Menu, MenuItem, Typography, Avatar, Chip, } from "@mui/material"; -import { AccountCircle, Logout, Clear, YouTube } from "@mui/icons-material"; +import { AccountCircle, Logout, Clear, YouTube, X } from "@mui/icons-material"; import { useNavigate } from 'react-router-dom'; import { AuthContext } from '../../context/auth'; import { SaveRecording } from '../molecules/SaveRecording'; @@ -119,6 +119,11 @@ export const NavBar: React.FC = ({ recordingName, isRecording }) => }}> YouTube + { + window.open('https://x.com/maxun_io', '_blank'); + }}> + Twiiter (X) + ) : ( From 7186540ed94dbace62f45bbfd94725ffc4c1c2c2 Mon Sep 17 00:00:00 2001 From: amhsirak Date: Sun, 8 Dec 2024 20:37:48 +0530 Subject: [PATCH 11/41] feat: increase width of menu --- src/components/molecules/NavBar.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/molecules/NavBar.tsx b/src/components/molecules/NavBar.tsx index 28ca959a..68b452db 100644 --- a/src/components/molecules/NavBar.tsx +++ b/src/components/molecules/NavBar.tsx @@ -110,6 +110,7 @@ export const NavBar: React.FC = ({ recordingName, isRecording }) => vertical: 'top', horizontal: 'right', }} + PaperProps={{sx: {width: '180px'}}} > { handleMenuClose(); logout(); }}> Logout From a8ea05527b28a109709d71249a69977466921ead Mon Sep 17 00:00:00 2001 From: amhsirak Date: Sun, 8 Dec 2024 20:42:24 +0530 Subject: [PATCH 12/41] feat: move discord icon to menu --- src/components/molecules/NavBar.tsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/components/molecules/NavBar.tsx b/src/components/molecules/NavBar.tsx index 68b452db..e8d154ef 100644 --- a/src/components/molecules/NavBar.tsx +++ b/src/components/molecules/NavBar.tsx @@ -115,6 +115,11 @@ export const NavBar: React.FC = ({ recordingName, isRecording }) => { handleMenuClose(); logout(); }}> Logout + { + window.open('https://discord.gg/5GbPjBUkws', '_blank'); + }}> + Discord + { window.open('https://www.youtube.com/@MaxunOSS/videos', '_blank'); }}> From 8d6b962301ae1108b409afc251bb6b61340aba72 Mon Sep 17 00:00:00 2001 From: amhsirak Date: Sun, 8 Dec 2024 20:42:54 +0530 Subject: [PATCH 13/41] feat: remove discord icon button --- src/components/molecules/NavBar.tsx | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/src/components/molecules/NavBar.tsx b/src/components/molecules/NavBar.tsx index e8d154ef..2d1096a5 100644 --- a/src/components/molecules/NavBar.tsx +++ b/src/components/molecules/NavBar.tsx @@ -71,21 +71,6 @@ export const NavBar: React.FC = ({ recordingName, isRecording }) =>
{!isRecording ? ( <> - - - Date: Sun, 8 Dec 2024 20:55:24 +0530 Subject: [PATCH 14/41] feat: add ref to yt x links --- src/components/molecules/NavBar.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/molecules/NavBar.tsx b/src/components/molecules/NavBar.tsx index 2d1096a5..ef1f9878 100644 --- a/src/components/molecules/NavBar.tsx +++ b/src/components/molecules/NavBar.tsx @@ -106,12 +106,12 @@ export const NavBar: React.FC = ({ recordingName, isRecording }) => Discord { - window.open('https://www.youtube.com/@MaxunOSS/videos', '_blank'); + window.open('https://www.youtube.com/@MaxunOSS/videos?ref=app', '_blank'); }}> YouTube { - window.open('https://x.com/maxun_io', '_blank'); + window.open('https://x.com/maxun_io?ref=app', '_blank'); }}> Twiiter (X) From f8f1d926d99cd495e8196823e28cf5d62642ad5c Mon Sep 17 00:00:00 2001 From: amhsirak Date: Sun, 8 Dec 2024 21:08:20 +0530 Subject: [PATCH 15/41] wip: upgrade maxun button --- src/components/molecules/NavBar.tsx | 97 ++++++++++++++++++++++++++++- 1 file changed, 96 insertions(+), 1 deletion(-) diff --git a/src/components/molecules/NavBar.tsx b/src/components/molecules/NavBar.tsx index ef1f9878..9b1e9472 100644 --- a/src/components/molecules/NavBar.tsx +++ b/src/components/molecules/NavBar.tsx @@ -3,7 +3,7 @@ import axios from 'axios'; import styled from "styled-components"; import { stopRecording } from "../../api/recording"; import { useGlobalInfoStore } from "../../context/globalInfo"; -import { IconButton, Menu, MenuItem, Typography, Avatar, Chip, } from "@mui/material"; +import { IconButton, Menu, MenuItem, Typography, Avatar, Chip, Button, Modal, Tabs, Tab, Box } from "@mui/material"; import { AccountCircle, Logout, Clear, YouTube, X } from "@mui/icons-material"; import { useNavigate } from 'react-router-dom'; import { AuthContext } from '../../context/auth'; @@ -25,6 +25,38 @@ export const NavBar: React.FC = ({ recordingName, isRecording }) => const navigate = useNavigate(); const [anchorEl, setAnchorEl] = useState(null); + const currentVersion = "0.0.3"; // Dynamically fetch from package.json + + const [open, setOpen] = useState(false); + const [latestVersion, setLatestVersion] = useState(null); + const [tab, setTab] = useState(0); + + const fetchLatestVersion = async () => { + try { + const response = await fetch("https://api.github.com/repos/getmaxun/maxun/releases/latest"); + const data = await response.json(); + const version = data.tag_name.replace(/^v/, ""); // Remove 'v' prefix + setLatestVersion(version); + } catch (error) { + console.error("Failed to fetch latest version:", error); + setLatestVersion(null); // Handle errors gracefully + } + }; + + const handleOpen = () => { + setOpen(true); + fetchLatestVersion(); + }; + + const handleClose = () => { + setOpen(false); + setTab(0); // Reset tab to the first tab + }; + + const handleTabChange = (newValue: any) => { + setTab(newValue); + }; + const handleMenuOpen = (event: React.MouseEvent) => { setAnchorEl(event.currentTarget); @@ -71,6 +103,69 @@ export const NavBar: React.FC = ({ recordingName, isRecording }) =>
{!isRecording ? ( <> + + + + {latestVersion === null ? ( + Checking for updates... + ) : currentVersion === latestVersion ? ( + + 🎉 You're up to date! + + ) : ( + <> + + A new version is available: {latestVersion} + + + + + + {tab === 0 && ( + + Manual Upgrade + + git pull origin main +
+ npm install +
+ npm run start +
+
+ )} + {tab === 1 && ( + + Docker Compose Upgrade + + docker pull getmaxun/maxun:latest +
+ docker-compose up -d +
+
+ )} + + )} +
+
Date: Sun, 8 Dec 2024 21:09:42 +0530 Subject: [PATCH 16/41] refactor: rename menu & tab update functions --- src/components/molecules/NavBar.tsx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/components/molecules/NavBar.tsx b/src/components/molecules/NavBar.tsx index 9b1e9472..bef197fa 100644 --- a/src/components/molecules/NavBar.tsx +++ b/src/components/molecules/NavBar.tsx @@ -43,17 +43,17 @@ export const NavBar: React.FC = ({ recordingName, isRecording }) => } }; - const handleOpen = () => { + const handleUpdateOpen = () => { setOpen(true); fetchLatestVersion(); }; - const handleClose = () => { + const handleUpdateClose = () => { setOpen(false); setTab(0); // Reset tab to the first tab }; - const handleTabChange = (newValue: any) => { + const handleUpdateTabChange = (newValue: any) => { setTab(newValue); }; @@ -103,10 +103,10 @@ export const NavBar: React.FC = ({ recordingName, isRecording }) =>
{!isRecording ? ( <> - - + = ({ recordingName, isRecording }) => From 37ed5fa555ca832f854071a885ee8fd5bf3c1454 Mon Sep 17 00:00:00 2001 From: amhsirak Date: Sun, 8 Dec 2024 21:09:58 +0530 Subject: [PATCH 17/41] chore: lint --- src/components/molecules/NavBar.tsx | 128 ++++++++++++++-------------- 1 file changed, 64 insertions(+), 64 deletions(-) diff --git a/src/components/molecules/NavBar.tsx b/src/components/molecules/NavBar.tsx index bef197fa..96e1f07e 100644 --- a/src/components/molecules/NavBar.tsx +++ b/src/components/molecules/NavBar.tsx @@ -103,69 +103,69 @@ export const NavBar: React.FC = ({ recordingName, isRecording }) =>
{!isRecording ? ( <> - - - - {latestVersion === null ? ( - Checking for updates... - ) : currentVersion === latestVersion ? ( - - 🎉 You're up to date! - - ) : ( - <> - - A new version is available: {latestVersion} - - - - - - {tab === 0 && ( - - Manual Upgrade - - git pull origin main -
- npm install -
- npm run start -
-
- )} - {tab === 1 && ( - - Docker Compose Upgrade - - docker pull getmaxun/maxun:latest -
- docker-compose up -d -
-
- )} - - )} -
-
+ + + + {latestVersion === null ? ( + Checking for updates... + ) : currentVersion === latestVersion ? ( + + 🎉 You're up to date! + + ) : ( + <> + + A new version is available: {latestVersion} + + + + + + {tab === 0 && ( + + Manual Upgrade + + git pull origin main +
+ npm install +
+ npm run start +
+
+ )} + {tab === 1 && ( + + Docker Compose Upgrade + + docker pull getmaxun/maxun:latest +
+ docker-compose up -d +
+
+ )} + + )} +
+
= ({ recordingName, isRecording }) => vertical: 'top', horizontal: 'right', }} - PaperProps={{sx: {width: '180px'}}} + PaperProps={{ sx: { width: '180px' } }} > { handleMenuClose(); logout(); }}> Logout From 929bd91a7ef794ef0bbb55e4cd858d1c978374cd Mon Sep 17 00:00:00 2001 From: amhsirak Date: Sun, 8 Dec 2024 21:11:58 +0530 Subject: [PATCH 18/41] feat: store package.json version in currentVersion --- src/components/molecules/NavBar.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/molecules/NavBar.tsx b/src/components/molecules/NavBar.tsx index 96e1f07e..4ca7cc17 100644 --- a/src/components/molecules/NavBar.tsx +++ b/src/components/molecules/NavBar.tsx @@ -25,7 +25,7 @@ export const NavBar: React.FC = ({ recordingName, isRecording }) => const navigate = useNavigate(); const [anchorEl, setAnchorEl] = useState(null); - const currentVersion = "0.0.3"; // Dynamically fetch from package.json + const currentVersion = packageJson.version; const [open, setOpen] = useState(false); const [latestVersion, setLatestVersion] = useState(null); @@ -92,7 +92,7 @@ export const NavBar: React.FC = ({ recordingName, isRecording }) =>
Maxun
Date: Sun, 8 Dec 2024 21:15:21 +0530 Subject: [PATCH 19/41] feat: margin right to 30px --- src/components/molecules/NavBar.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/molecules/NavBar.tsx b/src/components/molecules/NavBar.tsx index 4ca7cc17..cc6d2c6b 100644 --- a/src/components/molecules/NavBar.tsx +++ b/src/components/molecules/NavBar.tsx @@ -103,7 +103,7 @@ export const NavBar: React.FC = ({ recordingName, isRecording }) =>
{!isRecording ? ( <> - From 6a2222e6b924697aac38c13fb6294c784870b291 Mon Sep 17 00:00:00 2001 From: amhsirak Date: Sun, 8 Dec 2024 21:21:47 +0530 Subject: [PATCH 20/41] feat: pass event prop to handle update tab change --- src/components/molecules/NavBar.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/molecules/NavBar.tsx b/src/components/molecules/NavBar.tsx index cc6d2c6b..5cdae02e 100644 --- a/src/components/molecules/NavBar.tsx +++ b/src/components/molecules/NavBar.tsx @@ -53,7 +53,7 @@ export const NavBar: React.FC = ({ recordingName, isRecording }) => setTab(0); // Reset tab to the first tab }; - const handleUpdateTabChange = (newValue: any) => { + const handleUpdateTabChange = (event: React.SyntheticEvent, newValue: number) => { setTab(newValue); }; From 06fdfbc65a0430468d1b34e05704d7be8851e0d9 Mon Sep 17 00:00:00 2001 From: amhsirak Date: Sun, 8 Dec 2024 21:22:03 +0530 Subject: [PATCH 21/41] chore: lint --- src/components/molecules/NavBar.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/components/molecules/NavBar.tsx b/src/components/molecules/NavBar.tsx index 5cdae02e..06393277 100644 --- a/src/components/molecules/NavBar.tsx +++ b/src/components/molecules/NavBar.tsx @@ -57,7 +57,6 @@ export const NavBar: React.FC = ({ recordingName, isRecording }) => setTab(newValue); }; - const handleMenuOpen = (event: React.MouseEvent) => { setAnchorEl(event.currentTarget); }; @@ -103,7 +102,7 @@ export const NavBar: React.FC = ({ recordingName, isRecording }) =>
{!isRecording ? ( <> - From b30be4b976b478f115c0048b3f7c38ac0e4982e2 Mon Sep 17 00:00:00 2001 From: amhsirak Date: Sun, 8 Dec 2024 21:23:00 +0530 Subject: [PATCH 22/41] feat: add setup --- src/components/molecules/NavBar.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/molecules/NavBar.tsx b/src/components/molecules/NavBar.tsx index 06393277..94676ecd 100644 --- a/src/components/molecules/NavBar.tsx +++ b/src/components/molecules/NavBar.tsx @@ -136,8 +136,8 @@ export const NavBar: React.FC = ({ recordingName, isRecording }) => sx={{ marginTop: 2, marginBottom: 2 }} centered > - - + + {tab === 0 && ( From 58aedacd4ffd99e8c8890a7ba6b63e52a69b6807 Mon Sep 17 00:00:00 2001 From: amhsirak Date: Sun, 8 Dec 2024 22:23:09 +0530 Subject: [PATCH 23/41] wip: updates ui --- src/components/molecules/NavBar.tsx | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/src/components/molecules/NavBar.tsx b/src/components/molecules/NavBar.tsx index 94676ecd..be4818df 100644 --- a/src/components/molecules/NavBar.tsx +++ b/src/components/molecules/NavBar.tsx @@ -112,7 +112,7 @@ export const NavBar: React.FC = ({ recordingName, isRecording }) => top: "50%", left: "50%", transform: "translate(-50%, -50%)", - width: 400, + width: 500, bgcolor: "background.paper", boxShadow: 24, p: 4, @@ -136,29 +136,27 @@ export const NavBar: React.FC = ({ recordingName, isRecording }) => sx={{ marginTop: 2, marginBottom: 2 }} centered > - - + + {tab === 0 && ( - Manual Upgrade - +
git pull origin main
npm install
npm run start - +
)} {tab === 1 && ( - Docker Compose Upgrade - +
docker pull getmaxun/maxun:latest
docker-compose up -d - +
)} From ebd866bc16c1b3d6f7a97ae303238da06160edc6 Mon Sep 17 00:00:00 2001 From: amhsirak Date: Sun, 8 Dec 2024 22:31:17 +0530 Subject: [PATCH 24/41] feat: add comments for commands --- src/components/molecules/NavBar.tsx | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/src/components/molecules/NavBar.tsx b/src/components/molecules/NavBar.tsx index be4818df..bc4222e2 100644 --- a/src/components/molecules/NavBar.tsx +++ b/src/components/molecules/NavBar.tsx @@ -141,19 +141,30 @@ export const NavBar: React.FC = ({ recordingName, isRecording }) => {tab === 0 && ( -
- git pull origin main +
+

Run the commands below

+ # pull latest changes +
+ git pull origin master +
+ # install dependencies
npm install
+ # start maxun +
npm run start
)} {tab === 1 && ( -
- docker pull getmaxun/maxun:latest +
+

Run the commands below

+ # pull latest docker images +
+ docker-compose pull + # start maxun
docker-compose up -d
From 0c66e86e28bad574460eddf622ff74e27a7f57b0 Mon Sep 17 00:00:00 2001 From: amhsirak Date: Sun, 8 Dec 2024 23:42:19 +0530 Subject: [PATCH 25/41] feat: format code blocks --- src/components/molecules/NavBar.tsx | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/components/molecules/NavBar.tsx b/src/components/molecules/NavBar.tsx index bc4222e2..99535baf 100644 --- a/src/components/molecules/NavBar.tsx +++ b/src/components/molecules/NavBar.tsx @@ -140,34 +140,38 @@ export const NavBar: React.FC = ({ recordingName, isRecording }) => {tab === 0 && ( - -
+ +

Run the commands below

# pull latest changes
git pull origin master
+
# install dependencies
npm install
+
# start maxun
npm run start -
+
)} {tab === 1 && ( - -
+ +

Run the commands below

# pull latest docker images
docker-compose pull +
+
# start maxun
docker-compose up -d -
+
)} From e82863ad9c8061b072ac3bbf07ce212f983d58c6 Mon Sep 17 00:00:00 2001 From: amhsirak Date: Sun, 8 Dec 2024 23:42:29 +0530 Subject: [PATCH 26/41] chore: lint --- src/components/molecules/NavBar.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/molecules/NavBar.tsx b/src/components/molecules/NavBar.tsx index 99535baf..b048d720 100644 --- a/src/components/molecules/NavBar.tsx +++ b/src/components/molecules/NavBar.tsx @@ -141,7 +141,7 @@ export const NavBar: React.FC = ({ recordingName, isRecording }) => {tab === 0 && ( - +

Run the commands below

# pull latest changes
@@ -161,8 +161,8 @@ export const NavBar: React.FC = ({ recordingName, isRecording }) => )} {tab === 1 && ( - -

Run the commands below

+ +

Run the commands below

# pull latest docker images
docker-compose pull From f7eccd47cbce57d0b66eb8ed6b57bc2a60583d69 Mon Sep 17 00:00:00 2001 From: amhsirak Date: Sun, 8 Dec 2024 23:44:33 +0530 Subject: [PATCH 27/41] feat: box border radius --- src/components/molecules/NavBar.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/molecules/NavBar.tsx b/src/components/molecules/NavBar.tsx index b048d720..60b75835 100644 --- a/src/components/molecules/NavBar.tsx +++ b/src/components/molecules/NavBar.tsx @@ -140,7 +140,7 @@ export const NavBar: React.FC = ({ recordingName, isRecording }) => {tab === 0 && ( - +

Run the commands below

# pull latest changes @@ -160,7 +160,7 @@ export const NavBar: React.FC = ({ recordingName, isRecording }) =>
)} {tab === 1 && ( - +

Run the commands below

# pull latest docker images From 885120cbb388b93e490a7479bed19c0394bb2dae Mon Sep 17 00:00:00 2001 From: amhsirak Date: Sun, 8 Dec 2024 23:53:02 +0530 Subject: [PATCH 28/41] feat: add changelog link --- src/components/molecules/NavBar.tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/components/molecules/NavBar.tsx b/src/components/molecules/NavBar.tsx index 60b75835..7861340f 100644 --- a/src/components/molecules/NavBar.tsx +++ b/src/components/molecules/NavBar.tsx @@ -127,8 +127,11 @@ export const NavBar: React.FC = ({ recordingName, isRecording }) => ) : ( <> - - A new version is available: {latestVersion} + + A new version is available: {latestVersion}. Upgrade to the latest version for bug fixes, enhancements and new features! +
+ View all the new updates + {' '}here.
Date: Sun, 8 Dec 2024 23:53:13 +0530 Subject: [PATCH 29/41] chore: lint --- src/components/molecules/NavBar.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/molecules/NavBar.tsx b/src/components/molecules/NavBar.tsx index 7861340f..01e002ec 100644 --- a/src/components/molecules/NavBar.tsx +++ b/src/components/molecules/NavBar.tsx @@ -127,11 +127,11 @@ export const NavBar: React.FC = ({ recordingName, isRecording }) =>
) : ( <> - + A new version is available: {latestVersion}. Upgrade to the latest version for bug fixes, enhancements and new features!
View all the new updates - {' '}here. + {' '}here.
Date: Mon, 9 Dec 2024 00:00:51 +0530 Subject: [PATCH 30/41] chore: -rm unused import --- src/components/molecules/NavBar.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/molecules/NavBar.tsx b/src/components/molecules/NavBar.tsx index 01e002ec..9d5cc623 100644 --- a/src/components/molecules/NavBar.tsx +++ b/src/components/molecules/NavBar.tsx @@ -3,7 +3,7 @@ import axios from 'axios'; import styled from "styled-components"; import { stopRecording } from "../../api/recording"; import { useGlobalInfoStore } from "../../context/globalInfo"; -import { IconButton, Menu, MenuItem, Typography, Avatar, Chip, Button, Modal, Tabs, Tab, Box } from "@mui/material"; +import { IconButton, Menu, MenuItem, Typography, Chip, Button, Modal, Tabs, Tab, Box } from "@mui/material"; import { AccountCircle, Logout, Clear, YouTube, X } from "@mui/icons-material"; import { useNavigate } from 'react-router-dom'; import { AuthContext } from '../../context/auth'; From c8b95bd27c30af9133ea9e7940ceb399b15741c7 Mon Sep 17 00:00:00 2001 From: amhsirak Date: Mon, 9 Dec 2024 00:01:26 +0530 Subject: [PATCH 31/41] chore: -rm v --- src/components/molecules/NavBar.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/molecules/NavBar.tsx b/src/components/molecules/NavBar.tsx index 9d5cc623..08ab650e 100644 --- a/src/components/molecules/NavBar.tsx +++ b/src/components/molecules/NavBar.tsx @@ -91,7 +91,7 @@ export const NavBar: React.FC = ({ recordingName, isRecording }) =>
Maxun
Date: Mon, 9 Dec 2024 00:25:13 +0530 Subject: [PATCH 32/41] feat: rename to upgrade maxun --- src/components/molecules/NavBar.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/molecules/NavBar.tsx b/src/components/molecules/NavBar.tsx index 08ab650e..db7f72c1 100644 --- a/src/components/molecules/NavBar.tsx +++ b/src/components/molecules/NavBar.tsx @@ -102,8 +102,8 @@ export const NavBar: React.FC = ({ recordingName, isRecording }) =>
{!isRecording ? ( <> - Date: Mon, 9 Dec 2024 00:32:14 +0530 Subject: [PATCH 33/41] feat: use update icon --- src/components/molecules/NavBar.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/molecules/NavBar.tsx b/src/components/molecules/NavBar.tsx index db7f72c1..fc638503 100644 --- a/src/components/molecules/NavBar.tsx +++ b/src/components/molecules/NavBar.tsx @@ -4,7 +4,7 @@ import styled from "styled-components"; import { stopRecording } from "../../api/recording"; import { useGlobalInfoStore } from "../../context/globalInfo"; import { IconButton, Menu, MenuItem, Typography, Chip, Button, Modal, Tabs, Tab, Box } from "@mui/material"; -import { AccountCircle, Logout, Clear, YouTube, X } from "@mui/icons-material"; +import { AccountCircle, Logout, Clear, YouTube, X, Update } from "@mui/icons-material"; import { useNavigate } from 'react-router-dom'; import { AuthContext } from '../../context/auth'; import { SaveRecording } from '../molecules/SaveRecording'; @@ -103,7 +103,7 @@ export const NavBar: React.FC = ({ recordingName, isRecording }) => {!isRecording ? ( <> Date: Mon, 9 Dec 2024 00:39:03 +0530 Subject: [PATCH 34/41] feat: match upgrade icon style to rest of navbar elementa --- src/components/molecules/NavBar.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/components/molecules/NavBar.tsx b/src/components/molecules/NavBar.tsx index fc638503..db29e516 100644 --- a/src/components/molecules/NavBar.tsx +++ b/src/components/molecules/NavBar.tsx @@ -102,7 +102,12 @@ export const NavBar: React.FC = ({ recordingName, isRecording }) =>
{!isRecording ? ( <> - From e5c045f0d567439d589f83f12162e60d2cf3b01b Mon Sep 17 00:00:00 2001 From: amhsirak Date: Mon, 9 Dec 2024 00:39:21 +0530 Subject: [PATCH 35/41] chore: lint --- src/components/molecules/NavBar.tsx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/components/molecules/NavBar.tsx b/src/components/molecules/NavBar.tsx index db29e516..56e43c5e 100644 --- a/src/components/molecules/NavBar.tsx +++ b/src/components/molecules/NavBar.tsx @@ -102,13 +102,13 @@ export const NavBar: React.FC = ({ recordingName, isRecording }) =>
{!isRecording ? ( <> - Date: Mon, 9 Dec 2024 00:40:17 +0530 Subject: [PATCH 36/41] feat: increase margin right --- src/components/molecules/NavBar.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/molecules/NavBar.tsx b/src/components/molecules/NavBar.tsx index 56e43c5e..62275078 100644 --- a/src/components/molecules/NavBar.tsx +++ b/src/components/molecules/NavBar.tsx @@ -103,7 +103,7 @@ export const NavBar: React.FC = ({ recordingName, isRecording }) => {!isRecording ? ( <> + } + /> +)}
= ({ recordingName, isRecording }) => ) : "" } + ); }; From e19094185214192cc5697c97dbb5a527f92ba656 Mon Sep 17 00:00:00 2001 From: amhsirak Date: Mon, 9 Dec 2024 00:54:55 +0530 Subject: [PATCH 38/41] chore: lint --- src/components/molecules/NavBar.tsx | 352 ++++++++++++++-------------- 1 file changed, 176 insertions(+), 176 deletions(-) diff --git a/src/components/molecules/NavBar.tsx b/src/components/molecules/NavBar.tsx index 1755cb20..24fda0f0 100644 --- a/src/components/molecules/NavBar.tsx +++ b/src/components/molecules/NavBar.tsx @@ -96,186 +96,186 @@ export const NavBar: React.FC = ({ recordingName, isRecording }) => return ( <> - {isUpdateAvailable && ( - - Upgrade - - } - /> -)} - -
- -
Maxun
- + Upgrade + + } /> -
- { - user ? ( -
- {!isRecording ? ( - <> - - - - {latestVersion === null ? ( - Checking for updates... - ) : currentVersion === latestVersion ? ( - - 🎉 You're up to date! - - ) : ( - <> - - A new version is available: {latestVersion}. Upgrade to the latest version for bug fixes, enhancements and new features! -
- View all the new updates - {' '}here. + )} + +
+ +
Maxun
+ +
+ { + user ? ( +
+ {!isRecording ? ( + <> + + + + {latestVersion === null ? ( + Checking for updates... + ) : currentVersion === latestVersion ? ( + + 🎉 You're up to date! - - - - - {tab === 0 && ( - - -

Run the commands below

- # pull latest changes -
- git pull origin master -
-
- # install dependencies -
- npm install -
-
- # start maxun -
- npm run start -
-
- )} - {tab === 1 && ( - - -

Run the commands below

- # pull latest docker images -
- docker-compose pull -
-
- # start maxun -
- docker-compose up -d -
-
- )} - - )} -
-
- - - - {user.email} - - - { handleMenuClose(); logout(); }}> - Logout - - { - window.open('https://discord.gg/5GbPjBUkws', '_blank'); + ) : ( + <> + + A new version is available: {latestVersion}. Upgrade to the latest version for bug fixes, enhancements and new features! +
+ View all the new updates + {' '}here. +
+ + + + + {tab === 0 && ( + + +

Run the commands below

+ # pull latest changes +
+ git pull origin master +
+
+ # install dependencies +
+ npm install +
+
+ # start maxun +
+ npm run start +
+
+ )} + {tab === 1 && ( + + +

Run the commands below

+ # pull latest docker images +
+ docker-compose pull +
+
+ # start maxun +
+ docker-compose up -d +
+
+ )} + + )} + + + + - Discord -
- { - window.open('https://www.youtube.com/@MaxunOSS/videos?ref=app', '_blank'); + + {user.email} + + + { handleMenuClose(); logout(); }}> + Logout + + { + window.open('https://discord.gg/5GbPjBUkws', '_blank'); + }}> + Discord + + { + window.open('https://www.youtube.com/@MaxunOSS/videos?ref=app', '_blank'); + }}> + YouTube + + { + window.open('https://x.com/maxun_io?ref=app', '_blank'); + }}> + Twiiter (X) + + + + ) : ( + <> + - YouTube - - { - window.open('https://x.com/maxun_io?ref=app', '_blank'); - }}> - Twiiter (X) - -
- - ) : ( - <> - - - Discard - - - - )} -
- ) : "" - } -
+ + Discard + + + + )} +
+ ) : "" + } +
); }; From 612622725d8c8542e6b4666a692d0773f3255cea Mon Sep 17 00:00:00 2001 From: amhsirak Date: Mon, 9 Dec 2024 01:05:39 +0530 Subject: [PATCH 39/41] feat: snackbar ui --- src/components/molecules/NavBar.tsx | 47 ++++++++++++++++++++++++----- 1 file changed, 40 insertions(+), 7 deletions(-) diff --git a/src/components/molecules/NavBar.tsx b/src/components/molecules/NavBar.tsx index 24fda0f0..3f3907a9 100644 --- a/src/components/molecules/NavBar.tsx +++ b/src/components/molecules/NavBar.tsx @@ -4,7 +4,7 @@ import styled from "styled-components"; import { stopRecording } from "../../api/recording"; import { useGlobalInfoStore } from "../../context/globalInfo"; import { IconButton, Menu, MenuItem, Typography, Chip, Button, Modal, Tabs, Tab, Box, Snackbar } from "@mui/material"; -import { AccountCircle, Logout, Clear, YouTube, X, Update } from "@mui/icons-material"; +import { AccountCircle, Logout, Clear, YouTube, X, Update, Close } from "@mui/icons-material"; import { useNavigate } from 'react-router-dom'; import { AuthContext } from '../../context/auth'; import { SaveRecording } from '../molecules/SaveRecording'; @@ -98,14 +98,47 @@ export const NavBar: React.FC = ({ recordingName, isRecording }) => <> {isUpdateAvailable && ( + open={isUpdateAvailable} + onClose={() => setIsUpdateAvailable(false)} // Close when clicking the close button + message={ + + New version {latestVersion} available! Click "Upgrade Maxun" to update. + + } + action={ + <> + - } - /> + setIsUpdateAvailable(false)} // Close Snackbar + style={{ color: 'black' }} + > + + + + } + anchorOrigin={{ vertical: 'bottom', horizontal: 'center' }} // Position of Snackbar + sx={{ + backgroundColor: 'white', + boxShadow: '0px 4px 10px rgba(0, 0, 0, 0.2)', + }} + /> + )}
Date: Mon, 9 Dec 2024 01:16:07 +0530 Subject: [PATCH 40/41] feat: snackbar ui --- src/components/molecules/NavBar.tsx | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/components/molecules/NavBar.tsx b/src/components/molecules/NavBar.tsx index 3f3907a9..0b933b7e 100644 --- a/src/components/molecules/NavBar.tsx +++ b/src/components/molecules/NavBar.tsx @@ -99,24 +99,23 @@ export const NavBar: React.FC = ({ recordingName, isRecording }) => {isUpdateAvailable && ( setIsUpdateAvailable(false)} // Close when clicking the close button + onClose={() => setIsUpdateAvailable(false)} message={ - - New version {latestVersion} available! Click "Upgrade Maxun" to update. - + `New version ${latestVersion} available! Click "Upgrade" to update.` } action={ <> - setIsUpdateAvailable(false)} - style={{ color: 'black' }} - > - - - - } - ContentProps={{ - sx: { - background: "white", - color: "black", } - }} - /> - + action={ + <> + + setIsUpdateAvailable(false)} + style={{ color: 'black' }} + > + + + + } + ContentProps={{ + sx: { + background: "white", + color: "black", + } + }} + /> + )}