This repository has been archived on 2024-07-27. You can view files and clone it, but cannot push or open issues or pull requests.
keksAccountGUI/node_modulesOLD/.cache/babel-loader/35c7f83b1129b80ba08d50fba369f538.json
2019-08-11 20:48:02 +02:00

1 line
No EOL
8.6 KiB
JSON

{"remainingRequest":"/home/soeren/dev/keksaccountgui/node_modules/babel-loader/lib/index.js!/home/soeren/dev/keksaccountgui/node_modules/eslint-loader/index.js??ref--13-0!/home/soeren/dev/keksaccountgui/src/store/store.js","dependencies":[{"path":"/home/soeren/dev/keksaccountgui/src/store/store.js","mtime":1558971993259},{"path":"/home/soeren/dev/keksaccountgui/node_modules/cache-loader/dist/cjs.js","mtime":499162500000},{"path":"/home/soeren/dev/keksaccountgui/node_modules/babel-loader/lib/index.js","mtime":499162500000},{"path":"/home/soeren/dev/keksaccountgui/node_modules/eslint-loader/index.js","mtime":499162500000}],"contextDependencies":[],"result":["import \"core-js/modules/es6.function.name\";\nimport Vuex from 'vuex';\nimport Vue from 'vue';\nimport ServerService from \"../services/Server\";\nimport UserService from \"../services/User\";\nVue.use(Vuex);\nexport default new Vuex.Store({\n state: {\n settingsLoaded: false,\n loggedIn: false,\n meLoaded: false,\n me: [],\n redirectIfLoggedIn: null,\n settings: [],\n // The TV inventory\n sideMenu: false //Toggle Side Menu on side Bar\n\n },\n getters: {\n // Here we will create a getter\n getSettingValue: function getSettingValue(state) {\n return function (name) {\n if (state.settingsLoaded == false) {\n return null;\n }\n\n for (var i = 0; i < state.settings.length; i++) {\n if (state.settings[i][\"name\"] == name) {\n return state.settings[i][\"value\"];\n }\n }\n };\n },\n getAllDataLoaded: function getAllDataLoaded(state) {\n var loaded = true;\n\n if (!state.meLoaded) {\n loaded = false;\n }\n\n if (!state.settingsLoaded) {\n loaded = false;\n }\n\n return loaded;\n },\n getMe: function getMe(state) {\n return state.me;\n }\n },\n mutations: {\n setSettings: function setSettings(state, settings) {\n state.settings = settings;\n state.settingsLoaded = true;\n },\n setMe: function setMe(state, me) {\n if (me == false) {\n state.loggedIn = false;\n state.meLoaded = true;\n } else {\n state.me = me;\n state.loggedIn = true;\n state.meLoaded = true;\n }\n }\n },\n actions: {\n getSettings: function getSettings(context) {\n return new Promise(function (resolve, reject) {\n ServerService.getPublicSettings().then(function (res) {\n context.commit('setSettings', res.data.data);\n resolve();\n });\n });\n },\n checkAccount: function checkAccount(context) {\n UserService.getTokenFromStorage();\n return new Promise(function (resolve, reject) {\n UserService.me().then(function (res) {\n console.log(\"GET USER DATA\");\n context.commit('setMe', res.data.data);\n }, function (res) {\n context.commit('setMe', false);\n console.log(\"DONT GET USER DATA\");\n console.log(res.response.data);\n });\n });\n }\n }\n});",{"version":3,"sources":["/home/soeren/dev/keksaccountgui/src/store/store.js"],"names":["Vuex","Vue","ServerService","UserService","use","Store","state","settingsLoaded","loggedIn","meLoaded","me","redirectIfLoggedIn","settings","sideMenu","getters","getSettingValue","name","i","length","getAllDataLoaded","loaded","getMe","mutations","setSettings","setMe","actions","getSettings","context","Promise","resolve","reject","getPublicSettings","then","res","commit","data","checkAccount","getTokenFromStorage","console","log","response"],"mappings":";AAAA,OAAOA,IAAP,MAAiB,MAAjB;AACA,OAAOC,GAAP,MAAgB,KAAhB;AACA,OAAOC,aAAP;AACA,OAAOC,WAAP;AAEAF,GAAG,CAACG,GAAJ,CAAQJ,IAAR;AAEA,eAAe,IAAIA,IAAI,CAACK,KAAT,CAAe;AAC1BC,EAAAA,KAAK,EAAE;AACHC,IAAAA,cAAc,EAAE,KADb;AAEHC,IAAAA,QAAQ,EAAG,KAFR;AAGHC,IAAAA,QAAQ,EAAE,KAHP;AAIHC,IAAAA,EAAE,EAAE,EAJD;AAKHC,IAAAA,kBAAkB,EAAE,IALjB;AAMHC,IAAAA,QAAQ,EAAE,EANP;AAMW;AACdC,IAAAA,QAAQ,EAAE,KAPP,CAOc;;AAPd,GADmB;AAW1BC,EAAAA,OAAO,EAAE;AACL;AACAC,IAAAA,eAAe,EAAE,yBAACT,KAAD;AAAA,aAAW,UAACU,IAAD,E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,QAAN,GAAiB,IAAjB;AACAF,QAAAA,KAAK,CAACG,QAAN,GAAiB,IAAjB;AACH;AACJ;AAdM,GAtCe;AAwD1BgB,EAAAA,OAAO,EAAE;AACLC,IAAAA,WAAW,EAAE,qBAAUC,OAAV,EAAmB;AAC5B,aAAO,IAAIC,OAAJ,CAAY,UAACC,OAAD,EAAUC,MAAV,EAAqB;AACpC5B,QAAAA,aAAa,CAAC6B,iBAAd,GAAkCC,IAAlC,CAAuC,UAACC,GAAD,EAAS;AAC5CN,UAAAA,OAAO,CAACO,MAAR,CAAe,aAAf,EAA8BD,GAAG,CAACE,IAAJ,CAASA,IAAvC;AACAN,UAAAA,OAAO;AACV,SAHD;AAIH,OALM,CAAP;AAMH,KARI;AASLO,IAAAA,YAAY,EAAE,sBAAST,OAAT,EAAkB;AAC5BxB,MAAAA,WAAW,CAACkC,mBAAZ;AACA,aAAO,IAAIT,OAAJ,CAAY,UAACC,OAAD,EAAUC,MAAV,EAAqB;AACpC3B,QAAAA,WAAW,CAACO,EAAZ,GAAiBsB,IAAjB,CAAsB,UAACC,GAAD,EAAS;AAC3BK,UAAAA,OAAO,CAACC,GAAR,CAAY,eAAZ;AACAZ,UAAAA,OAAO,CAACO,MAAR,CAAe,OAAf,EAAwBD,GAAG,CAACE,IAAJ,CAASA,IAAjC;AACH,SAHD,EAGG,UAACF,GAAD,EAAS;AACRN,UAAAA,OAAO,CAACO,MAAR,CAAe,OAAf,EAAwB,KAAxB;AACAI,UAAAA,OAAO,CAACC,GAAR,CAAY,oBAAZ;AACAD,UAAAA,OAAO,CAACC,GAAR,CAAYN,GAAG,CAACO,QAAJ,CAAaL,IAAzB;AACH,SAPD;AAQH,OATM,CAAP;AAUH;AArBI;AAxDiB,CAAf,CAAf","sourcesContent":["import Vuex from 'vuex'\nimport Vue from 'vue'\nimport ServerService from '../services/Server'\nimport UserService from '../services/User'\n\nVue.use(Vuex)\n\nexport default new Vuex.Store({\n state: {\n settingsLoaded: false,\n loggedIn : false,\n meLoaded: false,\n me: [],\n redirectIfLoggedIn: null,\n settings: [], // The TV inventory\n sideMenu: false, //Toggle Side Menu on side Bar\n },\n\n getters: {\n // Here we will create a getter\n getSettingValue: (state) => (name) => {\n if(state.settingsLoaded == false) {\n return null;\n }\n for(var i = 0; i < state.settings.length; i++) {\n if(state.settings[i][\"name\"] == name) {\n return state.settings[i][\"value\"];\n }\n }\n },\n getAllDataLoaded: (state) => {\n var loaded = true;\n if(!state.meLoaded) {\n loaded = false;\n }\n if(!state.settingsLoaded) {\n loaded = false;\n }\n return loaded;\n },\n getMe: (state) => {\n return state.me;\n }\n },\n\n mutations: {\n setSettings: function(state, settings) {\n state.settings = settings;\n state.settingsLoaded = true;\n },\n setMe: function(state, me) {\n if(me == false) {\n state.loggedIn = false;\n state.meLoaded = true;\n } else {\n state.me = me;\n state.loggedIn = true;\n state.meLoaded = true;\n }\n },\n\n },\n\n actions: {\n getSettings: function (context) {\n return new Promise((resolve, reject) => {\n ServerService.getPublicSettings().then((res) => {\n context.commit('setSettings', res.data.data)\n resolve()\n });\n })\n },\n checkAccount: function(context) {\n UserService.getTokenFromStorage();\n return new Promise((resolve, reject) => {\n UserService.me().then((res) => {\n console.log(\"GET USER DATA\");\n context.commit('setMe', res.data.data)\n }, (res) => {\n context.commit('setMe', false)\n console.log(\"DONT GET USER DATA\");\n console.log(res.response.data)\n })\n })\n }\n }\n});"]}]}