Skip to content

Commit

Permalink
Merge branch 'main' of github.com:anyproto/anytype-ts
Browse files Browse the repository at this point in the history
  • Loading branch information
ra3orblade committed Dec 7, 2023
2 parents 235e42d + 0d4df1c commit 7d9ac44
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
4 changes: 3 additions & 1 deletion src/json/text.json
Original file line number Diff line number Diff line change
Expand Up @@ -1637,6 +1637,8 @@
"notificationGallerySuccessTitle": "\"%s\" was installed",
"notificationGallerySuccessText": "Experience was successfully installed to the \"%s\" space. You can now open and start using it.",
"notificationGalleryErrorTitle": "Something went wrong",
"notificationGalleryErrorText": "Oops! \"%s\" wasn't installed. Please check your internet connection and try again or post a report on forum."
"notificationGalleryErrorText": "Oops! \"%s\" wasn't installed. Please check your internet connection and try again or post a report on forum.",

"notificationNotionErrorNoObjectsTitle": "Add integration to the Notion pages you want to import",
"notificationNotionErrorNoObjectsText": "Select Notion document → … -> Add Connections -> Confirm Integration"
}
14 changes: 10 additions & 4 deletions src/ts/component/notification/import.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,17 @@ const NotificationImport = observer(class NotificationImport extends React.Compo
render () {
const { item, onButton } = this.props;
const { payload, type } = item;
const { errorCode, spaceId } = payload;
const { errorCode, spaceId, importType } = payload;
const object = UtilObject.getSpaceviewBySpaceId(spaceId) || {};
const lang = errorCode ? 'error' : 'success';
const title = translate(UtilCommon.toCamelCase(`notification-${type}-${lang}-title`));
const text = translate(UtilCommon.toCamelCase(`notification-${type}-${lang}-text`));

let title = translate(UtilCommon.toCamelCase(`notification-${type}-${lang}-title`));
let text = translate(UtilCommon.toCamelCase(`notification-${type}-${lang}-text`));

if (importType == 0 && errorCode == 5) {
title = translate('notificationNotionErrorNoObjectsTitle');
text = translate('notificationNotionErrorNoObjectsText');
};

let buttons = [];
if (errorCode) {
Expand Down Expand Up @@ -44,4 +50,4 @@ const NotificationImport = observer(class NotificationImport extends React.Compo

});

export default NotificationImport;
export default NotificationImport;

0 comments on commit 7d9ac44

Please sign in to comment.