新增同步 helpers(synced-options / synced-packs / game-options),在 instance helper 中补充同步类型与 API。新增实例设置「同步」标签页(SyncSettings)及 SyncSource / SyncedPacks / servers / command-history 四个弹窗,并把 CheckCircleButton、TeleportOverflowMenu 从 ui 包导出。同步相关的 en-US / zh-CN 文案已补齐(各 62 条)。game-settings-modal 留待下一轮。
This commit is contained in:
1 parent
f7380f1590
commit
83ee962c16
14 files changed
+2238
-1
No files matched your search
@@ -0,0 +1,53 @@
|
||||
<script setup lang="ts">
|
||||
import { CheckIcon } from '@modrinth/assets'
|
||||
import { computed, ref } from 'vue'
|
||||
|
||||
import ButtonFrame from './ButtonFrame.vue'
|
||||
import type { ButtonNativeType } from './types'
|
||||
|
||||
withDefaults(
|
||||
defineProps<{
|
||||
checked: boolean
|
||||
disabled?: boolean
|
||||
nativeType?: ButtonNativeType
|
||||
}>(),
|
||||
{
|
||||
disabled: false,
|
||||
nativeType: 'button',
|
||||
},
|
||||
)
|
||||
|
||||
const frame = ref<InstanceType<typeof ButtonFrame> | null>(null)
|
||||
const element = computed(() => frame.value?.element ?? null)
|
||||
|
||||
defineExpose({ element })
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<ButtonFrame
|
||||
ref="frame"
|
||||
as="button"
|
||||
type="quiet"
|
||||
size="lg"
|
||||
interaction="none"
|
||||
:disabled="disabled"
|
||||
:native-type="nativeType"
|
||||
role="radio"
|
||||
:aria-checked="checked"
|
||||
class="w-full !justify-between !gap-4 !whitespace-normal !border !border-solid !px-2 !text-left !transition-colors"
|
||||
:class="
|
||||
checked
|
||||
? '!border-brand !bg-brand-highlight !text-[var(--color-text-primary)]'
|
||||
: '!border-transparent !bg-transparent !text-[var(--color-text-primary)] enabled:hover:!bg-surface-3'
|
||||
"
|
||||
>
|
||||
<span class="flex min-w-0 flex-1 items-center gap-2"><slot /></span>
|
||||
<span
|
||||
v-if="checked"
|
||||
class="flex size-6 shrink-0 items-center justify-center rounded-full bg-brand text-brand-inverted"
|
||||
>
|
||||
<CheckIcon class="size-4" aria-hidden="true" />
|
||||
</span>
|
||||
<span v-else class="size-6 shrink-0 rounded-full border border-solid border-surface-5" />
|
||||
</ButtonFrame>
|
||||
</template>
|
||||
@@ -11,6 +11,7 @@ export { default as BulletDivider } from './BulletDivider.vue'
|
||||
export { default as Button } from './Button.vue'
|
||||
export { default as NewButton } from './buttons/Button.vue'
|
||||
export { default as IconButton } from './buttons/IconButton.vue'
|
||||
export { default as CheckCircleButton } from './buttons/CheckCircleButton.vue'
|
||||
export type {
|
||||
ButtonColor,
|
||||
ButtonElementHandle,
|
||||
@@ -78,6 +79,7 @@ export { default as NavTabs } from './NavTabs.vue'
|
||||
export { default as OptionGroup } from './OptionGroup.vue'
|
||||
export type { Option as OverflowMenuOption } from './OverflowMenu.vue'
|
||||
export { default as OverflowMenu } from './OverflowMenu.vue'
|
||||
export { default as TeleportOverflowMenu } from './TeleportOverflowMenu.vue'
|
||||
export { default as Page } from './Page.vue'
|
||||
export { default as Pagination } from './Pagination.vue'
|
||||
export { default as PopoutMenu } from './PopoutMenu.vue'
|
||||
|
||||
Reference in new issue
Block a user