Skip to content

Commit bd1a86c

Browse files
committed
Revert "Merge pull request #162 from SPARSH1608/feature/sql-added"
This reverts commit 34c1fd3, reversing changes made to fa9177f.
1 parent 34c1fd3 commit bd1a86c

File tree

15 files changed

+22
-125
lines changed

15 files changed

+22
-125
lines changed

app/helpers/json-to-table.js

-6
This file was deleted.

app/pods/components/code-editor-component/template.hbs

-2
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@
1919
{{/if}}
2020
<SubmissionResult
2121
@fullScreen={{fullScreen}}
22-
@allowedLanguages={{contest.allowedLanguages}}
23-
2422
@judgeResult={{if (not submission.codeTaskGroup.isRunning) lastResult}} />
2523
</div>
2624
{{/if}}

app/pods/components/code-window/component.js

+1-6
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,7 @@ export default class CodeWindowComponent extends Component {
4848
code: "csharp",
4949
mode: "csharp",
5050
source: ""
51-
}, {
52-
name: "MySQL 10",
53-
code: "mysql",
54-
mode: "mysql",
55-
source: ""
56-
}
51+
}
5752
]
5853

5954
setSubmission = () => {

app/pods/components/full-screen-problem-view/template.hbs

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
</div>
4949
<div class="w-100">
5050
{{#liquid-if (eq currentTab 'problem')}}
51-
<ProblemExplanation @problem={{problem}} @contest={{contest}}/>
51+
<ProblemExplanation @problem={{problem}} />
5252
{{else if (eq currentTab 'submissions')}}
5353
<SubmissionsList
5454
@contest={{contest}}
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,4 @@
11
import Component from '@ember/component';
2-
import { inject as service } from '@ember/service';
3-
import jsonToTable from '../../../helpers/json-to-table';
42

53
export default Component.extend({
6-
7-
languageSelection: service('language-selection'),
8-
init(){
9-
this._super(...arguments);
10-
let contest = this.get('contest').data;
11-
12-
document.addEventListener('contextmenu', function (event) {
13-
event.preventDefault();
14-
});
15-
document.addEventListener('keydown', function (event) {
16-
if (
17-
event.key === 'F12' ||
18-
(event.ctrlKey && event.shiftKey && event.key === 'I') ||
19-
(event.ctrlKey && event.shiftKey && event.key === 'C') ||
20-
(event.ctrlKey && event.shiftKey && event.key === 'J') ||
21-
(event.ctrlKey && event.key === 'U')
22-
) {
23-
event.preventDefault();
24-
}
25-
});
26-
27-
},
28-
jsonToTable(data) {
29-
30-
const table = jsonToTable(data);
31-
return table;
32-
}
33-
34-
});
4+
});

app/pods/components/problem-explanation/template.hbs

+13-17
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,29 @@
11
<div class="py-4">
2-
<p class="no-select">{{markdown-to-html problem.details.description}}</p>
3-
2+
<p>
3+
{{markdown-to-html problem.details.description}}
4+
</p>
45
<div class="extra-bold">Input Format</div>
5-
6-
<pre>{{problem.details.input_format}}</pre>
7-
8-
6+
<p>
7+
{{markdown-to-html problem.details.input_format}}
8+
</p>
99
<div class="extra-bold">Constraints</div>
1010
<div class="bg-grey br-5 w-60 px-4 py-2 my-2">
11-
<p>{{markdown-to-html problem.details.constraints}}</p>
11+
<p>
12+
{{markdown-to-html problem.details.constraints}}
13+
</p>
1214
</div>
13-
1415
<div class="extra-bold">Output Format</div>
15-
<pre>{{problem.details.output_format}}</pre>
16+
<p>
17+
{{markdown-to-html problem.details.output_format}}
18+
</p>
1619
<div class="extra-bold">Sample Input</div>
1720
<div class="bg-grey br-5 w-60 px-4 py-2 my-2">
18-
<pre>{{ problem.details.sample_input}}</pre>
21+
<pre>{{problem.details.sample_input}}</pre>
1922
</div>
20-
2123
<div class="extra-bold">Sample Output</div>
2224
<div class="bg-grey br-5 w-60 px-4 py-2 my-2">
23-
{{#if (includes contest.allowedLanguages "mysql")}}
24-
<pre>{{json-to-table problem.details.sample_output}}</pre>
25-
{{else}}
2625
<pre>{{problem.details.sample_output}}</pre>
27-
{{/if}}
28-
2926
</div>
30-
3127
{{#if problem.details.explanation}}
3228
<div class="extra-bold">Explanation</div>
3329
<div class="bg-grey br-5 w-60 px-4 py-2 my-2">

app/pods/components/problem-view/template.hbs

+1-2
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,7 @@
3333

3434
{{#liquid-if (eq selectedTab "problem")}}
3535
<ProblemExplanation
36-
@problem={{problem}}
37-
@contest="{{this.contest}}"/>
36+
@problem={{problem}} />
3837
{{else if (eq selectedTab "submissions")}}
3938
<SubmissionsList
4039
@contest={{contest}}

app/pods/components/project-view/template.hbs

-2
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,6 @@
6060
{{#if (or submitProjectTask.isRunning lastResult)}}
6161
<div class="mt-4">
6262
<SubmissionResult
63-
@allowedLanguages={{contest.allowedLanguages}}
64-
6563
@contentType={{content.type}}
6664
@judgeResult={{if (not submitProjectTask.isRunning) lastResult}}
6765
/>

app/pods/components/submission-result/component.js

+1-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import Component from '@ember/component';
22
import { computed } from '@ember/object';
3-
import { jsonToTable } from '../../../util/json-to-table';
3+
44
export default class SubmissionResult extends Component {
55
didRender() {
66
this.element.scrollIntoView({ behavior: "smooth", block: "end" })
@@ -41,8 +41,4 @@ export default class SubmissionResult extends Component {
4141
return this.judgeResult.testcases
4242
}
4343
}
44-
jsonToTable(data) {
45-
const table = jsonToTable(data);
46-
return table;
47-
}
4844
}

app/pods/components/submission-result/submission-success/template.hbs

+1-6
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,7 @@
22
<span class="font-sm bold">
33
Compilation Successful
44
</span>
5-
65
{{#if output}}
7-
{{#if (includes allowedLanguages "mysql")}}
8-
<pre class="mt-3 bg-grey p-4">{{json-to-table output}}</pre>
9-
{{else}}
10-
<pre class="mt-3 bg-grey p-4">{{output}}</pre>
11-
{{/if}}
6+
<pre class="mt-3 bg-grey p-4">{{output}}</pre>
127
{{/if}}
138
</div>
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,11 @@
11
<div class="{{unless fullScreen "border-card mb-5"}} p-0">
2-
3-
42
{{#if isRunning}}
53
<SubmissionResult::SubmissionStatus />
64
{{else if isErrored}}
75
<SubmissionResult::SubmissionError @output={{errorPayload}} />
86
{{else if isSubmission}}
97
<SubmissionResult::SubmissionTestcases @testcases={{testcasesPayload}} />
108
{{else}}
11-
<SubmissionResult::SubmissionSuccess
12-
@message={{message}}
13-
@output={{output}}
14-
@allowedLanguages={{allowedLanguages}}
15-
/>
16-
9+
<SubmissionResult::SubmissionSuccess @message={{message}} @output={{output}} />
1710
{{/if}}
1811
</div>

app/services/language-selection.js

-6
This file was deleted.

app/styles/app.scss

+1-9
Original file line numberDiff line numberDiff line change
@@ -292,12 +292,4 @@ body{
292292
100% {
293293
box-shadow: 0 0 0 6px rgba(167, 89, 47, 0.032);
294294
}
295-
}
296-
.no-select {
297-
user-select: none;
298-
-webkit-user-select: none;
299-
-moz-user-select: none;
300-
-ms-user-select: none;
301-
pointer-events: none;
302-
}
303-
295+
}

app/util/json-to-table.js

-23
This file was deleted.

config/environment.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ module.exports = function (environment) {
55
modulePrefix: "hackerblocks",
66
podModulePrefix: "hackerblocks/pods",
77
environment,
8-
rootURL: "/app",
8+
rootURL: "/",
99
locationType: "auto",
1010
"ember-simple-auth-token": {
1111
identificationField: "code",

0 commit comments

Comments
 (0)