Compare commits
1 Commits
7e9b26499a
...
ce1f43fe98
Author | SHA1 | Date | |
---|---|---|---|
![]() |
ce1f43fe98 |
@ -37,7 +37,7 @@ final class DiceResource(@Context val sse: Sse) {
|
|||||||
.mediaType(MediaType.APPLICATION_JSON_TYPE).data(data).build()
|
.mediaType(MediaType.APPLICATION_JSON_TYPE).data(data).build()
|
||||||
)
|
)
|
||||||
if (data.roll.all { it.trim().isNotEmpty() }) {
|
if (data.roll.all { it.trim().isNotEmpty() }) {
|
||||||
results(data.room!!, Result(data.name, data.user!!))
|
results(data.room!!, Result(data.name, data.user!!, data.themeColor))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -72,6 +72,6 @@ final class DiceResource(@Context val sse: Sse) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@RegisterForReflection
|
@RegisterForReflection
|
||||||
data class Result(val name: String, val user: String) {}
|
data class Result(val name: String, val user: String, val themeColor: String) {}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -71,6 +71,7 @@
|
|||||||
httpRequest.send(JSON.stringify({
|
httpRequest.send(JSON.stringify({
|
||||||
name: data.name,
|
name: data.name,
|
||||||
user: data.user,
|
user: data.user,
|
||||||
|
themeColor: data.themeColor,
|
||||||
results: rollResult,
|
results: rollResult,
|
||||||
} ))
|
} ))
|
||||||
}
|
}
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
resultText += '<br/>  D' + result.sides + ': [' + values.map(value => value === 1 ? '<strong style="color: red">' + value + '</strong>' : value === result.sides ? '<strong style="color: green">' + value + '</strong>' : value).join(' + ') + (result.modifier > 0 ? ' <a style="text-decoration: underline">+' + result.modifier + '</a>': result.modifier < 0 ? ' <a style="text-decoration: underline">' + result.modifier + '</a>': '') + '] = <strong style="font-size: x-large">' + result.value + '</strong> '
|
resultText += '<br/>  D' + result.sides + ': [' + values.map(value => value === 1 ? '<strong style="color: red">' + value + '</strong>' : value === result.sides ? '<strong style="color: green">' + value + '</strong>' : value).join(' + ') + (result.modifier > 0 ? ' <a style="text-decoration: underline">+' + result.modifier + '</a>': result.modifier < 0 ? ' <a style="text-decoration: underline">' + result.modifier + '</a>': '') + '] = <strong style="font-size: x-large">' + result.value + '</strong> '
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
node.innerHTML = '<strong>' + data.name + ':</strong> 🎲 ' + resultText
|
node.innerHTML = '<strong style="text-shadow: 2px 2px 10px ' + data.themeColor + ';">' + data.name + ':</strong> 🎲 ' + resultText
|
||||||
name.appendChild(node)
|
name.appendChild(node)
|
||||||
document.getElementById('results').appendChild(name);
|
document.getElementById('results').appendChild(name);
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user