From fd00b65276675a0380e11cc676a767a2db22eb6d Mon Sep 17 00:00:00 2001 From: Cooper Ransom Date: Sat, 2 Mar 2024 21:58:20 -0500 Subject: [PATCH 1/4] Fix small issue with maintance page and lightbar --- src/assets/locales/en.json | 4 ++-- src/components/utils/Lightbar.tsx | 16 ++++++++-------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/assets/locales/en.json b/src/assets/locales/en.json index f27ad01c..d2efe9ff 100644 --- a/src/assets/locales/en.json +++ b/src/assets/locales/en.json @@ -182,8 +182,8 @@ "title": "Couldn't find that page" }, "downtimeNotice": { - "goHome": "Go home!", - "message": "sudo-flix.lol is dedicated to providing its users with the most up-to-date and stable experience in order to do this we must switch hosting providers. Expect downtime between the below times.", + "goHome": "Go home", + "message": "sudo-flix.lol is dedicated to providing its users with the most up-to-date and stable experience. In order to do this, we must switch hosting providers. Expect downtime between the following times.", "timeFrame": "12:00 AM - 1:00 AM", "title": "Maintenance expected" }, diff --git a/src/components/utils/Lightbar.tsx b/src/components/utils/Lightbar.tsx index 9fbfea40..30cbaec6 100644 --- a/src/components/utils/Lightbar.tsx +++ b/src/components/utils/Lightbar.tsx @@ -154,7 +154,7 @@ function ParticlesCanvas() { const day = date.getDate(); if ( (month === 11 && day >= 24 && day <= 26) || - Math.random() < 0.091 // 9.1% + Math.random() < 0.051 // 5.1% ) { imageOverride = [ { @@ -174,7 +174,7 @@ function ParticlesCanvas() { const day2 = date.getDate(); if ( (month2 === 9 && day2 >= 29 && day2 <= 31) || - Math.random() < 0.09 // 9% + Math.random() < 0.05 // 5% ) { imageOverride = [ { @@ -190,7 +190,7 @@ function ParticlesCanvas() { } // Fish easter egg - const shouldShowFishie = Math.random() < 0.4; // 40% + const shouldShowFishie = Math.random() < 0.1; // 10% if (shouldShowFishie) { imageOverride = [ { @@ -208,7 +208,7 @@ function ParticlesCanvas() { // Weed easter egg const month3 = date.getMonth() + 1; const day3 = date.getDate(); - const shouldShowZa = (month3 === 4 && day3 === 20) || Math.random() < 0.35; // 35% + const shouldShowZa = (month3 === 4 && day3 === 20) || Math.random() < 0.25; // 25% if (shouldShowZa) { imageOverride = [ { @@ -220,7 +220,7 @@ function ParticlesCanvas() { } // Kitty easter egg - const shouldShowCat = Math.random() < 0.25; // 25% + const shouldShowCat = Math.random() < 0.2; // 20% if (shouldShowCat) { imageOverride = [ { @@ -232,7 +232,7 @@ function ParticlesCanvas() { } // Movie & popcorn easter egg - const shouldShowParaphernalia = Math.random() < 0.2; // 20% + const shouldShowParaphernalia = Math.random() < 0.3; // 30% if (shouldShowParaphernalia) { imageOverride = [ { @@ -248,7 +248,7 @@ function ParticlesCanvas() { } // Chicken easter egg - const shouldShow4thDecor = Math.random() < 0.1; // 10% + const shouldShow4thDecor = Math.random() < 0.06; // 6% if (shouldShow4thDecor) { imageOverride = [ { @@ -268,7 +268,7 @@ function ParticlesCanvas() { } // Dev easter egg - const shouldShowCode = Math.random() < 0.05; // 5% + const shouldShowCode = Math.random() < 0.03; // 3% if (shouldShowCode) { imageOverride = [ { From eb331e4323be63d8de37005ba7f14c3e93b405a7 Mon Sep 17 00:00:00 2001 From: Cooper Ransom Date: Sun, 3 Mar 2024 00:03:34 -0500 Subject: [PATCH 2/4] Fix stupid maintence page --- src/assets/locales/en.json | 12 ++++++------ src/setup/App.tsx | 9 ++++----- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/src/assets/locales/en.json b/src/assets/locales/en.json index d2efe9ff..bfdb4ade 100644 --- a/src/assets/locales/en.json +++ b/src/assets/locales/en.json @@ -114,17 +114,17 @@ "stopEditing": "Stop editing" }, "search": { - "allResults": "That's all we have!", + "allResults": "That's all we have...", "failed": "Failed to find media, try again!", "loading": "Loading...", - "noResults": "We couldn't find anything!", + "noResults": "We couldn't find anything :(", "placeholder": { "default": "What do you want to watch?", "extra": [ - "What do you want to explore?", - "What's on your watchlist?", - "What's your favorite movie?", - "What's your favorite series?" + "What do you want to stream?", + "Sudo-Flix is the best site ever!", + "What's on your watchlist today?", + "How was your day?" ] }, "sectionTitle": "Search results" diff --git a/src/setup/App.tsx b/src/setup/App.tsx index b016743a..eabf2350 100644 --- a/src/setup/App.tsx +++ b/src/setup/App.tsx @@ -104,18 +104,17 @@ function App() { useHistoryListener(); useOnlineListener(); const { t } = useTranslation(); - const [showDowntime, setShowDowntime] = useState(true); + const [showDowntime, setShowDowntime] = useState(false); const handleButtonClick = () => { setShowDowntime(false); }; useEffect(() => { - const token = localStorage.getItem("downtimeToken"); - if (token) { + const sessionToken = sessionStorage.getItem("downtimeToken"); + if (!sessionToken) { setShowDowntime(true); - } else { - localStorage.setItem("downtimeToken", "true"); + sessionStorage.setItem("downtimeToken", "true"); } }, []); From 55c8d5094bee5bf211538c2e56dd3d584507e73e Mon Sep 17 00:00:00 2001 From: Cooper Ransom Date: Sun, 3 Mar 2024 00:47:37 -0500 Subject: [PATCH 3/4] Server's migrated sucessfully removing downtime page --- src/setup/App.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/setup/App.tsx b/src/setup/App.tsx index eabf2350..d37c8714 100644 --- a/src/setup/App.tsx +++ b/src/setup/App.tsx @@ -104,7 +104,8 @@ function App() { useHistoryListener(); useOnlineListener(); const { t } = useTranslation(); - const [showDowntime, setShowDowntime] = useState(false); + const maintenance = false; + const [showDowntime, setShowDowntime] = useState(maintenance); const handleButtonClick = () => { setShowDowntime(false); @@ -116,7 +117,7 @@ function App() { setShowDowntime(true); sessionStorage.setItem("downtimeToken", "true"); } - }, []); + }, [setShowDowntime]); return ( From 9213a3d7a37d0cc7b8ecd4d3dd95f25bd7ebe44e Mon Sep 17 00:00:00 2001 From: sudo-flix <161381289+sudo-flix@users.noreply.github.com> Date: Sun, 3 Mar 2024 14:59:08 -0500 Subject: [PATCH 4/4] Create main.yml --- .github/workflows/main.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 00000000..8d2795b8 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,22 @@ +name: GitlabSync + +on: + - push + - delete + +jobs: + sync: + runs-on: ubuntu-latest + name: Git Repo Sync + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + - uses: wangchucheng/git-repo-sync@v0.1.0 + with: + # Such as https://github.com/wangchucheng/git-repo-sync.git + target-url: https://gitlab.com/itzCozi/sudo-flix + # Such as wangchucheng + target-username: itzCozi + # You can store token in your project's 'Setting > Secrets' and reference the name here. Such as ${{ secrets.ACCESS\_TOKEN }} + target-token: glpat-y24SW9CqLWRtmkWGFAez