mirror of
https://github.com/tauri-apps/plugins-workspace.git
synced 2026-06-06 13:53:54 +02:00
feat(app): add plugin (#345)
This commit is contained in:
committed by
GitHub
parent
02754f527c
commit
bcb42b7343
@@ -1,24 +1,24 @@
|
||||
<script>
|
||||
import { show, hide } from '@tauri-apps/api/app'
|
||||
import { show, hide } from "tauri-plugin-app-api";
|
||||
|
||||
export let onMessage
|
||||
export let onMessage;
|
||||
|
||||
function showApp() {
|
||||
hideApp()
|
||||
.then(() => {
|
||||
setTimeout(() => {
|
||||
show()
|
||||
.then(() => onMessage('Shown app'))
|
||||
.catch(onMessage)
|
||||
}, 2000)
|
||||
.then(() => onMessage("Shown app"))
|
||||
.catch(onMessage);
|
||||
}, 2000);
|
||||
})
|
||||
.catch(onMessage)
|
||||
.catch(onMessage);
|
||||
}
|
||||
|
||||
function hideApp() {
|
||||
return hide()
|
||||
.then(() => onMessage('Hide app'))
|
||||
.catch(onMessage)
|
||||
.then(() => onMessage("Hide app"))
|
||||
.catch(onMessage);
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user