fix: move search from header to footer - fixed #2033
This commit is contained in:
@@ -168,6 +168,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<AppShortcuts :show="showShortcuts" @close="showShortcuts = false" />
|
<AppShortcuts :show="showShortcuts" @close="showShortcuts = false" />
|
||||||
<AppShare :show="showShare" @hide-modal="showShare = false" />
|
<AppShare :show="showShare" @hide-modal="showShare = false" />
|
||||||
|
<AppPowerSearch :show="showSearch" @hide-modal="showSearch = false" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -181,6 +182,7 @@ import { useI18n } from "~/helpers/utils/composables"
|
|||||||
const t = useI18n()
|
const t = useI18n()
|
||||||
const showShortcuts = ref(false)
|
const showShortcuts = ref(false)
|
||||||
const showShare = ref(false)
|
const showShare = ref(false)
|
||||||
|
const showSearch = ref(false)
|
||||||
|
|
||||||
defineActionHandler("flyouts.keybinds.toggle", () => {
|
defineActionHandler("flyouts.keybinds.toggle", () => {
|
||||||
showShortcuts.value = !showShortcuts.value
|
showShortcuts.value = !showShortcuts.value
|
||||||
@@ -190,6 +192,10 @@ defineActionHandler("modals.share.toggle", () => {
|
|||||||
showShare.value = !showShare.value
|
showShare.value = !showShare.value
|
||||||
})
|
})
|
||||||
|
|
||||||
|
defineActionHandler("modals.search.toggle", () => {
|
||||||
|
showSearch.value = !showSearch.value
|
||||||
|
})
|
||||||
|
|
||||||
const EXPAND_NAVIGATION = useSetting("EXPAND_NAVIGATION")
|
const EXPAND_NAVIGATION = useSetting("EXPAND_NAVIGATION")
|
||||||
const SIDEBAR = useSetting("SIDEBAR")
|
const SIDEBAR = useSetting("SIDEBAR")
|
||||||
const ZEN_MODE = useSetting("ZEN_MODE")
|
const ZEN_MODE = useSetting("ZEN_MODE")
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
:title="`${t('app.search')} <kbd>/</kbd>`"
|
:title="`${t('app.search')} <kbd>/</kbd>`"
|
||||||
svg="search"
|
svg="search"
|
||||||
class="rounded hover:bg-primaryDark focus-visible:bg-primaryDark"
|
class="rounded hover:bg-primaryDark focus-visible:bg-primaryDark"
|
||||||
@click.native="showSearch = true"
|
@click.native="invokeAction('modals.search.toggle')"
|
||||||
/>
|
/>
|
||||||
<ButtonSecondary
|
<ButtonSecondary
|
||||||
v-tippy="{ theme: 'tooltip' }"
|
v-tippy="{ theme: 'tooltip' }"
|
||||||
@@ -124,7 +124,6 @@
|
|||||||
<AppAnnouncement v-if="!isOnLine" />
|
<AppAnnouncement v-if="!isOnLine" />
|
||||||
<FirebaseLogin :show="showLogin" @hide-modal="showLogin = false" />
|
<FirebaseLogin :show="showLogin" @hide-modal="showLogin = false" />
|
||||||
<AppSupport :show="showSupport" @hide-modal="showSupport = false" />
|
<AppSupport :show="showSupport" @hide-modal="showSupport = false" />
|
||||||
<AppPowerSearch :show="showSearch" @hide-modal="showSearch = false" />
|
|
||||||
<TeamsModal :show="showTeamsModal" @hide-modal="showTeamsModal = false" />
|
<TeamsModal :show="showTeamsModal" @hide-modal="showTeamsModal = false" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -139,7 +138,7 @@ import {
|
|||||||
useI18n,
|
useI18n,
|
||||||
useToast,
|
useToast,
|
||||||
} from "~/helpers/utils/composables"
|
} from "~/helpers/utils/composables"
|
||||||
import { defineActionHandler } from "~/helpers/actions"
|
import { defineActionHandler, invokeAction } from "~/helpers/actions"
|
||||||
|
|
||||||
const t = useI18n()
|
const t = useI18n()
|
||||||
|
|
||||||
@@ -153,7 +152,6 @@ const toast = useToast()
|
|||||||
const showInstallPrompt = ref(() => Promise.resolve()) // Async no-op till it is initialized
|
const showInstallPrompt = ref(() => Promise.resolve()) // Async no-op till it is initialized
|
||||||
|
|
||||||
const showSupport = ref(false)
|
const showSupport = ref(false)
|
||||||
const showSearch = ref(false)
|
|
||||||
const showLogin = ref(false)
|
const showLogin = ref(false)
|
||||||
const showTeamsModal = ref(false)
|
const showTeamsModal = ref(false)
|
||||||
|
|
||||||
@@ -164,9 +162,6 @@ const currentUser = useReadonlyStream(probableUser$, null)
|
|||||||
defineActionHandler("modals.support.toggle", () => {
|
defineActionHandler("modals.support.toggle", () => {
|
||||||
showSupport.value = !showSupport.value
|
showSupport.value = !showSupport.value
|
||||||
})
|
})
|
||||||
defineActionHandler("modals.search.toggle", () => {
|
|
||||||
showSearch.value = !showSearch.value
|
|
||||||
})
|
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
window.addEventListener("online", () => {
|
window.addEventListener("online", () => {
|
||||||
|
|||||||
@@ -15,6 +15,10 @@
|
|||||||
</label>
|
</label>
|
||||||
<div class="flex">
|
<div class="flex">
|
||||||
<ButtonSecondary
|
<ButtonSecondary
|
||||||
|
v-tippy="{ theme: 'tooltip', delay: [500, 20] }"
|
||||||
|
:title="`${t(
|
||||||
|
'request.run'
|
||||||
|
)} <kbd>${getSpecialKey()}</kbd><kbd>G</kbd>`"
|
||||||
:label="`${t('request.run')}`"
|
:label="`${t('request.run')}`"
|
||||||
svg="play"
|
svg="play"
|
||||||
class="rounded-none !text-accent !hover:text-accentDark"
|
class="rounded-none !text-accent !hover:text-accentDark"
|
||||||
@@ -22,6 +26,10 @@
|
|||||||
/>
|
/>
|
||||||
<ButtonSecondary
|
<ButtonSecondary
|
||||||
ref="saveRequest"
|
ref="saveRequest"
|
||||||
|
v-tippy="{ theme: 'tooltip', delay: [500, 20] }"
|
||||||
|
:title="`${t(
|
||||||
|
'request.save'
|
||||||
|
)} <kbd>${getSpecialKey()}</kbd><kbd>S</kbd>`"
|
||||||
:label="`${t('request.save')}`"
|
:label="`${t('request.save')}`"
|
||||||
svg="save"
|
svg="save"
|
||||||
class="rounded-none"
|
class="rounded-none"
|
||||||
@@ -296,6 +304,8 @@ import { useCodemirror } from "~/helpers/editor/codemirror"
|
|||||||
import jsonLinter from "~/helpers/editor/linting/json"
|
import jsonLinter from "~/helpers/editor/linting/json"
|
||||||
import { createGQLQueryLinter } from "~/helpers/editor/linting/gqlQuery"
|
import { createGQLQueryLinter } from "~/helpers/editor/linting/gqlQuery"
|
||||||
import queryCompleter from "~/helpers/editor/completion/gqlQuery"
|
import queryCompleter from "~/helpers/editor/completion/gqlQuery"
|
||||||
|
import { defineActionHandler } from "~/helpers/actions"
|
||||||
|
import { getPlatformSpecialKey as getSpecialKey } from "~/helpers/platformutils"
|
||||||
|
|
||||||
const t = useI18n()
|
const t = useI18n()
|
||||||
|
|
||||||
@@ -576,4 +586,8 @@ const clearGQLQuery = () => {
|
|||||||
const clearGQLVariables = () => {
|
const clearGQLVariables = () => {
|
||||||
variableString.value = ""
|
variableString.value = ""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
defineActionHandler("request.send-cancel", runQuery)
|
||||||
|
defineActionHandler("request.save", saveRequest)
|
||||||
|
defineActionHandler("request.reset", clearGQLQuery)
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ interface TeamNameBrand {
|
|||||||
|
|
||||||
export const TeamNameCodec = t.brand(
|
export const TeamNameCodec = t.brand(
|
||||||
t.string,
|
t.string,
|
||||||
(x): x is t.Branded<string, TeamNameBrand> => x.trim().length > 6,
|
(x): x is t.Branded<string, TeamNameBrand> => x.trim().length >= 6,
|
||||||
"TeamName"
|
"TeamName"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user