You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Simplify EmptyState to a single isCreateDisabled prop. When disabled,
show only the PAT hint text instead of both messages, and remove the
redundant Tooltip from the disabled button. Remove Tooltip from the
table-view Create button in FunctionsListPage as well.
Protect FunctionCreatePage against unauthenticated access via URL by
showing a warning alert and hiding the form when no PAT is stored.
Clean up UserAvatar: remove all useCallback wrappers, remove unused
logout, use guard pattern in readStoredUser, extract usePatModal hook,
shrink modal to small variant, disable Cancel and modal close while
validating. Extract shared errorMessage utility.
Remove stale question from features.json and update i18n keys.
Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Matej Vašek <matejvasek@gmail.com>
Copy file name to clipboardExpand all lines: docs/features.json
+1-2Lines changed: 1 addition & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -109,8 +109,7 @@
109
109
"On Create and Edit pages, UserAvatar displays the GitHub user but is not clickable (PAT cannot be changed from those pages)",
110
110
"When PatModal is dismissed without a PAT, the Function List Page (both empty state and table view) shows a hint text directing the user to click 'Connect to GitHub' in the top-right corner to set a PAT",
111
111
"PAT change logic is encapsulated in a useUserAvatar custom hook following layered architecture (Hook imports Service, Component imports Hook)",
112
-
"Question is how would change to pat be propagated, maybe the github service can use \"lazy\" authentication -- callback that reads PAT instead of passing PAT to the service",
113
-
"If the GH PAT is not set in the session then the Create button is inactive/disabled. The tooltiop of the button should say that PAT is required.",
112
+
"If the GH PAT is not set in the session then the Create button is inactive/disabled.",
114
113
"The GH PAT must not be compiled/hardcode into code at compile time."
Copy file name to clipboardExpand all lines: locales/en/plugin__console-functions-plugin.json
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,6 @@
1
1
{
2
-
"A GitHub Personal Access Token is required to create functions.": "A GitHub Personal Access Token is required to create functions.",
2
+
"A GitHub Personal Access Token is required to create functions. Click 'Connect to GitHub' in the top-right corner to connect. Once connected, the create button will be enabled.": "A GitHub Personal Access Token is required to create functions. Click 'Connect to GitHub' in the top-right corner to connect. Once connected, the create button will be enabled.",
3
+
"A GitHub Personal Access Token is required to create functions. Go to the Functions page and click 'Connect to GitHub' to connect.": "A GitHub Personal Access Token is required to create functions. Go to the Functions page and click 'Connect to GitHub' to connect.",
3
4
"Actions": "Actions",
4
5
"Branch": "Branch",
5
6
"Cancel": "Cancel",
@@ -23,7 +24,6 @@
23
24
"Namespace": "Namespace",
24
25
"No functions found": "No functions found",
25
26
"Owner": "Owner",
26
-
"PAT is required to create functions. Click 'Connect to GitHub' in the top-right corner.": "PAT is required to create functions. Click 'Connect to GitHub' in the top-right corner.",
<EmptyStateBody>{t('Create a serverless function to get started.')}</EmptyStateBody>
24
-
{hint&&<EmptyStateBody>{hint}</EmptyStateBody>}
21
+
<EmptyStateBody>
22
+
{isCreateDisabled
23
+
? t(
24
+
"A GitHub Personal Access Token is required to create functions. Click 'Connect to GitHub' in the top-right corner to connect. Once connected, the create button will be enabled.",
25
+
)
26
+
: t('Create a serverless function to get started.')}
27
+
</EmptyStateBody>
25
28
<EmptyStateFooter>
26
29
<EmptyStateActions>
27
30
{isCreateDisabled ? (
28
-
<Tooltipcontent={t('A GitHub Personal Access Token is required to create functions.')}>
0 commit comments