This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { fileURLToPath } from 'node:url' | |
import { config } from 'dotenv' | |
const nodeEnviroment = process.env.NODE_ENV // 'development' or 'production' | |
const productionOnly = nodeEnviroment === 'production' | |
// Load all environment variables from .env files | |
// config({ path: `.env.production` }) | |
config({ path: `.env.${nodeEnviroment}` }) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* eslint-env node */ | |
// require('@rushstack/eslint-patch/modern-module-resolution') | |
module.exports = { | |
root: true, | |
extends: [ | |
'./.eslintrc-auto-import.json', | |
'plugin:vue/vue3-strongly-recommended', | |
'plugin:vuetify/base', | |
'eslint:recommended', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<div> | |
<SettingsCard :loading="loading"> | |
<VRow> | |
<VCol> | |
<FormSubtitle subtitle="Avatar" /> | |
<div class="text-body-2"> This is your avatar. </div> | |
<div class="text-body-2"> | |
Click on the avatar to upload a custom one from your files.</div | |
> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Custom Vue 3 composition function for handling image uploads. | |
* | |
* @returns {{ | |
* selectedFile: Ref<null | File>, | |
* base64: Ref<null | string>, | |
* handleFileChange: (event: Event) => void, | |
* displayImage: ComputedRef<null | string> | |
* }} | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export function useShake() { | |
const shake = refAutoReset('', 1000) | |
function startShaking() { | |
shake.value = true | |
} | |
const isShaking = computed(() => { | |
return shake.value && 'shake' | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// src/directives/shakeDirective.js | |
export const shakeDirective = { | |
install(app) { | |
// Create the styles dynamically | |
const styleTag = document.createElement('style') | |
styleTag.innerHTML = ` | |
.shake { | |
animation: shake 1s cubic-bezier(0.36, 0.07, 0.19, 0.97) both; | |
transform: translate3d(0, 0, 0); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<div class="text-center"> | |
<VCardText> | |
<WelcomeTitleSubtitle subtitle="Where would you prefer to work?" title="Geographics" /> | |
</VCardText> | |
<VRow> | |
<VCol cols="12"> | |
<div class="mx-[1px]"> | |
<VAutocomplete |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "vue-sienna", | |
"version": "0.0.0", | |
"private": true, | |
"scripts": { | |
"dev": "vite --open", | |
"build": "vite build", | |
"build:preview": "vite build && vite preview --open", | |
"preview": "vite preview" | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* firestore_add_field_to_all_docs_in_collection.js | |
* | |
* This script is assumed to live in an existing Javascript project that has its own package.json. | |
* I store this script in <PROJECT_ROOT>/tools/cleanup/. | |
* | |
* To use: | |
* 1. Import the 'firebase' and 'esm' NPM modules to your project (Run the command: `npm install firebase esm`) | |
* 2. Edit the data for USER1 and FIREBASE_CONFIG, then adjust parameters in `main` for the call to `visitDocs`. | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Utilities | |
import { make } from 'vuex-pathify'; | |
import { isEmpty, capitalize, startCase } from 'lodash'; | |
import { doc, setDoc, updateDoc, serverTimestamp } from 'firebase/firestore'; | |
import { | |
EmailAuthProvider, | |
reauthenticateWithCredential, | |
signInWithEmailAndPassword, | |
createUserWithEmailAndPassword, | |
signOut, |