2
0
mirror of https://github.com/frappe/books.git synced 2025-01-11 10:38:14 +00:00

chore: update toast calls, remove window.showToast

This commit is contained in:
18alantom 2022-01-19 15:51:51 +05:30 committed by Alan
parent 2508993d47
commit 039e371f6b
2 changed files with 3 additions and 2 deletions

View File

@ -114,8 +114,9 @@ export default {
methods: { methods: {
showReloadToast() { showReloadToast() {
showToast({ showToast({
message: _('Changes will be visible on reload'), message: _('Changes require reload'),
actionText: frappe._('Reload'), actionText: frappe._('Reload'),
type: 'info',
action: async () => { action: async () => {
frappe.events.trigger('reload-main-window'); frappe.events.trigger('reload-main-window');
}, },

View File

@ -181,6 +181,7 @@ export function showExportInFolder(message, filePath) {
showToast({ showToast({
message, message,
actionText: frappe._('Open Folder'), actionText: frappe._('Open Folder'),
type: 'success',
action: async () => { action: async () => {
await showItemInFolder(filePath); await showItemInFolder(filePath);
}, },
@ -342,7 +343,6 @@ export function showToast(props) {
}, },
}); });
} }
window.showToast = showToast;
export function titleCase(phrase) { export function titleCase(phrase) {
return phrase return phrase