documentation.vue (hoppscotch-2.0.0) | : | documentation.vue (hoppscotch-2.1.0) | ||
---|---|---|---|---|
<template> | <template> | |||
<Splitpanes class="smart-splitter" :dbl-click-splitter="false" vertical> | <Splitpanes | |||
<Pane class="hide-scrollbar !overflow-auto"> | class="smart-splitter" | |||
<Splitpanes class="smart-splitter" :dbl-click-splitter="false" horizontal> | :rtl="SIDEBAR_ON_LEFT && windowInnerWidth.x.value >= 768" | |||
:class="{ | ||||
'!flex-row-reverse': SIDEBAR_ON_LEFT && windowInnerWidth.x.value >= 768, | ||||
}" | ||||
:horizontal="!(windowInnerWidth.x.value >= 768)" | ||||
> | ||||
<Pane size="75" min-size="65" class="hide-scrollbar !overflow-auto"> | ||||
<Splitpanes class="smart-splitter" :horizontal="COLUMN_LAYOUT"> | ||||
<Pane class="hide-scrollbar !overflow-auto"> | <Pane class="hide-scrollbar !overflow-auto"> | |||
<AppSection label="import"> | <AppSection label="import"> | |||
<div class="flex p-4 items-start justify-between"> | <div class="flex p-4 items-start justify-between"> | |||
<label> | <label> | |||
{{ $t("documentation.generate_message") }} | {{ $t("documentation.generate_message") }} | |||
</label> | </label> | |||
<span | <span | |||
class=" | class=" | |||
bg-accentDark | bg-accentDark | |||
rounded | rounded | |||
skipping to change at line 40 | skipping to change at line 47 | |||
z-10 | z-10 | |||
items-start | items-start | |||
justify-between | justify-between | |||
sticky | sticky | |||
" | " | |||
> | > | |||
<label for="collectionUpload"> | <label for="collectionUpload"> | |||
<ButtonSecondary | <ButtonSecondary | |||
v-tippy="{ theme: 'tooltip' }" | v-tippy="{ theme: 'tooltip' }" | |||
title="JSON" | title="JSON" | |||
icon="folder" | svg="folder" | |||
class="rounded-none" | class="!rounded-none" | |||
:label="$t('import.collections')" | :label="$t('import.collections')" | |||
@click.native="$refs.collectionUpload.click()" | @click.native="$refs.collectionUpload.click()" | |||
/> | /> | |||
</label> | </label> | |||
<input | <input | |||
ref="collectionUpload" | ref="collectionUpload" | |||
class="input" | class="input" | |||
name="collectionUpload" | name="collectionUpload" | |||
type="file" | type="file" | |||
@change="uploadCollection" | @change="uploadCollection" | |||
/> | /> | |||
<ButtonSecondary | <ButtonSecondary | |||
v-tippy="{ theme: 'tooltip' }" | v-tippy="{ theme: 'tooltip' }" | |||
:title="$t('action.clear')" | :title="$t('action.clear')" | |||
icon="clear_all" | svg="trash-2" | |||
@click.native="collectionJSON = '[]'" | @click.native="collectionJSON = '[]'" | |||
/> | /> | |||
</div> | </div> | |||
<SmartAceEditor | <textarea-autosize | |||
id="import-curl" | ||||
v-model="collectionJSON" | v-model="collectionJSON" | |||
:lang="'json'" | class="font-mono p-4 bg-primary" | |||
:lint="false" | autofocus | |||
:options="{ | rows="8" | |||
maxLines: Infinity, | ||||
minLines: 16, | ||||
autoScrollEditorIntoView: true, | ||||
showPrintMargin: false, | ||||
useWorker: false, | ||||
}" | ||||
/> | /> | |||
<div | <div | |||
class=" | class=" | |||
bg-primary | bg-primary | |||
border-t border-b border-dividerLight | border-t border-b border-dividerLight | |||
flex | flex | |||
p-4 | p-4 | |||
bottom-0 | bottom-0 | |||
z-10 | z-10 | |||
justify-between | justify-between | |||
skipping to change at line 157 | skipping to change at line 159 | |||
:key="`collection-${index}`" | :key="`collection-${index}`" | |||
> | > | |||
<DocsCollection :collection="collection" /> | <DocsCollection :collection="collection" /> | |||
</div> | </div> | |||
</div> | </div> | |||
</AppSection> | </AppSection> | |||
</Pane> | </Pane> | |||
</Splitpanes> | </Splitpanes> | |||
</Pane> | </Pane> | |||
<Pane | <Pane | |||
v-if="RIGHT_SIDEBAR" | v-if="SIDEBAR" | |||
max-size="35" | ||||
size="25" | size="25" | |||
min-size="20" | min-size="20" | |||
class="hide-scrollbar !overflow-auto" | class="hide-scrollbar !overflow-auto" | |||
> | > | |||
<aside> | <aside> | |||
<Collections | <Collections | |||
:selected="selected" | :selected="selected" | |||
:doc="true" | :doc="true" | |||
@use-collection="useSelectedCollection($event)" | @use-collection="useSelectedCollection($event)" | |||
@remove-collection="removeSelectedCollection($event)" | @remove-collection="removeSelectedCollection($event)" | |||
skipping to change at line 186 | skipping to change at line 187 | |||
import { defineComponent } from "@nuxtjs/composition-api" | import { defineComponent } from "@nuxtjs/composition-api" | |||
import { Splitpanes, Pane } from "splitpanes" | import { Splitpanes, Pane } from "splitpanes" | |||
import "splitpanes/dist/splitpanes.css" | import "splitpanes/dist/splitpanes.css" | |||
import Mustache from "mustache" | import Mustache from "mustache" | |||
import { currentUser$ } from "~/helpers/fb/auth" | import { currentUser$ } from "~/helpers/fb/auth" | |||
import DocsTemplate from "~/assets/md/docs.md" | import DocsTemplate from "~/assets/md/docs.md" | |||
import folderContents from "~/assets/md/folderContents.md" | import folderContents from "~/assets/md/folderContents.md" | |||
import folderBody from "~/assets/md/folderBody.md" | import folderBody from "~/assets/md/folderBody.md" | |||
import { useSetting } from "~/newstore/settings" | import { useSetting } from "~/newstore/settings" | |||
import { useReadonlyStream } from "~/helpers/utils/composables" | import { useReadonlyStream } from "~/helpers/utils/composables" | |||
import useWindowSize from "~/helpers/utils/useWindowSize" | ||||
export default defineComponent({ | export default defineComponent({ | |||
components: { Splitpanes, Pane }, | components: { Splitpanes, Pane }, | |||
setup() { | setup() { | |||
return { | return { | |||
RIGHT_SIDEBAR: useSetting("RIGHT_SIDEBAR"), | windowInnerWidth: useWindowSize(), | |||
SIDEBAR: useSetting("SIDEBAR"), | ||||
COLUMN_LAYOUT: useSetting("COLUMN_LAYOUT"), | ||||
currentUser: useReadonlyStream(currentUser$, null), | currentUser: useReadonlyStream(currentUser$, null), | |||
SIDEBAR_ON_LEFT: useSetting("SIDEBAR_ON_LEFT"), | ||||
} | } | |||
}, | }, | |||
data() { | data() { | |||
return { | return { | |||
collectionJSON: "[]", | collectionJSON: "[]", | |||
items: [], | items: [], | |||
docsMarkdown: "", | docsMarkdown: "", | |||
selected: [], | selected: [], | |||
} | } | |||
}, | }, | |||
End of changes. 9 change blocks. | ||||
19 lines changed or deleted | 24 lines changed or added |