123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- import { QueentreeExplorer_Storage } from "@queenjs-modules/queentree-explorer/storage";
- import {
- HostRootItem,
- NodeRootItem,
- } from "@queenjs-modules/queentree-explorer/typings";
- QueentreeExplorer_Storage.setVersion("1.0.0").setDefaultValue(() => {
- const expHosts: { [name: string]: HostRootItem } = {};
- const cloudRootNode: NodeRootItem = {
- names: ["云盘"],
- ids: [Math.random().toString()],
- nodeType: "host",
- tabPerms: ["rename", "login"],
- nodePerms: ["editable", "saveAs"],
- };
- const platformRootNode: NodeRootItem = {
- names: ["平台", "楦库", "面料"],
- ids: [
- cloudRootNode.ids[0],
- "628b4ae8633d10f8e3658557",
- "62a300a0a4fd6456392ebe76",
- ],
- nodeType: "branch",
- assetType: 31,
- tabPerms: [],
- nodePerms: ["saveAs"],
- };
- const myRootNodes = [cloudRootNode];
- expHosts[cloudRootNode.ids[0]] = {
- baseURL: "https://www.3dqueen.cloud/tree/v1/assetcenter",
- authURL: "https://www.3dqueen.cloud/cloud/v1/usercenter",
- authKey: "queentreesku3d",
- };
- const expNodeRoots = [...myRootNodes, platformRootNode];
- return {
- expHosts,
- expWindows: [
- {
- groupName: "我的资源",
- rootNodeIds: myRootNodes.map((rootNode) => rootNode.ids.at(-1) || ""),
- },
- {
- groupName: "平台资源",
- rootNodeIds: [platformRootNode.ids.at(-1) as string],
- },
- {
- groupName: "共享资源",
- rootNodeIds: [],
- showShareBtn: true,
- },
- ],
- expNodeRoots,
- expActiveState: {
- currWindowName: "我的资源",
- },
- };
- });
|