mirror of
https://github.com/utopia-os/utopia-ui.git
synced 2025-12-13 07:46:10 +00:00
cutomizable user type
This commit is contained in:
parent
273b4ea76e
commit
d486acac3c
8
package-lock.json
generated
8
package-lock.json
generated
@ -17,7 +17,7 @@
|
||||
"react-dom": "^18.2.0",
|
||||
"react-rnd": "^10.4.1",
|
||||
"react-router-dom": "^6.23.0",
|
||||
"utopia-ui": "^3.0.0-alpha.192"
|
||||
"utopia-ui": "^3.0.0-alpha.193"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/react": "^18.2.79",
|
||||
@ -7250,9 +7250,9 @@
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/utopia-ui": {
|
||||
"version": "3.0.0-alpha.192",
|
||||
"resolved": "https://registry.npmjs.org/utopia-ui/-/utopia-ui-3.0.0-alpha.192.tgz",
|
||||
"integrity": "sha512-1m7Bcm60SX94WnqcF11XXMOyXFK96RK4z8roTp0Wpcmoxf36JUqWd1SjuM0Pi/fmlnL8F+fzGjc+mdEmVzrdPA==",
|
||||
"version": "3.0.0-alpha.193",
|
||||
"resolved": "https://registry.npmjs.org/utopia-ui/-/utopia-ui-3.0.0-alpha.193.tgz",
|
||||
"integrity": "sha512-7vf3lD2jI74qvMAxPZFmWQiwInBrDS2Ek+9CugTibIk7m18PrB44UWDBjIuGCjwE0kuSnka1EBAC03PMYUVTmQ==",
|
||||
"dependencies": {
|
||||
"@heroicons/react": "^2.0.17",
|
||||
"@tanstack/react-query": "^5.17.8",
|
||||
|
||||
@ -19,7 +19,7 @@
|
||||
"react-dom": "^18.2.0",
|
||||
"react-rnd": "^10.4.1",
|
||||
"react-router-dom": "^6.23.0",
|
||||
"utopia-ui": "^3.0.0-alpha.192"
|
||||
"utopia-ui": "^3.0.0-alpha.193"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/react": "^18.2.79",
|
||||
|
||||
@ -87,7 +87,7 @@ function App() {
|
||||
<div className="App overflow-x-hidden">
|
||||
|
||||
<AuthProvider userApi={new userApi}>
|
||||
<AppShell assetsApi={new assetsApi("https://api.utopia-lab.org/assets/")} appName={map.name}>
|
||||
<AppShell assetsApi={new assetsApi("https://api.utopia-lab.org/assets/")} appName={map.name} userType={map.user_type.name}>
|
||||
<Permissions api={permissionsApiInstance} adminRole='8ed0b24e-3320-48cd-8444-bc152304e580'></Permissions>
|
||||
{tagsApi && <Tags api={tagsApi}></Tags>}
|
||||
<Modal>
|
||||
@ -103,8 +103,8 @@ function App() {
|
||||
<Route path='reset-password' element={<RequestPasswordPage reset_url={map.url + "/set-new-password/"} />} />
|
||||
<Route path='set-new-password' element={<SetNewPasswordPage />} />
|
||||
<Route path="profile/*" element={<OverlayProfile />} />
|
||||
<Route path="item/*" element={<OverlayItemProfile />} />
|
||||
<Route path="edit-item/*" element={<OverlayItemProfileSettings />} />
|
||||
<Route path="item/*" element={<OverlayItemProfile userType={map.user_type.name} />} />
|
||||
<Route path="edit-item/*" element={<OverlayItemProfileSettings userType={map.user_type.name}/>} />
|
||||
<Route path="profile-settings" element={<OverlayProfileSettings />} />
|
||||
<Route path="user-settings" element={<OverlayUserSettings />} />
|
||||
<Route path="moon-calendar" element={<MoonCalendar />} />
|
||||
|
||||
@ -12,7 +12,7 @@ export class mapApi {
|
||||
|
||||
async getItems() {
|
||||
try {
|
||||
const map = await directusClient.request(readItems("maps" as any, { fields: ['*'], filter: { "url": { "_eq": this.url } } as any, limit: 500 }));
|
||||
const map = await directusClient.request(readItems("maps" as any, { fields: ['*', {user_type : ['name']}], filter: { "url": { "_eq": this.url } } as any, limit: 500 }));
|
||||
if(map[0]) return map[0];
|
||||
else return "null";
|
||||
} catch (error: any) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user