Skip to content

Commit

Permalink
removed share results functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
DevCam committed Aug 5, 2021
1 parent 7e1a588 commit 380dec6
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 37 deletions.
2 changes: 1 addition & 1 deletion src/i18n/oj/en-US.js
Original file line number Diff line number Diff line change
Expand Up @@ -257,5 +257,5 @@ export const m = {
UserHomeserSubmissions: 'Submissions',
UserHomeScore: 'Score',
List_Solved_Problems: 'List of solved problems',
UserHomeIntro: 'The guy is so lazy that has not solved any problem yet.'
UserHomeIntro: 'Un estudiante modelo de PMD'
}
9 changes: 0 additions & 9 deletions src/pages/admin/views/problem/Problem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,6 @@
</el-switch>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item :label="$t('m.ShareSubmission')">
<el-switch
v-model="problem.share_submission"
active-text=""
inactive-text="">
</el-switch>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item :label="$t('m.Tag')" :error="error.tags" required>
<span class="tags">
Expand Down
27 changes: 0 additions & 27 deletions src/pages/oj/views/submission/SubmissionDetails.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,26 +17,13 @@
</Alert>
</Col>

<!--后台返info就显示出来, 权限控制放后台 -->
<Col v-if="submission.info && !isCE" :span="20">
<Table stripe :loading="loading" :disabled-hover="true" :columns="columns" :data="submission.info.data"></Table>
</Col>

<Col :span="20">
<Highlight :code="submission.code" :language="submission.language" :border-color="status.color"></Highlight>
</Col>
<Col v-if="submission.can_unshare" :span="20">
<div id="share-btn">
<Button v-if="submission.shared"
type="warning" size="large" @click="shareSubmission(false)">
{{$t('m.UnShare')}}
</Button>
<Button v-else
type="primary" size="large" @click="shareSubmission(true)">
{{$t('m.Share')}}
</Button>
</div>
</Col>
</Row>

</template>
Expand Down Expand Up @@ -145,14 +132,6 @@
}, () => {
this.loading = false
})
},
shareSubmission (shared) {
let data = {id: this.submission.id, shared: shared}
api.updateSubmission(data).then(res => {
this.getSubmission()
this.$success(this.$i18n.t('m.Succeeded'))
}, () => {
})
}
},
computed: {
Expand Down Expand Up @@ -200,12 +179,6 @@
}
}
#share-btn {
float: right;
margin-top: 5px;
margin-right: 10px;
}
pre {
border: none;
background: none;
Expand Down

0 comments on commit 380dec6

Please sign in to comment.