Skip to content

Commit 9ff3edc

Browse files
authored
Merge pull request #3439 from NationalSecurityAgency/t#3367/slide_deck
T#3367/slide deck
2 parents ab754a2 + acb4efc commit 9ff3edc

File tree

52 files changed

+3919
-16
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+3919
-16
lines changed

dashboard/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
"material-icons": "1.13.14",
3737
"node-emoji": "2.2.0",
3838
"number-format.js": "2.0.9",
39+
"pdfjs-dist": "5.3.93",
3940
"pdfkit": "0.17.1",
4041
"pinia": "3.0.3",
4142
"pluralize": "8.0.0",
43.6 KB
Binary file not shown.

dashboard/src/common-components/stores/UseAppConfig.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,9 @@ export const useAppConfig = defineStore('dashboardAppConfig', () => {
135135
const projectMetricsTagCharts = computed(() => config.value.projectMetricsTagCharts)
136136
const maxDailyUserEvents = computed(() => config.value.maxDailyUserEvents)
137137
const allowedVideoUploadMimeTypes = computed(() => config.value.allowedVideoUploadMimeTypes)
138+
const allowedSlidesUploadMimeTypes = computed(() => config.value.allowedSlidesUploadMimeTypes)
138139
const videoUploadWarningMessage = computed(() => config.value.videoUploadWarningMessage)
140+
const slidesUploadWarningMessage = computed(() => config.value.slidesUploadWarningMessage)
139141
const maxVideoCaptionsLength = computed(() => config.value.maxVideoCaptionsLength)
140142
const maxVideoTranscriptLength = computed(() => config.value.maxVideoTranscriptLength)
141143
const userPageTagsToDisplay = computed(() => config.value.userPageTagsToDisplay)
@@ -236,8 +238,10 @@ export const useAppConfig = defineStore('dashboardAppConfig', () => {
236238
approvalConfUserTagLabel,
237239
projectMetricsTagCharts,
238240
maxDailyUserEvents,
241+
allowedSlidesUploadMimeTypes,
239242
allowedVideoUploadMimeTypes,
240243
videoUploadWarningMessage,
244+
slidesUploadWarningMessage,
241245
maxVideoCaptionsLength,
242246
maxVideoTranscriptLength,
243247
userPageTagsToDisplay,
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
/*
2+
* Copyright 2025 SkillTree
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* https://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
import {onMounted, onUnmounted, ref, computed} from "vue";
17+
18+
export const useElementSizeUtil = (elementRef) => {
19+
const width = ref(null)
20+
const height = ref(null)
21+
22+
const handleWindowResize = () => {
23+
const elementRect = elementRef.value?.getBoundingClientRect()
24+
if (elementRect) {
25+
width.value = Math.trunc(elementRect.width)
26+
height.value = Math.trunc(elementRect.height)
27+
}
28+
}
29+
30+
onMounted(() => {
31+
window.addEventListener('resize', handleWindowResize);
32+
handleWindowResize()
33+
})
34+
onUnmounted(() => {
35+
window.removeEventListener('resize', handleWindowResize);
36+
})
37+
38+
39+
return {
40+
width,
41+
height
42+
}
43+
}

dashboard/src/components/skills/SkillOverview.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import { useSkillsState } from '@/stores/UseSkillsState.js'
2020
import SubPageHeader from '@/components/utils/pages/SubPageHeader.vue';
2121
import LoadingContainer from '@/components/utils/LoadingContainer.vue';
2222
import ChildRowSkillsDisplay from '@/components/skills/ChildRowSkillsDisplay.vue';
23+
import SlideDeck from "@/components/slides/SlideDeck.vue";
2324
2425
const route = useRoute();
2526
const skillsState = useSkillsState();
@@ -31,7 +32,7 @@ const skillsState = useSkillsState();
3132
<loading-container :is-loading="skillsState.loadingSkill">
3233
<Card>
3334
<template #content>
34-
<child-row-skills-display
35+
<child-row-skills-display
3536
v-if="skillsState.skill && skillsState.skill.skillId"
3637
:skill="skillsState.skill" />
3738
</template>

dashboard/src/components/skills/SkillPage.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ const navItems = ref([])
8282
const buildNavItems = () => {
8383
const items = []
8484
items.push({ name: 'Overview', iconClass: 'fa-info-circle skills-color-overview', page: 'SkillOverview' })
85+
items.push({ name: 'Slides', iconClass: 'fa-solid fa-file-pdf', page: 'ConfigureSlides' })
8586
items.push({ name: 'Audio/Video', iconClass: 'fa-play-circle skills-color-video', page: 'ConfigureVideo' })
8687
items.push({
8788
name: 'Expiration',
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
/*
2+
Copyright 2025 SkillTree
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
https://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
*/
16+
<script setup lang="ts">
17+
import {computed} from "vue";
18+
19+
const props = defineProps({
20+
currentPage: Number,
21+
totalPages: Number,
22+
})
23+
const emit = defineEmits(['prevPage', 'nextPage'])
24+
25+
const prevPage = () => {
26+
emit('prevPage')
27+
}
28+
const nextPage = () => {
29+
emit('nextPage')
30+
}
31+
32+
const progressPercent = computed(() => (props.currentPage / props.totalPages) * 100)
33+
</script>
34+
35+
<template>
36+
<div class="flex gap-2 items-center">
37+
<SkillsButton
38+
aria-label="Previous Slide"
39+
icon="fa-solid fa-circle-chevron-left"
40+
class="shadow-md"
41+
data-cy="prevSlideBtn"
42+
@click="prevPage"
43+
:disabled="currentPage <= 1"/>
44+
<div>
45+
<div data-cy="currentSlideMsg">Slide {{ currentPage }} of {{ totalPages }}</div>
46+
<ProgressBar :value="progressPercent" :show-value="false" style="height: 5px" aria-label="Slides Progress"></ProgressBar>
47+
</div>
48+
<SkillsButton
49+
aria-label="Next Slide"
50+
icon="fa-solid fa-circle-chevron-right"
51+
class="shadow-md"
52+
data-cy="nextSlideBtn"
53+
@click="nextPage"
54+
:disabled="currentPage >= totalPages"/>
55+
</div>
56+
57+
</template>
58+
59+
<style scoped>
60+
61+
</style>

0 commit comments

Comments
 (0)