🎨 Moved History & Collection section to sticky right nav (initial upload).

This commit is contained in:
liyasthomas
2019-11-17 03:26:26 +05:30
parent a8f6df16a8
commit a40d67138b
3 changed files with 720 additions and 666 deletions

View File

@@ -78,7 +78,7 @@ a {
header, header,
footer { footer {
&>div { & > div {
display: flex; display: flex;
padding: 16px; padding: 16px;
width: 100%; width: 100%;
@@ -127,7 +127,8 @@ footer {
color: var(--ac-color); color: var(--ac-color);
} }
.nav-first { .nav-first,
.sticky-inner {
display: flex; display: flex;
order: 1; order: 1;
flex-flow: column; flex-flow: column;
@@ -521,7 +522,7 @@ input[type="checkbox"] {
display: none; display: none;
&, &,
&+label { & + label {
vertical-align: middle; vertical-align: middle;
cursor: pointer; cursor: pointer;
@@ -540,7 +541,7 @@ input[type="checkbox"] {
} }
} }
&:checked+label:before { &:checked + label:before {
background-color: var(--ac-color); background-color: var(--ac-color);
border-color: var(--ac-color); border-color: var(--ac-color);
color: var(--act-color); color: var(--act-color);
@@ -600,6 +601,10 @@ ol li {
display: none; display: none;
} }
.show-on-large-screen {
display: inline-flex;
}
#installPWA { #installPWA {
display: none; display: none;
} }
@@ -717,7 +722,7 @@ div.tab {
display: none; display: none;
} }
input[type="radio"]+label { input[type="radio"] + label {
padding: 8px 16px; padding: 8px 16px;
border-bottom: 2px solid transparent; border-bottom: 2px solid transparent;
cursor: pointer; cursor: pointer;
@@ -730,11 +735,11 @@ input[type="radio"]+label {
} }
} }
input[type="radio"]:checked+label { input[type="radio"]:checked + label {
border-color: var(--fg-color); border-color: var(--fg-color);
} }
input[type="radio"]:checked+label+div.tab { input[type="radio"]:checked + label + div.tab {
display: block; display: block;
} }
@@ -751,7 +756,28 @@ input[type="radio"]:checked+label+div.tab {
color: inherit !important; color: inherit !important;
} }
.page-columns {
display: flex;
flex: 1;
flex-flow: column;
}
.inner-left {
display: flex;
order: 1;
}
.inner-right {
display: flex;
width: 25%;
order: 2;
}
@media (max-width: $responsiveWidth) { @media (max-width: $responsiveWidth) {
.content {
flex-flow: column;
}
.columns { .columns {
flex-flow: column; flex-flow: column;
} }
@@ -791,4 +817,9 @@ input[type="radio"]:checked+label+div.tab {
.show-on-small-screen { .show-on-small-screen {
display: inline-flex; display: inline-flex;
} }
.sticky-inner {
position: relative;
width: 100%;
}
} }

View File

@@ -11,7 +11,7 @@
</li> </li>
</ul> </ul>
<ul v-if="history.length !== 0" class="labels"> <ul v-if="history.length !== 0" class="labels">
<div class="show-on-small-screen"> <div class="show-on-large-screen">
<li> <li>
<button class="icon"> <button class="icon">
<i class="material-icons">star_half</i> <i class="material-icons">star_half</i>
@@ -64,7 +64,7 @@
</ul> </ul>
</li> </li>
</transition> </transition>
<div class="show-on-small-screen"> <div class="show-on-large-screen">
<li> <li>
<button <button
class="icon" class="icon"
@@ -93,7 +93,7 @@
:remain="Math.min(5, filteredHistory.length)" :remain="Math.min(5, filteredHistory.length)"
> >
<ul v-for="(entry, index) in filteredHistory" :key="index" class="entry"> <ul v-for="(entry, index) in filteredHistory" :key="index" class="entry">
<div class="show-on-small-screen"> <div class="show-on-large-screen">
<li> <li>
<button <button
class="icon" class="icon"
@@ -119,7 +119,7 @@
</button> </button>
</li> </li>
</div> </div>
<div class="show-on-small-screen"> <div class="show-on-large-screen">
<li> <li>
<input <input
aria-label="Label" aria-label="Label"
@@ -155,7 +155,7 @@
>{{ entry.status }}</span >{{ entry.status }}</span
> >
</li> </li>
<div class="show-on-small-screen"> <div class="show-on-large-screen">
<li> <li>
<input <input
aria-label="URL" aria-label="URL"
@@ -176,7 +176,7 @@
</li> </li>
</div> </div>
<transition name="smooth"> <transition name="smooth">
<div v-if="show" class="show-on-small-screen"> <div v-if="show" class="show-on-large-screen">
<li> <li>
<input <input
aria-label="Duration" aria-label="Duration"
@@ -197,7 +197,7 @@
</li> </li>
</div> </div>
</transition> </transition>
<div class="show-on-small-screen"> <div class="show-on-large-screen">
<li> <li>
<button <button
v-tooltip="'Delete entry'" v-tooltip="'Delete entry'"
@@ -302,6 +302,16 @@ label {
color: #f8e81c !important; color: #f8e81c !important;
} }
ul,
ol {
flex-direction: column;
}
ul li,
ol li {
display: flex;
}
@media (max-width: 720px) { @media (max-width: 720px) {
.virtual-list.filled { .virtual-list.filled {
min-height: 320px; min-height: 320px;

View File

@@ -1,5 +1,7 @@
<template> <template>
<div class="page"> <div class="page">
<div class="content">
<div class="page-columns inner-left">
<pw-section <pw-section
v-if="showPreRequestScript" v-if="showPreRequestScript"
class="orange" class="orange"
@@ -307,7 +309,7 @@
<br /> <br />
<section id="options"> <section id="options">
<input id="tab-one" type="radio" name="grp" checked="checked" /> <input id="tab-one" type="radio" name="options" checked="checked" />
<label for="tab-one">Authentication</label> <label for="tab-one">Authentication</label>
<div class="tab"> <div class="tab">
<br /> <br />
@@ -386,7 +388,7 @@
</div> </div>
</pw-section> </pw-section>
</div> </div>
<input id="tab-two" type="radio" name="grp" /> <input id="tab-two" type="radio" name="options" />
<label for="tab-two">Headers</label> <label for="tab-two">Headers</label>
<div class="tab"> <div class="tab">
<br /> <br />
@@ -468,7 +470,7 @@
</ul> </ul>
</pw-section> </pw-section>
</div> </div>
<input id="tab-three" type="radio" name="grp" /> <input id="tab-three" type="radio" name="options" />
<label for="tab-three">Parameters</label> <label for="tab-three">Parameters</label>
<div class="tab"> <div class="tab">
<br /> <br />
@@ -636,14 +638,24 @@
</pw-section> </pw-section>
<br /> <br />
</div>
<aside class="sticky-inner inner-right">
<section>
<input id="collection-tab" type="radio" name="side" checked="checked" />
<label for="collection-tab">Collections</label>
<div class="tab">
<pw-section class="yellow" label="Collections" ref="collections"> <pw-section class="yellow" label="Collections" ref="collections">
<collections /> <collections />
</pw-section> </pw-section>
</div>
<br /> <input id="history-tab" type="radio" name="side" />
<label for="history-tab">History</label>
<div class="tab">
<history @useHistory="handleUseHistory" ref="historyComponent"></history> <history @useHistory="handleUseHistory" ref="historyComponent"></history>
</div>
</section>
</aside>
<save-request-as <save-request-as
v-bind:show="showRequestModal" v-bind:show="showRequestModal"
@@ -745,6 +757,7 @@
<div slot="footer"></div> <div slot="footer"></div>
</pw-modal> </pw-modal>
</div> </div>
</div>
</template> </template>
<script> <script>
import section from "../components/section"; import section from "../components/section";