Implement link sharing (#213)

* Implement link sharing

* Share default

* Compress and base64 encode data

* Better error messages

* Fix build

* Only change version when it's different
This commit is contained in:
Misode
2022-03-19 19:26:39 +01:00
committed by GitHub
parent 03e9c53d70
commit a5a08fc935
10 changed files with 212 additions and 14 deletions

View File

@@ -88,7 +88,7 @@ export function setSeachParams(modifications: Record<string, string | undefined>
else searchParams.set(key, value)
})
const search = Array.from(searchParams).map(([key, value]) =>
`${encodeURIComponent(key)}=${encodeURIComponent(value)}`)
`${encodeURIComponent(key)}=${encodeURIComponent(value).replaceAll('%2F', '/')}`)
route(`${newPath ? cleanUrl(newPath) : getPath(url)}${search.length === 0 ? '' : `?${search.join('&')}`}`, true)
}