実装完了

作成・変更したファイル
バックエンド(新規):

apps/mail/models.py — MailSender, MailEmail, MailNotificationToken
apps/mail/serializers.py
apps/mail/views.py — Windmill用API、フィードバック、ルール管理
apps/mail/urls.py
apps/mail/admin.py
マイグレーション(自動生成・適用済み)
バックエンド(変更):

settings.py — apps.mail 追加、MAIL_API_KEY/FRONTEND_URL 環境変数
urls.py — /api/mail/ 追加
フロントエンド(新規):

mail/feedback/[token]/page.tsx — 認証不要、フィードバック3択+スコープ選択
mail/rules/page.tsx — ルール管理(一覧・追加・削除)
フロントエンド(変更):

Navbar.tsx — 「メールルール」メニュー追加
types/index.ts — MailSender, MailEmailFeedback 型追加
次のステップ(Windmill側)
Keinaシステム側の実装は完了しています。次はWindmillにIMAPポーリングスクリプトを書く必要があります。Windmillのスクリプトが必要になったタイミングでお声がけください。
This commit is contained in:
Akira
2026-02-22 09:27:27 +09:00
parent 24fa9b4e64
commit 7a1aa81f9f
17 changed files with 1367 additions and 1 deletions

View File

@@ -1,7 +1,7 @@
'use client';
import { useRouter, usePathname } from 'next/navigation';
import { LogOut, Wheat, MapPin, FileText, Upload, LayoutDashboard } from 'lucide-react';
import { LogOut, Wheat, MapPin, FileText, Upload, LayoutDashboard, Mail } from 'lucide-react';
import { logout } from '@/lib/api';
export default function Navbar() {
@@ -78,6 +78,17 @@ export default function Navbar() {
<Upload className="h-4 w-4 mr-2" />
</button>
<button
onClick={() => router.push('/mail/rules')}
className={`flex items-center px-3 py-2 text-sm rounded-md transition-colors ${
pathname?.startsWith('/mail/')
? 'text-green-700 bg-green-50'
: 'text-gray-700 hover:text-gray-900 hover:bg-gray-100'
}`}
>
<Mail className="h-4 w-4 mr-2" />
</button>
</div>
</div>
<div className="flex items-center">