diff --git a/src/client/app/locales/en.js b/src/client/app/locales/en.js index 389df046..d3c1ca49 100644 --- a/src/client/app/locales/en.js +++ b/src/client/app/locales/en.js @@ -54,6 +54,9 @@ module.exports = { state_import: 'Import', state_export: 'Export', state_uploaderror: 'Failed to upload state file.', + state_storesuccess: 'State saved', + state_recallsuccess: 'State recalled', + state_sendsuccess: 'State sent', // traversing traversing_on: 'On', diff --git a/src/client/app/locales/fr.js b/src/client/app/locales/fr.js index 5ae9a2b7..000c17c9 100644 --- a/src/client/app/locales/fr.js +++ b/src/client/app/locales/fr.js @@ -54,6 +54,9 @@ module.exports = { state_import: 'Importer', state_export: 'Exporter', state_uploaderror: 'Échec à l\'envoi du fichier d\'état.', + state_storesuccess: 'État de l\'interface sauvegardé', + state_recallsuccess: 'État de l\'interface restauré', + state_sendsuccess: 'État de de l\'interface envoyé', // traversing traversing_on: 'On', diff --git a/src/client/app/locales/ru.js b/src/client/app/locales/ru.js index 64f0a95a..d70a1bc5 100644 --- a/src/client/app/locales/ru.js +++ b/src/client/app/locales/ru.js @@ -54,7 +54,10 @@ module.exports = { // @https://github.com/suhr state_import: 'Импорт', state_export: 'Экспорт', state_uploaderror: 'Не удалось загрузить файл состояния.', - + state_storesuccess: 'State saved', + state_recallsuccess: 'State recalled', + state_sendsuccess: 'State sent', + // traversing traversing_on: 'Вкл', traversing_smart: 'Умный', diff --git a/src/client/app/ui/sidepanel.js b/src/client/app/ui/sidepanel.js index 032bc00a..5a12d64d 100644 --- a/src/client/app/ui/sidepanel.js +++ b/src/client/app/ui/sidepanel.js @@ -3,6 +3,7 @@ var state = require('../managers/state'), editor = require('../editor/'), {icon} = require('./utils'), fullscreen = require('./fullscreen'), + notifications = require('./notifications'), {enableTraversingGestures, disableTraversingGestures} = require('../events/drag'), locales = require('../locales'), html = require('nanohtml'), @@ -29,16 +30,32 @@ var sidepanelData = [ action:()=>{ state.quickSave() DOM.get('.quickload')[0].classList.remove('disabled') + notifications.add({ + icon: 'sliders-h', + message: locales('state_storesuccess') + }) } }, { title: locales('state_recall'), - action:state.quickLoad.bind(state), + action: ()=>{ + state.quickLoad() + notifications.add({ + icon: 'sliders-h', + message: locales('state_recallsuccess') + }) + }, class:'disabled quickload' }, { title: locales('state_send'), - action:state.send.bind(state) + action: ()=>{ + state.send() + notifications.add({ + icon: 'sliders-h', + message: locales('state_sendsuccess') + }) + } }, { title: locales('state_import'),