diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2017-10-27 15:45:43 +0200 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2017-10-27 15:45:43 +0200 |
commit | 67562214e8a92a42198a44d5e984829d8305e082 (patch) | |
tree | 35110a1b539872329238db458987f2bd58a4879a /java | |
parent | 974daf882360dfb73058920ce62584b4f520b54c (diff) | |
download | share-67562214e8a92a42198a44d5e984829d8305e082.zip share-67562214e8a92a42198a44d5e984829d8305e082.tar.gz |
ViewMain : add usefull links
Diffstat (limited to 'java')
-rw-r--r-- | java/vaadin-u2f/src/main/java/ch/asynk/ui/ViewMain.java | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/java/vaadin-u2f/src/main/java/ch/asynk/ui/ViewMain.java b/java/vaadin-u2f/src/main/java/ch/asynk/ui/ViewMain.java index 8fae5f0..34edc9e 100644 --- a/java/vaadin-u2f/src/main/java/ch/asynk/ui/ViewMain.java +++ b/java/vaadin-u2f/src/main/java/ch/asynk/ui/ViewMain.java @@ -4,12 +4,14 @@ import com.vaadin.data.validator.RegexpValidator; import com.vaadin.navigator.View; import com.vaadin.navigator.ViewChangeListener.ViewChangeEvent; import com.vaadin.server.Page; +import com.vaadin.server.ExternalResource; import com.vaadin.data.Binder; import com.vaadin.ui.Alignment; import com.vaadin.ui.Button; import com.vaadin.ui.Component; import com.vaadin.ui.Image; import com.vaadin.ui.Label; +import com.vaadin.ui.Link; import com.vaadin.ui.Notification; import com.vaadin.ui.Panel; import com.vaadin.ui.TabSheet; @@ -34,6 +36,10 @@ public class ViewMain extends TabSheet implements View, U2fConnector.U2fListener private static final String U2F_TITLE = "FIDO U2F (Universal 2nd factor)"; + private static final String l1 = "https://demo.yubico.com/u2f"; + private static final String l2 = "https://developers.yubico.com/U2F/App_ID.html"; + private static final String l3 = "https://developers.yubico.com/U2F/Libraries/Client_error_codes.html"; + private final Window u2fWindow; private final U2fConnector u2fConnector; @@ -98,10 +104,20 @@ public class ViewMain extends TabSheet implements View, U2fConnector.U2fListener vl.setMargin(true); vl.setSizeFull(); vl.addComponent(panel); + vl.addComponent(setLink(l1)); + vl.addComponent(setLink(l2)); + vl.addComponent(setLink(l3)); vl.setComponentAlignment(panel, Alignment.MIDDLE_CENTER); return vl; } + private Link setLink(final String url) + { + Link link = new Link(url, new ExternalResource(url)); + link.setTargetName("_blank"); + return link; + } + private void tryAction(Action action, Login login) { final String userId = login.getLogin(); |