Initial Firebase refactor pass

This commit is contained in:
Andrew Bastin
2021-06-14 00:07:30 -04:00
parent ced2f1b911
commit 85c6932f8f
30 changed files with 979 additions and 1029 deletions

View File

@@ -21,9 +21,9 @@
</div>
<div
v-tooltip.bottom="{
content: !fb.currentUser
content: !currentUser
? $t('login_with_github_to') + $t('create_secret_gist')
: fb.currentUser.provider !== 'github.com'
: currentUser.provider !== 'github.com'
? $t('login_with_github_to') + $t('create_secret_gist')
: null,
}"
@@ -31,9 +31,9 @@
<button
v-close-popover
:disabled="
!fb.currentUser
!currentUser
? true
: fb.currentUser.provider !== 'github.com'
: currentUser.provider !== 'github.com'
? true
: false
"
@@ -100,7 +100,7 @@
</template>
<script>
import { fb } from "~/helpers/fb"
import { currentUser$ } from "~/helpers/fb/auth"
import {
graphqlCollections$,
setGraphqlCollections,
@@ -111,14 +111,10 @@ export default {
props: {
show: Boolean,
},
data() {
return {
fb,
}
},
subscriptions() {
return {
collections: graphqlCollections$,
currentUser: currentUser$,
}
},
computed: {
@@ -140,7 +136,7 @@ export default {
},
{
headers: {
Authorization: `token ${fb.currentUser.accessToken}`,
Authorization: `token ${this.currentUser.accessToken}`,
Accept: "application/vnd.github.v3+json",
},
}