Merge branch 'main' into cal/dev-46-servers-scheduling-frontend

This commit is contained in:
Prospector authored and GitHub committed 2025-06-19 08:03:53 -07:00
commit daab8d9235
101 files changed
+1891 -1965

No files matched your search

+1 -1
View File
@@ -39,7 +39,7 @@ tracing-error.workspace = true
paste.workspace = true
tauri = { workspace = true, optional = true }
tauri = { workspace = true, optional = true, features = ["unstable"] }
indicatif = { workspace = true, optional = true }
async-tungstenite = { workspace = true, features = ["tokio-runtime", "tokio-rustls-webpki-roots"] }
@@ -0,0 +1,120 @@
<template>
<div class="flex max-w-lg flex-col items-center rounded-3xl bg-bg-raised p-8 shadow-xl">
<div class="flex flex-col items-center text-center">
<div class="flex flex-col items-center gap-4">
<div class="grid place-content-center rounded-full bg-bg-orange p-4">
<component :is="icon" class="size-12 text-orange" />
</div>
<h1 class="m-0 mb-2 w-fit text-4xl font-bold">{{ title }}</h1>
</div>
<div v-if="!description">
<slot name="description" />
</div>
<p v-else class="text-lg text-secondary">{{ description }}</p>
</div>
<div v-if="errorDetails" class="my-4 w-full rounded-lg border border-divider bg-bg-raised">
<div class="divide-y divide-divider">
<div
v-for="detail in errorDetails.filter((detail) => detail.type !== 'hidden')"
:key="detail.label"
class="px-4 py-3"
>
<div v-if="detail.type === 'inline'" class="flex items-center justify-between">
<span class="font-medium text-secondary">{{ detail.label }}</span>
<div class="flex items-center gap-2">
<code class="rounded-lg bg-code-bg px-2 py-1 text-sm text-code-text">
{{ detail.value }}
</code>
</div>
</div>
<div v-else-if="detail.type === 'block'" class="flex flex-col gap-2">
<div class="flex items-center justify-between">
<span class="font-medium text-secondary">{{ detail.label }}</span>
</div>
<div class="w-full overflow-hidden rounded-lg bg-code-bg p-3">
<code
class="block w-full overflow-x-auto break-words text-sm text-code-text whitespace-pre-wrap"
>
{{ detail.value }}
</code>
</div>
</div>
</div>
</div>
</div>
<div class="mt-4 flex !w-full flex-row gap-4">
<ButtonStyled
v-if="action"
size="large"
:color="action.color || 'brand'"
:disabled="action.disabled"
@click="action.onClick"
>
<button class="!w-full">
<component :is="action.icon" v-if="action.icon && !action.showAltIcon" class="size-4" />
<component
:is="action.altIcon"
v-else-if="action.icon && action.showAltIcon"
class="size-4"
/>
{{ action.label }}
</button>
</ButtonStyled>
<ButtonStyled v-if="errorDetails" size="large" color="standard" @click="copyErrorInformation">
<button class="!w-full">
<CopyIcon v-if="!infoCopied" class="size-4" />
<CheckIcon v-else class="size-4" />
Copy Information
</button>
</ButtonStyled>
</div>
</div>
</template>
<script setup lang="ts">
import { ref } from 'vue'
import ButtonStyled from './ButtonStyled.vue'
import { CopyIcon, CheckIcon } from '@modrinth/assets'
import type { Component } from 'vue'
const infoCopied = ref(false)
const props = defineProps<{
title: string
description?: string
icon: Component
errorDetails?: {
label?: string
value?: string
type?: 'inline' | 'block' | 'hidden'
}[]
action?: {
label: string
onClick: () => void
color?: 'brand' | 'standard' | 'red' | 'orange' | 'blue'
disabled?: boolean
icon?: Component
altIcon?: Component
showAltIcon?: boolean
}
}>()
const copyErrorInformation = async () => {
if (!props.errorDetails || props.errorDetails.length === 0) return
const formattedErrorInfo = props.errorDetails
.filter((detail) => detail.label && detail.value)
.map((detail) => `${detail.label}: ${detail.value}`)
.join('\n\n')
await navigator.clipboard.writeText(formattedErrorInfo)
infoCopied.value = true
setTimeout(() => {
infoCopied.value = false
}, 2000)
}
</script>
+1
View File
@@ -16,6 +16,7 @@ export { default as DoubleIcon } from './base/DoubleIcon.vue'
export { default as DropArea } from './base/DropArea.vue'
export { default as DropdownSelect } from './base/DropdownSelect.vue'
export { default as EnvironmentIndicator } from './base/EnvironmentIndicator.vue'
export { default as ErrorInformationCard } from './base/ErrorInformationCard.vue'
export { default as FileInput } from './base/FileInput.vue'
export { default as FilterBar } from './base/FilterBar.vue'
export type { FilterBarOption } from './base/FilterBar.vue'
+26 -5
View File
@@ -11,7 +11,28 @@ export type VersionEntry = {
const VERSIONS: VersionEntry[] = [
{
date: `2025-06-14T10:50:00-07:00`,
date: `2025-06-16T11:00:00-07:00`,
product: 'web',
body: `### Improvements
- Rolled out hotfixes with the previous days' updates.
- Failed subscriptions can now be cancelled.`,
},
{
date: `2025-06-16T11:00:00-07:00`,
product: 'servers',
body: `### Improvements
- Improved error handling.
- Rolled out hotfixes with the previous days' updates.'`,
},
{
date: `2025-06-15T16:25:00-07:00`,
product: 'servers',
body: `### Improvements
- Fixed installing modpacks from search.
- Fixed setting subdomains.`,
},
{
date: `2025-06-15T14:30:00-07:00`,
product: 'servers',
body: `### Improvements
- Fixed various issues with the panel loading improperly in certain cases.
@@ -19,13 +40,13 @@ const VERSIONS: VersionEntry[] = [
- Server panel performance should be a little faster now.`,
},
{
date: `2025-06-14T10:50:00-07:00`,
date: `2025-06-15T14:30:00-07:00`,
product: 'web',
body: `### Improvements
- Creator analytics charts will now show up to 15 projects in a tooltip instead of 5. (Contributed by [Erb3](https://github.com/modrinth/code/pull/2898))
- Made certain scrollable containers not have a fixed height, and allow them to be smaller if they have fewer items.
- Creator analytics charts will now show up to 15 projects in a tooltip instead of 5.
- Made certain scrollable containers not have a fixed height, and allow them to be smaller if they have fewer items. (Contributed by [Erb3](https://github.com/modrinth/code/pull/2898))
- Made organizations sort consistently alphabetically. (Contributed by [WorldWidePixel](https://github.com/modrinth/code/pull/3755))
- Clarified the 'File too large' error message when uploading an image larger than 1MiB in the text editor.`,
- Clarified the 'File too large' error message when uploading an image larger than 1MiB in the text editor. (Contributed by [IThundxr](https://github.com/modrinth/code/pull/3774))`,
},
{
date: `2025-06-03T14:35:00-07:00`,
@@ -54,6 +54,6 @@ export class ModrinthServerError extends Error {
}
super(errorMessage)
this.name = 'PyroServersFetchError'
this.name = 'ModrinthServersFetchError'
}
}
@@ -5,6 +5,6 @@ export class ModrinthServersFetchError extends Error {
public originalError?: Error,
) {
super(message)
this.name = 'PyroFetchError'
this.name = 'ModrinthFetchError'
}
}