feat(app): add plugin (#345)

This commit is contained in:
Lucas Fernandes Nogueira
2023-05-08 08:55:50 -07:00
committed by GitHub
parent 02754f527c
commit bcb42b7343
19 changed files with 542 additions and 104 deletions
+8 -8
View File
@@ -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 -1
View File
@@ -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'