Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into feat/bun
Browse files Browse the repository at this point in the history
  • Loading branch information
ImSoZRious committed Mar 30, 2024
2 parents 33116d5 + 3b8ec0b commit 5db16c7
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 14 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/cd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,28 @@ name: 'CD'

on:
workflow_dispatch:
inputs:
tag:
description: 'Tag to change to'
default: 'latest'
required: false
type: string

env:
IMAGE_NAME: registry.digitalocean.com/cutu2024/cutu2024-backend

jobs:
deploy:
runs-on: ubuntu-latest

steps:
- name: Set new image tag
uses: actions-hub/kubectl@master
env:
KUBE_CONFIG: ${{ secrets.KUBE_CONFIG }}
with:
args: set image deployment/cutu2024-backend cutu2024-backend=${{ env.IMAGE_NAME }}:${{ inputs.tag }}

- name: Rollout new deployment
uses: actions-hub/kubectl@master
env:
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
name: 'CI'

on:
push:
branches:
- main
workflow_dispatch:
inputs:
tag:
description: 'Image tag'
default: 'latest'
required: false
type: string

env:
IMAGE_NAME: registry.digitalocean.com/cutu2024/cutu2024-backend
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ const FootBallSlider = (props: FootBallSliderProps) => {
transition: "left 0.3s ease",
}}
>
<div className="relative w-[150px] h-[150px]"><Image
<div className="relative w-[250px] h-[250px]"><Image
src={"slider/ball.svg"}
fill
objectFit="contain"
Expand Down
5 changes: 3 additions & 2 deletions apps/web/src/app/(screen)/screen/components/Overlay.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ interface OverLayProps {

const Page = ({data} : OverLayProps) => {
return (
<div className="w-full h-full bg-[#3dff3d] text-white text-3xl font-bold flex flex-col justify-between p-[50px]">
<div className="w-full h-full bg-[#3dff3d] text-white text-3xl font-bold flex flex-col justify-between p-[50px] pb-[100px]">
<div className="flex justify-between">
<div className="flex flex-col items-center gap-10">
<Image
Expand Down Expand Up @@ -49,7 +49,7 @@ const Page = ({data} : OverLayProps) => {
</div>
</div>
<div>
<div className="flex justify-between mb-4">
<div className="flex justify-between mb-[50px]">
<div className="flex flex-col items-center">
<Image
src="overlay/team-cu.svg"
Expand Down Expand Up @@ -77,6 +77,7 @@ const Page = ({data} : OverLayProps) => {


const OverLay = ({data}: OverLayProps) => {

return (
<div className="w-[3840px] h-[1080px] flex">
<Page data = {data}/>
Expand Down
13 changes: 7 additions & 6 deletions apps/web/src/app/(screen)/screen/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@ const Screen = () => {
cu: 50,
tu: 50
})
const cookies = new Cookies( null, { path: "/" } )
const cookies = new Cookies( null, {httpOnly: true} )
console.log(data)
//console.log('show: ', showedPage)

useEffect(() => {
const handleConnect = (socket: Socket) => {
Expand All @@ -31,13 +32,13 @@ const Screen = () => {
const cuScore = Math.round(parseFloat(parts[1]));
const tuScore = Math.round(parseFloat(parts[3]));

//console.log({cuScore, tuScore} )
//console.log({cuScore, tuScore})
setData(data => ({...data, cu: cuScore, tu: tuScore}))
}

const handleScreen = (screen: string) => {
//console.log(screen);
//setShowPage('full' ? 'overlay' : 'display')
console.log(screen);
setShowPage(screen == 'overlay' ? 'overlay' : 'display')
}

const handleCid = (serverCid: string) => {
Expand Down Expand Up @@ -103,9 +104,9 @@ const Screen = () => {
}, []);

return (
<div>
<div className="bg-[#3dff3d]">
{showedPage == "overlay" ? <OverLay data={data}/> : <Display data={data}/>}
<button className="w-[200px] h-[200px] bg-white" onClick={() => setShowPage(prev => prev == "overlay" ? "display" : "overlay")}>เปลี่ยนหน้า</button>
{/* <button className="w-[200px] h-[200px] bg-white" onClick={() => setShowPage(prev => prev == "overlay" ? "display" : "overlay")}>เปลี่ยนหน้า</button> */}
</div>
);
}
Expand Down
4 changes: 2 additions & 2 deletions apps/web/src/app/(user)/shake/[university]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ export default function Shake() {
const cookies = new Cookies();
const [ socketState, setSocketState ] = useState<Socket | null>(null)

const temp = setTimeout(() => {
/* const temp = setTimeout(() => {
setCount(prevCount => {
const newCount = prevCount + 1;
if (socketState?.connected) {
socketState.emit("submit", `${university} 1`);
}
return newCount;
});
}, 100)
}, 100) */

useEffect(() => {
const handleConnect = () => {
Expand Down

0 comments on commit 5db16c7

Please sign in to comment.