Skip to content

Commit

Permalink
Merge pull request #291 from DecentralCardGame/287-voting
Browse files Browse the repository at this point in the history
287 voting
  • Loading branch information
lxgr-linux authored Mar 31, 2024
2 parents 4a2d2ce + 3309f6e commit 4f70305
Show file tree
Hide file tree
Showing 39 changed files with 452 additions and 444 deletions.
3 changes: 2 additions & 1 deletion .fleet/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
"backend.maxHeapSizeMb": 1568,
"editor.formatOnSave": true,
"nodejs.editor.formatOnSave.stylelint.mode": "Auto",
"nodejs.editor.formatOnSave.eslint.glob": "{**/*,*}.{js,ts,jsx,tsx,vue}"
"nodejs.editor.formatOnSave.eslint.glob": "{**/*,*}.{js,ts,jsx,tsx,vue}",
"nodejs.editor.formatOnSave.eslint.mode": "Enabled"
}
20 changes: 6 additions & 14 deletions .github/workflows/test_deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,11 @@ jobs:
}}

steps:
- name: exit
if: ${{ env.LABEL == 'none' }}
- name: install liefer
if: ${{ env.LABEL != 'none' }}
run: |
exit 1
- name: install ssh keys
# check this thread to understand why its needed:
# https://stackoverflow.com/a/70447517
go install github.com/lxgr-linux/liefer@latest
- name: deploy
if: ${{ env.LABEL != 'none' }}
run: |
echo env.tag_name
install -m 600 -D /dev/null ~/.ssh/id_rsa
echo "${{ secrets.LXGR_DEPLOY_PRIV }}" > ~/.ssh/id_rsa
ssh-keyscan -H ${{ secrets.LXGR_HOST }} > ~/.ssh/known_hosts
- name: connect and pull
run: ssh ${{ secrets.LXGR_USER }}@${{ secrets.LXGR_HOST }} "cd ~/$LABEL && git checkout . && git fetch && git checkout ${{ github.event.pull_request.head.ref }} && git pull && npm i && npm run build && chgrp -R www-data ~/$LABEL && exit"
- name: cleanup
run: rm -rf ~/.ssh
~/go/bin/liefer deliver $LABEL ${{ github.event.pull_request.head.ref }} ${{ secrets.LIEFER_PRIVKEY }} --address ${{ secrets.LXGR_HOST }}:8080
Binary file added src/assets/figma/Boars.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
28 changes: 0 additions & 28 deletions src/components/elements/AboutProgressbar.vue

This file was deleted.

32 changes: 14 additions & 18 deletions src/components/elements/BulletList.vue
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<template>
<div>
<ul>
<li
<li
v-for="(line, index) in text"
:key="index"
:class="{ 'filled': type[index]==='filled' }"
:class="{ filled: type[index] === 'filled' }"
>
{{ line }}
</li>
Expand All @@ -13,30 +13,26 @@
</template>

<script>
export default {
name: 'BulletList',
name: "BulletList",
props: {
text: {
type: Array,
default() {
return []
}
return [];
},
},
type: {
type: Array,
default() {
return []
}
}
},
data () {
return {
}
return [];
},
},
},
mounted () {
data() {
return {};
},
methods: {
}
}
</script>
mounted() {},
methods: {},
};
</script>
16 changes: 7 additions & 9 deletions src/components/elements/CCButton/BaseCCButton.vue
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<template>
<div>
<button
class="w-72 h-12 rounded shadow-xl shadow-black/25 text-center text-base font-bold font-[roboto] uppercase active:bg-[#552026] active:text-white active:border-0 hover:text-black hover:bg-white hover:border-black hover:border-4"
:class="[getTextColor(type), getButtonColor(type)]"
class="rounded shadow-xl shadow-black/25 text-center text-base font-bold font-[roboto] uppercase active:bg-[#552026] active:text-white active:border-0 hover:text-black hover:bg-white hover:border-black hover:border-4"
:class="[getTextColor(type), getBgColor(type), ...sizeClass]"
@click="emit('click')"
>
<slot />
Expand All @@ -11,20 +11,18 @@
</template>

