Compare commits
No commits in common. "c63075a88db791884f83daf439bc899f14b4c642" and "98cd757666b339499c44b8c4170af61b27836833" have entirely different histories.
c63075a88d
...
98cd757666
|
|
@ -10,21 +10,21 @@ interface Props {
|
||||||
}
|
}
|
||||||
|
|
||||||
const props = defineProps<Props>(); // Define props for the component
|
const props = defineProps<Props>(); // Define props for the component
|
||||||
// const { value, errorMessage, ...fieldAttrs } = useField(props.name); // Setup field logic using vee-validate
|
const { value, errorMessage, ...fieldAttrs } = useField(props.name); // Setup field logic using vee-validate
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<ion-item>
|
<ion-item>
|
||||||
<Field name="name">
|
<Field name="name">
|
||||||
<!-- <IonInput-->
|
<IonInput
|
||||||
<!-- :label="label"-->
|
:label="label"
|
||||||
<!-- :label-placement="labelPlacement || 'stacked'"-->
|
:label-placement="labelPlacement || 'stacked'"
|
||||||
<!-- v-model="value"-->
|
v-model="value"
|
||||||
<!-- v-bind="fieldAttrs"-->
|
v-bind="fieldAttrs"
|
||||||
<!-- :type="type || 'text'"-->
|
:type="type || 'text'"
|
||||||
<!-- >-->
|
>
|
||||||
<!-- <small v-if="errorMessage" class="error-message">{{ errorMessage }}</small>-->
|
<small v-if="errorMessage" class="error-message">{{ errorMessage }}</small>
|
||||||
<!-- </IonInput>-->
|
</IonInput>
|
||||||
</Field>
|
</Field>
|
||||||
</ion-item>
|
</ion-item>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import { createRouter, createWebHistory } from '@ionic/vue-router';
|
import { createRouter, createWebHistory } from '@ionic/vue-router';
|
||||||
import { useStore } from 'vuex'
|
import { useStore } from 'vuex'
|
||||||
import { RouteRecordRaw } from 'vue-router';
|
import { RouteRecordRaw } from 'vue-router';
|
||||||
import PlayerListVuew from '../views/PlayerListView.vue'
|
import PlayerList from '../views/PlayerList.vue'
|
||||||
import PlayerView from '../views/PlayerView.vue'
|
import PlayerView from '../views/PlayerView.vue'
|
||||||
import LoginView from '../views/LoginView.vue'
|
import LoginView from '../views/LoginView.vue'
|
||||||
import HomeView from '../views/HomeView.vue'
|
import HomeView from '../views/HomeView.vue'
|
||||||
|
|
@ -18,7 +18,7 @@ const routes: Array<RouteRecordRaw> = [
|
||||||
{ path: '/setup', component: SetupView },
|
{ path: '/setup', component: SetupView },
|
||||||
{ path: '/home', component: HomeView },
|
{ path: '/home', component: HomeView },
|
||||||
{ path: '/profile', component: ProfileView },
|
{ path: '/profile', component: ProfileView },
|
||||||
{ path: '/players', component: PlayerListVuew },
|
{ path: '/players', component: PlayerList },
|
||||||
{ path: '/profile/:id', component: ProfileView },
|
{ path: '/profile/:id', component: ProfileView },
|
||||||
{ path: '/bullpen', component: BullpenView },
|
{ path: '/bullpen', component: BullpenView },
|
||||||
{ path: '/stats', component: BullpenListView },
|
{ path: '/stats', component: BullpenListView },
|
||||||
|
|
|
||||||
|
|
@ -53,7 +53,6 @@ onMounted(() => {
|
||||||
});
|
});
|
||||||
|
|
||||||
const submit = handleSubmit((values, { resetForm }) => {
|
const submit = handleSubmit((values, { resetForm }) => {
|
||||||
loginError.value = '';
|
|
||||||
store.dispatch('auth/login', {
|
store.dispatch('auth/login', {
|
||||||
email: values.email,
|
email: values.email,
|
||||||
password: values.password,
|
password: values.password,
|
||||||
|
|
@ -84,9 +83,9 @@ const onLogin = () => {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// const changeServer = () => {
|
const changeServer = () => {
|
||||||
// router.push({ path: '/setup'});
|
router.push({ path: '/setup'});
|
||||||
// }
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
@ -140,7 +139,7 @@ const onLogin = () => {
|
||||||
</ion-item>
|
</ion-item>
|
||||||
<ion-button expand="block" class="ion-margin-top" type="submit">Login</ion-button>
|
<ion-button expand="block" class="ion-margin-top" type="submit">Login</ion-button>
|
||||||
</form>
|
</form>
|
||||||
<p v-if="loginError" class="error-message">{{ loginError }}</p>
|
<p v-if="loginError" class="error-text">{{ loginError }}</p>
|
||||||
</ion-card-content>
|
</ion-card-content>
|
||||||
</ion-card>
|
</ion-card>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -63,6 +63,16 @@ ion-label strong {
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#container {
|
||||||
|
text-align: center;
|
||||||
|
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
top: 50%;
|
||||||
|
transform: translateY(-50%);
|
||||||
|
}
|
||||||
|
|
||||||
#container strong {
|
#container strong {
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
line-height: 26px;
|
line-height: 26px;
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
import { mount } from '@vue/test-utils'
|
import { mount } from '@vue/test-utils'
|
||||||
import PlayerListVuew from '../../src/views/PlayerListView.vue'
|
import PlayerList from '../../src/views/PlayerList.vue'
|
||||||
import { describe, expect, test } from 'vitest'
|
import { describe, expect, test } from 'vitest'
|
||||||
|
|
||||||
describe('PlayerListVuew.vue', () => {
|
describe('PlayerList.vue', () => {
|
||||||
test('renders home vue', () => {
|
test('renders home vue', () => {
|
||||||
const wrapper = mount(PlayerListVuew)
|
const wrapper = mount(PlayerList)
|
||||||
expect(wrapper.text()).toMatch('Ready to create an app?')
|
expect(wrapper.text()).toMatch('Ready to create an app?')
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue