Spaces:
Running
Running
File size: 28,403 Bytes
6b7479e 4b71948 6b7479e 4b71948 6b7479e b4f9490 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 |
<template>
<div class="segmentation-sidebar">
<!-- Navigation header -->
<div class="sidebar-header">
<div class="view-navigation">
<button
class="nav-button"
@click="previousView"
>
<svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor">
<path d="M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"/>
</svg>
</button>
<span class="view-indicator">
{{ currentViewIndex + 1 }} / {{ views.length }}
</span>
<button
class="nav-button"
@click="nextView"
>
<svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor">
<path d="M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"/>
</svg>
</button>
</div>
</div>
<!-- Content area with transitions -->
<div class="sidebar-content">
<transition :name="transitionName" mode="out-in">
<div :key="currentViewIndex" class="view-content">
<!-- Page 1: Video Upload and FPS -->
<div v-if="currentViewIndex === 0" class="video-upload-page">
<button class="upload-video-btn" @click="uploadVideo">
<span>Upload Video</span>
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor">
<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/>
<path d="m17 8-5-5-5 5"/>
<path d="M12 3v12"/>
</svg>
</button>
<!-- Input file caché pour vidéo -->
<input
ref="videoFileInput"
type="file"
accept="video/*"
@change="handleVideoUpload"
style="display: none;"
/>
<div class="video-list" v-if="videoStore.videos.length">
<div
v-for="video in videoStore.videos"
:key="video.path"
class="video-item"
:class="{ active: videoStore.selectedVideo?.path === video.path }"
@click="selectVideo(video)"
>
{{ video.name }}
</div>
</div>
<!-- Sélecteur de FPS -->
<div class="fps-selector">
<select
id="fps-select"
v-model="selectedFps"
@change="updateFps"
class="fps-select"
>
<option value="15">15 FPS</option>
<option value="24">24 FPS</option>
<option value="25">25 FPS</option>
<option value="30">30 FPS</option>
<option value="50">50 FPS</option>
<option value="60">60 FPS</option>
<option value="120">120 FPS</option>
</select>
</div>
</div>
<!-- Page 2: Config Upload -->
<div v-if="currentViewIndex === 1" class="config-upload-page">
<button class="upload-config-btn" @click="uploadConfig">
<span>Upload Config</span>
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor">
<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/>
<path d="m17 8-5-5-5 5"/>
<path d="M12 3v12"/>
</svg>
</button>
<!-- Input file caché pour config -->
<input
ref="configFileInput"
type="file"
accept=".json,.yaml,.yml,.txt"
@change="handleConfigUpload"
style="display: none;"
/>
<div class="config-info" v-if="uploadedConfig">
<div class="config-item">
<strong>Config loaded:</strong> {{ uploadedConfig.name }}
</div>
<div class="config-item" v-if="configInfo">
<strong>Objects found:</strong> {{ configInfo.objectCount }}
</div>
<div class="config-item" v-if="configInfo">
<strong>Frames with annotations:</strong> {{ configInfo.frameCount }}
</div>
<div class="config-item" v-if="configInfo">
<strong>Total annotations:</strong> {{ configInfo.annotationCount }}
</div>
<div class="config-actions">
<button
class="load-config-btn"
@click="loadConfigData"
:disabled="!uploadedConfig"
>
Load Annotations
</button>
<button
class="clear-config-btn"
@click="clearConfigData"
:disabled="!configInfo"
>
Clear
</button>
</div>
</div>
</div>
<!-- Page 3: CSV Analysis -->
<div v-if="currentViewIndex === 2" class="csv-analysis-page">
<button class="upload-csv-btn" @click="uploadCSV">
<span>Upload Event CSV</span>
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor">
<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/>
<path d="m17 8-5-5-5 5"/>
<path d="M12 3v12"/>
</svg>
</button>
<!-- Input file caché pour CSV -->
<input
ref="csvFileInput"
type="file"
accept=".csv"
@change="handleCSVUpload"
style="display: none;"
/>
<div class="csv-controls" v-if="uploadedCSV && csvColumns.length">
<div class="control-group">
<label>Row Column:</label>
<select v-model="selectedRowColumn" @change="updateFilteredTimestamps">
<option v-for="column in csvColumns" :key="column" :value="column">
{{ column }}
</option>
</select>
</div>
<div class="control-group">
<label>Timestamp Column:</label>
<select v-model="selectedTimestampColumn" @change="updateFilteredTimestamps">
<option v-for="column in csvColumns" :key="column" :value="column">
{{ column }}
</option>
</select>
</div>
<div class="control-group">
<label>Filter Keyword:</label>
<input
type="text"
v-model="filterKeyword"
@input="onFilterInput"
@keydown="onFilterKeydown"
@keyup="onFilterKeyup"
@paste="onFilterPaste"
@focus="onFilterFocus"
@blur="onFilterBlur"
placeholder="Enter keyword to filter"
/>
</div>
</div>
<div class="csv-results" v-if="filteredTimestamps.length">
<h4>Filtered Timestamps:</h4>
<div class="timestamp-list">
<div
v-for="(timestamp, index) in filteredTimestamps"
:key="index"
class="timestamp-item"
@click="gotoTimestamp(timestamp)"
>
<span class="timestamp-value">{{ timestamp }}</span>
</div>
</div>
</div>
</div>
</div>
</transition>
</div>
</div>
</template>
<script>
import { useVideoStore } from '../stores/videoStore'
import { useAnnotationStore } from '../stores/annotationStore'
export default {
name: 'SegmentationSidebar',
data() {
const videoStore = useVideoStore()
const annotationStore = useAnnotationStore()
return {
videoStore,
annotationStore,
selectedFps: videoStore.fps || 25,
currentViewIndex: 0,
transitionName: 'slide-right',
uploadedConfig: null,
configInfo: null,
// CSV Analysis data
uploadedCSV: null,
csvData: null,
csvColumns: [],
selectedRowColumn: 'Row',
selectedTimestampColumn: 'Start time',
filterKeyword: 'Possession',
filteredTimestamps: [],
views: [
{
name: 'Video Upload',
component: 'VideoUploadView'
},
{
name: 'Config Upload',
component: 'ConfigUploadView'
},
{
name: 'CSV Analysis',
component: 'CSVAnalysisView'
}
]
}
},
computed: {
currentView() {
return this.views[this.currentViewIndex]
}
},
watch: {
'videoStore.selectedVideo': {
handler(newVideo) {
console.log('Vidéo sélectionnée:', newVideo)
},
deep: true
},
'filterKeyword': {
handler() {
this.updateFilteredTimestamps()
}
}
},
mounted() {
console.log('SegmentationSidebar mounted - prêt pour l\'upload de vidéo')
},
methods: {
// Navigation methods
nextView() {
this.transitionName = 'slide-right'
this.currentViewIndex = (this.currentViewIndex + 1) % this.views.length
},
previousView() {
this.transitionName = 'slide-left'
this.currentViewIndex = this.currentViewIndex === 0
? this.views.length - 1
: this.currentViewIndex - 1
},
// Video upload methods
uploadVideo() {
this.$refs.videoFileInput.click()
},
handleVideoUpload(event) {
const file = event.target.files[0]
if (file) {
console.log('Vidéo sélectionnée:', file.name)
// Créer un URL blob pour la vidéo
const videoUrl = URL.createObjectURL(file)
// Créer un objet vidéo pour le store
const videoObject = {
name: file.name,
path: videoUrl,
file: file,
size: file.size,
type: file.type
}
// Mettre à jour le store avec la nouvelle vidéo
this.videoStore.setVideos([videoObject])
this.videoStore.setSelectedVideo(videoObject)
// Émettre l'événement pour informer les autres composants
this.$emit('video-selected', videoObject)
console.log('Vidéo uploadée et sélectionnée:', videoObject)
}
},
selectVideo(video) {
this.videoStore.setSelectedVideo(video)
this.$emit('video-selected', video)
},
updateFps() {
this.videoStore.setFps(parseInt(this.selectedFps))
},
// Config upload methods
uploadConfig() {
this.$refs.configFileInput.click()
},
handleConfigUpload(event) {
const file = event.target.files[0]
if (file) {
console.log('Config sélectionnée:', file.name)
// Lire le contenu du fichier
const reader = new FileReader()
reader.onload = (e) => {
try {
const configContent = e.target.result
this.uploadedConfig = {
name: file.name,
content: configContent,
size: file.size,
type: file.type
}
// Parser le contenu pour extraire les informations
this.parseConfigContent(configContent)
// Émettre l'événement pour informer les autres composants
this.$emit('config-uploaded', this.uploadedConfig)
console.log('Config uploadée:', this.uploadedConfig)
} catch (error) {
console.error('Erreur lors de la lecture du fichier config:', error)
}
}
reader.readAsText(file)
}
},
parseConfigContent(content) {
try {
let configData
// Essayer de parser comme JSON
if (content.trim().startsWith('{') || content.trim().startsWith('[')) {
configData = JSON.parse(content)
} else {
// Essayer de parser comme YAML (format simple)
configData = this.parseYamlLike(content)
}
// Analyser les données pour extraire les informations
this.configInfo = this.analyzeConfigData(configData)
console.log('Config parsée:', configData)
console.log('Informations extraites:', this.configInfo)
} catch (error) {
console.error('Erreur lors du parsing du fichier config:', error)
this.configInfo = null
}
},
parseYamlLike(content) {
// Parser simple pour les fichiers YAML-like
const lines = content.split('\n')
const result = {}
let currentSection = null
for (const line of lines) {
const trimmedLine = line.trim()
if (!trimmedLine || trimmedLine.startsWith('#')) continue
if (trimmedLine.endsWith(':')) {
currentSection = trimmedLine.slice(0, -1)
result[currentSection] = {}
} else if (currentSection && trimmedLine.includes(':')) {
const [key, value] = trimmedLine.split(':', 2)
result[currentSection][key.trim()] = value.trim()
}
}
return result
},
analyzeConfigData(data) {
let objectCount = 0
let frameCount = 0
let annotationCount = 0
// Analyser les objets
if (data.objects) {
objectCount = Object.keys(data.objects).length
}
// Analyser les annotations initiales par frame
if (data.initial_annotations) {
frameCount = Object.keys(data.initial_annotations).length
annotationCount = Object.values(data.initial_annotations).reduce((total, frameAnnotations) => {
return total + (Array.isArray(frameAnnotations) ? frameAnnotations.length : 0)
}, 0)
}
return {
objectCount,
frameCount,
annotationCount,
rawData: data
}
},
loadConfigData() {
if (!this.configInfo || !this.configInfo.rawData) {
console.error('Aucune donnée de configuration à charger')
return
}
try {
const data = this.configInfo.rawData
// Charger les objets
if (data.objects) {
this.annotationStore.objects = { ...data.objects }
console.log('Objets chargés:', this.annotationStore.objects)
}
// Charger les annotations initiales
if (data.initial_annotations) {
this.annotationStore.frameAnnotations = { ...data.initial_annotations }
console.log('Annotations initiales chargées:', this.annotationStore.frameAnnotations)
}
// Mettre à jour les métadonnées si disponibles
if (data.metadata) {
this.annotationStore.updateVideoMetadata(data.metadata)
console.log('Métadonnées mises à jour:', data.metadata)
}
// Mettre à jour le compteur d'objets
if (data.objects) {
const maxId = Math.max(...Object.keys(data.objects).map(id => parseInt(id)), 0)
this.annotationStore.objectIdCounter = maxId + 1
}
console.log('Configuration chargée avec succès!')
this.$emit('config-loaded', data)
} catch (error) {
console.error('Erreur lors du chargement de la configuration:', error)
}
},
clearConfigData() {
this.uploadedConfig = null
this.configInfo = null
console.log('Données de configuration effacées')
},
// CSV upload and analysis methods
uploadCSV() {
this.$refs.csvFileInput.click()
},
// Filter event handlers
onFilterInput() {
this.updateFilteredTimestamps()
},
onFilterKeydown(event) {
// Empêcher la propagation pour éviter les conflits avec d'autres raccourcis
event.stopPropagation()
},
onFilterKeyup(event) {
// Empêcher la propagation pour éviter les conflits avec d'autres raccourcis
event.stopPropagation()
this.updateFilteredTimestamps()
},
onFilterPaste() {
// Laisser le paste se faire naturellement, puis mettre à jour
setTimeout(() => {
this.updateFilteredTimestamps()
}, 0)
},
onFilterFocus(event) {
// S'assurer que l'input capture tous les événements clavier
event.target.setAttribute('data-focused', 'true')
},
onFilterBlur(event) {
event.target.removeAttribute('data-focused')
},
handleCSVUpload(event) {
const file = event.target.files[0]
if (file) {
console.log('CSV sélectionné:', file.name)
// Lire le contenu du fichier
const reader = new FileReader()
reader.onload = (e) => {
try {
const csvContent = e.target.result
this.uploadedCSV = {
name: file.name,
content: csvContent,
size: file.size,
type: file.type
}
// Parser le contenu CSV
this.parseCSVContent(csvContent)
// Émettre l'événement pour informer les autres composants
this.$emit('csv-uploaded', this.uploadedCSV)
console.log('CSV uploadé:', this.uploadedCSV)
} catch (error) {
console.error('Erreur lors de la lecture du fichier CSV:', error)
}
}
reader.readAsText(file)
}
},
parseCSVContent(content) {
try {
const lines = content.split('\n').filter(line => line.trim())
if (lines.length === 0) {
console.error('Fichier CSV vide')
return
}
// Parser l'en-tête pour obtenir les colonnes
const header = lines[0].split(',').map(col => col.trim().replace(/"/g, ''))
this.csvColumns = header
// Parser les données
this.csvData = []
for (let i = 1; i < lines.length; i++) {
const values = lines[i].split(',').map(val => val.trim().replace(/"/g, ''))
const row = {}
header.forEach((col, index) => {
row[col] = values[index] || ''
})
this.csvData.push(row)
}
console.log('CSV parsé:', this.csvData)
console.log('Colonnes:', this.csvColumns)
// Mettre à jour les timestamps filtrés
this.updateFilteredTimestamps()
} catch (error) {
console.error('Erreur lors du parsing du fichier CSV:', error)
this.csvData = null
this.csvColumns = []
}
},
updateFilteredTimestamps() {
if (!this.csvData || !this.selectedRowColumn || !this.selectedTimestampColumn) {
this.filteredTimestamps = []
return
}
this.filteredTimestamps = this.csvData
.filter(row => {
const rowValue = row[this.selectedRowColumn] || ''
return rowValue.toLowerCase().includes(this.filterKeyword.toLowerCase())
})
.map(row => row[this.selectedTimestampColumn])
.filter(timestamp => timestamp && timestamp.trim())
.sort((a, b) => {
// Convertir les timestamps en secondes pour le tri
const secondsA = this.parseTimestamp(a)
const secondsB = this.parseTimestamp(b)
// Si les deux timestamps sont valides, les trier
if (secondsA !== null && secondsB !== null) {
return secondsA - secondsB
}
// Si un seul est valide, le mettre en premier
if (secondsA !== null) return -1
if (secondsB !== null) return 1
// Sinon, trier alphabétiquement
return a.localeCompare(b)
})
},
gotoTimestamp(timestamp) {
// Convertir le timestamp en secondes et naviguer vers cette position
const seconds = this.parseTimestamp(timestamp)
if (seconds !== null) {
this.videoStore.setCurrentTime(seconds)
}
},
parseTimestamp(timestamp) {
// Parser différents formats de timestamp
if (!timestamp) return null
// Format MM:SS ou HH:MM:SS
const timeParts = timestamp.split(':')
if (timeParts.length === 2) {
// Format MM:SS
const minutes = parseInt(timeParts[0])
const seconds = parseInt(timeParts[1])
return minutes * 60 + seconds
} else if (timeParts.length === 3) {
// Format HH:MM:SS
const hours = parseInt(timeParts[0])
const minutes = parseInt(timeParts[1])
const seconds = parseInt(timeParts[2])
return hours * 3600 + minutes * 60 + seconds
}
// Essayer de parser comme nombre de secondes
const seconds = parseFloat(timestamp)
if (!isNaN(seconds)) {
return seconds
}
return null
}
}
}
</script>
<style scoped>
.segmentation-sidebar {
background: #363636;
height: 100%;
width: 200px;
display: flex;
flex-direction: column;
overflow: hidden;
}
.sidebar-header {
padding: 8px 12px;
background: #3c3c3c;
border-bottom: 1px solid #4a4a4a;
display: flex;
justify-content: center;
align-items: center;
}
.view-navigation {
display: flex;
align-items: center;
gap: 8px;
}
.nav-button {
background: #4a4a4a;
border: none;
border-radius: 4px;
color: white;
width: 24px;
height: 24px;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
transition: all 0.2s;
}
.nav-button:hover:not(:disabled) {
background: #5a5a5a;
}
.view-indicator {
color: #ccc;
font-size: 0.8rem;
min-width: 40px;
text-align: center;
}
.sidebar-content {
flex: 1;
position: relative;
overflow: hidden;
padding: 16px;
}
.view-content {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
padding: 16px;
display: flex;
flex-direction: column;
gap: 16px;
}
/* Video Upload Page Styles */
.video-upload-page {
display: flex;
flex-direction: column;
gap: 16px;
height: 100%;
}
.upload-video-btn {
background: #424242;
border: none;
border-radius: 8px;
color: white;
padding: 12px 16px;
cursor: pointer;
display: flex;
align-items: center;
justify-content: space-between;
width: 100%;
font-size: 1rem;
flex-shrink: 0;
transition: background-color 0.2s ease;
}
.upload-video-btn:hover {
background: #4a4a4a;
}
.video-list {
height: 20vh;
background: #424242;
border-radius: 8px;
overflow-y: auto;
display: flex;
flex-direction: column;
gap: 4px;
padding: 4px;
}
/* Styles pour Firefox */
.video-list {
scrollbar-width: thin;
scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}
/* Styles pour Chrome/Safari/Edge */
.video-list::-webkit-scrollbar {
width: 4px;
}
.video-list::-webkit-scrollbar-track {
background: transparent;
}
.video-list::-webkit-scrollbar-thumb {
background: rgba(255, 255, 255, 0.3);
border-radius: 2px;
}
.video-item {
padding: 8px 12px;
border-radius: 4px;
cursor: pointer;
color: white;
transition: background-color 0.2s;
}
.video-item:hover {
background: #4a4a4a;
}
.video-item.active {
background: #3a3a3a;
}
.fps-selector {
display: flex;
flex-direction: column;
gap: 8px;
padding: 12px;
border-radius: 8px;
}
.fps-select {
background: #363636;
border: 1px solid #555;
border-radius: 4px;
color: white;
padding: 8px 12px;
font-size: 0.9rem;
width: 100%;
}
.fps-select:focus {
outline: none;
border-color: #4CAF50;
}
/* Config Upload Page Styles */
.config-upload-page {
display: flex;
flex-direction: column;
gap: 16px;
height: 100%;
}
.upload-config-btn {
background: #424242;
border: none;
border-radius: 8px;
color: white;
padding: 12px 16px;
cursor: pointer;
display: flex;
align-items: center;
justify-content: space-between;
width: 100%;
font-size: 1rem;
flex-shrink: 0;
transition: background-color 0.2s ease;
}
.upload-config-btn:hover {
background: #4a4a4a;
}
.config-info {
background: #424242;
border-radius: 8px;
padding: 12px;
color: white;
}
.config-item {
font-size: 0.9rem;
margin-bottom: 8px;
color: #ccc;
}
.config-actions {
display: flex;
flex-direction: column;
gap: 8px;
margin-top: 12px;
}
.load-config-btn, .clear-config-btn {
background: #4CAF50;
border: none;
border-radius: 4px;
color: white;
padding: 8px 12px;
cursor: pointer;
font-size: 0.9rem;
transition: background-color 0.2s ease;
}
.load-config-btn:hover:not(:disabled) {
background: #45a049;
}
.load-config-btn:disabled {
background: #666;
cursor: not-allowed;
}
.clear-config-btn {
background: #f44336;
}
.clear-config-btn:hover:not(:disabled) {
background: #da190b;
}
.clear-config-btn:disabled {
background: #666;
cursor: not-allowed;
}
/* CSV Analysis Page Styles */
.csv-analysis-page {
display: flex;
flex-direction: column;
gap: 16px;
height: 100%;
}
.upload-csv-btn {
background: #424242;
border: none;
border-radius: 8px;
color: white;
padding: 12px 16px;
cursor: pointer;
display: flex;
align-items: center;
justify-content: space-between;
width: 100%;
font-size: 1rem;
flex-shrink: 0;
transition: background-color 0.2s ease;
}
.upload-csv-btn:hover {
background: #4a4a4a;
}
.csv-controls {
background: #424242;
border-radius: 8px;
padding: 12px;
display: flex;
flex-direction: column;
gap: 12px;
}
.control-group {
display: flex;
flex-direction: column;
gap: 4px;
}
.control-group label {
color: #ccc;
font-size: 0.8rem;
font-weight: 500;
}
.control-group select,
.control-group input {
background: #363636;
border: 1px solid #555;
border-radius: 4px;
color: white;
padding: 6px 8px;
font-size: 0.9rem;
width: 100%;
}
.control-group select:focus,
.control-group input:focus {
outline: none;
border-color: #4CAF50;
}
.csv-results {
background: #424242;
border-radius: 8px;
padding: 12px;
max-height: 200px;
overflow-y: auto;
}
.csv-results h4 {
color: white;
margin: 0 0 8px 0;
font-size: 0.9rem;
}
.timestamp-list {
display: flex;
flex-direction: column;
gap: 4px;
}
.timestamp-item {
display: flex;
justify-content: center;
align-items: center;
padding: 4px 8px;
background: #363636;
border-radius: 4px;
cursor: pointer;
transition: background-color 0.2s ease;
}
.timestamp-item:hover {
background: #4a4a4a;
}
.timestamp-value {
color: #ccc;
font-size: 0.8rem;
}
.goto-timestamp-btn {
background: #4CAF50;
border: none;
border-radius: 3px;
color: white;
padding: 2px 6px;
font-size: 0.7rem;
cursor: pointer;
transition: background-color 0.2s ease;
}
.goto-timestamp-btn:hover {
background: #45a049;
}
/* Animations de transition */
.slide-right-enter-active, .slide-right-leave-active,
.slide-left-enter-active, .slide-left-leave-active {
transition: transform 0.3s ease;
}
/* Animation vers la droite */
.slide-right-enter-from {
transform: translateX(100%);
}
.slide-right-leave-to {
transform: translateX(-100%);
}
/* Animation vers la gauche */
.slide-left-enter-from {
transform: translateX(-100%);
}
.slide-left-leave-to {
transform: translateX(100%);
}
</style> |