Commit 80a39efa authored by Tobias Liese's avatar Tobias Liese

frontend stuff

parent d0b8c56f
Pipeline #92694 failed with stages
in 32 seconds
......@@ -16,7 +16,7 @@ dependencies {
implementation enforcedPlatform("${quarkusPlatformGroupId}:${quarkusPlatformArtifactId}:${quarkusPlatformVersion}")
implementation 'io.quarkus:quarkus-resteasy'
implementation 'io.quarkus:quarkus-resteasy-qute'
implementation 'io.quarkus:quarkus-jdbc-mariadb'
implementation 'io.quarkus:quarkus-jdbc-h2'
testImplementation 'io.quarkus:quarkus-junit5'
testImplementation 'io.rest-assured:rest-assured:4.2.0'
......
#Gradle properties
#Tue Feb 11 17:11:23 UTC 2020
quarkusPluginVersion=1.3.0.Alpha1
quarkusPluginVersion=999-SNAPSHOT
quarkusPlatformArtifactId=quarkus-bom
quarkusPlatformVersion=1.3.0.Alpha1
quarkusPlatformVersion=999-SNAPSHOT
quarkusPlatformGroupId=io.quarkus
......@@ -50,10 +50,10 @@ li a:hover {
background-color: var(--main-ac-color);
}
canvas {
width: 100%;
height: 80%;
}
/*canvas {*/
/* width: 100%;*/
/* height: 80%;*/
/*}*/
.content {
height: auto;
......
let canvas = document.getElementsByTagName('canvas')[0];
canvas.height = 80;
canvas.width = canvas.style.width;
// let webSocket = new WebSocket(
// 'ws://' + window.location.host + "/websocket");
// webSocket.onopen = function (event) {
// console.log("connected")
// webSocket.send("automaton new 'cool name'")
// };
// webSocket.onerror = function (event) {
// console.error(event)
// }
\ No newline at end of file
class Field {
private canvas: HTMLCanvasElement = document.getElementsByTagName('canvas')[0];
private context = this.canvas.getContext("2d");
private states: State[] = new Array<State>()
constructor() {
this.rePaint()
this.addState(1, 1, "stonks")
}
addState(x: number, y: number, name: String) {
this.states.push(new State(x, y, name))
this.drawState(this.states[this.states.length - 1])
}
rePaint() {
this.canvas.height = 1000
this.canvas.width = document.getElementsByClassName("menu").item(0).clientWidth
for (let state of this.states) {
console.log("test")
this.drawState(state)
}
}
private drawState(state: State) {
this.context.beginPath()
this.context.arc(state.x, state.y, 10, 0, 2 * Math.PI)
this.context.stroke()
}
}
class State {
x: number
y: number
name: string
constructor(x, y, name) {
this.x = x
this.y = y
this.name = name
}
}
let field: Field = new Field();
window.onresize = field.rePaint
// let webSocket = new WebSocket(
// 'ws://' + window.location.host + "/websocket");
// webSocket.onopen = function (event) {
// console.log("connected")
// webSocket.send("automaton new 'cool name'")
// };
// webSocket.onerror = function (event) {
// console.error(event)
// }
\ No newline at end of file
# Configuration file
quarkus.datasource.url=jdbc:mariadb://localhost:3306/test
quarkus.datasource.driver=org.mariadb.jdbc.Driver
quarkus.datasource.username=root
quarkus.datasource.password=test123
quarkus.datasource.url=jdbc:h2:tcp://localhost/~/test
quarkus.datasource.driver=org.h2.Driver
quarkus.datasource.username=sa
# drop and create the database at startup (use `update` to only update the schema)
quarkus.hibernate-orm.database.generation=update
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment