@taruvi/navkit 0.0.23 → 0.0.25

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": "@taruvi/navkit",
3
- "version": "0.0.23",
3
+ "version": "0.0.25",
4
4
  "main": "src/App.tsx",
5
5
  "type": "module",
6
6
  "scripts": {
package/src/App.tsx CHANGED
@@ -37,31 +37,30 @@ const NavkitContent = () => {
37
37
  {appSettings?.icon ? <Box component="img" src={appSettings?.icon} sx={styles.logo} /> : <></>}
38
38
  {appSettings?.displayName &&
39
39
  <Typography sx={styles.appName}>
40
- {appSettings.displayName.length > 15 ? `${appSettings.displayName.substring(0, 15)}...` : appSettings.displayName}
40
+ {appSettings.displayName.length > 40 ? `${appSettings.displayName.substring(0, 40)}...` : appSettings.displayName}
41
41
  </Typography>
42
42
  }
43
43
  </Box>
44
44
  <Box component={"div"} sx={styles.rightSection}>
45
45
  <Shortcuts showChat={setShowChat} onMenuToggle={() => setShowShortcutsMenu(!showShortcutsMenu)} />
46
- {isUserAuthenticated && userData && <Profile userData={userData} onClick={() => setShowProfileMenu(!showProfileMenu)} />}
47
46
  <Box
48
47
  onClick={() => {
49
- if (isUserAuthenticated && appsList.length > 0) {
48
+ if (isUserAuthenticated) {
50
49
  setShowAppLauncher(!showAppLauncher);
51
50
  }
52
51
  }}
53
52
  onMouseEnter={() => {
54
- if (isUserAuthenticated && appsList.length > 0) {
53
+ if (isUserAuthenticated) {
55
54
  setIsAppLauncherHovered(true);
56
55
  }
57
56
  }}
58
57
  onMouseLeave={() => setIsAppLauncherHovered(false)}
59
58
  sx={{
60
59
  ...styles.appLauncherContainer,
61
- cursor: isUserAuthenticated && appsList.length > 0 ? "pointer" : "default",
60
+ cursor: isUserAuthenticated ? "pointer" : "default",
62
61
  }}
63
62
  >
64
- {(isAppLauncherHovered || showAppLauncher) && isUserAuthenticated && appsList.length > 0 ? (
63
+ {(isAppLauncherHovered || showAppLauncher) && isUserAuthenticated ? (
65
64
  <Box sx={styles.appLauncherHover}>
66
65
  <FontAwesomeIcon icon={["fas", "th"]} style={styles.appLauncherIcon} />
67
66
  <Typography sx={styles.appLauncherText}>Apps</Typography>
@@ -70,11 +69,12 @@ const NavkitContent = () => {
70
69
  <Box component="img" src={taruviLogo} sx={styles.appLauncherLogo} />
71
70
  )}
72
71
  </Box>
72
+ {isUserAuthenticated && userData && <Profile userData={userData} onClick={() => setShowProfileMenu(!showProfileMenu)} />}
73
73
  </Box>
74
74
  </Toolbar>
75
75
  </AppBar>
76
76
 
77
- {showAppLauncher && isUserAuthenticated && appsList.length > 0 && (
77
+ {showAppLauncher && isUserAuthenticated && (
78
78
  <Box>
79
79
  <AppLauncher />
80
80
  </Box>
@@ -37,7 +37,7 @@ const AppLauncher = () => {
37
37
  return (
38
38
  <Card sx={styles.container}>
39
39
  <Search appsList={appsList} onSearchChange={handleSearchChange} />
40
- {filteredApps && filteredApps.length > 0 && (
40
+ {filteredApps && filteredApps.length > 0 ? (
41
41
  <Box sx={styles.scrollContainer}>
42
42
  <Grid container spacing={0}>
43
43
  {filteredApps.map((app) => {
@@ -83,6 +83,12 @@ const AppLauncher = () => {
83
83
  })}
84
84
  </Grid>
85
85
  </Box>
86
+ ) : (
87
+ <Box sx={{ display: 'flex', justifyContent: 'center', alignItems: 'center', padding: '40px 16px' }}>
88
+ <Typography sx={{ color: styles.appName?.color || '#9e9e9e', fontSize: '0.875rem' }}>
89
+ No apps available
90
+ </Typography>
91
+ </Box>
86
92
  )}
87
93
  </Card>
88
94
  )
@@ -70,7 +70,7 @@ export const getProfileStyles = (mode: ThemeMode) => {
70
70
  display: 'flex',
71
71
  alignItems: 'center',
72
72
  gap: spacing.sm,
73
- ml: spacing.md,
73
+ // ml: spacing.md,
74
74
  cursor: 'pointer',
75
75
  },
76
76
  avatar: {