Skip to content

Instantly share code, notes, and snippets.

@TheDiligentDev
TheDiligentDev / Tab3.vue
Created January 28, 2021 13:51
Ionic Photo Sharing App - Tab3
<template>
<ion-page>
<ion-header>
<ion-toolbar>
<ion-title>Map</ion-title>
</ion-toolbar>
</ion-header>
<ion-content :fullscreen="true">
<div ref="mapRef" id="map"></div>
</ion-content>
@TheDiligentDev
TheDiligentDev / Tab3.vue
Created January 28, 2021 13:46
Ionic Photo Sharing App - Map script tag
<script lang="ts">
// @ts-nocheck
/* eslint-disable */
import { ref, onMounted } from "vue";
import { db, auth } from "../main";
import {
IonPage,
IonHeader,
@TheDiligentDev
TheDiligentDev / Tab2.vue
Last active January 28, 2021 13:50
Ionic Photo Sharing App - Tab2.vue
<template>
<ion-page>
<ion-header>
<ion-toolbar>
<ion-title>Images</ion-title>
</ion-toolbar>
</ion-header>
<ion-content v-if="loading">
<div class="center">
<ion-spinner color="primary"></ion-spinner>
@TheDiligentDev
TheDiligentDev / Tabs.vue
Created January 27, 2021 12:39
Ionic Photo Sharing App - Tabs.vue
<template>
<ion-page>
<ion-tabs>
<ion-tab-bar slot="bottom">
<ion-tab-button tab="tab1" href="/tabs/tab1">
<ion-icon :icon="cameraOutline" />
<ion-label>Camera</ion-label>
</ion-tab-button>
<ion-tab-button tab="tab2" href="/tabs/tab2">
@TheDiligentDev
TheDiligentDev / Tab1.vue
Last active January 3, 2021 14:21
Tab 1 - Photo Sharing App
<template>
<ion-page>
<ion-header>
<ion-toolbar>
<ion-title>Camera</ion-title>
</ion-toolbar>
</ion-header>
<ion-content :fullscreen="true">
<div class="center">
<ion-button size="large" fill="solid" @click="takePicture">
@TheDiligentDev
TheDiligentDev / Tabs.vue
Created December 31, 2020 13:15
Photo Sharing App - Tab 1 Icon and Name
<template>
<ion-page>
<ion-tabs>
<ion-tab-bar slot="bottom">
<ion-tab-button tab="tab1" href="/tabs/tab1">
<ion-icon :icon="cameraOutline" />
<ion-label>Camera</ion-label>
</ion-tab-button>
<ion-tab-button tab="tab2" href="/tabs/tab2">
@TheDiligentDev
TheDiligentDev / index.ts
Created December 23, 2020 14:57
Photo Sharing - Router Guard
import { createRouter, createWebHistory } from '@ionic/vue-router';
import { RouteRecordRaw, RouteLocationNormalized, NavigationGuardNext } from 'vue-router';
import Tabs from '../views/Tabs.vue'
import { auth } from '../main'
const guard = (to: RouteLocationNormalized, from: RouteLocationNormalized, next: NavigationGuardNext) => {
try {
if (auth.currentUser?.uid) {
next();
@TheDiligentDev
TheDiligentDev / Authentication.vue
Last active December 19, 2020 20:47
Photo sharing app - Authentication.vue
<template>
<ion-page>
<ion-header>
<ion-toolbar>
<ion-title>Photo Share</ion-title>
</ion-toolbar>
</ion-header>
<ion-content :fullscreen="true">
<ion-card>
@TheDiligentDev
TheDiligentDev / Tab3.vue
Last active December 2, 2020 19:00
Ionic Cocktail App - Tab 3
<template>
<ion-page>
<ion-header>
<ion-toolbar>
<ion-title>Search</ion-title>
</ion-toolbar>
<ion-toolbar>
<ion-searchbar
debounce="500"
:onIonChange="(e) => fetchSearchResults(e.detail.value)"
@TheDiligentDev
TheDiligentDev / Drink.vue
Created November 28, 2020 14:34
Ionic Cocktail App - Drink.vue
<template>
<ion-page>
<ion-header>
<ion-toolbar>
<ion-buttons slot="start">
<ion-back-button></ion-back-button>
</ion-buttons>
<ion-title>{{state.drink.strDrink}}</ion-title>
</ion-toolbar>
</ion-header>