Skip to content

Commit

Permalink
Merge branch 'main' into travjenkins/bug/better-handling-of-empty-con…
Browse files Browse the repository at this point in the history
…figs
  • Loading branch information
travjenkins authored Feb 11, 2025
2 parents 0ab9ea6 + e624224 commit 2a8d7fe
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,6 @@ function PrefixInvitationDialog({ open, setOpen }: Props) {
</DialogTitle>

<DialogContent>
{/* <Typography sx={{ mb: 3 }}>
<FormattedMessage id="admin.users.prefixInvitation.message" />
</Typography> */}

{serverError ? (
<Box sx={{ mb: 3 }}>
<Error
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ import { useConfirmationModalContext } from 'context/Confirmation';
import { useZustandStore } from 'context/Zustand/provider';
import { useState } from 'react';
import { FormattedMessage, useIntl } from 'react-intl';
import { SelectTableStoreNames } from 'stores/names';
import {
SelectableTableStore,
selectableTableStoreSelectors,
} from 'stores/Tables/Store';
import { SelectTableStoreNames } from 'stores/names';
import ConfirmationAlert from '../Shared/ConfirmationAlert';
import RevokeGrant from './RevokeGrant';

Expand Down Expand Up @@ -111,7 +111,7 @@ function DeleteButton({ selectTableStoreName }: Props) {
disabled={!selectionsExist}
onClick={handlers.showConfirmationDialog}
>
<FormattedMessage id="cta.revoke" />
<FormattedMessage id="cta.remove" />
</Button>

<Dialog open={showProgress} maxWidth="md">
Expand All @@ -124,9 +124,9 @@ function DeleteButton({ selectTableStoreName }: Props) {
key={`revoke-grant-${index}`}
grant={item}
onFinish={onFinish}
runningMessageID="common.revoking"
runningMessageID="common.removing"
selectTableStoreName={selectTableStoreName}
successMessageID="common.revoked"
successMessageID="common.removed"
/>
)}
/>
Expand Down
6 changes: 3 additions & 3 deletions src/components/tables/cells/refreshTokens/RevokeToken.tsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
import { Stack, TableCell, Tooltip, useTheme } from '@mui/material';
import { PostgrestError } from '@supabase/postgrest-js';
import { INVALID_TOKEN_INTERVAL, updateRefreshTokenValidity } from 'api/tokens';
import SafeLoadingButton from 'components/SafeLoadingButton';
import Error from 'components/shared/Error';
import { sample_blue } from 'context/Theme';
import { useZustandStore } from 'context/Zustand/provider';
import { WarningCircle } from 'iconoir-react';
import { useState } from 'react';
import { FormattedMessage } from 'react-intl';
import { SelectTableStoreNames } from 'stores/names';
import {
SelectableTableStore,
selectableTableStoreSelectors,
} from 'stores/Tables/Store';
import { SelectTableStoreNames } from 'stores/names';
import SafeLoadingButton from 'components/SafeLoadingButton';

interface Props {
id: string;
Expand Down Expand Up @@ -63,7 +63,7 @@ function RevokeTokenButton({ id }: Props) {
onClick={revokeToken}
variant="text"
>
<FormattedMessage id="cta.revoke" />
<FormattedMessage id="cta.remove" />
</SafeLoadingButton>

{error ? (
Expand Down
15 changes: 7 additions & 8 deletions src/lang/en-US/AdminPage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,14 +89,13 @@ export const AdminPage: Record<string, string> = {
'admin.billing.addPaymentMethods.title': `Add a payment method`,
'admin.billing.addPaymentMethods.stripeLoadError': `Unable to load the forms from Stripe. ${Errors['error.tryAgain']}`,

'admin.grants.confirmation.alert': `Access to all items will be revoked and this action cannot be undone. Please review the list to continue.`,
'admin.grants.confirmation.alert': `Access to all items will be removed and this action cannot be undone. Please review the list to continue.`,

'admin.users.cta.prefixInvitation': `Manage Invitations`,
'admin.users.prefixInvitation.header': `Manage Invitations`,
'admin.users.prefixInvitation.message': `This is a placeholder for a description.`,
'admin.users.cta.prefixInvitation': `Add Users`,
'admin.users.prefixInvitation.header': `Add Users`,
'admin.users.prefixInvitation.label.capability': `Capability`,
'admin.users.prefixInvitation.label.type': `Type`,
'admin.users.prefixInvitation.cta.generateLink': `Generate Invitation`,
'admin.users.prefixInvitation.cta.generateLink': `Create Invite Link`,
'admin.users.confirmation.listItem': `{identifier} with {capability} access.`,

'admin.prefix.cta.issueGrant': `Grant Access`,
Expand Down Expand Up @@ -181,15 +180,15 @@ export const AdminPage: Record<string, string> = {
'accessGrants.message1': `No results found.`,
'accessGrants.message2': `We couldn't find any results matching your search. Please try a different filter.`,

'accessGrants.table.accessLinks.title': `Active Invitations`,
'accessGrants.table.accessLinks.title': `Active Invite Links`,
'accessGrants.table.accessLinks.cta.generate': `Create Links`,
'accessGrants.table.accessLinks.header.noData': `No active invitations found.`,
'accessGrants.table.accessLinks.message.noData': `To create an invitation, click the "Generate Invitation" button above. Invitations will be listed here while they are live.`,
'accessGrants.table.accessLinks.message.noData': `To create an invitation, click the "Create Invite Link" button above. Invitations will be listed here while they are live.`,
'accessGrants.table.accessLinks.label.filter': `Filter Prefix or Capability`,
'accessGrants.table.accessLinks.label.provisioningPrefix': `Provisioner`,
'accessGrants.table.accessLinks.label.grantedPrefix': `Prefix`,
'accessGrants.table.accessLinks.label.capability': `Capability`,
'accessGrants.table.accessLinks.label.url': `URL`,
'accessGrants.table.accessLinks.label.url': `Invite Link`,
'accessGrants.table.accessLinks.label.lastUpdated': `Last Updated`,
'accessGrants.table.accessLinks.label.actions': `Actions`,
'accessGrants.table.accessLinks.delete.confirm': `All items will be disabled and this action cannot be undone. Please review the list to continue.`,
Expand Down
2 changes: 1 addition & 1 deletion src/lang/en-US/CTAs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export const CTAs: Record<string, string> = {
'cta.add': `Add`,
'cta.transform': `Transform`,
'cta.back': `Back`,
'cta.revoke': `Revoke`,
'cta.remove': `Remove`,
'cta.goToDetails': `See Details`,
'cta.goToAll': `See all`,
// These are dynamically created in the Save button
Expand Down
4 changes: 2 additions & 2 deletions src/lang/en-US/CommonMessages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ export const CommonMessages: Record<string, string> = {
'common.failedFetch': `Unable to reach server`,
'common.missingError': `Something went wrong`,
'common.exampleName': `marketing_data`,
'common.revoking': `Revoking...`,
'common.revoked': `Revoked`,
'common.removing': `Removing...`,
'common.removed': `Removed`,
'common.default': `Default`,
'common.public': `Public`,
'common.private': `Private`,
Expand Down

0 comments on commit 2a8d7fe

Please sign in to comment.