anastasis-gtk

Demonstrator GUI for Anastasis
Log | Files | Refs | README | LICENSE

anastasis_gtk_auth_add_totp.ui (10188B)


      1 <?xml version="1.0" encoding="UTF-8"?>
      2 <!--
      3 Copyright (C) 2019-2021 Anastasis SARL
      4 
      5 This file is part of anastasis-gtk.
      6 
      7 anastasis-gtk is free software: you can redistribute it and/or modify
      8 it under the terms of the GNU General Public License as published by
      9 the Free Software Foundation, either version 3 of the License, or
     10 (at your option) any later version.
     11 
     12 anastasis-gtk is distributed in the hope that it will be useful,
     13 but WITHOUT ANY WARRANTY; without even the implied warranty of
     14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     15 GNU General Public License for more details.
     16 
     17 You should have received a copy of the GNU General Public License
     18 along with anastasis-gtk.  If not, see <http://www.gnu.org/licenses/>.
     19 
     20 Author: Belen Pena, Christian Grothoff, Dennis Neufeld-->
     21 <interface>
     22   <requires lib="gtk" version="4.0"/>
     23   <object class="GtkDialog" id="anastasis_gtk_b_totp_dialog">
     24     <property name="focus-widget">anastasis_gtk_b_totp_dialog_name_entry</property>
     25     <property name="default-widget">anastasis_gtk_b_totp_dialog_btn_ok</property>
     26     <signal name="response" handler="anastasis_gtk_b_totp_dialog_response_cb" swapped="no"/>
     27     <child internal-child="content_area">
     28       <object class="GtkBox">
     29         <property name="orientation">vertical</property>
     30         <property name="spacing">2</property>
     31         <child>
     32           <object class="GtkBox">
     33             <property name="orientation">vertical</property>
     34             <property name="margin-top">5</property>
     35             <property name="margin-bottom">5</property>
     36             <child>
     37               <object class="GtkLabel" id="explainer_label">
     38                 <property name="name">explainer_label</property>
     39                 <property name="label" translatable="1">For TOTP authentication, you need to set a name for the TOTP secret.
     40 Then, you must scan the generated QR code with your TOTP App to
     41 import the TOTP secret it into your TOTP App.</property>
     42                 <property name="use-markup">1</property>
     43                 <property name="margin-top">20</property>
     44                 <property name="margin-bottom">20</property>
     45               </object>
     46             </child>
     47             <child>
     48               <object class="GtkBox">
     49                 <property name="valign">center</property>
     50                 <property name="margin-bottom">55</property>
     51                 <property name="orientation">vertical</property>
     52                 <property name="margin-top">5</property>
     53                 <property name="vexpand">0</property>
     54                 <child>
     55                   <object class="GtkLabel">
     56                     <property name="valign">center</property>
     57                     <property name="halign">start</property>
     58                     <property name="margin-start">25</property>
     59                     <property name="margin-end">25</property>
     60                     <property name="label" translatable="1">TOTP Name</property>
     61                     <property name="margin-top">5</property>
     62                     <property name="margin-bottom">5</property>
     63                   </object>
     64                 </child>
     65                 <child>
     66                   <object class="GtkEntry" id="anastasis_gtk_b_totp_dialog_name_entry">
     67                     <property name="vexpand">1</property>
     68                     <property name="focusable">1</property>
     69                     <property name="margin-start">25</property>
     70                     <property name="margin-end">25</property>
     71                     <property name="hexpand">1</property>
     72                     <property name="activates-default">1</property>
     73                     <property name="width-chars">36</property>
     74                     <property name="text" translatable="1">Anastasis</property>
     75                     <property name="primary-icon-name">dialog-information</property>
     76                     <property name="input-purpose">name</property>
     77                     <signal name="changed" handler="anastasis_gtk_b_totp_dialog_name_entry_changed_cb" swapped="no"/>
     78                     <property name="margin-top">5</property>
     79                     <property name="margin-bottom">5</property>
     80                   </object>
     81                 </child>
     82                 <child>
     83                   <object class="GtkImage" id="qr_image">
     84                     <property name="valign">center</property>
     85                     <property name="name">qr_image</property>
     86                     <property name="halign">center</property>
     87                     <property name="margin-start">25</property>
     88                     <property name="margin-end">25</property>
     89                     <property name="margin-top">30</property>
     90                     <property name="margin-bottom">30</property>
     91                     <property name="icon-name">image-missing</property>
     92                     <property name="icon-size">large</property>
     93                   </object>
     94                 </child>
     95               </object>
     96             </child>
     97             <child>
     98               <object class="GtkBox">
     99                 <property name="orientation">vertical</property>
    100                 <child>
    101                   <object class="GtkLabel">
    102                     <property name="halign">start</property>
    103                     <property name="margin-start">10</property>
    104                     <property name="margin-end">10</property>
    105                     <property name="label" translatable="1">Confirm that your TOTP App works by entering the current 8-digit TOTP code here:</property>
    106                     <property name="margin-top">5</property>
    107                     <property name="margin-bottom">5</property>
    108                   </object>
    109                 </child>
    110                 <child>
    111                   <object class="GtkEntry" id="totp_entry">
    112                     <property name="focusable">1</property>
    113                     <property name="tooltip-text" translatable="1">Enter the 8-digit TOTP code. Valid for 30s.</property>
    114                     <property name="max-length">9</property>
    115                     <property name="activates-default">1</property>
    116                     <property name="max-width-chars">9</property>
    117                     <property name="primary-icon-name">dialog-question</property>
    118                     <property name="placeholder-text" translatable="1">00000000</property>
    119                     <property name="input-purpose">number</property>
    120                     <signal name="changed" handler="totp_entry_changed_cb" swapped="no"/>
    121                     <property name="margin-top">5</property>
    122                     <property name="margin-bottom">5</property>
    123                   </object>
    124                 </child>
    125                 <child>
    126                   <object class="GtkLabel" id="google_label">
    127                     <property name="halign">start</property>
    128                     <property name="margin-start">20</property>
    129                     <property name="margin-end">20</property>
    130                     <property name="label" translatable="1">We note that Google&apos;s implementation of TOTP is incomplete and will not work. We recommend using FreeOTP+.</property>
    131                     <attributes>
    132                       <attribute name="scale" value="0.80000000000000004"></attribute>
    133                     </attributes>
    134                   </object>
    135                 </child>
    136               </object>
    137             </child>
    138           </object>
    139         </child>
    140       </object>
    141     </child>
    142     <action-widgets>
    143       <action-widget response="-6">anastasis_gtk_b_totp_dialog_btn_cancel</action-widget>
    144       <action-widget response="-5">anastasis_gtk_b_totp_dialog_btn_ok</action-widget>
    145     </action-widgets>
    146     <child type="titlebar">
    147       <object class="GtkLabel">
    148         <property name="label" translatable="1">Configure TOTP</property>
    149       </object>
    150     </child>
    151     <action-widgets>
    152       <action-widget response="-6">anastasis_gtk_b_totp_dialog_btn_cancel</action-widget>
    153       <action-widget response="-5">anastasis_gtk_b_totp_dialog_btn_ok</action-widget>
    154     </action-widgets>
    155     <child internal-child="action_area">
    156       <object class="GtkBox">
    157         <property name="can-focus">0</property>
    158         <property name="homogeneous">1</property>
    159         <property name="spacing">6</property>
    160         <property name="halign">end</property>
    161         <child>
    162           <object class="GtkButton" id="anastasis_gtk_b_totp_dialog_btn_cancel">
    163             <property name="child">
    164               <object class="GtkBox">
    165                 <property name="spacing">2</property>
    166                 <property name="halign">center</property>
    167                 <child>
    168                   <object class="GtkImage">
    169                     <property name="icon-name">gtk-cancel</property>
    170                   </object>
    171                 </child>
    172                 <child>
    173                   <object class="GtkLabel">
    174                     <property name="label" translatable="1">_Cancel</property>
    175                     <property name="use-underline">1</property>
    176                     <property name="mnemonic-widget">anastasis_gtk_b_totp_dialog_btn_cancel</property>
    177                   </object>
    178                 </child>
    179               </object>
    180             </property>
    181           </object>
    182         </child>
    183         <child>
    184           <object class="GtkButton" id="anastasis_gtk_b_totp_dialog_btn_ok">
    185             <property name="sensitive">0</property>
    186             <property name="child">
    187               <object class="GtkBox">
    188                 <property name="spacing">2</property>
    189                 <property name="halign">center</property>
    190                 <child>
    191                   <object class="GtkImage">
    192                     <property name="icon-name">gtk-ok</property>
    193                   </object>
    194                 </child>
    195                 <child>
    196                   <object class="GtkLabel">
    197                     <property name="label" translatable="1">_OK</property>
    198                     <property name="use-underline">1</property>
    199                     <property name="mnemonic-widget">anastasis_gtk_b_totp_dialog_btn_ok</property>
    200                   </object>
    201                 </child>
    202               </object>
    203             </property>
    204           </object>
    205         </child>
    206       </object>
    207     </child>
    208   </object>
    209 </interface>
    210