├── .browserslistrc ├── .gitignore ├── README.md ├── babel.config.js ├── package-lock.json ├── package.json ├── public ├── favicon.ico └── index.html └── src ├── App.vue ├── assets ├── firebase.svg └── logo.png ├── components ├── Countdown.vue ├── Footer.vue └── HelloWorld.vue ├── data └── db.json ├── firebase.js ├── main.js ├── router └── index.js └── views ├── About.vue ├── Home.vue └── Shortlink.vue /.browserslistrc: -------------------------------------------------------------------------------- 1 | > 1% 2 | last 2 versions 3 | not dead 4 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | /dist 4 | 5 | 6 | # local env files 7 | .env.local 8 | .env.*.local 9 | 10 | # Log files 11 | npm-debug.log* 12 | yarn-debug.log* 13 | yarn-error.log* 14 | pnpm-debug.log* 15 | 16 | # Editor directories and files 17 | .idea 18 | .vscode 19 | *.suo 20 | *.ntvs* 21 | *.njsproj 22 | *.sln 23 | *.sw? 24 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # vue-shortlink 2 | 3 | ## Project setup 4 | ``` 5 | npm install 6 | ``` 7 | 8 | ### Compiles and hot-reloads for development 9 | ``` 10 | npm run serve 11 | ``` 12 | 13 | ### Compiles and minifies for production 14 | ``` 15 | npm run build 16 | ``` 17 | 18 | ### Customize configuration 19 | See [Configuration Reference](https://cli.vuejs.org/config/). 20 | -------------------------------------------------------------------------------- /babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: [ 3 | '@vue/cli-plugin-babel/preset' 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vue-shortlink", 3 | "version": "1.1.0", 4 | "private": true, 5 | "scripts": { 6 | "serve": "vue-cli-service serve", 7 | "build": "vue-cli-service build" 8 | }, 9 | "dependencies": { 10 | "@fortawesome/fontawesome-free": "^5.15.4", 11 | "@fortawesome/vue-fontawesome": "^3.0.0-5", 12 | "@popperjs/core": "^2.11.2", 13 | "bootstrap": "^5.1.3", 14 | "clipboard": "^2.0.10", 15 | "core-js": "^3.6.5", 16 | "firebase": "^9.6.7", 17 | "sha-1": "^1.0.0", 18 | "vue": "^3.0.0", 19 | "vue-router": "^4.0.0-0", 20 | "vue-toast-notification": "^3.0.0" 21 | }, 22 | "devDependencies": { 23 | "@vue/cli-plugin-babel": "~4.5.0", 24 | "@vue/cli-plugin-router": "~4.5.0", 25 | "@vue/cli-service": "~4.5.0", 26 | "@vue/compiler-sfc": "^3.0.0" 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dimmmslots/bing-qi-link/62a2b168b0096beb69b9098a61f1c2b802c6cc20/public/favicon.ico -------------------------------------------------------------------------------- /public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Bing Qi Link - URL Shortener 9 | 10 | 11 | 14 |
15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /src/App.vue: -------------------------------------------------------------------------------- 1 | 10 | 11 | 36 | -------------------------------------------------------------------------------- /src/assets/firebase.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | Layer 1 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /src/assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dimmmslots/bing-qi-link/62a2b168b0096beb69b9098a61f1c2b802c6cc20/src/assets/logo.png -------------------------------------------------------------------------------- /src/components/Countdown.vue: -------------------------------------------------------------------------------- 1 | 2 | 7 | -------------------------------------------------------------------------------- /src/components/Footer.vue: -------------------------------------------------------------------------------- 1 | 36 | -------------------------------------------------------------------------------- /src/components/HelloWorld.vue: -------------------------------------------------------------------------------- 1 | 32 | 33 | 41 | 42 | 43 | 59 | -------------------------------------------------------------------------------- /src/data/db.json: -------------------------------------------------------------------------------- 1 | { 2 | "link" : [ 3 | { 4 | "hash" : "7763af", 5 | "url" : "https://github.com/dimmmslots" 6 | } 7 | ] 8 | } -------------------------------------------------------------------------------- /src/firebase.js: -------------------------------------------------------------------------------- 1 | import {initializeApp} from 'firebase/app' 2 | import { 3 | getFirestore, 4 | collection, 5 | 6 | } from 'firebase/firestore' 7 | 8 | const firebaseConfig = { 9 | apiKey: "AIzaSyAWyaert4lXg1t-FEetr8iJ8uJuXObQTlw", 10 | authDomain: "bing-qi-link.firebaseapp.com", 11 | projectId: "bing-qi-link", 12 | storageBucket: "bing-qi-link.appspot.com", 13 | messagingSenderId: "1059977078582", 14 | appId: "1:1059977078582:web:d994cdff17fbee23ab3597" 15 | }; 16 | 17 | // Initialize Firebase 18 | const app = initializeApp(firebaseConfig); 19 | 20 | export const db = getFirestore() 21 | 22 | // collection ref 23 | export const colRef = collection(db, 'short') -------------------------------------------------------------------------------- /src/main.js: -------------------------------------------------------------------------------- 1 | import { createApp } from "vue"; 2 | import App from "./App.vue"; 3 | import router from "./router"; 4 | import "bootstrap"; 5 | import "@fortawesome/fontawesome-free/css/all.css"; 6 | import "@fortawesome/fontawesome-free/js/all.js"; 7 | import "bootstrap/dist/css/bootstrap.min.css"; 8 | import "clipboard/dist/clipboard.min.js"; 9 | import VueToast from "vue-toast-notification"; 10 | import "vue-toast-notification/dist/theme-sugar.css"; 11 | 12 | createApp(App).use(router).use(VueToast).mount("#app"); 13 | -------------------------------------------------------------------------------- /src/router/index.js: -------------------------------------------------------------------------------- 1 | import { createRouter, createWebHistory } from 'vue-router' 2 | import Home from '../views/Home.vue' 3 | 4 | const routes = [ 5 | { 6 | path: '/', 7 | name: 'Home', 8 | component: Home 9 | }, 10 | { 11 | path: '/about', 12 | name: 'About', 13 | // route level code-splitting 14 | // this generates a separate chunk (about.[hash].js) for this route 15 | // which is lazy-loaded when the route is visited. 16 | component: () => import(/* webpackChunkName: "about" */ '../views/About.vue') 17 | }, 18 | { 19 | path: '/key/:hash', 20 | name: 'Bitly', 21 | component: () => import('../views/Shortlink.vue') 22 | } 23 | ] 24 | 25 | const router = createRouter({ 26 | history: createWebHistory(process.env.BASE_URL), 27 | routes 28 | }) 29 | 30 | export default router 31 | -------------------------------------------------------------------------------- /src/views/About.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | -------------------------------------------------------------------------------- /src/views/Home.vue: -------------------------------------------------------------------------------- 1 | 92 | 93 | 163 | 164 | 219 | -------------------------------------------------------------------------------- /src/views/Shortlink.vue: -------------------------------------------------------------------------------- 1 | 74 | 75 | 127 | 128 | 147 | --------------------------------------------------------------------------------