Skip to content

Commit

Permalink
Merge pull request #139 from nspcc-dev/fix/136-long_filename
Browse files Browse the repository at this point in the history
Long file name extends beyond the screen
  • Loading branch information
roman-khimov authored Jan 22, 2024
2 parents 946b2e8 + 74ec3c6 commit e17005d
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/App.css
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,7 @@ label.panel-block:hover {
.objects_tree_file .file--label span {
margin-left: 5px;
cursor: pointer;
word-break: break-word;
}

.objects_tree_folder .folder_collapsible,
Expand Down
2 changes: 2 additions & 0 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -439,6 +439,8 @@ export const App = () => {
loading: false,
});
}
}).catch((err) => {
onModal('failed', `Something went wrong: ${err}`);
});
} else {
setError({ active: true, type: ['attributes'], text: 'Attributes should not be empty.' });
Expand Down
6 changes: 4 additions & 2 deletions src/Profile.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,14 +116,16 @@ const Profile = ({
}
});
setIsLoadingNeoBalance(false);
if (!response.error && response.stack.length > 0) {
if (response && !response.error && response.stack.length > 0) {
onPopup('success', 'Mainnet balance has been updated');
setNeoBalance(response.stack[0].value);
setTimeout(() => {
setIsLoadingNeoBalance(false);
}, 500);
} else if (response.exception) {
} else if (response && response.exception) {
onPopup('failed', response.exception);
} else {
onPopup('failed', 'Something went wrong');
}
};

Expand Down
2 changes: 2 additions & 0 deletions src/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ export default function api(method, url, params = {}, headers = {}) {
res = await response.blob();
const header = response.headers.get('Content-Type');
resolve({ header, res });
} else if (response.status === 413) {
reject('413 Request Entity Too Large');
} else if (response) {
res = await response.json();
resolve(res);
Expand Down

0 comments on commit e17005d

Please sign in to comment.