Spaces:
Running
Running
File size: 7,197 Bytes
2964111 |
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 |
<template>
<div>
<button @click="showModal = true" class="shortcuts-btn">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<rect x="2" y="3" width="20" height="14" rx="2" ry="2"/>
<line x1="8" y1="21" x2="16" y2="21"/>
<line x1="12" y1="17" x2="12" y2="21"/>
</svg>
Shortcuts
</button>
<div v-if="showModal" class="modal-overlay" @click="showModal = false">
<div class="modal-content" @click.stop>
<div class="modal-header">
<h2>Guide d'utilisation</h2>
<button class="close-btn" @click="showModal = false">×</button>
</div>
<div class="shortcuts-content">
<div class="shortcuts-section">
<h3>Points de calibration</h3>
<div class="shortcut-item">
<span class="key">Clic gauche</span>
<span class="description">Placer un point (sélectionner d'abord un point sur le terrain)</span>
</div>
<div class="shortcut-item">
<span class="key">Glisser</span>
<span class="description">Déplacer un point existant</span>
</div>
</div>
<div class="shortcuts-section">
<h3>Lignes de calibration</h3>
<div class="shortcut-item">
<span class="key">Clic gauche</span>
<span class="description">Ajouter un point à la ligne (sélectionner d'abord une ligne sur le terrain)</span>
</div>
<div class="shortcut-item">
<span class="key">Clic droit</span>
<span class="description">Terminer la ligne (minimum 2 points)</span>
</div>
<div class="shortcut-item">
<span class="key">Ctrl + Clic</span>
<span class="description">Utiliser un point d'intersection existant</span>
</div>
</div>
<div class="shortcuts-section">
<h3>Navigation</h3>
<div class="shortcut-item">
<span class="key">Molette</span>
<span class="description">Zoomer/Dézoomer (1x à 15x)</span>
</div>
<div class="shortcut-item">
<span class="key">Clic molette + Glisser</span>
<span class="description">Déplacer l'image</span>
</div>
</div>
<div class="shortcuts-section">
<h3>Édition</h3>
<div class="shortcut-item">
<span class="key">Delete / Backspace</span>
<span class="description">Supprimer la ligne sélectionnée</span>
</div>
<div class="shortcut-item">
<span class="key">Clear</span>
<span class="description">Effacer toute la calibration</span>
</div>
</div>
<div class="shortcuts-section">
<h3>Workflow</h3>
<div class="shortcut-item">
<span class="step">1.</span>
<span class="description">Sélectionner un élément sur le terrain de football (point ou ligne)</span>
</div>
<div class="shortcut-item">
<span class="step">2.</span>
<span class="description">Placer/Dessiner l'élément correspondant sur l'image</span>
</div>
<div class="shortcut-item">
<span class="step">3.</span>
<span class="description">Répéter pour tous les éléments nécessaires</span>
</div>
<div class="shortcut-item">
<span class="step">4.</span>
<span class="description">Cliquer sur "Traiter la calibration"</span>
</div>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
export default {
name: 'KeyboardShortcuts',
data() {
return {
showModal: false
}
}
}
</script>
<style scoped>
.shortcuts-btn {
background: rgba(255, 255, 255, 0.1);
color: #888;
border: 1px solid rgba(255, 255, 255, 0.2);
border-radius: 6px;
padding: 8px 12px;
cursor: pointer;
display: flex;
align-items: center;
gap: 6px;
transition: all 0.3s ease;
font-size: 0.85rem;
backdrop-filter: blur(10px);
}
.shortcuts-btn:hover {
background: rgba(255, 255, 255, 0.15);
color: var(--color-primary);
border-color: var(--color-primary);
}
.shortcuts-btn svg {
transition: all 0.3s ease;
}
.modal-overlay {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.7);
display: flex;
justify-content: center;
align-items: center;
z-index: 2000;
backdrop-filter: blur(5px);
}
.modal-content {
background-color: #1a1a1a;
border: 1px solid #333;
border-radius: 12px;
width: 90%;
max-width: 700px;
max-height: 85vh;
overflow-y: auto;
color: white;
box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}
.modal-header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 20px 24px;
border-bottom: 1px solid #333;
background: #2a2a2a;
border-radius: 12px 12px 0 0;
}
.modal-header h2 {
margin: 0;
font-size: 1.5rem;
color: var(--color-primary);
}
.close-btn {
background: none;
border: none;
color: #888;
font-size: 1.8rem;
cursor: pointer;
padding: 0 8px;
transition: color 0.3s ease;
line-height: 1;
}
.close-btn:hover {
color: var(--color-primary);
}
.shortcuts-content {
padding: 24px;
}
.shortcuts-section {
margin-bottom: 32px;
}
.shortcuts-section:last-child {
margin-bottom: 0;
}
.shortcuts-section h3 {
color: var(--color-primary);
margin-bottom: 16px;
font-size: 1.1rem;
font-weight: 600;
border-bottom: 1px solid #333;
padding-bottom: 8px;
}
.shortcut-item {
display: flex;
justify-content: space-between;
align-items: center;
padding: 12px 0;
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.shortcut-item:last-child {
border-bottom: none;
}
.key {
background-color: #333;
color: var(--color-primary);
padding: 6px 12px;
border-radius: 6px;
font-family: monospace;
font-size: 0.85rem;
font-weight: 600;
min-width: 120px;
text-align: center;
border: 1px solid #444;
}
.step {
background-color: var(--color-primary);
color: var(--color-secondary);
padding: 6px 12px;
border-radius: 50%;
font-family: monospace;
font-size: 0.85rem;
font-weight: 700;
min-width: 30px;
text-align: center;
margin-right: 10px;
}
.description {
color: #ccc;
flex: 1;
margin-left: 16px;
line-height: 1.4;
}
/* Scrollbar styling */
.modal-content::-webkit-scrollbar {
width: 8px;
}
.modal-content::-webkit-scrollbar-track {
background: #2a2a2a;
}
.modal-content::-webkit-scrollbar-thumb {
background: #555;
border-radius: 4px;
}
.modal-content::-webkit-scrollbar-thumb:hover {
background: #666;
}
</style> |