Commit aaef1238 authored by Paarth's avatar Paarth

Merge branch 'master' of https://git.cse.iitb.ac.in/ayushjangir/sfcode

Merge
parents 56f225f6 58c9b64c
......@@ -5,8 +5,8 @@
</div>
<div id="toggle-lang">C++</div>
<div id="attempt">
<button id="input" (click)="inputField.setState(true)">Custom Input</button>
<button id="try" (click)="tryCode(0)" [class.disabled]="compilationError || isCompiling">{{compilationError ? 'Error' : (isCompiling ? 'Compiling...' : 'Try Code')}}</button>
<!-- <button id="input" (click)="inputField.setState(true)">Custom Input</button>-->
<!-- <button id="try" (click)="tryCode(0)" [class.disabled]="compilationError || isCompiling">{{compilationError ? 'Error' : (isCompiling ? 'Compiling...' : 'Try Code')}}</button>-->
<button id="submit" (click)="tryCode(1)" [class.disabled]="compilationError || isCompiling">{{compilationError ? 'Error' : (isCompiling ? 'Compiling...' : 'Submit Code')}}</button>
</div>
<label for="editor"></label>
......
......@@ -101,9 +101,9 @@ export class ArenaComponent implements OnInit {
// }
tryCode(c): void {
if (document.getElementById('try').classList.contains('disabled')) {
return;
}
// if (document.getElementById('try').classList.contains('disabled')) {
// return;
// }
this.isCompiling = true;
const file: File = {
username: JSON.parse(this.apiService.getToken()).username,
......
......@@ -26,6 +26,7 @@ export class UserComponent implements OnInit {
(() => {
this.timeline = JSON.parse(this.user.correct_timeline);
console.log(this.timeline);
let sum = 0;
this.timeline.forEach(element => {
sum += element;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment