Skip to content

Commit

Permalink
v2.5.1
Browse files Browse the repository at this point in the history
  • Loading branch information
solvedDev authored Dec 10, 2022
2 parents 9d9315d + cc2ce5b commit b4b45dd
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 16 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bridge",
"version": "2.5.0",
"version": "2.5.1",
"private": true,
"scripts": {
"dev": "vite",
Expand Down
8 changes: 7 additions & 1 deletion src/App.ts
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,13 @@ export class App {
)
}

static openUrl(url: string, id?: string, openInBrowser = false) {
static async openUrl(url: string, id?: string, openInBrowser = false) {
if (import.meta.env.VITE_IS_TAURI_APP) {
const { open } = await import('@tauri-apps/api/shell')

return open(url)
}

if (settingsState?.general?.openLinksInBrowser || openInBrowser)
return window.open(url, '_blank')
return window.open(url, id, 'toolbar=no,menubar=no,status=no')
Expand Down
2 changes: 1 addition & 1 deletion src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
"
/>

<BottomPanel />
<BottomPanel v-if="!$vuetify.breakpoint.mobile" />
</v-col>
</v-row>
</v-main>
Expand Down
2 changes: 1 addition & 1 deletion src/components/Composables/Sidebar/useSidebarState.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { App } from '/@/App'
export function useSidebarState() {
const isNavVisible = computed(() => App.sidebar.isNavigationVisible.value)
const isContentVisible = computed(
() => isNavVisible && App.sidebar.isContentVisible.value
() => isNavVisible.value && App.sidebar.isContentVisible.value
)
const isAttachedRight = computed(
() => settingsState.sidebar && settingsState.sidebar.isSidebarRight
Expand Down
3 changes: 2 additions & 1 deletion src/components/Extensions/Scripts/Modules/utils.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { IModuleConfig } from '../types'
import { App } from '/@/App'

export const UtilsModule = ({}: IModuleConfig) => ({
openExternal: (url: string) => window.open(url, '_blank'),
openExternal: (url: string) => App.openUrl(url, undefined, true),
})
21 changes: 13 additions & 8 deletions src/components/Toolbar/Category/help.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ export function setupHelpCategory(app: App) {
icon: 'mdi-alert-decagram',
description: 'actions.releases.description',
onTrigger: () =>
window.open(
App.openUrl(
'https://github.com/bridge-core/editor/releases',
'_blank'
undefined,
true
),
})
)
Expand All @@ -22,9 +23,10 @@ export function setupHelpCategory(app: App) {
icon: 'mdi-bug-outline',
description: 'actions.bugReports.description',
onTrigger: () =>
window.open(
App.openUrl(
'https://github.com/bridge-core/editor/issues/new/choose',
'_blank'
undefined,
true
),
})
)
Expand All @@ -34,7 +36,7 @@ export function setupHelpCategory(app: App) {
icon: 'mdi-twitter',
description: 'actions.twitter.description',
onTrigger: () =>
window.open('https://twitter.com/bridgeIDE', '_blank'),
App.openUrl('https://twitter.com/bridgeIDE', undefined, true),
})
)

Expand All @@ -48,7 +50,8 @@ export function setupHelpCategory(app: App) {
onTrigger: () =>
App.openUrl(
'https://bridge-core.github.io/extension-docs/',
'_blank'
undefined,
true
),
})
)
Expand All @@ -60,7 +63,8 @@ export function setupHelpCategory(app: App) {
onTrigger: () =>
App.openUrl(
'https://bridge-core.github.io/editor-docs/getting-started/',
'_blank'
undefined,
true
),
})
)
Expand All @@ -72,7 +76,8 @@ export function setupHelpCategory(app: App) {
onTrigger: () =>
App.openUrl(
'https://bridge-core.github.io/editor-docs/faq/',
'_blank'
undefined,
true
),
})
)
Expand Down
7 changes: 4 additions & 3 deletions src/components/Windows/Socials/Main.vue
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
<script lang="ts" setup>
import { useTranslations } from '../../Composables/useTranslations'
import BaseWindow from '../Layout/BaseWindow.vue'
import { App } from '/@/App'
const { t } = useTranslations()
Expand All @@ -50,12 +51,12 @@ function close() {
props.window.close()
}
function openDiscord() {
window.open('https://discord.gg/jj2PmqU', '_blank')
App.openUrl('https://discord.gg/jj2PmqU', undefined, true)
}
function openTwitter() {
window.open('https://twitter.com/bridgeIDE', '_blank')
App.openUrl('https://twitter.com/bridgeIDE', undefined, true)
}
function openGithub() {
window.open('https://github.com/bridge-core', '_blank')
App.openUrl('https://github.com/bridge-core', undefined, true)
}
</script>

0 comments on commit b4b45dd

Please sign in to comment.