"git@developer.sourcefind.cn:chenpangpang/open-webui.git" did not exist on "a07b89da6fd5fa15735919b9ddd92914268e2961"
Unverified Commit 83efebe0 authored by Timothy Jaeryang Baek's avatar Timothy Jaeryang Baek Committed by GitHub
Browse files

Merge pull request #1657 from open-webui/main

dev
parents 4651db8c e6fad5cc
...@@ -134,11 +134,36 @@ ...@@ -134,11 +134,36 @@
<button <button
class=" self-center flex items-center gap-1 px-3.5 py-2 rounded-xl text-sm font-medium bg-emerald-600 hover:bg-emerald-500 text-white" class=" self-center flex items-center gap-1 px-3.5 py-2 rounded-xl text-sm font-medium bg-emerald-600 hover:bg-emerald-500 text-white"
type="button" type="button"
on:pointerdown={() => {
shareLocalChat();
}}
on:click={async () => { on:click={async () => {
copyToClipboard(shareUrl); const isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
if (isSafari) {
// Oh, Safari, you're so special, let's give you some extra love and attention
console.log('isSafari');
const getUrlPromise = async () => {
const url = await shareLocalChat();
return new Blob([url], { type: 'text/plain' });
};
navigator.clipboard
.write([
new ClipboardItem({
'text/plain': getUrlPromise()
})
])
.then(() => {
console.log('Async: Copying to clipboard was successful!');
return true;
})
.catch((error) => {
console.error('Async: Could not copy text: ', error);
return false;
});
} else {
copyToClipboard(await shareLocalChat());
}
toast.success($i18n.t('Copied shared chat URL to clipboard!')); toast.success($i18n.t('Copied shared chat URL to clipboard!'));
show = false; show = false;
}} }}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment