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