-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #966 from cornell-dti/shake-animation-and-storage-…
…ideation Backend logic, shake animation, and frontend draft for course notes
- Loading branch information
Showing
7 changed files
with
416 additions
and
36 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
<template> | ||
<teleport-modal | ||
title="Delete Note" | ||
content-class="content-delete" | ||
left-button-text="Cancel" | ||
right-button-text="Delete" | ||
:rightButtonIsDisabled="false" | ||
:rightButtonImage="icon" | ||
rightButtonAlt="delete note trashcan icon" | ||
@modal-closed="closeCurrentModal" | ||
@left-button-clicked="closeCurrentModal" | ||
@right-button-clicked="deleteNote" | ||
> | ||
<div class="deleteNoteModal-body"> | ||
<div class="deleteNoteModal-body-text">{{ text }}</div> | ||
</div> | ||
</teleport-modal> | ||
</template> | ||
|
||
<script lang="ts"> | ||
import { defineComponent } from 'vue'; | ||
import TeleportModal from '@/components/Modals/TeleportModal.vue'; | ||
import trashIcon from '@/assets/images/trash-white.svg'; | ||
export default defineComponent({ | ||
components: { TeleportModal }, | ||
props: { | ||
noteCourseUniqueID: { type: Number, required: true }, | ||
}, | ||
emits: { | ||
'close-delete-note': () => true, | ||
'delete-note': (noteCourseUniqueID: number) => typeof noteCourseUniqueID === 'number', | ||
}, | ||
computed: { | ||
text() { | ||
return 'Are you sure you want to delete this note?'; | ||
}, | ||
icon() { | ||
return trashIcon; | ||
}, | ||
}, | ||
methods: { | ||
closeCurrentModal() { | ||
this.$emit('close-delete-note'); | ||
}, | ||
deleteNote() { | ||
this.$emit('delete-note', this.noteCourseUniqueID); | ||
this.closeCurrentModal(); | ||
}, | ||
}, | ||
}); | ||
</script> | ||
|
||
<style lang="scss"> | ||
@import '@/assets/scss/_variables.scss'; | ||
.content-delete { | ||
width: 24rem; | ||
} | ||
@media only screen and (max-width: $small-medium-breakpoint) { | ||
.content-delete { | ||
width: 100%; | ||
} | ||
} | ||
</style> |
Oops, something went wrong.