@ -174,16 +174,18 @@
: aria - busy = "loadingProfile || savingProfile"
: aria - busy = "loadingProfile || savingProfile"
> < / textarea >
> < / textarea >
< div class = "flex items-center mb-4" >
< div class = "flex items-center mb-4" >
< input
< input
v - model = "includeUserProfileLocation"
v - model = "includeUserProfileLocation"
type = "checkbox"
type = "checkbox"
class = "mr-2"
class = "mr-2"
@ change = "onLocationCheckboxChange"
@ change = "onLocationCheckboxChange"
/ >
/ >
< label for = "includeUserProfileLocation" > Include Location < / label >
< label for = "includeUserProfileLocation" > Include Location < / label >
< span class = "text-xs text-slate-400 ml-2" > ( Debug : { { isMapReady ? 'Map Ready' : 'Map Loading' } } ) < / span >
< span class = "text-xs text-slate-400 ml-2"
< / div >
> ( Debug : { { isMapReady ? "Map Ready" : "Map Loading" } } ) < / s p a n
>
< / div >
< div v-if ="includeUserProfileLocation" class="mb-4 aspect-video" >
< div v-if ="includeUserProfileLocation" class="mb-4 aspect-video" >
< p class = "text-sm mb-2 text-slate-500" >
< p class = "text-sm mb-2 text-slate-500" >
The location you choose will be shared with the world until you remove
The location you choose will be shared with the world until you remove
@ -922,11 +924,17 @@ export default class AccountViewView extends Vue {
/ / F i x L e a f l e t i c o n i s s u e s i n m o d e r n b u n d l e r s
/ / F i x L e a f l e t i c o n i s s u e s i n m o d e r n b u n d l e r s
/ / T h i s p r e v e n t s t h e " C a n n o t r e a d p r o p e r t i e s o f u n d e f i n e d ( r e a d i n g ' D e f a u l t ' ) " e r r o r
/ / T h i s p r e v e n t s t h e " C a n n o t r e a d p r o p e r t i e s o f u n d e f i n e d ( r e a d i n g ' D e f a u l t ' ) " e r r o r
if ( L . Icon . Default ) {
if ( L . Icon . Default ) {
delete ( L . Icon . Default . prototype as any ) . _getIconUrl ;
/ / T y p e - s a f e w a y t o h a n d l e L e a f l e t i c o n p r o t o t y p e
const iconDefault = L . Icon . Default . prototype as Record < string , unknown > ;
if ( "_getIconUrl" in iconDefault ) {
delete iconDefault . _getIconUrl ;
}
L . Icon . Default . mergeOptions ( {
L . Icon . Default . mergeOptions ( {
iconRetinaUrl : 'https://unpkg.com/leaflet@1.7.1/dist/images/marker-icon-2x.png' ,
iconRetinaUrl :
iconUrl : 'https://unpkg.com/leaflet@1.7.1/dist/images/marker-icon.png' ,
"https://unpkg.com/leaflet@1.7.1/dist/images/marker-icon-2x.png" ,
shadowUrl : 'https://unpkg.com/leaflet@1.7.1/dist/images/marker-shadow.png' ,
iconUrl : "https://unpkg.com/leaflet@1.7.1/dist/images/marker-icon.png" ,
shadowUrl :
"https://unpkg.com/leaflet@1.7.1/dist/images/marker-shadow.png" ,
} ) ;
} ) ;
}
}
}
}
@ -1543,12 +1551,18 @@ export default class AccountViewView extends Vue {
try {
try {
logger . debug ( "Map ready event fired, map object:" , map ) ;
logger . debug ( "Map ready event fired, map object:" , map ) ;
/ / d o i n g t h i s h e r e i n s t e a d o f o n t h e l - m a p e l e m e n t a v o i d s a r e c e n t e r i n g a f t e r a d r a g t h e n z o o m a t s t a r t u p
/ / d o i n g t h i s h e r e i n s t e a d o f o n t h e l - m a p e l e m e n t a v o i d s a r e c e n t e r i n g a f t e r a d r a g t h e n z o o m a t s t a r t u p
const zoom = this . userProfileLatitude && this . userProfileLongitude ? 12 : 2 ;
const zoom =
this . userProfileLatitude && this . userProfileLongitude ? 12 : 2 ;
const lat = this . userProfileLatitude || 0 ;
const lat = this . userProfileLatitude || 0 ;
const lng = this . userProfileLongitude || 0 ;
const lng = this . userProfileLongitude || 0 ;
map . setView ( [ lat , lng ] , zoom ) ;
map . setView ( [ lat , lng ] , zoom ) ;
this . isMapReady = true ;
this . isMapReady = true ;
logger . debug ( "Map ready state set to true, coordinates:" , [ lat , lng ] , "zoom:" , zoom ) ;
logger . debug (
"Map ready state set to true, coordinates:" ,
[ lat , lng ] ,
"zoom:" ,
zoom ,
) ;
} catch ( error ) {
} catch ( error ) {
logger . error ( "Error in onMapReady:" , error ) ;
logger . error ( "Error in onMapReady:" , error ) ;
this . isMapReady = true ; / / S e t t o t r u e e v e n o n e r r o r t o p r e v e n t i n f i n i t e l o a d i n g
this . isMapReady = true ; / / S e t t o t r u e e v e n o n e r r o r t o p r e v e n t i n f i n i t e l o a d i n g
@ -1710,7 +1724,10 @@ export default class AccountViewView extends Vue {
onLocationCheckboxChange ( ) : void {
onLocationCheckboxChange ( ) : void {
try {
try {
logger . debug ( "Location checkbox changed, new value:" , this . includeUserProfileLocation ) ;
logger . debug (
"Location checkbox changed, new value:" ,
this . includeUserProfileLocation ,
) ;
if ( ! this . includeUserProfileLocation ) {
if ( ! this . includeUserProfileLocation ) {
/ / L o c a t i o n c h e c k b o x w a s u n c h e c k e d , c l e a n u p m a p s t a t e
/ / L o c a t i o n c h e c k b o x w a s u n c h e c k e d , c l e a n u p m a p s t a t e
this . isMapReady = false ;
this . isMapReady = false ;