-
-
Notifications
You must be signed in to change notification settings - Fork 3
Feature/shared hubs #83
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
base: develop
Are you sure you want to change the base?
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| using OpenShock.Desktop.ModuleBase.StableInterfaces; | ||
|
|
||
| namespace OpenShock.Desktop.Models; | ||
|
|
||
| /// <summary> | ||
| /// A user who has shared one or more of their hubs' shockers with the current user, grouped for display so the UI can | ||
| /// attribute shared hubs to the person that owns them. | ||
| /// </summary> | ||
| public sealed class SharedHubOwner | ||
| { | ||
| public required Guid Id { get; init; } | ||
| public required string Name { get; init; } | ||
| public Uri? Image { get; init; } | ||
| public required IReadOnlyList<IOpenShockHub> Hubs { get; init; } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -66,6 +66,7 @@ public async Task Authenticate() | |
|
|
||
| _logger.LogInformation("Refreshing shockers"); | ||
| await _apiClient.RefreshHubs(); | ||
| await _apiClient.RefreshSharedHubs(); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
On startup or re-auth, Useful? React with 👍 / 👎. |
||
|
|
||
| await _liveControlManager.RefreshConnections(); | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When a shared shocker is first discovered, this defaults
Enabledtofalse, but the only enable checkbox I found is inDesktop/Ui/Pages/Dash/Tabs/ShockersTab/ShockersTab.razorand it renders onlyOpenShockApi.Hubs.Value.SelectMany(...), i.e. owned hubs. In the normal UI flow a newly shared shocker therefore stays disabled forever, soBackendHubManager.CanControlandIsLiveControllablefilter it out even when the user has permissions; include shared shockers in the opt-in UI or provide another persisted opt-in path.Useful? React with 👍 / 👎.