fix: misc issues in app & website (#5512)
* fix: debug info copy button overflowing badly * fix: updating instance's disabled mods re-enables them * fix: modpack update enables previous disabled mods * fix: add more languages #5508
This commit is contained in:
@@ -10,6 +10,7 @@ import {
|
||||
import { Admonition, ButtonStyled, Collapsible, NewModal } from '@modrinth/ui'
|
||||
import { computed, ref } from 'vue'
|
||||
|
||||
import { hide_ads_window, show_ads_window } from '@/helpers/ads.js'
|
||||
import { login as login_flow, set_default_user } from '@/helpers/auth.js'
|
||||
import { handleSevereError } from '@/store/error.js'
|
||||
|
||||
@@ -28,13 +29,19 @@ function show(errorVal: { message?: string }) {
|
||||
matchedError.value = minecraftAuthErrors.find((e) => rawError.value.includes(e.errorCode)) ?? null
|
||||
|
||||
debugCollapsed.value = true
|
||||
hide_ads_window()
|
||||
modal.value?.show()
|
||||
}
|
||||
|
||||
function hide() {
|
||||
onModalHide()
|
||||
modal.value?.hide()
|
||||
}
|
||||
|
||||
function onModalHide() {
|
||||
show_ads_window()
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
show,
|
||||
hide,
|
||||
@@ -67,7 +74,7 @@ async function copyToClipboard(text: string) {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<NewModal ref="modal" header="Sign in Failed" :max-width="'548px'">
|
||||
<NewModal ref="modal" header="Sign in Failed" :max-width="'548px'" @hide="onModalHide">
|
||||
<div class="flex flex-col gap-6">
|
||||
<Admonition
|
||||
type="warning"
|
||||
@@ -161,8 +168,12 @@ async function copyToClipboard(text: string) {
|
||||
/>
|
||||
</button>
|
||||
<Collapsible :collapsed="debugCollapsed">
|
||||
<div class="p-3 bg-surface-2 rounded-2xl text-xs flex items-start">
|
||||
<div class="m-0 p-0 rounded-none bg-transparent text-sm font-mono">
|
||||
<div
|
||||
class="p-3 bg-surface-2 rounded-2xl text-xs grid grid-cols-[1fr_auto] max-w-full items-start"
|
||||
>
|
||||
<div
|
||||
class="m-0 p-0 rounded-none bg-transparent text-sm font-mono break-words overflow-auto"
|
||||
>
|
||||
{{ debugInfo }}
|
||||
</div>
|
||||
<ButtonStyled circular>
|
||||
|
||||
@@ -166,6 +166,8 @@ import {
|
||||
injectModrinthClient,
|
||||
injectNotificationManager,
|
||||
injectProjectPageContext,
|
||||
SERVER_LANGUAGES,
|
||||
SERVER_REGIONS,
|
||||
StyledInput,
|
||||
UnsavedChangesPopup,
|
||||
} from '@modrinth/ui'
|
||||
@@ -262,58 +264,15 @@ if (projectV3.value) {
|
||||
)
|
||||
}
|
||||
|
||||
const regionOptions = [
|
||||
{ value: 'us_east', label: 'US East' },
|
||||
{ value: 'us_west', label: 'US West' },
|
||||
{ value: 'europe', label: 'Europe' },
|
||||
{ value: 'asia', label: 'Asia' },
|
||||
{ value: 'australia', label: 'Australia' },
|
||||
{ value: 'south_america', label: 'South America' },
|
||||
{ value: 'middle_east', label: 'Middle East' },
|
||||
{ value: 'russia', label: 'Russia' },
|
||||
]
|
||||
const regionOptions = SERVER_REGIONS.map((region) => ({
|
||||
value: region.code,
|
||||
label: region.name,
|
||||
}))
|
||||
|
||||
const languageOptions = [
|
||||
{ value: 'en', label: 'English' },
|
||||
{ value: 'es', label: 'Spanish' },
|
||||
{ value: 'pt', label: 'Portuguese' },
|
||||
{ value: 'fr', label: 'French' },
|
||||
{ value: 'de', label: 'German' },
|
||||
{ value: 'it', label: 'Italian' },
|
||||
{ value: 'nl', label: 'Dutch' },
|
||||
{ value: 'ru', label: 'Russian' },
|
||||
{ value: 'uk', label: 'Ukrainian' },
|
||||
{ value: 'pl', label: 'Polish' },
|
||||
{ value: 'cs', label: 'Czech' },
|
||||
{ value: 'sk', label: 'Slovak' },
|
||||
{ value: 'hu', label: 'Hungarian' },
|
||||
{ value: 'ro', label: 'Romanian' },
|
||||
{ value: 'bg', label: 'Bulgarian' },
|
||||
{ value: 'hr', label: 'Croatian' },
|
||||
{ value: 'sr', label: 'Serbian' },
|
||||
{ value: 'el', label: 'Greek' },
|
||||
{ value: 'tr', label: 'Turkish' },
|
||||
{ value: 'ar', label: 'Arabic' },
|
||||
{ value: 'he', label: 'Hebrew' },
|
||||
{ value: 'hi', label: 'Hindi' },
|
||||
{ value: 'bn', label: 'Bengali' },
|
||||
{ value: 'ur', label: 'Urdu' },
|
||||
{ value: 'zh', label: 'Chinese' },
|
||||
{ value: 'ja', label: 'Japanese' },
|
||||
{ value: 'ko', label: 'Korean' },
|
||||
{ value: 'th', label: 'Thai' },
|
||||
{ value: 'vi', label: 'Vietnamese' },
|
||||
{ value: 'id', label: 'Indonesian' },
|
||||
{ value: 'ms', label: 'Malay' },
|
||||
{ value: 'tl', label: 'Filipino' },
|
||||
{ value: 'sv', label: 'Swedish' },
|
||||
{ value: 'no', label: 'Norwegian' },
|
||||
{ value: 'da', label: 'Danish' },
|
||||
{ value: 'fi', label: 'Finnish' },
|
||||
{ value: 'lt', label: 'Lithuanian' },
|
||||
{ value: 'lv', label: 'Latvian' },
|
||||
{ value: 'et', label: 'Estonian' },
|
||||
]
|
||||
const languageOptions = SERVER_LANGUAGES.map((language) => ({
|
||||
value: language.code,
|
||||
label: language.name,
|
||||
}))
|
||||
|
||||
const javaServerPatchData = computed(() => {
|
||||
const addressChanged =
|
||||
|
||||
@@ -72,6 +72,40 @@ pub enum Language {
|
||||
Lt,
|
||||
Lv,
|
||||
Et,
|
||||
Af,
|
||||
Am,
|
||||
Az,
|
||||
Be,
|
||||
Bs,
|
||||
Ca,
|
||||
Eo,
|
||||
Eu,
|
||||
Fa,
|
||||
Ga,
|
||||
Gl,
|
||||
Hy,
|
||||
Is,
|
||||
Ka,
|
||||
Kk,
|
||||
Km,
|
||||
Kn,
|
||||
Lo,
|
||||
Mk,
|
||||
Ml,
|
||||
Mn,
|
||||
Mr,
|
||||
My,
|
||||
Ne,
|
||||
Pa,
|
||||
Si,
|
||||
Sl,
|
||||
Sq,
|
||||
Sw,
|
||||
Ta,
|
||||
Te,
|
||||
Uz,
|
||||
Yo,
|
||||
Zu,
|
||||
}
|
||||
|
||||
component::define! {
|
||||
|
||||
Reference in New Issue
Block a user