diff --git a/config.sh b/config.sh index 4ec8ee0..e7c438d 100755 --- a/config.sh +++ b/config.sh @@ -541,6 +541,12 @@ NOCODB_LOGIN_SHEET= # NOCODB_SETTINGS_SHEET is the URL to your NocoDB settings sheet. NOCODB_SETTINGS_SHEET= +# NOCODB_SHIFTS_SHEET is the urls to your shifts sheets. +NOCODB_SHIFTS_SHEET= + +# NOCODB_SHIFT_SIGNUPS_SHEET is the URL to your NocoDB shift signups sheet where users can add their own shifts. +NOCODB_SHIFT_SIGNUPS_SHEET= + # Server Configuration PORT=3000 NODE_ENV=production @@ -582,6 +588,13 @@ EOL cp "$MAP_ENV_FILE" "$backup_file" echo "Created backup of map .env at $backup_file" + # Update NOCODB_API_URL to use new domain + if grep -q "^NOCODB_API_URL=" "$MAP_ENV_FILE"; then + sed -i "s|^NOCODB_API_URL=.*|NOCODB_API_URL=https://db.$new_domain/api/v1|" "$MAP_ENV_FILE" + else + echo "NOCODB_API_URL=https://db.$new_domain/api/v1" >> "$MAP_ENV_FILE" + fi + # Update COOKIE_DOMAIN if grep -q "^COOKIE_DOMAIN=" "$MAP_ENV_FILE"; then sed -i "s|^COOKIE_DOMAIN=.*|COOKIE_DOMAIN=.$new_domain|" "$MAP_ENV_FILE" @@ -597,15 +610,16 @@ EOL echo "ALLOWED_ORIGINS=$allowed_origins" >> "$MAP_ENV_FILE" fi - # Also update the NOCODB URLs if they contain domain references - sed -i "s|example\.org|$new_domain|g" "$MAP_ENV_FILE" - sed -i "s|changeme\.org|$new_domain|g" "$MAP_ENV_FILE" - sed -i "s|albertademocracytaskforce\.org|$new_domain|g" "$MAP_ENV_FILE" + # Update domain references in NocoDB URLs while preserving the sheet IDs and paths + # This will update domains like cmlite.org, changeme.org, etc. to the new domain + sed -i "s|://db\.cmlite\.org/|://db.$new_domain/|g" "$MAP_ENV_FILE" + sed -i "s|://map\.cmlite\.org|://map.$new_domain|g" "$MAP_ENV_FILE" echo "✅ Updated map .env file with:" + echo " - NOCODB_API_URL=https://db.$new_domain/api/v1" echo " - COOKIE_DOMAIN=.$new_domain" echo " - ALLOWED_ORIGINS=$allowed_origins" - echo " - Updated all NocoDB URLs to use $new_domain" + echo " - Updated all NocoDB URLs to use $new_domain domain" return 0 } diff --git a/map/app/public/css/style.css b/map/app/public/css/style.css index 6d20867..140053b 100644 --- a/map/app/public/css/style.css +++ b/map/app/public/css/style.css @@ -698,6 +698,17 @@ body { .mobile-dropdown-item:last-child { border-bottom: none; + border-top: 1px solid #ddd; + background-color: #fff5f5; +} + +.mobile-dropdown-item:last-child button { + color: var(--danger-color); + font-weight: 500; +} + +.mobile-dropdown-item:last-child:hover { + background-color: #fee; } .mobile-dropdown-item.location-info { @@ -711,6 +722,38 @@ body { color: var(--dark-color); } +/* Add logout button specific styles */ +.mobile-dropdown-item button { + background: none; + border: none; + color: inherit; + font-size: inherit; + cursor: pointer; + width: 100%; + text-align: left; + padding: 0; + font-family: inherit; +} + +.mobile-dropdown-item button:hover { + background-color: rgba(0, 0, 0, 0.05); +} + +/* Logout button danger styling */ +.mobile-dropdown-item.logout-item { + border-top: 1px solid #eee; + background-color: #fee; +} + +.mobile-dropdown-item.logout-item button { + color: var(--danger-color); + font-weight: 500; +} + +.mobile-dropdown-item.logout-item:hover { + background-color: #fdd; +} + /* Floating sidebar for mobile */ .mobile-sidebar { position: fixed; diff --git a/map/app/public/index.html b/map/app/public/index.html index 8b47722..4d08825 100644 --- a/map/app/public/index.html +++ b/map/app/public/index.html @@ -28,6 +28,11 @@ Loading...