-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: support C/D/A/V connections and nodes info (#519)
Co-authored-by: Hu Yueh-Wei <[email protected]>
- Loading branch information
Showing
27 changed files
with
1,613 additions
and
173 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
core/src/ten_manager/designer_frontend/src/components/AppBar/AppStatus.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
// | ||
// Copyright © 2025 Agora | ||
// This file is part of TEN Framework, an open source project. | ||
// Licensed under the Apache License, Version 2.0, with certain conditions. | ||
// Refer to the "LICENSE" file in the root directory for more information. | ||
// | ||
import { SaveIcon, FilePenLineIcon, SaveOffIcon } from "lucide-react"; | ||
|
||
import { Button } from "@/components/ui/Button"; | ||
import { cn } from "@/lib/utils"; | ||
|
||
// eslint-disable-next-line react-refresh/only-export-components | ||
export enum EAppStatus { | ||
SAVED = "Saved", | ||
UNSAVED = "Unsaved", | ||
EDITING = "Editing", | ||
} | ||
|
||
export function AppStatus(props: { className?: string; status?: EAppStatus }) { | ||
const { className, status } = props; | ||
if (!status) { | ||
return null; | ||
} | ||
return ( | ||
<div className={cn("flex items-center gap-2", "w-fit", className)}> | ||
<div className="flex items-center"> | ||
{status === EAppStatus.SAVED && <SaveIcon className="w-4 h-4 me-2" />} | ||
{status === EAppStatus.UNSAVED && ( | ||
<SaveOffIcon className="w-4 h-4 me-2" /> | ||
)} | ||
{status === EAppStatus.EDITING && ( | ||
<FilePenLineIcon className="w-4 h-4 me-2" /> | ||
)} | ||
{status} | ||
</div> | ||
{status === EAppStatus.EDITING && ( | ||
<div className="flex items-center text-primary"> | ||
<Button variant="outline" size="sm" className=""> | ||
<SaveIcon className="w-3 h-3" /> | ||
<span className="text-xs">Save</span> | ||
</Button> | ||
</div> | ||
)} | ||
</div> | ||
); | ||
} |
Oops, something went wrong.