)}
diff --git a/src/Components/Map/Subcomponents/ItemViewPopup.tsx b/src/Components/Map/Subcomponents/ItemViewPopup.tsx
index c18f4dae..402f09bc 100644
--- a/src/Components/Map/Subcomponents/ItemViewPopup.tsx
+++ b/src/Components/Map/Subcomponents/ItemViewPopup.tsx
@@ -111,7 +111,7 @@ export const ItemViewPopup = forwardRef((props: ItemViewPopupProps, ref: any) =>
{infoExpanded ? (
{`${props.item.date_updated && props.item.date_updated !== props.item.date_created ? 'updated' : 'posted'} ${props.item && props.item.user_created && props.item.user_created.first_name ? `by ${props.item.user_created.first_name}` : ''} ${props.item.date_updated ? timeAgo(props.item.date_updated) : timeAgo(props.item.date_created!)}`}
) : (
{children}
diff --git a/src/Components/Map/UtopiaMapInner.tsx b/src/Components/Map/UtopiaMapInner.tsx
index d41e87d5..2bf6c94c 100644
--- a/src/Components/Map/UtopiaMapInner.tsx
+++ b/src/Components/Map/UtopiaMapInner.tsx
@@ -12,6 +12,8 @@ import MarkerClusterGroup from 'react-leaflet-cluster'
import { Outlet, useLocation } from 'react-router-dom'
import { toast } from 'react-toastify'
+import { useSetAppState } from '#components/AppShell/hooks/useAppState'
+import { useTheme } from '#components/AppShell/hooks/useTheme'
import { containsUUID } from '#utils/ContainsUUID'
import { useClusterRef, useSetClusterRef } from './hooks/useClusterRef'
@@ -43,6 +45,8 @@ export function UtopiaMapInner({
showFilterControl = false,
showGratitudeControl = false,
showLayerControl = true,
+ showThemeControl = false,
+ defaultTheme = '',
donationWidget,
}: UtopiaMapProps) {
const selectNewItemPosition = useSelectPosition()
@@ -52,6 +56,8 @@ export function UtopiaMapInner({
const setMapClicked = useSetMapClicked()
const [itemFormPopup, setItemFormPopup] = useState(null)
+ useTheme(defaultTheme)
+
const layers = useLayers()
const addVisibleLayer = useAddVisibleLayer()
const leafletRefs = useLeafletRefs()
@@ -64,6 +70,12 @@ export function UtopiaMapInner({
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [layers])
+ const setAppState = useSetAppState()
+
+ useEffect(() => {
+ setAppState({ showThemeControl })
+ }, [setAppState, showThemeControl])
+
const init = useRef(false)
useEffect(() => {
if (!init.current) {
diff --git a/src/Components/Profile/Subcomponents/FormHeader.tsx b/src/Components/Profile/Subcomponents/FormHeader.tsx
index 165a9c27..55eced5f 100644
--- a/src/Components/Profile/Subcomponents/FormHeader.tsx
+++ b/src/Components/Profile/Subcomponents/FormHeader.tsx
@@ -30,7 +30,7 @@ export const FormHeader = ({ item, state, setState }) => {
}
className={'tw:-left-6 tw:top-14 tw:-mr-6'}
/>
-
+
{
name: v,
}))
}
- containerStyle='tw:grow tw:input-md'
+ containerStyle='tw:grow tw:px-4'
+ inputStyle='tw:input-md'
/>
{
subname: v,
}))
}
- containerStyle='tw:grow tw:input-sm tw:px-4 tw:mt-1'
+ containerStyle='tw:grow tw:px-4 tw:mt-1'
+ inputStyle='tw:input-sm'
/>
diff --git a/src/Components/Profile/Templates/TabsForm.tsx b/src/Components/Profile/Templates/TabsForm.tsx
index e8fced36..a38fa6ae 100644
--- a/src/Components/Profile/Templates/TabsForm.tsx
+++ b/src/Components/Profile/Templates/TabsForm.tsx
@@ -53,12 +53,12 @@ export const TabsForm = ({
}, [location.search])
return (
-
+
updateActiveTab(1)}
@@ -124,9 +124,7 @@ export const TabsForm = ({
type='radio'
name='my_tabs_2'
role='tab'
- className={
- 'tw:tab tw:min-w-[10em] tw:[--tab-border-color:var(--fallback-bc,oklch(var(--bc)/0.2))]'
- }
+ className={'tw:tab tw:min-w-[10em] '}
aria-label='Offers & Needs'
checked={activeTab === 3 && true}
onChange={() => updateActiveTab(3)}
@@ -172,7 +170,7 @@ export const TabsForm = ({
type='radio'
name='my_tabs_2'
role='tab'
- className='tw:tab tw:[--tab-border-color:var(--fallback-bc,oklch(var(--bc)/0.2))]'
+ className='tw:tab '
aria-label='Links'
checked={activeTab === 7 && true}
onChange={() => updateActiveTab(7)}
diff --git a/src/Components/Profile/Templates/TabsView.tsx b/src/Components/Profile/Templates/TabsView.tsx
index 9b4c38be..bccb2cc8 100644
--- a/src/Components/Profile/Templates/TabsView.tsx
+++ b/src/Components/Profile/Templates/TabsView.tsx
@@ -85,14 +85,12 @@ export const TabsView = ({
}, [location.search])
return (
-
+
updateActiveTab(1)}
@@ -116,9 +114,7 @@ export const TabsView = ({
type='radio'
name='my_tabs_2'
role='tab'
- className={
- 'tw:tab tw:font-bold tw:ps-2! tw:pe-2! tw:[--tab-border-color:var(--fallback-bc,oklch(var(--bc)/0.2))]'
- }
+ className={'tw:tab tw:font-bold tw:ps-2! tw:pe-2!'}
aria-label={`${item.layer.itemType.icon_as_labels && activeTab !== 2 ? '❤️' : '❤️\u00A0Trust'}`}
checked={activeTab === 2 && true}
onChange={() => updateActiveTab(2)}
@@ -199,7 +195,7 @@ export const TabsView = ({
type='radio'
name='my_tabs_2'
role='tab'
- className={`tw:tab tw:font-bold tw:ps-2! tw:pe-2! ${!(item.layer.itemType.icon_as_labels && activeTab !== 3) && 'tw:min-w-[10.4em]'} tw:[--tab-border-color:var(--fallback-bc,oklch(var(--bc)/0.2))]`}
+ className={`tw:tab tw:font-bold tw:ps-2! tw:pe-2! ${!(item.layer.itemType.icon_as_labels && activeTab !== 3) && 'tw:min-w-[10.4em]'} `}
aria-label={`${item.layer.itemType.icon_as_labels && activeTab !== 3 ? '♻️' : '♻️\u00A0Offers & Needs'}`}
checked={activeTab === 3 && true}
onChange={() => updateActiveTab(3)}
@@ -252,7 +248,7 @@ export const TabsView = ({
type='radio'
name='my_tabs_2'
role='tab'
- className='tw:tab tw:font-bold tw:ps-2! tw:pe-2! tw:[--tab-border-color:var(--fallback-bc,oklch(var(--bc)/0.2))]'
+ className='tw:tab tw:font-bold tw:ps-2! tw:pe-2! '
aria-label={`${item.layer.itemType.icon_as_labels && activeTab !== 7 ? '🔗' : '🔗\u00A0Links'}`}
checked={activeTab === 7 && true}
onChange={() => updateActiveTab(7)}
diff --git a/src/Components/Templates/ThemeControl.tsx b/src/Components/Templates/ThemeControl.tsx
new file mode 100644
index 00000000..6aa09f42
--- /dev/null
+++ b/src/Components/Templates/ThemeControl.tsx
@@ -0,0 +1,63 @@
+import { useState, useEffect } from 'react'
+
+const themes = [
+ 'default',
+ 'light',
+ 'dark',
+ 'valentine',
+ 'retro',
+ 'aqua',
+ 'cyberpunk',
+ 'caramellatte',
+ 'abyss',
+ 'silk',
+]
+
+export const ThemeControl = () => {
+ const [theme, setTheme] = useState
(() => {
+ const savedTheme = localStorage.getItem('theme')
+ return savedTheme ? (JSON.parse(savedTheme) as string) : 'default'
+ })
+
+ useEffect(() => {
+ if (theme !== 'default') {
+ localStorage.setItem('theme', JSON.stringify(theme))
+ document.documentElement.setAttribute('data-theme', theme)
+ }
+ }, [theme])
+
+ return (
+
+ )
+}
diff --git a/src/assets/css/leaflet.css b/src/assets/css/leaflet.css
index b8e63719..1092c697 100644
--- a/src/assets/css/leaflet.css
+++ b/src/assets/css/leaflet.css
@@ -47,4 +47,9 @@
background-repeat: no-repeat;
background-attachment: fixed;
background-position: 50% 80%;
+}
+
+.leaflet-popup-close-button span {
+ color: var(--color-base-content);
+ opacity: 50%;
}
\ No newline at end of file
diff --git a/src/assets/css/tailwind.css b/src/assets/css/tailwind.css
index 97a175bb..409668fc 100644
--- a/src/assets/css/tailwind.css
+++ b/src/assets/css/tailwind.css
@@ -77,8 +77,4 @@
.modal-box {
max-height: calc(100dvh - 2em);
-}
-
-.tab-content .container {
- height: 100%;
}
\ No newline at end of file
diff --git a/src/assets/css/toastify.css b/src/assets/css/toastify.css
index dec3026f..422510e9 100644
--- a/src/assets/css/toastify.css
+++ b/src/assets/css/toastify.css
@@ -6,7 +6,7 @@
}
.Toastify__toast {
- border-radius: 1rem;
+ border-radius: var(--radius-box);
--shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
--shadow-colored: 0 20px 25px -5px var(--shadow-color), 0 8px 10px -6px var(--shadow-color);
box-shadow: var(--ring-offset-shadow, 0 0 #0000), var(--ring-shadow, 0 0 #0000), var(--shadow);
diff --git a/src/types/UtopiaMapProps.d.ts b/src/types/UtopiaMapProps.d.ts
index cbcf02ce..eaa455a2 100644
--- a/src/types/UtopiaMapProps.d.ts
+++ b/src/types/UtopiaMapProps.d.ts
@@ -12,6 +12,8 @@ export interface UtopiaMapProps {
showFilterControl?: boolean
showLayerControl?: boolean
showGratitudeControl?: boolean
+ showThemeControl?: boolean
infoText?: string
donationWidget?: boolean
+ defaultTheme?: string
}