Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
sfcode
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ayush
sfcode
Commits
aaef1238
Commit
aaef1238
authored
Dec 09, 2020
by
Paarth
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://git.cse.iitb.ac.in/ayushjangir/sfcode
Merge
parents
56f225f6
58c9b64c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
5 deletions
+6
-5
src/app/arena/arena.component.html
src/app/arena/arena.component.html
+2
-2
src/app/arena/arena.component.ts
src/app/arena/arena.component.ts
+3
-3
src/app/user/user.component.ts
src/app/user/user.component.ts
+1
-0
No files found.
src/app/arena/arena.component.html
View file @
aaef1238
...
@@ -5,8 +5,8 @@
...
@@ -5,8 +5,8 @@
</div>
</div>
<div
id=
"toggle-lang"
>
C++
</div>
<div
id=
"toggle-lang"
>
C++
</div>
<div
id=
"attempt"
>
<div
id=
"attempt"
>
<button
id=
"input"
(click)=
"inputField.setState(true)"
>
Custom Input
</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="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>
<button
id=
"submit"
(click)=
"tryCode(1)"
[class.disabled]=
"compilationError || isCompiling"
>
{{compilationError ? 'Error' : (isCompiling ? 'Compiling...' : 'Submit Code')}}
</button>
</div>
</div>
<label
for=
"editor"
></label>
<label
for=
"editor"
></label>
...
...
src/app/arena/arena.component.ts
View file @
aaef1238
...
@@ -101,9 +101,9 @@ export class ArenaComponent implements OnInit {
...
@@ -101,9 +101,9 @@ export class ArenaComponent implements OnInit {
// }
// }
tryCode
(
c
):
void
{
tryCode
(
c
):
void
{
if
(
document
.
getElementById
(
'
try
'
).
classList
.
contains
(
'
disabled
'
))
{
//
if (document.getElementById('try').classList.contains('disabled')) {
return
;
//
return;
}
//
}
this
.
isCompiling
=
true
;
this
.
isCompiling
=
true
;
const
file
:
File
=
{
const
file
:
File
=
{
username
:
JSON
.
parse
(
this
.
apiService
.
getToken
()).
username
,
username
:
JSON
.
parse
(
this
.
apiService
.
getToken
()).
username
,
...
...
src/app/user/user.component.ts
View file @
aaef1238
...
@@ -26,6 +26,7 @@ export class UserComponent implements OnInit {
...
@@ -26,6 +26,7 @@ export class UserComponent implements OnInit {
(()
=>
{
(()
=>
{
this
.
timeline
=
JSON
.
parse
(
this
.
user
.
correct_timeline
);
this
.
timeline
=
JSON
.
parse
(
this
.
user
.
correct_timeline
);
console
.
log
(
this
.
timeline
);
let
sum
=
0
;
let
sum
=
0
;
this
.
timeline
.
forEach
(
element
=>
{
this
.
timeline
.
forEach
(
element
=>
{
sum
+=
element
;
sum
+=
element
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment