updated comments of commit

This commit is contained in:
haojin111 2022-05-19 23:02:35 +08:00
parent 27ebbfabe3
commit 9561fe0dd8
3 changed files with 8 additions and 18 deletions

View File

@ -77,7 +77,6 @@ import {
IMPORT_APP_FROM_FILE_MESSAGE,
IMPORT_APP_FROM_GIT_MESSAGE,
IMPORT_FROM_GIT_REPOSITORY,
IMPORT_FROM_GIT_REPOSITORY_MESSAGE,
} from "./messages";
describe("messages", () => {
@ -395,10 +394,10 @@ describe("git-sync messages", () => {
describe("import application messages", () => {
const expectedMessages = [
{ key: "UPLOADING_JSON", value: "Uploading JSON" },
{ key: "UPLOADING_JSON", value: "Uploading JSON file" },
{
key: "UPLOADING_APPLICATION",
value: "Uploading Application",
value: "Uploading application",
},
{
key: "IMPORT_APP_FROM_FILE_MESSAGE",
@ -410,12 +409,7 @@ describe("import application messages", () => {
},
{
key: "IMPORT_FROM_GIT_REPOSITORY",
value: "Import from Git Repository",
},
{
key: "IMPORT_FROM_GIT_REPOSITORY_MESSAGE",
value:
"While importing Appsmith will does not import the datasource credentials to prevent a breach. After a successfull import you can add the credentials manually so the application behaves normally!",
value: "Import from git repository",
},
];
const functions = [
@ -424,7 +418,6 @@ describe("import application messages", () => {
IMPORT_APP_FROM_FILE_MESSAGE,
IMPORT_APP_FROM_GIT_MESSAGE,
IMPORT_FROM_GIT_REPOSITORY,
IMPORT_FROM_GIT_REPOSITORY_MESSAGE,
];
functions.forEach((fn: () => string) => {
it(`${fn.name} returns expected value`, () => {

View File

@ -478,16 +478,14 @@ export const IMPORT_APPLICATION_MODAL_TITLE = () => "Import application";
export const IMPORT_APPLICATION_MODAL_LABEL = () =>
"Where would you like to import your application from?";
export const IMPORT_APP_FROM_FILE_TITLE = () => "Import from file";
export const UPLOADING_JSON = () => "Uploading JSON";
export const UPLOADING_APPLICATION = () => "Uploading Application";
export const UPLOADING_JSON = () => "Uploading JSON file";
export const UPLOADING_APPLICATION = () => "Uploading application";
export const IMPORT_APP_FROM_GIT_TITLE = () => "Import from a Git repo (Beta)";
export const IMPORT_APP_FROM_FILE_MESSAGE = () =>
"Drag and drop your file or upload from your computer";
export const IMPORT_APP_FROM_GIT_MESSAGE = () =>
"Import an application from its git repository using its SSH URL";
export const IMPORT_FROM_GIT_REPOSITORY = () => "Import from Git Repository";
export const IMPORT_FROM_GIT_REPOSITORY_MESSAGE = () =>
"While importing Appsmith will does not import the datasource credentials to prevent a breach. After a successfull import you can add the credentials manually so the application behaves normally!";
export const IMPORT_FROM_GIT_REPOSITORY = () => "Import from git repository";
export const RECONNECT_MISSING_DATASOURCE_CREDENTIALS = () =>
"Reconnect missing datasource credentials";
export const RECONNECT_MISSING_DATASOURCE_CREDENTIALS_DESCRIPTION = () =>

View File

@ -184,10 +184,10 @@ const StatusbarWrapper = styled.div`
border-radius: 50%;
width: 32px;
height: 32px;
background: ${Colors.GREY_4};
display: flex;
justify-content: center;
margin-bottom: 8px;
background: var(--appsmith-color-black-200);
svg {
width: 20px;
height: 20px;
@ -271,7 +271,6 @@ function ImportApplicationModal(props: ImportApplicationModalProps) {
applicationFile: file,
}),
);
// onClose && onClose();
} else {
setAppFileToBeUploaded(null);
}
@ -341,7 +340,7 @@ function ImportApplicationModal(props: ImportApplicationModalProps) {
<StatusbarWrapper className="t--importing-app-statusbar">
<Icon fillColor={Colors.GREY_800} name="file-line" />
<Text className="importing-app-name" type={TextType.P2}>
{appFileToBeUploaded?.file.name || "filename.JSON"}
{appFileToBeUploaded?.file?.name || "filename.json"}
</Text>
<Statusbar
completed={!importingApplication}