You've already forked AstralRinth
forked from didirus/AstralRinth
Fixed permissions issue and modpack issue with environment overhaul
This commit is contained in:
@@ -1,7 +1,13 @@
|
||||
<template>
|
||||
<button
|
||||
class="px-4 py-3 text-left border-0 font-medium border-2 border-button-bg border-solid flex gap-2 transition-all cursor-pointer active:scale-[0.98] hover:bg-button-bg hover:brightness-[--hover-brightness] rounded-xl"
|
||||
:class="selected ? 'text-contrast bg-button-bg' : 'text-primary bg-transparent'"
|
||||
class="px-4 py-3 text-left border-0 font-medium border-2 border-button-bg border-solid flex gap-2 transition-all cursor-pointer rounded-xl"
|
||||
:class="
|
||||
(selected ? 'text-contrast bg-button-bg' : 'text-primary bg-transparent') +
|
||||
(disabled
|
||||
? ' opacity-50'
|
||||
: ' active:scale-[0.98] hover:bg-button-bg hover:brightness-[--hover-brightness]')
|
||||
"
|
||||
:disabled="disabled"
|
||||
@click="emit('select')"
|
||||
>
|
||||
<RadioButtonCheckedIcon v-if="selected" class="text-brand h-5 w-5 shrink-0" />
|
||||
@@ -16,7 +22,13 @@ const emit = defineEmits<{
|
||||
(e: 'select'): void
|
||||
}>()
|
||||
|
||||
defineProps<{
|
||||
selected: boolean
|
||||
}>()
|
||||
withDefaults(
|
||||
defineProps<{
|
||||
selected: boolean
|
||||
disabled?: boolean
|
||||
}>(),
|
||||
{
|
||||
disabled: false,
|
||||
},
|
||||
)
|
||||
</script>
|
||||
|
||||
@@ -9,6 +9,15 @@ const { formatMessage } = useVIntl()
|
||||
|
||||
const value = defineModel<EnvironmentV3 | undefined>({ required: true })
|
||||
|
||||
withDefaults(
|
||||
defineProps<{
|
||||
disabled?: boolean
|
||||
}>(),
|
||||
{
|
||||
disabled: false,
|
||||
},
|
||||
)
|
||||
|
||||
type EnvironmentRadioOption = {
|
||||
title: MessageDescriptor
|
||||
description?: MessageDescriptor
|
||||
@@ -224,6 +233,7 @@ const simulateSave = ref(false)
|
||||
class="!w-full"
|
||||
:class="{ 'mt-2': index > 0 }"
|
||||
:selected="currentOuterOption === key"
|
||||
:disabled="disabled"
|
||||
@select="
|
||||
() => {
|
||||
if (currentOuterOption !== key) {
|
||||
@@ -252,6 +262,7 @@ const simulateSave = ref(false)
|
||||
'opacity-50': currentOuterOption !== key,
|
||||
}"
|
||||
:selected="currentSubOption === suboptionKey"
|
||||
:disabled="disabled"
|
||||
@select="
|
||||
() => {
|
||||
currentOuterOption = key
|
||||
|
||||
@@ -506,6 +506,12 @@
|
||||
"project.settings.members.title": {
|
||||
"defaultMessage": "Members"
|
||||
},
|
||||
"project.settings.notice.no-permission.description": {
|
||||
"defaultMessage": "You don't have permission to edit this."
|
||||
},
|
||||
"project.settings.notice.no-permission.title": {
|
||||
"defaultMessage": "No permission"
|
||||
},
|
||||
"project.settings.tags.title": {
|
||||
"defaultMessage": "Tags"
|
||||
},
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { Project, ProjectV3Partial } from '@modrinth/utils'
|
||||
import type { Project, ProjectV3Partial, TeamMember } from '@modrinth/utils'
|
||||
import type { Ref } from 'vue'
|
||||
|
||||
import { createContext } from '.'
|
||||
@@ -7,6 +7,7 @@ export interface ProjectPageContext {
|
||||
projectV2: Ref<Project>
|
||||
projectV3: Ref<ProjectV3Partial>
|
||||
refreshProject: () => Promise<void>
|
||||
currentMember: Ref<TeamMember>
|
||||
}
|
||||
|
||||
export const [injectProjectPageContext, provideProjectPageContext] =
|
||||
|
||||
@@ -331,6 +331,14 @@ export const commonProjectSettingsMessages = defineMessages({
|
||||
id: 'project.settings.members.title',
|
||||
defaultMessage: 'Members',
|
||||
},
|
||||
noPermissionDescription: {
|
||||
id: 'project.settings.notice.no-permission.description',
|
||||
defaultMessage: `You don't have permission to edit this.`,
|
||||
},
|
||||
noPermissionTitle: {
|
||||
id: 'project.settings.notice.no-permission.title',
|
||||
defaultMessage: 'No permission',
|
||||
},
|
||||
tags: {
|
||||
id: 'project.settings.tags.title',
|
||||
defaultMessage: 'Tags',
|
||||
|
||||
Reference in New Issue
Block a user