refactor(admin): drop homepage mixed content model and publish-resource preset
This commit is contained in:
1 parent
fb1a4e110c
commit
0ad41715e2
7 files changed
+13
-54
No files matched your search
@@ -379,7 +379,6 @@ const addPresetOptions = computed(() => {
|
||||
const presets = [
|
||||
{ label: '写文章', key: 'post' },
|
||||
{ label: '投稿页', key: 'submit' },
|
||||
{ label: '发布资源', key: 'resource' },
|
||||
{ label: '用户中心创作', key: 'profile' },
|
||||
]
|
||||
|
||||
@@ -493,7 +492,6 @@ function applyAddPreset(key) {
|
||||
const presetFactories = {
|
||||
post: () => ({ label: '写文章', icon: 'fas fa-pen-nib', url: `${adminUrl || siteUrl}/post-new.php` }),
|
||||
submit: () => ({ label: '投稿页', icon: 'fas fa-paper-plane', url: `${siteUrl}/submit/` }),
|
||||
resource: () => ({ label: '发布资源', icon: 'fas fa-box-open', url: `${siteUrl}/resources/` }),
|
||||
profile: () => ({ label: '创作中心', icon: 'fas fa-user-edit', url: `${siteUrl}/user/` }),
|
||||
}
|
||||
|
||||
@@ -522,7 +520,6 @@ function getAddPresetValue(key) {
|
||||
const presetFactories = {
|
||||
post: () => ({ label: '写文章', icon: 'fas fa-pen-nib', url: `${adminUrl || siteUrl}/post-new.php` }),
|
||||
submit: () => ({ label: '投稿页', icon: 'fas fa-paper-plane', url: `${siteUrl}/submit/` }),
|
||||
resource: () => ({ label: '发布资源', icon: 'fas fa-box-open', url: `${siteUrl}/resources/` }),
|
||||
profile: () => ({ label: '创作中心', icon: 'fas fa-user-edit', url: `${siteUrl}/user/` }),
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<div class="aksrt-page-container content-page">
|
||||
<PageHeader
|
||||
title="首页配置"
|
||||
desc="按 Zibll 首页主线配置内容类型、Tab、主列表与基础交互。列表/卡片显示请在「文章列表」中设置。"
|
||||
desc="配置首页主列表、分类 Tab 与基础交互。列表/卡片显示请在「文章列表」中设置。"
|
||||
>
|
||||
<template #actions>
|
||||
<n-button type="primary" :loading="saving" @click="handleSave">保存设置</n-button>
|
||||
@@ -13,25 +13,11 @@
|
||||
<n-tab-pane name="stream" tab="主列表 & Tab">
|
||||
<n-spin :show="loading" style="width:100%; min-height:200px;">
|
||||
<n-card class="aksrt-section-card" style="margin-bottom:16px;">
|
||||
<template #header><strong>首页内容</strong></template>
|
||||
<template #header><strong>首页说明</strong></template>
|
||||
<n-form :model="form" label-placement="left" label-width="160" class="aksrt-form">
|
||||
<n-form-item label="首页内容模型">
|
||||
<n-radio-group v-model:value="form.homepage_content_model">
|
||||
<n-space vertical>
|
||||
<n-radio value="mixed">
|
||||
<n-text>混合内容流</n-text>
|
||||
<n-text depth="3" style="margin-left:8px;">文章 + 资源,贴近 Zibll 首页主流呈现。</n-text>
|
||||
</n-radio>
|
||||
<n-radio value="post">
|
||||
<n-text>纯文章流</n-text>
|
||||
<n-text depth="3" style="margin-left:8px;">仅标准文章,适合纯资讯站点。</n-text>
|
||||
</n-radio>
|
||||
</n-space>
|
||||
</n-radio-group>
|
||||
</n-form-item>
|
||||
<n-form-item label="首页说明">
|
||||
<n-form-item label="内容说明">
|
||||
<n-alert type="info" :show-icon="false">
|
||||
当前首页已切换为固定骨架模式,不再使用旧版自由模块画布、导入导出预设或历史模块桥接。
|
||||
首页主列表只使用普通文章。下载/付费是文章能力(meta),不是第二种内容类型。当前为固定骨架模式,不再使用旧版自由模块画布。
|
||||
</n-alert>
|
||||
</n-form-item>
|
||||
</n-form>
|
||||
@@ -228,7 +214,6 @@ const allSortOptions = [
|
||||
]
|
||||
|
||||
const form = reactive({
|
||||
homepage_content_model: 'mixed',
|
||||
home_posts_list_s: true,
|
||||
home_list1_orderby_s: true,
|
||||
home_list1_orderby_option: {
|
||||
@@ -296,7 +281,6 @@ async function loadSettings() {
|
||||
const res = await api.getHomepageSettings()
|
||||
const d = res?.data || {}
|
||||
|
||||
form.homepage_content_model = d.homepage_content_model || 'mixed'
|
||||
form.home_posts_list_s = d.home_posts_list_s !== false && d.home_posts_list_enabled !== false
|
||||
form.home_list1_orderby_s = d.home_list1_orderby_s !== false && d.home_list_sort_enabled !== false
|
||||
const orderOpt = d.home_list1_orderby_option && typeof d.home_list1_orderby_option === 'object' ? d.home_list1_orderby_option : {}
|
||||
|
||||
Reference in new issue
Block a user