|
|
|
|
@ -17,149 +17,216 @@
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="wiki-layout">
|
|
|
|
|
<!-- Left: Knowledge Base List -->
|
|
|
|
|
<div class="wiki-sidebar mc-surface-card">
|
|
|
|
|
<div class="sidebar-section">
|
|
|
|
|
<h3 class="sidebar-title">{{ t('wiki.knowledgeBases') }}</h3>
|
|
|
|
|
<div v-if="store.loading" class="text-center py-4 text-gray-400">{{ t('common.loading') }}</div>
|
|
|
|
|
<div v-else-if="store.knowledgeBases.length === 0" class="text-center py-4 text-gray-400">
|
|
|
|
|
{{ t('wiki.noKB') }}
|
|
|
|
|
</div>
|
|
|
|
|
<div v-else class="kb-list">
|
|
|
|
|
<div
|
|
|
|
|
v-for="kb in store.knowledgeBases" :key="kb.id"
|
|
|
|
|
class="kb-item" :class="{ active: store.currentKB?.id === kb.id }"
|
|
|
|
|
@click="selectKB(kb.id)"
|
|
|
|
|
>
|
|
|
|
|
<div class="kb-item-name">{{ kb.name }}</div>
|
|
|
|
|
<div class="kb-item-meta">
|
|
|
|
|
<span>{{ t('wiki.pageCount', { count: kb.pageCount }) }}</span>
|
|
|
|
|
<span>{{ t('wiki.sourceCount', { count: kb.rawCount }) }}</span>
|
|
|
|
|
<!-- Left sidebar: KB list + page list -->
|
|
|
|
|
<div class="wiki-sidebar mc-surface-card">
|
|
|
|
|
|
|
|
|
|
<!-- Knowledge bases -->
|
|
|
|
|
<div class="sidebar-section">
|
|
|
|
|
<h3 class="sidebar-label">{{ t('wiki.knowledgeBases') }}</h3>
|
|
|
|
|
<div v-if="store.loading" class="empty-hint">{{ t('common.loading') }}</div>
|
|
|
|
|
<div v-else-if="store.knowledgeBases.length === 0" class="empty-hint">{{ t('wiki.noKB') }}</div>
|
|
|
|
|
<div v-else class="kb-list">
|
|
|
|
|
<div
|
|
|
|
|
v-for="kb in store.knowledgeBases" :key="kb.id"
|
|
|
|
|
class="kb-item" :class="{ active: store.currentKB?.id === kb.id }"
|
|
|
|
|
@click="selectKB(kb.id)"
|
|
|
|
|
>
|
|
|
|
|
<div class="kb-item-name">{{ kb.name }}</div>
|
|
|
|
|
<div class="kb-item-stats">
|
|
|
|
|
<span class="stat-chip">
|
|
|
|
|
<svg width="11" height="11" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"/><polyline points="14 2 14 8 20 8"/></svg>
|
|
|
|
|
{{ kb.pageCount }}
|
|
|
|
|
</span>
|
|
|
|
|
<span class="stat-chip">
|
|
|
|
|
<svg width="11" height="11" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/><polyline points="17 8 12 3 7 8"/><line x1="12" y1="3" x2="12" y2="15"/></svg>
|
|
|
|
|
{{ kb.rawCount }}
|
|
|
|
|
</span>
|
|
|
|
|
<span class="kb-status-dot" :class="kb.status" :title="t(`wiki.status.${kb.status}`)"></span>
|
|
|
|
|
</div>
|
|
|
|
|
<div v-if="kbStats[kb.id]?.failedJobCount > 0" class="kb-warn">
|
|
|
|
|
⚠ {{ t('wiki.stats.failedJobs', { count: kbStats[kb.id].failedJobCount }) }}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- RFC-033: KB health stats -->
|
|
|
|
|
<div v-if="kbStats[kb.id]" class="kb-health">
|
|
|
|
|
<span v-if="kbStats[kb.id].enrichedPageCount != null" class="health-enriched">
|
|
|
|
|
✦ {{ t('wiki.stats.enrichedRatio', { enriched: kbStats[kb.id].enrichedPageCount, total: kbStats[kb.id].pageCount }) }}
|
|
|
|
|
</span>
|
|
|
|
|
<span v-if="kbStats[kb.id].failedJobCount > 0" class="health-failed">
|
|
|
|
|
⚠ {{ t('wiki.stats.failedJobs', { count: kbStats[kb.id].failedJobCount }) }}
|
|
|
|
|
</span>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<!-- Page list -->
|
|
|
|
|
<div v-if="store.currentKB" class="sidebar-section sidebar-section--pages">
|
|
|
|
|
<div class="sidebar-title-row">
|
|
|
|
|
<h3 class="sidebar-label">
|
|
|
|
|
{{ t('wiki.pages') }}
|
|
|
|
|
<span class="count-badge">{{ store.pages.length }}</span>
|
|
|
|
|
</h3>
|
|
|
|
|
<div class="sidebar-title-actions">
|
|
|
|
|
<button
|
|
|
|
|
v-if="!batchMode"
|
|
|
|
|
class="icon-btn" :title="t('wiki.batchSelect')"
|
|
|
|
|
@click="batchMode = true"
|
|
|
|
|
>
|
|
|
|
|
<svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="3" y="3" width="7" height="7" rx="1"/><rect x="14" y="3" width="7" height="7" rx="1"/><rect x="3" y="14" width="7" height="7" rx="1"/><rect x="14" y="14" width="7" height="7" rx="1"/></svg>
|
|
|
|
|
</button>
|
|
|
|
|
<button v-else class="icon-btn icon-btn--active" @click="exitBatchMode">✕</button>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<!-- Search -->
|
|
|
|
|
<div class="search-wrap">
|
|
|
|
|
<svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="11" cy="11" r="8"/><line x1="21" y1="21" x2="16.65" y2="16.65"/></svg>
|
|
|
|
|
<input
|
|
|
|
|
v-model="pageSearch"
|
|
|
|
|
type="text"
|
|
|
|
|
:placeholder="t('wiki.searchPages')"
|
|
|
|
|
class="search-input"
|
|
|
|
|
/>
|
|
|
|
|
<button v-if="pageSearch" class="search-clear" @click="pageSearch = ''">✕</button>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<!-- Batch actions -->
|
|
|
|
|
<div v-if="batchMode" class="batch-bar">
|
|
|
|
|
<label class="batch-check-all">
|
|
|
|
|
<input type="checkbox" :checked="allSelected" @change="toggleSelectAll" />
|
|
|
|
|
<span>{{ t('wiki.selectAll') }}</span>
|
|
|
|
|
</label>
|
|
|
|
|
<button
|
|
|
|
|
class="batch-delete-btn"
|
|
|
|
|
:disabled="selectedSlugs.length === 0"
|
|
|
|
|
@click="handleBatchDelete"
|
|
|
|
|
>
|
|
|
|
|
{{ t('common.delete') }} ({{ selectedSlugs.length }})
|
|
|
|
|
</button>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<!-- Grouped page list -->
|
|
|
|
|
<div class="page-list" v-if="!pageSearch">
|
|
|
|
|
<div v-for="group in groupedPages" :key="group.type" class="page-group">
|
|
|
|
|
<button
|
|
|
|
|
class="group-header"
|
|
|
|
|
@click="toggleGroup(group.type)"
|
|
|
|
|
>
|
|
|
|
|
<svg
|
|
|
|
|
class="group-chevron"
|
|
|
|
|
:class="{ expanded: !collapsedGroups.has(group.type) }"
|
|
|
|
|
width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"
|
|
|
|
|
><polyline points="9 18 15 12 9 6"/></svg>
|
|
|
|
|
<span class="group-label">{{ formatGroupLabel(group.type) }}</span>
|
|
|
|
|
<span class="group-count">{{ group.pages.length }}</span>
|
|
|
|
|
</button>
|
|
|
|
|
<div v-if="!collapsedGroups.has(group.type)" class="group-items">
|
|
|
|
|
<div
|
|
|
|
|
v-for="page in paginatedGroupPages(group)" :key="page.slug"
|
|
|
|
|
class="page-item" :class="{ active: !batchMode && store.currentPage?.slug === page.slug }"
|
|
|
|
|
@click="batchMode ? toggleSelect(page.slug) : openPage(page.slug)"
|
|
|
|
|
>
|
|
|
|
|
<input
|
|
|
|
|
v-if="batchMode"
|
|
|
|
|
type="checkbox"
|
|
|
|
|
:checked="selectedSlugs.includes(page.slug)"
|
|
|
|
|
class="page-checkbox"
|
|
|
|
|
@click.stop="toggleSelect(page.slug)"
|
|
|
|
|
/>
|
|
|
|
|
<div class="page-item-body">
|
|
|
|
|
<div class="page-item-title">{{ page.title }}</div>
|
|
|
|
|
<div class="page-item-meta">
|
|
|
|
|
<span v-if="page.lastUpdatedBy === 'manual'" class="edit-dot manual" title="Manual edit"></span>
|
|
|
|
|
<span class="meta-text">v{{ page.version }}</span>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- Load more within group -->
|
|
|
|
|
<button
|
|
|
|
|
v-if="groupPageLimit[group.type] < group.pages.length"
|
|
|
|
|
class="load-more-btn"
|
|
|
|
|
@click.stop="loadMoreGroup(group.type)"
|
|
|
|
|
>
|
|
|
|
|
{{ t('wiki.loadMore', { n: Math.min(PAGE_STEP, group.pages.length - groupPageLimit[group.type]) }) }}
|
|
|
|
|
</button>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div v-if="groupedPages.length === 0" class="empty-hint">{{ t('wiki.noPages') }}</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<!-- Flat search results -->
|
|
|
|
|
<div class="page-list" v-else>
|
|
|
|
|
<div
|
|
|
|
|
v-for="page in paginatedSearch" :key="page.slug"
|
|
|
|
|
class="page-item" :class="{ active: !batchMode && store.currentPage?.slug === page.slug }"
|
|
|
|
|
@click="batchMode ? toggleSelect(page.slug) : openPage(page.slug)"
|
|
|
|
|
>
|
|
|
|
|
<input
|
|
|
|
|
v-if="batchMode"
|
|
|
|
|
type="checkbox"
|
|
|
|
|
:checked="selectedSlugs.includes(page.slug)"
|
|
|
|
|
class="page-checkbox"
|
|
|
|
|
@click.stop="toggleSelect(page.slug)"
|
|
|
|
|
/>
|
|
|
|
|
<div class="page-item-body">
|
|
|
|
|
<div class="page-item-title">{{ page.title }}</div>
|
|
|
|
|
<div class="page-item-meta">
|
|
|
|
|
<span class="type-chip">{{ formatGroupLabel(page.pageType || 'other') }}</span>
|
|
|
|
|
<span class="meta-text">v{{ page.version }}</span>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div v-if="filteredPages.length > searchPageLimit" class="pagination-row">
|
|
|
|
|
<button class="load-more-btn" @click="searchPageLimit += PAGE_STEP">
|
|
|
|
|
{{ t('wiki.loadMore', { n: Math.min(PAGE_STEP, filteredPages.length - searchPageLimit) }) }}
|
|
|
|
|
</button>
|
|
|
|
|
</div>
|
|
|
|
|
<div v-if="filteredPages.length === 0" class="empty-hint">{{ t('wiki.noResults') }}</div>
|
|
|
|
|
</div>
|
|
|
|
|
<span class="kb-status" :class="kb.status">{{ t(`wiki.status.${kb.status}`) }}</span>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<!-- Pages List when KB selected -->
|
|
|
|
|
<div v-if="store.currentKB" class="sidebar-section sidebar-section--pages">
|
|
|
|
|
<div class="sidebar-title-row">
|
|
|
|
|
<h3 class="sidebar-title">
|
|
|
|
|
{{ t('wiki.pages') }}
|
|
|
|
|
<span class="text-xs text-gray-400">({{ store.pages.length }})</span>
|
|
|
|
|
</h3>
|
|
|
|
|
<button v-if="!batchMode" class="batch-toggle" @click="batchMode = true" :title="t('wiki.batchSelect')">
|
|
|
|
|
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="3" y="3" width="7" height="7" rx="1"/><rect x="14" y="3" width="7" height="7" rx="1"/><rect x="3" y="14" width="7" height="7" rx="1"/><rect x="14" y="14" width="7" height="7" rx="1"/></svg>
|
|
|
|
|
</button>
|
|
|
|
|
<button v-else class="batch-toggle active" @click="exitBatchMode">
|
|
|
|
|
{{ t('common.cancel') }}
|
|
|
|
|
</button>
|
|
|
|
|
</div>
|
|
|
|
|
<input
|
|
|
|
|
v-model="pageSearch"
|
|
|
|
|
type="text"
|
|
|
|
|
:placeholder="t('wiki.searchPages')"
|
|
|
|
|
class="sidebar-search"
|
|
|
|
|
/>
|
|
|
|
|
<!-- Right: Content -->
|
|
|
|
|
<div class="wiki-content mc-surface-card">
|
|
|
|
|
<div v-if="!store.currentKB" class="empty-state">
|
|
|
|
|
<svg width="56" height="56" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1">
|
|
|
|
|
<path d="M4 19.5A2.5 2.5 0 0 1 6.5 17H20"/><path d="M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2z"/>
|
|
|
|
|
</svg>
|
|
|
|
|
<p>{{ t('wiki.selectKB') }}</p>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<!-- Batch actions bar -->
|
|
|
|
|
<div v-if="batchMode" class="batch-bar">
|
|
|
|
|
<label class="batch-check-all">
|
|
|
|
|
<input type="checkbox" :checked="allSelected" @change="toggleSelectAll" />
|
|
|
|
|
<span>{{ t('wiki.selectAll') }}</span>
|
|
|
|
|
</label>
|
|
|
|
|
<button
|
|
|
|
|
class="batch-delete-btn"
|
|
|
|
|
:disabled="selectedSlugs.length === 0"
|
|
|
|
|
@click="handleBatchDelete"
|
|
|
|
|
>
|
|
|
|
|
{{ t('common.delete') }} ({{ selectedSlugs.length }})
|
|
|
|
|
</button>
|
|
|
|
|
</div>
|
|
|
|
|
<div v-else class="wiki-content-body">
|
|
|
|
|
<div class="content-tabs">
|
|
|
|
|
<button
|
|
|
|
|
v-for="tab in tabs" :key="tab.key"
|
|
|
|
|
class="tab-btn" :class="{ active: activeTab === tab.key }"
|
|
|
|
|
@click="activeTab = tab.key"
|
|
|
|
|
>
|
|
|
|
|
{{ tab.label }}
|
|
|
|
|
</button>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="page-list">
|
|
|
|
|
<div
|
|
|
|
|
v-for="page in filteredPages" :key="page.slug"
|
|
|
|
|
class="page-item" :class="{ active: !batchMode && store.currentPage?.slug === page.slug }"
|
|
|
|
|
@click="batchMode ? toggleSelect(page.slug) : openPage(page.slug)"
|
|
|
|
|
>
|
|
|
|
|
<input
|
|
|
|
|
v-if="batchMode"
|
|
|
|
|
type="checkbox"
|
|
|
|
|
:checked="selectedSlugs.includes(page.slug)"
|
|
|
|
|
class="page-checkbox"
|
|
|
|
|
@click.stop="toggleSelect(page.slug)"
|
|
|
|
|
/>
|
|
|
|
|
<div class="page-item-body">
|
|
|
|
|
<div class="page-item-title">{{ page.title }}</div>
|
|
|
|
|
<div class="page-item-meta">v{{ page.version }} · {{ page.lastUpdatedBy }}</div>
|
|
|
|
|
<div v-if="activeTab === 'raw'" class="tab-content">
|
|
|
|
|
<RawMaterialPanel />
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div v-if="activeTab === 'pages'" class="tab-content">
|
|
|
|
|
<WikiPageViewer v-if="store.currentPage" />
|
|
|
|
|
<div v-else class="empty-state">
|
|
|
|
|
<svg width="48" height="48" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1">
|
|
|
|
|
<path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"/><polyline points="14 2 14 8 20 8"/>
|
|
|
|
|
</svg>
|
|
|
|
|
<p>{{ t('wiki.selectPage') }}</p>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div v-if="activeTab === 'config'" class="tab-content tab-content--config">
|
|
|
|
|
<WikiConfig />
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<!-- Right: Content Area -->
|
|
|
|
|
<div class="wiki-content mc-surface-card">
|
|
|
|
|
<!-- No KB selected -->
|
|
|
|
|
<div v-if="!store.currentKB" class="empty-state">
|
|
|
|
|
<svg width="64" height="64" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1" class="mx-auto mb-4 text-gray-400">
|
|
|
|
|
<path d="M4 19.5A2.5 2.5 0 0 1 6.5 17H20"/><path d="M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2z"/>
|
|
|
|
|
</svg>
|
|
|
|
|
<p>{{ t('wiki.selectKB') }}</p>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<!-- Tab navigation -->
|
|
|
|
|
<div v-else class="wiki-content-body">
|
|
|
|
|
<div class="content-tabs">
|
|
|
|
|
<button
|
|
|
|
|
v-for="tab in tabs" :key="tab.key"
|
|
|
|
|
class="tab-btn" :class="{ active: activeTab === tab.key }"
|
|
|
|
|
@click="activeTab = tab.key"
|
|
|
|
|
>
|
|
|
|
|
{{ tab.label }}
|
|
|
|
|
</button>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<!-- Raw Materials Tab -->
|
|
|
|
|
<div v-if="activeTab === 'raw'" class="tab-content">
|
|
|
|
|
<RawMaterialPanel />
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<!-- Wiki Pages Tab -->
|
|
|
|
|
<div v-if="activeTab === 'pages'" class="tab-content">
|
|
|
|
|
<WikiPageViewer v-if="store.currentPage" />
|
|
|
|
|
<div v-else class="empty-state">
|
|
|
|
|
<p>{{ t('wiki.selectPage') }}</p>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<!-- Config Tab -->
|
|
|
|
|
<div v-if="activeTab === 'config'" class="tab-content tab-content--config">
|
|
|
|
|
<WikiConfig />
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<!-- Create KB Modal -->
|
|
|
|
|
<div v-if="showCreateKB" class="modal-overlay">
|
|
|
|
|
<div v-if="showCreateKB" class="modal-overlay" @click.self="showCreateKB = false">
|
|
|
|
|
<div class="modal-content">
|
|
|
|
|
<h3 class="modal-title">{{ t('wiki.createKB') }}</h3>
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
<label>{{ t('wiki.kbName') }}</label>
|
|
|
|
|
<input v-model="newKBName" type="text" class="form-input" :placeholder="t('wiki.kbNamePlaceholder')" />
|
|
|
|
|
<input v-model="newKBName" type="text" class="form-input" :placeholder="t('wiki.kbNamePlaceholder')" autofocus />
|
|
|
|
|
</div>
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
<label>{{ t('wiki.kbDescription') }}</label>
|
|
|
|
|
@ -186,7 +253,7 @@ import WikiConfig from './components/WikiConfig.vue'
|
|
|
|
|
const { t } = useI18n()
|
|
|
|
|
const store = useWikiStore()
|
|
|
|
|
|
|
|
|
|
// RFC-033: KB health stats
|
|
|
|
|
// KB health stats
|
|
|
|
|
interface KBStats {
|
|
|
|
|
pageCount: number
|
|
|
|
|
enrichedPageCount: number
|
|
|
|
|
@ -205,7 +272,9 @@ async function fetchKBStats() {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
watch(() => store.knowledgeBases.length, () => { if (store.knowledgeBases.length > 0) fetchKBStats() })
|
|
|
|
|
watch(() => store.knowledgeBases.length, () => {
|
|
|
|
|
if (store.knowledgeBases.length > 0) fetchKBStats()
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
const showCreateKB = ref(false)
|
|
|
|
|
const newKBName = ref('')
|
|
|
|
|
@ -217,6 +286,90 @@ const pageSearch = ref('')
|
|
|
|
|
const batchMode = ref(false)
|
|
|
|
|
const selectedSlugs = ref<string[]>([])
|
|
|
|
|
|
|
|
|
|
// Pagination constants
|
|
|
|
|
const PAGE_STEP = 20
|
|
|
|
|
const searchPageLimit = ref(PAGE_STEP)
|
|
|
|
|
|
|
|
|
|
// Per-group pagination limit map
|
|
|
|
|
const groupPageLimit = reactive<Record<string, number>>({})
|
|
|
|
|
|
|
|
|
|
// Which groups are collapsed
|
|
|
|
|
const collapsedGroups = reactive<Set<string>>(new Set())
|
|
|
|
|
|
|
|
|
|
function toggleGroup(type: string) {
|
|
|
|
|
if (collapsedGroups.has(type)) collapsedGroups.delete(type)
|
|
|
|
|
else collapsedGroups.add(type)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function loadMoreGroup(type: string) {
|
|
|
|
|
groupPageLimit[type] = (groupPageLimit[type] || PAGE_STEP) + PAGE_STEP
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function paginatedGroupPages(group: { type: string; pages: any[] }) {
|
|
|
|
|
const limit = groupPageLimit[group.type] || PAGE_STEP
|
|
|
|
|
return group.pages.slice(0, limit)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Type label mapping (matches backend WikiProcessingService route output)
|
|
|
|
|
const TYPE_LABELS: Record<string, string> = {
|
|
|
|
|
concept: 'Concepts',
|
|
|
|
|
person: 'People',
|
|
|
|
|
place: 'Places',
|
|
|
|
|
event: 'Events',
|
|
|
|
|
technology: 'Technology',
|
|
|
|
|
organization: 'Organizations',
|
|
|
|
|
product: 'Products',
|
|
|
|
|
term: 'Terms',
|
|
|
|
|
process: 'Processes',
|
|
|
|
|
other: 'Other',
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function formatGroupLabel(type: string): string {
|
|
|
|
|
if (!type) return TYPE_LABELS.other
|
|
|
|
|
return TYPE_LABELS[type.toLowerCase()] || (type.charAt(0).toUpperCase() + type.slice(1))
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Type sort order
|
|
|
|
|
const TYPE_ORDER = ['concept', 'technology', 'process', 'person', 'organization', 'product', 'place', 'event', 'term', 'other']
|
|
|
|
|
|
|
|
|
|
const filteredPages = computed(() => {
|
|
|
|
|
const q = pageSearch.value.toLowerCase()
|
|
|
|
|
if (!q) return store.pages
|
|
|
|
|
return store.pages.filter(
|
|
|
|
|
(p) => p.title.toLowerCase().includes(q) || p.slug.toLowerCase().includes(q)
|
|
|
|
|
)
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
const paginatedSearch = computed(() => filteredPages.value.slice(0, searchPageLimit.value))
|
|
|
|
|
|
|
|
|
|
const groupedPages = computed(() => {
|
|
|
|
|
const map = new Map<string, typeof store.pages>()
|
|
|
|
|
for (const page of store.pages) {
|
|
|
|
|
const type = (page.pageType || 'other').toLowerCase()
|
|
|
|
|
if (!map.has(type)) map.set(type, [])
|
|
|
|
|
map.get(type)!.push(page)
|
|
|
|
|
}
|
|
|
|
|
// Sort groups by TYPE_ORDER
|
|
|
|
|
return [...map.entries()]
|
|
|
|
|
.sort(([a], [b]) => {
|
|
|
|
|
const ia = TYPE_ORDER.indexOf(a) >= 0 ? TYPE_ORDER.indexOf(a) : 99
|
|
|
|
|
const ib = TYPE_ORDER.indexOf(b) >= 0 ? TYPE_ORDER.indexOf(b) : 99
|
|
|
|
|
return ia - ib
|
|
|
|
|
})
|
|
|
|
|
.map(([type, pages]) => ({ type, pages }))
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
// Reset pagination when KB changes
|
|
|
|
|
watch(() => store.currentKB?.id, () => {
|
|
|
|
|
searchPageLimit.value = PAGE_STEP
|
|
|
|
|
Object.keys(groupPageLimit).forEach(k => delete groupPageLimit[k])
|
|
|
|
|
collapsedGroups.clear()
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
watch(() => pageSearch.value, () => {
|
|
|
|
|
searchPageLimit.value = PAGE_STEP
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
const allSelected = computed(() =>
|
|
|
|
|
filteredPages.value.length > 0 && selectedSlugs.value.length === filteredPages.value.length
|
|
|
|
|
)
|
|
|
|
|
@ -228,11 +381,8 @@ function toggleSelect(slug: string) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function toggleSelectAll() {
|
|
|
|
|
if (allSelected.value) {
|
|
|
|
|
selectedSlugs.value = []
|
|
|
|
|
} else {
|
|
|
|
|
selectedSlugs.value = filteredPages.value.map(p => p.slug)
|
|
|
|
|
}
|
|
|
|
|
if (allSelected.value) selectedSlugs.value = []
|
|
|
|
|
else selectedSlugs.value = filteredPages.value.map(p => p.slug)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function exitBatchMode() {
|
|
|
|
|
@ -259,14 +409,6 @@ const tabs = computed(() => [
|
|
|
|
|
{ key: 'config', label: t('wiki.config') },
|
|
|
|
|
])
|
|
|
|
|
|
|
|
|
|
const filteredPages = computed(() => {
|
|
|
|
|
const q = pageSearch.value.toLowerCase()
|
|
|
|
|
if (!q) return store.pages
|
|
|
|
|
return store.pages.filter(
|
|
|
|
|
(p) => p.title.toLowerCase().includes(q) || p.slug.toLowerCase().includes(q)
|
|
|
|
|
)
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
async function selectKB(id: number) {
|
|
|
|
|
await store.selectKB(id)
|
|
|
|
|
activeTab.value = 'raw'
|
|
|
|
|
@ -291,142 +433,240 @@ onMounted(() => {
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style scoped>
|
|
|
|
|
.wiki-shell {
|
|
|
|
|
background: transparent;
|
|
|
|
|
height: 100%;
|
|
|
|
|
min-height: 0;
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
}
|
|
|
|
|
.wiki-shell { background: transparent; height: 100%; min-height: 0; overflow: hidden; }
|
|
|
|
|
.wiki-frame { height: min(calc(100vh - 28px), 100%); min-height: 0; overflow: hidden; }
|
|
|
|
|
.wiki-inner { display: flex; flex-direction: column; height: 100%; min-height: 0; }
|
|
|
|
|
|
|
|
|
|
.wiki-frame {
|
|
|
|
|
height: min(calc(100vh - 28px), 100%);
|
|
|
|
|
min-height: 0;
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.wiki-inner {
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
height: 100%;
|
|
|
|
|
min-height: 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.btn-primary { display: flex; align-items: center; gap: 6px; padding: 10px 16px; background: linear-gradient(135deg, var(--mc-primary), var(--mc-primary-hover)); color: white; border: none; border-radius: 14px; font-size: 14px; font-weight: 600; cursor: pointer; box-shadow: var(--mc-shadow-soft); }
|
|
|
|
|
.btn-primary:hover { background: var(--mc-primary-hover); }
|
|
|
|
|
.btn-primary:disabled { background: var(--mc-border); cursor: not-allowed; }
|
|
|
|
|
.btn-secondary { padding: 8px 16px; background: var(--mc-bg-elevated); color: var(--mc-text-primary); border: 1px solid var(--mc-border); border-radius: 12px; font-size: 14px; cursor: pointer; }
|
|
|
|
|
.btn-primary { display: flex; align-items: center; gap: 6px; padding: 10px 18px; background: linear-gradient(135deg, var(--mc-primary), var(--mc-primary-hover)); color: white; border: none; border-radius: 14px; font-size: 14px; font-weight: 600; cursor: pointer; box-shadow: var(--mc-shadow-soft); transition: opacity 0.15s; }
|
|
|
|
|
.btn-primary:hover { opacity: 0.9; }
|
|
|
|
|
.btn-primary:disabled { background: var(--mc-border); box-shadow: none; cursor: not-allowed; }
|
|
|
|
|
.btn-secondary { padding: 8px 16px; background: var(--mc-bg-elevated); color: var(--mc-text-primary); border: 1px solid var(--mc-border); border-radius: 12px; font-size: 14px; cursor: pointer; transition: background 0.15s; }
|
|
|
|
|
.btn-secondary:hover { background: var(--mc-bg-sunken); }
|
|
|
|
|
|
|
|
|
|
/* Layout */
|
|
|
|
|
.wiki-layout { display: flex; gap: 16px; flex: 1; min-height: 0; overflow: hidden; }
|
|
|
|
|
|
|
|
|
|
.wiki-sidebar { width: 300px; min-width: 300px; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 14px; min-height: 0; }
|
|
|
|
|
|
|
|
|
|
.sidebar-section { display: flex; flex-direction: column; gap: 8px; }
|
|
|
|
|
|
|
|
|
|
.sidebar-title { font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--mc-text-tertiary); letter-spacing: 0.1em; }
|
|
|
|
|
|
|
|
|
|
.sidebar-search { width: 100%; padding: 9px 12px; border: 1px solid var(--mc-border); border-radius: 12px; font-size: 13px; background: var(--mc-bg-muted); color: var(--mc-text-primary); outline: none; }
|
|
|
|
|
.sidebar-search:focus { border-color: var(--mc-primary); }
|
|
|
|
|
|
|
|
|
|
.kb-list, .page-list { display: flex; flex-direction: column; gap: 4px; }
|
|
|
|
|
|
|
|
|
|
.kb-item, .page-item { padding: 10px 12px; border-radius: 16px; cursor: pointer; transition: background 0.15s, transform 0.15s; position: relative; border: 1px solid transparent; }
|
|
|
|
|
.kb-item:hover, .page-item:hover { background: var(--mc-bg-muted); transform: translateY(-1px); }
|
|
|
|
|
.kb-item.active, .page-item.active { background: var(--mc-primary-bg); border-color: rgba(217, 109, 70, 0.12); }
|
|
|
|
|
|
|
|
|
|
.kb-item-name { font-size: 14px; font-weight: 700; color: var(--mc-text-primary); margin-bottom: 4px; }
|
|
|
|
|
.kb-item-meta, .page-item-meta { font-size: 12px; color: var(--mc-text-secondary); display: flex; gap: 8px; }
|
|
|
|
|
.page-item-title { font-size: 13px; color: var(--mc-text-primary); font-weight: 600; }
|
|
|
|
|
.page-item-body { flex: 1; min-width: 0; }
|
|
|
|
|
|
|
|
|
|
/* Batch mode */
|
|
|
|
|
.sidebar-title-row { display: flex; justify-content: space-between; align-items: center; }
|
|
|
|
|
.batch-toggle { padding: 4px 8px; border: 1px solid var(--mc-border); border-radius: 8px; background: var(--mc-bg-elevated); color: var(--mc-text-secondary); cursor: pointer; font-size: 11px; display: flex; align-items: center; gap: 4px; }
|
|
|
|
|
.batch-toggle:hover { background: var(--mc-bg-sunken); }
|
|
|
|
|
.batch-toggle.active { color: var(--mc-primary); border-color: var(--mc-primary); }
|
|
|
|
|
.batch-bar { display: flex; justify-content: space-between; align-items: center; padding: 6px 8px; background: var(--mc-bg-muted); border-radius: 10px; }
|
|
|
|
|
.batch-check-all { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--mc-text-secondary); cursor: pointer; }
|
|
|
|
|
.batch-check-all input { cursor: pointer; }
|
|
|
|
|
.batch-delete-btn { padding: 4px 12px; border: none; border-radius: 8px; font-size: 12px; font-weight: 600; cursor: pointer; background: var(--el-color-danger-light-9, #fef0f0); color: var(--el-color-danger, #f56c6c); }
|
|
|
|
|
.batch-delete-btn:hover:not(:disabled) { background: var(--el-color-danger-light-7, #fab6b6); }
|
|
|
|
|
.batch-delete-btn:disabled { opacity: 0.4; cursor: not-allowed; }
|
|
|
|
|
.page-checkbox { flex-shrink: 0; cursor: pointer; margin-right: 8px; }
|
|
|
|
|
.page-item { display: flex; align-items: center; }
|
|
|
|
|
|
|
|
|
|
.kb-health { display: flex; flex-direction: column; gap: 2px; margin-top: 4px; }
|
|
|
|
|
.health-enriched { font-size: 11px; color: #22c55e; }
|
|
|
|
|
.health-failed { font-size: 11px; color: var(--mc-danger); }
|
|
|
|
|
|
|
|
|
|
.kb-status { position: absolute; right: 8px; top: 8px; font-size: 10px; padding: 2px 6px; border-radius: 9999px; text-transform: uppercase; font-weight: 500; }
|
|
|
|
|
.kb-status.active { background: rgba(90, 138, 90, 0.15); color: var(--mc-success); }
|
|
|
|
|
.kb-status.processing { background: var(--mc-primary-bg); color: var(--mc-primary); }
|
|
|
|
|
.kb-status.error { background: var(--mc-danger-bg); color: var(--mc-danger); }
|
|
|
|
|
|
|
|
|
|
/* Content area */
|
|
|
|
|
.wiki-content { flex: 1; overflow: hidden; min-width: 0; padding: 16px; display: flex; flex-direction: column; min-height: 0; }
|
|
|
|
|
|
|
|
|
|
.wiki-content-body {
|
|
|
|
|
/* Sidebar */
|
|
|
|
|
.wiki-sidebar {
|
|
|
|
|
width: 272px;
|
|
|
|
|
min-width: 272px;
|
|
|
|
|
overflow-y: auto;
|
|
|
|
|
padding: 14px 12px;
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
flex: 1;
|
|
|
|
|
gap: 16px;
|
|
|
|
|
min-height: 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.content-tabs { display: inline-flex; gap: 4px; padding: 4px; background: var(--mc-bg-muted); border-radius: 16px; margin-bottom: 14px; border: 1px solid var(--mc-border-light); align-self: flex-start; }
|
|
|
|
|
.tab-btn { padding: 9px 14px; border: none; background: none; cursor: pointer; font-size: 13px; color: var(--mc-text-secondary); border-radius: 12px; transition: all 0.15s; font-weight: 600; }
|
|
|
|
|
.tab-btn:hover { color: var(--mc-text-primary); }
|
|
|
|
|
.tab-btn.active { color: var(--mc-primary); background: var(--mc-bg-elevated); box-shadow: var(--mc-shadow-soft); }
|
|
|
|
|
.sidebar-section { display: flex; flex-direction: column; gap: 8px; }
|
|
|
|
|
.sidebar-section--pages { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 6px; overflow: hidden; }
|
|
|
|
|
|
|
|
|
|
.tab-content { flex: 1; min-height: 0; overflow-y: auto; padding-right: 2px; }
|
|
|
|
|
|
|
|
|
|
.tab-content--config {
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
padding-right: 0;
|
|
|
|
|
.sidebar-label {
|
|
|
|
|
font-size: 10px;
|
|
|
|
|
font-weight: 700;
|
|
|
|
|
text-transform: uppercase;
|
|
|
|
|
letter-spacing: 0.1em;
|
|
|
|
|
color: var(--mc-text-tertiary);
|
|
|
|
|
padding: 0 4px;
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
gap: 6px;
|
|
|
|
|
}
|
|
|
|
|
.count-badge {
|
|
|
|
|
display: inline-flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
min-width: 18px;
|
|
|
|
|
height: 16px;
|
|
|
|
|
padding: 0 5px;
|
|
|
|
|
background: var(--mc-bg-sunken);
|
|
|
|
|
color: var(--mc-text-secondary);
|
|
|
|
|
border-radius: 9999px;
|
|
|
|
|
font-size: 10px;
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
letter-spacing: 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 240px; color: var(--mc-text-tertiary); text-align: center; padding: 24px; }
|
|
|
|
|
/* Search */
|
|
|
|
|
.search-wrap {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
gap: 7px;
|
|
|
|
|
padding: 7px 10px;
|
|
|
|
|
background: var(--mc-bg-muted);
|
|
|
|
|
border: 1px solid var(--mc-border-light);
|
|
|
|
|
border-radius: 10px;
|
|
|
|
|
color: var(--mc-text-tertiary);
|
|
|
|
|
transition: border-color 0.15s;
|
|
|
|
|
}
|
|
|
|
|
.search-wrap:focus-within { border-color: var(--mc-primary); }
|
|
|
|
|
.search-input { flex: 1; border: none; background: transparent; font-size: 12px; color: var(--mc-text-primary); outline: none; }
|
|
|
|
|
.search-input::placeholder { color: var(--mc-text-tertiary); }
|
|
|
|
|
.search-clear { border: none; background: none; cursor: pointer; color: var(--mc-text-tertiary); font-size: 11px; padding: 0; line-height: 1; }
|
|
|
|
|
.search-clear:hover { color: var(--mc-text-secondary); }
|
|
|
|
|
|
|
|
|
|
/* KB list */
|
|
|
|
|
.kb-list { display: flex; flex-direction: column; gap: 4px; }
|
|
|
|
|
.kb-item {
|
|
|
|
|
padding: 10px 12px;
|
|
|
|
|
border-radius: 12px;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
transition: background 0.15s;
|
|
|
|
|
border: 1px solid transparent;
|
|
|
|
|
}
|
|
|
|
|
.kb-item:hover { background: var(--mc-bg-muted); }
|
|
|
|
|
.kb-item.active { background: var(--mc-primary-bg); border-color: rgba(217, 109, 70, 0.15); }
|
|
|
|
|
.kb-item-name { font-size: 13px; font-weight: 600; color: var(--mc-text-primary); margin-bottom: 5px; }
|
|
|
|
|
.kb-item-stats { display: flex; align-items: center; gap: 6px; }
|
|
|
|
|
.stat-chip {
|
|
|
|
|
display: inline-flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
gap: 3px;
|
|
|
|
|
font-size: 11px;
|
|
|
|
|
color: var(--mc-text-tertiary);
|
|
|
|
|
}
|
|
|
|
|
.kb-status-dot {
|
|
|
|
|
width: 6px;
|
|
|
|
|
height: 6px;
|
|
|
|
|
border-radius: 9999px;
|
|
|
|
|
margin-left: auto;
|
|
|
|
|
}
|
|
|
|
|
.kb-status-dot.active { background: var(--mc-success); }
|
|
|
|
|
.kb-status-dot.processing { background: var(--mc-primary); animation: pulse 1.4s ease-in-out infinite; }
|
|
|
|
|
.kb-status-dot.error { background: var(--mc-danger); }
|
|
|
|
|
.kb-warn { font-size: 11px; color: var(--mc-danger); margin-top: 3px; }
|
|
|
|
|
|
|
|
|
|
@keyframes pulse {
|
|
|
|
|
0%, 100% { opacity: 1; }
|
|
|
|
|
50% { opacity: 0.4; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Page list and groups */
|
|
|
|
|
.sidebar-title-row { display: flex; justify-content: space-between; align-items: center; padding: 0 4px; }
|
|
|
|
|
.sidebar-title-actions { display: flex; gap: 4px; }
|
|
|
|
|
.icon-btn {
|
|
|
|
|
width: 24px;
|
|
|
|
|
height: 24px;
|
|
|
|
|
border: 1px solid var(--mc-border-light);
|
|
|
|
|
background: var(--mc-bg-elevated);
|
|
|
|
|
border-radius: 7px;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
color: var(--mc-text-secondary);
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
font-size: 11px;
|
|
|
|
|
transition: all 0.15s;
|
|
|
|
|
}
|
|
|
|
|
.icon-btn:hover { background: var(--mc-bg-sunken); color: var(--mc-primary); }
|
|
|
|
|
.icon-btn--active { color: var(--mc-primary); border-color: var(--mc-primary); }
|
|
|
|
|
|
|
|
|
|
.page-list { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
|
|
|
|
|
|
|
|
|
|
.page-group { display: flex; flex-direction: column; }
|
|
|
|
|
.group-header {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
gap: 5px;
|
|
|
|
|
padding: 5px 6px;
|
|
|
|
|
border: none;
|
|
|
|
|
background: none;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
border-radius: 8px;
|
|
|
|
|
transition: background 0.12s;
|
|
|
|
|
width: 100%;
|
|
|
|
|
text-align: left;
|
|
|
|
|
}
|
|
|
|
|
.group-header:hover { background: var(--mc-bg-muted); }
|
|
|
|
|
.group-chevron { color: var(--mc-text-tertiary); transition: transform 0.18s; flex-shrink: 0; }
|
|
|
|
|
.group-chevron.expanded { transform: rotate(90deg); }
|
|
|
|
|
.group-label { font-size: 11px; font-weight: 600; color: var(--mc-text-secondary); flex: 1; }
|
|
|
|
|
.group-count {
|
|
|
|
|
font-size: 10px;
|
|
|
|
|
padding: 1px 5px;
|
|
|
|
|
background: var(--mc-bg-sunken);
|
|
|
|
|
color: var(--mc-text-tertiary);
|
|
|
|
|
border-radius: 9999px;
|
|
|
|
|
font-variant-numeric: tabular-nums;
|
|
|
|
|
}
|
|
|
|
|
.group-items { display: flex; flex-direction: column; gap: 1px; padding-left: 12px; }
|
|
|
|
|
|
|
|
|
|
.page-item {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
gap: 8px;
|
|
|
|
|
padding: 7px 10px;
|
|
|
|
|
border-radius: 10px;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
transition: background 0.12s;
|
|
|
|
|
border: 1px solid transparent;
|
|
|
|
|
}
|
|
|
|
|
.page-item:hover { background: var(--mc-bg-muted); }
|
|
|
|
|
.page-item.active { background: var(--mc-primary-bg); border-color: rgba(217, 109, 70, 0.12); }
|
|
|
|
|
.page-item-body { flex: 1; min-width: 0; }
|
|
|
|
|
.page-item-title { font-size: 12px; color: var(--mc-text-primary); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
|
|
|
|
.page-item-meta { display: flex; align-items: center; gap: 4px; margin-top: 2px; }
|
|
|
|
|
.meta-text { font-size: 10px; color: var(--mc-text-tertiary); }
|
|
|
|
|
.type-chip { font-size: 10px; padding: 1px 5px; background: var(--mc-bg-sunken); border-radius: 4px; color: var(--mc-text-tertiary); }
|
|
|
|
|
.edit-dot { width: 5px; height: 5px; border-radius: 9999px; flex-shrink: 0; }
|
|
|
|
|
.edit-dot.manual { background: var(--mc-primary); }
|
|
|
|
|
.page-checkbox { flex-shrink: 0; cursor: pointer; }
|
|
|
|
|
|
|
|
|
|
.load-more-btn {
|
|
|
|
|
width: 100%;
|
|
|
|
|
padding: 6px;
|
|
|
|
|
border: 1px dashed var(--mc-border-light);
|
|
|
|
|
background: none;
|
|
|
|
|
border-radius: 8px;
|
|
|
|
|
font-size: 11px;
|
|
|
|
|
color: var(--mc-text-tertiary);
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
transition: all 0.15s;
|
|
|
|
|
margin-top: 2px;
|
|
|
|
|
}
|
|
|
|
|
.load-more-btn:hover { border-color: var(--mc-primary); color: var(--mc-primary); background: var(--mc-primary-bg); }
|
|
|
|
|
|
|
|
|
|
.pagination-row { padding: 4px 0; }
|
|
|
|
|
|
|
|
|
|
/* Batch */
|
|
|
|
|
.batch-bar { display: flex; justify-content: space-between; align-items: center; padding: 5px 8px; background: var(--mc-bg-muted); border-radius: 8px; }
|
|
|
|
|
.batch-check-all { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--mc-text-secondary); cursor: pointer; }
|
|
|
|
|
.batch-check-all input { cursor: pointer; }
|
|
|
|
|
.batch-delete-btn { padding: 3px 10px; border: none; border-radius: 6px; font-size: 11px; font-weight: 600; cursor: pointer; background: rgba(245, 108, 108, 0.1); color: var(--el-color-danger, #f56c6c); }
|
|
|
|
|
.batch-delete-btn:hover:not(:disabled) { background: rgba(245, 108, 108, 0.2); }
|
|
|
|
|
.batch-delete-btn:disabled { opacity: 0.4; cursor: not-allowed; }
|
|
|
|
|
|
|
|
|
|
.empty-hint { font-size: 13px; color: var(--mc-text-tertiary); padding: 12px 4px; }
|
|
|
|
|
|
|
|
|
|
/* Content area */
|
|
|
|
|
.wiki-content { flex: 1; overflow: hidden; min-width: 0; padding: 16px; display: flex; flex-direction: column; min-height: 0; }
|
|
|
|
|
.wiki-content-body { display: flex; flex-direction: column; flex: 1; min-height: 0; }
|
|
|
|
|
.content-tabs { display: inline-flex; gap: 4px; padding: 4px; background: var(--mc-bg-muted); border-radius: 14px; margin-bottom: 14px; border: 1px solid var(--mc-border-light); align-self: flex-start; }
|
|
|
|
|
.tab-btn { padding: 7px 14px; border: none; background: none; cursor: pointer; font-size: 13px; color: var(--mc-text-secondary); border-radius: 10px; transition: all 0.15s; font-weight: 500; }
|
|
|
|
|
.tab-btn:hover { color: var(--mc-text-primary); }
|
|
|
|
|
.tab-btn.active { color: var(--mc-primary); background: var(--mc-bg-elevated); box-shadow: 0 1px 4px rgba(0,0,0,0.08); font-weight: 600; }
|
|
|
|
|
.tab-content { flex: 1; min-height: 0; overflow-y: auto; padding-right: 2px; }
|
|
|
|
|
.tab-content--config { overflow: hidden; padding-right: 0; }
|
|
|
|
|
|
|
|
|
|
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; min-height: 200px; color: var(--mc-text-tertiary); text-align: center; }
|
|
|
|
|
.empty-state p { font-size: 14px; }
|
|
|
|
|
|
|
|
|
|
/* Modal */
|
|
|
|
|
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.4); display: flex; align-items: center; justify-content: center; z-index: 1000; padding: 20px; }
|
|
|
|
|
.modal-content { background: var(--mc-bg-elevated); border: 1px solid var(--mc-border); border-radius: 16px; width: 100%; max-width: 520px; padding: 24px; box-shadow: 0 20px 60px rgba(0,0,0,0.15); }
|
|
|
|
|
.modal-title { font-size: 18px; font-weight: 600; color: var(--mc-text-primary); margin: 0 0 16px; }
|
|
|
|
|
|
|
|
|
|
/* Form */
|
|
|
|
|
.form-group { margin-bottom: 16px; }
|
|
|
|
|
.form-group label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 6px; color: var(--mc-text-secondary); }
|
|
|
|
|
.form-input { width: 100%; padding: 8px 12px; border: 1px solid var(--mc-border); border-radius: 8px; font-size: 14px; background: var(--mc-bg-sunken); color: var(--mc-text-primary); outline: none; font-family: inherit; }
|
|
|
|
|
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.4); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; z-index: 1000; padding: 20px; }
|
|
|
|
|
.modal-content { background: var(--mc-bg-elevated); border: 1px solid var(--mc-border); border-radius: 18px; width: 100%; max-width: 520px; padding: 24px; box-shadow: 0 24px 64px rgba(0,0,0,0.18); }
|
|
|
|
|
.modal-title { font-size: 17px; font-weight: 700; color: var(--mc-text-primary); margin: 0 0 18px; }
|
|
|
|
|
.form-group { margin-bottom: 14px; }
|
|
|
|
|
.form-group label { display: block; font-size: 12px; font-weight: 600; margin-bottom: 6px; color: var(--mc-text-secondary); text-transform: uppercase; letter-spacing: 0.04em; }
|
|
|
|
|
.form-input { width: 100%; padding: 9px 12px; border: 1px solid var(--mc-border); border-radius: 10px; font-size: 14px; background: var(--mc-bg-muted); color: var(--mc-text-primary); outline: none; font-family: inherit; box-sizing: border-box; transition: border-color 0.15s; }
|
|
|
|
|
.form-input:focus { border-color: var(--mc-primary); box-shadow: 0 0 0 2px rgba(217,119,87,0.1); }
|
|
|
|
|
|
|
|
|
|
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
|
|
|
|
|
|
|
|
|
|
@media (max-width: 980px) {
|
|
|
|
|
.wiki-frame {
|
|
|
|
|
height: 100%;
|
|
|
|
|
min-height: calc(100vh - 28px);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.wiki-layout {
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
overflow: visible;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.wiki-sidebar {
|
|
|
|
|
width: 100%;
|
|
|
|
|
min-width: 0;
|
|
|
|
|
max-height: 280px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.wiki-content {
|
|
|
|
|
overflow: visible;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.tab-content {
|
|
|
|
|
overflow: visible;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.tab-content--config {
|
|
|
|
|
overflow: visible;
|
|
|
|
|
}
|
|
|
|
|
.wiki-frame { height: 100%; min-height: calc(100vh - 28px); }
|
|
|
|
|
.wiki-layout { flex-direction: column; overflow: visible; }
|
|
|
|
|
.wiki-sidebar { width: 100%; min-width: 0; max-height: 320px; }
|
|
|
|
|
.wiki-content { overflow: visible; }
|
|
|
|
|
.tab-content { overflow: visible; }
|
|
|
|
|
.tab-content--config { overflow: visible; }
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|
|