Skip to content

プライベートモードの実装#968

Merged
slime-hatena merged 9 commits intoproject-primera:developfrom
WorldRobertProject:PrivateMode
Nov 2, 2025
Merged

プライベートモードの実装#968
slime-hatena merged 9 commits intoproject-primera:developfrom
WorldRobertProject:PrivateMode

Conversation

@WorldRobertProject
Copy link
Copy Markdown
Contributor

他人から情報を見れないようにするプライベートモードを実装しました。
プライベートモードでは以下のようになります。

  • 「すべてのユーザー」に表示されない
  • ユーザ ID を含む API の内容がログインユーザー自身でなければ見れない

プライベートモードでも統計情報の収集対象にはなります。

プライベートモードにするには以下のようにします。

  • 登録時に「プライベートモード」にチェックを入れる
  • 設定画面でプライベートモードにする

設定画面を変更する際に Twitter 連携の設定は削除しました。
ただ、一応 setting/twitter API はコメントアウトとし、
getTwitterAuthentication 関数は残してあります。
($display の設定あたりは削っちゃいましたが……)

身バレを気にしつつ虹レを目指しているらしい某 VTuber を見て
こういう機能があったらいいんじゃないかと思って実装してみました。

}
return $sql;
}
}
Copy link
Copy Markdown
Member

@slime-hatena slime-hatena Nov 2, 2025

Choose a reason for hiding this comment

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

memo: /music/::/difficulty でエラってしまう
調査中...

ErrorException (E_WARNING)
array_column() expects parameter 1 to be array, object given

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.

fix in 523921f

@slime-hatena slime-hatena requested a review from Copilot November 2, 2025 18:03
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds a private mode feature that allows users to hide their profiles from others. When enabled, private users are excluded from public listings and cannot be viewed by other users (except themselves).

  • Added private flag to the users table with a database migration
  • Implemented UI and backend for toggling private/public mode in settings
  • Updated user queries to filter out private users from public views
  • Added private mode checkbox to registration form

Reviewed Changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
OngekiScoreLog/database/migrations/2025_08_13_115922_create_private_mode_flag.php Adds private tinyInteger column to users table
OngekiScoreLog/app/User.php Adds private to fillable fields
OngekiScoreLog/app/UserStatus.php Updates user queries to exclude private users based on context
OngekiScoreLog/app/Http/Controllers/SettingController.php Adds handlers for private/public mode toggle
OngekiScoreLog/app/Http/Controllers/Auth/RegisterController.php Handles private mode during registration
OngekiScoreLog/resources/views/setting.blade.php Updates settings UI to show private mode toggle
OngekiScoreLog/resources/views/auth/register.blade.php Adds private mode checkbox to registration form
OngekiScoreLog/routes/web.php Adds routes for private/public mode switching
OngekiScoreLog/app/Http/Controllers/ViewMusicStatisticsController.php Includes private users in music statistics
Comments suppressed due to low confidence (2)

OngekiScoreLog/app/UserStatus.php:1

  • The comment contains garbled characters that appear to be a mojibake encoding issue. The Japanese text is not properly encoded.
<?php

OngekiScoreLog/app/UserStatus.php:1

  • The comment contains garbled characters that appear to be a mojibake encoding issue. The Japanese text is not properly encoded.
<?php

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

slime-hatena and others added 6 commits November 3, 2025 03:13
「現在の状態:」を向こうで出さないのは画面の変化をつけてステートをわかりやすくする意図
なんか治るからこれで行きます。
多分object担っちゃうんだと思うけど、クエリ的にも軽いはずなのでこっちに
未だに問い合わせが来るので終わったんだよということを強調
ありえないと思うけどな~~~

Potential undefined array key error if 'private' is not present in the $data array. When the checkbox is unchecked, it may not be included in the request data. Use isset($data['private']) && $data['private'] ? 1 : 0 or add a default value of 0.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Copy Markdown
Member

@slime-hatena slime-hatena left a comment

Choose a reason for hiding this comment

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

lgtm

@slime-hatena
Copy link
Copy Markdown
Member

大変おまたせしてすみません。問題なさそうなのでマージします!

@slime-hatena slime-hatena merged commit 023166f into project-primera:develop Nov 2, 2025
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants