fix: responsiveness

This commit is contained in:
liyasthomas
2021-08-05 21:29:05 +05:30
parent 4b416586b7
commit 3bd78869a0
7 changed files with 41 additions and 8 deletions

View File

@@ -105,11 +105,14 @@ a {
.tippy-popper { .tippy-popper {
.tooltip-theme { .tooltip-theme {
@apply bg-tooltip; @apply bg-tooltip;
@apply text-primary text-xs; @apply text-primary;
@apply font-semibold; @apply font-semibold;
@apply py-1 px-2; @apply py-1 px-2;
@apply shadow; @apply shadow;
font-size: var(--body-font-size);
line-height: var(--body-line-height);
kbd { kbd {
@apply first:ml-2; @apply first:ml-2;
@apply last:-mr-1; @apply last:-mr-1;
@@ -128,6 +131,9 @@ a {
@apply p-2; @apply p-2;
@apply shadow-lg; @apply shadow-lg;
@apply focus:outline-none; @apply focus:outline-none;
font-size: var(--body-font-size);
line-height: var(--body-line-height);
} }
&[x-placement^="top"] .tippy-tooltip .tippy-arrow { &[x-placement^="top"] .tippy-tooltip .tippy-arrow {
@@ -330,11 +336,14 @@ input[type="checkbox"] {
.toasted { .toasted {
&.toasted-primary { &.toasted-primary {
@apply bg-tooltip; @apply bg-tooltip;
@apply text-primary text-xs; @apply text-primary;
@apply justify-start; @apply justify-start;
@apply shadow; @apply shadow;
@apply font-semibold; @apply font-semibold;
font-size: var(--body-font-size);
line-height: var(--body-line-height);
.action { .action {
@apply ml-auto; @apply ml-auto;
@apply transition; @apply transition;

View File

@@ -73,7 +73,7 @@
@click.native="$refs.options.tippy().hide()" @click.native="$refs.options.tippy().hide()"
/> />
<!-- <SmartItem :label="$t('app.status')" /> --> <!-- <SmartItem :label="$t('app.status')" /> -->
<div class="flex text-xs opacity-50 py-2 px-4"> <div class="flex opacity-50 py-2 px-4">
{{ `${$t("app.name")} ${$t("app.version")}` }} {{ `${$t("app.name")} ${$t("app.version")}` }}
</div> </div>
</div> </div>

View File

@@ -7,7 +7,7 @@
<span>Hoppscotch</span> <span>Hoppscotch</span>
</div> </div>
<div class="space-x-2 flex-shrink-0 inline-flex items-center"> <div class="space-x-2 flex-shrink-0 inline-flex items-center">
<AppGitHubStarButton class="mt-1 mr-2" /> <AppGitHubStarButton class="flex mx-2 mt-1" />
<TabPrimary <TabPrimary
id="installPWA" id="installPWA"
v-tippy="{ theme: 'tooltip' }" v-tippy="{ theme: 'tooltip' }"

View File

@@ -1,6 +1,6 @@
<template> <template>
<aside> <aside>
<nav class="flex flex-col flex-nowrap"> <nav class="flex flex-nowrap md:flex-col">
<nuxt-link <nuxt-link
v-for="(navigation, index) in primaryNavigation" v-for="(navigation, index) in primaryNavigation"
:key="`navigation-${index}`" :key="`navigation-${index}`"

View File

@@ -19,6 +19,10 @@
{ 'pointer-events-none': loading }, { 'pointer-events-none': loading },
{ 'flex-1': label }, { 'flex-1': label },
{ 'flex-row-reverse justify-end': reverse }, { 'flex-row-reverse justify-end': reverse },
{
'border border-divider hover:border-dividerDark focus:border-dividerDark':
outline,
},
]" ]"
:disabled="disabled" :disabled="disabled"
:tabindex="loading ? '-1' : '0'" :tabindex="loading ? '-1' : '0'"
@@ -99,6 +103,10 @@ export default {
type: Boolean, type: Boolean,
default: false, default: false,
}, },
outline: {
type: Boolean,
default: false,
},
infoIcon: { infoIcon: {
type: String, type: String,
default: "", default: "",

View File

@@ -2,11 +2,14 @@
<div class="flex h-screen w-screen"> <div class="flex h-screen w-screen">
<Splitpanes :dbl-click-splitter="false" horizontal> <Splitpanes :dbl-click-splitter="false" horizontal>
<Pane class="flex flex-1 !overflow-auto"> <Pane class="flex flex-1 !overflow-auto">
<Splitpanes :dbl-click-splitter="false" vertical> <Splitpanes
:dbl-click-splitter="false"
:horizontal="!(windowInnerWidth >= 768)"
>
<Pane <Pane
v-if="LEFT_SIDEBAR" v-if="LEFT_SIDEBAR"
style="width: auto" style="width: auto; height: auto"
class="hide-scrollbar overflow-auto" class="hide-scrollbar !overflow-auto"
> >
<AppSidenav /> <AppSidenav />
</Pane> </Pane>
@@ -52,6 +55,7 @@ export default defineComponent({
return { return {
LEFT_SIDEBAR: null, LEFT_SIDEBAR: null,
ZEN_MODE: null, ZEN_MODE: null,
windowInnerWidth: 0,
} }
}, },
subscriptions() { subscriptions() {
@@ -83,6 +87,8 @@ export default defineComponent({
}) })
}, },
async mounted() { async mounted() {
window.addEventListener("resize", this.handleResize)
this.handleResize()
performMigrations() performMigrations()
console.log( console.log(
"%cWe ❤︎ open source!", "%cWe ❤︎ open source!",
@@ -120,5 +126,13 @@ export default defineComponent({
logPageView(this.$router.currentRoute.fullPath) logPageView(this.$router.currentRoute.fullPath)
}, },
destroyed() {
window.removeEventListener("resize", this.handleResize)
},
methods: {
handleResize() {
this.windowInnerWidth = window.innerWidth
},
},
}) })
</script> </script>

View File

@@ -250,6 +250,7 @@
svg="firefox" svg="firefox"
label="Firefox" label="Firefox"
:info-icon="hasFirefoxExtInstalled ? 'check_circle' : ''" :info-icon="hasFirefoxExtInstalled ? 'check_circle' : ''"
outline
/> />
</span> </span>
<span> <span>
@@ -259,6 +260,7 @@
svg="chrome" svg="chrome"
label="Chrome" label="Chrome"
:info-icon="hasChromeExtInstalled ? 'check_circle' : ''" :info-icon="hasChromeExtInstalled ? 'check_circle' : ''"
outline
/> />
</span> </span>
</div> </div>