diff options
| author | Andrew Branson <andrew.branson@jolla.com> | 2026-02-10 10:41:02 +0100 |
|---|---|---|
| committer | Andrew Branson <andrew.branson@jolla.com> | 2026-02-10 17:09:39 +0100 |
| commit | 4351f4627ba9e71775438dd26c9acddd002c7e11 (patch) | |
| tree | 3c72c980c5c81507109087bda67052b7ec8216b6 /settings/accounts/ui/mastodon-settings.qml | |
Initial commit
Diffstat (limited to 'settings/accounts/ui/mastodon-settings.qml')
| -rw-r--r-- | settings/accounts/ui/mastodon-settings.qml | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/settings/accounts/ui/mastodon-settings.qml b/settings/accounts/ui/mastodon-settings.qml new file mode 100644 index 0000000..ae79ce4 --- /dev/null +++ b/settings/accounts/ui/mastodon-settings.qml @@ -0,0 +1,66 @@ +import QtQuick 2.0 +import Sailfish.Silica 1.0 +import Sailfish.Accounts 1.0 +import com.jolla.settings.accounts 1.0 + +AccountSettingsAgent { + id: root + + initialPage: Page { + onPageContainerChanged: { + if (pageContainer == null && !credentialsUpdater.running) { + root.delayDeletion = true + settingsDisplay.saveAccount() + } + } + + Component.onDestruction: { + if (status == PageStatus.Active) { + settingsDisplay.saveAccount(true) + } + } + + AccountCredentialsUpdater { + id: credentialsUpdater + } + + SilicaFlickable { + anchors.fill: parent + contentHeight: header.height + settingsDisplay.height + Theme.paddingLarge + + StandardAccountSettingsPullDownMenu { + visible: settingsDisplay.accountValid + allowSync: true + onCredentialsUpdateRequested: { + credentialsUpdater.replaceWithCredentialsUpdatePage(root.accountId) + } + onAccountDeletionRequested: { + root.accountDeletionRequested() + pageStack.pop() + } + onSyncRequested: { + settingsDisplay.saveAccountAndSync() + } + } + + PageHeader { + id: header + title: root.accountsHeaderText + } + + MastodonSettingsDisplay { + id: settingsDisplay + anchors.top: header.bottom + accountManager: root.accountManager + accountProvider: root.accountProvider + accountId: root.accountId + + onAccountSaveCompleted: { + root.delayDeletion = false + } + } + + VerticalScrollDecorator {} + } + } +} |
