Skip to content
This repository has been archived by the owner on Mar 19, 2024. It is now read-only.

Commit

Permalink
feat: style adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinKanera committed Feb 17, 2021
1 parent 916704b commit 5352561
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 9 deletions.
10 changes: 7 additions & 3 deletions components/my-project/my-project.vue
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
ps-btn.mt-4(@click='submitProject', :disabled='awaiting', :loading='awaiting') Odevzdat projekt
template(#icon-right)
chevron-right/
ps-snackbar(v-model='snackbar') {{ message }}
ps-snackbar(v-model='snackbar', :delay='6000') {{ message }}
</template>

<script lang="ts">
Expand Down Expand Up @@ -252,9 +252,10 @@ export default defineComponent({
const checkModal = () => (submitCheck.value = !submitCheck.value);
const submitProject = async () => {
awaiting.value = true;
try {
await saveChanges();
awaiting.value = true;
await axios.post(
`/api/project/${mainStore.state.project.id}`,
{},
Expand All @@ -274,6 +275,9 @@ export default defineComponent({
if (e.response.status === 412) {
snackbar.value = true;
message.value = 'Chybí ti povinné soubory';
} else {
snackbar.value = true;
message.value = 'Nastala chyba';
}
}
Expand Down
2 changes: 1 addition & 1 deletion components/navbar/navbar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
span.title Změna profilového obrázku
.placeholder
img(:src='placeholderImage')
ps-drag-drop(tile, :draggable='false', accept='.jpg,.jpeg,.gif,.png', v-model='selectedPicture', @input='changePlaceholder', :disabled='uploading')
ps-drag-drop.mb-4(tile, :draggable='false', accept='.jpg,.jpeg,.gif,.png', v-model='selectedPicture', @input='changePlaceholder', :disabled='uploading')
.actions
ps-btn(@click='uploadPicture', :disabled='uploading', :loading='uploading') nahrát
</template>
Expand Down
8 changes: 7 additions & 1 deletion components/ui/drag-drop/drag-drop.sass
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
.drag-drop
@apply flex justify-between items-start flex-col-reverse
@apply flex justify-between items-start flex-col-reverse p-2 rounded-lg
@apply bg-ps-primary

min-height: 100px

&.tile
@apply border-b-2 border-ps-green border-solid

&:not(.tile)
@apply bg-ps-secondary shadow rounded-lg p-4
Expand Down
4 changes: 2 additions & 2 deletions components/ui/drag-drop/drag-drop.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
ps-btn.justify-self-end(text, @click='removeFile(file.name)')
bin-icon(:size='20')
.input-wrap
ps-btn(@click='btnTrigger', :disabled='disabled') Vyber soubory
span.ml-3.text-ps-white nebo je sem přetáhni
ps-btn(@click='btnTrigger', :disabled='disabled') Vyber {{ multiple ? " soubory" : " soubor" }}
span.ml-3.text-ps-white nebo {{ multiple ? " je" : " ho" }} sem přetáhni
input(:id='id', type='file', name='file-input', :multiple='multiple', @change='handleFileInput', style='display: none', :accept='accept')
</template>

Expand Down
4 changes: 2 additions & 2 deletions pages/students.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
:profilePicture='proposal.profilePicture',
:proposalRef='proposal.proposalRef'
)
ps-tabs(:tabs='extern ? ["oponent"] : ["studenti", "předpřipravené zadání", "oponent"]', :selected='selectedTab', @selected='setTab')
ps-tabs(:tabs='extern ? ["oponent"] : ["studenti", "předpřipravená zadání", "oponent"]', :selected='selectedTab', @selected='setTab')
ps-tab(v-if='!extern', :active='selectedTab == "studenti"')
.flex.justify-between(v-if='projects.length > 0')
span.text-2xl.text-ps-white.font-medium Moji studenti
Expand Down Expand Up @@ -47,7 +47,7 @@
:submitted='true',
:url='project.url'
)
ps-tab(v-if='!extern', :active='selectedTab == "předpřipravené zadání"')
ps-tab(v-if='!extern', :active='selectedTab == "předpřipravená zadání"')
.flex.flex-col.justify-between(class='md:flex-row')
span.text-2xl.text-ps-white.font-medium Předpřipravené projekty
ps-btn.self-start(@click='projectModal', class='md:self-center') Přidat zadání
Expand Down
3 changes: 3 additions & 0 deletions server/api/teacher/extern-teacher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ export default async (req: Request, res: Response) => {
if (sfDoc.exists) throw new Error('User document already exists');

transaction.set(userRef, {
admin: false,
currentYear: null,
student: false,
teacher: true,
extern: true,
profilePicture: 'https://storage.googleapis.com/ps-profile-pictures/empty.png',
Expand Down

0 comments on commit 5352561

Please sign in to comment.