Skip to content

管理者ページへのナビゲーションリンク追加とUI改善#114

Merged
litencatt merged 6 commits intomainfrom
show-admin-link-to-user-page
Sep 29, 2025
Merged

管理者ページへのナビゲーションリンク追加とUI改善#114
litencatt merged 6 commits intomainfrom
show-admin-link-to-user-page

Conversation

@litencatt
Copy link
Copy Markdown
Owner

@litencatt litencatt commented Sep 29, 2025

概要

管理者ユーザーに対して管理者ページへのアクセスを提供するナビゲーションリンクの追加と、全体的なUIの改善を実施しました。開発時のデバッグ機能も含まれています。

変更内容

  • 管理者ナビゲーション: 管理者権限を持つユーザーに「⚙️ 管理者ページ」リンクを表示
  • ADMIN_DEBUG機能: ADMIN_DEBUG=true環境変数でデバッグ時に管理者権限を付与
  • ヘッダーUI改善: 全幅グローバルナビゲーションへの変更
    • 固定ヘッダーによる常時表示
    • モダンなデザイン(グラデーション、シャドウ、ブラー効果)
    • レスポンシブ対応の強化
  • アイコン改善: より適切な絵文字への変更
    • 👤 ユーザーアカウント(旧:📧)
    • 📸 シーン一覧(旧:🎬)
    • 🌸 櫻坂46関連(旧:📝)
    • ☀️ 日向坂46関連(旧:📝)
  • テストコード追加: ADMIN_DEBUG機能とテンプレートデータのテスト
  • 開発品質保証: CLAUDE.mdに必須チェック項目を追加
  • リンターエラー修正: golangci-lintの警告を全て解決

期待すること

  • 管理者が直感的に管理者ページにアクセスできるようになる
  • 開発時のデバッグが容易になる(ADMIN_DEBUG機能)
  • ユーザーエクスペリエンスの向上(UIの改善)
  • コード品質の維持・向上(テストとリンター対応)
  • 一貫した開発プロセスの確立

動作確認

項目 証憑(スクショなど) 備考
一般ユーザーでのアクセス 管理者リンクが表示されないこと ADMIN_DEBUG=false
管理者ユーザーでのアクセス 管理者リンクが表示されること データベースのis_admin=1
ADMIN_DEBUG=true時のアクセス 一般ユーザーでも管理者リンクが表示されること 環境変数による権限付与
レスポンシブ表示 PC・タブレット・スマートフォンでの表示確認 各デバイスでの適切な表示
リンク機能 管理者ページへの遷移が正常に動作すること /adminへのアクセス
テスト実行 go test ./...が全てパスすること 新規テストを含む
リンターチェック golangci-lint runでエラー0件 コード品質確認

litencatt and others added 6 commits September 30, 2025 00:50
- Add conditional admin page link in navigation template
- Update getUserSession to set IsAdmin=true when ADMIN_DEBUG=true
- Add IsAdmin field to template data in scene, member, and regist handlers
- Add comprehensive tests for ADMIN_DEBUG functionality and template data
- Ensure admin link only shows for users with admin privileges

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Convert header to full-width global navigation
- Enhance visual design with improved shadows, borders, and gradients
- Improve user info styling with pill design and better typography
- Update navigation links with modern button-like appearance
- Add comprehensive responsive design for all screen sizes
- Update navigation icons to be more semantically appropriate
- Position header as fixed top navigation with proper spacing

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Add proper error handling for session.Save() in handler_test.go
- Use explicit error ignore pattern for session.Save() in template_data_test.go
- Resolve errcheck and staticcheck linter warnings

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Add mandatory code quality checks for all Go code changes
- Include pre-commit verification checklist
- Emphasize importance of formatting, linting, testing, and race condition checks
- Position as critical section early in documentation for visibility
- Ensure consistency with project quality standards

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@litencatt litencatt merged commit c68cb8d into main Sep 29, 2025
1 check passed
@litencatt litencatt deleted the show-admin-link-to-user-page branch September 29, 2025 16:12
@github-actions github-actions bot mentioned this pull request Sep 29, 2025
@litencatt litencatt changed the title Show admin link to user page 管理者ページへのナビゲーションリンク追加とUI改善 Sep 29, 2025
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.

1 participant