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>
|
</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">
|
<div v-if="currentMember && filteredGallery.length" class="card header-buttons">
|
||||||
<FileInput
|
<FileInput
|
||||||
:max-size="5242880"
|
:max-size="5242880"
|
||||||
@@ -325,7 +297,6 @@ import {
|
|||||||
PlusIcon,
|
PlusIcon,
|
||||||
RightArrowIcon,
|
RightArrowIcon,
|
||||||
SaveIcon,
|
SaveIcon,
|
||||||
SettingsIcon,
|
|
||||||
StarIcon,
|
StarIcon,
|
||||||
TransferIcon,
|
TransferIcon,
|
||||||
TrashIcon,
|
TrashIcon,
|
||||||
@@ -333,8 +304,6 @@ import {
|
|||||||
XIcon,
|
XIcon,
|
||||||
} from '@modrinth/assets'
|
} from '@modrinth/assets'
|
||||||
import {
|
import {
|
||||||
Admonition,
|
|
||||||
ButtonStyled,
|
|
||||||
ConfirmModal,
|
ConfirmModal,
|
||||||
DropArea,
|
DropArea,
|
||||||
FileInput,
|
FileInput,
|
||||||
@@ -343,7 +312,7 @@ import {
|
|||||||
StyledInput,
|
StyledInput,
|
||||||
useFormatDateTime,
|
useFormatDateTime,
|
||||||
} from '@modrinth/ui'
|
} from '@modrinth/ui'
|
||||||
import { useEventListener, useLocalStorage } from '@vueuse/core'
|
import { useEventListener } from '@vueuse/core'
|
||||||
|
|
||||||
import { isPermission } from '~/utils/permissions.ts'
|
import { isPermission } from '~/utils/permissions.ts'
|
||||||
|
|
||||||
@@ -353,9 +322,6 @@ const formatDate = useFormatDateTime({
|
|||||||
day: 'numeric',
|
day: 'numeric',
|
||||||
})
|
})
|
||||||
|
|
||||||
// Router
|
|
||||||
const router = useRouter()
|
|
||||||
|
|
||||||
// Single DI injection
|
// Single DI injection
|
||||||
const {
|
const {
|
||||||
projectV2: project,
|
projectV2: project,
|
||||||
@@ -382,12 +348,6 @@ useSeoMeta({
|
|||||||
ogDescription: description,
|
ogDescription: description,
|
||||||
})
|
})
|
||||||
|
|
||||||
// Local storage state
|
|
||||||
const hideGalleryAdmonition = useLocalStorage(
|
|
||||||
'hideGalleryHasMovedAdmonition',
|
|
||||||
!project.value.gallery?.length,
|
|
||||||
)
|
|
||||||
|
|
||||||
// Gallery item type matching actual v2 API response (LegacyGalleryItem in labrinth)
|
// Gallery item type matching actual v2 API response (LegacyGalleryItem in labrinth)
|
||||||
// raw_url is optional in TS types but present in API response
|
// raw_url is optional in TS types but present in API response
|
||||||
interface GalleryItem {
|
interface GalleryItem {
|
||||||
|
|||||||
@@ -25,36 +25,6 @@
|
|||||||
@proceed="deleteVersion()"
|
@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
|
<ProjectPageVersions
|
||||||
v-if="versions?.length"
|
v-if="versions?.length"
|
||||||
:project="project"
|
:project="project"
|
||||||
@@ -283,13 +253,11 @@ import {
|
|||||||
LinkIcon,
|
LinkIcon,
|
||||||
MoreVerticalIcon,
|
MoreVerticalIcon,
|
||||||
ReportIcon,
|
ReportIcon,
|
||||||
SettingsIcon,
|
|
||||||
ShareIcon,
|
ShareIcon,
|
||||||
SpinnerIcon,
|
SpinnerIcon,
|
||||||
TrashIcon,
|
TrashIcon,
|
||||||
} from '@modrinth/assets'
|
} from '@modrinth/assets'
|
||||||
import {
|
import {
|
||||||
Admonition,
|
|
||||||
ButtonStyled,
|
ButtonStyled,
|
||||||
ConfirmModal,
|
ConfirmModal,
|
||||||
injectModrinthClient,
|
injectModrinthClient,
|
||||||
@@ -298,7 +266,6 @@ import {
|
|||||||
OverflowMenu,
|
OverflowMenu,
|
||||||
ProjectPageVersions,
|
ProjectPageVersions,
|
||||||
} from '@modrinth/ui'
|
} from '@modrinth/ui'
|
||||||
import { useLocalStorage } from '@vueuse/core'
|
|
||||||
import { onMounted, useTemplateRef } from 'vue'
|
import { onMounted, useTemplateRef } from 'vue'
|
||||||
|
|
||||||
import CreateProjectVersionModal from '~/components/ui/create-project-version/CreateProjectVersionModal.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)
|
createProjectVersionModal.value?.openEditVersionModal(versionId, projectId, stageId)
|
||||||
}
|
}
|
||||||
|
|
||||||
const hideVersionsAdmonition = useLocalStorage(
|
|
||||||
'hideVersionsHasMovedAdmonition',
|
|
||||||
!versions.value?.length,
|
|
||||||
)
|
|
||||||
|
|
||||||
const emit = defineEmits(['onDownload', 'deleteVersion'])
|
const emit = defineEmits(['onDownload', 'deleteVersion'])
|
||||||
|
|
||||||
const router = useNativeRouter()
|
|
||||||
|
|
||||||
const baseDropdownId = useId()
|
const baseDropdownId = useId()
|
||||||
|
|
||||||
function getPrimaryFile(version) {
|
function getPrimaryFile(version) {
|
||||||
|
|||||||
Reference in New Issue
Block a user