changement de vocabulaire
This commit is contained in:
@ -34,14 +34,14 @@ export function NavigationConsole({ isOpen, onClose }: NavigationConsoleProps) {
|
|||||||
if (input.trim() === '') {
|
if (input.trim() === '') {
|
||||||
setFilteredSpaces(existingSpaces.slice(0, 8))
|
setFilteredSpaces(existingSpaces.slice(0, 8))
|
||||||
} else {
|
} else {
|
||||||
const filtered = existingSpaces.filter(space =>
|
const filtered = existingSpaces.filter(space =>
|
||||||
space.toLowerCase().includes(input.toLowerCase())
|
space.toLowerCase().includes(input.toLowerCase())
|
||||||
).slice(0, 8)
|
).slice(0, 8)
|
||||||
|
|
||||||
if (filtered.length === 0 || !filtered.includes(input)) {
|
if (filtered.length === 0 || !filtered.includes(input)) {
|
||||||
filtered.unshift(input)
|
filtered.unshift(input)
|
||||||
}
|
}
|
||||||
|
|
||||||
setFilteredSpaces(filtered)
|
setFilteredSpaces(filtered)
|
||||||
}
|
}
|
||||||
setSelectedIndex(0)
|
setSelectedIndex(0)
|
||||||
@ -88,7 +88,7 @@ export function NavigationConsole({ isOpen, onClose }: NavigationConsoleProps) {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div
|
<div
|
||||||
style={{
|
style={{
|
||||||
position: 'fixed',
|
position: 'fixed',
|
||||||
top: 0,
|
top: 0,
|
||||||
@ -121,7 +121,7 @@ export function NavigationConsole({ isOpen, onClose }: NavigationConsoleProps) {
|
|||||||
value={input}
|
value={input}
|
||||||
onChange={(e) => setInput(e.target.value)}
|
onChange={(e) => setInput(e.target.value)}
|
||||||
onKeyDown={handleKeyDown}
|
onKeyDown={handleKeyDown}
|
||||||
placeholder="Nom de l'espace ou URL..."
|
placeholder="Name a space"
|
||||||
style={{
|
style={{
|
||||||
width: '100%',
|
width: '100%',
|
||||||
background: 'transparent',
|
background: 'transparent',
|
||||||
@ -139,7 +139,7 @@ export function NavigationConsole({ isOpen, onClose }: NavigationConsoleProps) {
|
|||||||
const isExisting = existingSpaces.includes(space)
|
const isExisting = existingSpaces.includes(space)
|
||||||
const isSelected = index === selectedIndex
|
const isSelected = index === selectedIndex
|
||||||
const isUrl = space.startsWith('http://') || space.startsWith('https://')
|
const isUrl = space.startsWith('http://') || space.startsWith('https://')
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
key={space}
|
key={space}
|
||||||
@ -166,4 +166,4 @@ export function NavigationConsole({ isOpen, onClose }: NavigationConsoleProps) {
|
|||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user