Commit 820ab583 authored by Yechang's avatar Yechang
Browse files

fix: submission feedback

parent 6a883573
Loading
Loading
Loading
Loading
Loading
+10 −3
Original line number Diff line number Diff line
@@ -2,7 +2,13 @@
	import { AnsiUp } from 'ansi_up';
	const ansi_up = new AnsiUp();

	const invalidStatus = ['JudgementFailed', 'ConfigurationError', 'SystemError', 'FileError', 'CompilationError']
	const invalidStatus = [
		'JudgementFailed',
		'ConfigurationError',
		'SystemError',
		'FileError',
		'CompilationError'
	];
</script>

<script lang="ts">
@@ -85,10 +91,11 @@
					<div>Score: {item.value}</div>
				{:else if item.type === 'status'}
					<div>Status: {item.value}</div>
					{#if _.findIndex(invalidStatus, item.value) > -1}
					{#if _.findIndex(invalidStatus, (e) => e === item.value) > -1}
						<MyAlert color="blue">
							<div>
								This submission will not count towards the number of attempts (if there is any penalty).
								This submission will not count towards the number of attempts (if there is any
								penalty).
							</div>
						</MyAlert>
					{/if}