hackmate-cli 1.0.9 → 1.0.11
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/dist/features/profile/components/index.d.ts.map +1 -1
- package/dist/features/profile/components/index.js +3 -4
- package/dist/features/profile/components/index.js.map +1 -1
- package/dist/features/profile/components/profile-edit-v3.screen.d.ts +2 -0
- package/dist/features/profile/components/profile-edit-v3.screen.d.ts.map +1 -0
- package/dist/features/profile/components/profile-edit-v3.screen.js +175 -0
- package/dist/features/profile/components/profile-edit-v3.screen.js.map +1 -0
- package/package.json +1 -1
- package/dist/commands/admin/admin.logic.d.ts +0 -12
- package/dist/commands/admin/admin.logic.d.ts.map +0 -1
- package/dist/commands/admin/admin.logic.js +0 -41
- package/dist/commands/admin/admin.logic.js.map +0 -1
- package/dist/commands/admin/admin.screen.d.ts +0 -10
- package/dist/commands/admin/admin.screen.d.ts.map +0 -1
- package/dist/commands/admin/admin.screen.js +0 -19
- package/dist/commands/admin/admin.screen.js.map +0 -1
- package/dist/commands/admin/index.d.ts +0 -8
- package/dist/commands/admin/index.d.ts.map +0 -1
- package/dist/commands/admin/index.js +0 -8
- package/dist/commands/admin/index.js.map +0 -1
- package/dist/commands/chat/ChatList.d.ts +0 -2
- package/dist/commands/chat/ChatList.d.ts.map +0 -1
- package/dist/commands/chat/ChatList.js +0 -63
- package/dist/commands/chat/ChatList.js.map +0 -1
- package/dist/commands/chat/chat.logic.d.ts +0 -15
- package/dist/commands/chat/chat.logic.d.ts.map +0 -1
- package/dist/commands/chat/chat.logic.js +0 -139
- package/dist/commands/chat/chat.logic.js.map +0 -1
- package/dist/commands/chat/chat.screen.d.ts +0 -12
- package/dist/commands/chat/chat.screen.d.ts.map +0 -1
- package/dist/commands/chat/chat.screen.js +0 -12
- package/dist/commands/chat/chat.screen.js.map +0 -1
- package/dist/commands/chat/index.d.ts +0 -8
- package/dist/commands/chat/index.d.ts.map +0 -1
- package/dist/commands/chat/index.js +0 -9
- package/dist/commands/chat/index.js.map +0 -1
- package/dist/commands/group/group.logic.d.ts +0 -26
- package/dist/commands/group/group.logic.d.ts.map +0 -1
- package/dist/commands/group/group.logic.js +0 -73
- package/dist/commands/group/group.logic.js.map +0 -1
- package/dist/commands/group/group.screen.d.ts +0 -19
- package/dist/commands/group/group.screen.d.ts.map +0 -1
- package/dist/commands/group/group.screen.js +0 -22
- package/dist/commands/group/group.screen.js.map +0 -1
- package/dist/commands/group/index.d.ts +0 -9
- package/dist/commands/group/index.d.ts.map +0 -1
- package/dist/commands/group/index.js +0 -8
- package/dist/commands/group/index.js.map +0 -1
- package/dist/commands/network/index.d.ts +0 -8
- package/dist/commands/network/index.d.ts.map +0 -1
- package/dist/commands/network/index.js +0 -8
- package/dist/commands/network/index.js.map +0 -1
- package/dist/commands/network/network.logic.d.ts +0 -12
- package/dist/commands/network/network.logic.d.ts.map +0 -1
- package/dist/commands/network/network.logic.js +0 -69
- package/dist/commands/network/network.logic.js.map +0 -1
- package/dist/commands/network/network.screen.d.ts +0 -10
- package/dist/commands/network/network.screen.d.ts.map +0 -1
- package/dist/commands/network/network.screen.js +0 -17
- package/dist/commands/network/network.screen.js.map +0 -1
- package/dist/commands/notification/index.d.ts +0 -7
- package/dist/commands/notification/index.d.ts.map +0 -1
- package/dist/commands/notification/index.js +0 -8
- package/dist/commands/notification/index.js.map +0 -1
- package/dist/commands/notification/notification.logic.d.ts +0 -11
- package/dist/commands/notification/notification.logic.d.ts.map +0 -1
- package/dist/commands/notification/notification.logic.js +0 -33
- package/dist/commands/notification/notification.logic.js.map +0 -1
- package/dist/commands/notification/notification.screen.d.ts +0 -10
- package/dist/commands/notification/notification.screen.d.ts.map +0 -1
- package/dist/commands/notification/notification.screen.js +0 -13
- package/dist/commands/notification/notification.screen.js.map +0 -1
- package/dist/commands/profile/index.d.ts +0 -6
- package/dist/commands/profile/index.d.ts.map +0 -1
- package/dist/commands/profile/index.js +0 -14
- package/dist/commands/profile/index.js.map +0 -1
- package/dist/commands/profile/profile-edit.screen.d.ts +0 -12
- package/dist/commands/profile/profile-edit.screen.d.ts.map +0 -1
- package/dist/commands/profile/profile-edit.screen.js +0 -66
- package/dist/commands/profile/profile-edit.screen.js.map +0 -1
- package/dist/commands/profile/profile-view.screen.d.ts +0 -10
- package/dist/commands/profile/profile-view.screen.d.ts.map +0 -1
- package/dist/commands/profile/profile-view.screen.js +0 -12
- package/dist/commands/profile/profile-view.screen.js.map +0 -1
- package/dist/commands/profile/profile.logic.d.ts +0 -42
- package/dist/commands/profile/profile.logic.d.ts.map +0 -1
- package/dist/commands/profile/profile.logic.js +0 -74
- package/dist/commands/profile/profile.logic.js.map +0 -1
- package/dist/commands/project/index.d.ts +0 -9
- package/dist/commands/project/index.d.ts.map +0 -1
- package/dist/commands/project/index.js +0 -8
- package/dist/commands/project/index.js.map +0 -1
- package/dist/commands/project/project.logic.d.ts +0 -29
- package/dist/commands/project/project.logic.d.ts.map +0 -1
- package/dist/commands/project/project.logic.js +0 -92
- package/dist/commands/project/project.logic.js.map +0 -1
- package/dist/commands/project/project.screen.d.ts +0 -22
- package/dist/commands/project/project.screen.d.ts.map +0 -1
- package/dist/commands/project/project.screen.js +0 -27
- package/dist/commands/project/project.screen.js.map +0 -1
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Text, Box } from 'ink';
|
|
3
|
-
import TextInput from 'ink-text-input';
|
|
4
|
-
import SelectInput from 'ink-select-input';
|
|
5
|
-
const INTENT_ITEMS = [
|
|
6
|
-
{ label: 'Startup', value: 'startup' },
|
|
7
|
-
{ label: 'Collab', value: 'collab' },
|
|
8
|
-
{ label: 'Friends', value: 'friends' },
|
|
9
|
-
{ label: 'Mentorship', value: 'mentorship' },
|
|
10
|
-
];
|
|
11
|
-
export const ProfileEditScreen = ({ step, setStep, profile, setProfile, loading, handleSubmit }) => {
|
|
12
|
-
if (loading)
|
|
13
|
-
return _jsx(Text, { children: "Saving..." });
|
|
14
|
-
const steps = [
|
|
15
|
-
{
|
|
16
|
-
label: 'Main Intent',
|
|
17
|
-
component: (_jsx(SelectInput, { items: INTENT_ITEMS, onSelect: (item) => {
|
|
18
|
-
setProfile({ ...profile, intent: item.value });
|
|
19
|
-
setStep(step + 1);
|
|
20
|
-
} })),
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
label: 'Bio (One liner)',
|
|
24
|
-
component: (_jsx(TextInput, { value: profile.bio, onChange: (val) => setProfile({ ...profile, bio: val }), onSubmit: () => setStep(step + 1) })),
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
label: 'Age',
|
|
28
|
-
component: (_jsx(TextInput, { value: String(profile.age || ''), onChange: (val) => setProfile({ ...profile, age: val ? parseInt(val) : undefined }), onSubmit: () => setStep(step + 1) })),
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
label: 'Gender (male/female/other)',
|
|
32
|
-
component: (_jsx(TextInput, { value: profile.gender || '', onChange: (val) => setProfile({ ...profile, gender: val }), onSubmit: () => setStep(step + 1) })),
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
label: 'Company / College',
|
|
36
|
-
component: (_jsx(TextInput, { value: profile.company || '', onChange: (val) => setProfile({ ...profile, company: val }), onSubmit: () => setStep(step + 1) })),
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
label: 'Tech Stack (comma separated)',
|
|
40
|
-
component: (_jsx(TextInput, { value: profile.stack, onChange: (val) => setProfile({ ...profile, stack: val }), onSubmit: () => setStep(step + 1) })),
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
label: 'Interests (comma separated)',
|
|
44
|
-
component: (_jsx(TextInput, { value: profile.interests || '', onChange: (val) => setProfile({ ...profile, interests: val }), onSubmit: () => setStep(step + 1) })),
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
label: 'Location',
|
|
48
|
-
component: (_jsx(TextInput, { value: profile.location, onChange: (val) => setProfile({ ...profile, location: val }), onSubmit: () => setStep(step + 1) })),
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
label: 'GitHub Username',
|
|
52
|
-
component: (_jsx(TextInput, { value: profile.github, onChange: (val) => setProfile({ ...profile, github: val }), onSubmit: () => setStep(step + 1) })),
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
label: 'LinkedIn URL',
|
|
56
|
-
component: (_jsx(TextInput, { value: profile.linkedin || '', onChange: (val) => setProfile({ ...profile, linkedin: val }), onSubmit: () => setStep(step + 1) })),
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
label: 'Twitter URL',
|
|
60
|
-
component: (_jsx(TextInput, { value: profile.twitter || '', onChange: (val) => setProfile({ ...profile, twitter: val }), onSubmit: handleSubmit })),
|
|
61
|
-
},
|
|
62
|
-
];
|
|
63
|
-
const currentStep = steps[step];
|
|
64
|
-
return (_jsxs(Box, { flexDirection: "column", padding: 1, children: [_jsx(Text, { color: "yellow", bold: true, children: " Edit Profile " }), _jsxs(Box, { marginY: 1, children: [_jsxs(Text, { bold: true, children: [" ", currentStep.label, ": "] }), currentStep.component] }), _jsxs(Text, { color: "gray", children: ["Step ", step + 1, " of ", steps.length] })] }));
|
|
65
|
-
};
|
|
66
|
-
//# sourceMappingURL=profile-edit.screen.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"profile-edit.screen.js","sourceRoot":"","sources":["../../../src/commands/profile/profile-edit.screen.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,SAAS,MAAM,gBAAgB,CAAC;AACvC,OAAO,WAAW,MAAM,kBAAkB,CAAC;AAW3C,MAAM,YAAY,GAAG;IACjB,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE;IACtC,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE;IACpC,EAA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AAC,UAAU,CAAC,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,EAC3D,QAAQ,EAAE,YAAY,GACxB,CACL;SACJ;KACJ,CAAC;IAEF,MAAM,WAAW,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC;IAEhC,OAAO,CACH,MAAC,GAAG,IAAC,aAAa,EAAC,QAAQ,EAAC,OAAO,EAAE,CAAC,aAClC,KAAC,IAAI,IAAC,KAAK,EAAC,QAAQ,EAAC,IAAI,qCAAsB,EAC/C,MAAC,GAAG,IAAC,OAAO,EAAE,CAAC,aACX,MAAC,IAAI,IAAC,IAAI,wBAAG,WAAW,CAAC,KAAK,UAAU,EACvC,WAAW,CAAC,SAAS,IACpB,EACN,MAAC,IAAI,IAAC,KAAK,EAAC,MAAM,sBAAO,IAAI,GAAG,CAAC,UAAM,KAAK,CAAC,MAAM,IAAQ,IACzD,CACT,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
interface ProfileViewScreenProps {
|
|
3
|
-
profile: any;
|
|
4
|
-
loading: boolean;
|
|
5
|
-
error: string | null;
|
|
6
|
-
user: any;
|
|
7
|
-
}
|
|
8
|
-
export declare const ProfileViewScreen: React.FC<ProfileViewScreenProps>;
|
|
9
|
-
export {};
|
|
10
|
-
//# sourceMappingURL=profile-view.screen.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"profile-view.screen.d.ts","sourceRoot":"","sources":["../../../src/commands/profile/profile-view.screen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,UAAU,sBAAsB;IAC5B,OAAO,EAAE,GAAG,CAAC;IACb,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,IAAI,EAAE,GAAG,CAAC;CACb;AAED,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,sBAAsB,CAwB9D,CAAC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Text, Box } from 'ink';
|
|
3
|
-
export const ProfileViewScreen = ({ profile, loading, error, user }) => {
|
|
4
|
-
if (loading)
|
|
5
|
-
return _jsx(Text, { children: "Loading profile..." });
|
|
6
|
-
if (error)
|
|
7
|
-
return _jsxs(Text, { color: "red", children: ["Error: ", error] });
|
|
8
|
-
if (!profile)
|
|
9
|
-
return _jsxs(Text, { children: ["No profile found for @", user?.username, ". Run \"hackmate profile edit\" to create one."] });
|
|
10
|
-
return (_jsxs(Box, { flexDirection: "column", padding: 1, borderStyle: "round", borderColor: "cyan", children: [_jsxs(Text, { bold: true, color: "cyan", children: [" @", profile?.user?.username || user?.username, " "] }), _jsx(Text, { children: "\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500" }), _jsxs(Text, { children: ["Intent: ", _jsx(Text, { color: "green", children: profile.intent })] }), _jsxs(Text, { children: ["Bio: ", profile.bio || 'N/A'] }), _jsxs(Text, { children: ["Age: ", profile.age || 'N/A', " | Gender: ", profile.gender || 'N/A'] }), _jsxs(Text, { children: ["Company/College: ", profile.company || 'N/A'] }), _jsxs(Text, { children: ["Stack: ", profile.stack?.join(', ') || 'N/A'] }), _jsxs(Text, { children: ["Interests: ", profile.interests?.join(', ') || 'N/A'] }), _jsxs(Text, { children: ["Location: ", profile.location || 'N/A'] }), _jsx(Text, { children: "\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500" }), _jsx(Text, { bold: true, children: "Socials:" }), _jsxs(Text, { children: ["GitHub: ", profile.github || 'N/A'] }), _jsxs(Text, { children: ["LinkedIn: ", profile.linkedin || 'N/A'] }), _jsxs(Text, { children: ["Twitter: ", profile.twitter || 'N/A'] }), _jsxs(Text, { children: ["Website: ", profile.website || 'N/A'] })] }));
|
|
11
|
-
};
|
|
12
|
-
//# sourceMappingURL=profile-view.screen.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"profile-view.screen.js","sourceRoot":"","sources":["../../../src/commands/profile/profile-view.screen.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAShC,MAAM,CAAC,MAAM,iBAAiB,GAAqC,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,EAAE;IACrG,IAAI,OAAO;QAAE,OAAO,KAAC,IAAI,qCAA0B,CAAC;IACpD,IAAI,KAAK;QAAE,OAAO,MAAC,IAAI,IAAC,KAAK,EAAC,KAAK,wBAAS,KAAK,IAAQ,CAAC;IAC1D,IAAI,CAAC,OAAO;QAAE,OAAO,MAAC,IAAI,yCAAwB,IAAI,EAAE,QAAQ,sDAAoD,CAAC;IAErH,OAAO,CACH,MAAC,GAAG,IAAC,aAAa,EAAC,QAAQ,EAAC,OAAO,EAAE,CAAC,EAAE,WAAW,EAAC,OAAO,EAAC,WAAW,EAAC,MAAM,aAC1E,MAAC,IAAI,IAAC,IAAI,QAAC,KAAK,EAAC,MAAM,mBAAI,OAAO,EAAE,IAAI,EAAE,QAAQ,IAAI,IAAI,EAAE,QAAQ,SAAS,EAC7E,KAAC,IAAI,6GAAuB,EAC5B,MAAC,IAAI,2BAAS,KAAC,IAAI,IAAC,KAAK,EAAC,OAAO,YAAE,OAAO,CAAC,MAAM,GAAQ,IAAO,EAChE,MAAC,IAAI,wBAAO,OAAO,CAAC,GAAG,IAAI,KAAK,IAAQ,EACxC,MAAC,IAAI,wBAAO,OAAO,CAAC,GAAG,IAAI,KAAK,iBAAa,OAAO,CAAC,MAAM,IAAI,KAAK,IAAQ,EAC5E,MAAC,IAAI,oCAAmB,OAAO,CAAC,OAAO,IAAI,KAAK,IAAQ,EACxD,MAAC,IAAI,0BAAS,OAAO,CAAC,KAAK,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,KAAK,IAAQ,EACxD,MAAC,IAAI,8BAAa,OAAO,CAAC,SAAS,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,KAAK,IAAQ,EAChE,MAAC,IAAI,6BAAY,OAAO,CAAC,QAAQ,IAAI,KAAK,IAAQ,EAClD,KAAC,IAAI,6GAAuB,EAC5B,KAAC,IAAI,IAAC,IAAI,+BAAgB,EAC1B,MAAC,IAAI,2BAAU,OAAO,CAAC,MAAM,IAAI,KAAK,IAAQ,EAC9C,MAAC,IAAI,6BAAY,OAAO,CAAC,QAAQ,IAAI,KAAK,IAAQ,EAClD,MAAC,IAAI,4BAAW,OAAO,CAAC,OAAO,IAAI,KAAK,IAAQ,EAChD,MAAC,IAAI,4BAAW,OAAO,CAAC,OAAO,IAAI,KAAK,IAAQ,IAC9C,CACT,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
export declare const useProfileViewLogic: (targetUsername?: string) => {
|
|
2
|
-
profile: any;
|
|
3
|
-
loading: boolean;
|
|
4
|
-
error: string | null;
|
|
5
|
-
user: {
|
|
6
|
-
username: string;
|
|
7
|
-
id: string;
|
|
8
|
-
} | undefined;
|
|
9
|
-
};
|
|
10
|
-
export declare const useProfileEditLogic: () => {
|
|
11
|
-
step: number;
|
|
12
|
-
setStep: import("react").Dispatch<import("react").SetStateAction<number>>;
|
|
13
|
-
profile: {
|
|
14
|
-
bio: string;
|
|
15
|
-
intent: string;
|
|
16
|
-
stack: string;
|
|
17
|
-
location: string;
|
|
18
|
-
github: string;
|
|
19
|
-
age?: number;
|
|
20
|
-
gender?: "male" | "female" | "other";
|
|
21
|
-
company?: string;
|
|
22
|
-
interests?: string;
|
|
23
|
-
linkedin?: string;
|
|
24
|
-
twitter?: string;
|
|
25
|
-
};
|
|
26
|
-
setProfile: import("react").Dispatch<import("react").SetStateAction<{
|
|
27
|
-
bio: string;
|
|
28
|
-
intent: string;
|
|
29
|
-
stack: string;
|
|
30
|
-
location: string;
|
|
31
|
-
github: string;
|
|
32
|
-
age?: number;
|
|
33
|
-
gender?: "male" | "female" | "other";
|
|
34
|
-
company?: string;
|
|
35
|
-
interests?: string;
|
|
36
|
-
linkedin?: string;
|
|
37
|
-
twitter?: string;
|
|
38
|
-
}>>;
|
|
39
|
-
loading: boolean;
|
|
40
|
-
handleSubmit: () => Promise<void>;
|
|
41
|
-
};
|
|
42
|
-
//# sourceMappingURL=profile.logic.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"profile.logic.d.ts","sourceRoot":"","sources":["../../../src/commands/profile/profile.logic.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,mBAAmB,GAAI,iBAAiB,MAAM;;;;;;;;CA+B1D,CAAC;AAEF,eAAO,MAAM,mBAAmB;;;;aAInB,MAAM;gBACH,MAAM;eACP,MAAM;kBACH,MAAM;gBACR,MAAM;cACR,MAAM;iBACH,MAAM,GAAG,QAAQ,GAAG,OAAO;kBAC1B,MAAM;oBACJ,MAAM;mBACP,MAAM;kBACP,MAAM;;;aAVX,MAAM;gBACH,MAAM;eACP,MAAM;kBACH,MAAM;gBACR,MAAM;cACR,MAAM;iBACH,MAAM,GAAG,QAAQ,GAAG,OAAO;kBAC1B,MAAM;oBACJ,MAAM;mBACP,MAAM;kBACP,MAAM;;;;CAoCvB,CAAC"}
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import { useState, useEffect } from 'react';
|
|
2
|
-
import { useApp } from 'ink';
|
|
3
|
-
import api from '../../api.js';
|
|
4
|
-
import { getUser } from '../../config.js';
|
|
5
|
-
export const useProfileViewLogic = (targetUsername) => {
|
|
6
|
-
const { exit } = useApp();
|
|
7
|
-
const [profile, setProfile] = useState(null);
|
|
8
|
-
const [loading, setLoading] = useState(true);
|
|
9
|
-
const [error, setError] = useState(null);
|
|
10
|
-
const user = getUser();
|
|
11
|
-
useEffect(() => {
|
|
12
|
-
const fetchProfile = async () => {
|
|
13
|
-
try {
|
|
14
|
-
const endpoint = targetUsername ? `/profile/${targetUsername}` : '/profile';
|
|
15
|
-
const { data } = await api.get(endpoint);
|
|
16
|
-
setProfile(data);
|
|
17
|
-
// Auto-exit after a short delay to allow render
|
|
18
|
-
setTimeout(() => exit(), 100);
|
|
19
|
-
}
|
|
20
|
-
catch (err) {
|
|
21
|
-
setError(err.response?.data?.message || 'Failed to fetch profile');
|
|
22
|
-
setTimeout(() => exit(), 100);
|
|
23
|
-
}
|
|
24
|
-
finally {
|
|
25
|
-
setLoading(false);
|
|
26
|
-
}
|
|
27
|
-
};
|
|
28
|
-
fetchProfile();
|
|
29
|
-
}, [targetUsername]);
|
|
30
|
-
return {
|
|
31
|
-
profile,
|
|
32
|
-
loading,
|
|
33
|
-
error,
|
|
34
|
-
user
|
|
35
|
-
};
|
|
36
|
-
};
|
|
37
|
-
export const useProfileEditLogic = () => {
|
|
38
|
-
const { exit } = useApp();
|
|
39
|
-
const [step, setStep] = useState(0);
|
|
40
|
-
const [profile, setProfile] = useState({
|
|
41
|
-
bio: '',
|
|
42
|
-
intent: 'collab',
|
|
43
|
-
stack: '',
|
|
44
|
-
location: '',
|
|
45
|
-
github: '',
|
|
46
|
-
});
|
|
47
|
-
const [loading, setLoading] = useState(false);
|
|
48
|
-
useEffect(() => {
|
|
49
|
-
// Fetch existing profile to populate defaults (optional, skipping for speed MVp)
|
|
50
|
-
}, []);
|
|
51
|
-
const handleSubmit = async () => {
|
|
52
|
-
setLoading(true);
|
|
53
|
-
try {
|
|
54
|
-
await api.put('/profile', {
|
|
55
|
-
...profile,
|
|
56
|
-
stack: profile.stack.split(',').map((s) => s.trim()),
|
|
57
|
-
interests: profile.interests?.split(',').map((s) => s.trim()),
|
|
58
|
-
});
|
|
59
|
-
console.log('✅ Profile updated!');
|
|
60
|
-
exit();
|
|
61
|
-
}
|
|
62
|
-
catch (err) {
|
|
63
|
-
console.error('❌ Update failed:', err.response?.data?.message || err.message);
|
|
64
|
-
exit();
|
|
65
|
-
}
|
|
66
|
-
};
|
|
67
|
-
return {
|
|
68
|
-
step, setStep,
|
|
69
|
-
profile, setProfile,
|
|
70
|
-
loading,
|
|
71
|
-
handleSubmit
|
|
72
|
-
};
|
|
73
|
-
};
|
|
74
|
-
//# sourceMappingURL=profile.logic.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"profile.logic.js","sourceRoot":"","sources":["../../../src/commands/profile/profile.logic.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAE,MAAM,EAAE,MAAM,KAAK,CAAC;AAC7B,OAAO,GAAG,MAAM,cAAc,CAAC;AAC/B,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAE1C,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,cAAuB,EAAE,EAAE;IAC3D,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,EAAE,CAAC;IAC1B,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,CAAM,IAAI,CAAC,CAAC;IAClD,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC;IAC7C,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAgB,IAAI,CAAC,CAAC;IACxD,MAAM,IAAI,GAAG,OAAO,EAAE,CAAC;IAEvB,SAAS,CAAC,GAAG,EAAE;QACX,MAAM,YAAY,GAAG,KAAK,IAAI,EAAE;YAC5B,IAAI,CAAC;gBACD,MAAM,QAAQ,GAAG,cAAc,CAAC,CAAC,CAAC,YAAY,cAAc,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC;gBAC5E,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,GAAG,CAAC,GAAG,CAAC,QAAQ,CAAC,CAA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AAG,CAAC,GAAG,CAAC,UAAU,EAAE;gBACtB,GAAG,OAAO;gBACV,KAAK,EAAE,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;gBACpD,SAAS,EAAE,OAAO,CAAC,SAAS,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;aAChE,CAAC,CAAC;YACH,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;YAClC,IAAI,EAAE,CAAC;QACX,CAAC;QAAC,OAAO,GAAQ,EAAE,CAAC;YAChB,OAAO,CAAC,KAAK,CAAC,kBAAkB,EAAE,GAAG,CAAC,QAAQ,EAAE,IAAI,EAAE,OAAO,IAAI,GAAG,CAAC,OAAO,CAAC,CAAC;YAC9E,IAAI,EAAE,CAAC;QACX,CAAC;IACL,CAAC,CAAC;IAEF,OAAO;QACH,IAAI,EAAE,OAAO;QACb,OAAO,EAAE,UAAU;QACnB,OAAO;QACP,YAAY;KACf,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/project/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,UAAU,YAAY;IAClB,MAAM,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,CAAC;IACzD,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,eAAO,MAAM,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,YAAY,CAG1C,CAAC"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useProjectLogic } from './project.logic.js';
|
|
3
|
-
import { ProjectScreen } from './project.screen.js';
|
|
4
|
-
export const Project = (props) => {
|
|
5
|
-
const logic = useProjectLogic(props);
|
|
6
|
-
return _jsx(ProjectScreen, { ...logic });
|
|
7
|
-
};
|
|
8
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/commands/project/index.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAQpD,MAAM,CAAC,MAAM,OAAO,GAA2B,CAAC,KAAK,EAAE,EAAE;IACrD,MAAM,KAAK,GAAG,eAAe,CAAC,KAAK,CAAC,CAAC;IACrC,OAAO,KAAC,aAAa,OAAK,KAAK,GAAI,CAAC;AACxC,CAAC,CAAC"}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
interface UseProjectLogicProps {
|
|
2
|
-
action?: 'list' | 'create' | 'view' | 'apply' | 'accept';
|
|
3
|
-
id?: string;
|
|
4
|
-
extraArg?: string;
|
|
5
|
-
}
|
|
6
|
-
export declare const useProjectLogic: ({ action, id, extraArg }: UseProjectLogicProps) => {
|
|
7
|
-
action: "list" | "view" | "accept" | "create" | "apply";
|
|
8
|
-
data: any;
|
|
9
|
-
error: string | null;
|
|
10
|
-
loading: boolean;
|
|
11
|
-
formStep: number;
|
|
12
|
-
setFormStep: import("react").Dispatch<import("react").SetStateAction<number>>;
|
|
13
|
-
formData: {
|
|
14
|
-
title: string;
|
|
15
|
-
description: string;
|
|
16
|
-
skills: string;
|
|
17
|
-
};
|
|
18
|
-
setFormData: import("react").Dispatch<import("react").SetStateAction<{
|
|
19
|
-
title: string;
|
|
20
|
-
description: string;
|
|
21
|
-
skills: string;
|
|
22
|
-
}>>;
|
|
23
|
-
message: string;
|
|
24
|
-
setMessage: import("react").Dispatch<import("react").SetStateAction<string>>;
|
|
25
|
-
handleCreateSubmit: () => Promise<void>;
|
|
26
|
-
handleApplySubmit: () => Promise<void>;
|
|
27
|
-
};
|
|
28
|
-
export {};
|
|
29
|
-
//# sourceMappingURL=project.logic.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"project.logic.d.ts","sourceRoot":"","sources":["../../../src/commands/project/project.logic.ts"],"names":[],"mappings":"AAKA,UAAU,oBAAoB;IAC1B,MAAM,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,CAAC;IACzD,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,eAAO,MAAM,eAAe,GAAI,0BAAmC,oBAAoB;;;;;;;;;;;;;;;;;;;;;CAoFtF,CAAC"}
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
import { useState, useEffect } from 'react';
|
|
2
|
-
import { useApp } from 'ink';
|
|
3
|
-
import api from '../../api.js';
|
|
4
|
-
import { useAuth } from '../../context/index.js';
|
|
5
|
-
export const useProjectLogic = ({ action = 'list', id, extraArg }) => {
|
|
6
|
-
const { exit } = useApp();
|
|
7
|
-
const { isAuthenticated } = useAuth();
|
|
8
|
-
const [data, setData] = useState(null);
|
|
9
|
-
const [error, setError] = useState(null);
|
|
10
|
-
const [loading, setLoading] = useState(true);
|
|
11
|
-
// Form state for create
|
|
12
|
-
const [formStep, setFormStep] = useState(0);
|
|
13
|
-
const [formData, setFormData] = useState({ title: '', description: '', skills: '' });
|
|
14
|
-
// Input state for apply message
|
|
15
|
-
const [message, setMessage] = useState('');
|
|
16
|
-
useEffect(() => {
|
|
17
|
-
const run = async () => {
|
|
18
|
-
if (!isAuthenticated)
|
|
19
|
-
return;
|
|
20
|
-
try {
|
|
21
|
-
if (action === 'list') {
|
|
22
|
-
const res = await api.get('/project');
|
|
23
|
-
setData(res.data);
|
|
24
|
-
setLoading(false);
|
|
25
|
-
}
|
|
26
|
-
else if (action === 'view' && id) {
|
|
27
|
-
const res = await api.get(`/project/${id}`);
|
|
28
|
-
setData(res.data);
|
|
29
|
-
setLoading(false);
|
|
30
|
-
}
|
|
31
|
-
else if (action === 'accept' && id && extraArg) {
|
|
32
|
-
await api.post(`/project/${id}/accept`, { applicantId: extraArg });
|
|
33
|
-
setData({ message: 'Applicant accepted!' });
|
|
34
|
-
setLoading(false);
|
|
35
|
-
}
|
|
36
|
-
// create and apply handle their own loading via interactions
|
|
37
|
-
if (action === 'create' || action === 'apply') {
|
|
38
|
-
setLoading(false);
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
catch (err) {
|
|
42
|
-
setError(err.response?.data?.message || err.message || 'Operation failed');
|
|
43
|
-
setLoading(false);
|
|
44
|
-
}
|
|
45
|
-
};
|
|
46
|
-
run();
|
|
47
|
-
}, [action, id, extraArg, isAuthenticated]);
|
|
48
|
-
const handleCreateSubmit = async () => {
|
|
49
|
-
setLoading(true);
|
|
50
|
-
try {
|
|
51
|
-
await api.post('/project', {
|
|
52
|
-
...formData,
|
|
53
|
-
skills: formData.skills.split(',').map(s => s.trim())
|
|
54
|
-
});
|
|
55
|
-
setData({ message: 'Project created successfully!' });
|
|
56
|
-
}
|
|
57
|
-
catch (err) {
|
|
58
|
-
setError(err.response?.data?.message || 'Failed to create project');
|
|
59
|
-
}
|
|
60
|
-
finally {
|
|
61
|
-
setLoading(false);
|
|
62
|
-
}
|
|
63
|
-
};
|
|
64
|
-
const handleApplySubmit = async () => {
|
|
65
|
-
setLoading(true);
|
|
66
|
-
try {
|
|
67
|
-
await api.post(`/project/${id}/apply`, { message });
|
|
68
|
-
setData({ message: 'Application sent successfully!' });
|
|
69
|
-
}
|
|
70
|
-
catch (err) {
|
|
71
|
-
setError(err.response?.data?.message || 'Failed to apply');
|
|
72
|
-
}
|
|
73
|
-
finally {
|
|
74
|
-
setLoading(false);
|
|
75
|
-
}
|
|
76
|
-
};
|
|
77
|
-
return {
|
|
78
|
-
action,
|
|
79
|
-
data,
|
|
80
|
-
error,
|
|
81
|
-
loading,
|
|
82
|
-
formStep,
|
|
83
|
-
setFormStep,
|
|
84
|
-
formData,
|
|
85
|
-
setFormData,
|
|
86
|
-
message,
|
|
87
|
-
setMessage,
|
|
88
|
-
handleCreateSubmit,
|
|
89
|
-
handleApplySubmit
|
|
90
|
-
};
|
|
91
|
-
};
|
|
92
|
-
//# sourceMappingURL=project.logic.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"project.logic.js","sourceRoot":"","sources":["../../../src/commands/project/project.logic.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAE,MAAM,EAAE,MAAM,KAAK,CAAC;AAC7B,OAAO,GAAG,MAAM,cAAc,CAAC;AAC/B,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAQjD,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,EAAE,EAAE,QAAQ,EAAwB,EAAE,EAAE;IACvF,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,EAAE,CAAC;IAC1B,MAAM,EAAE,eAAe,EAAE,GAAG,OAAO,EAAE,CAAC;IACtC,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,QAAQ,CAAM,IAAI,CAAC,CAAC;IAC5C,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAgB,IAAI,CAAC,CAAC;IACxD,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC;IAE7C,wBAAwB;IACxB,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;IAC5C,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GA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AAC,GAAG,CAAC,QAAQ,EAAE,IAAI,EAAE,OAAO,IAAI,iBAAiB,CAAC,CAAC;QAC/D,CAAC;gBAAS,CAAC;YACP,UAAU,CAAC,KAAK,CAAC,CAAC;QACtB,CAAC;IACL,CAAC,CAAC;IAEF,OAAO;QACH,MAAM;QACN,IAAI;QACJ,KAAK;QACL,OAAO;QACP,QAAQ;QACR,WAAW;QACX,QAAQ;QACR,WAAW;QACX,OAAO;QACP,UAAU;QACV,kBAAkB;QAClB,iBAAiB;KACpB,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
interface ProjectScreenProps {
|
|
3
|
-
action: string;
|
|
4
|
-
data: any;
|
|
5
|
-
error: string | null;
|
|
6
|
-
loading: boolean;
|
|
7
|
-
formStep: number;
|
|
8
|
-
setFormStep: (step: number) => void;
|
|
9
|
-
formData: {
|
|
10
|
-
title: string;
|
|
11
|
-
description: string;
|
|
12
|
-
skills: string;
|
|
13
|
-
};
|
|
14
|
-
setFormData: (data: any) => void;
|
|
15
|
-
message: string;
|
|
16
|
-
setMessage: (msg: string) => void;
|
|
17
|
-
handleCreateSubmit: () => void;
|
|
18
|
-
handleApplySubmit: () => void;
|
|
19
|
-
}
|
|
20
|
-
export declare const ProjectScreen: React.FC<ProjectScreenProps>;
|
|
21
|
-
export {};
|
|
22
|
-
//# sourceMappingURL=project.screen.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"project.screen.d.ts","sourceRoot":"","sources":["../../../src/commands/project/project.screen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,UAAU,kBAAkB;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,GAAG,CAAC;IACV,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACpC,QAAQ,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IACjE,WAAW,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,IAAI,CAAC;IACjC,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,kBAAkB,EAAE,MAAM,IAAI,CAAC;IAC/B,iBAAiB,EAAE,MAAM,IAAI,CAAC;CACjC;AAED,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAiGtD,CAAC"}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Text, Box } from 'ink';
|
|
3
|
-
import TextInput from 'ink-text-input';
|
|
4
|
-
export const ProjectScreen = ({ action, data, error, loading, formStep, setFormStep, formData, setFormData, message, setMessage, handleCreateSubmit, handleApplySubmit }) => {
|
|
5
|
-
if (loading)
|
|
6
|
-
return _jsx(Text, { children: "Loading..." });
|
|
7
|
-
if (error)
|
|
8
|
-
return _jsxs(Text, { color: "red", children: ["Error: ", error] });
|
|
9
|
-
if (action === 'list') {
|
|
10
|
-
return (_jsxs(Box, { flexDirection: "column", padding: 1, borderStyle: "round", borderColor: "magenta", children: [_jsx(Text, { bold: true, children: "\uD83D\uDD25 Open Projects" }), Array.isArray(data) && data.length === 0 && _jsx(Text, { italic: true, color: "gray", children: "No open projects." }), Array.isArray(data) && data.map((p) => (_jsxs(Box, { flexDirection: "column", marginY: 1, children: [_jsxs(Text, { bold: true, color: "cyan", children: [p.title, " ", _jsxs(Text, { color: "gray", children: ["(ID: ", p._id, ")"] })] }), _jsxs(Text, { color: "green", children: ["By @", p.ownerId?.username] }), _jsxs(Text, { children: [p.description.substring(0, 100), "..."] }), _jsxs(Text, { color: "blue", children: ["Skills: ", p.skills?.join(', ')] })] }, p._id)))] }));
|
|
11
|
-
}
|
|
12
|
-
if (action === 'view') {
|
|
13
|
-
return (_jsxs(Box, { flexDirection: "column", padding: 1, borderStyle: "round", borderColor: "cyan", children: [_jsx(Text, { bold: true, color: "magenta", children: data.title }), _jsxs(Text, { color: "gray", children: ["Started by @", data.ownerId?.username] }), _jsx(Box, { marginY: 1, children: _jsx(Text, { children: data.description }) }), _jsxs(Text, { bold: true, children: ["Skills required: ", _jsx(Text, { color: "blue", children: data.skills?.join(', ') })] }), _jsx(Box, { marginY: 1, children: _jsx(Text, { children: "\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500" }) }), _jsxs(Text, { bold: true, children: ["Applicants (", data.applicants?.length || 0, "):"] }), data.applicants?.map((a) => (_jsxs(Text, { children: ["\u2022 ", a.userId.username, " [", a.status, "] - \"", a.message, "\"", _jsxs(Text, { color: "gray", children: [" (ID: ", a.userId._id, ")"] })] }, a.userId._id)))] }));
|
|
14
|
-
}
|
|
15
|
-
if (action === 'create') {
|
|
16
|
-
if (data?.message)
|
|
17
|
-
return _jsxs(Text, { color: "green", children: ["\u2705 ", data.message] });
|
|
18
|
-
return (_jsxs(Box, { flexDirection: "column", padding: 1, children: [_jsx(Text, { bold: true, children: "Create New Project" }), formStep === 0 && (_jsxs(Box, { children: [_jsx(Text, { children: "Title: " }), _jsx(TextInput, { value: formData.title, onChange: v => setFormData({ ...formData, title: v }), onSubmit: () => setFormStep(1) })] })), formStep === 1 && (_jsxs(Box, { children: [_jsx(Text, { children: "Description: " }), _jsx(TextInput, { value: formData.description, onChange: v => setFormData({ ...formData, description: v }), onSubmit: () => setFormStep(2) })] })), formStep === 2 && (_jsxs(Box, { children: [_jsx(Text, { children: "Skills (comma sep): " }), _jsx(TextInput, { value: formData.skills, onChange: v => setFormData({ ...formData, skills: v }), onSubmit: handleCreateSubmit })] }))] }));
|
|
19
|
-
}
|
|
20
|
-
if (action === 'apply') {
|
|
21
|
-
if (data?.message)
|
|
22
|
-
return _jsxs(Text, { color: "green", children: ["\u2705 ", data.message] });
|
|
23
|
-
return (_jsxs(Box, { flexDirection: "column", padding: 1, children: [_jsx(Text, { bold: true, children: "Apply to Project" }), _jsx(Text, { children: "Message to owner: " }), _jsx(TextInput, { value: message, onChange: setMessage, onSubmit: handleApplySubmit })] }));
|
|
24
|
-
}
|
|
25
|
-
return _jsxs(Text, { color: "green", children: ["\u2705 ", data?.message] });
|
|
26
|
-
};
|
|
27
|
-
//# sourceMappingURL=project.screen.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"project.screen.js","sourceRoot":"","sources":["../../../src/commands/project/project.screen.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,SAAS,MAAM,gBAAgB,CAAC;AAiBvC,MAAM,CAAC,MAAM,aAAa,GAAiC,CAAC,EACxD,MAAM,EACN,IAAI,EACJ,KAAK,EACL,OAAO,EACP,QAAQ,EACR,WAAW,EACX,QAAQ,EACR,WAAW,EACX,OAAO,EACP,UAAU,EACV,kBAAkB,EAClB,iBAAiB,EACpB,EAAE,EAAE;IACD,IAAI,OAAO;QAAE,OAAO,KAAC,IAAI,6BAAkB,CAAC;IAC5C,IAAI,KAAK;QAAE,OAAO,MAAC,IAAI,IAAC,KAAK,EAAC,KAAK,wBAAS,KAAK,IAAQ,CAAC;IAE1D,IAAI,MAAM,KAAK,MAAM,EAAE,CAAC;QACpB,OAAO,CACH,MAAC,GAAG,IAAC,aAAa,EAAC,QAAQ,EAAC,OAAO,EAAE,CAAC,EAAE,WAAW,EAAC,OAAO,EAAC,WAAW,EAAC,SAAS,aAC7E,KAAC,IAAI,IAAC,IAAI,iDAAwB,EACjC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,IAA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