-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* [FEAT] Stream Elements * WebSockets working * Icon improvements * Upgrade to vue 3 and make sure old stuff still works * Add storybook for components * More finished components * Working dynamic component * Better slug * Set node versions to 20 everywhere and make sure all scripts run
- Loading branch information
1 parent
273cd6f
commit 0266e38
Showing
42 changed files
with
10,677 additions
and
7,979 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,3 +23,6 @@ logs | |
.env | ||
.env.* | ||
!.env.example | ||
|
||
*storybook.log | ||
storybook-static |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
v20.14.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import type { StorybookConfig } from '@storybook/vue3-vite' | ||
|
||
const config: StorybookConfig = { | ||
stories: ['../**/*.mdx', '../**/*.stories.ts'], | ||
addons: ['@storybook/addon-links', '@storybook/addon-essentials', '@storybook/addon-interactions'], | ||
framework: { | ||
name: '@storybook/vue3-vite', | ||
options: {}, | ||
}, | ||
} | ||
export default config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import type { Preview } from '@storybook/vue3' | ||
|
||
const preview: Preview = { | ||
tags: ['autodocs'], | ||
parameters: { | ||
controls: { | ||
matchers: { | ||
color: /(background|color)$/i, | ||
date: /Date$/i, | ||
}, | ||
}, | ||
docs: { | ||
autodocs: true, | ||
}, | ||
layout: 'fullscreen', | ||
}, | ||
} | ||
|
||
export default preview |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
FROM node:22 as base | ||
FROM node:20 as base | ||
|
||
LABEL description="SVBot-Web" | ||
LABEL version="1.3" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import type { Meta, StoryObj } from '@storybook/vue3' | ||
import GenericIcon from './GenericIcon.vue' | ||
|
||
const meta = { | ||
title: 'Components/Generic Icon', | ||
component: GenericIcon, | ||
} satisfies Meta<typeof GenericIcon> | ||
|
||
export default meta | ||
type Story = StoryObj<typeof GenericIcon> | ||
|
||
export const Default: Story = { | ||
args: { | ||
src: '/ranks/orange/grandmaster.png', | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<template> | ||
<div class="icon"><img :src="src" /></div> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
defineProps({ | ||
src: { | ||
type: String, | ||
required: true, | ||
}, | ||
}) | ||
</script> | ||
|
||
<style scoped> | ||
.icon { | ||
object-fit: contain; | ||
} | ||
</style> |
30 changes: 30 additions & 0 deletions
30
components/the-handicaps-vertical/TheHandicapsVertical.stories.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import type { Meta, StoryObj } from '@storybook/vue3' | ||
import TheHandicapsVertical from './TheHandicapsVertical.vue' | ||
import { Handicap } from '../../types' | ||
|
||
const meta = { | ||
title: 'Components/The Handicaps Vertical', | ||
component: TheHandicapsVertical, | ||
} satisfies Meta<typeof TheHandicapsVertical> | ||
|
||
export default meta | ||
type Story = StoryObj<typeof TheHandicapsVertical> | ||
|
||
export const Default: Story = { | ||
args: { | ||
handicaps: [ | ||
new Handicap({ | ||
points: 40, | ||
img: 'no_sound.png', | ||
text: 'NO IN GAME AUDIO', | ||
selected: true, | ||
}), | ||
new Handicap({ | ||
points: 40, | ||
img: 'no_ult.png', | ||
text: "CAN'T USE ULTIMATE", | ||
selected: true, | ||
}), | ||
], | ||
}, | ||
} |
41 changes: 41 additions & 0 deletions
41
components/the-handicaps-vertical/TheHandicapsVertical.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<template> | ||
<div class="handicaps"> | ||
<link rel="preconnect" href="https://fonts.bunny.net" /> | ||
<link href="https://fonts.bunny.net/css2?family=Rubik&display=swap" rel="stylesheet" /> | ||
|
||
<template v-for="(handicap, i) in handicaps" :key="i"> | ||
<img :src="`/handicaps/orange/${handicap.img}`" /> | ||
<span>{{ handicap.text }}</span> | ||
</template> | ||
</div> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import type { Handicap } from '@/types' | ||
defineProps({ | ||
handicaps: { | ||
type: Object as PropType<Handicap[]>, | ||
required: true, | ||
}, | ||
}) | ||
</script> | ||
|
||
<style scoped> | ||
* { | ||
box-sizing: border-box; | ||
font-family: Rubik, sans-serif; | ||
font-size: 26px; | ||
color: var(--main-color, #ff9d16); | ||
} | ||
.handicaps { | ||
display: grid; | ||
grid-template-columns: auto 1fr; | ||
gap: 16px; | ||
} | ||
img { | ||
width: 40px; | ||
height: 40px; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import type { Meta, StoryObj } from '@storybook/vue3' | ||
import TheHandicaps from './TheHandicaps.vue' | ||
import { Handicap } from '../../types' | ||
|
||
const meta = { | ||
title: 'Components/The Handicaps', | ||
component: TheHandicaps, | ||
} satisfies Meta<typeof TheHandicaps> | ||
|
||
export default meta | ||
type Story = StoryObj<typeof TheHandicaps> | ||
|
||
export const Default: Story = { | ||
args: { | ||
handicaps: [ | ||
new Handicap({ | ||
points: 40, | ||
img: 'no_sound.png', | ||
text: 'NO IN GAME AUDIO', | ||
selected: true, | ||
}), | ||
new Handicap({ | ||
points: 40, | ||
img: 'no_ult.png', | ||
text: "CAN'T USE ULTIMATE", | ||
selected: true, | ||
}), | ||
], | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<template> | ||
<div class="handicaps"> | ||
<img v-for="(handicap, i) in handicaps" :key="i" :src="`/handicaps/orange/${handicap.img}`" /> | ||
</div> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import type { Handicap } from '@/types' | ||
defineProps({ | ||
handicaps: { | ||
type: Array as PropType<Handicap[]>, | ||
required: true, | ||
}, | ||
}) | ||
</script> | ||
|
||
<style scoped> | ||
.handicaps { | ||
display: flex; | ||
flex-direction: row; | ||
align-items: center; | ||
height: 52px; | ||
} | ||
img { | ||
width: 40px; | ||
height: 40px; | ||
margin-right: 5px; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import type { Meta, StoryObj } from '@storybook/vue3' | ||
import TheLeaderboard from './TheLeaderboard.vue' | ||
|
||
const meta = { | ||
title: 'Components/The Leaderboard', | ||
component: TheLeaderboard, | ||
} satisfies Meta<typeof TheLeaderboard> | ||
|
||
export default meta | ||
type Story = StoryObj<typeof TheLeaderboard> | ||
|
||
export const Default: Story = { | ||
args: { | ||
standalone: false, | ||
contestants: Array(15).fill({ | ||
_id: '1', | ||
name: 'test1', | ||
teamName: 'team1', | ||
personalBest: 20, | ||
bronzePoints: 20, | ||
silverPoints: 0, | ||
goldPoints: 0, | ||
platinumPoints: 0, | ||
diamondPoints: 0, | ||
masterPoints: 0, | ||
grandmasterPoints: 0, | ||
}), | ||
}, | ||
} |
Oops, something went wrong.