Skip to content

Commit

Permalink
feat(frontend): various fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
thewander02 committed Oct 18, 2024
1 parent d75825b commit 610c06f
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 35 deletions.
69 changes: 37 additions & 32 deletions apps/frontend/src/components/ui/servers/FileItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,38 +23,43 @@
</span>
</div>
</div>
<ButtonStyled type="transparent">
<OverflowMenu
class="btn-dropdown-animation flex items-center gap-1 rounded-xl bg-transparent px-2 py-1"
:options="[
{
id: 'rename',
action: () => $emit('rename', { name, type, path }),
},
{
id: 'move',
action: () => $emit('move', { name, type, path }),
},
{
id: 'download',
action: () => $emit('download', { name, type, path }),
shown: type !== 'directory',
},
{
id: 'delete',
action: () => $emit('delete', { name, type, path }),
color: 'red',
},
]"
direction="left"
>
<MoreHorizontalIcon class="h-5 w-5 bg-transparent" />
<template #rename> <EditIcon /> Rename </template>
<template #move> <ArrowBigUpDashIcon /> Move </template>
<template #download> <DownloadIcon /> Download </template>
<template #delete> <TrashIcon /> Delete </template>
</OverflowMenu>
</ButtonStyled>
<div class="flex w-fit items-center gap-4">
<span class="w-full text-nowrap text-sm text-secondary">
{{ new Date(modified * 1000).toLocaleString() }}
</span>
<ButtonStyled type="transparent">
<OverflowMenu
class="btn-dropdown-animation flex items-center gap-1 rounded-xl bg-transparent px-2 py-1"
:options="[
{
id: 'rename',
action: () => $emit('rename', { name, type, path }),
},
{
id: 'move',
action: () => $emit('move', { name, type, path }),
},
{
id: 'download',
action: () => $emit('download', { name, type, path }),
shown: type !== 'directory',
},
{
id: 'delete',
action: () => $emit('delete', { name, type, path }),
color: 'red',
},
]"
direction="left"
>
<MoreHorizontalIcon class="h-5 w-5 bg-transparent" />
<template #rename> <EditIcon /> Rename </template>
<template #move> <ArrowBigUpDashIcon /> Move </template>
<template #download> <DownloadIcon /> Download </template>
<template #delete> <TrashIcon /> Delete </template>
</OverflowMenu>
</ButtonStyled>
</div>
</div>
</template>

Expand Down
12 changes: 9 additions & 3 deletions apps/frontend/src/pages/servers/manage/[id]/options.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {
VersionIcon,
CardIcon,
UserIcon,
ListBulletedIcon,
} from "@modrinth/assets";
import type { Server } from "~/composables/pyroServers";
Expand All @@ -33,15 +34,20 @@ const navLinks = [
{ icon: VersionIcon, label: "Network", href: `/servers/manage/${serverId}/options/network` },
{ icon: ListIcon, label: "Properties", href: `/servers/manage/${serverId}/options/properties` },
{
icon: CardIcon,
label: "Billing",
href: `/servers/manage/${serverId}/options/billing`,
icon: ListBulletedIcon,
label: "Minecraft Logs",
href: `/servers/manage/${serverId}/options/logs`,
},
{
icon: UserIcon,
label: "Preferences",
href: `/servers/manage/${serverId}/options/preferences`,
},
{
icon: CardIcon,
label: "Billing",
href: `/servers/manage/${serverId}/options/billing`,
},
{ icon: InfoIcon, label: "Info", href: `/servers/manage/${serverId}/options/info` },
];
</script>
1 change: 1 addition & 0 deletions apps/frontend/src/pages/servers/manage/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@
:loader_version="server.loader_version"
:mc_version="server.mc_version"
:upstream="server.upstream"
:net="server.net"
/>
</ul>
<div v-else class="flex h-full items-center justify-center">
Expand Down

0 comments on commit 610c06f

Please sign in to comment.