PluginProbe
BetterDocs – AI Documentation, Knowledge Base, MCP Server, Docs, Wikis, FAQ & Chatbot / 4.9.5
BetterDocs – AI Documentation, Knowledge Base, MCP Server, Docs, Wikis, FAQ & Chatbot v4.9.5
4.9.5 4.9.4 4.9.3 4.9.2 4.9.1 4.9.0 4.8.2 4.8.1 4.8.0 4.7.0 4.6.2 4.6.1 4.6.0 4.5.6 4.5.5 4.5.4 4.5.3 4.5.2 4.5.1 4.5.0 4.4.1 4.4.0 3.3.4 3.4.0 3.4.1 All 203 releases
betterdocs / react-src / admin / dashboard / loaders / NoDocsLoader.js

NoDocsLoader.js in BetterDocs – AI Documentation, Knowledge Base, MCP Server, Docs, Wikis, FAQ & Chatbot 4.9.5, at react-src/admin/dashboard/loaders/NoDocsLoader.js

49 lines 2.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 import React from "react";
2 import Skeleton, { SkeletonTheme } from "react-loading-skeleton";
3 import "react-loading-skeleton/dist/skeleton.css";
4
5 // Match the plugin's other skeletons (e.g. GridLoader): a flat var(--text-color-150)
6 // fill — base === highlight, so no shimmer — instead of react-loading-skeleton's
7 // default #ebebeb, which looked different from the rest of the dashboard.
8 const SK = { baseColor: "var(--text-color-150)", highlightColor: "var(--text-color-150)" };
9
10 /**
11 * Loading skeleton shaped exactly like the "No Category Found" empty card
12 * (NoDocsBody). Shown while the All Docs panel loads on a known-empty knowledge
13 * base (betterdocs_admin.kb_is_empty), so an empty install transitions
14 * skeleton-card -> empty card with no misleading category/docs skeleton in
15 * between. Reuses NoDocsBody's wrapper classes so the card frame, padding and
16 * centering match 1:1; only the content is replaced with skeleton blocks.
17 */
18 const NoDocsLoader = () => (
19 <section className="betterdocs-dashboard-body">
20 <SkeletonTheme {...SK}>
21 <div className="betterdocs-no-docs-wrapper betterdocs-sd-empty-card">
22 <div className="betterdocs-no-docs-img-wrap">
23 <Skeleton height={90} width={103} borderRadius={12} />
24 </div>
25
26 <div className="betterdocs-no-docs-content">
27 <h3 className="betterdocs-no-docs-title">
28 <Skeleton height={26} width={220} borderRadius={6} />
29 </h3>
30 <p className="betterdocs-no-docs-text">
31 <Skeleton height={15} count={2} borderRadius={4} />
32 </p>
33
34 <div className="betterdocs-sd-empty-actions">
35 <Skeleton height={48} borderRadius={8} />
36 <Skeleton height={48} borderRadius={8} />
37 </div>
38
39 <div className="betterdocs-sd-empty-badge">
40 <Skeleton height={20} width={130} borderRadius={10} />
41 </div>
42 </div>
43 </div>
44 </SkeletonTheme>
45 </section>
46 );
47
48 export default NoDocsLoader;
49