Browse Source

handle {ship,fleet} hangar, fix kill_time minute

raylu 12 năm trước cách đây
mục cha
commit
3805dfe7bf
2 tập tin đã thay đổi với 9 bổ sung2 xóa
  1. 5 1
      db/queries.py
  2. 4 1
      web/static/js/kill.js

+ 5 - 1
db/queries.py

@@ -128,6 +128,10 @@ def kill(kill_id):
 				slot = 'cargo'
 			elif 133 <= flag <= 143:
 				slot = 'special hold'
+			elif flag == 90:
+				slot = 'ship hangar'
+			elif flag == 155:
+				slot = 'fleet hangar'
 			elif flag == 89:
 				slot = 'implant'
 			else:
@@ -183,7 +187,7 @@ def top_cost():
 	return kills
 
 def _format_kill_time(kill_time):
-	return kill_time.strftime('%Y-%m-%d %H:%m')
+	return kill_time.strftime('%Y-%m-%d %H:%M')
 
 def _security_status(system_name, security):
 		wspace = False

+ 4 - 1
web/static/js/kill.js

@@ -105,7 +105,10 @@ window.addEvent('domready', function() {
 				new Element('td', {'html': ykill.format_isk(victim['ship_cost'])})
 			)
 		);
-		var slots = ['subsystem', 'high', 'medium', 'low', 'rig', 'drone bay', 'cargo', 'special hold', 'implant', '???'];
+		var slots = [
+			'subsystem', 'high', 'medium', 'low', 'rig', 'drone bay',
+			'cargo', 'special hold', 'ship hangar', 'fleet hangar', 'implant', '???'
+		];
 		slots.each(function(slot) {
 			if (!items[slot])
 				return;