Skip to content

Commit

Permalink
added button for seeing players
Browse files Browse the repository at this point in the history
  • Loading branch information
arcbtc committed Nov 5, 2024
1 parent 6413670 commit 098eb60
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
8 changes: 8 additions & 0 deletions static/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ window.app = Vue.createApp({
data() {
return {
satspots: [],
players: {
show: false,
data: [],
},
satspotsTable: {
columns: [
{ name: "id", align: "left", label: "ID", field: "id" },
Expand Down Expand Up @@ -73,6 +77,10 @@ window.app = Vue.createApp({
LNbits.utils.notifyApiError(err)
})
},
async openPlayers(players) {
this.players.show = true
this.players.data = players.split(',')
},
async createGame() {
const date = new Date(this.formDialogSatspot.data.closing_date)
const unixTimestamp = Math.floor(date.getTime() / 1000)
Expand Down
15 changes: 15 additions & 0 deletions templates/satspot/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,15 @@ <h5 class="text-subtitle1 q-my-none">Satspots</h5>
icon="cancel"
color="pink"
></q-btn>
<q-btn
flat
dense
size="sm"
@click="openPlayers(props.row.players)"
icon="groups"
color="secondary"
><q-tooltip>View players</q-tooltip>
</q-btn>
</q-td>
</q-tr>
</template>
Expand All @@ -92,6 +101,12 @@ <h6 class="text-subtitle1 q-my-none">
</q-card>
</div>

<q-dialog v-model="players.show" position="top">
<q-card class="q-pa-lg q-pt-xl lnbits__dialog-card">
<div v-text="players.data"></div>
</q-card>
</q-dialog>

<q-dialog
v-model="formDialogSatspot.show"
position="top"
Expand Down

0 comments on commit 098eb60

Please sign in to comment.