Kirigami.Page {
id: root
- property var account
+ property AbstractAccount account
readonly property ProfileEditorBackend backend : ProfileEditorBackend {
account: root.account
FormCard.FormSwitchDelegate {
text: i18nc("@label Account preferences", "Mark uploaded media as sensitive by default")
- checked: AccountManager.selectedAccount.preferences.defaultSensitive
- onToggled: AccountManager.selectedAccount.preferences.defaultSensitive = checked
+ checked: root.account.preferences.defaultSensitive
+ onToggled: root.account.preferences.defaultSensitive = checked
}
FormCard.FormDelegateSeparator {
FormCard.FormSwitchDelegate {
text: i18nc("@label Account preferences", "Include public posts in search results")
- checked: AccountManager.selectedAccount.preferences.indexable
- onToggled: AccountManager.selectedAccount.preferences.indexable = checked
+ checked: root.account.preferences.indexable
+ onToggled: root.account.preferences.indexable = checked
}
FormCard.FormDelegateSeparator {
FormCard.FormButtonDelegate {
text: i18nc("@label Account preferences", "Default post language")
- description: Qt.locale(AccountManager.selectedAccount.preferences.defaultLanguage).nativeLanguageName
+ description: Qt.locale(root.account.preferences.defaultLanguage).nativeLanguageName
onClicked: languageSelect.createObject().open()
LanguageSelector {
parent: root.QQC2.Overlay.overlay
onAboutToShow: {
- const sourceIndex = listView.model.sourceModel.indexOfValue(AccountManager.selectedAccount.preferences.defaultLanguage);
+ const sourceIndex = listView.model.sourceModel.indexOfValue(root.account.preferences.defaultLanguage);
listView.currentIndex = listView.model.mapFromSource(sourceIndex).row;
}
- onCodeSelected: code => AccountManager.selectedAccount.preferences.defaultLanguage = code
+ onCodeSelected: code => root.account.preferences.defaultLanguage = code
onClosed: destroyed()
}
}
i18nc("@item:inlistbox Default post visibility rule", "Unlisted"),
i18nc("@item:inlistbox Default post visibility rule", "Private")
]
- Component.onCompleted: currentIndex = AccountManager.selectedAccount.preferences.defaultVisibility
- onCurrentValueChanged: AccountManager.selectedAccount.preferences.defaultVisibility = currentIndex
+ Component.onCompleted: currentIndex = root.account.preferences.defaultVisibility
+ onCurrentValueChanged: root.account.preferences.defaultVisibility = currentIndex
}
FormCard.FormDelegateSeparator {
id: websiteDelegate
text: i18nc("@abel Account preferences", "Open Server in Browser")
description: i18n("Some settings can only be configured on your server's website.")
- onClicked: Qt.openUrlExternally(AccountManager.selectedAccount.instanceUri)
+ onClicked: Qt.openUrlExternally(root.account.instanceUri)
}
}
}