- 移除文章和页面(新建与编辑)右上角的“返回”按钮 - 移除文章编辑页面“保存”按钮上的图标及相关样式 - 将文章新建页面的“发布...”按钮文案精简为“发布” - 清理未使用的 `ArrowLeft`、`Save` 图标及 `resolve` 导入引用
This commit is contained in:
1 parent
6bbb22e71d
commit
f1d63c36d1
4 files changed
+4
-36
No files matched your search
@@ -10,7 +10,6 @@
|
||||
import EditorSidebarTabs from '$lib/components/admin/EditorSidebarTabs.svelte';
|
||||
import ArticleAttachments from '$lib/components/admin/ArticleAttachments.svelte';
|
||||
import { untrack } from 'svelte';
|
||||
import { ArrowLeft } from '@lucide/svelte';
|
||||
|
||||
let { data, form }: { data: PageData; form: ActionData } = $props();
|
||||
const initialData = $state.snapshot(untrack(() => data));
|
||||
@@ -32,9 +31,6 @@
|
||||
<Button href={resolve('/[slug]', { slug: data.page.slug })} target="_blank" variant="secondary">
|
||||
前台预览
|
||||
</Button>
|
||||
<Button href={resolve('/admin/pages')} variant="secondary">
|
||||
<ArrowLeft size={14} style="margin-right: 6px;" aria-hidden="true" />返回
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
<script lang="ts">
|
||||
import { resolve } from '$app/paths';
|
||||
import { page } from '$app/stores';
|
||||
import type { ActionData } from './$types';
|
||||
import ContentEditor from '$lib/components/admin/ContentEditor.svelte';
|
||||
@@ -11,7 +10,6 @@
|
||||
import ArticleAttachments from '$lib/components/admin/ArticleAttachments.svelte';
|
||||
|
||||
import { createSlugAutoHandler } from '$lib/utils/slugify';
|
||||
import { ArrowLeft } from '@lucide/svelte';
|
||||
|
||||
let { form }: { form: ActionData } = $props();
|
||||
|
||||
@@ -47,9 +45,6 @@
|
||||
<h2>新建独立{$page.data.aliases?.page || '页面'}</h2>
|
||||
<div class="header-actions">
|
||||
<Button type="submit" form="page-form" variant="primary">发布</Button>
|
||||
<Button href={resolve('/admin/pages')} variant="secondary">
|
||||
<ArrowLeft size={14} style="margin-right: 6px;" aria-hidden="true" />返回
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
<script lang="ts">
|
||||
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||
import { resolve } from '$app/paths';
|
||||
import { page } from '$app/stores';
|
||||
import type { PageData, ActionData } from './$types';
|
||||
import { deserialize } from '$app/forms';
|
||||
import { Save, X } from '@lucide/svelte';
|
||||
import { X } from '@lucide/svelte';
|
||||
import ContentEditor from '$lib/components/admin/ContentEditor.svelte';
|
||||
import { EditorOutline } from '$lib/editor/outline.svelte';
|
||||
import FeaturedImagePicker from '$lib/components/admin/FeaturedImagePicker.svelte';
|
||||
@@ -114,11 +113,7 @@
|
||||
<div class="admin-page-header">
|
||||
<h2>编辑</h2>
|
||||
<div class="header-actions">
|
||||
<Button type="submit" form="post-form" variant="primary">
|
||||
<Save class="btn-icon" size={16} aria-hidden="true" />
|
||||
保存
|
||||
</Button>
|
||||
<Button href={resolve('/admin/posts')} variant="secondary">返回</Button>
|
||||
<Button type="submit" form="post-form" variant="primary">保存</Button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -322,18 +317,6 @@
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
:global(.btn-icon) {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
flex: none;
|
||||
margin-right: 6px;
|
||||
stroke: currentColor;
|
||||
stroke-width: 2;
|
||||
stroke-linecap: round;
|
||||
stroke-linejoin: round;
|
||||
fill: none;
|
||||
}
|
||||
|
||||
.editor-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
<script lang="ts">
|
||||
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||
/* eslint-disable @typescript-eslint/no-unused-vars */
|
||||
import { resolve } from '$app/paths';
|
||||
import { page } from '$app/stores';
|
||||
import type { PageData, ActionData } from './$types';
|
||||
import { deserialize } from '$app/forms';
|
||||
import { ArrowLeft, X } from '@lucide/svelte';
|
||||
import { X } from '@lucide/svelte';
|
||||
import ContentEditor from '$lib/components/admin/ContentEditor.svelte';
|
||||
import { EditorOutline } from '$lib/editor/outline.svelte';
|
||||
import FeaturedImagePicker from '$lib/components/admin/FeaturedImagePicker.svelte';
|
||||
@@ -132,12 +131,7 @@
|
||||
<div class="admin-page-header">
|
||||
<h2>新{$page.data.aliases?.post || '文章'}</h2>
|
||||
<div class="header-actions">
|
||||
<Button type="submit" form="post-form" variant="primary">
|
||||
发布{$page.data.aliases?.post || '文章'}
|
||||
</Button>
|
||||
<Button href={resolve('/admin/posts')} variant="secondary">
|
||||
<ArrowLeft size={14} style="margin-right: 6px;" aria-hidden="true" />返回
|
||||
</Button>
|
||||
<Button type="submit" form="post-form" variant="primary">发布</Button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in new issue
Block a user