fix suggest xss + nfo view style default

This commit is contained in:
xiaomlove
2022-09-27 22:06:05 +08:00
parent 3ea23d337b
commit 10588537b1
11 changed files with 40 additions and 12 deletions

View File

@@ -19,8 +19,6 @@ class Torrent extends NexusModel
'times_completed', 'approval_status', 'banned', 'visible', 'pos_state_until',
];
private static $globalPromotionState;
const VISIBLE_YES = 'yes';
const VISIBLE_NO = 'no';
@@ -156,6 +154,14 @@ class Torrent extends NexusModel
],
];
const NFO_VIEW_STYLE_DOS = 'magic';
const NFO_VIEW_STYLE_WINDOWS = 'latin-1';
public static array $nfoViewStyles = [
self::NFO_VIEW_STYLE_DOS => ['text' => 'DOS-vy'],
self::NFO_VIEW_STYLE_WINDOWS => ['text' => 'Windows-vy'],
];
public function getPickInfoAttribute()
{
$info = self::$pickTypes[$this->picktype] ?? null;