chore: market build app
This commit is contained in:
parent
821e453bc0
commit
35ea54ecea
@ -1,5 +1,5 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { computed } from "vue";
|
import { computed, ref } from "vue";
|
||||||
import { storeToRefs } from "pinia";
|
import { storeToRefs } from "pinia";
|
||||||
import { useMarketStore } from "../stores/market";
|
import { useMarketStore } from "../stores/market";
|
||||||
|
|
||||||
@ -10,6 +10,7 @@ defineEmits<{
|
|||||||
const marketStore = useMarketStore();
|
const marketStore = useMarketStore();
|
||||||
const { userBets } = storeToRefs(marketStore);
|
const { userBets } = storeToRefs(marketStore);
|
||||||
const loading = computed(() => marketStore.isLoading);
|
const loading = computed(() => marketStore.isLoading);
|
||||||
|
const isWonBetsExpanded = ref(false);
|
||||||
|
|
||||||
const totalBetAmount = computed(() => {
|
const totalBetAmount = computed(() => {
|
||||||
return userBets.value.reduce((sum, bet) => sum + bet.amount, 0);
|
return userBets.value.reduce((sum, bet) => sum + bet.amount, 0);
|
||||||
@ -116,11 +117,12 @@ const totalWinnings = computed(() => {
|
|||||||
|
|
||||||
<!-- Winning Bets -->
|
<!-- Winning Bets -->
|
||||||
<div v-if="winningBets.length > 0">
|
<div v-if="winningBets.length > 0">
|
||||||
<h3 class="text-xl font-bold mb-4 flex items-center gap-2">
|
<button @click="isWonBetsExpanded = !isWonBetsExpanded" class="text-xl font-bold mb-4 flex items-center gap-2 cursor-pointer hover:opacity-70 transition-opacity">
|
||||||
|
<i :class="['mdi', isWonBetsExpanded ? 'mdi-chevron-down' : 'mdi-chevron-right']"></i>
|
||||||
<i class="mdi mdi-check-circle text-success"></i>
|
<i class="mdi mdi-check-circle text-success"></i>
|
||||||
Won Bets ({{ winningBets.length }})
|
Won Bets ({{ winningBets.length }})
|
||||||
</h3>
|
</button>
|
||||||
<div class="space-y-4">
|
<div v-if="isWonBetsExpanded" class="space-y-4">
|
||||||
<div
|
<div
|
||||||
v-for="bet in winningBets"
|
v-for="bet in winningBets"
|
||||||
:key="bet.uuid"
|
:key="bet.uuid"
|
||||||
|
|||||||
@ -1,16 +1,8 @@
|
|||||||
import { defineStore } from 'pinia'
|
import { defineStore } from 'pinia'
|
||||||
import { ref } from 'vue'
|
import { ref } from 'vue'
|
||||||
|
import type { ObjectivResultOut, LeaderboardEntryOut } from '@/api/types.gen'
|
||||||
|
|
||||||
export interface Objective {
|
export type Objective = ObjectivResultOut
|
||||||
objectiv_id: string
|
|
||||||
display_string: string
|
|
||||||
first_seen_at: string | null
|
|
||||||
count: number
|
|
||||||
max_count: number
|
|
||||||
seed: string | null
|
|
||||||
points_per_objectiv: number
|
|
||||||
total_points: number
|
|
||||||
}
|
|
||||||
|
|
||||||
interface UserInfo {
|
interface UserInfo {
|
||||||
username: string
|
username: string
|
||||||
@ -21,15 +13,6 @@ interface UserInfo {
|
|||||||
isStaff: boolean
|
isStaff: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
interface LeaderboardEntry {
|
|
||||||
rank: number
|
|
||||||
username: string
|
|
||||||
total_score: number
|
|
||||||
objectives_count: number
|
|
||||||
deaths_count: number
|
|
||||||
is_staff: boolean
|
|
||||||
}
|
|
||||||
|
|
||||||
export const useNoitaStore = defineStore('noita', () => {
|
export const useNoitaStore = defineStore('noita', () => {
|
||||||
// State
|
// State
|
||||||
const userInfo = ref<UserInfo>({
|
const userInfo = ref<UserInfo>({
|
||||||
@ -41,7 +24,7 @@ export const useNoitaStore = defineStore('noita', () => {
|
|||||||
isStaff: false,
|
isStaff: false,
|
||||||
})
|
})
|
||||||
const objectives = ref<Objective[]>([])
|
const objectives = ref<Objective[]>([])
|
||||||
const leaderboard = ref<LeaderboardEntry[]>([])
|
const leaderboard = ref<LeaderboardEntryOut[]>([])
|
||||||
const isLoadingLeaderboard = ref(false)
|
const isLoadingLeaderboard = ref(false)
|
||||||
const isUploading = ref(false)
|
const isUploading = ref(false)
|
||||||
const error = ref<string>('')
|
const error = ref<string>('')
|
||||||
|
|||||||
@ -1 +1 @@
|
|||||||
import{d as v,r as l,q as g,a as o,o as r,b as e,j as f,F as x,g as h,t as y,f as _,E as w}from"./style-CCc0RrA9.js";import{g as k}from"./sdk.gen-CMTwTM_A.js";const j={class:"min-h-screen bg-base-300 flex items-center justify-center px-4"},S={class:"w-full max-w-6xl"},E={key:0,class:"flex justify-center py-20"},C={key:1,class:"grid grid-cols-1 md:grid-cols-2 gap-8"},N=["onClick"],$={class:"relative h-60 bg-base-300 overflow-hidden"},A=["src","alt","onError"],B={key:1,class:"w-full h-full bg-gradient-to-br from-blue-600 to-blue-400 flex items-center justify-center text-white"},L={class:"card-body"},P={class:"card-title text-2xl"},V=v({__name:"Home",setup(F){const i=l(),n=l(!0),d=l(new Set),u=s=>`https://cdn.akamai.steamstatic.com/steam/apps/${s}/header.jpg`,b=s=>{d.value.add(s)},c=s=>{window.location.href=s};return g(async()=>{const s=await k();s.data&&(i.value=s.data),n.value=!1}),(s,t)=>(r(),o("div",j,[e("div",S,[t[6]||(t[6]=e("div",{class:"text-center mb-12"},[e("h1",{class:"text-5xl font-bold mb-4"},"PolyLAN Submitter"),e("p",{class:"text-xl text-base-content/70"}," Choose a game and submit your best solutions ")],-1)),n.value?(r(),o("div",E,[...t[1]||(t[1]=[e("span",{class:"loading loading-spinner loading-lg"},null,-1)])])):(r(),o("div",C,[e("div",{onClick:t[0]||(t[0]=a=>c("/market")),class:"card card-xl bg-base-200 shadow-xl hover:shadow-2xl transition-all cursor-pointer transform hover:-translate-y-2 hover:scale-[1.05] hover:bg-base-100 overflow-hidden"},[...t[2]||(t[2]=[f('<figure class="relative h-60 bg-gradient-to-br from-purple-600 to-blue-600 flex items-center justify-center"><i class="mdi mdi-chart-box text-6xl text-white opacity-80"></i><div class="absolute inset-0 bg-black/30 group-hover:bg-black/20 transition-colors"></div></figure><div class="card-body"><h2 class="card-title text-2xl">Market</h2><p class="text-base-content/70">Place your bets and compete</p><div class="card-actions justify-end mt-4"><button class="btn btn-primary"><i class="mdi mdi-arrow-right mr-2"></i> Place bets </button></div></div>',2)])]),(r(!0),o(x,null,h(i.value,a=>(r(),o("div",{key:a.steam_app_id,onClick:p=>c(a.path),class:"card card-xl bg-base-200 shadow-xl hover:shadow-2xl transition-all cursor-pointer transform hover:-translate-y-2 hover:scale-[1.05] hover:bg-base-100 overflow-hidden"},[e("figure",$,[d.value.has(a.steam_app_id)?(r(),o("div",B,[...t[3]||(t[3]=[e("i",{class:"mdi mdi-gamepad-variant text-5xl"},null,-1)])])):(r(),o("img",{key:0,src:u(a.steam_app_id),alt:a.name,onError:p=>b(a.steam_app_id),class:"w-full h-full object-cover"},null,40,A)),t[4]||(t[4]=e("div",{class:"absolute inset-0 bg-black/30 group-hover:bg-black/20 transition-colors"},null,-1))]),e("div",L,[e("h2",P,y(a.name),1),t[5]||(t[5]=e("div",{class:"card-actions justify-end mt-4"},[e("button",{class:"btn btn-primary"},[e("i",{class:"mdi mdi-arrow-right mr-2"}),_(" Submit results ")])],-1))])],8,N))),128))])),t[7]||(t[7]=e("div",{class:"text-center mt-12 text-base-content/50"},[e("p",null,"Select a game above to begin submitting")],-1))])]))}}),m="#app",q=document.querySelector(m),D=w(V,{...q?.dataset});D.mount(m);
|
import{d as v,r as l,q as g,a as o,o as r,b as e,j as f,F as x,g as h,t as y,f as _,E as w}from"./style-BkYIZIDm.js";import{g as k}from"./sdk.gen-CMTwTM_A.js";const j={class:"min-h-screen bg-base-300 flex items-center justify-center px-4"},S={class:"w-full max-w-6xl"},E={key:0,class:"flex justify-center py-20"},C={key:1,class:"grid grid-cols-1 md:grid-cols-2 gap-8"},N=["onClick"],$={class:"relative h-60 bg-base-300 overflow-hidden"},A=["src","alt","onError"],B={key:1,class:"w-full h-full bg-gradient-to-br from-blue-600 to-blue-400 flex items-center justify-center text-white"},L={class:"card-body"},P={class:"card-title text-2xl"},V=v({__name:"Home",setup(F){const i=l(),n=l(!0),d=l(new Set),u=s=>`https://cdn.akamai.steamstatic.com/steam/apps/${s}/header.jpg`,b=s=>{d.value.add(s)},c=s=>{window.location.href=s};return g(async()=>{const s=await k();s.data&&(i.value=s.data),n.value=!1}),(s,t)=>(r(),o("div",j,[e("div",S,[t[6]||(t[6]=e("div",{class:"text-center mb-12"},[e("h1",{class:"text-5xl font-bold mb-4"},"PolyLAN Submitter"),e("p",{class:"text-xl text-base-content/70"}," Choose a game and submit your best solutions ")],-1)),n.value?(r(),o("div",E,[...t[1]||(t[1]=[e("span",{class:"loading loading-spinner loading-lg"},null,-1)])])):(r(),o("div",C,[e("div",{onClick:t[0]||(t[0]=a=>c("/market")),class:"card card-xl bg-base-200 shadow-xl hover:shadow-2xl transition-all cursor-pointer transform hover:-translate-y-2 hover:scale-[1.05] hover:bg-base-100 overflow-hidden"},[...t[2]||(t[2]=[f('<figure class="relative h-60 bg-gradient-to-br from-purple-600 to-blue-600 flex items-center justify-center"><i class="mdi mdi-chart-box text-6xl text-white opacity-80"></i><div class="absolute inset-0 bg-black/30 group-hover:bg-black/20 transition-colors"></div></figure><div class="card-body"><h2 class="card-title text-2xl">Market</h2><p class="text-base-content/70">Place your bets and compete</p><div class="card-actions justify-end mt-4"><button class="btn btn-primary"><i class="mdi mdi-arrow-right mr-2"></i> Place bets </button></div></div>',2)])]),(r(!0),o(x,null,h(i.value,a=>(r(),o("div",{key:a.steam_app_id,onClick:p=>c(a.path),class:"card card-xl bg-base-200 shadow-xl hover:shadow-2xl transition-all cursor-pointer transform hover:-translate-y-2 hover:scale-[1.05] hover:bg-base-100 overflow-hidden"},[e("figure",$,[d.value.has(a.steam_app_id)?(r(),o("div",B,[...t[3]||(t[3]=[e("i",{class:"mdi mdi-gamepad-variant text-5xl"},null,-1)])])):(r(),o("img",{key:0,src:u(a.steam_app_id),alt:a.name,onError:p=>b(a.steam_app_id),class:"w-full h-full object-cover"},null,40,A)),t[4]||(t[4]=e("div",{class:"absolute inset-0 bg-black/30 group-hover:bg-black/20 transition-colors"},null,-1))]),e("div",L,[e("h2",P,y(a.name),1),t[5]||(t[5]=e("div",{class:"card-actions justify-end mt-4"},[e("button",{class:"btn btn-primary"},[e("i",{class:"mdi mdi-arrow-right mr-2"}),_(" Submit results ")])],-1))])],8,N))),128))])),t[7]||(t[7]=e("div",{class:"text-center mt-12 text-base-content/50"},[e("p",null,"Select a game above to begin submitting")],-1))])]))}}),m="#app",q=document.querySelector(m),D=w(V,{...q?.dataset});D.mount(m);
|
||||||
@ -1,4 +1,4 @@
|
|||||||
import{H as K,r as V,I as q,J as z,c as Q,y as p,K as F,L as st,M as nt,N as ot,O as ct,B as rt,C as at,w as ut,h as ft,P as lt,d as it,a as m,o as j,t as E}from"./style-CCc0RrA9.js";/*!
|
import{H as K,r as V,I as q,J as z,c as Q,y as p,K as F,L as st,M as nt,N as ot,O as ct,B as rt,C as at,w as ut,h as ft,P as lt,d as it,a as m,o as j,t as E}from"./style-BkYIZIDm.js";/*!
|
||||||
* pinia v3.0.3
|
* pinia v3.0.3
|
||||||
* (c) 2025 Eduardo San Martin Morote
|
* (c) 2025 Eduardo San Martin Morote
|
||||||
* @license MIT
|
* @license MIT
|
||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,24 +1,24 @@
|
|||||||
{
|
{
|
||||||
"_index-B10U1JZR.js": {
|
"_index-C0ZY4EM6.js": {
|
||||||
"file": "assets/index-B10U1JZR.js",
|
"file": "assets/index-C0ZY4EM6.js",
|
||||||
"name": "index",
|
"name": "index",
|
||||||
"imports": [
|
"imports": [
|
||||||
"_style-CCc0RrA9.js"
|
"_style-BkYIZIDm.js"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"_sdk.gen-CMTwTM_A.js": {
|
"_sdk.gen-CMTwTM_A.js": {
|
||||||
"file": "assets/sdk.gen-CMTwTM_A.js",
|
"file": "assets/sdk.gen-CMTwTM_A.js",
|
||||||
"name": "sdk.gen"
|
"name": "sdk.gen"
|
||||||
},
|
},
|
||||||
"_style-B7hBs3CR.css": {
|
"_style-B5FWYd7r.css": {
|
||||||
"file": "assets/style-B7hBs3CR.css",
|
"file": "assets/style-B5FWYd7r.css",
|
||||||
"src": "_style-B7hBs3CR.css"
|
"src": "_style-B5FWYd7r.css"
|
||||||
},
|
},
|
||||||
"_style-CCc0RrA9.js": {
|
"_style-BkYIZIDm.js": {
|
||||||
"file": "assets/style-CCc0RrA9.js",
|
"file": "assets/style-BkYIZIDm.js",
|
||||||
"name": "style",
|
"name": "style",
|
||||||
"css": [
|
"css": [
|
||||||
"assets/style-B7hBs3CR.css"
|
"assets/style-B5FWYd7r.css"
|
||||||
],
|
],
|
||||||
"assets": [
|
"assets": [
|
||||||
"assets/materialdesignicons-webfont-CSr8KVlo.eot",
|
"assets/materialdesignicons-webfont-CSr8KVlo.eot",
|
||||||
@ -44,33 +44,33 @@
|
|||||||
"src": "node_modules/.pnpm/@mdi+font@7.4.47/node_modules/@mdi/font/fonts/materialdesignicons-webfont.woff2"
|
"src": "node_modules/.pnpm/@mdi+font@7.4.47/node_modules/@mdi/font/fonts/materialdesignicons-webfont.woff2"
|
||||||
},
|
},
|
||||||
"src/home.ts": {
|
"src/home.ts": {
|
||||||
"file": "assets/home-De93wAWA.js",
|
"file": "assets/home-CYjKnyvD.js",
|
||||||
"name": "home",
|
"name": "home",
|
||||||
"src": "src/home.ts",
|
"src": "src/home.ts",
|
||||||
"isEntry": true,
|
"isEntry": true,
|
||||||
"imports": [
|
"imports": [
|
||||||
"_style-CCc0RrA9.js",
|
"_style-BkYIZIDm.js",
|
||||||
"_sdk.gen-CMTwTM_A.js"
|
"_sdk.gen-CMTwTM_A.js"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"src/noita.ts": {
|
"src/noita.ts": {
|
||||||
"file": "assets/noita-BBUDcHwQ.js",
|
"file": "assets/noita-Cj1wLkUa.js",
|
||||||
"name": "noita",
|
"name": "noita",
|
||||||
"src": "src/noita.ts",
|
"src": "src/noita.ts",
|
||||||
"isEntry": true,
|
"isEntry": true,
|
||||||
"imports": [
|
"imports": [
|
||||||
"_style-CCc0RrA9.js",
|
"_style-BkYIZIDm.js",
|
||||||
"_index-B10U1JZR.js"
|
"_index-C0ZY4EM6.js"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"src/opus-magnum.ts": {
|
"src/opus-magnum.ts": {
|
||||||
"file": "assets/opus_magnum-CniXRQHB.js",
|
"file": "assets/opus_magnum-DdwCzot1.js",
|
||||||
"name": "opus_magnum",
|
"name": "opus_magnum",
|
||||||
"src": "src/opus-magnum.ts",
|
"src": "src/opus-magnum.ts",
|
||||||
"isEntry": true,
|
"isEntry": true,
|
||||||
"imports": [
|
"imports": [
|
||||||
"_style-CCc0RrA9.js",
|
"_style-BkYIZIDm.js",
|
||||||
"_index-B10U1JZR.js",
|
"_index-C0ZY4EM6.js",
|
||||||
"_sdk.gen-CMTwTM_A.js"
|
"_sdk.gen-CMTwTM_A.js"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user