~/Projects/hoppscotch
git clone https://code.lsong.org/hoppscotch
Commit
- Commit
- 9698932bde2ef1019bedc120e4d6f46ff9b9831c
- Author
- liyasthomas <[email protected]>
- Date
- 2021-09-20 21:33:36 +0530 +0530
- Diffstat
packages/hoppscotch-app/components/app/PowerSearch.vue | 6 packages/hoppscotch-app/components/app/Sidenav.vue | 2 packages/hoppscotch-app/components/app/SlideOver.vue | 1 packages/hoppscotch-app/components/app/Support.vue | 1 packages/hoppscotch-app/components/collections/ImportExport.vue | 1 packages/hoppscotch-app/components/collections/graphql/ImportExport.vue | 1 packages/hoppscotch-app/components/environments/ImportExport.vue | 1 packages/hoppscotch-app/components/firebase/Login.vue | 1 packages/hoppscotch-app/components/smart/Modal.vue | 12
refactor(ui): minor ui improvements
diff --git a/packages/hoppscotch-app/components/app/PowerSearch.vue b/packages/hoppscotch-app/components/app/PowerSearch.vue index 05444075593a90f0b9014211d43e8654c4a74ec5..8825d2bb2508804771aa3a881dc9b11b869def30 100644 --- a/packages/hoppscotch-app/components/app/PowerSearch.vue +++ b/packages/hoppscotch-app/components/app/PowerSearch.vue @@ -1,5 +1,11 @@ <template> + <SmartModal + v-if="show" + max-width="sm:max-w-md" + full-width + v-focus <SmartModal v-if="show" full-width @close="$emit('hide-modal')"> + > <template #body> <input id="command" diff --git a/packages/hoppscotch-app/components/app/Sidenav.vue b/packages/hoppscotch-app/components/app/Sidenav.vue index 529c2a824314a181d8ecd0e3e21fa8a0222b1b6a..d9b1b8a5a9846801541ef246f614315e720e37ab 100644 --- a/packages/hoppscotch-app/components/app/Sidenav.vue +++ b/packages/hoppscotch-app/components/app/Sidenav.vue @@ -1,6 +1,6 @@ <template> <aside class="flex h-full justify-between md:flex-col"> - <nav class="flex flex-nowrap md:flex-col"> + <nav class="flex flex-nowrap md:flex-col flex-1 md:flex-none"> <NuxtLink v-for="(navigation, index) in primaryNavigation" :key="`navigation-${index}`" diff --git a/packages/hoppscotch-app/components/app/SlideOver.vue b/packages/hoppscotch-app/components/app/SlideOver.vue index 0bab564182ebe9ef918f0768179d3c61861dbfc1..eb519cd7e40503095cdc8b64d35eea98c94858e8 100644 --- a/packages/hoppscotch-app/components/app/SlideOver.vue +++ b/packages/hoppscotch-app/components/app/SlideOver.vue @@ -4,6 +4,7 @@<div class="inset-0 transition-opacity z-20 fixed" @keydown.esc="close()"> <div class="bg-primaryDark opacity-90 inset-0 absolute" + <transition v-if="show" name="fade" appear> tabindex="0" @click="close()" ></div> diff --git a/packages/hoppscotch-app/components/app/Support.vue b/packages/hoppscotch-app/components/app/Support.vue index a2a4a26496404a831972e85963bc3c3ee987ae70..19f217c24f1930359acfd01be025b1edbd8dba70 100644 --- a/packages/hoppscotch-app/components/app/Support.vue +++ b/packages/hoppscotch-app/components/app/Support.vue @@ -2,6 +2,7 @@ <SmartModal v-if="show" :title="$t('support.title')" + max-width="sm:max-w-md" @close="$emit('hide-modal')" > <template #body> diff --git a/packages/hoppscotch-app/components/collections/ImportExport.vue b/packages/hoppscotch-app/components/collections/ImportExport.vue index d3855dbd0a3adbd171e9b5bb6962f00e14d331af..7a686d04006c5cb133639154d74ac5aa5eab679d 100644 --- a/packages/hoppscotch-app/components/collections/ImportExport.vue +++ b/packages/hoppscotch-app/components/collections/ImportExport.vue @@ -2,6 +2,7 @@ <SmartModal v-if="show" :title="`${$t('modal.import_export')} ${$t('modal.collections')}`" + max-width="sm:max-w-md" @close="hideModal" > <template #actions> diff --git a/packages/hoppscotch-app/components/collections/graphql/ImportExport.vue b/packages/hoppscotch-app/components/collections/graphql/ImportExport.vue index dd859d761a926b34e3d9c3df1aba3e7b7c9ed54f..925850000a52cf21d610834e5aa21e01861bd655 100644 --- a/packages/hoppscotch-app/components/collections/graphql/ImportExport.vue +++ b/packages/hoppscotch-app/components/collections/graphql/ImportExport.vue @@ -2,6 +2,7 @@ <SmartModal v-if="show" :title="`${$t('modal.import_export')} ${$t('modal.collections')}`" + max-width="sm:max-w-md" @close="hideModal" > <template #actions> diff --git a/packages/hoppscotch-app/components/environments/ImportExport.vue b/packages/hoppscotch-app/components/environments/ImportExport.vue index 9fb5334213c319783dd22a0b5ba19e669478f294..994fedc1619766fb148bf7b2696692f4cc880d08 100644 --- a/packages/hoppscotch-app/components/environments/ImportExport.vue +++ b/packages/hoppscotch-app/components/environments/ImportExport.vue @@ -2,6 +2,7 @@ <SmartModal v-if="show" :title="`${$t('modal.import_export')} ${$t('environment.title')}`" + max-width="sm:max-w-md" @close="hideModal" > <template #actions> diff --git a/packages/hoppscotch-app/components/firebase/Login.vue b/packages/hoppscotch-app/components/firebase/Login.vue index eb47483f14f034b126024f3145d423900e3d79de..04ce5020fd4f8522ca16e4a22e346e4c2181bb65 100644 --- a/packages/hoppscotch-app/components/firebase/Login.vue +++ b/packages/hoppscotch-app/components/firebase/Login.vue @@ -2,6 +2,7 @@ <SmartModal v-if="show" :title="`${$t('auth.login_to_hoppscotch')}`" + max-width="sm:max-w-md" dialog @close="hideModal" > diff --git a/packages/hoppscotch-app/components/smart/Modal.vue b/packages/hoppscotch-app/components/smart/Modal.vue index 5c5bacfa47fa27309e34f1d28b7fcb3bb56b2861..32b0bb10fbb95caca289bb6e4375ff34a9e2f82a 100644 --- a/packages/hoppscotch-app/components/smart/Modal.vue +++ b/packages/hoppscotch-app/components/smart/Modal.vue @@ -10,7 +10,7 @@ > <transition name="fade" appear> <div <template> - <transition name="fade" appear @leave="onTransitionLeaveStart"> + > @touchstart="!dialog ? close() : null" @touchend="!dialog ? close() : null" @mouseup="!dialog ? close() : null" @@ -35,7 +35,7 @@ > <div class=" bg-primary - <div + @mouseup="!dialog ? close() : null" class="inset-0 transition z-10 z-50 fixed hide-scrollbar overflow-y-auto" text-left w-full @@ -44,12 +44,12 @@ transition-all inline-block align-bottom overflow-hidden - sm:max-w-md sm:align-middle - md:rounded-lg + sm:align-middle sm:rounded-xl " :class="[ { 'mt-24 md:mb-8': placement === 'top' }, { 'p-4': !fullWidth }, + maxWidth, ]" > <div @@ -123,6 +123,10 @@ }, fullWidth: { type: Boolean, default: false, + }, + maxWidth: { + type: String, + default: "sm:max-w-lg", }, }, setup() {