Skip to content

Commit

Permalink
Merge branch 'develop' into fix/cli-version-flag
Browse files Browse the repository at this point in the history
  • Loading branch information
rajdip-b authored Jan 30, 2025
2 parents 504b695 + defdbcd commit 5599898
Show file tree
Hide file tree
Showing 7 changed files with 62 additions and 6 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## [2.11.0-stage.5](https://github.com/keyshade-xyz/keyshade/compare/v2.11.0-stage.4...v2.11.0-stage.5) (2025-01-30)

### 🚀 Features

* **platform:** Add new access level SVGs and integrate into ProjectCard component ([#678](https://github.com/keyshade-xyz/keyshade/issues/678)) ([cc3ef77](https://github.com/keyshade-xyz/keyshade/commit/cc3ef77b93054e44fc5de01e12ef9d0d707a0a14))

## [2.11.0-stage.4](https://github.com/keyshade-xyz/keyshade/compare/v2.11.0-stage.3...v2.11.0-stage.4) (2025-01-30)

### 🚀 Features
Expand Down
7 changes: 7 additions & 0 deletions apps/platform/public/svg/dashboard/global.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 12 additions & 1 deletion apps/platform/public/svg/dashboard/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,16 @@ import EnvironmentSVG from './environment.svg'
import SecretSVG from './secret.svg'
import FolderSVG from './folder.svg'
import VariableSVG from './variable.svg'
import PrivateSVG from './private.svg'
import GlobalSVG from './global.svg'
import InternalSVG from './internal.svg'

export { EnvironmentSVG, SecretSVG, FolderSVG, VariableSVG }
export {
EnvironmentSVG,
SecretSVG,
FolderSVG,
VariableSVG,
PrivateSVG,
GlobalSVG,
InternalSVG
}
5 changes: 5 additions & 0 deletions apps/platform/public/svg/dashboard/internal.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions apps/platform/public/svg/dashboard/private.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,14 @@
import Link from 'next/link'
import { toast } from 'sonner'
import Avvvatars from 'avvvatars-react'
import { SecretSVG, EnvironmentSVG, VariableSVG } from '@public/svg/dashboard'
import {
SecretSVG,
EnvironmentSVG,
VariableSVG,
GlobalSVG,
PrivateSVG,
InternalSVG
} from '@public/svg/dashboard'
import type { ProjectWithCount } from '@keyshade/schema'
import { useSetAtom } from 'jotai'
import {
Expand Down Expand Up @@ -32,7 +39,8 @@ export default function ProjectCard({
description,
environmentCount,
secretCount,
variableCount
variableCount,
accessLevel
} = project

const setIsEditProjectSheetOpen = useSetAtom(editProjectOpenAtom)
Expand Down Expand Up @@ -76,6 +84,19 @@ export default function ProjectCard({
setIsDeleteProjectOpen(true)
}

const accessLevelToSVG = (accessLvl: ProjectWithCount['accessLevel']) => {
switch (accessLvl) {
case 'GLOBAL':
return <GlobalSVG width={16} />
case 'PRIVATE':
return <PrivateSVG width={16} />
case 'INTERNAL':
return <InternalSVG width={16} />
default:
return null
}
}

return (
<ContextMenu>
<ContextMenuTrigger className="flex h-[7rem]">
Expand All @@ -85,7 +106,6 @@ export default function ProjectCard({
key={id}
>
<div className="flex items-center gap-x-5">
{/* <div className="aspect-square h-14 w-14 rounded-full bg-white/35" /> */}
<Avvvatars size={56} style="shape" value={id} />
<div>
<div className="font-semibold">{name}</div>
Expand All @@ -94,7 +114,11 @@ export default function ProjectCard({
</span>
</div>
</div>
<div className="flex h-full flex-col items-end justify-end">
<div className="flex h-full flex-col items-end justify-between">
<div className="flex items-center gap-1 rounded-md border border-white/70 px-2 py-1 capitalize">
{accessLevelToSVG(accessLevel)}
{accessLevel.toLowerCase()}
</div>
<div className="grid grid-cols-3 gap-x-3">
<div className="flex items-center gap-x-1">
<EnvironmentSVG width={16} />
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "keyshade-xyz",
"version": "2.11.0-stage.4",
"version": "2.11.0-stage.5",
"license": "MPL-2.0",
"private": true,
"engineStrict": false,
Expand Down

0 comments on commit 5599898

Please sign in to comment.