<commit_before>import QtQuick 2.5
import QtQuick.Dialogs 1.2
import QtQuick.Controls 1.4
import QtQuick.Layouts 1.1
import QtQuick.Window 2.0

ColumnLayout {

    property var device
    property var slotsEnabled: [false, false]
    property int selectedSlot
    signal configureSlot(int slot)
    signal updateStatus
    signal goToOverview
    signal goToSelectType
    signal goToSlotStatus
    signal goToConfigureOTP
    signal goToChallengeResponse
    signal goToStaticPassword
    signal goToOathHotp

    Text {
        textFormat: Text.StyledText
        text: "<h2>Configure static password</h2>"
    }

    Item {
        width: minimumWidth - margins * 2
        implicitHeight: desc.implicitHeight

        Text {
            id: desc
            width: parent.width
            wrapMode: Text.Wrap
            text: "When triggered, the YubiKey will output a fixed password. To avoid problems with different keyboard layouts, the password should only contain modhex characters."
        }
    }

    RowLayout {
        Text {
            text: qsTr("Password")
        }
        TextField {
            id: passwordInput
            implicitWidth: 280
            font.family: "Courier"
            validator: RegExpValidator {
                regExp: /[cbdefghijklnrtuv]{1,32}$/
            }
        }
        Button {
            anchors.margins: 5
            text: qsTr("Generate")
            anchors.left: passwordInput.right
            onClicked: generatePassword()
        }
    }

    RowLayout {
        Layout.alignment: Qt.AlignRight
        Button {
            text: qsTr("Back")
            onClicked: goToSelectType()
        }
        Button {
            text: qsTr("Finish")
            enabled: passwordInput.acceptableInput
            onClicked: finish()<commit_msg>Allow 38 chars in static password<commit_after>import QtQuick 2.5
import QtQuick.Dialogs 1.2
import QtQuick.Controls 1.4
import QtQuick.Layouts 1.1
import QtQuick.Window 2.0

ColumnLayout {

    property var device
    property var slotsEnabled: [false, false]
    property int selectedSlot
    signal configureSlot(int slot)
    signal updateStatus
    signal goToOverview
    signal goToSelectType
    signal goToSlotStatus
    signal goToConfigureOTP
    signal goToChallengeResponse
    signal goToStaticPassword
    signal goToOathHotp

    Text {
        textFormat: Text.StyledText
        text: "<h2>Configure static password</h2>"
    }

    Item {
        width: minimumWidth - margins * 2
        implicitHeight: desc.implicitHeight

        Text {
            id: desc
            width: parent.width
            wrapMode: Text.Wrap
            text: "When triggered, the YubiKey will output a fixed password. To avoid problems with different keyboard layouts, the password should only contain modhex characters."
        }
    }

    RowLayout {
        Text {
            text: qsTr("Password")
        }
        TextField {
            id: passwordInput
            implicitWidth: 280
            font.family: "Courier"
            validator: RegExpValidator {
                regExp: /[cbdefghijklnrtuv]{1,38}$/
            }
        }
        Button {
            anchors.margins: 5
            text: qsTr("Generate")
            anchors.left: passwordInput.right
            onClicked: generatePassword()
        }
    }

    RowLayout {
        Layout.alignment: Qt.AlignRight
        Button {
            text: qsTr("Back")
            onClicked: goToSelectType()
        }
        Button {
            text: qsTr("Finish")
            enabled: passwordInput.acceptableInput
            onClicked: finish()
{'fraction_non_alphanumeric': 0.06662995594713657, 'fraction_numerical': 0.011563876651982379, 'mean_word_length': 1.8561320754716981, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4217377', 'n_tokens_mistral': 1013, 'n_tokens_neox': 963, 'n_words': 264}