console.log('authenticating...');
- backgroundMitt.on('auth-res', (res: string) => {
+ backgroundMitt.once('auth-res', (res: string) => {
if (res === 'locked') {
reject(res);
} else {
auth = true;
+ console.log(res);
resolve(res);
}
const routes: Array<RouteRecordRaw> = [
{
path: "/",
- name: "splash",
- component: Splash,
- meta: { requiresAuth: false },
- },
- {
- path: "/home",
name: "home",
component: Home,
meta: { requiresAuth: true },
},
+ {
+ path: "/splash",
+ name: "splash",
+ component: Splash,
+ meta: { requiresAuth: false },
+ },
{
path: "/login",
name: "login",
<label for="checkbox">Remember Me</label> -->
<!-- submit button; position: fixed -->
- <button class="button" @click="submit">Submit</button>
+ <button class="button" @click.prevent="submit">Submit</button>
<!-- back to login button: position: fixed -->
- <button class="button2" @click="switchView">Create an account</button>
+ <button class="button2" @click.prevent="switchView">Create an account</button>
</form>
</template>
</div>
<!-- submit button; position: fixed -->
- <button class="button" @click="submit">Submit</button>
+ <button class="button" @click.prevent="submit">Submit</button>
<!-- back to login button: position: fixed -->
- <button class="button2" @click="switchView">Back to login</button>
+ <button class="button2" @click.prevent="switchView">Back to login</button>
</div>
</template>
<script lang="ts">
import { defineComponent } from "vue";
-import SplashComponent from "@/components/splash/index.vue"
export default defineComponent({
name: "Splash",
- components: { SplashComponent },
});