@@ -216,6 +220,7 @@ export default defineComponent({
return {
windowInnerWidth: useWindowSize(),
RIGHT_SIDEBAR: useSetting("RIGHT_SIDEBAR"),
+ COLUMN_LAYOUT: useSetting("COLUMN_LAYOUT"),
}
},
data() {
diff --git a/packages/hoppscotch-app/layouts/default.vue b/packages/hoppscotch-app/layouts/default.vue
index d62ffee96..cf4267667 100644
--- a/packages/hoppscotch-app/layouts/default.vue
+++ b/packages/hoppscotch-app/layouts/default.vue
@@ -61,19 +61,24 @@ import useWindowSize from "~/helpers/utils/useWindowSize"
function appLayout() {
const rightSidebar = useSetting("RIGHT_SIDEBAR")
+ const columnLayout = useSetting("COLUMN_LAYOUT")
const windowInnerWidth = useWindowSize()
// Initially apply
onBeforeMount(() => {
- if (windowInnerWidth.x.value < 768) rightSidebar.value = false
+ if (windowInnerWidth.x.value < 768) {
+ rightSidebar.value = false
+ columnLayout.value = true
+ }
})
// Listen for updates
- watch(windowInnerWidth.x, () =>
- windowInnerWidth.x.value >= 768
- ? (rightSidebar.value = true)
- : (rightSidebar.value = false)
- )
+ watch(windowInnerWidth.x, () => {
+ if (windowInnerWidth.x.value < 768) {
+ rightSidebar.value = false
+ columnLayout.value = true
+ }
+ })
}
function updateThemes() {
diff --git a/packages/hoppscotch-app/locales/en.json b/packages/hoppscotch-app/locales/en.json
index 7ddf68ced..63e4471a9 100644
--- a/packages/hoppscotch-app/locales/en.json
+++ b/packages/hoppscotch-app/locales/en.json
@@ -219,6 +219,8 @@
"title": "Import"
},
"layout": {
+ "column": "Column layout",
+ "row": "Row layout",
"zen_mode": "Zen mode"
},
"modal": {
diff --git a/packages/hoppscotch-app/newstore/settings.ts b/packages/hoppscotch-app/newstore/settings.ts
index 56fe72a72..b0735d10b 100644
--- a/packages/hoppscotch-app/newstore/settings.ts
+++ b/packages/hoppscotch-app/newstore/settings.ts
@@ -52,6 +52,7 @@ export type SettingsType = {
RIGHT_SIDEBAR: boolean
ZEN_MODE: boolean
FONT_SIZE: HoppFontSize
+ COLUMN_LAYOUT: boolean
}
export const defaultSettings: SettingsType = {
@@ -78,6 +79,7 @@ export const defaultSettings: SettingsType = {
RIGHT_SIDEBAR: true,
ZEN_MODE: false,
FONT_SIZE: "small",
+ COLUMN_LAYOUT: true,
}
const validKeys = Object.keys(defaultSettings)
diff --git a/packages/hoppscotch-app/pages/documentation.vue b/packages/hoppscotch-app/pages/documentation.vue
index 2feb14210..f581d0412 100644
--- a/packages/hoppscotch-app/pages/documentation.vue
+++ b/packages/hoppscotch-app/pages/documentation.vue
@@ -5,7 +5,11 @@
:horizontal="!(windowInnerWidth.x.value >= 768)"
>
-
+
@@ -190,6 +194,7 @@ export default defineComponent({
return {
windowInnerWidth: useWindowSize(),
RIGHT_SIDEBAR: useSetting("RIGHT_SIDEBAR"),
+ COLUMN_LAYOUT: useSetting("COLUMN_LAYOUT"),
currentUser: useReadonlyStream(currentUser$, null),
}
},
diff --git a/packages/hoppscotch-app/pages/graphql.vue b/packages/hoppscotch-app/pages/graphql.vue
index 5a7a4ce20..8675863b8 100644
--- a/packages/hoppscotch-app/pages/graphql.vue
+++ b/packages/hoppscotch-app/pages/graphql.vue
@@ -5,7 +5,11 @@
:horizontal="!(windowInnerWidth.x.value >= 768)"
>
-
+
@@ -59,6 +63,7 @@ export default defineComponent({
return {
windowInnerWidth: useWindowSize(),
RIGHT_SIDEBAR: useSetting("RIGHT_SIDEBAR"),
+ COLUMN_LAYOUT: useSetting("COLUMN_LAYOUT"),
gqlConn,
}
},
diff --git a/packages/hoppscotch-app/pages/index.vue b/packages/hoppscotch-app/pages/index.vue
index 4054d6280..fc161f8c7 100644
--- a/packages/hoppscotch-app/pages/index.vue
+++ b/packages/hoppscotch-app/pages/index.vue
@@ -5,7 +5,11 @@
:horizontal="!(windowInnerWidth.x.value >= 768)"
>
-
+
@@ -279,6 +283,7 @@ export default defineComponent({
null
),
RIGHT_SIDEBAR: useSetting("RIGHT_SIDEBAR"),
+ COLUMN_LAYOUT: useSetting("COLUMN_LAYOUT"),
confirmSync,
syncRequest,
oAuthURL,
diff --git a/packages/hoppscotch-app/pages/settings.vue b/packages/hoppscotch-app/pages/settings.vue
index 2495c7b61..27bad3436 100644
--- a/packages/hoppscotch-app/pages/settings.vue
+++ b/packages/hoppscotch-app/pages/settings.vue
@@ -417,7 +417,6 @@ export default defineComponent({
watch: {
ZEN_MODE(ZEN_MODE) {
this.applySetting("LEFT_SIDEBAR", !ZEN_MODE)
- // this.applySetting("RIGHT_SIDEBAR", !ZEN_MODE)
},
proxySettings: {
deep: true,