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

1 line
8.6 KiB
JSON
Raw Normal View History

2019-08-11 18:48:02 +00:00
{"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,KA