File size: 3,465 Bytes
c15c04b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
<!DOCTYPE html>
<html lang="ar" dir="rtl">
<head>
  <meta charset="utf-8">
  <title>ذكريات نورا</title>
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <style>
    body {
      font-family: 'Arial', sans-serif;
      background-color: #fefefe;
      color: #333;
      padding: 20px;
    }
    .container {
      max-width: 800px;
      margin: auto;
      background-color: #ffffff;
      padding: 30px;
      border-radius: 16px;
      box-shadow: 0 0 20px rgba(0,0,0,0.1);
    }
    h2 {
      text-align: center;
      color: #4a4a90;
      font-size: 2em;
    }
    ul {
      list-style: none;
      padding: 0;
    }
    li {
      background-color: #eef3ff;
      margin-bottom: 12px;
      padding: 18px;
      border-radius: 10px;
      line-height: 1.8;
      border-right: 4px solid #4a4a90;
    }
    a {
      display: block;
      text-align: center;
      margin-top: 30px;
      text-decoration: none;
      background-color: #4a4a90;
      color: white;
      padding: 12px 24px;
      border-radius: 8px;
      font-size: 1.1em;
    }
    a:hover {
      background-color: #2f2f72;
    }
    p {
      text-align: center;
      font-size: 1.2em;
      color: #777;
    }
  </style>
</head>
<body>
  <div class="container">
    <h2>ذكريات نورا - {{ username }}</h2>
    {% if memory %}
      <ul>
        {% for q, a in memory.items() %}
          <li>
            <strong>سؤال:</strong> {{ q }}<br>
            <strong>رد:</strong> {{ a }}
          </li>
        {% endfor %}
      </ul>
    {% else %}
      <p>ما في ذكريات محفوظة حتى الآن.</p>
    {% endif %}
    <a href="/chat">رجوع للدردشة</a>
  </div>

  <script>
    function اجابة_تلقائية(السؤال) {
      السؤال = السؤال.trim().toLowerCase();

      if (السؤال.includes("هل نبدأ") || السؤال.includes("ابدأ؟") || السؤال.startsWith("ابدأ") || السؤال.includes("هل أبدأ؟") || السؤال.includes("ابدأ:")) {
        return "نعم ابدأ";
      }

      if (السؤال.startsWith("هل") && (السؤال.includes("؟") || السؤال.includes("?"))) {
        return "نعم";
      }

      if (السؤال.startsWith("ما هي")) {
        return "اكمل ليس الآن";
      }

      if (السؤال.includes("تفصيل") || السؤال.includes("وضح") || السؤال.includes("اشرح")) {
        return "ليس الآن";
      }

      if (السؤال.includes("هل تود") || السؤال.includes("هل تريد")) {
        return "نعم";
      }

      if (السؤال.startsWith("قول لي")) {
        return "موافق";
      }

      if (السؤال.includes("هل تحتاج لشيء آخر") || السؤال.includes("هل تحتاج شيء آخر")) {
        return "نعم اكمل مع تفعيل الإجابات التلقائية";
      }

      if (السؤال.includes("جاهز؟")) {
        return "ابدأ";
      }

      if (السؤال.includes("اذا تبي")) {
        return "نعم";
      }

      if (السؤال.includes("هل تريدني")) {
        return "نعم أريد";
      }

      if (السؤال.includes("أو") || السؤال.includes("أم") || السؤال.match(/،\s*أو/) || السؤال.match(/،\s*أم/)) {
        return "الخيار الأول";
      }

      return "نعم";
    }
  </script>
</body>
</html>