(null)
const loading = ref(false)
const selectedClass = ref(null)
-const showUnsubmitted = ref(true)
-const showUnrated = ref(true)
+const showUnsubmitted = ref(false)
+const showUnrated = ref(false)
async function load(classname?: string) {
loading.value = true
@@ -434,7 +434,11 @@ function viewSubmission(id: string) {
}
function rankColor(i: number) {
- return (["#f0a020", "#aaa", "#cd7f32", "#ddd", "#ddd"] as const)[i] ?? "#ddd"
+ return (["#f0a020", "#909090", "#cd7f32", "#8899aa", "#7a8fa0"] as const)[i] ?? "#aaa"
+}
+
+function rankBg(i: number) {
+ return (["#fffbef", "#f8f8f8", "#fdf5ee", "#f2f5f8", "#eef2f5"] as const)[i] ?? "#f8f8f8"
}
function bucketPct(value: number) {
@@ -463,18 +467,11 @@ const countBuckets = computed(() => {
const d = stats.value.submission_count_distribution
return [
{
- label: "仅 1 次",
- value: d.count_1,
- color: "#888",
- bg: "#fafafa",
- borderColor: "#e0e0e0",
- },
- {
- label: "2 次",
- value: d.count_2,
- color: "#2080f0",
- bg: "#f0f7ff",
- borderColor: "#d0e8ff",
+ label: "4 次+",
+ value: d.count_4_plus,
+ color: "#f0a020",
+ bg: "#fffbf0",
+ borderColor: "#ffe0a0",
},
{
label: "3 次",
@@ -484,11 +481,18 @@ const countBuckets = computed(() => {
borderColor: "#c8e8d0",
},
{
- label: "4 次+",
- value: d.count_4_plus,
- color: "#f0a020",
- bg: "#fffbf0",
- borderColor: "#ffe0a0",
+ label: "2 次",
+ value: d.count_2,
+ color: "#2080f0",
+ bg: "#f0f7ff",
+ borderColor: "#d0e8ff",
+ },
+ {
+ label: "仅 1 次",
+ value: d.count_1,
+ color: "#888",
+ bg: "#fafafa",
+ borderColor: "#e0e0e0",
},
]
})