mirror of
https://github.com/tauri-apps/plugins-workspace.git
synced 2026-04-29 12:06:01 +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>
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<script>
|
||||
import { getName, getVersion, getTauriVersion } from '@tauri-apps/api/app'
|
||||
import { getName, getVersion, getTauriVersion } from 'tauri-plugin-app-api'
|
||||
import { relaunch, exit } from '@tauri-apps/api/process'
|
||||
|
||||
let version = '0.0.0'
|
||||
|
||||
Reference in New Issue
Block a user