This repository has been archived by the owner on Jan 22, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* paar fixes alvast * almost * files uploaden werkt * formatting fixes * bugfixes + added date fields in db * formatting * background container gone + no instructors found fix * format * basic * temp * begint ergens op te trekken * update werkt! * small change * looking good * edit fixes (almost there) * files werken * edit (improvements) * updates * filestructure visible * werkt * af? * remove empty alembic revisions * docker terug ok * alert * route fix * linter * add publish_date to mock projects * reroute * bijna * requirements * editfiles werkt * AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA * few fixes * small time fix * i18n * format * formatting * final * final * vage fixes * vage fixes 2 * tijd update nu ook * test fix * format * schema optional added * fix voor tests not found * bram requests xoxo * whoops * Update frontend/src/components/RequirementsInput.vue Co-authored-by: Pieter Janin <[email protected]> * Update frontend/src/components/RequirementsInput.vue Co-authored-by: Pieter Janin <[email protected]> * Update frontend/src/queries/Project.ts Co-authored-by: Pieter Janin <[email protected]> * Update frontend/src/queries/Project.ts Co-authored-by: Pieter Janin <[email protected]> * Update frontend/src/components/RequirementsInput.vue Co-authored-by: Pieter Janin <[email protected]> * Update frontend/src/services/project.ts Co-authored-by: Pieter Janin <[email protected]> * Update frontend/src/components/project/DatePicker.vue Co-authored-by: Pieter Janin <[email protected]> * fixes * loading fix * Update frontend/src/components/project/DatePicker.vue Co-authored-by: Pieter Janin <[email protected]> * fixes vooral cleanup * fixes vooral cleanup * fixes vooral cleanup * Revert "upgrade @vue/test-utils (#181)" This reverts commit 87ed142. * luxon weg? * luxon echt weg? * luxon echt echt weg? * renaming + unused gone * some small fixes * bramfixes --------- Co-authored-by: Bram Reyniers <[email protected]> Co-authored-by: Pieter Janin <[email protected]>
- Loading branch information
1 parent
5c81f03
commit f590e51
Showing
23 changed files
with
831 additions
and
212 deletions.
There are no files selected for viewing
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
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
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
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,91 @@ | ||
<template> | ||
<v-card class="file-display-container" outlined> | ||
<v-card-title>{{ $t("project.testfiles") }}</v-card-title> | ||
<v-card-text> | ||
<v-treeview v-model="tree" :items="treeItems" activatable hoverable open-on-click> | ||
<template v-slot:prepend="{ item }"> | ||
<v-icon>{{ getFileIcon(item.title) }}</v-icon> | ||
</template> | ||
</v-treeview> | ||
</v-card-text> | ||
</v-card> | ||
</template> | ||
|
||
<script setup> | ||
import { computed, ref } from "vue"; | ||
import { VTreeview } from "vuetify/labs/VTreeview"; | ||
const props = defineProps({ | ||
files: Array, | ||
}); | ||
const tree = ref([]); | ||
const treeItems = computed(() => { | ||
const rootNode = {}; | ||
props.files.forEach((file) => { | ||
const parts = file.filename.split("/").filter(Boolean); | ||
let current = rootNode; | ||
parts.forEach((part, index) => { | ||
if (!current[part]) { | ||
current[part] = { | ||
_isFile: index === parts.length - 1, | ||
children: {}, | ||
title: part, | ||
}; | ||
} | ||
if (index === parts.length - 1) { | ||
current[part]._isFile = true; | ||
current[part].title = parts.slice(-1)[0]; | ||
current[part].id = file.path; | ||
current[part].children = undefined; | ||
} else { | ||
current = current[part].children; | ||
} | ||
}); | ||
}); | ||
return buildTree(rootNode); | ||
}); | ||
function buildTree(node, path = "") { | ||
const result = []; | ||
Object.keys(node).forEach((key) => { | ||
if (!node[key]._isFile && node[key].children) { | ||
const fullPath = path ? `${path}/${key}` : key; | ||
result.push({ | ||
title: node[key].title, | ||
id: fullPath, | ||
children: buildTree(node[key].children, fullPath), | ||
}); | ||
} else if (node[key]._isFile) { | ||
result.push({ | ||
title: node[key].title, | ||
id: node[key].id, | ||
}); | ||
} | ||
}); | ||
return result; | ||
} | ||
const icons = ref({ | ||
html: "mdi-language-html5", | ||
js: "mdi-nodejs", | ||
json: "mdi-code-json", | ||
md: "mdi-language-markdown", | ||
pdf: "mdi-file-pdf-box", | ||
png: "mdi-file-image", | ||
txt: "mdi-file-document-outline", | ||
xls: "mdi-file-excel", | ||
folder: "mdi-folder", | ||
folderOpen: "mdi-folder-open", | ||
}); | ||
function getFileIcon(filename) { | ||
const extension = filename.split(".").pop(); | ||
if (extension === filename) { | ||
return "mdi-folder"; | ||
} else { | ||
return icons.value[extension] || "mdi-file"; | ||
} | ||
} | ||
</script> |
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
Oops, something went wrong.