create-twenty-app 2.5.1 → 2.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/cli.cjs +24 -24
- package/dist/cli.mjs +1282 -1261
- package/dist/constants/template/src/front-components/main-page.tsx +28 -16
- package/dist/constants/template/yarnrc.yml +1 -0
- package/package.json +2 -2
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
import { defineFrontComponent } from 'twenty-sdk/define';
|
|
2
|
+
import {
|
|
3
|
+
Avatar,
|
|
4
|
+
IconBox,
|
|
5
|
+
IconHierarchy,
|
|
6
|
+
IconLayout,
|
|
7
|
+
IconSettingsAutomation,
|
|
8
|
+
} from 'twenty-sdk/ui';
|
|
2
9
|
import { useState } from 'react';
|
|
3
10
|
|
|
4
11
|
import {
|
|
@@ -30,7 +37,7 @@ const CATEGORIES = [
|
|
|
30
37
|
href: `${DOCS_BASE_URL}/logic/logic-functions`,
|
|
31
38
|
},
|
|
32
39
|
{
|
|
33
|
-
label: '
|
|
40
|
+
label: 'LOGIC FUNCTION',
|
|
34
41
|
href: `${DOCS_BASE_URL}/logic/logic-functions`,
|
|
35
42
|
},
|
|
36
43
|
{
|
|
@@ -59,15 +66,6 @@ const CATEGORIES = [
|
|
|
59
66
|
},
|
|
60
67
|
] as const;
|
|
61
68
|
|
|
62
|
-
const ItemIcon = ({ color }: { color: string }) => (
|
|
63
|
-
<svg width="16" height="16" viewBox="0 0 16 16" fill="none">
|
|
64
|
-
<rect x="2" y="2" width="5" height="5" rx="1" fill={color} />
|
|
65
|
-
<rect x="9" y="2" width="5" height="5" rx="1" fill={color} opacity="0.6" />
|
|
66
|
-
<rect x="2" y="9" width="5" height="5" rx="1" fill={color} opacity="0.6" />
|
|
67
|
-
<rect x="9" y="9" width="5" height="5" rx="1" fill={color} opacity="0.3" />
|
|
68
|
-
</svg>
|
|
69
|
-
);
|
|
70
|
-
|
|
71
69
|
const ArrowUpRight = ({ color = '#999' }: { color?: string }) => (
|
|
72
70
|
<svg width="14" height="14" viewBox="0 0 14 14" fill="none">
|
|
73
71
|
<path
|
|
@@ -93,6 +91,18 @@ const CategoryCard = ({
|
|
|
93
91
|
}) => {
|
|
94
92
|
const [hoveredItem, setHoveredItem] = useState<string | null>(null);
|
|
95
93
|
|
|
94
|
+
const CategoryIcon = () => {
|
|
95
|
+
if (title === 'Data model') {
|
|
96
|
+
return <IconHierarchy color={color} size={'20px'} />;
|
|
97
|
+
}
|
|
98
|
+
if (title === 'Logic') {
|
|
99
|
+
return <IconSettingsAutomation color={color} size={'20px'} />;
|
|
100
|
+
}
|
|
101
|
+
if (title === 'Layout') {
|
|
102
|
+
return <IconLayout color={color} size={'20px'} />;
|
|
103
|
+
}
|
|
104
|
+
};
|
|
105
|
+
|
|
96
106
|
return (
|
|
97
107
|
<div
|
|
98
108
|
style={{
|
|
@@ -111,8 +121,12 @@ const CategoryCard = ({
|
|
|
111
121
|
style={{
|
|
112
122
|
padding: '16px 20px',
|
|
113
123
|
background: `${color}22`,
|
|
124
|
+
display: 'flex',
|
|
125
|
+
alignItems: 'center',
|
|
126
|
+
gap: '12px',
|
|
114
127
|
}}
|
|
115
128
|
>
|
|
129
|
+
<CategoryIcon />
|
|
116
130
|
<span
|
|
117
131
|
style={{
|
|
118
132
|
fontSize: '16px',
|
|
@@ -154,7 +168,7 @@ const CategoryCard = ({
|
|
|
154
168
|
transition: 'background 0.15s',
|
|
155
169
|
}}
|
|
156
170
|
>
|
|
157
|
-
<
|
|
171
|
+
<IconBox color={color} size={'20px'} />
|
|
158
172
|
<span
|
|
159
173
|
style={{
|
|
160
174
|
fontSize: '13px',
|
|
@@ -190,13 +204,11 @@ const MainPage = () => {
|
|
|
190
204
|
padding: '40px',
|
|
191
205
|
}}
|
|
192
206
|
>
|
|
193
|
-
|
|
194
|
-
avatarUrl={getPublicAssetUrl('logo.svg')}
|
|
207
|
+
<Avatar
|
|
195
208
|
placeholder={APP_DISPLAY_NAME}
|
|
196
209
|
placeholderColorSeed={APP_DISPLAY_NAME}
|
|
197
|
-
type="squared"
|
|
198
210
|
size="xl"
|
|
199
|
-
|
|
211
|
+
/>
|
|
200
212
|
<span
|
|
201
213
|
style={{
|
|
202
214
|
fontSize: '24px',
|
|
@@ -220,7 +232,7 @@ const MainPage = () => {
|
|
|
220
232
|
You can now add content to your app.
|
|
221
233
|
</span>
|
|
222
234
|
<a
|
|
223
|
-
href="/settings/applications"
|
|
235
|
+
href="/settings/applications#installed"
|
|
224
236
|
style={{
|
|
225
237
|
display: 'inline-flex',
|
|
226
238
|
alignItems: 'center',
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
nodeLinker: node-modules
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-twenty-app",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.6.0",
|
|
4
4
|
"description": "Command-line interface to create Twenty application",
|
|
5
5
|
"main": "dist/cli.cjs",
|
|
6
6
|
"bin": "dist/cli.cjs",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"lodash.camelcase": "^4.3.0",
|
|
36
36
|
"lodash.kebabcase": "^4.1.1",
|
|
37
37
|
"lodash.startcase": "^4.4.0",
|
|
38
|
-
"twenty-sdk": "2.
|
|
38
|
+
"twenty-sdk": "2.6.0",
|
|
39
39
|
"uuid": "^13.0.0"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|