feat: remove project editing has moved helper banner (#5583)
* feat: remove project editing moved helper banner * pnpm prepr
This commit is contained in:
@@ -193,35 +193,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<Admonition v-if="!hideGalleryAdmonition && currentMember" type="info" class="mb-4">
|
||||
Creating and editing gallery images can now be done directly from the
|
||||
<NuxtLink to="settings/gallery" class="font-medium text-blue hover:underline"
|
||||
>project settings</NuxtLink
|
||||
>.
|
||||
<template #actions>
|
||||
<div class="flex gap-2">
|
||||
<ButtonStyled color="blue">
|
||||
<button
|
||||
aria-label="Project Settings"
|
||||
class="!shadow-none"
|
||||
@click="() => router.push('settings/gallery')"
|
||||
>
|
||||
<SettingsIcon />
|
||||
Edit gallery
|
||||
</button>
|
||||
</ButtonStyled>
|
||||
<ButtonStyled type="transparent">
|
||||
<button
|
||||
aria-label="Dismiss"
|
||||
class="!shadow-none"
|
||||
@click="() => (hideGalleryAdmonition = true)"
|
||||
>
|
||||
Dismiss
|
||||
</button>
|
||||
</ButtonStyled>
|
||||
</div>
|
||||
</template>
|
||||
</Admonition>
|
||||
|
||||
<div v-if="currentMember && filteredGallery.length" class="card header-buttons">
|
||||
<FileInput
|
||||
:max-size="5242880"
|
||||
@@ -325,7 +297,6 @@ import {
|
||||
PlusIcon,
|
||||
RightArrowIcon,
|
||||
SaveIcon,
|
||||
SettingsIcon,
|
||||
StarIcon,
|
||||
TransferIcon,
|
||||
TrashIcon,
|
||||
@@ -333,8 +304,6 @@ import {
|
||||
XIcon,
|
||||
} from '@modrinth/assets'
|
||||
import {
|
||||
Admonition,
|
||||
ButtonStyled,
|
||||
ConfirmModal,
|
||||
DropArea,
|
||||
FileInput,
|
||||
@@ -343,7 +312,7 @@ import {
|
||||
StyledInput,
|
||||
useFormatDateTime,
|
||||
} from '@modrinth/ui'
|
||||
import { useEventListener, useLocalStorage } from '@vueuse/core'
|
||||
import { useEventListener } from '@vueuse/core'
|
||||
|
||||
import { isPermission } from '~/utils/permissions.ts'
|
||||
|
||||
@@ -353,9 +322,6 @@ const formatDate = useFormatDateTime({
|
||||
day: 'numeric',
|
||||
})
|
||||
|
||||
// Router
|
||||
const router = useRouter()
|
||||
|
||||
// Single DI injection
|
||||
const {
|
||||
projectV2: project,
|
||||
@@ -382,12 +348,6 @@ useSeoMeta({
|
||||
ogDescription: description,
|
||||
})
|
||||
|
||||
// Local storage state
|
||||
const hideGalleryAdmonition = useLocalStorage(
|
||||
'hideGalleryHasMovedAdmonition',
|
||||
!project.value.gallery?.length,
|
||||
)
|
||||
|
||||
// Gallery item type matching actual v2 API response (LegacyGalleryItem in labrinth)
|
||||
// raw_url is optional in TS types but present in API response
|
||||
interface GalleryItem {
|
||||
|
||||
@@ -25,36 +25,6 @@
|
||||
@proceed="deleteVersion()"
|
||||
/>
|
||||
|
||||
<Admonition v-if="!hideVersionsAdmonition && currentMember" type="info" class="mb-4">
|
||||
Creating and editing project versions can now be done directly from the
|
||||
<NuxtLink to="settings/versions" class="font-medium text-blue hover:underline"
|
||||
>project settings</NuxtLink
|
||||
>.
|
||||
<template #actions>
|
||||
<div class="flex gap-2">
|
||||
<ButtonStyled color="blue">
|
||||
<button
|
||||
aria-label="Project Settings"
|
||||
class="!shadow-none"
|
||||
@click="() => router.push('settings/versions')"
|
||||
>
|
||||
<SettingsIcon />
|
||||
Edit versions
|
||||
</button>
|
||||
</ButtonStyled>
|
||||
<ButtonStyled type="transparent">
|
||||
<button
|
||||
aria-label="Dismiss"
|
||||
class="!shadow-none"
|
||||
@click="() => (hideVersionsAdmonition = true)"
|
||||
>
|
||||
Dismiss
|
||||
</button>
|
||||
</ButtonStyled>
|
||||
</div>
|
||||
</template>
|
||||
</Admonition>
|
||||
|
||||
<ProjectPageVersions
|
||||
v-if="versions?.length"
|
||||
:project="project"
|
||||
@@ -283,13 +253,11 @@ import {
|
||||
LinkIcon,
|
||||
MoreVerticalIcon,
|
||||
ReportIcon,
|
||||
SettingsIcon,
|
||||
ShareIcon,
|
||||
SpinnerIcon,
|
||||
TrashIcon,
|
||||
} from '@modrinth/assets'
|
||||
import {
|
||||
Admonition,
|
||||
ButtonStyled,
|
||||
ConfirmModal,
|
||||
injectModrinthClient,
|
||||
@@ -298,7 +266,6 @@ import {
|
||||
OverflowMenu,
|
||||
ProjectPageVersions,
|
||||
} from '@modrinth/ui'
|
||||
import { useLocalStorage } from '@vueuse/core'
|
||||
import { onMounted, useTemplateRef } from 'vue'
|
||||
|
||||
import CreateProjectVersionModal from '~/components/ui/create-project-version/CreateProjectVersionModal.vue'
|
||||
@@ -338,15 +305,8 @@ const handleOpenEditVersionModal = (versionId, projectId, stageId) => {
|
||||
createProjectVersionModal.value?.openEditVersionModal(versionId, projectId, stageId)
|
||||
}
|
||||
|
||||
const hideVersionsAdmonition = useLocalStorage(
|
||||
'hideVersionsHasMovedAdmonition',
|
||||
!versions.value?.length,
|
||||
)
|
||||
|
||||
const emit = defineEmits(['onDownload', 'deleteVersion'])
|
||||
|
||||
const router = useNativeRouter()
|
||||
|
||||
const baseDropdownId = useId()
|
||||
|
||||
function getPrimaryFile(version) {
|
||||
|
||||
Reference in New Issue
Block a user