Skip to content

feat(tray): move logout and remove to settings menu#10165

Open
Rello wants to merge 6 commits into
masterfrom
codex/move-account-actions-to-settings
Open

feat(tray): move logout and remove to settings menu#10165
Rello wants to merge 6 commits into
masterfrom
codex/move-account-actions-to-settings

Conversation

@Rello

@Rello Rello commented Jun 11, 2026

Copy link
Copy Markdown
Collaborator

the user logout and remove are moved from the tray window user menu into the user settings

Signed-off-by: Rello <github@scherello.de>
@Rello Rello added the design Design, UI, UX, etc. label Jun 11, 2026
@Rello Rello self-assigned this Jun 11, 2026
@Rello

Rello commented Jun 15, 2026

Copy link
Copy Markdown
Collaborator Author
Bildschirmfoto 2026-06-15 um 07 18 18

@jancborchardt

@Rello Rello marked this pull request as ready for review June 15, 2026 05:18

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4608a9ef94

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/gui/accountsettings.cpp Outdated
Signed-off-by: Rello <github@scherello.de>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1aceda087d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/gui/accountsettings.cpp Outdated
Comment on lines +440 to +443
if (_accountState->isConnected()) {
userModel->logout(userId);
} else {
userModel->login(userId);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep logout available outside Connected state

When an account is in a non-connected but still signed-in state such as NetworkError, ServiceUnavailable, or NeedToSignTermsOfService, this branch calls login() because isConnected() is false. AccountState::signIn() only transitions from SignedOut, so the new settings button becomes a no-op in those states instead of letting the user log out and clear credentials; please preserve the old isSignedOut() distinction for choosing login versus logout.

Useful? React with 👍 / 👎.

…tead of isConnected()

Signed-off-by: Rello <github@scherello.de>
@github-actions

Copy link
Copy Markdown
Contributor

Artifact containing the AppImage: nextcloud-appimage-pr-10165.zip

Digest: sha256:78b9306cddb0f36ac6c82633937e944b943022dcff9bf9d25b74936e849151ac

To test this change/fix you can download the above artifact file, unzip it, and run it.

Please make sure to quit your existing Nextcloud app and backup your data.

@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
41.0% Coverage on New Code (required ≥ 80%)
C Reliability Rating on New Code (required ≥ A)
D Maintainability Rating on New Code (required ≥ A)
116 New Code Smells (required ≤ 0)
1 New Bugs (required ≤ 0)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

Comment on lines +437 to +446
const auto userModel = UserModel::instance();
const auto userId = userModel->findUserIdForAccount(_accountState);
if (userId >= 0) {
if (_accountState->isSignedOut()) {
userModel->login(userId);
} else {
userModel->logout(userId);
}
return;
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why does this need to go through UserModel? User::logout and User::login (called by UserModel) do the same thing as the if below here already

@i2h3 i2h3 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change makes a lot of sense! 😊 As I already rallied for it, those actions are rather rare for the majority of users and only clutter up the hot paths in the user interface.

Though, the visual difference between the regular ("Log out" appears embossed) and destructive button ("Remove account" appears completely flat) needs to be resolved.

Comment on lines +1869 to +1873
const auto destructiveTextColor = Theme::instance()->darkMode() ? QColor(0xffdad6) : QColor(0xba1a1a);
const auto destructiveBorderColor = Theme::instance()->darkMode() ? QColor(0xffb4ab) : QColor(0xba1a1a);
const auto destructiveBackgroundColor = Theme::instance()->darkMode() ? QColor(0x2d1514) : QColor(0xfffff4f2);
const auto destructiveHoverBackgroundColor = Theme::instance()->darkMode() ? QColor(0x3b1b1a) : QColor(0xffffe4df);
const auto destructivePressedBackgroundColor = Theme::instance()->darkMode() ? QColor(0x4a221f) : QColor(0xffffd6cf);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In place definition in account settings code of color value constants? I guess this should be moved to an independent and global scope, most likely the Theme itself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

design Design, UI, UX, etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants