No, not at all. For something like this there are a couple of other options. If you want to use the same actionModal method, then you can just create a widget with the switch you want and use widget:widget_name in the modal property instead of page:page_name. For more advanced control over what pops up, you can incorporate a f7-popup directly into the widget that you want to be the source of the popup switch.
There are two issues that I see, both relating to your use of oh-icon as the interactive element.
The f7-popup does not have to be a child of the the element that is calling it. In fact, in this case, it cannot be because an oh-icon doesn’t have any slots, default or otherwise. So right now your popup isn’t showing because it’s not ever even being rendered; the UI just never even looks in for components in slots under an oh-icon. Shift the whole popup structure until it’s aligned with something higher up. I usually just put it as one of the children of the root component after the other regular parts of the widget. Something like this:
The oh-icon is not one of the widgets that has the .popupOpen property. The popupOpen comes from the f7 framework, so only the components that are modified versions of the f7 components that support this will work here (one of the quick and easy ways to know what options are available is to press ctrl + space when editing the config section of a component and look through the context menu that pops up). oh-link is one of those and that will allow you to put an oh-icon in its default slot. So you probably want something like this:
Sorry, my mistake. Yes, working on click on the left side picture. But I want open a window when I will click on the power icon. So if isn’t working f7 popup, I changed to this :
If you open a popup using this method then I don’t think you have any control over the size of the window that opens. This is meant to be a low-code, one-size-fits-most option. If you want to control the actual size of the popup window then you have to use the f7-popup again. Fortunately you can easily add a widget as a component of its own:
- component: widget:name_of_widget
So you would just make the f7-popup as before and put the widget as a component of that widget. Then you can control the exact size of the popup with height and width styles:
Your style section is not indented properly under the config key.
Easy enough. Just like there’s a popupOpen property, there’s a popupClose property and it also just takes the css selector of the popup you want to close. So, you just have to add an oh-link to the popup itself that uses popupClose.
Hint: In this case you can also just set popupClose to true instead of the popup selector because it will, by default, cause whatever popup is currently open to close.