Skip to content
Closed
2 changes: 1 addition & 1 deletion apps/app-frontend/src/components/ui/WindowControls.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<IconButton
type="quiet"
label="Close window"
class="relative expanded-button close-button"
class="relative expanded-button close-button hover:!bg-red focus-visible:!bg-red hover:!text-[var(--color-accent-contrast)]"
@click="handleClose"
>
<XIcon />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,7 @@ onUnmounted(() => {
<style scoped lang="scss">
.grid-when-huge {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(670px, 1fr));
grid-template-columns: repeat(auto-fill, minmax(min(670px, 100%), 1fr));
}

.jump-back-in-item {
Expand Down
27 changes: 17 additions & 10 deletions apps/app-frontend/src/components/ui/world/WorldItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -492,8 +492,8 @@ function openContextMenu(event: MouseEvent) {
no-shadow
class="!rounded-[14px]"
/>
<div class="flex flex-col justify-center gap-0.5 h-full">
<div class="flex items-center gap-1.5">
<div class="flex flex-col justify-center gap-0.5 h-full min-w-0">
<div class="flex items-center gap-1.5 min-w-0">
<div class="text-base text-contrast font-semibold truncate">
{{ getWorldDisplayName(world) }}
</div>
Expand Down Expand Up @@ -527,7 +527,7 @@ function openContextMenu(event: MouseEvent) {
</div>
<div
v-else-if="world.type === 'server'"
class="text-sm text-secondary flex items-center gap-1 font-semibold flex-nowrap whitespace-nowrap"
class="text-sm text-secondary flex items-center gap-1 font-semibold flex-nowrap whitespace-nowrap min-w-0 truncate"
>
<template v-if="refreshing">
<SpinnerIcon aria-hidden="true" class="animate-spin shrink-0" />
Expand All @@ -548,9 +548,9 @@ function openContextMenu(event: MouseEvent) {
stroke-width="3px"
class="shrink-0 smart-clickable:allow-pointer-events"
/>
<Tooltip :disabled="!hasPlayersTooltip">
<Tooltip :disabled="!hasPlayersTooltip" class="min-w-0 truncate">
<span
class="smart-clickable:allow-pointer-events"
class="smart-clickable:allow-pointer-events min-w-0 truncate"
:class="{ 'cursor-help': hasPlayersTooltip }"
>
{{
Expand All @@ -571,15 +571,15 @@ function openContextMenu(event: MouseEvent) {
</template>
<template v-else>
<NoSignalIcon aria-hidden="true" stroke-width="3px" class="shrink-0" />
{{ formatMessage(messages.offline) }}
<span class="truncate">{{ formatMessage(messages.offline) }}</span>
</template>
</div>
</div>
<div class="flex items-center gap-1.5 text-sm text-secondary">
<div class="flex items-center gap-1.5 text-sm text-secondary min-w-0">
<template v-if="instanceId">
<router-link
data-no-card-click
class="flex items-center gap-1 truncate hover:underline text-secondary smart-clickable:allow-pointer-events"
class="flex items-center gap-1 truncate hover:underline text-secondary smart-clickable:allow-pointer-events min-w-0"
:to="`/instance/${instanceId}`"
>
<Avatar
Expand Down Expand Up @@ -622,10 +622,16 @@ function openContextMenu(event: MouseEvent) {
class="motd-renderer font-normal font-minecraft line-clamp-2 text-secondary leading-5"
v-html="renderedMotd"
/>
<div v-else-if="!serverStatus" class="font-normal font-minecraft text-red leading-5">
<div
v-else-if="!serverStatus"
class="font-normal font-minecraft text-red leading-5 truncate max-w-full"
>
{{ formatMessage(messages.cantConnect) }}
</div>
<div v-else class="font-normal font-minecraft text-secondary leading-5">
<div
v-else
class="font-normal font-minecraft text-secondary leading-5 truncate max-w-full"
>
{{ formatMessage(messages.aMinecraftServer) }}
</div>
</template>
Expand Down Expand Up @@ -675,6 +681,7 @@ function openContextMenu(event: MouseEvent) {
<ContextMenu ref="cardOptions" :label="formatMessage(messages.worldActions)" />
</div>
</template>

<style scoped lang="scss">
.clickable-card:has([data-no-card-click]:hover) {
--hover-brightness: 1;
Expand Down
8 changes: 8 additions & 0 deletions packages/ui/src/composables/i18n-debug.ts
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,14 @@ function setupKeyTooltip() {

function registerKeyboardShortcuts(panelOpen: Ref<boolean>, keyReveal: Ref<boolean>) {
useEventListener(document, 'keydown', (e: KeyboardEvent) => {
// Prevent the browser/app print dialog from opening with Ctrl+P / Cmd+P
if (e.ctrlKey || e.metaKey) {
if (e.code === 'KeyP') {
e.preventDefault()
return
}
}

// Use Cmd on macOS, Ctrl on other platforms
const mod = e.metaKey || e.ctrlKey
if (!mod || !e.shiftKey) return
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/locales/fr-FR/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -759,7 +759,7 @@
"defaultMessage": "Nom (A-Z)"
},
"content.page-layout.sort.alphabetical-descending": {
"defaultMessage": "Nom (A-Z)"
"defaultMessage": "Nom (Z-A)"
},
"content.page-layout.sort.date-added-newest": {
"defaultMessage": "Plus récent en premier"
Expand Down