Skip to content

Commit

Permalink
devtools_frotnend: format
Browse files Browse the repository at this point in the history
  • Loading branch information
kobkaz committed Apr 12, 2024
1 parent e8fb69b commit ac3ee3c
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 16 deletions.
24 changes: 12 additions & 12 deletions devtools-frontend/src/components/Layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const TelemetryListSidebar: React.FC<TelemetryListSidebarProps> = ({
}) => {
const recorder = (useLoaderData() as ClientContext).client;
const [recorderStatus, setRecordingStatus] = useState<RecordingStatus | null>(
null
null,
);
useEffect(() => {
const readerP = recorder
Expand Down Expand Up @@ -120,15 +120,15 @@ const TelemetryListSidebar: React.FC<TelemetryListSidebarProps> = ({
}`}
>
<span onClick={() => toggleRecordingStatus(item.name)}>
{recorderStatus?.recordingTelemetries.has(item.name)
? <div className="py-1">
<div className="w-3 h-3 bg-red-600 rounded-full"></div>
</div>
: <div className="py-1">
<div className="w-3 h-3 bg-gray-600 rounded-full"></div>
</div>

}
{recorderStatus?.recordingTelemetries.has(item.name) ? (
<div className="py-1">
<div className="w-3 h-3 bg-red-600 rounded-full"></div>
</div>
) : (
<div className="py-1">
<div className="w-3 h-3 bg-gray-600 rounded-full"></div>
</div>
)}
</span>
<code
className={`${Classes.FILL} ${Classes.TEXT_OVERFLOW_ELLIPSIS}`}
Expand Down Expand Up @@ -156,10 +156,10 @@ export const Layout = () => {
const items: TelemetryMenuItem[] = [];
const channelNames = Object.keys(ctx.satelliteSchema.telemetryChannels);
for (const [componentName, componentSchema] of Object.entries(
ctx.satelliteSchema.telemetryComponents
ctx.satelliteSchema.telemetryComponents,
)) {
for (const [telemetryName, telemetrySchema] of Object.entries(
componentSchema.telemetries
componentSchema.telemetries,
)) {
for (const channelName of channelNames) {
const name = `${channelName}.${componentName}.${telemetryName}`;
Expand Down
4 changes: 1 addition & 3 deletions devtools-frontend/src/components/TelemetryView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -203,9 +203,7 @@ export const TelemetryView: React.FC = () => {
}
};



const recording =
const recording =
recorderStatus?.recordingTelemetries?.has(tmivName) ?? false;

const recordingMenuItemsWhenRecording = (
Expand Down
2 changes: 1 addition & 1 deletion devtools-frontend/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
},
"target": "ESNext",
"lib": ["DOM", "DOM.Iterable", "ESNext", "WebWorker"],
"types": ["vite/client", "@types/wicg-file-system-access" ],
"types": ["vite/client", "@types/wicg-file-system-access"],
"allowJs": false,
"skipLibCheck": false,
"esModuleInterop": false,
Expand Down

0 comments on commit ac3ee3c

Please sign in to comment.