gistfile1.txt
· 818 B · Text
原始文件
22: local is_blocked="${1:-false}" is_restricted="${2:-false}" status="${3:-}"
23: if [[ "$is_blocked" == "true" && "$status" == "online"* ]]; then
24: echo "\033[1;31m"
25: elif [[ "$is_blocked" == "true" ]]; then
39:function ui::peer::_row_color() {
40: local is_blocked="${1:-false}" is_restricted="${2:-false}" status="${3:-}"
45: if [[ "$is_blocked" == "true" ]]; then
53: if [[ "$is_blocked" == "true" ]]; then
54: echo "\033[1;31m" # bold red — blocked active
67:function ui::peer::list_row_compact() {
73: is_blocked="${8:-false}" is_restricted="${9:-false}"
75: local row_color
76: row_color=$(ui::peer::_row_color "$is_blocked" "$is_restricted" "$status")
79: status_color=$(ui::peer::status_color "$is_blocked" "$is_restricted" "$status")
97: if [[ -n "$row_color" ]]; then
| 1 | 22: local is_blocked="${1:-false}" is_restricted="${2:-false}" status="${3:-}" |
| 2 | 23: if [[ "$is_blocked" == "true" && "$status" == "online"* ]]; then |
| 3 | 24: echo "\033[1;31m" |
| 4 | 25: elif [[ "$is_blocked" == "true" ]]; then |
| 5 | 39:function ui::peer::_row_color() { |
| 6 | 40: local is_blocked="${1:-false}" is_restricted="${2:-false}" status="${3:-}" |
| 7 | 45: if [[ "$is_blocked" == "true" ]]; then |
| 8 | 53: if [[ "$is_blocked" == "true" ]]; then |
| 9 | 54: echo "\033[1;31m" # bold red — blocked active |
| 10 | 67:function ui::peer::list_row_compact() { |
| 11 | 73: is_blocked="${8:-false}" is_restricted="${9:-false}" |
| 12 | 75: local row_color |
| 13 | 76: row_color=$(ui::peer::_row_color "$is_blocked" "$is_restricted" "$status") |
| 14 | 79: status_color=$(ui::peer::status_color "$is_blocked" "$is_restricted" "$status") |
| 15 | 97: if [[ -n "$row_color" ]]; then |
| 16 |