@@ -21,7 +21,7 @@ export function trimTopic(topic: string) {
2121export async function copyToClipboard ( text : string ) {
2222 try {
2323 if ( window . __TAURI__ ) {
24- window . __TAURI__ . writeText ( text ) ;
24+ window . __TAURI__ . core . writeText ( text ) ;
2525 } else {
2626 await navigator . clipboard . writeText ( text ) ;
2727 }
@@ -45,7 +45,7 @@ export async function copyToClipboard(text: string) {
4545
4646export async function downloadAs ( text : string , filename : string ) {
4747 if ( window . __TAURI__ ) {
48- const result = await window . __TAURI__ . dialog . save ( {
48+ const result = await window . __TAURI__ . core . dialog . save ( {
4949 defaultPath : `${ filename } ` ,
5050 filters : [
5151 {
@@ -61,7 +61,7 @@ export async function downloadAs(text: string, filename: string) {
6161
6262 if ( result !== null ) {
6363 try {
64- await window . __TAURI__ . fs . writeTextFile ( result , text ) ;
64+ await window . __TAURI__ . core . fs . writeTextFile ( result , text ) ;
6565 showToast ( Locale . Download . Success ) ;
6666 } catch ( error ) {
6767 showToast ( Locale . Download . Failed ) ;
@@ -396,11 +396,11 @@ export function getOperationId(operation: {
396396
397397export function clientUpdate ( ) {
398398 // this a wild for updating client app
399- return window . __TAURI__ ?. updater
399+ return window . __TAURI__ ?. core . updater
400400 . checkUpdate ( )
401401 . then ( ( updateResult ) => {
402402 if ( updateResult . shouldUpdate ) {
403- window . __TAURI__ ?. updater
403+ window . __TAURI__ ?. core . updater
404404 . installUpdate ( )
405405 . then ( ( result ) => {
406406 showToast ( Locale . Settings . Update . Success ) ;
0 commit comments