chore(ui): improve ui consistency

This commit is contained in:
liyasthomas
2021-12-21 07:45:14 +05:30
parent 9c209bb009
commit ba3d3430c0
4 changed files with 50 additions and 47 deletions

View File

@@ -78,22 +78,7 @@
</span>
</template>
<template #body>
<div v-if="mode == 'import_export'" class="flex flex-col space-y-2">
<SmartItem
v-tippy="{ theme: 'tooltip' }"
:title="$t('action.replace_current')"
svg="file"
:label="$t('action.replace_json')"
@click.native="openDialogChooseFileToReplaceWith"
/>
<input
ref="inputChooseFileToReplaceWith"
class="input"
type="file"
style="display: none"
accept="application/json"
@change="replaceWithJSON"
/>
<div v-if="mode == 'import_export'" class="flex flex-col space-y-2 px-2">
<SmartItem
v-tippy="{ theme: 'tooltip' }"
:title="$t('action.preserve_current')"
@@ -117,6 +102,22 @@
:label="$t('import.from_my_collections')"
@click.native="mode = 'import_from_my_collections'"
/>
<SmartItem
v-tippy="{ theme: 'tooltip' }"
:title="$t('action.replace_current')"
svg="file"
:label="$t('action.replace_json')"
@click.native="openDialogChooseFileToReplaceWith"
/>
<input
ref="inputChooseFileToReplaceWith"
class="input"
type="file"
style="display: none"
accept="application/json"
@change="replaceWithJSON"
/>
<hr />
<SmartItem
v-tippy="{ theme: 'tooltip' }"
:title="$t('action.download_file')"

View File

@@ -57,21 +57,7 @@
</span>
</template>
<template #body>
<div class="flex flex-col space-y-2">
<SmartItem
v-tippy="{ theme: 'tooltip' }"
:title="$t('action.replace_current')"
svg="file"
:label="$t('action.replace_json')"
@click.native="openDialogChooseFileToReplaceWith"
/>
<input
ref="inputChooseFileToReplaceWith"
class="input"
type="file"
accept="application/json"
@change="replaceWithJSON"
/>
<div class="flex flex-col space-y-2 px-2">
<SmartItem
v-tippy="{ theme: 'tooltip' }"
:title="$t('action.preserve_current')"
@@ -86,6 +72,21 @@
accept="application/json"
@change="importFromJSON"
/>
<SmartItem
v-tippy="{ theme: 'tooltip' }"
:title="$t('action.replace_current')"
svg="file"
:label="$t('action.replace_json')"
@click.native="openDialogChooseFileToReplaceWith"
/>
<input
ref="inputChooseFileToReplaceWith"
class="input"
type="file"
accept="application/json"
@change="replaceWithJSON"
/>
<hr />
<SmartItem
v-tippy="{ theme: 'tooltip' }"
:title="$t('action.download_file')"

View File

@@ -57,21 +57,7 @@
</span>
</template>
<template #body>
<div class="flex flex-col space-y-2">
<SmartItem
v-tippy="{ theme: 'tooltip' }"
:title="$t('action.replace_current')"
svg="file"
:label="$t('action.replace_json')"
@click.native="openDialogChooseFileToReplaceWith"
/>
<input
ref="inputChooseFileToReplaceWith"
class="input"
type="file"
accept="application/json"
@change="replaceWithJSON"
/>
<div class="flex flex-col space-y-2 px-2">
<SmartItem
v-tippy="{ theme: 'tooltip' }"
:title="$t('action.preserve_current')"
@@ -86,6 +72,21 @@
accept="application/json"
@change="importFromJSON"
/>
<SmartItem
v-tippy="{ theme: 'tooltip' }"
:title="$t('action.replace_current')"
svg="file"
:label="$t('action.replace_json')"
@click.native="openDialogChooseFileToReplaceWith"
/>
<input
ref="inputChooseFileToReplaceWith"
class="input"
type="file"
accept="application/json"
@change="replaceWithJSON"
/>
<hr />
<SmartItem
v-tippy="{ theme: 'tooltip' }"
:title="$t('action.download_file')"

View File

@@ -68,7 +68,7 @@ function transformBody(insomniaBody: any) {
default:
console.warn(
"Warning: Body type unsupported; skipped!!! ... " +
insomniaBody.mimeType
insomniaBody.mimeType
)
body.mode = "raw"
body.raw =