diff --git a/ayanova/devdocs/todo.txt b/ayanova/devdocs/todo.txt index ad9d8fa4..c6037866 100644 --- a/ayanova/devdocs/todo.txt +++ b/ayanova/devdocs/todo.txt @@ -48,6 +48,10 @@ CURRENT TODOs =-=-=-=-=-=-= @@@@@@@@@@@ ROADMAP STAGE 2: +todo: global vue + - find all stuff defined in vue data objects as methods solely for the consumption of the template like translation (t()) and move to global vue object in main + - stuff not needed by templates should stay where it is in window + - Lodash might be an exception todo: change all testing data-cy attributes to conditional see ay-customize for example - :data-cy="!!enableCypress ? item.key : false" diff --git a/ayanova/src/main.js b/ayanova/src/main.js index d31d4c32..b35e6241 100644 --- a/ayanova/src/main.js +++ b/ayanova/src/main.js @@ -179,12 +179,20 @@ Vue.directive("focus", { } }); + ///////////////////////////////////////////////////////////////// // INSTANTIATE // +Vue.prototype.$ay = { + //development mode, this enables data-cy tags for testing, development level error messages etc + dev: true, + t: function(tKey) { + return translation.get(tKey); + } +}; new Vue({ vuetify: Vuetify, router, store, - render: h => h(App) + render: (h) => h(App) }).$mount("#app"); diff --git a/ayanova/src/views/ay-customize.vue b/ayanova/src/views/ay-customize.vue index 69a50150..8f2ec972 100644 --- a/ayanova/src/views/ay-customize.vue +++ b/ayanova/src/views/ay-customize.vue @@ -19,7 +19,7 @@