Inline desktop external links

This commit is contained in:
2026-06-21 14:28:31 +02:00
parent e284f030ae
commit b93b650689
5 changed files with 7 additions and 25 deletions

View File

@@ -1,12 +0,0 @@
defmodule BDS.Desktop.ExternalLinks do
@moduledoc false
@github_url "https://github.com/rfc1437/bDS2"
@github_issues_url "#{@github_url}/issues"
@spec github_url() :: String.t()
def github_url, do: @github_url
@spec github_issues_url() :: String.t()
def github_issues_url, do: @github_issues_url
end

View File

@@ -2,7 +2,7 @@ defmodule BDS.Desktop.MenuBar do
@moduledoc false
use BDS.Desktop.MenuCompat
alias BDS.Desktop.{ExternalLinks, ShellData, Shutdown, UILocale}
alias BDS.Desktop.{ShellData, Shutdown, UILocale}
alias BDS.UI.Commands
alias BDS.UI.MenuBar, as: ShellMenuBar
alias Desktop.OS
@@ -59,7 +59,7 @@ defmodule BDS.Desktop.MenuBar do
end
def handle_event("view_on_github", menu) do
OS.launch_default_browser(ExternalLinks.github_url())
OS.launch_default_browser("https://github.com/rfc1437/bDS2")
{:noreply, menu}
end
@@ -78,7 +78,7 @@ defmodule BDS.Desktop.MenuBar do
end
def handle_event("report_issue", menu) do
OS.launch_default_browser(ExternalLinks.github_issues_url())
OS.launch_default_browser("https://github.com/rfc1437/bDS2/issues")
{:noreply, menu}
end

View File

@@ -7,7 +7,7 @@ defmodule BDS.Desktop.ShellLive do
alias BDS.{AI, Blogmark, BoundedAtoms, Metadata}
alias BDS.CliSync.Watcher
alias BDS.Desktop.{ExternalLinks, FilePicker, FolderPicker, ShellData, UILocale}
alias BDS.Desktop.{FilePicker, FolderPicker, ShellData, UILocale}
alias BDS.Desktop.ShellLive.{
Bridges,
@@ -1326,12 +1326,12 @@ defmodule BDS.Desktop.ShellLive do
end
defp handle_socket_menu_action(socket, :view_on_github) do
OS.launch_default_browser(ExternalLinks.github_url())
OS.launch_default_browser("https://github.com/rfc1437/bDS2")
socket
end
defp handle_socket_menu_action(socket, :report_issue) do
OS.launch_default_browser(ExternalLinks.github_issues_url())
OS.launch_default_browser("https://github.com/rfc1437/bDS2/issues")
socket
end