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

@@ -23,9 +23,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,
}"
@@ -33,9 +33,9 @@
<button
v-close-popover
:disabled="
!fb.currentUser
!currentUser
? true
: fb.currentUser.provider !== 'github.com'
: currentUser.provider !== 'github.com'
? true
: false
"
@@ -102,7 +102,7 @@
</template>
<script>
import { fb } from "~/helpers/fb"
import { currentUser$ } from "~/helpers/fb/auth"
import {
environments$,
replaceEnvironments,
@@ -113,14 +113,10 @@ export default {
props: {
show: Boolean,
},
data() {
return {
fb,
}
},
subscriptions() {
return {
environments: environments$,
currentUser: currentUser$,
}
},
computed: {
@@ -142,7 +138,7 @@ export default {
},
{
headers: {
Authorization: `token ${fb.currentUser.accessToken}`,
Authorization: `token ${this.currentUser.accessToken}`,
Accept: "application/vnd.github.v3+json",
},
}