Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit2252d2c

Browse files
committed
add less aggressive license messages
1 parent49d8481 commit2252d2c

File tree

4 files changed

+31
-39
lines changed

4 files changed

+31
-39
lines changed

‎client/packages/lowcoder/src/pages/setting/environments/EnvironmentDetail.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,9 +205,9 @@ const EnvironmentDetail: React.FC = () => {
205205
case'licensed':
206206
return<Tagicon={<CheckCircleOutlined/>}color="green"style={{borderRadius:'4px'}}>Licensed</Tag>;
207207
case'unlicensed':
208-
return<Tagicon={<CloseCircleOutlined/>}color="red"style={{borderRadius:'4px'}}>Not Licensed</Tag>;
208+
return<Tagicon={<CloseCircleOutlined/>}color="orange"style={{borderRadius:'4px'}}>License Needed</Tag>;
209209
case'error':
210-
return<Tagicon={<ExclamationCircleOutlined/>}color="orange"style={{borderRadius:'4px'}}>License Error</Tag>;
210+
return<Tagicon={<ExclamationCircleOutlined/>}color="orange"style={{borderRadius:'4px'}}>Setup Required</Tag>;
211211
default:
212212
return<Tagcolor="default"style={{borderRadius:'4px'}}>Unknown</Tag>;
213213
}

