diff --git a/packages/nc-gui/components/templates/categories.vue b/packages/nc-gui/components/templates/categories.vue new file mode 100644 index 0000000000..953df20e4d --- /dev/null +++ b/packages/nc-gui/components/templates/categories.vue @@ -0,0 +1,47 @@ + + + + + diff --git a/packages/nc-gui/components/templates/detailed.vue b/packages/nc-gui/components/templates/detailed.vue new file mode 100644 index 0000000000..03e7b3c046 --- /dev/null +++ b/packages/nc-gui/components/templates/detailed.vue @@ -0,0 +1,59 @@ + + + + + diff --git a/packages/nc-gui/components/templates/editor.vue b/packages/nc-gui/components/templates/editor.vue new file mode 100644 index 0000000000..cfb27a8671 --- /dev/null +++ b/packages/nc-gui/components/templates/editor.vue @@ -0,0 +1,1036 @@ + + + + + diff --git a/packages/nc-gui/components/templates/list.vue b/packages/nc-gui/components/templates/list.vue new file mode 100644 index 0000000000..ce01c81867 --- /dev/null +++ b/packages/nc-gui/components/templates/list.vue @@ -0,0 +1,93 @@ + + + + + diff --git a/packages/nc-gui/components/templates/templates.1.js b/packages/nc-gui/components/templates/templates.1.js new file mode 100644 index 0000000000..6d3965bde8 --- /dev/null +++ b/packages/nc-gui/components/templates/templates.1.js @@ -0,0 +1,81 @@ +const templates = { + title: 'Art Gallery Management', + thumbnail: 'https://picsum.photos/200/300?1', + tables: [ + { + tn: 'blog', + columns: [ + { + cn: 'title', + uidt: 'SingleLineText' + }, + { + cn: 'body', + uidt: 'LongText' + } + ], + hasMany: [ + { + tn: 'comment', + _cn: 'title3' + } + ], + manyToMany: [ + { + rtn: 'tag', + _cn: 'title4' + } + ], + v: [ + { + _cn: 'comments_count', + rl: { + rltn: 'comment', + rlcn: 'body', + type: 'hm', + fn: 'count' + } + } + ] + }, + { + tn: 'comment', + columns: [ + { + cn: 'body', + uidt: 'LongText' + } + ], + hasMany: [], + manyToMany: [], + v: [ + { + _cn: 'blog_title', + lk: { + ltn: 'blog', + type: 'bt', + lcn: 'title' + } + } + ] + }, + { + tn: 'tag', + columns: [ + { + cn: 'title', + uidt: 'SingleLineText' + } + ], + hasMany: [], + manyToMany: [], + v: [] + } + ], + category: 'test', + tags: 'a,b,c', + description: 'I\'m a thing. But, like most politicians, he promised more than he could deliver. You won\'t have time for sleeping, soldier, not with all the bed making you\'ll be doing. Then we\'ll go with that data file! Hey, you add a one and two zeros to that or we walk!' + +} + +export default templates diff --git a/packages/nc-gui/components/templates/templates.2.js b/packages/nc-gui/components/templates/templates.2.js new file mode 100644 index 0000000000..b26f562edf --- /dev/null +++ b/packages/nc-gui/components/templates/templates.2.js @@ -0,0 +1,62 @@ +const templates = { + title: 'Digital video production', + thumbnail: 'https://picsum.photos/200/300?2', + tables: [ + { + tn: 'blog', + columns: [ + { + cn: 'title', + uidt: 'SingleLineText' + }, + { + cn: 'body', + uidt: 'LongText' + } + ], + hasMany: [ + { + tn: 'comment', + _cn: 'title3' + } + ], + manyToMany: [ + { + rtn: 'tag', + _cn: 'title4' + } + ], + v: [] + }, + { + tn: 'comment', + columns: [ + { + cn: 'body', + uidt: 'LongText' + } + ], + hasMany: [], + manyToMany: [], + v: [] + }, + { + tn: 'tag', + columns: [ + { + cn: 'title', + uidt: 'SingleLineText' + } + ], + hasMany: [], + manyToMany: [], + v: [] + } + ], + category: 'test', + tags: 'a,b,c', + description: 'I\'m a thing. But, like most politicians, he promised more than he could deliver. You won\'t have time for sleeping, soldier, not with all the bed making you\'ll be doing. Then we\'ll go with that data file! Hey, you add a one and two zeros to that or we walk!' + +} + +export default templates diff --git a/packages/nc-gui/components/templates/templates.3.js b/packages/nc-gui/components/templates/templates.3.js new file mode 100644 index 0000000000..21e3b23396 --- /dev/null +++ b/packages/nc-gui/components/templates/templates.3.js @@ -0,0 +1,62 @@ +const templates = { + title: 'Content calendar', + thumbnail: 'https://picsum.photos/200/300?3', + tables: [ + { + tn: 'blog', + columns: [ + { + cn: 'title', + uidt: 'SingleLineText' + }, + { + cn: 'body', + uidt: 'LongText' + } + ], + hasMany: [ + { + tn: 'comment', + _cn: 'title3' + } + ], + manyToMany: [ + { + rtn: 'tag', + _cn: 'title4' + } + ], + v: [] + }, + { + tn: 'comment', + columns: [ + { + cn: 'body', + uidt: 'LongText' + } + ], + hasMany: [], + manyToMany: [], + v: [] + }, + { + tn: 'tag', + columns: [ + { + cn: 'title', + uidt: 'SingleLineText' + } + ], + hasMany: [], + manyToMany: [], + v: [] + } + ], + category: 'test', + tags: 'a,b,c', + description: 'I\'m a thing. But, like most politicians, he promised more than he could deliver. You won\'t have time for sleeping, soldier, not with all the bed making you\'ll be doing. Then we\'ll go with that data file! Hey, you add a one and two zeros to that or we walk!' + +} + +export default templates diff --git a/packages/nc-gui/components/templates/templates.4.js b/packages/nc-gui/components/templates/templates.4.js new file mode 100644 index 0000000000..9622b65c5e --- /dev/null +++ b/packages/nc-gui/components/templates/templates.4.js @@ -0,0 +1,62 @@ +const templates = { + title: 'Event Marketing', + thumbnail: 'https://picsum.photos/200/300?3', + tables: [ + { + tn: 'blog', + columns: [ + { + cn: 'title', + uidt: 'SingleLineText' + }, + { + cn: 'body', + uidt: 'LongText' + } + ], + hasMany: [ + { + tn: 'comment', + _cn: 'title3' + } + ], + manyToMany: [ + { + rtn: 'tag', + _cn: 'title4' + } + ], + v: [] + }, + { + tn: 'comment', + columns: [ + { + cn: 'body', + uidt: 'LongText' + } + ], + hasMany: [], + manyToMany: [], + v: [] + }, + { + tn: 'tag', + columns: [ + { + cn: 'title', + uidt: 'SingleLineText' + } + ], + hasMany: [], + manyToMany: [], + v: [] + } + ], + category: 'test', + tags: 'a,b,c', + description: 'I\'m a thing. But, like most politicians, he promised more than he could deliver. You won\'t have time for sleeping, soldier, not with all the bed making you\'ll be doing. Then we\'ll go with that data file! Hey, you add a one and two zeros to that or we walk!' + +} + +export default templates diff --git a/packages/nc-gui/components/templates/templates.5.js b/packages/nc-gui/components/templates/templates.5.js new file mode 100644 index 0000000000..43c2d55f92 --- /dev/null +++ b/packages/nc-gui/components/templates/templates.5.js @@ -0,0 +1,62 @@ +const templates = { + title: 'Wedding Planning', + thumbnail: 'https://picsum.photos/200/300?5', + tables: [ + { + tn: 'blog', + columns: [ + { + cn: 'title', + uidt: 'SingleLineText' + }, + { + cn: 'body', + uidt: 'LongText' + } + ], + hasMany: [ + { + tn: 'comment', + _cn: 'title3' + } + ], + manyToMany: [ + { + rtn: 'tag', + _cn: 'title4' + } + ], + v: [] + }, + { + tn: 'comment', + columns: [ + { + cn: 'body', + uidt: 'LongText' + } + ], + hasMany: [], + manyToMany: [], + v: [] + }, + { + tn: 'tag', + columns: [ + { + cn: 'title', + uidt: 'SingleLineText' + } + ], + hasMany: [], + manyToMany: [], + v: [] + } + ], + category: 'test', + tags: 'a,b,c', + description: 'I\'m a thing. But, like most politicians, he promised more than he could deliver. You won\'t have time for sleeping, soldier, not with all the bed making you\'ll be doing. Then we\'ll go with that data file! Hey, you add a one and two zeros to that or we walk!' + +} + +export default templates diff --git a/packages/nc-gui/components/templates/templates.categories.js b/packages/nc-gui/components/templates/templates.categories.js new file mode 100644 index 0000000000..7fa50464ed --- /dev/null +++ b/packages/nc-gui/components/templates/templates.categories.js @@ -0,0 +1,26 @@ +const categories = [ + { title: 'Content production' }, + { title: 'Featured' }, + { title: 'Creative' }, + { title: 'Event Planning' }, + { title: 'Everyday Life' }, + { title: 'Groups, Clubs & Hobbies' }, + { title: 'HR & Recruiting' }, + { title: 'Legal' }, + { title: 'Local Business' }, + { title: 'Marketing' }, + { title: 'Nonprofit' }, + { title: 'Personal' }, + { title: 'PR & Communications' }, + { title: 'Product, design, and UX' }, + { title: 'Project Management' }, + { title: 'Publishing' }, + { title: 'Real Estate' }, + { title: 'Remote work' }, + { title: 'Sales & Customers' }, + { title: 'Software Development' }, + { title: 'Startup' }, + { title: 'Venture Capital' } +] + +export default categories diff --git a/packages/nc-gui/components/templates/templates.js b/packages/nc-gui/components/templates/templates.js new file mode 100644 index 0000000000..c9fbf93f18 --- /dev/null +++ b/packages/nc-gui/components/templates/templates.js @@ -0,0 +1,61 @@ +const templates = { + title: 'Project name', + tables: [ + { + tn: 'blog', + columns: [ + { + cn: 'title', + uidt: 'SingleLineText' + }, + { + cn: 'body', + uidt: 'LongText' + } + ], + hasMany: [ + { + tn: 'comment', + _cn: 'title3' + } + ], + manyToMany: [ + { + rtn: 'tag', + _cn: 'title4' + } + ], + v: [] + }, + { + tn: 'comment', + columns: [ + { + cn: 'body', + uidt: 'LongText' + } + ], + hasMany: [], + manyToMany: [], + v: [] + }, + { + tn: 'tag', + columns: [ + { + cn: 'title', + uidt: 'SingleLineText' + } + ], + hasMany: [], + manyToMany: [], + v: [] + } + ], + category: 'test', + tags: 'a,b,c', + description: 'I\'m a thing. But, like most politicians, he promised more than he could deliver. You won\'t have time for sleeping, soldier, not with all the bed making you\'ll be doing. Then we\'ll go with that data file! Hey, you add a one and two zeros to that or we walk!' + +} + +export default templates diff --git a/packages/nc-gui/components/templates/templates.list.js b/packages/nc-gui/components/templates/templates.list.js new file mode 100644 index 0000000000..d93a9b3e9f --- /dev/null +++ b/packages/nc-gui/components/templates/templates.list.js @@ -0,0 +1,38 @@ +const templatesList = [{ + id: 1, + title: 'Art Gallery Management', + category: 'Creative', + thumbnail: 'https://picsum.photos/200/300?1', + tags: 'a,b,c', + description: 'I\'m a thing. But, like most politicians, he promised more than he could deliver. You won\'t have time for sleeping, soldier, not with all the bed making you\'ll be doing. Then we\'ll go with that data file! Hey, you add a one and two zeros to that or we walk!' +}, { + id: 2, + title: 'Digital video production', + category: 'Creative', + thumbnail: 'https://picsum.photos/200/300?2', + tags: 'a,b,c', + description: 'I\'m a thing. But, like most politicians, he promised more than he could deliver. You won\'t have time for sleeping, soldier, not with all the bed making you\'ll be doing. Then we\'ll go with that data file! Hey, you add a one and two zeros to that or we walk!' +}, { + id: 3, + title: 'Content calendar', + category: 'Creative', + thumbnail: 'https://picsum.photos/200/300?3', + tags: 'a,b,c', + description: 'I\'m a thing. But, like most politicians, he promised more than he could deliver. You won\'t have time for sleeping, soldier, not with all the bed making you\'ll be doing. Then we\'ll go with that data file! Hey, you add a one and two zeros to that or we walk!' +}, { + id: 4, + title: 'Event Marketing', + category: 'Event Planning', + thumbnail: 'https://picsum.photos/200/300?4', + tags: 'a,b,c', + description: 'I\'m a thing. But, like most politicians, he promised more than he could deliver. You won\'t have time for sleeping, soldier, not with all the bed making you\'ll be doing. Then we\'ll go with that data file! Hey, you add a one and two zeros to that or we walk!' +}, { + id: 5, + title: 'Wedding Planning', + category: 'Event Planning', + thumbnail: 'https://picsum.photos/200/300?5', + tags: 'a,b,c', + description: 'I\'m a thing. But, like most politicians, he promised more than he could deliver. You won\'t have time for sleeping, soldier, not with all the bed making you\'ll be doing. Then we\'ll go with that data file! Hey, you add a one and two zeros to that or we walk!' +}] + +export default templatesList diff --git a/packages/nc-gui/components/templates/templatesModal.vue b/packages/nc-gui/components/templates/templatesModal.vue new file mode 100644 index 0000000000..f87d272a30 --- /dev/null +++ b/packages/nc-gui/components/templates/templatesModal.vue @@ -0,0 +1,42 @@ + + + + + diff --git a/packages/nc-gui/helpers/sqlUi/MysqlUi.js b/packages/nc-gui/helpers/sqlUi/MysqlUi.js index 4cfaedc2a4..bdda224441 100644 --- a/packages/nc-gui/helpers/sqlUi/MysqlUi.js +++ b/packages/nc-gui/helpers/sqlUi/MysqlUi.js @@ -212,7 +212,7 @@ export class MysqlUi { return 255 case 'varchar': - return 45 + return 255 case 'nchar': return 255 diff --git a/packages/nc-gui/layouts/default.vue b/packages/nc-gui/layouts/default.vue index 1c04729f73..5027659fbd 100644 --- a/packages/nc-gui/layouts/default.vue +++ b/packages/nc-gui/layouts/default.vue @@ -43,7 +43,8 @@ > {{ ghStarText }} - Docs + Docs +