Skip to content

Instantly share code, notes, and snippets.

What the heck do you think my status is?

Scott smolinari

What the heck do you think my status is?
View GitHub Profile
smolinari / db.js
Created Apr 29, 2020
The services/db.js file for the Quasar todo browser extension demo
View db.js
export default {
* This will ask for ALL items from chrome storage and return only the ones we're interested in.
* @param type
getAll (type) {
return this.get(null).then(allItems => {
return allItems.filter(f => f && f.type && f.type === type)
smolinari / content-hooks.js
Created Apr 28, 2020
The Quasar Todo example browser extension content hook file.
View content-hooks.js
iFrame = document.createElement('iframe'),
defaultFrameHeight = '0px',
defaultFrameWidth = '0px'
* Set the height of our iFrame housing our BEX
* @param height
const setIFrameDimensions = (height, width) => {
smolinari / background-hooks.js
Created Apr 28, 2020
The Quasar Todo example browser extension background hook file.
View background-hooks.js
export default function attachBackgroundHooks (bridge, allActiveConnections) {
bridge.on('storage.get', event => {
const payload =
if (payload.key === null) {, r => {
const result = []
// Group the items up into an array to take advantage of the bridge's chunk splitting.
for (const itemKey in r) {
smolinari / manifest.json
Created Apr 27, 2020
Quasar to-do app browser extension example
View manifest.json
"name": "quasar-todo-extension",
"description": "A Quasar web browser extension for bookmarking and adding todos.",
"version": "1.0.0",
"manifest_version": 2,
"icons": {
"16": "icons/icon16x16.png",
"48": "icons/icon48x48.png",
"128": "icons/icon128x128.png"
View TodoToggle.alt2.vue
methods: {
updateCache (store, { data: { toggleTodo } }) {
const id = `TodoItem:${}`
const fragment = queries.toggleTodoFragment
View TodoToggle.alt.vue
<template v-slot="{ mutate, loading, error }">
View TodoToggle.vue
<p v-if="error">There has been an error<br>{{error}}</p>
View TodoList.alt.vue
:query="gql => gql`
query GetTodos {
todos @client {
View ToDoList.vue
<div style="width: 300px">
<q-list bordered separator v-if="todos.length">
<q-item v-for="todo in visibleTodos" :key="">
<Todo :todo="todo" />
<p v-else class="text-center"> Add some tasks and let's get some work done! </p>
View FilterBar.vue
<div class="q-pa-sm text-center">
v-for="(filter, index) in filters"
{{ filter.label }}
You can’t perform that action at this time.