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

New option 'navigate_local' #21

Merged
merged 1 commit into from
Jan 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,15 @@ update_interval: 1
static_picture: http://192.168.1.174/cgi-bin/api.cgi?cmd=Snap&channel=0&rs=someString&user=username&password=password
navigate: https://github.com/dimagoltsman/refreshable-picture-card/
```
navigate_local example (onclick, change local/lovelace tab):

```
type: 'custom:refreshable-picture-card'
title: Reolink Camera
update_interval: 1
static_picture: http://192.168.1.174/cgi-bin/api.cgi?cmd=Snap&channel=0&rs=someString&user=username&password=password
navigate_local: camera
```


# you are also welcome to contribute #
Expand Down
2 changes: 2 additions & 0 deletions dist/refreshable-picture-card.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ class ResfeshablePictureCard extends HTMLElement {
);
}else if(config.navigate){
window.open(config.navigate);
}else if(config.navigate_local){
window.location.assign(config.navigate_local);
}

};
Expand Down