Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release v1.3.1 #308

Merged
merged 390 commits into from
Nov 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
390 commits
Select commit Hold shift + click to select a range
7c603e8
Six new backgrounds (#193)
mastermajorman Jul 11, 2022
25977b2
Sticky note count
mastermajorman Jul 11, 2022
fc66c68
Update Lofi widget styling (#194)
mastermajorman Jul 11, 2022
40dc5b3
Fix sticky note count going to lowest nav item
mattprivman Jul 12, 2022
b1a6128
Merge branch 'origin/issue-172/counter-in-corner-of-post-it-note-widg…
mastermajorman Jul 12, 2022
ed41f41
add unsplash (#195)
mattprivman Jul 12, 2022
5f9ef73
Revert "fix issue-187 (#188)"
Jul 12, 2022
713c90f
Adding more staging changes
Jul 12, 2022
b8317de
fixing enum and removing backgroundsT
Jul 12, 2022
a404987
fixing unsplash
Jul 12, 2022
0f55752
Fixing side nav
Jul 12, 2022
c9475de
re-adding cancelDrag
Jul 12, 2022
6de44ac
Updating yaml
Jul 12, 2022
5a98ec8
updating yaml
Jul 12, 2022
3055ca8
yaml update
Jul 12, 2022
0ffef3a
trying deploy config
mattprivman Jul 12, 2022
689b4d5
removing tsc
Jul 12, 2022
d52b8c4
adding base
Jul 12, 2022
286c03f
Changing dist
Jul 12, 2022
b6582ef
set public_branch
mattprivman Jul 12, 2022
734087d
Revert prev commit
mattprivman Jul 12, 2022
fb404fe
testing
Jul 12, 2022
6e056c4
Merge branch 'main' of github.com:Amokstakov/astrostation into main
Jul 12, 2022
8285938
Update node.js.yml
mattprivman Jul 12, 2022
ba06f6c
Update node.js.yml
mattprivman Jul 12, 2022
0524833
Update vite.config.ts
mattprivman Jul 12, 2022
42aafe0
test
Jul 12, 2022
3287272
Fixing route
Jul 12, 2022
ff95394
Update LofiGirl.tsx
mattprivman Jul 12, 2022
23a9469
Fix file paths Train & Blacksmith
mattprivman Jul 12, 2022
6150726
pushing static files
Jul 12, 2022
64d24b3
Merge branch 'main' of github.com:Amokstakov/astrostation into main
Jul 12, 2022
435329f
adding japan
Jul 12, 2022
ef7bea3
fixing paths
Jul 12, 2022
97f6cf2
Update LofiGirl link
mattprivman Jul 12, 2022
a05aba8
Up version
mattprivman Jul 12, 2022
bc37130
Create CNAME
Melkeydev Jul 12, 2022
a111a62
up version again
mattprivman Jul 12, 2022
07b2e71
undo up versions
mattprivman Jul 12, 2022
caca631
fix station selector lofi girl
mattprivman Jul 12, 2022
6c21ba9
up version
mattprivman Jul 12, 2022
a8daacd
add cname to deploy options
mattprivman Jul 12, 2022
9a05a5e
up version to 0.1.26
mattprivman Jul 12, 2022
b9cdfd7
Fix
Jul 13, 2022
ad06054
Merge branch 'main' of github.com:Amokstakov/astrostation into main
Jul 13, 2022
2352f07
removing hook
Jul 13, 2022
f2d5add
quick fix sticky handler
Jul 13, 2022
e44cc7e
Adding updates for version 1.0 (#198)
Melkeydev Jul 18, 2022
b4f2aad
Adding updates for version 1.0 (#198) (#199)
Melkeydev Jul 18, 2022
592fa64
Fix background cpu leaks (#201)
Melkeydev Aug 27, 2022
b65db00
Merge branch 'main' into staging
Melkeydev Aug 27, 2022
d33ccbf
1.0.1 (#202)
Melkeydev Aug 27, 2022
05b2614
1.0.1 (#202) (#203)
Melkeydev Aug 27, 2022
fa641da
test (#204)
Melkeydev Aug 27, 2022
27d660d
Attempting to resolve branch issue (#205)
Melkeydev Aug 27, 2022
559be31
:q
Aug 28, 2022
807f326
adding private
Aug 28, 2022
fa387b2
Merge pull request #206 from Amokstakov/staging
Melkeydev Aug 28, 2022
4d06999
testign cicd
Aug 28, 2022
1b84e8c
Removing TSParticle backgrounds
Aug 28, 2022
180770b
Push
Aug 28, 2022
3343aca
Test
Aug 28, 2022
dc85cfb
Adding only change pomo counter on in progress tasks
Aug 28, 2022
344e190
adding joy ride explanation
Aug 28, 2022
1365fc2
Finish task tracker info update
Sep 4, 2022
a3a3f4b
Updating version number
Sep 4, 2022
e56e80c
Merge pull request #207 from Amokstakov/fixing-task-tracker
Melkeydev Sep 4, 2022
864a3ee
Typo fix
Sep 26, 2022
91fad0b
Remove MUI and rebuild popover
qoobes Oct 25, 2022
23a9594
Use fixed strategy on floating ui
qoobes Oct 25, 2022
b791cb7
Merge pull request #209 from Amokstakov/feature/tooltip-b
qoobes Oct 25, 2022
ab3a804
Added Tailwind Prettier plugin, ran all files through prettier
royanger Feb 22, 2023
03b5fc5
Ignoring .env file, removed old .env from repo
royanger Feb 22, 2023
b3304d4
Added .env-example.
royanger Feb 22, 2023
73607c8
Moved project files to top level directory.
royanger Feb 22, 2023
e51189f
Added .md files to flesh out project for OSS release
royanger Feb 22, 2023
a5f67c6
Merge pull request #211 from MelkeyOSS/roy/update-project
Melkeydev Mar 7, 2023
ee6b1eb
Merge pull request #212 from MelkeyOSS/staging
Melkeydev Mar 7, 2023
47b1aa4
Delete .github directory
Melkeydev Mar 7, 2023
25f4a66
More spacing more contrast
nchudleigh Mar 7, 2023
9fa0da5
Fix nav item bg transparent on lightmode.
nchudleigh Mar 7, 2023
44f45f6
Fix top and bottom border radius & colors on background nav
nchudleigh Mar 7, 2023
ee97f1c
Update contributors.yml
nchudleigh Mar 8, 2023
eb74a33
Change divider color on background nav item match dark theme
nchudleigh Mar 8, 2023
15dfb1b
Fixing radio stations
Melkeydev Mar 8, 2023
096a564
adding ci cd for pretier
Melkeydev Mar 8, 2023
694364c
uptick version
Melkeydev Mar 8, 2023
3e71349
Prettified Code!
Melkeydev Mar 8, 2023
7263699
Installed missing packages
royanger Mar 8, 2023
e9bc594
Merge pull request #217 from MelkeyOSS/adding-prettier-github-action
Melkeydev Mar 8, 2023
1a5ff27
Merge pull request #216 from MelkeyOSS/fixing-radio-stations
Melkeydev Mar 8, 2023
8843666
metadata and structured data added
emalinegayhart Mar 8, 2023
e4aea1b
metadata and structured data added
emalinegayhart Mar 8, 2023
dbca857
Merge pull request #219 from emalineg/staging
royanger Mar 8, 2023
f9af53f
Merge branch 'staging' into beautify-spotify
royanger Mar 8, 2023
c24dccd
Merge pull request #213 from nchudleigh/beautify-spotify
royanger Mar 8, 2023
80c4ca5
typo
emalinegayhart Mar 8, 2023
32d1579
Merge pull request #221 from emalineg/staging
Melkeydev Mar 8, 2023
b22db1d
Merge pull request #220 from MelkeyOSS/staging
Melkeydev Mar 8, 2023
30197a5
"Stop" -> "Pause" on timer button to reduce confusion
Samathingamajig Mar 8, 2023
9c57321
Installed clsx and updated codebase to use solution
royanger Mar 8, 2023
304ec87
Added .vscode for formatOnSave and added script for format
royanger Mar 8, 2023
49c0256
Formatted edits cause I don't have prettier installed in lvim yet
royanger Mar 8, 2023
68bf7bc
Merge branch 'staging' into roy/add-clsx-and-update-app
royanger Mar 8, 2023
5884b00
Add Samathingamajig to contributors.yml and added extra newline
Samathingamajig Mar 8, 2023
21c5e5c
Merge pull request #222 from Samathingamajig/patch-1
royanger Mar 8, 2023
a5cb4e3
Merge pull request #223 from MelkeyOSS/roy/add-clsx-and-update-app
Melkeydev Mar 8, 2023
d58ea6b
Fix 'class' to 'className' attribute typo
Mar 9, 2023
6743f2e
Change spotify theme based on site theme
Mar 9, 2023
309c1d9
Merge pull request #224 from eraychumak/main
Melkeydev Mar 11, 2023
11dd6d0
Fix button spacing from window edges
Mar 12, 2023
b291c57
Fix button spacing from window edges and simplify class names for res…
Mar 12, 2023
dfa86ee
Add light theme for side navigation
Mar 12, 2023
d1c5c82
Add padding and rounded to sideNav
Mar 12, 2023
fc256b8
Merge pull request #226 from eraychumak/staging
Melkeydev Mar 12, 2023
f35f76f
Updated version number
royanger Mar 13, 2023
0f52306
Update contributors.yml
Mar 14, 2023
3160583
Merge pull request #230 from eraychumak/staging
royanger Mar 14, 2023
899b00b
feat: add username to contrib file
creativenull Mar 14, 2023
8b42d91
Merge pull request #225 from MelkeyOSS/staging
Melkeydev Mar 14, 2023
beb3912
Merge branch 'staging' into feat-contrib
royanger Mar 15, 2023
448237b
Merge pull request #232 from creativenull/feat-contrib
royanger Mar 15, 2023
a40c2c8
favicon size to meet guidelines for serp display
emalinegayhart Mar 15, 2023
944bdd4
revised meta data
emalinegayhart Mar 15, 2023
ed23fb0
144x144 favicon for serp
emalinegayhart Mar 16, 2023
cc01b5e
adding melkey
Melkeydev Mar 16, 2023
d8e6f64
Merge branch 'staging' into updating-contributor-guide
Melkeydev Mar 16, 2023
c3a22a5
Merge pull request #234 from MelkeyOSS/updating-contributor-guide
royanger Mar 16, 2023
08bdfd5
Add Major to contributors list
mastermajorman Mar 16, 2023
a59a5c0
Merge pull request #235 from MelkeyOSS/updating-contributor-guide
royanger Mar 16, 2023
250d3ed
Merge pull request #233 from emalineg/main
Melkeydev Mar 20, 2023
106b896
test
emalinegayhart Mar 20, 2023
e04dd96
first draft seo copy
emalinegayhart Mar 20, 2023
0c73fb4
text-color
emalinegayhart Mar 20, 2023
bf43842
emalinegayhart Mar 20, 2023
00ff717
mr
emalinegayhart Mar 20, 2023
f0e8fd9
footer
emalinegayhart Mar 20, 2023
e65d2c6
aa
emalinegayhart Mar 20, 2023
bbd4f62
basic toggle functionality
emalinegayhart Mar 21, 2023
7e99d7b
fixed footer, still spacing at end
emalinegayhart Mar 21, 2023
39c62e8
fixed tag formatting
emalinegayhart Mar 21, 2023
7b44e8c
ternary function for overflow
emalinegayhart Mar 22, 2023
93545be
rip scrollsnap
emalinegayhart Mar 22, 2023
d73750c
removed unused variable
emalinegayhart Mar 22, 2023
7adfd2f
uhh
rondDev Mar 22, 2023
dab5fd6
Merge branch 'main' of https://github.com/emalineg/astrostation
rondDev Mar 22, 2023
62cbcf9
Merge pull request #1 from rondDev/main
emalinegayhart Mar 22, 2023
21fc340
toggle opacity info button
emalinegayhart Mar 22, 2023
f28f95c
Moved <SeoToggle> to <InfoSection>
emalinegayhart Mar 22, 2023
18f1e79
added tutorial for <infosection>
emalinegayhart Mar 22, 2023
e6fa48f
TYPESAFE REACT REFS FOR SCROLLING
emalinegayhart Mar 22, 2023
15dea54
scrollbar-hide
emalinegayhart Mar 22, 2023
b7f5a3e
Footer styling
emalinegayhart Mar 22, 2023
37ae32c
Setting Button Toggle Info Visibility
emalinegayhart Mar 22, 2023
71f0ed5
reverted architecture for consistency
emalinegayhart Mar 22, 2023
dad3576
changed name of file
emalinegayhart Mar 22, 2023
1acb492
updated padding for consistency
emalinegayhart Mar 22, 2023
c50b3dd
set up for license and privacy pages
emalinegayhart Mar 22, 2023
7b52234
set up for privacy and license pages
emalinegayhart Mar 22, 2023
9ab1c39
a word
emalinegayhart Mar 22, 2023
2b6d364
2 words
emalinegayhart Mar 22, 2023
6e1b9eb
added padding to fix overlapping - mobile
emalinegayhart Mar 22, 2023
0e806a9
added tooltip to end on astrostation
emalinegayhart Mar 22, 2023
5a3c88f
adjusted padding to avoid component overlap
emalinegayhart Mar 23, 2023
ec146b6
Changed <seotoggle> CTA to be more explicit
emalinegayhart Mar 23, 2023
ffba815
Store.ts: Place new tasks at the front of the task list
justnat3 Mar 7, 2023
77330ca
Tasks: Changed margin to improve spacing around tasks, and task modal
justnat3 Mar 7, 2023
c70ff04
Tasks: danger variant, change Cancel/Okay in Settings
justnat3 Mar 7, 2023
4d536a9
tasks: handle new contextmenu state
justnat3 Mar 25, 2023
6fa8d9c
task: early context menu behavior & styling
justnat3 Mar 25, 2023
116827b
task: the last commits solution did not turn out
justnat3 Mar 25, 2023
bd351ec
task: canceldrag on rename field, remove delete option from settings.
justnat3 Mar 25, 2023
18e0c59
contributors: add pizza, and justnat3
justnat3 Mar 25, 2023
75dfbb7
Merge branch 'staging' into new-tasks-patch
justnat3 Mar 25, 2023
d6cd4b5
Merge pull request #240 from emalineg/main
royanger Mar 26, 2023
1c81bcc
tasks: workaround double context menu
justnat3 Mar 25, 2023
e588e92
task, tasks, settings: Resolve Requested Changes
justnat3 Mar 26, 2023
b193a91
task, task-settings: add onClickOff, add padding to settings buttons
justnat3 Mar 28, 2023
5ae13f7
task: Dont close ContextMenu on MouseLeave
justnat3 Mar 28, 2023
4d6473f
task: remove on-mouse-leave for ContextMenu
justnat3 Mar 28, 2023
8c5996b
task: UX cursor pointer on ContextMenu elements
justnat3 Mar 28, 2023
5a65b53
task: Close ContextMenu after clicking an option. Add help text.
justnat3 Mar 28, 2023
ce39a09
task: add note for highlighting text on double click(selecting a task)
justnat3 Mar 28, 2023
0638f8d
task: Mark not completed when tracking when task is "completed"
justnat3 Mar 28, 2023
c570f33
task: change completeTask to setCompleted
justnat3 Mar 28, 2023
7a9535b
task: bugfix task tracking
justnat3 Mar 28, 2023
e8994e8
task: remove br-br
justnat3 Mar 28, 2023
704d34f
added color selector to sticky note componenets
herropaul Mar 19, 2023
883ba1e
updated design pattern using interfaces and stores to keep track of c…
herropaul Mar 28, 2023
90db1ca
updated editeNote to take in dynamic props - shoutout melkey
herropaul Mar 28, 2023
c5a81ec
Merge pull request #236 from herropaul/issue-197/multicolored-sticky-…
Melkeydev Mar 28, 2023
4eb5360
Merge branch 'staging' into new-tasks-patch
Melkeydev Mar 28, 2023
f95edc3
Merge pull request #242 from justnat3/new-tasks-patch
Melkeydev Mar 28, 2023
b082ef7
Added github button
madeleine-patience Mar 21, 2023
72b2d8a
Removed wording and updated contributers list
madeleine-patience Mar 22, 2023
de9ea2b
Updated bottom buttons and css variant
madeleine-patience Mar 23, 2023
57de529
Changed size of GH logo
madeleine-patience Mar 24, 2023
d04a2f2
Changed navigate function to anchor tag + re-added space to crypto btn.
madeleine-patience Mar 27, 2023
a467f75
Merge pull request #239 from madeleine-patience/main
royanger Mar 28, 2023
de95afe
Run format
Hacksore Mar 28, 2023
a658889
Merge pull request #250 from Hacksore/chore/format
royanger Mar 28, 2023
ca036af
Nice format and add contributors
Hacksore Mar 28, 2023
8c2ce5a
Merge pull request #252 from Hacksore/staging
royanger Mar 28, 2023
f565f52
Merge pull request #251 from MelkeyOSS/staging
royanger Mar 28, 2023
8808519
google site verification
emalinegayhart Mar 28, 2023
3a49c63
jk
emalinegayhart Mar 28, 2023
6294bc5
player, toast, addtask, fullscreen: replaced alert with toast
justnat3 Mar 28, 2023
cdd239e
updated favicon link rel
emalinegayhart Mar 28, 2023
33ed6c8
draggable: fixes per-position-change z index increment
justnat3 Mar 29, 2023
de8f658
task: remove buggy inProgress logic, add "Untrack" instead
justnat3 Mar 28, 2023
1989e88
task: ts-ignore
justnat3 Mar 28, 2023
82cb94f
bug fix viewport breakpoints
emalinegayhart Mar 30, 2023
4bb86fe
bug fix overflow
emalinegayhart Mar 30, 2023
a2fc78a
Merge pull request #259 from emalineg/main
royanger Mar 30, 2023
3a181fa
task: allow inProgress by flag and not toggle, onClickOff type defs
justnat3 Mar 30, 2023
5875c9f
Add custom background selection
Hacksore Mar 26, 2023
47e7ff9
add select color
Hacksore Mar 31, 2023
ab84b87
added keypress handler to rename input
renxzen Mar 31, 2023
a8f7d5f
metadata changes
emalinegayhart Mar 31, 2023
a78d9c1
robots.txt + sitemap.xml
emalinegayhart Mar 31, 2023
0026db6
shortened meta title & desc
emalinegayhart Mar 31, 2023
8867ae0
meta data change
emalinegayhart Mar 31, 2023
483bff2
meta data
emalinegayhart Apr 2, 2023
7f97b62
fix: only render the selected color if using a custom background
Hacksore Apr 3, 2023
2a8406c
Merge pull request #255 from justnat3/task-track-patch
Melkeydev Apr 4, 2023
dc79535
Merge pull request #261 from justnat3/zindex-patch
Melkeydev Apr 4, 2023
8c32809
Merge pull request #262 from renxzen/staging
Melkeydev Apr 4, 2023
1ea6de5
Merge pull request #263 from emalineg/main
Melkeydev Apr 4, 2023
1b4a33f
Update node.js.yml
Melkeydev Apr 4, 2023
d5d7374
Fix react key in map
Hacksore Apr 5, 2023
48c1bda
Merge pull request #243 from Hacksore/main
Melkeydev Apr 5, 2023
f3fac1d
Merge pull request #257 from justnat3/alert-patch
Melkeydev Apr 11, 2023
3b88e2a
implement youtube store
mechakin Apr 11, 2023
7c68617
add youtube widget to sidebar
mechakin Apr 11, 2023
a7f95b4
update info section to include youtube widget
mechakin Apr 11, 2023
27473f5
implement functioning youtube widget
mechakin Apr 11, 2023
a6e369e
add name to contributors.yml file
mechakin Apr 11, 2023
7f1e67c
fix default quote widget position
mechakin Apr 11, 2023
b30708c
Fix Backgrounds Nav Goes Behind the Widgets in some cases
Apr 17, 2023
c08a190
Merge branch 'staging' into main
Melkeydev Apr 23, 2023
93bcea7
Merge pull request #278 from cosmiclasagnadev/main
Melkeydev Apr 23, 2023
ad9b364
redo widget implementation
mechakin Jul 26, 2023
3a2f668
merge conflicts
mechakin Jul 26, 2023
3e32f08
change default video
mechakin Jul 26, 2023
958cecf
Merge branch 'staging' into main
mechakin Oct 31, 2023
e2ee6f5
Merge pull request #273 from mechakin/main
Melkeydev Nov 1, 2023
c26a5f6
fix bugs
mechakin Nov 3, 2023
f63aa40
add feedback, merge conflicts
mechakin Nov 7, 2023
7c6e0f7
Merge pull request #306 from mechakin/main
Melkeydev Nov 9, 2023
a4252bf
Upticking version to 1.3.1
Melkeydev Nov 9, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions contributors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
- herropaul
- madeleine-patience
- mastermajorman
- mechakin
- melkeydev
- nchudleigh
- royanger
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "client",
"private": true,
"version": "1.3.0",
"version": "1.3.1",
"scripts": {
"dev": "vite",
"build": "vite build",
Expand Down
15 changes: 14 additions & 1 deletion src/components/Nav/SideNav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { IoMenu } from "react-icons/io5";
import { CgNotes } from "react-icons/cg";
import { MdOutlineTimer, MdWbSunny, MdDarkMode, MdOutlineNoteAdd, MdOutlineViewKanban } from "react-icons/md";
import { VscDebugRestartFrame } from "react-icons/vsc";
import { BsArrowsFullscreen, BsFillChatLeftQuoteFill, BsTwitch } from "react-icons/bs";
import { BsArrowsFullscreen, BsFillChatLeftQuoteFill, BsTwitch, BsYoutube } from "react-icons/bs";
import { FaSpotify } from "react-icons/fa";
import {
useToggleMusic,
Expand All @@ -18,6 +18,7 @@ import {
useToggleStickyNote,
useToggleWidgetReset,
useToggleTwitch,
useToggleYoutube,
useSideNavOrderStore,
useToggleKanban,
} from "@Store";
Expand All @@ -40,6 +41,7 @@ export const SideNav = () => {
const { isSpotifyToggled, setIsSpotifyToggled } = useSpotifyMusic();
const { isQuoteToggled, setIsQuoteToggled } = useToggleQuote();
const { isTwitchToggled, setIsTwitchToggled } = useToggleTwitch();
const { isYoutubeToggled, setIsYoutubeToggled } = useToggleYoutube();

const { isTimerShown } = useToggleTimer();
const { isStickyNoteShown } = useToggleStickyNote();
Expand All @@ -52,6 +54,7 @@ export const SideNav = () => {
const { isQuoteShown } = useToggleQuote();
const { isWidgetResetShown } = useToggleWidgetReset();
const { isTwitchShown } = useToggleTwitch();
const { isYoutubeShown } = useToggleYoutube();

const { sideNavOrder, setSideNavOrder } = useSideNavOrderStore();

Expand Down Expand Up @@ -193,6 +196,16 @@ export const SideNav = () => {
toggleIcon: "📃",
isShown: isKanbanShown,
},
{
id: "12",
content: <BsYoutube className="h-6 w-6" />,
tooltipTitle: "Youtube Video",
isToggled: isYoutubeToggled,
setToggled: setIsYoutubeToggled,
toggleString: "Youtube Toggled",
toggleIcon: "▶️",
isShown: isYoutubeShown,
},
];

// a little function to help us with reordering the result
Expand Down
16 changes: 15 additions & 1 deletion src/components/WidgetControl/WidgetControlModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
MdOutlineViewKanban,
} from "react-icons/md";
import { VscDebugRestartFrame } from "react-icons/vsc";
import { BsArrowsFullscreen, BsFillChatLeftQuoteFill, BsTwitch } from "react-icons/bs";
import { BsArrowsFullscreen, BsFillChatLeftQuoteFill, BsTwitch, BsYoutube } from "react-icons/bs";
import clsx from "clsx";

import {
Expand All @@ -23,6 +23,7 @@ import {
useFullScreenToggleStore,
useToggleWidgetReset,
useToggleTwitch,
useToggleYoutube,
useToggleKanban,
} from "@Store";
import useMediaQuery from "@Utils/hooks/useMediaQuery";
Expand All @@ -39,6 +40,7 @@ export const WidgetControlModal = ({ isVisible = false, onClose }) => {
const { isQuoteShown, setIsQuoteShown } = useToggleQuote();
const { isWidgetResetShown, setIsWidgetResetShown } = useToggleWidgetReset();
const { isTwitchShown, setIsTwitchShown } = useToggleTwitch();
const { isYoutubeShown, setIsYoutubeShown } = useToggleYoutube();
const { isKanbanShown, setIsKanbanShown } = useToggleKanban();

const isDesktop = useMediaQuery("(min-width: 641px)");
Expand Down Expand Up @@ -199,6 +201,18 @@ export const WidgetControlModal = ({ isVisible = false, onClose }) => {
Twitch
<BsTwitch className="h-6 w-full" />
</div>
<div
onClick={() =>
toggledToastNotification(isYoutubeShown, setIsYoutubeShown, "Youtube Widget Added", 750, "▶️")
}
className={clsx(
"grid cursor-pointer content-center justify-center gap-2 rounded md:hover:bg-gray-200 md:hover:text-gray-800 md:dark:hover:bg-violet-500",
isYoutubeShown && "dark:bg-violet-500 md:bg-gray-200 md:text-gray-800"
)}
>
Youtube
<BsYoutube className="h-6 w-full" />
</div>
<div
onClick={() =>
toggledToastNotification(
Expand Down
77 changes: 77 additions & 0 deletions src/components/Youtube/YoutubeVideo.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
import { useState } from "react";
import { IoCloseSharp } from "react-icons/io5";
import { AiOutlineReload } from "react-icons/ai";
import { useToggleYoutube } from "@Store";

export const YoutubeVideo = () => {
const defaultVideoId = "TYCBicKyVhs";
const playlistText = "?listType=playlist";
const { isYoutubeToggled, isYoutubeShown, setIsYoutubeToggled } = useToggleYoutube();
const [inputText, setInputText] = useState("");
const [videoId, setVideoId] = useState(defaultVideoId);
const youtubeIdRegex = new RegExp(/(youtu.*be.*)\/(watch\?v=|\/shorts|)(.*?((?=[&#?])|$))/);
const playlistRegex = new RegExp(/[&?]list=([^&]+)/i);

const handleVideoChange = (youtubeUrl: string) => {
const youtubeId = getYoutubeId(youtubeUrl);
const playlistId = getPlaylistId(youtubeUrl);

youtubeId && setVideoId(playlistId ? `${playlistText}${playlistId}` : youtubeId);
};

const getYoutubeId = (youtubeUrl: string) => {
const match = youtubeUrl.match(youtubeIdRegex);
return match ? match[3] : null;
};

const getPlaylistId = (youtubeUrl: string) => {
const match = youtubeUrl.match(playlistRegex);
return match ? match[0] : null;
};

const handleKeyDown = e => {
if (e.key === "Enter") {
const url = e.target.value;
handleVideoChange(url);
}
};

return (
<div className="w-full resize-x justify-between overflow-auto rounded-lg bg-white/[.96] py-2 text-gray-800 shadow-md dark:border-gray-700 dark:bg-gray-800/[.96] dark:text-gray-300 sm:w-96">
<div className="handle flex items-center justify-between p-1">
<p>Youtube</p>
<IoCloseSharp
className="cursor-pointer text-red-500 hover:bg-red-200"
onClick={() => setIsYoutubeToggled(false)}
/>
</div>
<div className="relative aspect-video justify-center">
{isYoutubeShown && isYoutubeToggled && (
<iframe
className="left-0 h-full w-full"
src={"https://www.youtube.com/embed/" + videoId}
allowFullScreen
></iframe>
)}
</div>
<div className="cancelDrag flex items-center space-x-1 p-1">
<input
className="w-full border border-gray-300 p-1 dark:border-gray-500 dark:bg-gray-700/[.96]"
type="text"
value={inputText}
placeholder="Paste video/playlist here..."
onChange={e => {
setInputText(e.target.value);
}}
onKeyDown={handleKeyDown}
/>
<AiOutlineReload
className="w-5 cursor-pointer hover:text-slate-500"
onClick={() => {
handleVideoChange(inputText);
}}
/>
</div>
</div>
);
};
14 changes: 14 additions & 0 deletions src/interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,20 @@ export interface IPosTwitch {
setTwitchPosDefault: () => void;
}

export interface IToggleYoutube {
isYoutubeToggled: boolean;
setIsYoutubeToggled: (isYoutubeToggled: boolean) => void;
isYoutubeShown: boolean;
setIsYoutubeShown: (isYoutubeShown: boolean) => void;
}

export interface IPosYoutube {
youtubePosX: number;
youtubePosY: number;
setYoutubePos: (X: number, Y: number) => void;
setYoutubePosDefault: () => void;
}

export interface IFirstTimeUserState {
isFirstTimeUser: boolean;
toggleIsFirstTimeUser: () => void;
Expand Down
15 changes: 15 additions & 0 deletions src/pages/Astrostation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,14 @@ import {
useStickyNote,
useToggleQuote,
useToggleTwitch,
useToggleYoutube,
useToggleKanban,
usePosMusic,
usePosSpotify,
usePosTimer,
usePosQuote,
usePosTwitch,
usePosYoutube,
usePosKanban,
useGrid,
useSetBackground,
Expand All @@ -36,6 +38,7 @@ import { Sticky } from "@Components/Sticky/Sticky";
import { Quotes } from "@App/components/Quotes/Quotes";
import useMediaQuery from "@Utils/hooks/useMediaQuery";
import { TwitchStream } from "@Components/Twitch/TwitchStream";
import { YoutubeVideo } from "@Components/Youtube/YoutubeVideo";
import { Kanban } from "@Components/Kanban/Kanban";
import { UnsplashFooter } from "../components/Nav/UnsplashFooter";
import clsx from "clsx";
Expand All @@ -51,6 +54,7 @@ export const Astrostation = React.forwardRef<HTMLDivElement>((_props, ref) => {
const { isStickyNoteShown } = useToggleStickyNote();
const { isQuoteToggled, isQuoteShown } = useToggleQuote();
const { isTwitchToggled, isTwitchShown } = useToggleTwitch();
const { isYoutubeToggled, isYoutubeShown } = useToggleYoutube();
const { isKanbanToggled, isKanbanShown } = useToggleKanban();

// Position hooks
Expand All @@ -61,6 +65,7 @@ export const Astrostation = React.forwardRef<HTMLDivElement>((_props, ref) => {
const { timerPosX, timerPosY, setTimerPos } = usePosTimer();
const { stickyNotes, setStickyNotesPos } = useStickyNote();
const { twitchPosX, twitchPosY, setTwitchPos } = usePosTwitch();
const { youtubePosX, youtubePosY, setYoutubePos } = usePosYoutube();
const { kanbanPosX, kanbanPosY, setKanbanPos } = usePosKanban();
const isDesktop = useMediaQuery("(min-width: 768px)");
const [isSettingsModalOpen, setSettingsModalOpen] = useState(false);
Expand Down Expand Up @@ -204,6 +209,16 @@ export const Astrostation = React.forwardRef<HTMLDivElement>((_props, ref) => {
>
<TwitchStream />
</DWrapper>
<DWrapper
toggleHook={isYoutubeToggled && isYoutubeShown}
defaultX={youtubePosX}
defaultY={youtubePosY}
setPosition={setYoutubePos}
isSticky={false}
gridValues={grid}
>
<YoutubeVideo />
</DWrapper>
<DWrapper
toggleHook={isKanbanToggled && isKanbanShown}
defaultX={kanbanPosX}
Expand Down
1 change: 1 addition & 0 deletions src/pages/InfoSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ export const InfoSection = ({ onButtonClick, isSeoVisible }: { onButtonClick; is
<li>Tune into our Lofi Wifi Station with 4 different channels!</li>
<li>Listen to your go-to Spotify playlist with our Spotify widget</li>
<li>Use the Twitch widget to support your favorite streamer while you study!</li>
<li>Watch some videos with our YouTube widget!</li>
<li>Use our quote widget to display inspirational quotes</li>
<li>Need to remember something? There’s a sticky note widget for that!</li>
</ul>
Expand Down
36 changes: 36 additions & 0 deletions src/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ import {
IGrid,
ILockWidgets,
ISideNavOrderStore,
IToggleYoutube,
IPosYoutube,
IToggleKanban,
IPosKanban,
ISeoContent,
Expand Down Expand Up @@ -795,6 +797,40 @@ export const usePosTwitch = create<IPosTwitch>(
)
);

/**
* Youtube Section Store
* ---
* Handle the Youtube section
*/

export const useToggleYoutube = create<IToggleYoutube>(
persist(
(set, _) => ({
isYoutubeToggled: false,
setIsYoutubeToggled: isYoutubeToggled => set({ isYoutubeToggled }),
isYoutubeShown: false,
setIsYoutubeShown: isYoutubeShown => set({ isYoutubeShown }),
}),
{
name: "state_youtube",
}
)
);

export const usePosYoutube = create<IPosYoutube>(
persist(
(set, _) => ({
youtubePosX: 804,
youtubePosY: 436,
setYoutubePos: (X, Y) => set({ youtubePosX: X, youtubePosY: Y }),
setYoutubePosDefault: () => set(() => ({ youtubePosX: 1208, youtubePosY: 324 })),
}),
{
name: "set_youtube_position",
}
)
);

/**
* First-time user Store
* ---
Expand Down
4 changes: 3 additions & 1 deletion src/utils/hooks/useSetDefault.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { usePosTask, usePosMusic, usePosSpotify, usePosTimer, usePosQuote, usePosTwitch } from "@Store";
import { usePosTask, usePosMusic, usePosSpotify, usePosTimer, usePosQuote, usePosTwitch, usePosYoutube } from "@Store";

function useSetDefault() {
const { setTaskPosDefault } = usePosTask();
Expand All @@ -7,6 +7,7 @@ function useSetDefault() {
const { setTimerPosDefault } = usePosTimer();
const { setQuotePosDefault } = usePosQuote();
const { setTwitchPosDefault } = usePosTwitch();
const { setYoutubePosDefault } = usePosYoutube();

return () => {
// Reset all widget positions
Expand All @@ -16,6 +17,7 @@ function useSetDefault() {
setTimerPosDefault();
setQuotePosDefault();
setTwitchPosDefault();
setYoutubePosDefault();
};
}

Expand Down