@jetthai/cuora 1.0.2 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ### [1.0.3](https://github.com/jetthai/cuora-module/compare/v1.0.2...v1.0.3) (2021-08-09)
6
+
5
7
  ### [1.0.2](https://github.com/jetthai/cuora-module/compare/v1.0.1...v1.0.2) (2021-08-05)
6
8
 
7
9
  ### 1.0.1 (2021-08-04)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jetthai/cuora",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/plugin/core.js CHANGED
@@ -118,10 +118,10 @@ function createStore({ $request, $ignoreErrorRequest, $loadingRequest, $updateSo
118
118
  return state.settings
119
119
  },
120
120
  isMobileDevice(state) {
121
- return ((state.ua || {}).device || {}).type || false
121
+ return state.ua?.device?.type || false
122
122
  },
123
123
  isIOSDevice(state, getters) {
124
- return getters.isMobileDevice && ((state.ua || {}).device || {}).vendor === 'Apple'
124
+ return getters.isMobileDevice && state.ua?.device?.vendor === 'Apple'
125
125
  },
126
126
  getModal(state) {
127
127
  return state.modal
@@ -177,6 +177,9 @@ function createStore({ $request, $ignoreErrorRequest, $loadingRequest, $updateSo
177
177
  return localeMap[shorthand]
178
178
  }
179
179
  },
180
+ hasCLAchievements(state, getters) {
181
+ return getters.getSiteConfig?.competitionLab?.achievements || false
182
+ },
180
183
  },
181
184
  mutations: {
182
185
  // setToken(state, data) {
@@ -341,16 +344,16 @@ function createStore({ $request, $ignoreErrorRequest, $loadingRequest, $updateSo
341
344
  async checkAuth({ state, commit, getters, dispatch }) {
342
345
  try {
343
346
  commit('setLoading', true)
344
- if ($cookie.getToken()) {
347
+ // if ($cookie.getToken()) {
345
348
  await dispatch('fetchUserInfo')
346
349
  commit('setAuthorized', true)
347
350
  dispatch('game/examineGame', null, { root: true })
348
351
  dispatch('refreshData')
349
352
  dispatch('keepAlive')
350
353
  return true
351
- } else {
352
- return false
353
- }
354
+ // } else {
355
+ // return false
356
+ // }
354
357
  } catch (err) {
355
358
  console.error(err)
356
359
  return false