refactor, go work

This commit is contained in:
ctengiz
2024-03-25 11:30:06 +03:00
parent e78ff14861
commit 1f62906e95
47 changed files with 40 additions and 241 deletions

View File

@@ -0,0 +1,36 @@
<template>
<div class="container d-flex justify-content-center align-items-center" style="height: 100vh;">
<form @submit.prevent="submitForm">
<div class="mb-3">
<button type="button" class="btn btn-primary" @click="openFileDialog">
<b-icon-file-earmark-excel />
Dosya Seç
</button>
</div>
</form>
</div>
</template>
<script>
import {ClaimFile} from "../../bindings/main/BotService.js";
export default {
methods: {
openFileDialog() {
ClaimFile().then((resultValue) => {
let value = resultValue;
if(value != '')
{
alert("Dosya Seçildi")
}
}).catch((err) => {
alert("Dosya Seçilemedi")
console.log(err);
});
}
}
};
</script>
<style>
/* Add custom styles here if needed */
</style>

View File

@@ -0,0 +1,78 @@
<template>
<div class="login">
<h2 class="mb-4">Luca Girişi</h2>
<form @submit.prevent="login">
<div class="form-group">
<label for="username">Kullanıcı Adı:</label>
<input type="text" id="username" class="form-control" v-model="username" required>
</div>
<div class="form-group">
<label for="password">Şifre:</label>
<input type="password" id="password" class="form-control" v-model="password" required>
</div>
<button style="margin-top: 15px;" type="submit" class="btn btn-primary">Login</button>
</form>
</div>
</template>
<script>
import {Login} from "../../bindings/main/LoginService.js";
export default {
data() {
return {
username: '',
password: ''
};
},
methods: {
login() {
let that = this
Login(this.username, this.password).then((resultValue) => {
let value = resultValue;
console.log("entered")
if(value.LoggedIn)
{
that.$router.push({ name: 'Dashboard' });
}
}).catch((err) => {
console.log(err);
});
}
}
};
</script>
<!--
<script setup>
import { ref, onMounted } from 'vue'
import {Login} from "../../bindings/main/LoginService";
import {Events} from "@wailsio/runtime";
const name = ref('')
const result = ref('Please enter your name below 👇')
const time = ref('Listening for Time event...')
const doLogin = () => {
let localName = name.value;
if (!localName) {
localName = 'anonymous';
}
Login(localName).then((resultValue) => {
result.value = resultValue;
}).catch((err) => {
console.log(err);
});
}
onMounted(() => {
Events.On('time', (timeValue) => {
time.value = timeValue.data;
});
})
defineProps({
msg: String,
})
</script> -->