massCodeIO / massCode

A free and open source code snippets manager for developers
https://masscode.io
GNU Affero General Public License v3.0
5.76k stars 199 forks source link

[Bug]: The `db.json` content cannot be displayed normally on the interface #311

Closed buxinshou closed 1 year ago

buxinshou commented 1 year ago

Describe the bug

The db.json content cannot be displayed normally on the interface image image

To reproduce

  1. Click the massCode icon to display the home page
  2. FOLDERS Folder contents are not displayed

Version

3.4.1

OS

Windows 11 21H2

Validations

github-actions[bot] commented 1 year ago

Hello @buxinshou. Please describe in detail the sequence of actions that leads to the bug (skip it if it's already there). Add screenshots of errors from the console. If possible add a video. Issues marked with need reproduction will be closed if they have no activity within 3 days.

antonreshetov commented 1 year ago

@buxinshou If the structure is intact, there will be no problem. Check your db.json

buxinshou commented 1 year ago

@buxinshou If the structure is intact, there will be no problem. Check your db.json

{
  "folders": [
    {
      "id": "2ahC9XTz",
      "name": "Default",
      "defaultLanguage": "typescript",
      "parentId": null,
      "isOpen": false,
      "isSystem": false,
      "createdAt": 1663585821989,
      "updatedAt": 1663585821989,
      "index": 0
    },
    {
      "name": "基础",
      "parentId": "IaHU9zO_",
      "isOpen": false,
      "isSystem": false,
      "defaultLanguage": "plain_text",
      "id": "6TAb9iIp",
      "createdAt": 1668498976614,
      "updatedAt": 1668499002971,
      "index": 0
    },
    {
      "name": "常用",
      "parentId": "IaHU9zO_",
      "isOpen": false,
      "isSystem": false,
      "defaultLanguage": "plain_text",
      "id": "4gurVFGy",
      "createdAt": 1668499006630,
      "updatedAt": 1668499049319,
      "index": 1
    },
    {
      "name": "问题",
      "parentId": "IaHU9zO_",
      "isOpen": false,
      "isSystem": false,
      "defaultLanguage": "plain_text",
      "id": "rYsslyHF",
      "createdAt": 1668765973814,
      "updatedAt": 1668765979123,
      "index": 2
    },
    {
      "name": "Caché",
      "parentId": null,
      "isOpen": true,
      "isSystem": false,
      "defaultLanguage": "plain_text",
      "id": "IaHU9zO_",
      "createdAt": 1667234474425,
      "updatedAt": 1667234490577,
      "index": 1
    },
    {
      "name": "常用数据类型",
      "parentId": "6TAb9iIp",
      "isOpen": false,
      "isSystem": false,
      "defaultLanguage": "plain_text",
      "id": "OH09dFbU",
      "createdAt": 1668650316944,
      "updatedAt": 1668766081945,
      "index": 0
    }
  ],
  "snippets": [
    {
      "isDeleted": false,
      "isFavorites": false,
      "folderId": "4gurVFGy",
      "tagsIds": [
        "UWJnTuvQ",
        "adSZ-0Wh"
      ],
      "description": null,
      "name": "当前时间",
      "content": [
        {
          "label": "子片段 1",
          "language": "java",
          "value": "Set start = $ZH  // get current time"
        }
      ],
      "id": "XFG-bKoN",
      "createdAt": 1668503645033,
      "updatedAt": 1668503894349
    },
    {
      "isDeleted": false,
      "isFavorites": false,
      "folderId": "OH09dFbU",
      "tagsIds": [
        "SX3r-J3z",
        "kXdc7v-t"
      ],
      "description": null,
      "name": "数组",
      "content": [
        {
          "label": "子片段 1",
          "language": "java",
          "value": "Set ret = ##Class(%ArrayOfDataTypes).%New()\nD ret.SetAt(Value, Kay)"
        }
      ],
      "id": "Hn7-bvhh",
      "createdAt": 1668650338636,
      "updatedAt": 1668650512273
    },
    {
      "isDeleted": false,
      "isFavorites": false,
      "folderId": "rYsslyHF",
      "tagsIds": [],
      "description": null,
      "name": "x命令未或得预期值",
      "content": [
        {
          "label": "子片段 1",
          "language": "java",
          "value": "http://192.168.127.130:57772/csp/docbook/DocBook.UI.Page.cls?KEY=ROBJ_method_publiclist\n\nMethod name(formal_spec) As returnclass [ PublicList = variablelist ]\n{\n   //implementation\n}"
        }
      ],
      "id": "dSf094bb",
      "createdAt": 1668765985390,
      "updatedAt": 1668766040968
    }
  ],
  "tags": [
    {
      "name": "当前时间",
      "id": "UWJnTuvQ",
      "createdAt": 1668503779564,
      "updatedAt": 1668503779564
    },
    {
      "name": "current time",
      "id": "adSZ-0Wh",
      "createdAt": 1668503792557,
      "updatedAt": 1668503792557
    },
    {
      "name": "数据",
      "id": "-bmMj1CQ",
      "createdAt": 1668650494258,
      "updatedAt": 1668650494258
    },
    {
      "name": "%ArrayOfDataTypes",
      "id": "SX3r-J3z",
      "createdAt": 1668650495265,
      "updatedAt": 1668650495265
    },
    {
      "name": "数组",
      "id": "kXdc7v-t",
      "createdAt": 1668650512250,
      "updatedAt": 1668650512250
    }
  ]
}
antonreshetov commented 1 year ago

Everything looks fine. image