Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion _locales/en/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -281,5 +281,11 @@
},
"domain_invalid_pattern_error": {
"message": "This domain will not work with this version of extension. Please contact TimeCamp support"
}
},
"timecamp_error_starting_timer": {
"message": "TimeCamp: can not start timer"
},
"timecamp_error_adding_time_entry": {
"message": "TimeCamp: can not add time entry"
}
}
2 changes: 2 additions & 0 deletions scripts-2.0/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ const TcButton = {
resolve(response);
})
.catch((e) => {
reject(e);
});
break;

Expand All @@ -54,6 +55,7 @@ const TcButton = {
resolve(response);
})
.catch((e) => {
reject(e);
});
break;

Expand Down
4 changes: 4 additions & 0 deletions scripts-2.0/components/ContextMenu/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,8 @@ const ContextMenu: React.FC<ContextMenuInterface> = (props) => {
if(selectedTags.length) {
assignTagsToEntry(response.entry_id, selectedTags);
}
}).catch(() => {
alert(translate('timecamp_error_starting_timer'));
});
};

Expand All @@ -312,6 +314,8 @@ const ContextMenu: React.FC<ContextMenuInterface> = (props) => {
if(selectedTags.length) {
assignTagsToEntry(response.entry_id, selectedTags);
}
}).catch(() => {
alert(translate('timecamp_error_adding_time_entry'));
});
};

Expand Down