‎client/packages/lowcoder/src/pages/setting/environments/components/EnvironmentsTable.tsx‎

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -55,29 +55,29 @@ const EnvironmentsTable: React.FC<EnvironmentsTableProps> = ({
5555
case'checking':
5656
return{
5757
icon:<SyncOutlinedspin/>,
58-
color:'#1890ff',
58+
color:'#40a9ff',
5959
text:'Checking...',
6060
status:'processing'asconst
6161
};
6262
case'licensed':
6363
return{
6464
icon:<CheckCircleOutlined/>,
65-
color:'#52c41a',
65+
color:'#73d13d',
6666
text:'Licensed',
6767
status:'success'asconst
6868
};
6969
case'unlicensed':
7070
return{
7171
icon:<CloseCircleOutlined/>,
72-
color:'#ff4d4f',
73-
text:'Not Licensed',
74-
status:'error'asconst
72+
color:'#ff7875',
73+
text:'License Required',
74+
status:'warning'asconst
7575
};
7676
case'error':
7777
return{
7878
icon:<ExclamationCircleOutlined/>,
79-
color:'#faad14',
80-
text:'License Error',
79+
color:'#ffc53d',
80+
text:'Setup Required',
8181
status:'warning'asconst
8282
};
8383
default:
@@ -180,8 +180,8 @@ const EnvironmentsTable: React.FC<EnvironmentsTableProps> = ({
180180
<Tag
181181
icon={licenseDisplay.icon}
182182
color={licenseDisplay.status==='success' ?'green' :
183-
licenseDisplay.status==='error' ?'red' :
184-
licenseDisplay.status==='warning' ?'orange' :'blue'}
183+
licenseDisplay.status==='warning' ?'orange' :
184+
licenseDisplay.status==='processing' ?'blue' :'default'}
185185
style={{fontSize:'11px',borderRadius:'4px'}}
186186
>
187187
{licenseDisplay.text}

‎client/packages/lowcoder/src/pages/setting/environments/components/UnlicensedEnvironmentView.tsx‎

Lines changed: 10 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -31,37 +31,29 @@ const UnlicensedEnvironmentView: React.FC<UnlicensedEnvironmentViewProps> = ({
3131
constgetLicenseIcon=()=>{
3232
switch(environment.licenseStatus){
3333
case'unlicensed':
34-
return<CloseCircleOutlinedstyle={{fontSize:'48px',color:'#ff4d4f'}}/>;
34+
return<CloseCircleOutlinedstyle={{fontSize:'48px',color:'#ff7875'}}/>;
3535
case'error':
36-
return<ExclamationCircleOutlinedstyle={{fontSize:'48px',color:'#faad14'}}/>;
36+
return<ExclamationCircleOutlinedstyle={{fontSize:'48px',color:'#ffc53d'}}/>;
3737
default:
38-
return<WarningOutlinedstyle={{fontSize:'48px',color:'#ff4d4f'}}/>;
38+
return<WarningOutlinedstyle={{fontSize:'48px',color:'#ff7875'}}/>;
3939
}
4040
};
4141

4242
constgetLicenseTitle=()=>{
43-
switch(environment.licenseStatus){
44-
case'unlicensed':
45-
return'Environment Not Licensed';
46-
case'error':
47-
return'License Configuration Error';
48-
default:
49-
return'License Issue';
50-
}
51-
};
43+
returnenvironment.licenseError;
44+
}
45+
46+
5247

5348
constgetLicenseDescription=()=>{
54-
if(environment.licenseError){
55-
returnenvironment.licenseError;
56-
}
5749

5850
switch(environment.licenseStatus){
5951
case'unlicensed':
60-
return'This environmentrequires a valid license toaccess its featuresandfunctionality.';
52+
return'This environmentneeds a valid license tounlock itsfull capabilities andfeatures. Please make sure your API Service URL is correctly configuredandPlugin is installed.';
6153
case'error':
62-
return'There was anerror validatingthe license for this environment. Pleasecheck the configuration.';
54+
return'We encountered anissue while checkingthe license. Pleasereview the configuration settings.';
6355
default:
64-
return'This environmenthas license-related issues that needtobe resolved.';
56+
return'This environmentrequires license configurationtoproceed.';
6557
}
6658
};
6759

‎client/packages/lowcoder/src/pages/setting/environments/services/license.service.ts‎

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -65,17 +65,17 @@ export async function checkEnvironmentLicense(
6565

6666
}catch(error){
6767
// Determine the specific error type
68-
leterrorMessage='Licensenot available';
68+
leterrorMessage='Licenseinformation unavailable';
6969

7070
if(axios.isAxiosError(error)){
7171
if(error.code==='ECONNABORTED'){
72-
errorMessage='License checktimed out';
72+
errorMessage='License checktook too long';
7373
}elseif(error.response?.status===404){
74-
errorMessage='Licenseendpoint notfound';
74+
errorMessage='Licenseservice notavailable';
7575
}elseif(error.response?.status===401){
76-
errorMessage='Unauthorized - check API key';
76+
errorMessage='Authentication required - please check API key';
7777
}elseif(error.response&&error.response.status>=500){
78-
errorMessage='Licenseserver error';
78+
errorMessage='Licenseservice temporarily unavailable';
7979
}
8080
}
8181

@@ -100,7 +100,7 @@ export function formatAPICalls(remaining: number, total: number): string {
100100
}
101101

102102
/**
103-
* Get API calls status color based on usage percentage
103+
* Get API calls status color based on usage percentage - using softer, less aggressive colors
104104
*@param remainingCalls - Remaining API calls
105105
*@param totalCalls - Total API calls limit
106106
*@returns Color string for UI components
@@ -110,8 +110,8 @@ export function getAPICallsStatusColor(remainingCalls: number, totalCalls: numbe
110110

111111
constusagePercentage=((totalCalls-remainingCalls)/totalCalls)*100;
112112

113-
if(usagePercentage>=90)return'#ff4d4f';//Red - Critical
114-
if(usagePercentage>=75)return'#faad14';//Orange - Warning
115-
if(usagePercentage>=50)return'#1890ff';//Blue - Moderate
116-
return'#52c41a';//Green - Good
113+
if(usagePercentage>=90)return'#ff7875';//Soft red - High usage
114+
if(usagePercentage>=75)return'#ffc53d';//Soft orange - Moderate usage
115+
if(usagePercentage>=50)return'#40a9ff';//Soft blue - Normal usage
116+
return'#73d13d';//Soft green - Low usage
117117
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp