Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
masinnae committed May 21, 2024
1 parent 1e1e6da commit 087f6b8
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 14 deletions.
9 changes: 7 additions & 2 deletions frontend/src/views/ProjectView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,12 @@
:subject="subject!"
:user="user!"
/>
<v-btn v-if="isTeacher" :to="`/project/${project.id}/submissions`" class="allsubmissions" variant="flat">
<v-btn
v-if="isTeacher"
:to="`/project/${project.id}/submissions`"
class="allsubmissions"
variant="flat"
>
{{ $t("project.submissions_list_teacher") }}
</v-btn>
</v-col>
Expand Down Expand Up @@ -108,6 +113,6 @@ const isTeacher = computed(
.allsubmissions {
margin: 15px;
background-color: rgb(var(--v-theme-primary));
color: rgb(var(--v-theme-navtext))
color: rgb(var(--v-theme-navtext));
}
</style>
36 changes: 24 additions & 12 deletions frontend/src/views/SubmissionsTeacherView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,26 @@
<v-alert v-if="isError" title="Error" color="error" :text="error.message"></v-alert>
<v-row v-else>
<v-col class="col-sm-12 col-md-6 col-lg-8">
<v-skeleton-loader :loading="projectLoading || submissionsLoading" type="card" class="card">
<v-card-title class="title">{{ $t("submission.submissions_title", { project: project.name }) }}</v-card-title>
<v-card-subtitle v-if="submissions.length == 0" class="subtitle">{{ $t("submission.no_submissions") }}</v-card-subtitle>
<v-skeleton-loader
:loading="projectLoading || submissionsLoading"
type="card"
class="card"
>
<v-card-title class="title">{{
$t("submission.submissions_title", { project: project.name })
}}</v-card-title>
<v-card-subtitle v-if="submissions.length == 0" class="subtitle">{{
$t("submission.no_submissions")
}}</v-card-subtitle>
<div v-else>
<v-card-subtitle class="subtitle">{{ $t("submission.teacher_submissions_info") }}</v-card-subtitle>
<v-btn class="primary-button" @click="downloadAll" prepend-icon="mdi-download">
<v-card-subtitle class="subtitle">{{
$t("submission.teacher_submissions_info")
}}</v-card-subtitle>
<v-btn
class="primary-button"
@click="downloadAll"
prepend-icon="mdi-download"
>
{{ $t("project.submissions_zip") }}
</v-btn>
</div>
Expand All @@ -22,10 +36,7 @@
</v-skeleton-loader>
</v-col>
<v-col cols="2" class="backbutton">
<BackButton
title="project.to_project"
:destination="`/project/${projectId}`"
/>
<BackButton title="project.to_project" :destination="`/project/${projectId}`" />
</v-col>
</v-row>
</v-container>
Expand All @@ -36,7 +47,7 @@ import { useProjectQuery } from "@/queries/Project";
import { useProjectSubmissionsQuery } from "@/queries/Submission";
import { toRefs } from "vue";
import SubmissionTeacherCard from "@/components/submission/SubmissionTeacherCard.vue";
import BackButton from "@/components/buttons/BackButton.vue"
import BackButton from "@/components/buttons/BackButton.vue";
import { download_file } from "@/utils";
const props = defineProps<{
Expand Down Expand Up @@ -72,11 +83,12 @@ const downloadAll = () => {
padding: 15px;
}
.title, .subtitle{
.title,
.subtitle {
width: 100%;
}
.backbutton{
.backbutton {
margin-top: 30px;
}
Expand Down

0 comments on commit 087f6b8

Please sign in to comment.