Unify compact workspace controls and panel transitions, move directory actions into the context menu, and remove backlink UI. Reorganize settings with searchable sections, per-setting resets, shortcut search, and accurate save feedback. Remove sharing UI, APIs, authentication helpers, and storage code; provide a transactional cleanup script with retirement tests. Reject directories during orphan image cleanup and cover mixed-batch preservation.
22 lines
886 B
Vue
22 lines
886 B
Vue
<script setup lang="ts">
|
|
import { computed } from 'vue'
|
|
import Icon from './Icon.vue'
|
|
import { SETTING_ITEMS, type SettingId } from './settingsCatalog'
|
|
const props = defineProps<{ id: SettingId; control?: string; resettable?: boolean }>()
|
|
defineEmits<{ reset: [] }>()
|
|
const item = computed(() => SETTING_ITEMS[props.id])
|
|
</script>
|
|
|
|
<template>
|
|
<div :id="'rm-setting-' + id" class="rm-setting" tabindex="-1">
|
|
<div class="rm-setting-info">
|
|
<component :is="control ? 'label' : 'span'" :for="control" class="rm-setting-label">{{ item.title }}</component>
|
|
<p>{{ item.description }}</p>
|
|
</div>
|
|
<div class="rm-setting-control">
|
|
<slot />
|
|
<button v-if="resettable" class="rm-icon-btn rm-setting-reset" :title="'重置' + item.title" :aria-label="'重置' + item.title" @click="$emit('reset')"><Icon name="restore" /></button>
|
|
</div>
|
|
</div>
|
|
</template>
|