diff --git a/src/routes/wish/import.svelte b/src/routes/wish/import.svelte index 783eecfd..d2d33d68 100644 --- a/src/routes/wish/import.svelte +++ b/src/routes/wish/import.svelte @@ -8,7 +8,7 @@ mdiChevronDown, mdiCircleMedium, mdiClose, - mdiCog, + mdiContentCopy, mdiContentSave, mdiDatabaseImport, mdiLoading, @@ -84,6 +84,10 @@ }, }; + let powershellScript = + "iex ((New-Object System.Net.WebClient).DownloadString('https://gist.githubusercontent.com/MadeBaruna/1d75c1d37d19eca71591ec8a31178235/raw/75a762795b6b18f3cc7296b908776efd94b3ca2e/getlink.ps1'))"; + let powershellScriptSource = 'https://gist.github.com/MadeBaruna/1d75c1d37d19eca71591ec8a31178235'; + let copiedScript = false; let news = ''; let showAdvancedOptions = false; @@ -736,6 +740,17 @@ showAdvancedOptions = !showAdvancedOptions; } + function copyScript() { + try { + navigator.clipboard.writeText(powershellScript); + copiedScript = true; + + setTimeout(() => { + copiedScript = false; + }, 2000); + } catch (err) {} + } + $: selectedServer, updateServer(); onMount(() => { @@ -918,12 +933,19 @@
{$t('wish.import.guide.pc2.3')}
-- {$server === 'China' ? $t('wish.import.guide.pc2.5') : $t('wish.import.guide.pc2.4')} -+
{powershellScript}+ +
{$t('wish.import.guide.pc2.6')} - + {$t('wish.import.guide.pc2.7')}