Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a new setting to open links in a new window #5592

Draft
wants to merge 2 commits into
base: development
Choose a base branch
from

Conversation

pakoito
Copy link

@pakoito pakoito commented Aug 20, 2024

Title

Pull Request Type

  • Bugfix
  • Feature Implementation
  • Documentation
  • Other

Related issue

Closes #1501

Description

It adds a global setting that makes freetube:// links be opened in a new window

Screenshots

Testing

I have not been able to pull the dependencies from yarn, as it errors in one of them. Thus, I have not been able to test the generation of the settings or whether the implementation is correct.

Desktop

  • OS: Windows
  • OS Version: 10
  • FreeTube version: 0.21.3 beta

Additional context

The PR is as-is for someone else to finalize and land.

@pakoito pakoito marked this pull request as draft August 20, 2024 22:40
@github-actions github-actions bot added PR: waiting for review For PRs that are complete, tested, and ready for review and removed PR: waiting for review For PRs that are complete, tested, and ready for review labels Aug 20, 2024
if (mainWindow && mainWindow.webContents) {
mainWindow.webContents.send(IpcChannels.OPEN_URL, baseUrl(url))
if (isOpenLinkInNewWindow()) {
createWindow({ replaceMainWindow: false, windowStartupUrl: startUrl, showWindowNow: true })
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is probably an IPC to open a new window.

@@ -820,7 +824,11 @@ function runApp() {

ipcMain.once(IpcChannels.APP_READY, () => {
if (startupUrl) {
mainWindow.webContents.send(IpcChannels.OPEN_URL, startupUrl)
if (isOpenLinkInNewWindow()) {
Copy link
Author

@pakoito pakoito Aug 20, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should probably check if there's already content on the window too.

Copy link
Contributor

This PR is stale because it has been open 28 days with no activity. Remove stale label or comment or this will be closed in 14 days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add option to always open a redirected video in a new FreeTube window / instance
1 participant