hackmate-cli 1.0.13 → 1.0.14
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"profile-view.screen.d.ts","sourceRoot":"","sources":["../../../../src/features/profile/components/profile-view.screen.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"profile-view.screen.d.ts","sourceRoot":"","sources":["../../../../src/features/profile/components/profile-view.screen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAGxC,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,CAuF9D,CAAC"}
|
|
@@ -1,6 +1,18 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { useState } from 'react';
|
|
3
|
+
import { Text, Box, useInput } from 'ink';
|
|
3
4
|
export const ProfileViewScreen = ({ profile, loading, error, user }) => {
|
|
5
|
+
const [showFullStack, setShowFullStack] = useState(false);
|
|
6
|
+
const [showFullInterests, setShowFullInterests] = useState(false);
|
|
7
|
+
const MAX_STACK_PREVIEW = 10;
|
|
8
|
+
useInput((input, key) => {
|
|
9
|
+
if (input === 's' || input === 'S') {
|
|
10
|
+
setShowFullStack(prev => !prev);
|
|
11
|
+
}
|
|
12
|
+
if (input === 'i' || input === 'I') {
|
|
13
|
+
setShowFullInterests(prev => !prev);
|
|
14
|
+
}
|
|
15
|
+
});
|
|
4
16
|
if (loading)
|
|
5
17
|
return _jsx(Text, { children: "Loading profile..." });
|
|
6
18
|
if (error)
|
|
@@ -8,6 +20,16 @@ export const ProfileViewScreen = ({ profile, loading, error, user }) => {
|
|
|
8
20
|
if (!profile)
|
|
9
21
|
return _jsxs(Text, { children: ["No profile found for @", user?.username, ". Run \"hackmate profile edit\" to create one."] });
|
|
10
22
|
const locationDisplay = [profile.city, profile.country].filter(Boolean).join(', ') || profile.location || 'N/A';
|
|
11
|
-
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: ",
|
|
23
|
+
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, { bold: true, children: ["Company/College: ", _jsx(Text, { color: "cyan", children: profile.company || 'N/A' })] }), profile.stack && Array.isArray(profile.stack) && profile.stack.length > 0 ? (_jsxs(Box, { flexDirection: "column", children: [_jsxs(Text, { bold: true, children: ["Stack: ", _jsx(Text, { color: "green", children: showFullStack
|
|
24
|
+
? profile.stack.join(', ')
|
|
25
|
+
: profile.stack.slice(0, MAX_STACK_PREVIEW).join(', ') +
|
|
26
|
+
(profile.stack.length > MAX_STACK_PREVIEW ? '...' : '') })] }), profile.stack.length > MAX_STACK_PREVIEW && (_jsx(Text, { color: "yellow", italic: true, children: showFullStack
|
|
27
|
+
? `↑ Press S to show less (showing all ${profile.stack.length} technologies)`
|
|
28
|
+
: `↓ Press S to show more (${profile.stack.length - MAX_STACK_PREVIEW} more hidden)` }))] })) : (_jsx(Text, { children: "Stack: N/A" })), profile.interests && Array.isArray(profile.interests) && profile.interests.length > 0 ? (_jsxs(Box, { flexDirection: "column", children: [_jsxs(Text, { bold: true, children: ["Interests: ", _jsx(Text, { color: "magenta", children: showFullInterests
|
|
29
|
+
? profile.interests.join(', ')
|
|
30
|
+
: profile.interests.slice(0, MAX_STACK_PREVIEW).join(', ') +
|
|
31
|
+
(profile.interests.length > MAX_STACK_PREVIEW ? '...' : '') })] }), profile.interests.length > MAX_STACK_PREVIEW && (_jsx(Text, { color: "yellow", italic: true, children: showFullInterests
|
|
32
|
+
? `↑ Press I to show less (showing all ${profile.interests.length} interests)`
|
|
33
|
+
: `↓ Press I to show more (${profile.interests.length - MAX_STACK_PREVIEW} more hidden)` }))] })) : (_jsx(Text, { children: "Interests: N/A" })), _jsxs(Text, { children: ["Location: ", locationDisplay] }), _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'] }), _jsx(Box, { marginTop: 1, children: _jsx(Text, { color: "gray", children: "Press ESC to exit" }) })] }));
|
|
12
34
|
};
|
|
13
35
|
//# sourceMappingURL=profile-view.screen.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"profile-view.screen.js","sourceRoot":"","sources":["../../../../src/features/profile/components/profile-view.screen.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"profile-view.screen.js","sourceRoot":"","sources":["../../../../src/features/profile/components/profile-view.screen.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAC;AAS1C,MAAM,CAAC,MAAM,iBAAiB,GAAqC,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,EAAE;IACrG,MAAM,CAAC,aAAa,EAAE,gBAAgB,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC1D,MAAM,CAAC,iBAAiB,EAAE,oBAAoB,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAClE,MAAM,iBAAiB,GAAG,EAAE,CAAC;IAE7B,QAAQ,CAAC,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE;QACpB,IAAI,KAAK,KAAK,GAAG,IAAI,KAAK,KAAK,GAAG,EAAE,CAAC;YACjC,gBAAgB,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC;QACpC,CAAC;QACD,IAAI,KAAK,KAAK,GAAG,IAAI,KAAK,KAAK,GAAG,EAAE,CAAC;YACjC,oBAAoB,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC;QACxC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,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,s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