Compare commits
3 Commits
chore/desk
...
fix/action
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f862b4aaae | ||
|
|
7374a35b41 | ||
|
|
5ad8f6c2ce |
11
packages/hoppscotch-common/src/components.d.ts
vendored
11
packages/hoppscotch-common/src/components.d.ts
vendored
@@ -1,11 +1,11 @@
|
||||
// generated by unplugin-vue-components
|
||||
// We suggest you to commit this file into source control
|
||||
/* eslint-disable */
|
||||
/* prettier-ignore */
|
||||
// @ts-nocheck
|
||||
// Generated by unplugin-vue-components
|
||||
// Read more: https://github.com/vuejs/core/pull/3399
|
||||
import '@vue/runtime-core'
|
||||
|
||||
export {}
|
||||
|
||||
declare module '@vue/runtime-core' {
|
||||
declare module 'vue' {
|
||||
export interface GlobalComponents {
|
||||
AppActionHandler: typeof import('./components/app/ActionHandler.vue')['default']
|
||||
AppBanner: typeof import('./components/app/Banner.vue')['default']
|
||||
@@ -210,5 +210,4 @@ declare module '@vue/runtime-core' {
|
||||
WorkspaceCurrent: typeof import('./components/workspace/Current.vue')['default']
|
||||
WorkspaceSelector: typeof import('./components/workspace/Selector.vue')['default']
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,15 +1,16 @@
|
||||
<template>
|
||||
<Splitpanes
|
||||
class="smart-splitter"
|
||||
:rtl="SIDEBAR_ON_LEFT && mdAndLarger"
|
||||
:class="{
|
||||
'!flex-row-reverse': SIDEBAR_ON_LEFT && mdAndLarger,
|
||||
'smart-splitter': SIDEBAR && hasSidebar,
|
||||
'no-splitter': !(SIDEBAR && hasSidebar),
|
||||
}"
|
||||
:horizontal="!mdAndLarger"
|
||||
@resize="setPaneEvent($event, 'vertical')"
|
||||
>
|
||||
<Pane
|
||||
:size="PANE_MAIN_SIZE"
|
||||
:size="SIDEBAR && hasSidebar ? PANE_MAIN_SIZE : 100"
|
||||
min-size="65"
|
||||
class="flex flex-col !overflow-auto"
|
||||
>
|
||||
@@ -36,9 +37,8 @@
|
||||
</Splitpanes>
|
||||
</Pane>
|
||||
<Pane
|
||||
v-if="SIDEBAR && hasSidebar"
|
||||
:size="PANE_SIDEBAR_SIZE"
|
||||
min-size="25"
|
||||
:size="SIDEBAR && hasSidebar ? PANE_SIDEBAR_SIZE : 0"
|
||||
:min-size="25"
|
||||
class="flex flex-col !overflow-auto bg-primaryContrast"
|
||||
>
|
||||
<slot name="sidebar" />
|
||||
|
||||
@@ -199,7 +199,7 @@ const GqlCollectionsGistExporter: ImporterOrExporter = {
|
||||
exporter: "gist",
|
||||
})
|
||||
|
||||
window.open(res.right, "_blank")
|
||||
platform.io.openExternalLink(res.right)
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
@@ -297,7 +297,7 @@ const HoppEnvironmentsGistExporter: ImporterOrExporter = {
|
||||
platform: "rest",
|
||||
})
|
||||
|
||||
window.open(res.right, "_blank")
|
||||
platform.io.openExternalLink(res.right)
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
@@ -81,4 +81,11 @@ export type IOPlatformDef = {
|
||||
saveFileWithDialog: (
|
||||
opts: SaveFileWithDialogOptions
|
||||
) => Promise<SaveFileResponse>
|
||||
|
||||
/**
|
||||
* Opens a link in the user's browser.
|
||||
* The expected behaviour is for the browser to open a new tab/window (for example in desktop app) with the given URL.
|
||||
* @param url The URL to open
|
||||
*/
|
||||
openExternalLink: (url: string) => Promise<void>
|
||||
}
|
||||
|
||||
@@ -34,4 +34,10 @@ export const browserIODef: IOPlatformDef = {
|
||||
// Browsers provide no way for us to know the save went successfully.
|
||||
return Promise.resolve({ type: "unknown" })
|
||||
},
|
||||
openExternalLink(url) {
|
||||
window.open(url, "_blank")
|
||||
|
||||
// Browsers provide no way for us to know the open went successfully.
|
||||
return Promise.resolve()
|
||||
},
|
||||
}
|
||||
|
||||
@@ -14,6 +14,7 @@ import IconGitHub from "~icons/lucide/github"
|
||||
import IconBook from "~icons/lucide/book"
|
||||
import IconLifeBuoy from "~icons/lucide/life-buoy"
|
||||
import IconZap from "~icons/lucide/zap"
|
||||
import { platform } from "~/platform"
|
||||
|
||||
type Doc = {
|
||||
text: string | string[]
|
||||
@@ -113,7 +114,7 @@ export class GeneralSpotlightSearcherService extends StaticSpotlightSearcherServ
|
||||
}
|
||||
|
||||
private openURL(url: string) {
|
||||
window.open(url, "_blank")
|
||||
platform.io.openExternalLink(url)
|
||||
}
|
||||
|
||||
public onDocSelected(id: string): void {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { IOPlatformDef } from "@hoppscotch/common/platform/io"
|
||||
import { save } from "@tauri-apps/api/dialog"
|
||||
import { open } from "@tauri-apps/api/shell"
|
||||
import { writeBinaryFile, writeTextFile } from "@tauri-apps/api/fs"
|
||||
|
||||
export const ioDef: IOPlatformDef = {
|
||||
@@ -21,4 +22,7 @@ export const ioDef: IOPlatformDef = {
|
||||
|
||||
return { type: "saved", path }
|
||||
},
|
||||
openExternalLink(url) {
|
||||
return open(url)
|
||||
},
|
||||
}
|
||||
|
||||
8
packages/hoppscotch-selfhost-web/postcss.config.cjs
Normal file
8
packages/hoppscotch-selfhost-web/postcss.config.cjs
Normal file
@@ -0,0 +1,8 @@
|
||||
const config = {
|
||||
plugins: {
|
||||
tailwindcss: {},
|
||||
autoprefixer: {},
|
||||
},
|
||||
}
|
||||
|
||||
module.exports = config
|
||||
Reference in New Issue
Block a user