You've already forked AstralRinth
forked from didirus/AstralRinth
fix: Teleport Dropdown/OverflowMenu imports (#4211)
* fix: Teleport Dropdown/OverflowMenu imports * fix: lint
This commit is contained in:
@@ -27,7 +27,7 @@
|
|||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<UiServersTeleportDropdownMenu
|
<TeleportDropdownMenu
|
||||||
:id="'interval-field'"
|
:id="'interval-field'"
|
||||||
v-model="backupIntervalsLabel"
|
v-model="backupIntervalsLabel"
|
||||||
:disabled="!autoBackupEnabled || isSaving"
|
:disabled="!autoBackupEnabled || isSaving"
|
||||||
@@ -57,7 +57,12 @@
|
|||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { SaveIcon, XIcon } from '@modrinth/assets'
|
import { SaveIcon, XIcon } from '@modrinth/assets'
|
||||||
import { ButtonStyled, injectNotificationManager, NewModal } from '@modrinth/ui'
|
import {
|
||||||
|
ButtonStyled,
|
||||||
|
injectNotificationManager,
|
||||||
|
NewModal,
|
||||||
|
TeleportDropdownMenu,
|
||||||
|
} from '@modrinth/ui'
|
||||||
import { computed, ref } from 'vue'
|
import { computed, ref } from 'vue'
|
||||||
|
|
||||||
import type { ModrinthServer } from '~/composables/servers/modrinth-servers.ts'
|
import type { ModrinthServer } from '~/composables/servers/modrinth-servers.ts'
|
||||||
|
|||||||
@@ -60,7 +60,7 @@
|
|||||||
</NuxtLink>
|
</NuxtLink>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<UiServersTeleportDropdownMenu
|
<TeleportDropdownMenu
|
||||||
v-model="selectedVersion"
|
v-model="selectedVersion"
|
||||||
name="Project"
|
name="Project"
|
||||||
:options="filteredVersions"
|
:options="filteredVersions"
|
||||||
@@ -237,7 +237,14 @@ import {
|
|||||||
LockOpenIcon,
|
LockOpenIcon,
|
||||||
XIcon,
|
XIcon,
|
||||||
} from '@modrinth/assets'
|
} from '@modrinth/assets'
|
||||||
import { Admonition, Avatar, ButtonStyled, CopyCode, NewModal } from '@modrinth/ui'
|
import {
|
||||||
|
Admonition,
|
||||||
|
Avatar,
|
||||||
|
ButtonStyled,
|
||||||
|
CopyCode,
|
||||||
|
NewModal,
|
||||||
|
TeleportDropdownMenu,
|
||||||
|
} from '@modrinth/ui'
|
||||||
import TagItem from '@modrinth/ui/src/components/base/TagItem.vue'
|
import TagItem from '@modrinth/ui/src/components/base/TagItem.vue'
|
||||||
import { formatCategory, formatVersionsForDisplay, type Mod, type Version } from '@modrinth/utils'
|
import { formatCategory, formatVersionsForDisplay, type Mod, type Version } from '@modrinth/utils'
|
||||||
import { computed, ref } from 'vue'
|
import { computed, ref } from 'vue'
|
||||||
|
|||||||
@@ -51,14 +51,14 @@
|
|||||||
{{ formattedModifiedDate }}
|
{{ formattedModifiedDate }}
|
||||||
</span>
|
</span>
|
||||||
<ButtonStyled circular type="transparent">
|
<ButtonStyled circular type="transparent">
|
||||||
<UiServersTeleportOverflowMenu :options="menuOptions" direction="left" position="bottom">
|
<TeleportOverflowMenu :options="menuOptions" direction="left" position="bottom">
|
||||||
<MoreHorizontalIcon class="h-5 w-5 bg-transparent" />
|
<MoreHorizontalIcon class="h-5 w-5 bg-transparent" />
|
||||||
<template #extract><PackageOpenIcon /> Extract</template>
|
<template #extract><PackageOpenIcon /> Extract</template>
|
||||||
<template #rename><EditIcon /> Rename</template>
|
<template #rename><EditIcon /> Rename</template>
|
||||||
<template #move><RightArrowIcon /> Move</template>
|
<template #move><RightArrowIcon /> Move</template>
|
||||||
<template #download><DownloadIcon /> Download</template>
|
<template #download><DownloadIcon /> Download</template>
|
||||||
<template #delete><TrashIcon /> Delete</template>
|
<template #delete><TrashIcon /> Delete</template>
|
||||||
</UiServersTeleportOverflowMenu>
|
</TeleportOverflowMenu>
|
||||||
</ButtonStyled>
|
</ButtonStyled>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
@@ -90,6 +90,8 @@ import {
|
|||||||
} from '#components'
|
} from '#components'
|
||||||
import PaletteIcon from '~/assets/icons/palette.svg?component'
|
import PaletteIcon from '~/assets/icons/palette.svg?component'
|
||||||
|
|
||||||
|
import TeleportOverflowMenu from './TeleportOverflowMenu.vue'
|
||||||
|
|
||||||
interface FileItemProps {
|
interface FileItemProps {
|
||||||
name: string
|
name: string
|
||||||
type: 'directory' | 'file'
|
type: 'directory' | 'file'
|
||||||
|
|||||||
@@ -73,7 +73,7 @@
|
|||||||
<div class="flex flex-shrink-0 items-center gap-1">
|
<div class="flex flex-shrink-0 items-center gap-1">
|
||||||
<div class="flex w-full flex-row-reverse sm:flex-row">
|
<div class="flex w-full flex-row-reverse sm:flex-row">
|
||||||
<ButtonStyled type="transparent">
|
<ButtonStyled type="transparent">
|
||||||
<UiServersTeleportOverflowMenu
|
<TeleportOverflowMenu
|
||||||
position="bottom"
|
position="bottom"
|
||||||
direction="left"
|
direction="left"
|
||||||
aria-label="Filter view"
|
aria-label="Filter view"
|
||||||
@@ -93,7 +93,7 @@
|
|||||||
<template #all>Show all</template>
|
<template #all>Show all</template>
|
||||||
<template #filesOnly>Files only</template>
|
<template #filesOnly>Files only</template>
|
||||||
<template #foldersOnly>Folders only</template>
|
<template #foldersOnly>Folders only</template>
|
||||||
</UiServersTeleportOverflowMenu>
|
</TeleportOverflowMenu>
|
||||||
</ButtonStyled>
|
</ButtonStyled>
|
||||||
<div class="mx-1 w-full text-sm sm:w-48">
|
<div class="mx-1 w-full text-sm sm:w-48">
|
||||||
<label for="search-folder" class="sr-only">Search folder</label>
|
<label for="search-folder" class="sr-only">Search folder</label>
|
||||||
@@ -171,6 +171,8 @@ import { ButtonStyled, OverflowMenu } from '@modrinth/ui'
|
|||||||
import { useIntersectionObserver } from '@vueuse/core'
|
import { useIntersectionObserver } from '@vueuse/core'
|
||||||
import { computed, ref } from 'vue'
|
import { computed, ref } from 'vue'
|
||||||
|
|
||||||
|
import TeleportOverflowMenu from './TeleportOverflowMenu.vue'
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
breadcrumbSegments: string[]
|
breadcrumbSegments: string[]
|
||||||
searchQuery: string
|
searchQuery: string
|
||||||
|
|||||||
@@ -71,7 +71,7 @@
|
|||||||
<ShareIcon />
|
<ShareIcon />
|
||||||
</Button>
|
</Button>
|
||||||
<ButtonStyled type="transparent">
|
<ButtonStyled type="transparent">
|
||||||
<UiServersTeleportOverflowMenu
|
<TeleportOverflowMenu
|
||||||
position="bottom"
|
position="bottom"
|
||||||
direction="left"
|
direction="left"
|
||||||
aria-label="Save file"
|
aria-label="Save file"
|
||||||
@@ -100,7 +100,7 @@
|
|||||||
</svg>
|
</svg>
|
||||||
Save & restart
|
Save & restart
|
||||||
</template>
|
</template>
|
||||||
</UiServersTeleportOverflowMenu>
|
</TeleportOverflowMenu>
|
||||||
</ButtonStyled>
|
</ButtonStyled>
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
@@ -112,6 +112,8 @@ import { Button, ButtonStyled } from '@modrinth/ui'
|
|||||||
import { computed } from 'vue'
|
import { computed } from 'vue'
|
||||||
import { useRoute, useRouter } from 'vue-router'
|
import { useRoute, useRouter } from 'vue-router'
|
||||||
|
|
||||||
|
import TeleportOverflowMenu from './TeleportOverflowMenu.vue'
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
breadcrumbSegments: string[]
|
breadcrumbSegments: string[]
|
||||||
fileName?: string
|
fileName?: string
|
||||||
|
|||||||
@@ -78,7 +78,7 @@
|
|||||||
</ButtonStyled>
|
</ButtonStyled>
|
||||||
|
|
||||||
<ButtonStyled circular type="transparent">
|
<ButtonStyled circular type="transparent">
|
||||||
<UiServersTeleportOverflowMenu :options="[...menuOptions]">
|
<TeleportOverflowMenu :options="[...menuOptions]">
|
||||||
<MoreVerticalIcon aria-hidden="true" />
|
<MoreVerticalIcon aria-hidden="true" />
|
||||||
<template #kill>
|
<template #kill>
|
||||||
<SlashIcon class="h-5 w-5" />
|
<SlashIcon class="h-5 w-5" />
|
||||||
@@ -96,7 +96,7 @@
|
|||||||
<ClipboardCopyIcon class="h-5 w-5" aria-hidden="true" />
|
<ClipboardCopyIcon class="h-5 w-5" aria-hidden="true" />
|
||||||
<span>Copy ID</span>
|
<span>Copy ID</span>
|
||||||
</template>
|
</template>
|
||||||
</UiServersTeleportOverflowMenu>
|
</TeleportOverflowMenu>
|
||||||
</ButtonStyled>
|
</ButtonStyled>
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
@@ -125,6 +125,7 @@ import { useRouter } from 'vue-router'
|
|||||||
import LoadingIcon from './icons/LoadingIcon.vue'
|
import LoadingIcon from './icons/LoadingIcon.vue'
|
||||||
import PanelSpinner from './PanelSpinner.vue'
|
import PanelSpinner from './PanelSpinner.vue'
|
||||||
import ServerInfoLabels from './ServerInfoLabels.vue'
|
import ServerInfoLabels from './ServerInfoLabels.vue'
|
||||||
|
import TeleportOverflowMenu from './TeleportOverflowMenu.vue'
|
||||||
|
|
||||||
const flags = useFeatureFlags()
|
const flags = useFeatureFlags()
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="flex w-full flex-col gap-4">
|
<div class="flex w-full flex-col gap-4">
|
||||||
<UiServersTeleportDropdownMenu
|
<TeleportDropdownMenu
|
||||||
v-if="props.versions?.length"
|
v-if="props.versions?.length"
|
||||||
v-model="selectedVersion"
|
v-model="selectedVersion"
|
||||||
:options="versionOptions"
|
:options="versionOptions"
|
||||||
@@ -68,7 +68,12 @@
|
|||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { DownloadIcon, XIcon } from '@modrinth/assets'
|
import { DownloadIcon, XIcon } from '@modrinth/assets'
|
||||||
import { ButtonStyled, injectNotificationManager, NewModal } from '@modrinth/ui'
|
import {
|
||||||
|
ButtonStyled,
|
||||||
|
injectNotificationManager,
|
||||||
|
NewModal,
|
||||||
|
TeleportDropdownMenu,
|
||||||
|
} from '@modrinth/ui'
|
||||||
import { ModrinthServersFetchError } from '@modrinth/utils'
|
import { ModrinthServersFetchError } from '@modrinth/utils'
|
||||||
|
|
||||||
import type { ModrinthServer } from '~/composables/servers/modrinth-servers.ts'
|
import type { ModrinthServer } from '~/composables/servers/modrinth-servers.ts'
|
||||||
|
|||||||
@@ -203,6 +203,7 @@ import {
|
|||||||
ButtonStyled,
|
ButtonStyled,
|
||||||
injectNotificationManager,
|
injectNotificationManager,
|
||||||
NewModal,
|
NewModal,
|
||||||
|
TeleportDropdownMenu,
|
||||||
Toggle,
|
Toggle,
|
||||||
} from '@modrinth/ui'
|
} from '@modrinth/ui'
|
||||||
import { type Loaders, ModrinthServersFetchError } from '@modrinth/utils'
|
import { type Loaders, ModrinthServersFetchError } from '@modrinth/utils'
|
||||||
|
|||||||
@@ -364,6 +364,7 @@ import FilesUploadDragAndDrop from '~/components/ui/servers/FilesUploadDragAndDr
|
|||||||
import FilesUploadDropdown from '~/components/ui/servers/FilesUploadDropdown.vue'
|
import FilesUploadDropdown from '~/components/ui/servers/FilesUploadDropdown.vue'
|
||||||
import LoaderIcon from '~/components/ui/servers/icons/LoaderIcon.vue'
|
import LoaderIcon from '~/components/ui/servers/icons/LoaderIcon.vue'
|
||||||
import LoadingIcon from '~/components/ui/servers/icons/LoadingIcon.vue'
|
import LoadingIcon from '~/components/ui/servers/icons/LoadingIcon.vue'
|
||||||
|
import TeleportOverflowMenu from '~/components/ui/servers/TeleportOverflowMenu.vue'
|
||||||
import type { ModrinthServer } from '~/composables/servers/modrinth-servers.ts'
|
import type { ModrinthServer } from '~/composables/servers/modrinth-servers.ts'
|
||||||
import { acceptFileFromProjectType } from '~/helpers/fileUtils.js'
|
import { acceptFileFromProjectType } from '~/helpers/fileUtils.js'
|
||||||
|
|
||||||
|
|||||||
@@ -77,7 +77,7 @@
|
|||||||
v-if="overrides[index] && overrides[index].type === 'dropdown'"
|
v-if="overrides[index] && overrides[index].type === 'dropdown'"
|
||||||
class="mt-2 flex w-full sm:w-[320px] sm:justify-end"
|
class="mt-2 flex w-full sm:w-[320px] sm:justify-end"
|
||||||
>
|
>
|
||||||
<UiServersTeleportDropdownMenu
|
<TeleportDropdownMenu
|
||||||
:id="`server-property-${index}`"
|
:id="`server-property-${index}`"
|
||||||
v-model="liveProperties[index]"
|
v-model="liveProperties[index]"
|
||||||
:name="formatPropertyName(index)"
|
:name="formatPropertyName(index)"
|
||||||
@@ -144,7 +144,7 @@
|
|||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { EyeIcon, IssuesIcon, SearchIcon } from '@modrinth/assets'
|
import { EyeIcon, IssuesIcon, SearchIcon } from '@modrinth/assets'
|
||||||
import { ButtonStyled, injectNotificationManager } from '@modrinth/ui'
|
import { ButtonStyled, injectNotificationManager, TeleportDropdownMenu } from '@modrinth/ui'
|
||||||
import Fuse from 'fuse.js'
|
import Fuse from 'fuse.js'
|
||||||
import { computed, inject, ref, watch } from 'vue'
|
import { computed, inject, ref, watch } from 'vue'
|
||||||
|
|
||||||
|
|||||||
@@ -77,7 +77,7 @@
|
|||||||
/>
|
/>
|
||||||
<label for="show-all-versions" class="text-sm">Show all Java versions</label>
|
<label for="show-all-versions" class="text-sm">Show all Java versions</label>
|
||||||
</div>
|
</div>
|
||||||
<UiServersTeleportDropdownMenu
|
<TeleportDropdownMenu
|
||||||
:id="'java-version-field'"
|
:id="'java-version-field'"
|
||||||
v-model="jdkVersion"
|
v-model="jdkVersion"
|
||||||
name="java-version"
|
name="java-version"
|
||||||
@@ -90,7 +90,7 @@
|
|||||||
<span class="text-lg font-bold text-contrast">Runtime</span>
|
<span class="text-lg font-bold text-contrast">Runtime</span>
|
||||||
<span> The Java runtime your server will use. </span>
|
<span> The Java runtime your server will use. </span>
|
||||||
</div>
|
</div>
|
||||||
<UiServersTeleportDropdownMenu
|
<TeleportDropdownMenu
|
||||||
:id="'runtime-field'"
|
:id="'runtime-field'"
|
||||||
v-model="jdkBuild"
|
v-model="jdkBuild"
|
||||||
name="runtime"
|
name="runtime"
|
||||||
@@ -113,7 +113,7 @@
|
|||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { IssuesIcon, UpdatedIcon } from '@modrinth/assets'
|
import { IssuesIcon, UpdatedIcon } from '@modrinth/assets'
|
||||||
import { ButtonStyled, injectNotificationManager } from '@modrinth/ui'
|
import { ButtonStyled, injectNotificationManager, TeleportDropdownMenu } from '@modrinth/ui'
|
||||||
|
|
||||||
import SaveBanner from '~/components/ui/servers/SaveBanner.vue'
|
import SaveBanner from '~/components/ui/servers/SaveBanner.vue'
|
||||||
import type { ModrinthServer } from '~/composables/servers/modrinth-servers.ts'
|
import type { ModrinthServer } from '~/composables/servers/modrinth-servers.ts'
|
||||||
|
|||||||
Reference in New Issue
Block a user