There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.
TypeScript appcrdteditorelectronknowledge-basemarkdownmironotesnotionnotion-alternativerustrust-langrust-languagetabletableviewwhiteboardwikiworkspace
fix: update get-started template
alt0011a969a539d
diff --git a/apps/ligo-virgo/src/pages/workspace/Home.tsx b/apps/ligo-virgo/src/pages/workspace/Home.tsxindex aa7f62cd4f..31de316209 100644--- a/apps/ligo-virgo/src/pages/workspace/Home.tsx+++ b/apps/ligo-virgo/src/pages/workspace/Home.tsx@@ -23,7 +23,11 @@ export function WorkspaceHome() {user_initial_page_id,TemplateFactory.generatePageTemplateByGroupKeys({name: '👋 Get Started with AFFINE',- groupKeys: ['getStartedGroup0', 'getStartedGroup1'],+ groupKeys: [+ 'getStartedGroup0',+ 'getStartedGroup1',+ 'getStartedGroup2',+ ],}));}diff --git a/libs/datasource/db-service/src/services/editor-block/templates/get-started-group1.json b/libs/datasource/db-service/src/services/editor-block/templates/get-started-group1.jsonindex b98c0e2fcb..6098cfbc8c 100644--- a/libs/datasource/db-service/src/services/editor-block/templates/get-started-group1.json+++ b/libs/datasource/db-service/src/services/editor-block/templates/get-started-group1.json@@ -1,83 +1,14 @@{"type": "group",- "properties": {- "recastCurrentViewId": "vwjI_O0J2CEsHyMW",- "metaProps": [- {- "id": "bNjVwBq8YLxvmvr7",- "name": "Status#GVsG",- "type": "status",- "options": [- {- "id": "wusZ8Qht8rsmFD1s",- "name": "No Started",- "color": "#AF1212",- "background": "#FFCECE",- "iconName": "status"- },- {- "id": "qLJFK5bqYhW8NLtQ",- "name": "In Progress",- "color": "#896406",- "background": "#FFF5AB",- "iconName": "status"- },- {- "id": "u0ZgY0sRCnqMkxzn",- "name": "Complete",- "color": "#05683D",- "background": "#C5FBE0",- "iconName": "status"- }- ]- },- {- "id": "DfVMd-EXXO9-WZTO",- "type": "date",- "name": "Date#0neY",- "background": "#6880FF",- "color": "#fff",- "iconName": "date"- },- {- "id": "UgQQiv9D-72nRyYy",- "type": "mention",- "name": "Mention#Recx",- "background": "#FFD568",- "color": "#FFFFFF",- "iconName": "collaborator"- },- {- "id": "ICT1AlKCQkwYLjGs",- "type": "text",- "name": "Text#uObM",- "background": "#67dcaa",- "color": "#FFF",- "iconName": "text"- }- ],- "recastViews": [- {- "id": "qJslh-HAKnf8gGV-",- "name": "Text",- "type": "page"- },- {- "id": "vwjI_O0J2CEsHyMW",- "name": "Kanban",- "type": "kanban",- "groupBy": "bNjVwBq8YLxvmvr7"- }- ]- },+ "properties": {},"blocks": [{- "type": "text",+ "type": "heading1","properties": {"text": {"value": [{- "text": "You can customize a Kanban to fit your workflow. Such as by adding/removing columns or changing Tag App labels."+ "text": "Want to save changes?"}]},@@ -86,48 +17,16 @@"blocks": []},{- "type": "text",- "properties": {- "text": {- "value": [{ "text": "Add a Due Date to set a reminder" }]- },- "recastValues": {- "bNjVwBq8YLxvmvr7": {- "id": "bNjVwBq8YLxvmvr7",- "type": "status",- "value": "wusZ8Qht8rsmFD1s"- },- "DfVMd-EXXO9-WZTO": {- "id": "DfVMd-EXXO9-WZTO",- "type": "date",- "value": 1660233600000- }- },- "textStyle": {}- },- "blocks": []- },- {- "type": "text",+ "type": "todo","properties": {"text": {- "value": [{ "text": "Type @ to mention people" }]- },- "recastValues": {- "bNjVwBq8YLxvmvr7": {- "id": "bNjVwBq8YLxvmvr7",- "type": "status",- "value": "wusZ8Qht8rsmFD1s"- },- "UgQQiv9D-72nRyYy": {- "id": "UgQQiv9D-72nRyYy",- "type": "mention",- "value": "AFFiNE"- }- },- "textStyle": {}- },- "blocks": []+ "value": [+ {+ "text": "Your data is always stored locally first, and only stored where you want it."+ }+ ]+ }+ }},{"type": "todo",@@ -135,66 +34,23 @@"text": {"value": [{- "text": "Check the box to complete the task!"+ "text": "So if you want to make changes, you can open a local folder via SYNC TO DISK (you should find the link at the top-right of the page). "}]- },- "recastValues": {- "bNjVwBq8YLxvmvr7": {- "id": "bNjVwBq8YLxvmvr7",- "type": "status",- "value": "qLJFK5bqYhW8NLtQ"- }- },- "textStyle": {},- "collapsed": { "value": false }- },- "blocks": [- {- "type": "todo",- "properties": {- "text": { "value": [{ "text": "Check 01" }] },- "textStyle": {},- "collapsed": { "value": false },- "checked": { "value": true }- },- "blocks": []- },- {- "type": "todo",- "properties": {- "text": { "value": [{ "text": "Check 02" }] },- "textStyle": {}- },- "blocks": []}- ]+ }},{- "type": "text",+ "type": "todo","properties": {"text": {"value": [{- "text": "The GroupBy button allows you to customise how you want your data grouped just utilize your preferred Tag App settings"+ "text": "Once you have opened a local folder any changes you make will be saved and stored locally on your device only."}]- },- "recastValues": {- "bNjVwBq8YLxvmvr7": {- "id": "bNjVwBq8YLxvmvr7",- "type": "status",- "value": "u0ZgY0sRCnqMkxzn"- },- "ICT1AlKCQkwYLjGs": {- "id": "ICT1AlKCQkwYLjGs",- "type": "text",- "value": "GroupBy others"- }- },- "textStyle": {}- },- "blocks": []+ }+ }}]}diff --git a/libs/datasource/db-service/src/services/editor-block/templates/get-started-group2.json b/libs/datasource/db-service/src/services/editor-block/templates/get-started-group2.jsonnew file mode 100644index 0000000000..b98c0e2fcb--- /dev/null+++ b/libs/datasource/db-service/src/services/editor-block/templates/get-started-group2.json@@ -0,0 +1,200 @@+{+ "type": "group",+ "properties": {+ "recastCurrentViewId": "vwjI_O0J2CEsHyMW",+ "metaProps": [+ {+ "id": "bNjVwBq8YLxvmvr7",+ "name": "Status#GVsG",+ "type": "status",+ "options": [+ {+ "id": "wusZ8Qht8rsmFD1s",+ "name": "No Started",+ "color": "#AF1212",+ "background": "#FFCECE",+ "iconName": "status"+ },+ {+ "id": "qLJFK5bqYhW8NLtQ",+ "name": "In Progress",+ "color": "#896406",+ "background": "#FFF5AB",+ "iconName": "status"+ },+ {+ "id": "u0ZgY0sRCnqMkxzn",+ "name": "Complete",+ "color": "#05683D",+ "background": "#C5FBE0",+ "iconName": "status"+ }+ ]+ },+ {+ "id": "DfVMd-EXXO9-WZTO",+ "type": "date",+ "name": "Date#0neY",+ "background": "#6880FF",+ "color": "#fff",+ "iconName": "date"+ },+ {+ "id": "UgQQiv9D-72nRyYy",+ "type": "mention",+ "name": "Mention#Recx",+ "background": "#FFD568",+ "color": "#FFFFFF",+ "iconName": "collaborator"+ },+ {+ "id": "ICT1AlKCQkwYLjGs",+ "type": "text",+ "name": "Text#uObM",+ "background": "#67dcaa",+ "color": "#FFF",+ "iconName": "text"+ }+ ],+ "recastViews": [+ {+ "id": "qJslh-HAKnf8gGV-",+ "name": "Text",+ "type": "page"+ },+ {+ "id": "vwjI_O0J2CEsHyMW",+ "name": "Kanban",+ "type": "kanban",+ "groupBy": "bNjVwBq8YLxvmvr7"+ }+ ]+ },+ "blocks": [+ {+ "type": "text",+ "properties": {+ "text": {+ "value": [+ {+ "text": "You can customize a Kanban to fit your workflow. Such as by adding/removing columns or changing Tag App labels."+ }+ ]+ },+ "textStyle": {}+ },+ "blocks": []+ },+ {+ "type": "text",+ "properties": {+ "text": {+ "value": [{ "text": "Add a Due Date to set a reminder" }]+ },+ "recastValues": {+ "bNjVwBq8YLxvmvr7": {+ "id": "bNjVwBq8YLxvmvr7",+ "type": "status",+ "value": "wusZ8Qht8rsmFD1s"+ },+ "DfVMd-EXXO9-WZTO": {+ "id": "DfVMd-EXXO9-WZTO",+ "type": "date",+ "value": 1660233600000+ }+ },+ "textStyle": {}+ },+ "blocks": []+ },+ {+ "type": "text",+ "properties": {+ "text": {+ "value": [{ "text": "Type @ to mention people" }]+ },+ "recastValues": {+ "bNjVwBq8YLxvmvr7": {+ "id": "bNjVwBq8YLxvmvr7",+ "type": "status",+ "value": "wusZ8Qht8rsmFD1s"+ },+ "UgQQiv9D-72nRyYy": {+ "id": "UgQQiv9D-72nRyYy",+ "type": "mention",+ "value": "AFFiNE"+ }+ },+ "textStyle": {}+ },+ "blocks": []+ },+ {+ "type": "todo",+ "properties": {+ "text": {+ "value": [+ {+ "text": "Check the box to complete the task!"+ }+ ]+ },+ "recastValues": {+ "bNjVwBq8YLxvmvr7": {+ "id": "bNjVwBq8YLxvmvr7",+ "type": "status",+ "value": "qLJFK5bqYhW8NLtQ"+ }+ },+ "textStyle": {},+ "collapsed": { "value": false }+ },+ "blocks": [+ {+ "type": "todo",+ "properties": {+ "text": { "value": [{ "text": "Check 01" }] },+ "textStyle": {},+ "collapsed": { "value": false },+ "checked": { "value": true }+ },+ "blocks": []+ },+ {+ "type": "todo",+ "properties": {+ "text": { "value": [{ "text": "Check 02" }] },+ "textStyle": {}+ },+ "blocks": []+ }+ ]+ },+ {+ "type": "text",+ "properties": {+ "text": {+ "value": [+ {+ "text": "The GroupBy button allows you to customise how you want your data grouped just utilize your preferred Tag App settings"+ }+ ]+ },+ "recastValues": {+ "bNjVwBq8YLxvmvr7": {+ "id": "bNjVwBq8YLxvmvr7",+ "type": "status",+ "value": "u0ZgY0sRCnqMkxzn"+ },+ "ICT1AlKCQkwYLjGs": {+ "id": "ICT1AlKCQkwYLjGs",+ "type": "text",+ "value": "GroupBy others"+ }+ },+ "textStyle": {}+ },+ "blocks": []+ }+ ]+}diff --git a/libs/datasource/db-service/src/services/editor-block/templates/template-factory.ts b/libs/datasource/db-service/src/services/editor-block/templates/template-factory.tsindex 9acbaf17ed..6c8d5a5643 100644--- a/libs/datasource/db-service/src/services/editor-block/templates/template-factory.ts+++ b/libs/datasource/db-service/src/services/editor-block/templates/template-factory.ts@@ -2,6 +2,7 @@ import blogTemplate from './blog.json';import emptyTemplate from './empty.json';import getStartedGroup0 from './get-started-group0.json';import getStartedGroup1 from './get-started-group1.json';+import getStartedGroup2 from './get-started-group2.json';import gridTemplate from './grid.json';import todoTemplate from './todo.json';import { Template, TemplateMeta } from './types';@@ -12,7 +13,8 @@ export type GroupTemplateKeys =| 'empty'| 'grid'| 'getStartedGroup0'- | 'getStartedGroup1';+ | 'getStartedGroup1'+ | 'getStartedGroup2';type GroupTemplateMap = Record<GroupTemplateKeys, any>;const groupTemplateMap = {empty: emptyTemplate,@@ -21,6 +23,7 @@ const groupTemplateMap = {grid: gridTemplate,getStartedGroup0,getStartedGroup1,+ getStartedGroup2,} as GroupTemplateMap;const defaultTemplateList: Array<TemplateMeta> = [