feat: support change media upload service
This commit is contained in:
@@ -35,11 +35,12 @@ export const toOthersRelaySettings = (pubkey: string) => {
|
||||
const npub = nip19.npubEncode(pubkey)
|
||||
return `/users/${npub}/relays`
|
||||
}
|
||||
export const toRelaySettings = (tag?: 'mailbox' | 'favorite-relays') => {
|
||||
return '/relay-settings' + (tag ? '#' + tag : '')
|
||||
}
|
||||
export const toSettings = () => '/settings'
|
||||
export const toWallet = () => '/wallet'
|
||||
export const toRelaySettings = (tag?: 'mailbox' | 'favorite-relays') => {
|
||||
return '/settings/relays' + (tag ? '#' + tag : '')
|
||||
}
|
||||
export const toWallet = () => '/settings/wallet'
|
||||
export const toPostSettings = () => '/settings/posts'
|
||||
export const toProfileEditor = () => '/profile-editor'
|
||||
export const toRelay = (url: string) => `/relays/${encodeURIComponent(url)}`
|
||||
export const toMuteList = () => '/mutes'
|
||||
|
||||
@@ -41,7 +41,12 @@ export function normalizeHttpUrl(url: string): string {
|
||||
}
|
||||
|
||||
export function simplifyUrl(url: string): string {
|
||||
return url.replace('wss://', '').replace('ws://', '').replace(/\/$/, '')
|
||||
return url
|
||||
.replace('wss://', '')
|
||||
.replace('ws://', '')
|
||||
.replace('https://', '')
|
||||
.replace('http://', '')
|
||||
.replace(/\/$/, '')
|
||||
}
|
||||
|
||||
export function isLocalNetworkUrl(urlString: string): boolean {
|
||||
|
||||
Reference in New Issue
Block a user