mirror of
https://github.com/utopia-os/utopia-ui.git
synced 2025-12-13 07:46:10 +00:00
tag optimization
This commit is contained in:
parent
e5da04c98d
commit
beaf073e27
@ -13,6 +13,7 @@ import { getValue } from '../../../../Utils/GetValue';
|
|||||||
import { LocateControl } from './LocateControl';
|
import { LocateControl } from './LocateControl';
|
||||||
import * as L from 'leaflet';
|
import * as L from 'leaflet';
|
||||||
import MarkerIconFactory from '../../../../Utils/MarkerIconFactory';
|
import MarkerIconFactory from '../../../../Utils/MarkerIconFactory';
|
||||||
|
import { decodeTag } from '../../../../Utils/FormatTags';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -100,7 +101,7 @@ export const SearchControl = ({ clusterRef }) => {
|
|||||||
let params = new URLSearchParams(window.location.search);
|
let params = new URLSearchParams(window.location.search);
|
||||||
window.history.pushState({}, "", "/" + `${params? `?${params}` : ""}`);
|
window.history.pushState({}, "", "/" + `${params? `?${params}` : ""}`);
|
||||||
}}>
|
}}>
|
||||||
<b>#{capitalizeFirstLetter(tag.name)}</b>
|
<b>#{decodeTag(tag.name)}</b>
|
||||||
</div>
|
</div>
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -3,7 +3,7 @@ import { Item } from '../../../../types'
|
|||||||
|
|
||||||
export const StartEndView = ({item} : {item?:Item}) => {
|
export const StartEndView = ({item} : {item?:Item}) => {
|
||||||
return (
|
return (
|
||||||
<div className="tw-flex tw-flex-row tw-mb-4">
|
<div className="tw-flex tw-flex-row tw-mb-4 tw-mt-1">
|
||||||
<div className="tw-basis-2/5 tw-flex tw-flex-row">
|
<div className="tw-basis-2/5 tw-flex tw-flex-row">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" className="tw-h-4 tw-w-4 tw-mr-2" fill="none" viewBox="0 0 24 24" stroke="currentColor" strokeWidth={2}>
|
<svg xmlns="http://www.w3.org/2000/svg" className="tw-h-4 tw-w-4 tw-mr-2" fill="none" viewBox="0 0 24 24" stroke="currentColor" strokeWidth={2}>
|
||||||
<path strokeLinecap="round" strokeLinejoin="round" d="M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z" />
|
<path strokeLinecap="round" strokeLinejoin="round" d="M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z" />
|
||||||
|
|||||||
@ -82,7 +82,7 @@ export function OverlayProfile() {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className='tw-overflow-y-auto tw-h-full tw-pt-4 fade'>
|
<div className='tw-overflow-y-auto tw-h-full tw-pt-4 fade'>
|
||||||
<div className='tw-grid tw-grid-cols-1 xl:tw-grid-cols-2'>
|
<div className='tw-grid tw-grid-cols-1'>
|
||||||
{
|
{
|
||||||
offers.length > 0 ?
|
offers.length > 0 ?
|
||||||
<div className='tw-col-span-1'>
|
<div className='tw-col-span-1'>
|
||||||
|
|||||||
@ -187,11 +187,11 @@ export function OverlayProfileSettings() {
|
|||||||
let offer_state : Array<any> = [];
|
let offer_state : Array<any> = [];
|
||||||
let needs_state : Array<any> = [];
|
let needs_state : Array<any> = [];
|
||||||
|
|
||||||
offers.map(o => {
|
await offers.map(o => {
|
||||||
offer_state.push({directus_user_id: user?.id, tags_id: o.id})
|
offer_state.push({directus_user_id: user?.id, tags_id: o.id})
|
||||||
});
|
});
|
||||||
|
|
||||||
needs.map(n => {
|
await needs.map(n => {
|
||||||
needs_state.push({directus_user_id: user?.id, tags_id: n.id})
|
needs_state.push({directus_user_id: user?.id, tags_id: n.id})
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@ -4,5 +4,5 @@ export function decodeTag(string : string) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function encodeTag(string : string) {
|
export function encodeTag(string : string) {
|
||||||
return string.replace(/\s+/, "_");
|
return string.replace(/\s+/g, "_");
|
||||||
}
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user