@bigbinary/neeto-github-frontend 1.0.1 → 1.0.2
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/app/javascript/src/translations/en.json +25 -23
- package/dist/index.cjs.js +67 -55
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.js +66 -54
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -8,8 +8,8 @@ import { Github } from '@bigbinary/neeto-icons/misc';
|
|
|
8
8
|
import { globalProps } from '@bigbinary/neeto-commons-frontend/initializers';
|
|
9
9
|
import require$$0 from 'util';
|
|
10
10
|
import Search from '@bigbinary/neeto-molecules/Search';
|
|
11
|
-
import DateFormat from '@bigbinary/neeto-molecules/DateFormat';
|
|
12
11
|
import Scrollable from '@bigbinary/neeto-molecules/Scrollable';
|
|
12
|
+
import DateFormat from '@bigbinary/neeto-molecules/DateFormat';
|
|
13
13
|
|
|
14
14
|
var Configure = withT(function (_ref) {
|
|
15
15
|
var t = _ref.t,
|
|
@@ -25,7 +25,7 @@ var Configure = withT(function (_ref) {
|
|
|
25
25
|
iconSize: 20,
|
|
26
26
|
size: "small",
|
|
27
27
|
style: "text"
|
|
28
|
-
}, isConnected ? t("configureAccount") : t("connectAccount")));
|
|
28
|
+
}, isConnected ? t("neetoGithub.configureAccount") : t("neetoGithub.connectAccount")));
|
|
29
29
|
});
|
|
30
30
|
|
|
31
31
|
var Header = withT(function (_ref) {
|
|
@@ -36,7 +36,7 @@ var Header = withT(function (_ref) {
|
|
|
36
36
|
size: 16
|
|
37
37
|
}), /*#__PURE__*/React.createElement(Typography, {
|
|
38
38
|
style: "h4"
|
|
39
|
-
}, t("github")));
|
|
39
|
+
}, t("neetoGithub.github")));
|
|
40
40
|
});
|
|
41
41
|
|
|
42
42
|
var List$1 = withT(function (_ref) {
|
|
@@ -81,7 +81,7 @@ var List$1 = withT(function (_ref) {
|
|
|
81
81
|
style: "h3"
|
|
82
82
|
}, "\u2022"), /*#__PURE__*/React.createElement(Typography, {
|
|
83
83
|
style: "body2"
|
|
84
|
-
}, t("countOf.repos", {
|
|
84
|
+
}, t("neetoGithub.countOf.repos", {
|
|
85
85
|
count: count
|
|
86
86
|
})));
|
|
87
87
|
});
|
|
@@ -2427,11 +2427,11 @@ var NoRepositories = withT(function (_ref) {
|
|
|
2427
2427
|
className: "flex w-full max-w-sm flex-col items-center justify-center space-y-4 text-center"
|
|
2428
2428
|
}, /*#__PURE__*/React.createElement(Typography, {
|
|
2429
2429
|
style: "body2"
|
|
2430
|
-
}, t("noReposDescription")), /*#__PURE__*/React.createElement(Button, {
|
|
2430
|
+
}, t("neetoGithub.noReposDescription")), /*#__PURE__*/React.createElement(Button, {
|
|
2431
2431
|
href: installationUrl,
|
|
2432
2432
|
icon: Github,
|
|
2433
2433
|
iconPosition: "left",
|
|
2434
|
-
label: t("connectRepository"),
|
|
2434
|
+
label: t("neetoGithub.connectRepository"),
|
|
2435
2435
|
size: "medium",
|
|
2436
2436
|
style: "primary"
|
|
2437
2437
|
}), /*#__PURE__*/React.createElement("div", {
|
|
@@ -2449,6 +2449,45 @@ var NoRepositories = withT(function (_ref) {
|
|
|
2449
2449
|
})));
|
|
2450
2450
|
});
|
|
2451
2451
|
|
|
2452
|
+
var RepositoryTile = withT(function (_ref) {
|
|
2453
|
+
var t = _ref.t,
|
|
2454
|
+
onConnect = _ref.onConnect,
|
|
2455
|
+
repository = _ref.repository;
|
|
2456
|
+
var id = repository.id,
|
|
2457
|
+
fullName = repository.fullName,
|
|
2458
|
+
isPrivate = repository.isPrivate,
|
|
2459
|
+
updatedAt = repository.updatedAt;
|
|
2460
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
2461
|
+
className: "neeto-ui-border-gray-300 flex items-center justify-between border-b border-l-0 border-r-0 border-t-0 border-solid py-3 pl-5 pr-3",
|
|
2462
|
+
key: id
|
|
2463
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
2464
|
+
className: "width-calc flex items-center space-x-2"
|
|
2465
|
+
}, /*#__PURE__*/React.createElement(Github, {
|
|
2466
|
+
size: 16
|
|
2467
|
+
}), /*#__PURE__*/React.createElement(Typography, {
|
|
2468
|
+
style: "body2"
|
|
2469
|
+
}, fullName), isPrivate && /*#__PURE__*/React.createElement(Lock, {
|
|
2470
|
+
size: 16
|
|
2471
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
2472
|
+
className: "hidden md:inline-block"
|
|
2473
|
+
}, /*#__PURE__*/React.createElement(Typography, {
|
|
2474
|
+
className: "neeto-ui-text-gray-900 mx-2 text-sm",
|
|
2475
|
+
component: "span",
|
|
2476
|
+
style: "h3"
|
|
2477
|
+
}, "\u2022"), /*#__PURE__*/React.createElement(DateFormat.FromNow, {
|
|
2478
|
+
date: updatedAt
|
|
2479
|
+
}))), /*#__PURE__*/React.createElement(Button, {
|
|
2480
|
+
style: "primary",
|
|
2481
|
+
type: "button",
|
|
2482
|
+
onClick: function onClick() {
|
|
2483
|
+
return onConnect({
|
|
2484
|
+
repoType: "private",
|
|
2485
|
+
repository: repository
|
|
2486
|
+
});
|
|
2487
|
+
}
|
|
2488
|
+
}, t("neetoGithub.connect")));
|
|
2489
|
+
});
|
|
2490
|
+
|
|
2452
2491
|
var List = withT(function (_ref) {
|
|
2453
2492
|
var t = _ref.t,
|
|
2454
2493
|
filteredRepositories = _ref.filteredRepositories,
|
|
@@ -2460,45 +2499,15 @@ var List = withT(function (_ref) {
|
|
|
2460
2499
|
className: "neeto-ui-border-gray-300 neeto-ui-rounded-md m-0 flex h-52 flex-col items-center justify-center border border-solid p-0 2xl:h-96"
|
|
2461
2500
|
}, isPresent(repositories) ? /*#__PURE__*/React.createElement(Scrollable, {
|
|
2462
2501
|
className: "m-0 h-full w-full overflow-y-scroll p-0 shadow-inner"
|
|
2463
|
-
}, isPresent(filteredRepositories) ? filteredRepositories.map(function (
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
-
|
|
2467
|
-
|
|
2468
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
2469
|
-
className: "neeto-ui-border-gray-300 flex items-center justify-between border-b border-l-0 border-r-0 border-t-0 border-solid py-3 pl-5 pr-3",
|
|
2470
|
-
key: id
|
|
2471
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
2472
|
-
className: "width-calc flex items-center space-x-2"
|
|
2473
|
-
}, /*#__PURE__*/React.createElement(Github, {
|
|
2474
|
-
size: 16
|
|
2475
|
-
}), /*#__PURE__*/React.createElement(Typography, {
|
|
2476
|
-
style: "body2"
|
|
2477
|
-
}, fullName), isPrivate && /*#__PURE__*/React.createElement(Lock, {
|
|
2478
|
-
size: 16
|
|
2479
|
-
}), /*#__PURE__*/React.createElement("div", {
|
|
2480
|
-
className: "hidden md:inline-block"
|
|
2481
|
-
}, /*#__PURE__*/React.createElement(Typography, {
|
|
2482
|
-
className: "neeto-ui-text-gray-900 mx-2 text-sm",
|
|
2483
|
-
component: "span",
|
|
2484
|
-
style: "h3"
|
|
2485
|
-
}, "\u2022"), /*#__PURE__*/React.createElement(DateFormat.FromNow, {
|
|
2486
|
-
date: updatedAt
|
|
2487
|
-
}))), /*#__PURE__*/React.createElement(Button, {
|
|
2488
|
-
style: "primary",
|
|
2489
|
-
type: "button",
|
|
2490
|
-
onClick: function onClick() {
|
|
2491
|
-
return onConnect("private", {
|
|
2492
|
-
id: id,
|
|
2493
|
-
fullName: fullName,
|
|
2494
|
-
isPrivate: isPrivate
|
|
2495
|
-
});
|
|
2496
|
-
}
|
|
2497
|
-
}, t("connect")));
|
|
2502
|
+
}, isPresent(filteredRepositories) ? filteredRepositories.map(function (repository) {
|
|
2503
|
+
return /*#__PURE__*/React.createElement(RepositoryTile, {
|
|
2504
|
+
onConnect: onConnect,
|
|
2505
|
+
repository: repository
|
|
2506
|
+
});
|
|
2498
2507
|
}) : /*#__PURE__*/React.createElement(Typography, {
|
|
2499
2508
|
className: "flex h-full w-full items-center justify-center",
|
|
2500
2509
|
style: "body2"
|
|
2501
|
-
}, t("noRepos"))) : /*#__PURE__*/React.createElement(NoRepositories, {
|
|
2510
|
+
}, t("neetoGithub.noRepos"))) : /*#__PURE__*/React.createElement(NoRepositories, {
|
|
2502
2511
|
installationUrl: installationUrl,
|
|
2503
2512
|
troubleshootUrl: troubleshootUrl
|
|
2504
2513
|
}));
|
|
@@ -2511,11 +2520,11 @@ var NotConnected = withT(function (_ref) {
|
|
|
2511
2520
|
className: "flex w-full max-w-sm flex-col items-center justify-center space-y-4 text-center"
|
|
2512
2521
|
}, /*#__PURE__*/React.createElement(Typography, {
|
|
2513
2522
|
style: "body2"
|
|
2514
|
-
}, t("notConnectedDescription")), /*#__PURE__*/React.createElement(Button, {
|
|
2523
|
+
}, t("neetoGithub.notConnectedDescription")), /*#__PURE__*/React.createElement(Button, {
|
|
2515
2524
|
href: installationUrl,
|
|
2516
2525
|
icon: Github,
|
|
2517
2526
|
iconPosition: "left",
|
|
2518
|
-
label: t("connectGithub"),
|
|
2527
|
+
label: t("neetoGithub.connectGithub"),
|
|
2519
2528
|
size: "medium",
|
|
2520
2529
|
style: "primary"
|
|
2521
2530
|
}));
|
|
@@ -2549,14 +2558,14 @@ var Private = function Private(_ref) {
|
|
|
2549
2558
|
}, /*#__PURE__*/React.createElement(Typography, {
|
|
2550
2559
|
className: "mb-2 pb-5 text-lg font-medium",
|
|
2551
2560
|
style: "h2"
|
|
2552
|
-
}, t("connectARepo")), isConnected ? /*#__PURE__*/React.createElement("div", {
|
|
2561
|
+
}, t("neetoGithub.connectARepo")), isConnected ? /*#__PURE__*/React.createElement("div", {
|
|
2553
2562
|
className: "flex w-full flex-col space-y-6"
|
|
2554
2563
|
}, /*#__PURE__*/React.createElement(Search, {
|
|
2555
2564
|
onSearch: onSearch,
|
|
2556
2565
|
className: "w-full",
|
|
2557
2566
|
suffix: /*#__PURE__*/React.createElement(Typography, {
|
|
2558
2567
|
style: "body2"
|
|
2559
|
-
}, t("countOf.repos", {
|
|
2568
|
+
}, t("neetoGithub.countOf.repos", {
|
|
2560
2569
|
count: filteredRepositories.length
|
|
2561
2570
|
}))
|
|
2562
2571
|
}), /*#__PURE__*/React.createElement(List, {
|
|
@@ -2593,11 +2602,11 @@ var Public = function Public(_ref) {
|
|
|
2593
2602
|
}, /*#__PURE__*/React.createElement(Typography, {
|
|
2594
2603
|
className: "text-lg font-medium",
|
|
2595
2604
|
style: "h2"
|
|
2596
|
-
}, t("publicGitRepo")), /*#__PURE__*/React.createElement("div", {
|
|
2605
|
+
}, t("neetoGithub.publicGitRepo")), /*#__PURE__*/React.createElement("div", {
|
|
2597
2606
|
className: "neeto-ui-text-gray-900 mt-2 flex max-w-xl space-x-1 font-sans text-sm font-normal leading-6 antialiased"
|
|
2598
2607
|
}, /*#__PURE__*/React.createElement(Typography, {
|
|
2599
2608
|
style: "body2"
|
|
2600
|
-
}, t("publicGitRepoDescription")))))), /*#__PURE__*/React.createElement("div", {
|
|
2609
|
+
}, t("neetoGithub.publicGitRepoDescription")))))), /*#__PURE__*/React.createElement("div", {
|
|
2601
2610
|
className: "neeto-ui-text-gray-900 font-sans text-sm font-normal leading-6 antialiased"
|
|
2602
2611
|
}, /*#__PURE__*/React.createElement("div", {
|
|
2603
2612
|
className: "flex"
|
|
@@ -2609,7 +2618,7 @@ var Public = function Public(_ref) {
|
|
|
2609
2618
|
nakedInput: true,
|
|
2610
2619
|
autocomplete: "false",
|
|
2611
2620
|
className: "relative rounded-b rounded-l rounded-r-none rounded-t border-b border-l border-r-0 border-t border-solid px-2",
|
|
2612
|
-
placeholder: t("publicGitRepoPlaceholder"),
|
|
2621
|
+
placeholder: t("neetoGithub.publicGitRepoPlaceholder"),
|
|
2613
2622
|
size: "large",
|
|
2614
2623
|
spellcheck: "false",
|
|
2615
2624
|
type: "text",
|
|
@@ -2626,11 +2635,14 @@ var Public = function Public(_ref) {
|
|
|
2626
2635
|
style: "primary",
|
|
2627
2636
|
type: "button",
|
|
2628
2637
|
onClick: function onClick() {
|
|
2629
|
-
return onConnect(
|
|
2630
|
-
|
|
2638
|
+
return onConnect({
|
|
2639
|
+
repoType: "public",
|
|
2640
|
+
repository: {
|
|
2641
|
+
fullName: publicRepoUrl
|
|
2642
|
+
}
|
|
2631
2643
|
});
|
|
2632
2644
|
}
|
|
2633
|
-
}, t("continue"))))));
|
|
2645
|
+
}, t("neetoGithub.continue"))))));
|
|
2634
2646
|
};
|
|
2635
2647
|
|
|
2636
2648
|
var Repositories = function Repositories(_ref) {
|
|
@@ -2678,10 +2690,10 @@ var NeetoGithubNanoModal = function NeetoGithubNanoModal(_ref) {
|
|
|
2678
2690
|
size: "large"
|
|
2679
2691
|
}, /*#__PURE__*/React.createElement(Pane.Header, null, /*#__PURE__*/React.createElement(Typography, {
|
|
2680
2692
|
style: "h2"
|
|
2681
|
-
}, t("
|
|
2693
|
+
}, t("neetoGithub.modal.title")), /*#__PURE__*/React.createElement(Typography, {
|
|
2682
2694
|
className: "mt-4",
|
|
2683
2695
|
style: "body2"
|
|
2684
|
-
}, t("
|
|
2696
|
+
}, t("neetoGithub.modal.description"))), /*#__PURE__*/React.createElement(Pane.Body, null, /*#__PURE__*/React.createElement("div", {
|
|
2685
2697
|
className: "w-full 2xl:max-w-7xl"
|
|
2686
2698
|
}, /*#__PURE__*/React.createElement("div", {
|
|
2687
2699
|
className: "flex flex-col-reverse 2xl:flex-row"
|