bakes82 167 Posted December 3, 2024 Posted December 3, 2024 @softworkzIs there a way to have a popup/alert from a run command? EX Press button, do work, then popup or trigger a new tab to open? Or do I need to set a captionitem with like a hidden visibility flag after do work change flag so item shows, then user has to click link, I havent tried but will it render an a tag link?
softworkz 5066 Posted December 3, 2024 Posted December 3, 2024 Do you mean something like this? 20241203-0537-32.7355642.mp4
bakes82 167 Posted December 3, 2024 Author Posted December 3, 2024 @softworkzI was hoping more external site like a true anchor tag. But if I can popup a window with the url for them to click on that can also work.
softworkz 5066 Posted December 3, 2024 Posted December 3, 2024 I had written this yesterday but forgot to send: For those kinds of "Do you really wanna do this?" message boxes, there's a Emby SDK Reference: ButtonItem.ConfirmationPrompt property on Emby SDK Reference: EditorTypes.ButtonItem elements. When you set the text, a messagebox will be shown and the command will only be executed when the user confirms. 32 minutes ago, bakes82 said: @softworkzI was hoping more external site like a true anchor tag. But if I can popup a window with the url for them to click on that can also work. But now I see you're asking for something different. Generally, links to external web content should be avoided because it disrupts the operational flow in navigation and many apps (like those being shown on TV screens) either don't have the ability to open browser windows (Android TV OS for example doesn't even have a browser app) or even if they have, you wouldn't be able to navigate back to the Emby app. But it depends on the plugin purpose. It your UI is only meant to be used from a browser with mouse/keyboard input for doing the configuration, then there's no problem when having links in the UI. That being said, there are two UI elements which have a Hyperlink property: Emby SDK Reference: LabelItem.HyperLink Emby SDK Reference: GenericListItem.HyperLink In case of the Emby SDK Reference: LabelItem, the text will be shown as a link and the link will be launched in an external window. Whether it's a browser tab or a new browser window is app-specific. In case of the web app, it opens in a new tab. For the GenericListItem, the whole item will become clickable (color change on hover and mouse cursor changes to link cursor) and the link will cause navigation in the current window (I have a backlog entry for adding a property to enable opening externally). For indicating ongoing work, you can use a Emby SDK Reference: StatusItem and set its Emby SDK Reference: StatusItem.Status property to Emby SDK Reference: ItemStatus.InProgress . When the work is done, you can set it to Emby SDK Reference: ItemStatus.Succeeded and set Emby SDK Reference: CaptionItem.IsVisible to true.
softworkz 5066 Posted December 4, 2024 Posted December 4, 2024 It's been a while since I promised to provide example code for working with dialogs and wizards. I hadn't forgotten, just short on time, but it's done now: 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now