@icvdeveloper/common-module 1.1.5 → 1.1.7

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
@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## Unreleased
9
9
 
10
+ ## 1.1.7 - 2023-11-15
11
+
12
+ ## 1.1.6 - 2023-11-14
13
+
10
14
  ## 1.1.5 - 2023-11-10
11
15
 
12
16
  ## 1.1.4 - 2023-11-09
package/dist/module.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "v3plus-common-module",
3
3
  "configKey": "v3plusCommonModule",
4
- "version": "1.1.5"
4
+ "version": "1.1.7"
5
5
  }
@@ -148,12 +148,12 @@ const eventPathPrefix = computed(() => {
148
148
  const eventType = computed((): Conference[] => {
149
149
  if (isUpcoming?.value) {
150
150
  if (isReversed?.value) {
151
- return reverse(upcomingEvents.value);
151
+ return reverse(upcomingEvents.value.slice());
152
152
  } else {
153
153
  return upcomingEvents.value;
154
154
  }
155
155
  } else if (isReversed?.value) {
156
- return reverse(pastEvents.value);
156
+ return reverse(pastEvents.value.slice());
157
157
  } else {
158
158
  return pastEvents.value;
159
159
  }
@@ -1,8 +1,25 @@
1
1
  import { defineStore } from "pinia";
2
2
  import { merge } from "lodash-es";
3
+ import { DateTime } from "luxon";
3
4
  import { useApi } from "../composables/useApi.mjs";
4
5
  import { useConferencesStore } from "./conferences.mjs";
5
6
  export const useAuthStore = defineStore("auth", {
7
+ persist: {
8
+ afterRestore(context) {
9
+ if (context.store.$state.user) {
10
+ const user = context.store.$state.user;
11
+ const now = DateTime.now().setZone("utc");
12
+ const expiration = DateTime.fromFormat(
13
+ user.expires_at,
14
+ "yyyy-MM-dd HH:mm:ss",
15
+ { zone: "utc" }
16
+ ).minus({ hours: 2 });
17
+ if (now >= expiration) {
18
+ context.store.reset();
19
+ }
20
+ }
21
+ }
22
+ },
6
23
  state: () => ({
7
24
  user: null
8
25
  }),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@icvdeveloper/common-module",
3
- "version": "1.1.5",
3
+ "version": "1.1.7",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "exports": {