mirror of
https://github.com/utopia-os/utopia-ui.git
synced 2025-12-13 07:46:10 +00:00
updated to utopia-ui@3.0.19
This commit is contained in:
parent
400f65ad91
commit
f8c494548e
28
package-lock.json
generated
28
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.10"
|
||||
"utopia-ui": "^3.0.19"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/react": "^18.2.79",
|
||||
@ -1969,20 +1969,20 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@tanstack/query-core": {
|
||||
"version": "5.59.16",
|
||||
"resolved": "https://registry.npmjs.org/@tanstack/query-core/-/query-core-5.59.16.tgz",
|
||||
"integrity": "sha512-crHn+G3ltqb5JG0oUv6q+PMz1m1YkjpASrXTU+sYWW9pLk0t2GybUHNRqYPZWhxgjPaVGC4yp92gSFEJgYEsPw==",
|
||||
"version": "5.59.20",
|
||||
"resolved": "https://registry.npmjs.org/@tanstack/query-core/-/query-core-5.59.20.tgz",
|
||||
"integrity": "sha512-e8vw0lf7KwfGe1if4uPFhvZRWULqHjFcz3K8AebtieXvnMOz5FSzlZe3mTLlPuUBcydCnBRqYs2YJ5ys68wwLg==",
|
||||
"funding": {
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/tannerlinsley"
|
||||
}
|
||||
},
|
||||
"node_modules/@tanstack/react-query": {
|
||||
"version": "5.59.16",
|
||||
"resolved": "https://registry.npmjs.org/@tanstack/react-query/-/react-query-5.59.16.tgz",
|
||||
"integrity": "sha512-MuyWheG47h6ERd4PKQ6V8gDyBu3ThNG22e1fRVwvq6ap3EqsFhyuxCAwhNP/03m/mLg+DAb0upgbPaX6VB+CkQ==",
|
||||
"version": "5.59.20",
|
||||
"resolved": "https://registry.npmjs.org/@tanstack/react-query/-/react-query-5.59.20.tgz",
|
||||
"integrity": "sha512-Zly0egsK0tFdfSbh5/mapSa+Zfc3Et0Zkar7Wo5sQkFzWyB3p3uZWOHR2wrlAEEV2L953eLuDBtbgFvMYiLvUw==",
|
||||
"dependencies": {
|
||||
"@tanstack/query-core": "5.59.16"
|
||||
"@tanstack/query-core": "5.59.20"
|
||||
},
|
||||
"funding": {
|
||||
"type": "github",
|
||||
@ -4835,9 +4835,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/mdast-util-to-markdown": {
|
||||
"version": "2.1.1",
|
||||
"resolved": "https://registry.npmjs.org/mdast-util-to-markdown/-/mdast-util-to-markdown-2.1.1.tgz",
|
||||
"integrity": "sha512-OrkcCoqAkEg9b1ykXBrA0ehRc8H4fGU/03cACmW2xXzau1+dIdS+qJugh1Cqex3hMumSBgSE/5pc7uqP12nLAw==",
|
||||
"version": "2.1.2",
|
||||
"resolved": "https://registry.npmjs.org/mdast-util-to-markdown/-/mdast-util-to-markdown-2.1.2.tgz",
|
||||
"integrity": "sha512-xj68wMTvGXVOKonmog6LwyJKrYXZPvlwabaryTjLh9LuvovB/KAH+kvi8Gjj+7rJjsFi23nkUxRQv1KqSroMqA==",
|
||||
"dependencies": {
|
||||
"@types/mdast": "^4.0.0",
|
||||
"@types/unist": "^3.0.0",
|
||||
@ -7203,9 +7203,9 @@
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/utopia-ui": {
|
||||
"version": "3.0.10",
|
||||
"resolved": "https://registry.npmjs.org/utopia-ui/-/utopia-ui-3.0.10.tgz",
|
||||
"integrity": "sha512-xrutPzz/xVSmUoGOtOJ9vLQ+UoCXdrVloVI6v+qZNU2gBfJvAOouUWi6qY3J/yXU2b6cEFVLNJLEE2L3LAg0Sg==",
|
||||
"version": "3.0.19",
|
||||
"resolved": "https://registry.npmjs.org/utopia-ui/-/utopia-ui-3.0.19.tgz",
|
||||
"integrity": "sha512-3MKWg36129nuL7rxCUSofx1p4KKQZjbOT6EbdVcy/VlAE9N6Sdc7xpvBathhI4PHiusiV3Xpm64zgBZwAQczoA==",
|
||||
"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.10"
|
||||
"utopia-ui": "^3.0.19"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/react": "^18.2.79",
|
||||
|
||||
@ -29,7 +29,6 @@ function App() {
|
||||
const [layerPageRoutes, setLayerPageRoutes] = useState<any>();
|
||||
const [loading, setLoading] = useState<boolean>(true);
|
||||
|
||||
|
||||
useEffect(() => {
|
||||
setPermissionsApiInstance(new permissionsApi());
|
||||
setMapApiInstance(new mapApi(window.location.origin));
|
||||
@ -103,15 +102,15 @@ function App() {
|
||||
<Route path="/*" element={<MapContainer map={map} layers={layers} />}>
|
||||
<Route path='login' element={<LoginPage />} />
|
||||
<Route path='signup' element={<SignupPage />} />
|
||||
<Route path='reset-password' element={<RequestPasswordPage reset_url={map.url + "/set-new-password/"} />} />
|
||||
<Route path='reset-password' element={<RequestPasswordPage resetUrl={map.url + "/set-new-password/"} />} />
|
||||
<Route path='set-new-password' element={<SetNewPasswordPage />} />
|
||||
<Route path="item/*" element={<ProfileView attestationApi={attestationApi} userType={map.user_type.name} />} />
|
||||
<Route path="edit-item/*" element={<ProfileForm userType={map.user_type.name}/>} />
|
||||
<Route path="item/*" element={<ProfileView attestationApi={attestationApi} />} />
|
||||
<Route path="edit-item/*" element={<ProfileForm/>} />
|
||||
<Route path="user-settings" element={<UserSettings />} />
|
||||
<Route path="moon-calendar" element={<MoonCalendar />} />
|
||||
<Route path="landingpage" element={<Landingpage />} />
|
||||
<Route path="market" element={<MarketView />} />
|
||||
<Route path="select-user" element={<SelectUser userType={map.user_type.name} />} />
|
||||
<Route path="select-user" element={<SelectUser/>} />
|
||||
<Route path="attestation-form" element={<AttestationForm api={attestationApi}/>} />
|
||||
{
|
||||
layers.map((l: any) =>
|
||||
|
||||
@ -12,7 +12,7 @@ export class layersApi {
|
||||
|
||||
async getItems() {
|
||||
try {
|
||||
const layers = await directusClient.request(readItems("layers" as any, { fields: ['*', {itemType : ['*']}], filter: { "maps": { "maps_id": { "id": { "_eq": this.mapId } } } }, limit: 500 }));
|
||||
const layers = await directusClient.request(readItems("layers" as any, { fields: ['*', {itemType : ['*.*', {profileTemplate: ['*', 'item.*.*.*'] }]} as any], filter: { "maps": { "maps_id": { "id": { "_eq": this.mapId } } } }, limit: 500 }));
|
||||
return layers;
|
||||
} catch (error: any) {
|
||||
console.log(error);
|
||||
|
||||
@ -21,12 +21,20 @@ function MapContainer({ layers, map }: { layers: Array<LayerProps>, map: any })
|
||||
layers.map((layer: LayerProps) => {
|
||||
apis && setApis(current => [...current, {
|
||||
id: layer.id!, api: new itemsApi<Place>('items', layer.id, undefined, {
|
||||
...(layer.itemType.name == "event" && {
|
||||
"end": {
|
||||
"_gt": etartOfDayISO
|
||||
"_or": [
|
||||
{
|
||||
"end": {
|
||||
"_gt": etartOfDayISO
|
||||
}
|
||||
},
|
||||
{
|
||||
"end": {
|
||||
"_null": true
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
]
|
||||
}
|
||||
)
|
||||
}])
|
||||
})
|
||||
}, [layers])
|
||||
@ -89,7 +97,7 @@ function MapContainer({ layers, map }: { layers: Array<LayerProps>, map: any })
|
||||
<ItemForm>
|
||||
{layer.itemType.show_name_input && <PopupTextInput dataField='name' placeholder='Name'></PopupTextInput>}
|
||||
{layer.itemType.show_start_end_input && <PopupStartEndInput></PopupStartEndInput>}
|
||||
{layer.itemType.show_text_input && <PopupTextAreaInput dataField='text' placeholder={'Text ...'} style="tw-h-40"></PopupTextAreaInput>}
|
||||
{layer.itemType.show_text_input && <div className='mt-4'><PopupTextAreaInput dataField='text' placeholder={'Text ...'} style="tw-h-40"></PopupTextAreaInput></div>}
|
||||
{//layer.public_edit_items && <PopupCheckboxInput dataField={'public_edit'} label={'public edit'}/>
|
||||
}
|
||||
{layer.itemType.custom_text && <div className='flex justify-center'>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user