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

Feature request: Allow default external route/id to be customized #472

Closed
pReya opened this issue Apr 30, 2023 · 7 comments
Closed

Feature request: Allow default external route/id to be customized #472

pReya opened this issue Apr 30, 2023 · 7 comments

Comments

@pReya
Copy link
Contributor

pReya commented Apr 30, 2023

It would be very nice, if the default route/id inside of the external app could be customized. E.g. the App that gets loaded when you open the URL /apps/external (without any ID/parameter). It will lead you to /apps/external/1 by default.

This is necessary, because when you try to set the external app as your defaultapp in the Nextcloud config, you can't pass in any id or parameters (e.g. external/2 will not work as a value for defaultapp in your Nextcloud config).

So if you want to use any of the external apps as your Nextcloud defaultapp, you always need to make it have id 1, which can require some manuel DB editing. Instead it would be nice if there was a checkbox/radiobox/dropdown next to the individual external sites and you could pick one to be the default route target.

I'd be happy to contribute a PR, if I get positive feedback on this feature request.

@provokateurin
Copy link
Member

Hi, how are you setting the default app? Are you using https://apps.nextcloud.com/apps/apporder? The app no longer works on Nextcloud 25+ (See https://github.com/juliushaertl/apporder). I think you will have to request this feature in nextcloud/server#4917. The implementation should not just iterate the apps but the actual navigation entries.

@pReya
Copy link
Contributor Author

pReya commented Aug 22, 2023

Hi, how are you setting the default app? Are you using https://apps.nextcloud.com/apps/apporder? The app no longer works on Nextcloud 25+ (See https://github.com/juliushaertl/apporder). I think you will have to request this feature in nextcloud/server#4917. The implementation should not just iterate the apps but the actual navigation entries.

Hey @provokateurin, I was talking about setting the default app via NC's defaultapp config parameter – this works without any Apps. It's a default feature of Nextcloud.

If you have external app installed, you can set defaultapp to external, but you can't specify WHICH external site it will load. It will always be the one that you created first inside of the external app.

To customize this, it would be nice, to pick one of the external sites as the default.

@provokateurin
Copy link
Member

Ah I see. Unfortunately that would require significant changes in the server and I don't think the amount of effort is justified. If someone wants to create a PR for this I will be happy to review it.

@provokateurin
Copy link
Member

This actually has been fixed in nextcloud/server#47523 and will be available in Nextcloud 31.

@pReya
Copy link
Contributor Author

pReya commented Oct 16, 2024

This actually has been fixed in nextcloud/server#47523 and will be available in Nextcloud 31.

Hey @provokateurin I tried to follow the changes in the linked PR, but I'm afraid I don't enough about Nextcloud internals to understand how this PR and this issue here relate to one another. Could you explain it to me? How does the linked PR solve the problem that I described in this issue here?

@provokateurin
Copy link
Member

defaultapp was buggy in the sense that it tried to use the app IDs and not the navigation entry IDs.
For most apps it was fine, but not for this app, as it used entry IDs that are not the same as the app ID.
So to set an external site as the default app, you need to set defaultapp to external_index$ with $ being the index you can see in the URL:

'id' => 'external_index' . $site['id'],

Please note that this fix will only be in Nextcloud 31, as it involved adding new interfaces which we don't backport to older versions.

@pReya
Copy link
Contributor Author

pReya commented Oct 16, 2024

Thanks a lot for the explanation! Looking forward to try it out in v31

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

No branches or pull requests

3 participants