Selaa lähdekoodia

토론 버그 수정, 개편

Surplus_Up (2DU) 6 vuotta sitten
vanhempi
sitoutus
108f3fd561
4 muutettua tiedostoa jossa 33 lisäystä ja 12 poistoa
  1. 14 9
      route/api_topic_sub.py
  2. 2 2
      views/main_css/css/main.css
  3. 16 0
      views/marisa/css/dark.css
  4. 1 1
      views/marisa/js/skin_set.js

+ 14 - 9
route/api_topic_sub.py

@@ -20,18 +20,25 @@ def api_topic_sub_2(conn, name, sub, time):
         admin = admin_check(3)
                     
         for i in data:
-            if i[4] != 'O' or (i[4] == 'O' and admin == 1):
+            ip = ip_pas(i[3])
+
+            if i[4] != 'O':
                 t_data_f = i[1]
-                b_color = 'toron_color_grey'
+                b_color = 'toron_color'
             else:
+                if admin == 1:
+                    t_data_f = i[1]
+                    b_color = 'toron_color_grey'
+                else:
+                    t_data_f = ''
+                    b_color = 'toron_color_not'
+
                 curs.execute("select who from re_admin where what = ? order by time desc limit 1", ['blind (' + name + ' - ' + sub + '#' + str(i[0]) + ')'])
                 who_blind = curs.fetchall()
                 if who_blind:
-                    t_data_f = '[[user:' + who_blind[0][0] + ']] block'
-                    b_color = 'toron_color_grey'
+                    ip += ' (' + who_blind[0][0] + ' B)'
                 else:
-                    t_data_f = 'block'
-                    b_color = 'toron_color_grey'
+                    ip += ' (B)'
 
             if flask.request.args.get('render', None):
                 if i[0] == '1':
@@ -53,10 +60,8 @@ def api_topic_sub_2(conn, name, sub, time):
                     t_color = 'toron_color_blue'
                 else:
                     t_color = 'toron_color'
-                    
-                ip = ip_pas(i[3])
 
-                if admin == 1 or b_color != 'toron_color_grey':
+                if admin == 1 or b_color != 'toron_color_not':
                     ip += ' <a href="/topic/' + url_pas(name) + '/sub/' + url_pas(sub) + '/admin/' + i[0] + '">(' + load_lang('discussion_tool') + ')</a>'
                     
                 if t_data_f == '':

+ 2 - 2
views/main_css/css/main.css

@@ -13,11 +13,11 @@ input[type="checkbox"] { width: auto; }
 .popup { position: fixed; bottom: 0; padding: 10px; left: 0; background: lightgray; width: 100%; }
 #list { padding: 10px; }
 #toron { width: 100%; }
-#toron_color { background: khaki; }
-#toron_color_green { background: darkseagreen; }
+#toron_color_green { background: lightgreen; }
 #toron_color_blue { background: skyblue; }
 #toron_color_red { background: indianred; }
 #toron_color_grey { background: gainsboro; }
+#toron_color_not { display: none; }
 #cate { border: 1px solid; padding: 5px; }
 blockquote { border: 1px solid; padding: 15px; margin: 0; margin-top: 10px; display: inline-block; }
 img, iframe { max-width: 100%; }

+ 16 - 0
views/marisa/css/dark.css

@@ -26,4 +26,20 @@ textarea, input, button, select {
 #mobile_search_input, #mobile_search_input::placeholder {
     background: gray;
     color: white;
+}
+
+#toron_color_grey {
+    background: #4a4a4a;
+}
+
+#toron_color_green {
+    background: #2e4a2e;
+}
+
+#toron_color_red {
+    background: #803737;
+}
+
+#toron_color_blue {
+    background: #314c56;
 }

+ 1 - 1
views/marisa/js/skin_set.js

@@ -63,7 +63,7 @@ function main_load() {
         cookies.match(regex_data('invert')) &&
         cookies.match(regex_data('invert'))[1] === '1'
     ) {
-        head_data.innerHTML += '<link rel="stylesheet" href="/views/marisa/css/dark.css?ver=1">';
+        head_data.innerHTML += '<link rel="stylesheet" href="/views/marisa/css/dark.css?ver=2">';
     }
 }