Merge pull request 'Menghapus if dari penerbitan' (#13) from pengembangan into main
Reviewed-on: #13
This commit was merged in pull request #13.
This commit is contained in:
commit
d0843a9518
6 files changed
+10
-11
No files matched your search
@@ -21,7 +21,6 @@ jobs:
|
|||||||
>> $GITEA_OUTPUT
|
>> $GITEA_OUTPUT
|
||||||
|
|
||||||
penerbitan:
|
penerbitan:
|
||||||
if: "!contains(gitea.event.head_commit.message, 'Merge pull request')"
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: persiapan
|
needs: persiapan
|
||||||
steps:
|
steps:
|
||||||
|
|||||||
+5
-5
@@ -1,20 +1,20 @@
|
|||||||
import { invoke } from "@tauri-apps/api/core";
|
import { invoke } from "@tauri-apps/api/core";
|
||||||
import { SBlueclasMuatanKirim, SBlueclasResponDaftarPerangkat } from "./models";
|
import { SBlueclasMuatanKirim, SBlueclasResponDaftarPerangkat } from "./models";
|
||||||
|
|
||||||
export async function cek_izin(): Promise<string> {
|
export async function cekIzin(): Promise<string> {
|
||||||
return await invoke<string>("plugin:bluclas|cek_izin").then((r) => r);
|
return await invoke<string>("plugin:bluclas|cek_izin").then((res: string) => res);
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function minta_izin(): Promise<null> {
|
export async function mintaIzin(): Promise<null> {
|
||||||
return await invoke<null>("plugin:bluclas|minta_izin");
|
return await invoke<null>("plugin:bluclas|minta_izin");
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function daftar_perangkat(): Promise<
|
export async function daftarPerangkat(): Promise<
|
||||||
SBlueclasResponDaftarPerangkat[]
|
SBlueclasResponDaftarPerangkat[]
|
||||||
> {
|
> {
|
||||||
return await invoke<SBlueclasResponDaftarPerangkat[]>(
|
return await invoke<SBlueclasResponDaftarPerangkat[]>(
|
||||||
"plugin:bluclas|daftar_perangkat",
|
"plugin:bluclas|daftar_perangkat",
|
||||||
).then((r) => (r.value ? r.value : null));
|
).then((res: SBlueclasResponDaftarPerangkat[]) => res);
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function kirim(value: SBlueclasMuatanKirim): Promise<null> {
|
export async function kirim(value: SBlueclasMuatanKirim): Promise<null> {
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@segubi/tauri-plugin-bluclas-api",
|
"name": "@segubi/tauri-plugin-bluclas-api",
|
||||||
"version": "0.1.0",
|
"version": "0.1.1",
|
||||||
"author": "Rizky Denianto",
|
"author": "Rizky Denianto",
|
||||||
"description": "",
|
"description": "",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
|
|||||||
+1
-1
@@ -5,7 +5,7 @@ use crate::Result;
|
|||||||
use crate::models::*;
|
use crate::models::*;
|
||||||
|
|
||||||
#[command]
|
#[command]
|
||||||
pub(crate) async fn cek_izin<R: Runtime>(app: AppHandle<R>) -> Result<bool> {
|
pub(crate) async fn cek_izin<R: Runtime>(app: AppHandle<R>) -> Result<String> {
|
||||||
return app.bluclas().cek_izin();
|
return app.bluclas().cek_izin();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -14,8 +14,8 @@ pub fn init<R: Runtime, C: DeserializeOwned>(
|
|||||||
pub struct Bluclas<R: Runtime>(AppHandle<R>);
|
pub struct Bluclas<R: Runtime>(AppHandle<R>);
|
||||||
|
|
||||||
impl<R: Runtime> Bluclas<R> {
|
impl<R: Runtime> Bluclas<R> {
|
||||||
pub fn cek_izin(&self) -> crate::Result<bool> {
|
pub fn cek_izin(&self) -> crate::Result<String> {
|
||||||
return Ok(false);
|
return Ok(String::new());
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn minta_izin(&self) -> crate::Result<()> {
|
pub fn minta_izin(&self) -> crate::Result<()> {
|
||||||
|
|||||||
+1
-1
@@ -25,7 +25,7 @@ pub fn init<R: Runtime, C: DeserializeOwned>(
|
|||||||
pub struct Bluclas<R: Runtime>(PluginHandle<R>);
|
pub struct Bluclas<R: Runtime>(PluginHandle<R>);
|
||||||
|
|
||||||
impl<R: Runtime> Bluclas<R> {
|
impl<R: Runtime> Bluclas<R> {
|
||||||
pub fn cek_izin(&self) -> crate::Result<bool> {
|
pub fn cek_izin(&self) -> crate::Result<String> {
|
||||||
return self
|
return self
|
||||||
.0
|
.0
|
||||||
.run_mobile_plugin("checkPermissions", ())
|
.run_mobile_plugin("checkPermissions", ())
|
||||||
|
|||||||
Reference in new issue
Block a user