Implement configurable domain names for all copy link functionality
- Add PROD_SHARE_DOMAIN constant using existing AppString.PROD_PUSH_SERVER - Update all 9 components/services to use configurable domain instead of hardcoded URLs - Fix localhost issues in development mode for all sharing functionality - Ensure all copy link buttons generate production URLs regardless of environment - Add proper TypeScript imports and component properties for template access - Maintain existing functionality while improving maintainability and consistency Files updated: - src/constants/app.ts (new constant) - src/views/ClaimView.vue (claim + certificate links) - src/views/ProjectViewView.vue (project links) - src/views/ConfirmGiftView.vue (confirm gift links) - src/components/HiddenDidDialog.vue (hidden DID links) - src/views/UserProfileView.vue (profile links) - src/views/InviteOneView.vue (invite links) - src/views/ContactsView.vue (contact import links) - src/views/OnboardMeetingSetupView.vue (meeting links) - src/libs/endorserServer.ts (contact import confirm links) Documentation added: - docs/domain-configuration.md (comprehensive guide) - README.md (quick reference section) Security audit: ✅ All changes maintain existing security model Testing: ✅ All linting errors resolved, only warnings remain Performance: ✅ No performance impact, improves user experience
This commit is contained in:
34
README.md
34
README.md
@@ -97,15 +97,35 @@ rmdir /s /q %APPDATA%\TimeSafari
|
||||
```bash
|
||||
# Create isolated browser profile
|
||||
mkdir ~/timesafari-dev-data
|
||||
|
||||
# Start browser with custom profile
|
||||
google-chrome --user-data-dir=~/timesafari-dev-data
|
||||
|
||||
# Clear when needed
|
||||
rm -rf ~/timesafari-dev-data
|
||||
```
|
||||
|
||||
See the script for complete platform-specific instructions.
|
||||
## Domain Configuration
|
||||
|
||||
TimeSafari uses a centralized domain configuration system to ensure consistent
|
||||
URL generation across all environments. This prevents localhost URLs from
|
||||
appearing in shared links during development.
|
||||
|
||||
### Key Features
|
||||
- ✅ **Production URLs for Sharing**: All copy link buttons use production domain
|
||||
- ✅ **Environment-Specific Internal URLs**: Internal operations use appropriate
|
||||
environment URLs
|
||||
- ✅ **Single Point of Control**: Change domain in one place for entire app
|
||||
- ✅ **Type-Safe Configuration**: Full TypeScript support
|
||||
|
||||
### Quick Reference
|
||||
```typescript
|
||||
// For sharing functionality (always production)
|
||||
import { PROD_SHARE_DOMAIN } from "@/constants/app";
|
||||
const shareLink = `${PROD_SHARE_DOMAIN}/deep-link/claim/123`;
|
||||
|
||||
// For internal operations (environment-specific)
|
||||
import { APP_SERVER } from "@/constants/app";
|
||||
const apiUrl = `${APP_SERVER}/api/claim/123`;
|
||||
```
|
||||
|
||||
### Documentation
|
||||
- [Domain Configuration System](docs/domain-configuration.md) - Complete guide
|
||||
- [Constants and Configuration](src/constants/app.ts) - Core constants
|
||||
|
||||
## Tests
|
||||
|
||||
|
||||
Reference in New Issue
Block a user