@taruvi/navkit 0.0.46 → 0.0.47
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 +1 -1
- package/src/App.styles.ts +1 -1
- package/src/NavkitContext.tsx +15 -15
- package/src/types.ts +1 -0
- package/.claude/settings.local.json +0 -12
- package/.kiro/settings/lsp.json +0 -198
package/package.json
CHANGED
package/src/App.styles.ts
CHANGED
package/src/NavkitContext.tsx
CHANGED
|
@@ -51,8 +51,7 @@ export const NavkitProvider = ({ children, client, onThemeChange, appName, navba
|
|
|
51
51
|
}, [])
|
|
52
52
|
|
|
53
53
|
const checkIfDesk = async () => {
|
|
54
|
-
const
|
|
55
|
-
const frontendUrl = (fetchedSettings?.data ?? fetchedSettings)?.settings?.['navkit.frontend-url']
|
|
54
|
+
const frontendUrl = appSettings?.frontendUrl
|
|
56
55
|
if (!frontendUrl) return false
|
|
57
56
|
return window.location.href.includes(frontendUrl || '')
|
|
58
57
|
}
|
|
@@ -89,12 +88,13 @@ export const NavkitProvider = ({ children, client, onThemeChange, appName, navba
|
|
|
89
88
|
// Fetch app settings to get the app name
|
|
90
89
|
try {
|
|
91
90
|
setAppSettingsLoaded(false)
|
|
92
|
-
const { data } =
|
|
91
|
+
const { data } = await new App(client).settings().execute() as { data: { display_name?: string, icon?: string, primary_color?: string, secondary_color?: string, frontend_url?: string } }
|
|
93
92
|
setAppSettings({
|
|
94
|
-
displayName: data?.display_name,
|
|
93
|
+
displayName: appName || data?.display_name,
|
|
95
94
|
icon: data?.icon,
|
|
96
95
|
primaryColor: data?.primary_color,
|
|
97
|
-
secondaryColor: data?.secondary_color
|
|
96
|
+
secondaryColor: data?.secondary_color,
|
|
97
|
+
frontendUrl: data?.frontend_url
|
|
98
98
|
})
|
|
99
99
|
} catch {
|
|
100
100
|
// App settings not available, continue without app settings
|
|
@@ -143,15 +143,6 @@ export const NavkitProvider = ({ children, client, onThemeChange, appName, navba
|
|
|
143
143
|
init()
|
|
144
144
|
}, [])
|
|
145
145
|
|
|
146
|
-
useEffect(() => {
|
|
147
|
-
const initIsDesk = async () => {
|
|
148
|
-
const isDeskValue = await checkIfDesk()
|
|
149
|
-
setIsDesk(isDeskValue)
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
initIsDesk()
|
|
153
|
-
}, [])
|
|
154
|
-
|
|
155
146
|
// Listen for user profile updates via BroadcastChannel
|
|
156
147
|
useEffect(() => {
|
|
157
148
|
const channel = new BroadcastChannel('taruvi-updates')
|
|
@@ -168,7 +159,16 @@ export const NavkitProvider = ({ children, client, onThemeChange, appName, navba
|
|
|
168
159
|
channel.removeEventListener('message', handleMessage)
|
|
169
160
|
channel.close()
|
|
170
161
|
}
|
|
171
|
-
}, [getData])
|
|
162
|
+
}, [getData, isUserAuthenticated])
|
|
163
|
+
|
|
164
|
+
useEffect(() => {
|
|
165
|
+
const initIsDesk = async () => {
|
|
166
|
+
const isDeskValue = await checkIfDesk()
|
|
167
|
+
setIsDesk(isDeskValue)
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
initIsDesk()
|
|
171
|
+
}, [checkIfDesk])
|
|
172
172
|
|
|
173
173
|
// Notify parent app of theme changes
|
|
174
174
|
useEffect(() => {
|
package/src/types.ts
CHANGED
package/.kiro/settings/lsp.json
DELETED
|
@@ -1,198 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"languages": {
|
|
3
|
-
"java": {
|
|
4
|
-
"name": "jdtls",
|
|
5
|
-
"command": "jdtls",
|
|
6
|
-
"args": [],
|
|
7
|
-
"file_extensions": [
|
|
8
|
-
"java"
|
|
9
|
-
],
|
|
10
|
-
"project_patterns": [
|
|
11
|
-
"pom.xml",
|
|
12
|
-
"build.gradle",
|
|
13
|
-
"build.gradle.kts",
|
|
14
|
-
".project"
|
|
15
|
-
],
|
|
16
|
-
"exclude_patterns": [
|
|
17
|
-
"**/target/**",
|
|
18
|
-
"**/build/**",
|
|
19
|
-
"**/.gradle/**"
|
|
20
|
-
],
|
|
21
|
-
"multi_workspace": false,
|
|
22
|
-
"initialization_options": {
|
|
23
|
-
"settings": {
|
|
24
|
-
"java": {
|
|
25
|
-
"compile": {
|
|
26
|
-
"nullAnalysis": {
|
|
27
|
-
"mode": "automatic"
|
|
28
|
-
}
|
|
29
|
-
},
|
|
30
|
-
"configuration": {
|
|
31
|
-
"annotationProcessing": {
|
|
32
|
-
"enabled": true
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
},
|
|
38
|
-
"request_timeout_secs": 60
|
|
39
|
-
},
|
|
40
|
-
"rust": {
|
|
41
|
-
"name": "rust-analyzer",
|
|
42
|
-
"command": "rust-analyzer",
|
|
43
|
-
"args": [],
|
|
44
|
-
"file_extensions": [
|
|
45
|
-
"rs"
|
|
46
|
-
],
|
|
47
|
-
"project_patterns": [
|
|
48
|
-
"Cargo.toml"
|
|
49
|
-
],
|
|
50
|
-
"exclude_patterns": [
|
|
51
|
-
"**/target/**"
|
|
52
|
-
],
|
|
53
|
-
"multi_workspace": false,
|
|
54
|
-
"initialization_options": {
|
|
55
|
-
"cargo": {
|
|
56
|
-
"buildScripts": {
|
|
57
|
-
"enable": true
|
|
58
|
-
}
|
|
59
|
-
},
|
|
60
|
-
"diagnostics": {
|
|
61
|
-
"enable": true,
|
|
62
|
-
"enableExperimental": true
|
|
63
|
-
},
|
|
64
|
-
"workspace": {
|
|
65
|
-
"symbol": {
|
|
66
|
-
"search": {
|
|
67
|
-
"scope": "workspace"
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
},
|
|
72
|
-
"request_timeout_secs": 60
|
|
73
|
-
},
|
|
74
|
-
"ruby": {
|
|
75
|
-
"name": "solargraph",
|
|
76
|
-
"command": "solargraph",
|
|
77
|
-
"args": [
|
|
78
|
-
"stdio"
|
|
79
|
-
],
|
|
80
|
-
"file_extensions": [
|
|
81
|
-
"rb"
|
|
82
|
-
],
|
|
83
|
-
"project_patterns": [
|
|
84
|
-
"Gemfile",
|
|
85
|
-
"Rakefile"
|
|
86
|
-
],
|
|
87
|
-
"exclude_patterns": [
|
|
88
|
-
"**/vendor/**",
|
|
89
|
-
"**/tmp/**"
|
|
90
|
-
],
|
|
91
|
-
"multi_workspace": false,
|
|
92
|
-
"initialization_options": {},
|
|
93
|
-
"request_timeout_secs": 60
|
|
94
|
-
},
|
|
95
|
-
"python": {
|
|
96
|
-
"name": "pyright",
|
|
97
|
-
"command": "pyright-langserver",
|
|
98
|
-
"args": [
|
|
99
|
-
"--stdio"
|
|
100
|
-
],
|
|
101
|
-
"file_extensions": [
|
|
102
|
-
"py"
|
|
103
|
-
],
|
|
104
|
-
"project_patterns": [
|
|
105
|
-
"pyproject.toml",
|
|
106
|
-
"setup.py",
|
|
107
|
-
"requirements.txt",
|
|
108
|
-
"pyrightconfig.json"
|
|
109
|
-
],
|
|
110
|
-
"exclude_patterns": [
|
|
111
|
-
"**/__pycache__/**",
|
|
112
|
-
"**/venv/**",
|
|
113
|
-
"**/.venv/**",
|
|
114
|
-
"**/.pytest_cache/**"
|
|
115
|
-
],
|
|
116
|
-
"multi_workspace": false,
|
|
117
|
-
"initialization_options": {},
|
|
118
|
-
"request_timeout_secs": 60
|
|
119
|
-
},
|
|
120
|
-
"cpp": {
|
|
121
|
-
"name": "clangd",
|
|
122
|
-
"command": "clangd",
|
|
123
|
-
"args": [
|
|
124
|
-
"--background-index"
|
|
125
|
-
],
|
|
126
|
-
"file_extensions": [
|
|
127
|
-
"cpp",
|
|
128
|
-
"cc",
|
|
129
|
-
"cxx",
|
|
130
|
-
"c",
|
|
131
|
-
"h",
|
|
132
|
-
"hpp",
|
|
133
|
-
"hxx"
|
|
134
|
-
],
|
|
135
|
-
"project_patterns": [
|
|
136
|
-
"CMakeLists.txt",
|
|
137
|
-
"compile_commands.json",
|
|
138
|
-
"Makefile"
|
|
139
|
-
],
|
|
140
|
-
"exclude_patterns": [
|
|
141
|
-
"**/build/**",
|
|
142
|
-
"**/cmake-build-**/**"
|
|
143
|
-
],
|
|
144
|
-
"multi_workspace": false,
|
|
145
|
-
"initialization_options": {},
|
|
146
|
-
"request_timeout_secs": 60
|
|
147
|
-
},
|
|
148
|
-
"typescript": {
|
|
149
|
-
"name": "typescript-language-server",
|
|
150
|
-
"command": "typescript-language-server",
|
|
151
|
-
"args": [
|
|
152
|
-
"--stdio"
|
|
153
|
-
],
|
|
154
|
-
"file_extensions": [
|
|
155
|
-
"ts",
|
|
156
|
-
"js",
|
|
157
|
-
"tsx",
|
|
158
|
-
"jsx"
|
|
159
|
-
],
|
|
160
|
-
"project_patterns": [
|
|
161
|
-
"package.json",
|
|
162
|
-
"tsconfig.json"
|
|
163
|
-
],
|
|
164
|
-
"exclude_patterns": [
|
|
165
|
-
"**/node_modules/**",
|
|
166
|
-
"**/dist/**"
|
|
167
|
-
],
|
|
168
|
-
"multi_workspace": false,
|
|
169
|
-
"initialization_options": {
|
|
170
|
-
"preferences": {
|
|
171
|
-
"disableSuggestions": false
|
|
172
|
-
}
|
|
173
|
-
},
|
|
174
|
-
"request_timeout_secs": 60
|
|
175
|
-
},
|
|
176
|
-
"go": {
|
|
177
|
-
"name": "gopls",
|
|
178
|
-
"command": "gopls",
|
|
179
|
-
"args": [],
|
|
180
|
-
"file_extensions": [
|
|
181
|
-
"go"
|
|
182
|
-
],
|
|
183
|
-
"project_patterns": [
|
|
184
|
-
"go.mod",
|
|
185
|
-
"go.sum"
|
|
186
|
-
],
|
|
187
|
-
"exclude_patterns": [
|
|
188
|
-
"**/vendor/**"
|
|
189
|
-
],
|
|
190
|
-
"multi_workspace": false,
|
|
191
|
-
"initialization_options": {
|
|
192
|
-
"usePlaceholders": true,
|
|
193
|
-
"completeUnimported": true
|
|
194
|
-
},
|
|
195
|
-
"request_timeout_secs": 60
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
}
|