feat: more blocks, view other boards, taller buttons

This commit is contained in:
Maxwell Paradis 2025-04-12 19:30:52 -05:00
parent 846b934ed2
commit f1d29a2a5b
3 changed files with 44 additions and 29 deletions

View File

@ -1,34 +1,34 @@
services:
# scylla:
# image: scylladb/scylla:latest
# container_name: scylla
# restart: always
# ports:
# - "9042:9042"
# volumes:
# - scylla_data1:/var/lib/scylla
# networks:
# - scylla-network
scylla:
image: scylladb/scylla:latest
container_name: scylla
restart: always
ports:
- "9042:9042"
volumes:
- /mnt/temp:/var/lib/scylla
networks:
- scylla-network
# healthcheck:
# test: ["CMD-SHELL", "curl -f http://localhost:10000/metrics || exit 1"]
# interval: 30s
# timeout: 10s
# retries: 5
queueb:
image: maxwellmichael/paradisbend:QB-Latest
container_name: queueb
restart: always
ports:
- "3000:3000"
networks:
- scylla-network
environment:
- SCYLLA_HOST=scylla
depends_on:
- scylla
scylla:
condition: service_healthy
# queueb:
# image: maxwellmichael/paradisbend:QB-Latest
# container_name: queueb
# restart: always
# ports:
# - "3000:3000"
# networks:
# - scylla-network
# environment:
# - SCYLLA_HOST=scylla
# depends_on:
# - scylla
# scylla:
# condition: service_healthy
# volumes:
# scylla_data1:

View File

@ -8,9 +8,9 @@ async function sydb(client) {
"CREATE TABLE IF NOT EXISTS qb.scores (id UUID, username TEXT, email TEXT, day INT, count INT, score INT, cube TEXT, PRIMARY KEY (day, score, username, id));";
let blocks =
"CREATE TABLE IF NOT EXISTS qb.blocks (day INT PRIMARY KEY, blocks list<int>);";
//let drop = "DROP TABLE qb.scores;"
let drop = "DROP TABLE qb.blocks;"
let queries = [keyspace, users, blocks, scores];
let queries = [keyspace, drop, users, blocks, scores];
async function executeQueries() {
for (const query of queries) {

View File

@ -13,7 +13,7 @@ let hof = [];
let blockList = [
[0, 1, 1, 0, 1, 1, 1, 3, 1, 1, 1, 1, 0, 1, 1, 0],
[1, 1, 0, 0, 1, 1, 3, 1, 1, 0, 0, 0, 1, 0, 0, 0],
[0, 0, 1, 0, 1, 1,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1, 1, 1],
[0, 1, 1, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, 1, 0, 0],
[1, 0, 0, 1, 1, 3, 1, 1, 1, 0, 0, 1, 1, 0, 0, 0]
];
let dailyBlocks = [];
@ -75,7 +90,7 @@ async function getBlocks(date) {
async function makeBlocks(date) {
const randomInts = [];
for (let i = 0; i < 25; i++) {
const randInt = Math.floor(Math.random() * 18); // Generates a random integer between 0 and 50
const randInt = Math.floor(Math.random() * (blockList.length - 1)); // Generates a random integer between 0 and 50
randomInts.push(randInt);
}
//return randomInts;
@ -145,7 +160,7 @@ app.get("/", (req, res) => {
});
app.get("/api/blocks", (req, res) => {
console.log(dailyBlocks[0]);
//console.log(dailyBlocks[0]);
let data = {blocks: dailyBlocks, day: getDay(0)}
res.send(data);
});