Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
62bc0f4
chore: install vue-flow dependency
Sh4dowking Nov 12, 2026
313ff98
feat: add techtree store with sample subtopics
Sh4dowking Nov 12, 2026
94fafd0
feat: unfold subtopics into graph representation and edges with unit …
Sh4dowking Nov 12, 2026
11604c7
chore: update types
Sh4dowking Nov 16, 2026
92bf82b
feat: calculate node positions in techtree
Sh4dowking Nov 16, 2026
fff0d73
feat: add techtree page
Sh4dowking Nov 16, 2026
f2f64eb
Merge branch 'main' into feat/tech-tree
Sh4dowking Nov 18, 2026
ee43c37
fix(router): check auth session before redirect
Sh4dowking Nov 18, 2026
1e5858a
feat(techtree): load subjects and tech tree from backend
Sh4dowking Nov 18, 2026
75c5d2f
refactor(techtree): add transitive reduction and parent-ordered row l…
Sh4dowking Nov 18, 2026
d43e7d8
feat(techtree): show progression on node cards and expand canvas
Sh4dowking Nov 18, 2026
49350b2
feat(ui): rebuild PopupElement with Vuetify dialog and sheet
Sh4dowking Nov 18, 2026
49f1d0a
feat(techtree): add subtopic detail popup with chats and assets
Sh4dowking Nov 18, 2026
4092e5a
feat(router): add placeholder chat page and route navigation
Sh4dowking Nov 18, 2026
898bc19
fix(techtree): delete subtopic chats and assets directly
Sh4dowking Nov 18, 2026
4fcd870
fix(sidebar): use router links for home and subjects
Sh4dowking Nov 19, 2026
cb1aff7
chore(deps): update oidc-login-sdk-browser to 1.7.1
Sh4dowking Nov 19, 2026
b6926ea
refactor(techtree): switch to composable, add create dialogs and poli…
Sh4dowking Nov 19, 2026
a7777cf
chore(deps): update oidc-login-sdk-browser to 1.7.2
Sh4dowking Nov 19, 2026
cee0df4
refactor(ui): extract dialog components and simplify init call
Sh4dowking Nov 19, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@
},
"dependencies": {
"@fontsource/roboto": "^5.2.10",
"@janishutz/oidc-login-sdk-browser": "^1.7.0",
"@janishutz/oidc-login-sdk-browser": "^1.7.2",
"@mdi/font": "7.4.47",
"@vue-flow/core": "^1.48.2",
"pinia": "^3.0.4",
"vue": "^3.5.30",
"vue-router": "^5.0.3",
Expand Down
13 changes: 10 additions & 3 deletions src/components/SideBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -37,21 +37,28 @@
title="Home"
value="home"
link
href="/"
to="/"
/>
<v-list-item
prepend-icon="mdi-chat"
title="Chats"
value="chats"
link
href="/chat"
to="/chat"
/>
<v-list-item
prepend-icon="mdi-school"
title="Subjects"
value="subjects"
link
href="/subjects"
to="/subjects"
/>
<v-list-item
prepend-icon="mdi-sitemap"
title="Tech Tree"
value="techtree"
link
to="/techtree"
/>
</v-list>
<template #append>
Expand Down
73 changes: 73 additions & 0 deletions src/components/custom-ui-elements/ConfirmDeleteDialog.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
<script setup lang="ts">
const isOpen = defineModel<boolean>( {
'default': false
} );
const props = defineProps<{
'title': string;
'message': string;
'loading'?: boolean;
'error'?: string | null;
}>();
const emit = defineEmits<{
'confirm': [];
'clear-error': [];
}>();
</script>

<template>
<v-dialog
v-model="isOpen"
max-width="400"
>
<v-sheet
class="pa-5"
rounded="lg"
>
<h3 class="text-h6 font-weight-bold mb-2">
{{ props.title }}
</h3>
<p class="text-body-2 text-medium-emphasis mb-5">
{{ props.message }}
</p>

<v-alert
v-if="props.error"
class="mb-4"
closable
density="compact"
:icon="false"
type="error"
variant="tonal"
@click:close="emit( 'clear-error' )"
>
{{ props.error }}

<template #close="{ props: closeProps }">
<v-btn
v-bind="closeProps"
color="error"
/>
</template>
</v-alert>

<div class="d-flex justify-end ga-2">
<v-btn
color="medium-emphasis"
variant="text"
@click="isOpen = false"
>
Cancel
</v-btn>

<v-btn
color="error"
:loading="props.loading"
variant="tonal"
@click="emit( 'confirm' )"
>
Delete
</v-btn>
</div>
</v-sheet>
</v-dialog>
</template>
122 changes: 45 additions & 77 deletions src/components/custom-ui-elements/PopupElement.vue
Original file line number Diff line number Diff line change
@@ -1,89 +1,57 @@
<template>
<div :class="['popup', isOpen ? undefined : 'hidden' ]">
<div class="popup-backdrop" @click="closePopup"></div>
<div class="popup-main">
<i v-if="props.showClose" class="fa-solid fa-xmark close-icon" @click="closePopup()"></i>
<slot />
</div>
</div>
</template>


<script setup lang="ts">
const isOpen = defineModel<boolean>();
const props = defineProps<{
'showClose'?: boolean
}>();
const isOpen = defineModel<boolean>( {
'default': false
} );

withDefaults( defineProps<{
'showClose'?: boolean;
'maxWidth'?: number | string;
}>(), {
'showClose': true,
'maxWidth': 860
} );

const closePopup = () => {
isOpen.value = false;
};
</script>

<template>
<v-dialog
v-model="isOpen"
:max-width="maxWidth"
scrollable
>
<v-sheet
class="popup-sheet pa-6 position-relative"
rounded="lg"
>
<v-btn
v-if="showClose"
aria-label="Close"
class="popup-close-btn"
color="medium-emphasis"
density="comfortable"
icon="mdi-close"
size="small"
variant="text"
@click="closePopup"
/>

<style scoped lang="scss">
.popup {
position: fixed;
width: 100vw;
height: 100vh;
top: 0;
left: 0;
display: flex;
justify-content: center;
align-items: center;
z-index: 1000;
transition-delay: 0;
overflow: hidden;

.popup-backdrop {
width: 100vw;
height: 100vh;
position: absolute;
background-color: rgba(0, 0, 0, 0.7);
top: 0;
left: 0;
overflow: hidden;
transition: all 0.25s;
}

.popup-main {
width: fit-content;
height: fit-content;
max-width: 90%;
max-height: 90%;
background-color: white;
color: black;
padding: 2.5%;
border-radius: 20px;
transform: scale(1);
position: relative;
overflow: hidden;
display: block;
transition: transform 0.25s ease, opacity 0.25s ease;

>.close-icon {
position: absolute;
top: 20px;
right: 20px;
font-size: 1.5rem;
cursor: pointer;
user-select: none;
}
}

&.hidden {
top: -100vh;
transition-delay: 0.25s;
<slot />
</v-sheet>
</v-dialog>
</template>

.popup-main {
transform: scale(1.25);
opacity: 0;
transition: transform 0.15s ease, opacity 0.15s ease;
}
<style scoped lang="scss">
.popup-sheet {
width: 100%;
}

.popup-backdrop {
opacity: 0;
}
}
.popup-close-btn {
position: absolute;
top: 16px;
right: 16px;
z-index: 1;
}
</style>
121 changes: 121 additions & 0 deletions src/components/techtree/CreateSubjectDialog.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
<script setup lang="ts">
import {
ref,
watch
} from 'vue';
import {
useStateStore
} from '@/stores/statestore';

const isOpen = defineModel<boolean>( {
'default': false
} );
const stateStore = useStateStore();
const name = ref( '' );
const creating = ref( false );
const dialogError = ref<string | null>( null );

watch( isOpen, open => {
if ( open ) {
name.value = '';
dialogError.value = null;
stateStore.subjectsError = null;
}
} );

const handleSubmit = async () => {
const trimmed = name.value.replace( /[^\x20-\x7E]/g, '' ).trim();

if ( trimmed.length < 3 ) {
dialogError.value = 'Subject name must be at least 3 ASCII characters.';

return;
}

dialogError.value = null;
creating.value = true;

try {
const created = await stateStore.createSubject( trimmed );

if ( created ) {
isOpen.value = false;
name.value = '';
} else {
dialogError.value = stateStore.subjectsError ?? 'Failed to create subject';
}
} finally {
creating.value = false;
}
};
</script>

<template>
<v-dialog
v-model="isOpen"
max-width="420"
>
<v-sheet
class="pa-5"
rounded="lg"
>
<h3 class="text-h6 font-weight-bold mb-2">
Create Subject
</h3>
<p class="text-body-2 text-medium-emphasis mb-4">
Add a subject to start building its tech tree.
</p>

<v-alert
v-if="dialogError"
class="mb-4"
closable
density="compact"
:icon="false"
type="error"
variant="tonal"
@click:close="dialogError = null"
>
{{ dialogError }}

<template #close="{ props: closeProps }">
<v-btn
v-bind="closeProps"
color="error"
/>
</template>
</v-alert>

<v-text-field
v-model="name"
autofocus
counter="100"
density="compact"
label="Subject name"
maxlength="100"
placeholder="e.g. Linear Algebra"
variant="outlined"
@keyup.enter="handleSubmit"
/>

<div class="d-flex justify-end ga-2 mt-4">
<v-btn
color="medium-emphasis"
variant="text"
@click="isOpen = false"
>
Cancel
</v-btn>

<v-btn
color="on-surface"
:loading="creating"
variant="tonal"
@click="handleSubmit"
>
Create
</v-btn>
</div>
</v-sheet>
</v-dialog>
</template>
Loading
Loading