@lvce-editor/activity-bar-worker 6.0.0 → 6.1.0

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.
@@ -1319,7 +1319,7 @@ const {
1319
1319
  // TODO parentUid might ot be needed
1320
1320
  const create = (id, uri, x, y, width, height, args, parentUid, platform = 0) => {
1321
1321
  const state = {
1322
- accountEnabled: false,
1322
+ accountEnabled: true,
1323
1323
  activityBarItems: [],
1324
1324
  currentViewletId: '',
1325
1325
  filteredItems: [],
@@ -1453,21 +1453,23 @@ const getKeyBindings = () => {
1453
1453
  }];
1454
1454
  };
1455
1455
 
1456
- const getMenuEntriesAccount = state => {
1457
- // TODO maybe query it now from layout?
1456
+ const getMenuEntriesAccountLoggedIn = state => {
1458
1457
  const {
1459
1458
  userLoginState
1460
1459
  } = state;
1461
- const signInLabel = userLoginState === 'logging in' ? 'Signing In...' : 'Sign In';
1462
1460
  const signOutLabel = userLoginState === 'logging out' ? 'Signing Out...' : 'Sign Out';
1463
- if (userLoginState === 'logged in' || userLoginState === 'logging out') {
1464
- return [{
1465
- command: 'ActivityBar.handleClickSignOut',
1466
- flags: None,
1467
- id: 'signOut',
1468
- label: signOutLabel
1469
- }];
1470
- }
1461
+ return [{
1462
+ command: 'ActivityBar.handleClickSignOut',
1463
+ flags: None,
1464
+ id: 'signOut',
1465
+ label: signOutLabel
1466
+ }];
1467
+ };
1468
+ const getMenuEntriesAccountLoggedOut = state => {
1469
+ const {
1470
+ userLoginState
1471
+ } = state;
1472
+ const signInLabel = userLoginState === 'logging in' ? 'Signing In...' : 'Sign In';
1471
1473
  return [{
1472
1474
  command: 'ActivityBar.handleClickSignIn',
1473
1475
  flags: None,
@@ -1475,6 +1477,16 @@ const getMenuEntriesAccount = state => {
1475
1477
  label: signInLabel
1476
1478
  }];
1477
1479
  };
1480
+ const getMenuEntriesAccount = state => {
1481
+ // TODO maybe query it now from layout?
1482
+ const {
1483
+ userLoginState
1484
+ } = state;
1485
+ if (userLoginState === 'logged in' || userLoginState === 'logging out') {
1486
+ return getMenuEntriesAccountLoggedIn(state);
1487
+ }
1488
+ return getMenuEntriesAccountLoggedOut(state);
1489
+ };
1478
1490
 
1479
1491
  const Tab = 1;
1480
1492
  const Button = 1 << 1;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/activity-bar-worker",
3
- "version": "6.0.0",
3
+ "version": "6.1.0",
4
4
  "description": "Explorer Worker",
5
5
  "repository": {
6
6
  "type": "git",