Allow more than 9 candidates.

This commit is contained in:
armored-dragon 2024-09-10 14:52:07 -05:00
parent 24816cd49b
commit 8b4df95790
No known key found for this signature in database
GPG key ID: C7207ACC3382AD8B
2 changed files with 6 additions and 5 deletions

View file

@ -12,7 +12,6 @@
/* global Script Tablet Messages MyAvatar Uuid*/
// TODO: Documentation
// TODO: Allow more than 9 candidates
// TODO: Allow host voting
// TODO: Sound for new vote
// TODO: Clear poll host view on creating new poll
@ -22,6 +21,8 @@
// FIXME: Joining poll resets everyones vote
// FIXME: Running election without votes causes max stack error
// TODO: Voting results page
(() => {
"use strict";
var tablet;

View file

@ -591,22 +591,21 @@ Rectangle {
color: index % 2 === 0 ? "transparent" : Qt.rgba(0.15,0.15,0.15,1)
Item {
Row {
width: parent.width - 10
anchors.horizontalCenter: parent.horizontalCenter
height: parent.height
clip: true
// FIXME: Allow more than 9 options
// TODO: Replace cap with total amount of options
TextField {
width: 50
width: 70
height: 50
font.pointSize: 20
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
color: "black"
validator: RegExpValidator { regExp: /^[0-9]$/ }
validator: RegExpValidator { regExp: /^[0-9]+$/ }
inputMethodHints: Qt.ImhDigitsOnly
anchors.verticalCenter: parent.verticalCenter
text: rank
@ -617,6 +616,7 @@ Rectangle {
}
Text {
Layout.fillWidth: true
text: option
anchors.centerIn: parent
color: "white"