Skip to content

Commit

Permalink
fix: tags dialog fixes and improvements (#176)
Browse files Browse the repository at this point in the history
* refactor: split secret components into files

* fix: misc improvements to tag selection and creator ui

* fix: correctly handle state changes when closing / opening dialog

* fix: don't trigger property update if tags are unchanged

* fix: button cursor when disabled

* chore: remove unused imports

* fix: import
  • Loading branch information
rohan-chaturvedi authored Feb 8, 2024
1 parent 70f124f commit ce13364
Show file tree
Hide file tree
Showing 10 changed files with 864 additions and 805 deletions.
15 changes: 2 additions & 13 deletions frontend/app/[team]/apps/[app]/environments/[environment]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
'use client'

import {
ApiEnvironmentSyncStatusChoices,
EnvironmentSyncType,
EnvironmentType,
SecretInput,
SecretType,
} from '@/apollo/graphql'
import { EnvironmentType, SecretInput, SecretType } from '@/apollo/graphql'
import UnlockKeyringDialog from '@/components/auth/UnlockKeyringDialog'
import { KeyringContext } from '@/contexts/keyringContext'
import { GetSecrets } from '@/graphql/queries/secrets/getSecrets.gql'
Expand All @@ -26,27 +20,22 @@ import { useMutation, useQuery } from '@apollo/client'
import { Fragment, useContext, useEffect, useRef, useState } from 'react'
import { Button } from '@/components/common/Button'
import {
FaArrowRight,
FaChevronDown,
FaDownload,
FaExchangeAlt,
FaPlus,
FaSearch,
FaSync,
FaTimesCircle,
FaUndo,
} from 'react-icons/fa'
import SecretRow from '@/components/environments/SecretRow'
import clsx from 'clsx'
import { toast } from 'react-toastify'
import { organisationContext } from '@/contexts/organisationContext'
import { Menu, Popover, Transition } from '@headlessui/react'
import { Menu, Transition } from '@headlessui/react'
import { usePathname, useSearchParams } from 'next/navigation'
import Link from 'next/link'
import { Alert } from '@/components/common/Alert'
import { SyncStatusIndicator } from '@/components/syncing/SyncStatusIndicator'
import { SyncCard } from '@/components/syncing/SyncCard'
import { StatusIndicator } from '@/components/common/StatusIndicator'
import { EnvSyncStatus } from '@/components/syncing/EnvSyncStatus'

type EnvKeyring = {
Expand Down
2 changes: 1 addition & 1 deletion frontend/components/common/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export function Button(buttonProps: ButtonProps) {
'inline-flex gap-1 justify-center items-center overflow-hidden text-sm font-medium transition-all ease-in-out',
variantStyles[variant],
classString,
(buttonProps.disabled || isLoading) && 'opacity-60 pointer-events-none'
(buttonProps.disabled || isLoading) && 'opacity-60 cursor-not-allowed'
)

let arrowIcon = (
Expand Down
2 changes: 1 addition & 1 deletion frontend/components/environments/SecretPropertyDiffs.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { SecretEventType, SecretTagType, SecretType } from '@/apollo/graphql'
import { areTagsAreSame } from '@/utils/tags'
import { Tag } from './SecretRow'
import { FaRedoAlt, FaUndoAlt } from 'react-icons/fa'
import { Button } from '../common/Button'
import { Tag } from './Tag'

export const SecretPropertyDiffs = (props: {
secret: SecretType
Expand Down
Loading

0 comments on commit ce13364

Please sign in to comment.