Luigit
repositories / dotfiles

dotfiles

bugabingas dorkfiles

owned by admin

quickshell/nuguland/features/clock/CalendarConfig.qml

Raw
import QtQuick
import "../.."

ConfigSection {
    id: root
    required property CalDav service
    name: "calendar"
    label: "calendar"
    rows: [
        ConfigRow {
            kind: ConfigRow.Text
            label: "server url"
            value: root.service.setupUrlDraft
            busy: root.service.setupBusy
            onEdited: value => root.service.editSetupUrl(value)
        },
        ConfigRow {
            kind: ConfigRow.Text
            label: "username"
            value: root.service.setupUsernameDraft
            busy: root.service.setupBusy
            onEdited: value => root.service.editSetupUsername(value)
        },
        ConfigRow {
            kind: ConfigRow.Secret
            label: "app password"
            status: "use an app password, not your login"
            value: root.service.setupPasswordDraft
            busy: root.service.setupBusy
            onEdited: value => root.service.editSetupPassword(value)
        },
        ConfigRow {
            kind: ConfigRow.Action
            label: "save calendar"
            busy: root.service.setupBusy
            status: root.service.setupBusy ? "saving calendar" : ""
            error: root.service.secretError
            onActivated: root.service.saveSetup(root.service.setupUrlDraft, root.service.setupUsernameDraft, root.service.setupPasswordDraft)
        }
    ]
}