Add course retrieval by share code feature and enhance course search functionality
- Implemented a new endpoint in VocabController to retrieve courses using a share code. - Updated VocabService to include logic for validating share codes and checking course access permissions. - Enhanced course listing functionality with search and language filtering options in the frontend. - Added a dialog for users to input share codes and search for courses, improving user experience. - Updated internationalization files to include new strings for share code functionality and search features.
This commit is contained in:
@@ -8,6 +8,9 @@
|
||||
<div class="course-info">
|
||||
<span>{{ $t('socialnetwork.vocab.courses.difficulty') }}: {{ course.difficultyLevel }}</span>
|
||||
<span v-if="course.isPublic">{{ $t('socialnetwork.vocab.courses.public') }}</span>
|
||||
<span v-if="course.shareCode && isOwner" class="share-code">
|
||||
{{ $t('socialnetwork.vocab.courses.shareCode') }}: <code>{{ course.shareCode }}</code>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div v-if="isOwner" class="owner-actions">
|
||||
@@ -206,6 +209,18 @@ export default {
|
||||
gap: 15px;
|
||||
margin: 15px 0;
|
||||
color: #666;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.share-code {
|
||||
font-family: monospace;
|
||||
}
|
||||
|
||||
.share-code code {
|
||||
background: #f0f0f0;
|
||||
padding: 2px 6px;
|
||||
border-radius: 3px;
|
||||
font-size: 0.9em;
|
||||
}
|
||||
|
||||
.owner-actions {
|
||||
|
||||
Reference in New Issue
Block a user