Added label to request and History. Fixes #133

This commit is contained in:
liyasthomas
2019-10-07 21:21:48 +05:30
parent c8a480b0e3
commit 249af016a0
4 changed files with 22 additions and 8 deletions

View File

@@ -302,6 +302,10 @@ ol li {
justify-content: space-between; justify-content: space-between;
} }
.show-on-small-screen {
display: flex;
}
@media (max-width: $responsiveWidth) { @media (max-width: $responsiveWidth) {
header div { header div {
display: flex; display: flex;
@@ -327,6 +331,10 @@ ol li {
.hide-on-small-screen { .hide-on-small-screen {
display: none; display: none;
} }
.show-on-small-screen {
display: inline-flex;
}
} }
#installPWA { #installPWA {

View File

@@ -7,7 +7,7 @@
</ul> </ul>
<ul> <ul>
<li @click="sort_by_label()"> <li @click="sort_by_label()">
<label for="" class="flex-wrap">Name<i class="material-icons">sort</i></label> <label for="" class="flex-wrap">Label<i class="material-icons">sort</i></label>
</li> </li>
<li @click="sort_by_time()"> <li @click="sort_by_time()">
<label for="" class="flex-wrap">Time<i class="material-icons">sort</i></label> <label for="" class="flex-wrap">Time<i class="material-icons">sort</i></label>
@@ -25,7 +25,7 @@
<virtual-list class="virtual-list" :class="{filled: filteredHistory.length}" :size="54" :remain="Math.min(5, filteredHistory.length)"> <virtual-list class="virtual-list" :class="{filled: filteredHistory.length}" :size="54" :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">
<li> <li>
<input aria-label="Label" type="text" readonly :value="entry.label" :title="entry.label"> <input aria-label="Label" type="text" readonly :value="entry.label" placeholder="No label">
</li> </li>
<li> <li>
<input aria-label="Time" type="text" readonly :value="entry.time" :title="entry.date"> <input aria-label="Time" type="text" readonly :value="entry.time" :title="entry.date">
@@ -38,7 +38,7 @@
<input aria-label="URL" type="text" readonly :value="entry.url"> <input aria-label="URL" type="text" readonly :value="entry.url">
</li> </li>
<li> <li>
<input aria-label="Path" type="text" readonly :value="entry.path"> <input aria-label="Path" type="text" readonly :value="entry.path" placeholder="No path">
</li> </li>
<div class="show-on-small-screen"> <div class="show-on-small-screen">
<li> <li>

View File

@@ -1,6 +1,5 @@
<template> <template>
<div class="page"> <div class="page">
<input @keyup.enter="requestName" id="label" name="label" type="label" v-model="label">
<pw-modal v-if="showModal" @close="showModal = false"> <pw-modal v-if="showModal" @close="showModal = false">
<div slot="header"> <div slot="header">
<ul> <ul>
@@ -135,6 +134,11 @@
</ul> </ul>
</div> </div>
</div> </div>
<ul>
<li>
<input id="label" name="label" type="text" v-model="label" placeholder="Label request">
</li>
</ul>
<div class="flex-wrap"> <div class="flex-wrap">
<button class="icon" id="show-modal" @click="showModal = true"> <button class="icon" id="show-modal" @click="showModal = true">
<i class="material-icons">import_export</i> <i class="material-icons">import_export</i>
@@ -420,7 +424,7 @@
}, },
data() { data() {
return { return {
label:'Enter request name', label: '',
showModal: false, showModal: false,
copyButton: '<i class="material-icons">file_copy</i>', copyButton: '<i class="material-icons">file_copy</i>',
copiedButton: '<i class="material-icons">done</i>', copiedButton: '<i class="material-icons">done</i>',
@@ -683,10 +687,12 @@
}, },
methods: { methods: {
handleUseHistory({ handleUseHistory({
label,
method, method,
url, url,
path path
}) { }) {
this.label = label;
this.method = method; this.method = method;
this.url = url; this.url = url;
this.path = path; this.path = path;

View File

@@ -81,18 +81,18 @@
themes: [ themes: [
{ {
"color": "rgb(37, 38, 40)", "color": "rgb(37, 38, 40)",
"name": "Dark", "name": "Kinda Dark",
"class": "" "class": ""
}, },
{ {
"color": "#ffffff", "color": "#ffffff",
"name": "Light", "name": "Clearly White",
"vibrant": true, "vibrant": true,
"class": "light" "class": "light"
}, },
{ {
"color": "#000000", "color": "#000000",
"name": "Black", "name": "Just Black",
"class": "black" "class": "black"
}, },
{ {