mirror of
https://github.com/claude-code-best/claude-code.git
synced 2026-06-18 22:35:51 +00:00
style: 完成所有文件的lint
This commit is contained in:
@@ -1,42 +1,32 @@
|
||||
import React from 'react'
|
||||
import { Text } from '@anthropic/ink'
|
||||
import { Select } from './CustomSelect/index.js'
|
||||
import { Dialog } from '@anthropic/ink'
|
||||
import React from 'react';
|
||||
import { Text } from '@anthropic/ink';
|
||||
import { Select } from './CustomSelect/index.js';
|
||||
import { Dialog } from '@anthropic/ink';
|
||||
|
||||
export type ChannelDowngradeChoice = 'downgrade' | 'stay' | 'cancel'
|
||||
export type ChannelDowngradeChoice = 'downgrade' | 'stay' | 'cancel';
|
||||
|
||||
type Props = {
|
||||
currentVersion: string
|
||||
onChoice: (choice: ChannelDowngradeChoice) => void
|
||||
}
|
||||
currentVersion: string;
|
||||
onChoice: (choice: ChannelDowngradeChoice) => void;
|
||||
};
|
||||
|
||||
/**
|
||||
* Dialog shown when switching from latest to stable channel.
|
||||
* Allows user to choose whether to downgrade or stay on current version.
|
||||
*/
|
||||
export function ChannelDowngradeDialog({
|
||||
currentVersion,
|
||||
onChoice,
|
||||
}: Props): React.ReactNode {
|
||||
export function ChannelDowngradeDialog({ currentVersion, onChoice }: Props): React.ReactNode {
|
||||
function handleSelect(value: ChannelDowngradeChoice): void {
|
||||
onChoice(value)
|
||||
onChoice(value);
|
||||
}
|
||||
|
||||
function handleCancel(): void {
|
||||
onChoice('cancel')
|
||||
onChoice('cancel');
|
||||
}
|
||||
|
||||
return (
|
||||
<Dialog
|
||||
title="Switch to Stable Channel"
|
||||
onCancel={handleCancel}
|
||||
color="permission"
|
||||
hideBorder
|
||||
hideInputGuide
|
||||
>
|
||||
<Dialog title="Switch to Stable Channel" onCancel={handleCancel} color="permission" hideBorder hideInputGuide>
|
||||
<Text>
|
||||
The stable channel may have an older version than what you're
|
||||
currently running ({currentVersion}).
|
||||
The stable channel may have an older version than what you're currently running ({currentVersion}).
|
||||
</Text>
|
||||
<Text dimColor>How would you like to handle this?</Text>
|
||||
<Select
|
||||
@@ -53,5 +43,5 @@ export function ChannelDowngradeDialog({
|
||||
onChange={handleSelect}
|
||||
/>
|
||||
</Dialog>
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user