Added proper imports
This commit is contained in:
parent
7b21a5996b
commit
34425a8a0c
|
@ -1,3 +1,5 @@
|
|||
import { Auth, LoginResult } from '../interfaces/Auth'
|
||||
|
||||
export class FakeAuth implements Auth {
|
||||
constructor() {}
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import { Client } from 'ldapts'
|
||||
import { Auth, LoginResult } from '../interfaces/Auth'
|
||||
|
||||
export class LdapAuth implements Auth {
|
||||
constructor(
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
type LoginResult = {
|
||||
export type LoginResult = {
|
||||
username: string
|
||||
displayName: string
|
||||
domain: string
|
||||
jwt?: string
|
||||
}
|
||||
|
||||
interface Auth {
|
||||
export interface Auth {
|
||||
login(username: string, password: string): Promise<LoginResult> | LoginResult
|
||||
}
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
<script lang="ts" setup>
|
||||
import { PropType } from 'vue'
|
||||
import { trpc } from '../trpc'
|
||||
import { LoginResult } from '@/server/interfaces/Auth'
|
||||
|
||||
const props = defineProps({
|
||||
loginResult: {
|
||||
|
@ -40,6 +41,7 @@ async function onLogout() {
|
|||
})
|
||||
|
||||
if (success) {
|
||||
alert('Você foi desconectado.')
|
||||
window.location.reload()
|
||||
} else {
|
||||
alert('Não foi possível fazer logout. Tente novamente.')
|
||||
|
|
|
@ -48,6 +48,7 @@
|
|||
color="primary"
|
||||
:variant="'flat'"
|
||||
type="submit"
|
||||
:loading="loading"
|
||||
>
|
||||
Login
|
||||
</v-btn>
|
||||
|
|
|
@ -18,6 +18,7 @@ import IpAlert from '../components/IpAlert.vue'
|
|||
import Logo from '../components/Logo.vue'
|
||||
import LoggedCard from '../components/LoggedCard.vue'
|
||||
import { ref } from 'vue'
|
||||
import { LoginResult } from '@/server/interfaces/Auth'
|
||||
|
||||
const loginResult = ref<LoginResult | null>(null)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user