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

fix(patchers): @nextcloud/router@3 compatibility #537

Merged
merged 3 commits into from
Feb 26, 2024

Conversation

ShGKme
Copy link
Contributor

@ShGKme ShGKme commented Feb 26, 2024

☑️ Resolves

  • Talk Desktop is not possible to build because it is not compatible with @nextcloud/router@3

🚧 Tasks

  • Export getBaseUrl
  • Change how globals are defined. Instead of bundling them via ProvidePlugin, actually define globals in window same as Server works.
    • Define window._oc_webroot + window._oc_appswebroots for @nextcloud/router

Signed-off-by: Grigorii K. Shartsev <me@shgk.me>
Signed-off-by: Grigorii K. Shartsev <me@shgk.me>
Signed-off-by: Grigorii K. Shartsev <me@shgk.me>
@ShGKme ShGKme requested a review from Antreesy February 26, 2024 15:35
@ShGKme ShGKme self-assigned this Feb 26, 2024
@ShGKme ShGKme requested a review from DorraJaouad February 26, 2024 15:38
Copy link
Contributor

@Antreesy Antreesy left a comment

Choose a reason for hiding this comment

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

Tested, compiled on Linux correctly

@@ -25,6 +25,10 @@ import { getRootUrl, generateFilePath as _generateFilePath } from '@desktop-modu

export { linkTo, getRootUrl, generateUrl } from '@desktop-modules--@nextcloud/router'

// getBaseUrl added in v3.0.0
// On Talk Desktop same as getRootUrl, because getRootUrl is absolute already
export const getBaseUrl = getRootUrl
Copy link
Contributor

Choose a reason for hiding this comment

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

Now we should be careful about it, I think

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Or find a better solution to handle requests and URL...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

But I have no ideas

@ShGKme ShGKme merged commit af77134 into main Feb 26, 2024
6 checks passed
@delete-merged-branch delete-merged-branch bot deleted the fix/nextcloud-router-3-compatibility branch February 26, 2024 16:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants