I'm trying to make a small tauri app with the same menu on the top of each page. I followed this tutorial, "Adding the menu to all windows" section. I can see the menu, I can quit the app with it, but I can't find out how to go to another hmtl page when cliked.
I've got this piece of code but I have no idea what to put under "accel"
.on_menu_event(|event| {
match event.menu_item_id() {
"quit" => {
std::process::exit(0);
}
"close" => {
event.window().close().unwrap();
}
"accel" => {
//not working, as you can imagine
//tauri::WindowUrl::App("index.html".into());
//I would like tauri to display index.html in the main window
}
_ => {}
}
})
Does someone has an idea on how to do that ? I've found dozen of example code with menus but none showed what I'm looking for (or I'm unable to point out the line I need)
Thanks for your help !
I finally got the answer from the tauri discord chat, I hope it can be useful to someone?
window.eval("window.location.replace('your.url')");
made the job
Related
Ok, so I'm just getting started with adaptive cards and downloaded the PNP ACE project (Git Hub Link) to use as a jumping off point. Started the project up and ran gulp serve.... everything seemed great.... until I tried to click either the View Items or Add Item buttons on the CardView. Both of these buttons fire QuickViews, but when you click them nothing happened. Tried 2 different browsers, no errors registered in the console, it just acts like there isn't an action tied to the buttons.
So, thinking "well maybe something got screwed up in a commit", I started a brand new project using yeoman.
Got the project set up, building and served it up; EXACT SAME PROBLEM!! The button in the default ACE project template didn't work either. I can't figure out what gives.
Here is the function for the button that the template created :
public get cardButtons(): [ICardButton] | [ICardButton, ICardButton] | undefined {
return [
{
title: strings.QuickViewButton,
action: {
type: 'QuickView',
parameters: {
view: QUICK_VIEW_REGISTRY_ID
}
}
}
]};
That looks just like the PNP example (and every other example I've seen online). Even the quickViewNavigator is populated the same. Here is the one from the template project (class definitions removed to save space):
const CARD_VIEW_REGISTRY_ID: string = 'JasonAdaptiveTest_CARD_VIEW';
export const QUICK_VIEW_REGISTRY_ID: string = 'JasonAdaptiveTest_QUICK_VIEW';
public onInit(): Promise<void> {
this.state = { };
this.cardNavigator.register(CARD_VIEW_REGISTRY_ID, () => new CardView());
this.quickViewNavigator.register(QUICK_VIEW_REGISTRY_ID, () => new QuickView());
return Promise.resolve();
}
So what gives? Why do these not work? Is there some NPM package that may be missing?
Well, found the line buried in the tutorials that explains my problem. A single note, in a page that isn't necessarily about quick views.
Note
ACE interaction is disabled while in Edit mode. The Workbench or Page must be >in Preview or Read mode to interact with the ACE.
My capsule was working good and still working good if used on BixbyStudio-6.8.1-r19f.7483-win but after the latest update, my capsule is reading message twice on selection page. My message is
Please select one of the following
it is showing proper on the screen but while reading, it is reading like
Please select one of the following ... press back if you want to pick
up where you left off ... Please select one of the following
The message "press back if you want to pick up where you left off" keep changing in every hit. Sometimes it says
what you you like to do next
Every other message is good but this is happening on selection page.
My selection code is
input-view {
match: FoodChoiceResult (this)
render {
if (size(this.multiple_choice)>0){
selection-of (this) {
navigation-mode {
read-many {
page-size (3)
page-content{
underflow-statement (This is the final set)
item-selection-question (Please select one of the following)
overflow-statement (That's all I have)
}
}
}
has-details (false)
where-each (item) {
layout-macro (food-type-summary) {
param (singleFoodItem) {
expression (item)
}
}
}
}
}
}
}
please suggest if this is issue from end.
Yes, this one is on us.
IDE simulator has this issue. There is a bug. Our IDE engineers are working toward a solution.
Meanwhile on-device testing should be ok, voice output should only speak once and with no additional content.
Sorry about the inconvenience.
I will post updates regarding this issue here.
===
IDE release version 6.14.0 should fix this issue, please verify.
I use node js, selenium server standalone with chromedriver and webdriver.io
I want to say that if buttonxyz .isVisible or .isExisting that my script is using .click() on it. If the button does not exist the function will be ignored.
so webdriver.io told me this
client.isExisting('#someRandomNonExistingElement').then(function(isExisting) {
console.log(isExisting); // outputs: false
})
I want a structure like this
client.isExisting('#someRandomNonExistingElement').then(function(isExisting) {
client.click('#someRandomNonExistingElement')
})
But it´s not working for me. the script stops on pages where the buttons don't exist and if the CSS selector is existing the function does not work.
Then I tried something like
.isExisting('.buttoncsshere').click('buttoncsshere')
Well with this code it clicks on the button if it exist, but if the button not exist the script stop working. Sorry I´am a newbie code girl can you help me pls
EDIT: this was the solution for me
.isVisible('css').then(function(isVisible) {
if (isVisible) {
client
.click('css')
.pause(1000)
}
})
Using pause() compromises the robustness of your tests. Especially if you have network latency issues. You really should be using waitForVisible. http://webdriver.io/api/utility/waitForVisible.html
client.waitForVisible('css')
.click('css')
I am trying to achieve the same effect that is seen in this example of the hallo editor, and here is a screenshot:
Basically I would rather have the editor appear above the current content that is being edited than at the top of the page. Is this something that can be achieved by passing settings to midgardeCreate()?
I thought something along these lines would get me on the right track, but this keeps the editor at the top of the page.
jQuery('body').midgardCreate('configureEditor', 'default', 'halloWidget', {
plugins: {
halloformat: {},
halloblacklist: {
tags: ['br']
}
},
toolbarState: 'halloToolbarFixed',
parentElement: '.create-ui-toolbar-dynamictoolarea .create-ui-tool-freearea'
});
I haven't worked with midgard, but I have used hallo. I think the only change you need to make is here:
toolbarState: 'halloToolbarFixed',
to:
toolbar: 'halloToolbarFixed',
I'm currently working with Three20 in an iOS project. I've got the TTLauncherView displaying with a few icons. However, I can't see to get them to open their views in an animated fashion as with the Facebook app. I've tried:
[[TTNavigator navigator] openURLAction:[[TTURLAction actionWithURLPath:#"sb://launcher"] applyAnimated:YES]];
as well as
[[TTNavigator navigator] openURLAction:[[TTURLAction actionWithURLPath:URL.absoluteString] applyTransition:UIViewAnimationTransitionCurlDown]];
I also can't find anything on this documentation: https://github.com/facebook/three20/blob/60340d76780ac5ab8a5dc853e3577b1c854eb6e0/src/Three20/TTNavigator.h
Any help?
Thanks!
This should work. I just tried this in my code and the curl down transition works like expected. Here is the code which gets executed when the user taps an icon in the launcher:
- (void)launcherView:(TTLauncherView*)launcher didSelectItem:(TTLauncherItem*)item {
[[TTNavigator navigator] openURLAction:[[[TTURLAction actionWithURLPath:item.URL] applyTransition:UIViewAnimationTransitionCurlDown] applyAnimated:YES] ];
}
Hope this helps.