@enso-ui/ui 7.1.2 → 7.1.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@enso-ui/ui",
3
- "version": "7.1.2",
3
+ "version": "7.1.4",
4
4
  "description": "Laravel Enso UI",
5
5
  "main": "bulma/index.js",
6
6
  "scripts": {
@@ -18,9 +18,12 @@ export default {
18
18
  padding-top: 1.25rem;
19
19
  padding-bottom: 1.25rem;
20
20
  width: var(--enso-sidebar-width);
21
+ font-size: 0.95em;
22
+ font-family: var(--bulma-family-secondary, var(--bulma-family-primary));
21
23
  max-height: 100vh;
22
- z-index: 4;
24
+ z-index: 2;
23
25
  background: var(--enso-shell-surface);
24
- border-right: 1px solid var(--bulma-border);
26
+ -webkit-box-shadow: 0 1px 1px hsla(0, 0%, 4%, .65);
27
+ box-shadow: 0 1px 1px hsla(0, 0%, 4%, .65);
25
28
  }
26
29
  </style>
@@ -42,7 +42,7 @@ export default {
42
42
 
43
43
  props: {
44
44
  icon: {
45
- type: [Array, String],
45
+ type: [Array, Object, String],
46
46
  required: true,
47
47
  },
48
48
  loading: {
@@ -46,7 +46,11 @@ export default {
46
46
  async bootstrap() {
47
47
  this.appState = false;
48
48
 
49
- await loadAppState();
49
+ const loaded = await loadAppState();
50
+
51
+ if (!loaded) {
52
+ return;
53
+ }
50
54
 
51
55
  this.toastr.setup(usePreferences().global.toastrPosition);
52
56
 
@@ -2,6 +2,7 @@ import axios from 'axios';
2
2
  import App from '../core/app';
3
3
  import eventBus from '../core/services/eventBus';
4
4
  import { useStore } from '../core/services/pinia';
5
+ import { auth } from '@enso-ui/auth/src/pinia/auth';
5
6
  import { app as useApp } from './app';
6
7
  import { layout } from './layout';
7
8
  import { preferences } from './preferences';
@@ -46,10 +47,13 @@ export const loadAppState = async (state = useApp()) => {
46
47
  if (state.meta.env === 'local') {
47
48
  window.http = axios;
48
49
  }
50
+
51
+ return true;
49
52
  } catch (error) {
50
53
  if (error.response && error.response.status === 401) {
51
- useStore('auth')?.logout();
52
- App.router?.push({ name: 'login' });
54
+ auth().logoutState();
55
+ App.router.push({ name: 'login' });
56
+ return false;
53
57
  } else {
54
58
  throw error;
55
59
  }