fix code style, use names from api instead of hardcoding for flatmates users
This commit is contained in:
@@ -1,57 +1,55 @@
|
|||||||
{
|
{
|
||||||
"name": "bun",
|
"name": "bun",
|
||||||
"image": "oven/bun:debian",
|
"image": "oven/bun:debian",
|
||||||
"privileged": true,
|
"privileged": true,
|
||||||
"features": {
|
"features": {
|
||||||
"ghcr.io/devcontainers/features/common-utils:1": {
|
"ghcr.io/devcontainers/features/common-utils:1": {
|
||||||
"version": "latest",
|
"version": "latest",
|
||||||
"configureZshAsDefaultShell": true,
|
"configureZshAsDefaultShell": true,
|
||||||
"username": "bun",
|
"username": "bun",
|
||||||
"userUid": "1000",
|
"userUid": "1000",
|
||||||
"userGid": "1000"
|
"userGid": "1000"
|
||||||
|
},
|
||||||
|
"ghcr.io/rocker-org/devcontainer-features/apt-packages:1": {
|
||||||
|
"packages": "stow,tmux,ripgrep,python3-venv,python3-virtualenv"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"ghcr.io/rocker-org/devcontainer-features/apt-packages:1": {
|
"remoteUser": "bun",
|
||||||
"packages": "stow,tmux,ripgrep,python3-venv,python3-virtualenv"
|
"workspaceFolder": "/home/bun/ws",
|
||||||
},
|
"workspaceMount": "source=${localWorkspaceFolder},target=/home/bun/ws,type=bind",
|
||||||
},
|
"containerEnv": {},
|
||||||
"remoteUser": "bun",
|
"runArgs": [
|
||||||
"workspaceFolder": "/home/bun/ws",
|
"--net=host",
|
||||||
"workspaceMount": "source=${localWorkspaceFolder},target=/home/bun/ws,type=bind",
|
"-e",
|
||||||
"containerEnv": {
|
"DISPLAY=${env:DISPLAY}",
|
||||||
},
|
"-e",
|
||||||
"runArgs": [
|
"TERM=${env:TERM}",
|
||||||
"--net=host",
|
"-e",
|
||||||
"-e",
|
"SHELL=${env:SHELL}",
|
||||||
"DISPLAY=${env:DISPLAY}",
|
"-v",
|
||||||
"-e",
|
"${env:SSH_AUTH_SOCK}:/tmp/ssh-agent.socket",
|
||||||
"TERM=${env:TERM}",
|
"-e",
|
||||||
"-e",
|
"SSH_AUTH_SOCK=/tmp/ssh-agent.socket"
|
||||||
"SHELL=${env:SHELL}",
|
],
|
||||||
"-v",
|
"mounts": [
|
||||||
"${env:SSH_AUTH_SOCK}:/tmp/ssh-agent.socket",
|
{
|
||||||
"-e",
|
"source": "/tmp/.X11-unix",
|
||||||
"SSH_AUTH_SOCK=/tmp/ssh-agent.socket"
|
"target": "/tmp/.X11-unix",
|
||||||
],
|
"type": "bind",
|
||||||
"mounts": [
|
"consistency": "cached"
|
||||||
{
|
},
|
||||||
"source": "/tmp/.X11-unix",
|
{
|
||||||
"target": "/tmp/.X11-unix",
|
"source": "/dev/dri",
|
||||||
"type": "bind",
|
"target": "/dev/dri",
|
||||||
"consistency": "cached"
|
"type": "bind",
|
||||||
},
|
"consistency": "cached"
|
||||||
{
|
},
|
||||||
"source": "/dev/dri",
|
{
|
||||||
"target": "/dev/dri",
|
"source": "/dev/shm",
|
||||||
"type": "bind",
|
"target": "/dev/shm",
|
||||||
"consistency": "cached"
|
"type": "bind",
|
||||||
},
|
"consistency": "cached"
|
||||||
{
|
}
|
||||||
"source": "/dev/shm",
|
],
|
||||||
"target": "/dev/shm",
|
"postCreateCommand": {}
|
||||||
"type": "bind",
|
|
||||||
"consistency": "cached"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"postCreateCommand": {
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
4
.github/workflows/ci.yml
vendored
4
.github/workflows/ci.yml
vendored
@@ -17,9 +17,7 @@ jobs:
|
|||||||
- name: Install Biome
|
- name: Install Biome
|
||||||
run: bun install -g biome
|
run: bun install -g biome
|
||||||
- name: Biome Check
|
- name: Biome Check
|
||||||
run: biome check
|
run: biome ci
|
||||||
- name: Biome Lint
|
|
||||||
run: biome lint
|
|
||||||
|
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|||||||
@@ -3,11 +3,7 @@ import "@/App.css";
|
|||||||
import Dashboard from "@/components/Dashboard/Dashboard";
|
import Dashboard from "@/components/Dashboard/Dashboard";
|
||||||
|
|
||||||
function App() {
|
function App() {
|
||||||
return (
|
return <Dashboard />;
|
||||||
<>
|
|
||||||
<Dashboard />
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export default App;
|
export default App;
|
||||||
|
|||||||
@@ -1,9 +1,8 @@
|
|||||||
import Flatastic from "@/components/Flatastic/Flatastic";
|
|
||||||
import HomeAssistant from "@/components/HomeAssistant/HomeAssistant";
|
|
||||||
import Timetable from "@/components/Timetable/Timetable";
|
|
||||||
import Datetime from "@/components/Datetime/Datetime";
|
import Datetime from "@/components/Datetime/Datetime";
|
||||||
import Terminal from "@/components/Terminal/Terminal";
|
import Flatastic from "@/components/Flatastic/Flatastic";
|
||||||
import Footer from "@/components/Footer/Footer";
|
import Footer from "@/components/Footer/Footer";
|
||||||
|
import Terminal from "@/components/Terminal/Terminal";
|
||||||
|
import Timetable from "@/components/Timetable/Timetable";
|
||||||
|
|
||||||
import style from "./style.module.css";
|
import style from "./style.module.css";
|
||||||
|
|
||||||
|
|||||||
@@ -29,30 +29,27 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.cardHeader {
|
.cardHeader {
|
||||||
height: 30px;
|
height: 30px;
|
||||||
color: white;
|
color: white;
|
||||||
background-color: #000082;
|
background-color: #000082;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
padding-left: 5px;
|
padding-left: 5px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
.cardHeaderInactive {
|
.cardHeaderInactive {
|
||||||
height: 30px;
|
height: 30px;
|
||||||
color: #c0c0c0;
|
color: #c0c0c0;
|
||||||
background-color: #808080;
|
background-color: #808080;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
padding-left: 5px;
|
padding-left: 5px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
.clock {
|
.clock {
|
||||||
width: 45%;
|
width: 45%;
|
||||||
}
|
|
||||||
|
|
||||||
.terminal {
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.footer {
|
.footer {
|
||||||
background-color: #c0c0c0;
|
background-color: #c0c0c0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
|
import { useEffect, useState } from "react";
|
||||||
import style from "./style.module.css";
|
import style from "./style.module.css";
|
||||||
|
|
||||||
import { useState, useEffect } from "react";
|
|
||||||
|
|
||||||
export default function Datetime() {
|
export default function Datetime() {
|
||||||
const locale = "de";
|
const locale = "de";
|
||||||
const [today, setDate] = useState(new Date());
|
const [today, setDate] = useState(new Date());
|
||||||
@@ -27,7 +26,7 @@ export default function Datetime() {
|
|||||||
return (
|
return (
|
||||||
<div className={style.container}>
|
<div className={style.container}>
|
||||||
<div className={style.icon}>
|
<div className={style.icon}>
|
||||||
<img src="src/assets/clock.png" />
|
<img src="src/assets/clock.png" alt="Clock" />
|
||||||
</div>
|
</div>
|
||||||
<div className={style.textContainer}>
|
<div className={style.textContainer}>
|
||||||
<div className={style.time}>
|
<div className={style.time}>
|
||||||
|
|||||||
@@ -1,22 +1,21 @@
|
|||||||
.container {
|
.container {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding-right: 25px;
|
padding-right: 25px;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
img {
|
img {
|
||||||
height: 100px;
|
height: 100px;
|
||||||
scale: 130%;
|
scale: 130%;
|
||||||
object-fit: cover;
|
object-fit: cover;
|
||||||
}
|
}
|
||||||
|
|
||||||
.textContainer {
|
.textContainer {
|
||||||
font-size: 16pt;
|
font-size: 16pt;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
}
|
}
|
||||||
|
|
||||||
.divider {
|
.divider {
|
||||||
|
|||||||
@@ -1,28 +1,27 @@
|
|||||||
import { useEffect } from "react";
|
import { useEffect } from "react";
|
||||||
import { useFlatasticStore } from "@/store/flatastic";
|
import { useFlatasticStore } from "@/store/flatastic";
|
||||||
|
|
||||||
import type { FlatasticChore } from "@/types/flatasticChore";
|
import type { FlatasticChore, FlatasticUser } from "@/types/flatasticChore";
|
||||||
|
|
||||||
import style from "./style.module.css";
|
import style from "./style.module.css";
|
||||||
|
|
||||||
const idToNameMap: Record<number, string> = {
|
|
||||||
1836104: "Gruber",
|
|
||||||
1836101: "Darius",
|
|
||||||
1593610: "Arif",
|
|
||||||
1860060: "Rishab",
|
|
||||||
};
|
|
||||||
|
|
||||||
export default function Flatastic() {
|
export default function Flatastic() {
|
||||||
const fetchChores = useFlatasticStore((state) => state.fetch);
|
const fetchFlatasticData = useFlatasticStore((state) => state.fetch);
|
||||||
const chores = useFlatasticStore((state) => state.chores);
|
const flatasticData = useFlatasticStore((state) => state.flatasticData);
|
||||||
|
const chores = flatasticData?.chores;
|
||||||
|
const users = flatasticData?.users;
|
||||||
|
const idToNameMap: Record<number, string> = {};
|
||||||
|
users.forEach((user: FlatasticUser) => {
|
||||||
|
idToNameMap[user.id] = user.firstName;
|
||||||
|
});
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
fetchChores();
|
fetchFlatasticData();
|
||||||
const interval = setInterval(() => {
|
const interval = setInterval(() => {
|
||||||
fetchChores();
|
fetchFlatasticData();
|
||||||
}, 60000);
|
}, 60000);
|
||||||
return () => clearInterval(interval);
|
return () => clearInterval(interval);
|
||||||
}, [fetchChores]);
|
}, [fetchFlatasticData]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
|
|||||||
@@ -1,22 +1,22 @@
|
|||||||
.choreList {
|
.choreList {
|
||||||
list-style-type: none;
|
list-style-type: none;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
|
|
||||||
gap: 10px;
|
gap: 10px;
|
||||||
padding: 10px 0;
|
padding: 10px 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.chore {
|
.chore {
|
||||||
padding: 5px 10px;
|
padding: 5px 10px;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
border-top: 2px solid white;
|
border-top: 2px solid white;
|
||||||
border-left: 2px solid white;
|
border-left: 2px solid white;
|
||||||
border-bottom: 2px solid #828282;
|
border-bottom: 2px solid #828282;
|
||||||
border-right: 2px solid #828282;
|
border-right: 2px solid #828282;
|
||||||
}
|
}
|
||||||
|
|
||||||
.userName {
|
.userName {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
import { useState, useEffect } from "react";
|
import { useEffect, useState } from "react";
|
||||||
import Marquee from "react-fast-marquee";
|
import Marquee from "react-fast-marquee";
|
||||||
|
|
||||||
import Datetime from "@/components/Datetime/Datetime";
|
import pasta from "./pasta.ts";
|
||||||
|
|
||||||
import style from "./style.module.css";
|
import style from "./style.module.css";
|
||||||
|
|
||||||
export default function Footer() {
|
export default function Footer() {
|
||||||
@@ -13,6 +12,7 @@ export default function Footer() {
|
|||||||
<img
|
<img
|
||||||
className={style.startIcon}
|
className={style.startIcon}
|
||||||
src="src/assets/weed.png"
|
src="src/assets/weed.png"
|
||||||
|
alt="4:20"
|
||||||
/>
|
/>
|
||||||
Start
|
Start
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
9
src/components/Footer/pasta.ts
Normal file
9
src/components/Footer/pasta.ts
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
const pasta = [
|
||||||
|
'Ok, so I was playing the hit game Among Us the other day, and when the game started, a red bean-shaped character that appeared to be wearing a spacesuit told me "shh," while having his index finger in front of where his mouth should be. I believe this act made this red bean character extremely suspicious. To understand why this red bean character is suspicious, we first must understand how the game “Among Us” works. The game consists of 10 bean-shaped characters, called crewmates, that are given tasks for them to complete. As these characters do their tasks, they may witness abnormal things that are not supposed to happen, such as the lights turning off on their own, sudden reactor meltdown and other crewmates dying. These acts show that there is an imposter among the crewmates that is sabotaging and is trying to kill everyone. Now why is this important to determine why the red bean is suspicious? Well now we know how the game works, now we must analyze the red bean’s actions. At the beginning of the game, the red bean tells us “shh” while having his index finger in front of where his mouth should be. This action suggests that the red bean wants us to be quiet, or keep our mouths shut. Now why would the red bean want us to do this? This could be because the red bean wants to limit our communication in order to prevent us from spreading information. What information does the red bean want to prevent from spreading? We can assume that the reason why the red bean wants to prevent us from spreading information, is because he is actually the imposter, and he is planning on committing the crimes mentioned earlier. He does not want others to find out about actions he will cause, therefore he does not want us to communicate with each other. This concludes the reason for why I believe the red bean from the hit game Among Us is suspicious. So if you happen to see a red bean-shaped character wearing a spacesuit, please be careful.',
|
||||||
|
"「真正的Emo」只有DC的硬核emo和90年代末 的 Screamo 局,而所謂的「中西部 Emo」 不過 是被真正 Emo所影響的另類搖滾罷了。每次聽到 有人說什麼 My Chemical Romance 不是正宗的 Emo,但又覺得 Sunny Day Real Estate 是的時 候,我他媽就覺得有夠智障,因為他們和 My Chemical Romance 其實一樣都是假 Emo(只能 說他們是被emo影響的樂團)。真正的 Emo 應該 聽起來很強烈、甚至帶著一些憤怒的活力!假 Emo則軟弱、自卑,那些廢物把精力和情感錯誤 地注入音樂當中,只能說他們所謂的emo是失敗 的嘗試罷了。一些真正的Emo 團包括Pg 99、 Rites of Spring、Cap'n Jazz(絕對是中西部樂 團圈裡面唯一真正的 Emo 樂團)和Loma Prieta。那些假的 Emo 團像是 American Football My Chemical Romance Mineral... 等。EMO就該屬於硬核,不是獨立曲風、更別說 是流行龐克、另類搖滾、或是他媽的任何其他主 流類型!!!",
|
||||||
|
'"YoU tOucHEd ThAt BlOcK So yOu HavE tO PuLl tHat OnE Out" Go fuck yourself, that\'s not how the fucking game is played, you dumb, the fuck, asshole. Quoted from the official Jenga rules: "Players may tap a block to find a loose one. Any blocks moved but not played should be replaced, unless doing so would make the tower fall." You\'ve never even fucking read the rules have you, you shithead idiot. What, is the game over in 3 seconds, if you just so happen to touch a load bearing block first? FUCKING NO DUMBASS. Learn to read you illiterate fuck.',
|
||||||
|
"I can't fucking take it any more. Among Us has singlehandedly ruined my life. The other day my teacher was teaching us Greek Mythology and he mentioned a pegasus and I immediately thought 'Pegasus? more like Mega Sus!!!!' and I've never wanted to kms more. I can't look at a vent without breaking down and fucking crying. I can't eat pasta without thinking 'IMPASTA??? THATS PRETTY SUS!!!!' Skit 4 by Kanye West. The lyrics ruined me. A Mongoose, or the 25th island of greece. The scientific name for pig. I can't fucking take it anymore. Please fucking end my suffering.",
|
||||||
|
"What the fuck did you just fucking say about me, you little bitch? I'll have you know I graduated top of my class in the Navy Seals, and I've been involved in numerous secret raids on Al-Quaeda, and I have over 300 confirmed kills. I am trained in gorilla warfare and I'm the top sniper in the entire US armed forces. You are nothing to me but just another target. I will wipe you the fuck out with precision the likes of which has never been seen before on this Earth, mark my fucking words. You think you can get away with saying that shit to me over the Internet? Think again, fucker. As we speak I am contacting my secret network of spies across the USA and your IP is being traced right now so you better prepare for the storm, maggot. The storm that wipes out the pathetic little thing you call your life. You're fucking dead, kid. I can be anywhere, anytime, and I can kill you in over seven hundred ways, and that's just with my bare hands. Not only am I extensively trained in unarmed combat, but I have access to the entire arsenal of the United States Marine Corps and I will use it to its full extent to wipe your miserable ass off the face of the continent, you little shit. If only you could have known what unholy retribution your little \"clever\" comment was about to bring down upon you, maybe you would have held your fucking tongue. But you couldn't, you didn't, and now you're paying the price, you goddamn idiot. I will shit fury all over you and you will drown in it. You're fucking dead, kiddo.",
|
||||||
|
];
|
||||||
|
|
||||||
|
export default pasta;
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
const pasta = [
|
const pasta = [
|
||||||
'Ok, so I was playing the hit game Among Us the other day, and when the game started, a red bean-shaped character that appeared to be wearing a spacesuit told me "shh," while having his index finger in front of where his mouth should be. I believe this act made this red bean character extremely suspicious. To understand why this red bean character is suspicious, we first must understand how the game “Among Us” works. The game consists of 10 bean-shaped characters, called crewmates, that are given tasks for them to complete. As these characters do their tasks, they may witness abnormal things that are not supposed to happen, such as the lights turning off on their own, sudden reactor meltdown and other crewmates dying. These acts show that there is an imposter among the crewmates that is sabotaging and is trying to kill everyone. Now why is this important to determine why the red bean is suspicious? Well now we know how the game works, now we must analyze the red bean’s actions. At the beginning of the game, the red bean tells us “shh” while having his index finger in front of where his mouth should be. This action suggests that the red bean wants us to be quiet, or keep our mouths shut. Now why would the red bean want us to do this? This could be because the red bean wants to limit our communication in order to prevent us from spreading information. What information does the red bean want to prevent from spreading? We can assume that the reason why the red bean wants to prevent us from spreading information, is because he is actually the imposter, and he is planning on committing the crimes mentioned earlier. He does not want others to find out about actions he will cause, therefore he does not want us to communicate with each other. This concludes the reason for why I believe the red bean from the hit game Among Us is suspicious. So if you happen to see a red bean-shaped character wearing a spacesuit, please be careful.',
|
'Ok, so I was playing the hit game Among Us the other day, and when the game started, a red bean-shaped character that appeared to be wearing a spacesuit told me "shh," while having his index finger in front of where his mouth should be. I believe this act made this red bean character extremely suspicious. To understand why this red bean character is suspicious, we first must understand how the game “Among Us” works. The game consists of 10 bean-shaped characters, called crewmates, that are given tasks for them to complete. As these characters do their tasks, they may witness abnormal things that are not supposed to happen, such as the lights turning off on their own, sudden reactor meltdown and other crewmates dying. These acts show that there is an imposter among the crewmates that is sabotaging and is trying to kill everyone. Now why is this important to determine why the red bean is suspicious? Well now we know how the game works, now we must analyze the red bean’s actions. At the beginning of the game, the red bean tells us “shh” while having his index finger in front of where his mouth should be. This action suggests that the red bean wants us to be quiet, or keep our mouths shut. Now why would the red bean want us to do this? This could be because the red bean wants to limit our communication in order to prevent us from spreading information. What information does the red bean want to prevent from spreading? We can assume that the reason why the red bean wants to prevent us from spreading information, is because he is actually the imposter, and he is planning on committing the crimes mentioned earlier. He does not want others to find out about actions he will cause, therefore he does not want us to communicate with each other. This concludes the reason for why I believe the red bean from the hit game Among Us is suspicious. So if you happen to see a red bean-shaped character wearing a spacesuit, please be careful.',
|
||||||
"「真正的Emo」只有DC的硬核emo和90年代末 的 Screamo 局,而所謂的「中西部 Emo」 不過 是被真正 Emo所影響的另類搖滾罷了。每次聽到 有人說什麼 My Chemical Romance 不是正宗的 Emo,但又覺得 Sunny Day Real Estate 是的時 候,我他媽就覺得有夠智障,因為他們和 My Chemical Romance 其實一樣都是假 Emo(只能 說他們是被emo影響的樂團)。真正的 Emo 應該 聽起來很強烈、甚至帶著一些憤怒的活力!假 Emo則軟弱、自卑,那些廢物把精力和情感錯誤 地注入音樂當中,只能說他們所謂的emo是失敗 的嘗試罷了。一些真正的Emo 團包括Pg 99、 Rites of Spring、Cap'n Jazz(絕對是中西部樂 團圈裡面唯一真正的 Emo 樂團)和Loma Prieta。那些假的 Emo 團像是 American Football My Chemical Romance Mineral... 等。EMO就該屬於硬核,不是獨立曲風、更別說 是流行龐克、另類搖滾、或是他媽的任何其他主 流類型!!!",
|
"「真正的Emo」只有DC的硬核emo和90年代末 的 Screamo 局,而所謂的「中西部 Emo」 不過 是被真正 Emo所影響的另類搖滾罷了。每次聽到 有人說什麼 My Chemical Romance 不是正宗的 Emo,但又覺得 Sunny Day Real Estate 是的時 候,我他媽就覺得有夠智障,因為他們和 My Chemical Romance 其實一樣都是假 Emo(只能 說他們是被emo影響的樂團)。真正的 Emo 應該 聽起來很強烈、甚至帶著一些憤怒的活力!假 Emo則軟弱、自卑,那些廢物把精力和情感錯誤 地注入音樂當中,只能說他們所謂的emo是失敗 的嘗試罷了。一些真正的Emo 團包括Pg 99、 Rites of Spring、Cap'n Jazz(絕對是中西部樂 團圈裡面唯一真正的 Emo 樂團)和Loma Prieta。那些假的 Emo 團像是 American Football My Chemical Romance Mineral... 等。EMO就該屬於硬核,不是獨立曲風、更別說 是流行龐克、另類搖滾、或是他媽的任何其他主 流類型!!!",
|
||||||
'\"YoU tOucHEd ThAt BlOcK So yOu HavE tO PuLl tHat OnE Out" Go fuck yourself, that\'s not how the fucking game is played, you dumb, the fuck, asshole. Quoted from the official Jenga rules: "Players may tap a block to find a loose one. Any blocks moved but not played should be replaced, unless doing so would make the tower fall." You\'ve never even fucking read the rules have you, you shithead idiot. What, is the game over in 3 seconds, if you just so happen to touch a load bearing block first? FUCKING NO DUMBASS. Learn to read you illiterate fuck.',
|
'"YoU tOucHEd ThAt BlOcK So yOu HavE tO PuLl tHat OnE Out" Go fuck yourself, that\'s not how the fucking game is played, you dumb, the fuck, asshole. Quoted from the official Jenga rules: "Players may tap a block to find a loose one. Any blocks moved but not played should be replaced, unless doing so would make the tower fall." You\'ve never even fucking read the rules have you, you shithead idiot. What, is the game over in 3 seconds, if you just so happen to touch a load bearing block first? FUCKING NO DUMBASS. Learn to read you illiterate fuck.',
|
||||||
"I can't fucking take it any more. Among Us has singlehandedly ruined my life. The other day my teacher was teaching us Greek Mythology and he mentioned a pegasus and I immediately thought 'Pegasus? more like Mega Sus!!!!' and I've never wanted to kms more. I can't look at a vent without breaking down and fucking crying. I can't eat pasta without thinking 'IMPASTA??? THATS PRETTY SUS!!!!' Skit 4 by Kanye West. The lyrics ruined me. A Mongoose, or the 25th island of greece. The scientific name for pig. I can't fucking take it anymore. Please fucking end my suffering.",
|
"I can't fucking take it any more. Among Us has singlehandedly ruined my life. The other day my teacher was teaching us Greek Mythology and he mentioned a pegasus and I immediately thought 'Pegasus? more like Mega Sus!!!!' and I've never wanted to kms more. I can't look at a vent without breaking down and fucking crying. I can't eat pasta without thinking 'IMPASTA??? THATS PRETTY SUS!!!!' Skit 4 by Kanye West. The lyrics ruined me. A Mongoose, or the 25th island of greece. The scientific name for pig. I can't fucking take it anymore. Please fucking end my suffering.",
|
||||||
"What the fuck did you just fucking say about me, you little bitch? I'll have you know I graduated top of my class in the Navy Seals, and I've been involved in numerous secret raids on Al-Quaeda, and I have over 300 confirmed kills. I am trained in gorilla warfare and I'm the top sniper in the entire US armed forces. You are nothing to me but just another target. I will wipe you the fuck out with precision the likes of which has never been seen before on this Earth, mark my fucking words. You think you can get away with saying that shit to me over the Internet? Think again, fucker. As we speak I am contacting my secret network of spies across the USA and your IP is being traced right now so you better prepare for the storm, maggot. The storm that wipes out the pathetic little thing you call your life. You're fucking dead, kid. I can be anywhere, anytime, and I can kill you in over seven hundred ways, and that's just with my bare hands. Not only am I extensively trained in unarmed combat, but I have access to the entire arsenal of the United States Marine Corps and I will use it to its full extent to wipe your miserable ass off the face of the continent, you little shit. If only you could have known what unholy retribution your little \"clever\" comment was about to bring down upon you, maybe you would have held your fucking tongue. But you couldn't, you didn't, and now you're paying the price, you goddamn idiot. I will shit fury all over you and you will drown in it. You're fucking dead, kiddo.",
|
"What the fuck did you just fucking say about me, you little bitch? I'll have you know I graduated top of my class in the Navy Seals, and I've been involved in numerous secret raids on Al-Quaeda, and I have over 300 confirmed kills. I am trained in gorilla warfare and I'm the top sniper in the entire US armed forces. You are nothing to me but just another target. I will wipe you the fuck out with precision the likes of which has never been seen before on this Earth, mark my fucking words. You think you can get away with saying that shit to me over the Internet? Think again, fucker. As we speak I am contacting my secret network of spies across the USA and your IP is being traced right now so you better prepare for the storm, maggot. The storm that wipes out the pathetic little thing you call your life. You're fucking dead, kid. I can be anywhere, anytime, and I can kill you in over seven hundred ways, and that's just with my bare hands. Not only am I extensively trained in unarmed combat, but I have access to the entire arsenal of the United States Marine Corps and I will use it to its full extent to wipe your miserable ass off the face of the continent, you little shit. If only you could have known what unholy retribution your little \"clever\" comment was about to bring down upon you, maybe you would have held your fucking tongue. But you couldn't, you didn't, and now you're paying the price, you goddamn idiot. I will shit fury all over you and you will drown in it. You're fucking dead, kiddo.",
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -29,15 +29,12 @@ const lineNumberToStyle = (number) => {
|
|||||||
switch (number) {
|
switch (number) {
|
||||||
case "S2":
|
case "S2":
|
||||||
return styles.S2;
|
return styles.S2;
|
||||||
break;
|
|
||||||
case "S5":
|
case "S5":
|
||||||
case "S51":
|
case "S51":
|
||||||
return styles.S5;
|
return styles.S5;
|
||||||
break;
|
|
||||||
case "S1":
|
case "S1":
|
||||||
case "S11":
|
case "S11":
|
||||||
return styles.S1;
|
return styles.S1;
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
return styles.lineNumberDefault;
|
return styles.lineNumberDefault;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,8 +4,8 @@
|
|||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
|
|
||||||
color-scheme: light dark;
|
color-scheme: light dark;
|
||||||
color: rgba(255, 255, 255, 0.87);
|
color: #213547;
|
||||||
background-color: #242424;
|
background-color: #ffffff;
|
||||||
|
|
||||||
font-synthesis: none;
|
font-synthesis: none;
|
||||||
text-rendering: optimizeLegibility;
|
text-rendering: optimizeLegibility;
|
||||||
@@ -18,9 +18,6 @@ a {
|
|||||||
color: #646cff;
|
color: #646cff;
|
||||||
text-decoration: inherit;
|
text-decoration: inherit;
|
||||||
}
|
}
|
||||||
a:hover {
|
|
||||||
color: #535bf2;
|
|
||||||
}
|
|
||||||
|
|
||||||
body {
|
body {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
@@ -42,7 +39,7 @@ button {
|
|||||||
font-size: 1em;
|
font-size: 1em;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
font-family: inherit;
|
font-family: inherit;
|
||||||
background-color: #1a1a1a;
|
background-color: #f9f9f9;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
transition: border-color 0.25s;
|
transition: border-color 0.25s;
|
||||||
}
|
}
|
||||||
@@ -53,16 +50,3 @@ button:focus,
|
|||||||
button:focus-visible {
|
button:focus-visible {
|
||||||
outline: 4px auto -webkit-focus-ring-color;
|
outline: 4px auto -webkit-focus-ring-color;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (prefers-color-scheme: light) {
|
|
||||||
:root {
|
|
||||||
color: #213547;
|
|
||||||
background-color: #ffffff;
|
|
||||||
}
|
|
||||||
a:hover {
|
|
||||||
color: #747bff;
|
|
||||||
}
|
|
||||||
button {
|
|
||||||
background-color: #f9f9f9;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,12 +1,23 @@
|
|||||||
import { create } from "zustand";
|
import { create } from "zustand";
|
||||||
import { devtools } from "zustand/middleware";
|
import { devtools } from "zustand/middleware";
|
||||||
import Flatastic from "@/api/flatastic";
|
import Flatastic from "@/api/flatastic";
|
||||||
import type { FlatasticChore } from "@/types/flatasticChore";
|
import type { FlatasticChore, FlatasticUser } from "@/types/flatasticChore";
|
||||||
|
|
||||||
|
// biome-ignore format: deep
|
||||||
|
function parseInformationData(data): FlatasticUser[] {
|
||||||
|
return data.flatmates.map((user: { id: string; firstName: string }) => ({
|
||||||
|
id: user.id as string,
|
||||||
|
firstName: user.firstName as string,
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
|
||||||
const useFlatasticStore = create(
|
const useFlatasticStore = create(
|
||||||
devtools(
|
devtools(
|
||||||
(set) => ({
|
(set) => ({
|
||||||
chores: [],
|
flatasticData: {
|
||||||
|
chores: [] as FlatasticChore[],
|
||||||
|
users: [] as FlatasticUser[],
|
||||||
|
},
|
||||||
fetch: async () => {
|
fetch: async () => {
|
||||||
if (!import.meta.env.VITE_FLATTASTIC_API_KEY) {
|
if (!import.meta.env.VITE_FLATTASTIC_API_KEY) {
|
||||||
throw new Error("Flatastic API Key is not set");
|
throw new Error("Flatastic API Key is not set");
|
||||||
@@ -15,9 +26,16 @@ const useFlatasticStore = create(
|
|||||||
import.meta.env.VITE_FLATTASTIC_API_KEY,
|
import.meta.env.VITE_FLATTASTIC_API_KEY,
|
||||||
);
|
);
|
||||||
const data = await flatastic.getTaskList();
|
const data = await flatastic.getTaskList();
|
||||||
|
const dataB = await flatastic.getInformation();
|
||||||
|
|
||||||
console.log("Flatastic chores fetched:", data);
|
console.log("Flatastic chores fetched:", data);
|
||||||
set({ chores: data as FlatasticChore[] });
|
console.log("Flatastic information fetched:", dataB);
|
||||||
|
set({
|
||||||
|
flatasticData: {
|
||||||
|
chores: data as FlatasticChore[],
|
||||||
|
users: parseInformationData(dataB),
|
||||||
|
},
|
||||||
|
});
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,3 +1,13 @@
|
|||||||
|
interface Flatastic {
|
||||||
|
users: Array<FlatasticUser>;
|
||||||
|
chores: Array<FlatasticChore>;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface FlatasticUser {
|
||||||
|
id: number;
|
||||||
|
firstName: string;
|
||||||
|
}
|
||||||
|
|
||||||
interface FlatasticChore {
|
interface FlatasticChore {
|
||||||
id: number;
|
id: number;
|
||||||
title: string;
|
title: string;
|
||||||
@@ -10,4 +20,4 @@ interface FlatasticChore {
|
|||||||
timeLeftNext: number;
|
timeLeftNext: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
export type { FlatasticChore };
|
export type { Flatastic, FlatasticChore, FlatasticUser };
|
||||||
|
|||||||
Reference in New Issue
Block a user