Implement governed voting module

This commit is contained in:
2026-08-01 20:57:25 +02:00
commit c176c5cfcb
26 changed files with 3758 additions and 0 deletions
+277
View File
@@ -0,0 +1,277 @@
.voting-page {
min-height: 0;
height: 100%;
overflow: hidden;
}
.voting-shell {
display: grid;
grid-template-columns: minmax(250px, 320px) minmax(0, 1fr);
min-height: 0;
height: 100%;
background: var(--surface, #fff);
}
.voting-catalogue {
display: flex;
min-height: 0;
flex-direction: column;
border-right: 1px solid var(--border-color, #d8dde3);
}
.voting-toolbar,
.voting-detail-heading,
.voting-actions,
.voting-editor-heading {
display: flex;
align-items: center;
gap: 8px;
}
.voting-toolbar {
min-height: 50px;
padding: 8px 12px;
border-bottom: 1px solid var(--border-color, #d8dde3);
}
.voting-list-viewport,
.voting-detail-viewport {
min-height: 0;
flex: 1;
}
.voting-list {
display: flex;
flex-direction: column;
padding: 6px;
}
.voting-list-row {
display: grid;
grid-template-columns: minmax(0, 1fr) auto;
align-items: center;
gap: 8px;
width: 100%;
min-height: 52px;
padding: 7px 8px;
border: 0;
background: transparent;
color: inherit;
text-align: left;
cursor: pointer;
}
.voting-list-row:hover,
.voting-list-row.is-selected {
background: var(--hover-bg, rgba(54, 99, 135, 0.1));
}
.voting-list-row > span:first-child,
.voting-option-results > div > span:first-child {
display: flex;
min-width: 0;
flex-direction: column;
}
.voting-list-row small,
.voting-option-results small {
color: var(--text-muted, #65717e);
}
.voting-workspace {
display: flex;
min-width: 0;
min-height: 0;
flex-direction: column;
}
.voting-detail-viewport > div {
padding: 16px 20px 28px;
}
.voting-detail-heading {
justify-content: space-between;
min-height: 44px;
border-bottom: 1px solid var(--border-color, #d8dde3);
}
.voting-detail-heading h2,
.voting-editor-heading h3,
.voting-section h3,
.voting-cast-panel h3 {
margin: 0;
font-size: 1rem;
letter-spacing: 0;
}
.voting-detail-heading > div:first-child span {
color: var(--text-muted, #65717e);
font-size: 0.82rem;
}
.voting-actions {
flex-wrap: wrap;
justify-content: flex-end;
}
.voting-metrics {
display: grid;
grid-template-columns: repeat(4, minmax(110px, 1fr));
gap: 10px;
margin: 16px 0;
}
.voting-metrics > div {
display: flex;
min-width: 0;
flex-direction: column;
padding: 10px 12px;
border: 1px solid var(--border-color, #d8dde3);
border-radius: 4px;
}
.voting-metrics span,
.voting-hash span {
color: var(--text-muted, #65717e);
font-size: 0.75rem;
text-transform: uppercase;
}
.voting-description {
max-width: 80ch;
}
.voting-section,
.voting-cast-panel {
margin-top: 18px;
padding-top: 14px;
border-top: 1px solid var(--border-color, #d8dde3);
}
.voting-options,
.voting-option-results,
.voting-history {
display: flex;
flex-direction: column;
gap: 6px;
margin: 10px 0;
}
.voting-options label,
.voting-option-results > div,
.voting-history > div {
display: grid;
grid-template-columns: auto minmax(0, 1fr) auto;
align-items: center;
gap: 10px;
min-height: 38px;
padding: 7px 9px;
background: var(--surface-muted, rgba(127, 137, 147, 0.08));
}
.voting-options label > span {
display: flex;
flex-direction: column;
}
.voting-history > div {
grid-template-columns: 32px minmax(0, 1fr) auto;
}
.voting-history time {
color: var(--text-muted, #65717e);
font-size: 0.82rem;
}
.voting-hash {
display: grid;
grid-template-columns: 100px minmax(0, 1fr);
align-items: center;
gap: 10px;
margin-top: 8px;
}
.voting-hash code {
overflow: hidden;
text-overflow: ellipsis;
}
.voting-empty {
padding: 24px;
color: var(--text-muted, #65717e);
}
.voting-ballot-dialog {
width: min(1040px, calc(100vw - 32px));
height: min(820px, calc(100vh - 32px));
}
.voting-ballot-editor {
display: flex;
min-height: 0;
flex-direction: column;
gap: 12px;
overflow: auto;
}
.voting-editor-grid {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 10px;
}
.voting-editor-wide {
grid-column: 1 / -1;
}
.voting-editor-toggle {
display: flex;
align-items: flex-end;
padding-bottom: 5px;
}
.voting-editor-heading {
justify-content: space-between;
margin-top: 8px;
}
.voting-editor-list {
display: flex;
flex-direction: column;
gap: 7px;
}
.voting-option-row,
.voting-elector-row {
display: grid;
grid-template-columns: minmax(120px, 0.8fr) minmax(160px, 1fr) minmax(180px, 1.2fr) 34px;
align-items: end;
gap: 8px;
}
.voting-elector-row {
grid-template-columns: minmax(180px, 1.2fr) minmax(160px, 1fr) 90px 34px;
}
@media (max-width: 800px) {
.voting-shell {
grid-template-columns: 1fr;
grid-template-rows: minmax(160px, 34%) minmax(0, 1fr);
}
.voting-catalogue {
border-right: 0;
border-bottom: 1px solid var(--border-color, #d8dde3);
}
.voting-metrics,
.voting-editor-grid,
.voting-option-row,
.voting-elector-row {
grid-template-columns: 1fr;
}
.voting-editor-wide {
grid-column: auto;
}
}