feat: added developer options to copy user id token (#2204)

Co-authored-by: Andrew Bastin <andrewbastin.k@gmail.com>
This commit is contained in:
Nivedin
2022-03-28 14:14:16 +05:30
committed by GitHub
parent 909d524de5
commit 17f826489f
3 changed files with 114 additions and 2 deletions

View File

@@ -144,7 +144,10 @@
blank
@click.native="options.tippy().hide()"
/>
<div class="flex px-4 py-2 opacity-50">
<div
class="flex px-4 py-2 opacity-50"
@dblclick="showDeveloperOptionModal()"
>
{{ `${t("app.name")} v${$config.clientVersion}` }}
</div>
</div>
@@ -190,6 +193,10 @@
<AppShortcuts :show="showShortcuts" @close="showShortcuts = false" />
<AppShare :show="showShare" @hide-modal="showShare = false" />
<AppPowerSearch :show="showSearch" @hide-modal="showSearch = false" />
<AppDeveloperOptions
:show="showDeveloperOptions"
@hide-modal="showDeveloperOptions = false"
/>
</div>
</template>
@@ -198,11 +205,13 @@ import { ref, watch } from "@nuxtjs/composition-api"
import { defineActionHandler } from "~/helpers/actions"
import { showChat } from "~/helpers/support"
import { useSetting } from "~/newstore/settings"
import { useI18n } from "~/helpers/utils/composables"
import { useI18n, useReadonlyStream } from "~/helpers/utils/composables"
import { currentUser$ } from "~/helpers/fb/auth"
const t = useI18n()
const showShortcuts = ref(false)
const showShare = ref(false)
const showDeveloperOptions = ref(false)
const showSearch = ref(false)
defineActionHandler("flyouts.keybinds.toggle", () => {
@@ -225,6 +234,8 @@ const SIDEBAR_ON_LEFT = useSetting("SIDEBAR_ON_LEFT")
const navigatorShare = !!navigator.share
const currentUser = useReadonlyStream(currentUser$, null)
watch(
() => ZEN_MODE.value,
() => {
@@ -251,6 +262,13 @@ const chatWithUs = () => {
showChat()
}
const showDeveloperOptionModal = () => {
if (currentUser.value) {
showDeveloperOptions.value = true
options.value.tippy().hide()
}
}
// Template refs
const tippyActions = ref<any | null>(null)
const documentation = ref<any | null>(null)