refactor: cleanup

This commit is contained in:
liyasthomas
2021-07-30 13:52:43 +05:30
parent 2891da3c74
commit 203b45f4d5
18 changed files with 139 additions and 274 deletions

View File

@@ -1,38 +0,0 @@
<template>
<div>
<ButtonPrimary
v-if="currentUser === null"
label="Get Started"
@click.native="showLogin = true"
/>
<div v-if="currentBackendUser && currentBackendUser.eaInvited">
<Teams />
</div>
{{ hideRightPane }}
<div v-if="!hideRightPane">hide this thingy</div>
<FirebaseLogin :show="showLogin" @hide-modal="showLogin = false" />
</div>
</template>
<script>
import { currentUser$ } from "~/helpers/fb/auth"
import { currentUserInfo$ } from "~/helpers/teams/BackendUserInfo"
export default {
props: { hideRightPane: { type: Boolean, default: false } },
data() {
return {
showLogin: false,
currentBackendUser: null,
}
},
subscriptions() {
return {
currentUser: currentUser$,
// Teams feature flag
currentBackendUser: currentUserInfo$,
}
},
}
</script>

View File

@@ -88,6 +88,9 @@
</div>
</div>
</fieldset>
<fieldset v-if="currentBackendUser && currentBackendUser.eaInvited">
<Teams />
</fieldset>
</div>
</div>
</div>
@@ -338,6 +341,7 @@
<script lang="ts">
import { defineComponent } from "@nuxtjs/composition-api"
import { currentUserInfo$ } from "~/helpers/teams/BackendUserInfo"
import {
hasExtensionInstalled,
hasChromeExtensionInstalled,
@@ -373,6 +377,10 @@ export default defineComponent({
LEFT_SIDEBAR: useSetting("LEFT_SIDEBAR"),
ZEN_MODE: useSetting("ZEN_MODE"),
currentUser: useReadonlyStream(currentUser$, currentUser$.value),
currentBackendUser: useReadonlyStream(
currentUserInfo$,
currentUserInfo$.value
),
}
},
data() {