<script setup lang="ts">
import {
ButtonType,
getButtonColor,
getTextColor,
} from "@/components/elements/CCButton/ButtonType";
import { Color, getBgColor, getTextColor } from "@/components/utils/color";
const emit = defineEmits(["click"]);
const props = withDefaults(
defineProps<{
type?: ButtonType;
sizeClass?: string[];
type?: Color;
}>(),
{
type: ButtonType.YELLOW,
sizeClass: () => ["w-72", "h-12"],
type: Color.YELLOW,
},
);
</script>
38 changes: 0 additions & 38 deletions src/components/elements/CCButton/ButtonType.ts

This file was deleted.

11 changes: 5 additions & 6 deletions src/components/elements/CCButton/LinkCCButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,17 @@
</template>

<script setup lang="ts">
import { ButtonType } from "@/components/elements/CCButton/ButtonType";
import BaseCCButton from "@/components/elements/CCButton/BaseCCButton.vue";
import { Color } from "@/components/utils/color";
const props = withDefaults(
defineProps<{
to: string;
type?: ButtonType;
type?: Color;
}>(),
{
to: "dummy",
type: ButtonType.YELLOW,
}
type: Color.YELLOW,
},
);
import BaseCCButton from "@/components/elements/CCButton/BaseCCButton.vue";
</script>
8 changes: 4 additions & 4 deletions src/components/elements/CCButton/RouterCCButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,17 @@
</template>

<script setup lang="ts">
import { ButtonType } from "@/components/elements/CCButton/ButtonType";
import BaseCCButton from "@/components/elements/CCButton/BaseCCButton.vue";
import { Color } from "@/components/utils/color";
const props = withDefaults(
defineProps<{
to: any;
type?: ButtonType;
type?: Color;
}>(),
{
to: {},
type: ButtonType.YELLOW,
}
type: Color.YELLOW,
},
);
</script>
24 changes: 24 additions & 0 deletions src/components/elements/CCButton/SmallCCButton.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<template>
<BaseCCButton
:size-class="['w-48', 'h-12']"
:type="type"
@click="emit('click')"
>
<slot />
</BaseCCButton>
</template>
<script setup lang="ts">
import BaseCCButton from "@/components/elements/CCButton/BaseCCButton.vue";
import { Color } from "@/components/utils/color";
const emit = defineEmits(["click"]);
const props = withDefaults(
defineProps<{
type?: Color;
}>(),
{
type: Color.YELLOW,
},
);
</script>
14 changes: 5 additions & 9 deletions src/components/elements/Dropdown/Dropdown.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
class="relative inline-block text-left rounded hover:cursor-pointer"
:class="[
...(isOpen ? ['ring', 'ring-white', 'ring-opacity-100'] : []),
getButtonColor(type),
getBgColor(type),
getTextColor(type),
]"
@click="toggleDropdown"
Expand All @@ -19,7 +19,7 @@
<ul
v-if="isOpen"
class="absolute z-30 ring ring-white rounded ring-opacity-100 whitespace-nowrap"
:class="[getButtonColor(type)]"
:class="[getBgColor(type)]"
>
<li
v-for="(option, idx) in options"
Expand All @@ -35,11 +35,7 @@

<script setup lang="ts" generic="T">
import { ref, watch } from "vue";
import {
ButtonType,
getButtonColor,
getTextColor,
} from "@/components/elements/CCButton/ButtonType";
import { Color, getBgColor, getTextColor } from "@/components/utils/color";
import { useDropdown } from "@/def-composables/useDropdown";
const model = defineModel<T>();
Expand All @@ -52,13 +48,13 @@ const props = withDefaults(
options: Array<T>;
initial?: string;
displayFn?: (v: T) => string;
type?: ButtonType;
type?: Color;
}>(),
{
options: () => [],
initial: "?",
displayFn: (v: T): string => "" + v,
type: ButtonType.PUSSYRED,
type: Color.PUSSYRED,
},
);
Expand Down
Loading

0 comments on commit 4f70305

Please sign in to comment.