<?php

return [
    [
        'name' => '__tips__',
        'title' => '温馨提示',
        'type' => 'string',
        'content' => [],
        'value' => '1. <b><font color="red">本窗口的所有配置项，非技术人员不建议进行调整</font></b><br>'."\n"
            .'                      2. 若需开启wss协议，请先配置<b>ssl证书</b>、<b>ssl证书KEY</b>并重启服务才会生效；https站点必须配置wss<br>'."\n"
            .'                      3. <b>WebSocket端口</b>需对外开放<br>'."\n"
            .'                      4. 消息提醒铃声建议大小100kb，若文件无法上传请先配置application/extra/upload.php文件',
        'rule' => '',
        'msg' => '',
        'tip' => '',
        'ok' => '',
        'extend' => '',
    ],
    [
        'name' => 'theme',
        'title' => '主题模板',
        'type' => 'string',
        'content' => [],
        'value' => 'default',
        'rule' => 'required',
        'msg' => '',
        'tip' => '请确保addons/fastim/view有相应的目录',
        'ok' => '',
        'extend' => '',
    ],
    [
        'name' => 'wss_switch',
        'title' => 'wss协议',
        'type' => 'radio',
        'content' => [
            '不开启',
            '开启',
        ],
        'value' => '1',
        'rule' => '',
        'tip' => '请先参考常见问题配置好wss服务再开启，否则将无法链接',
        'ok' => '',
        'extend' => '',
    ],
    [
        'name' => 'ssl_cert_file',
        'title' => 'ssl证书',
        'type' => 'string',
        'content' => [],
        'value' => '/etc/nginx/cert/jx.xicheda.com.pem',
        'rule' => '',
        'tip' => '请填写证书pem或crt文件的绝对路径',
        'ok' => '',
        'extend' => '',
    ],
    [
        'name' => 'ssl_key_file',
        'title' => 'ssl证书KEY',
        'type' => 'string',
        'content' => [],
        'value' => '/etc/nginx/cert/jx.xicheda.com.key',
        'rule' => '',
        'tip' => '请填写证书密匙(key)文件的绝对路径',
        'ok' => '',
        'extend' => '',
    ],
    [
        'name' => 'websocket_port',
        'title' => 'WebSocket 端口',
        'type' => 'number',
        'content' => [],
        'value' => '2088',
        'rule' => 'required,range(1024~65535)',
        'tip' => '请在安全组、防火墙等开放此端口',
        'ok' => '',
        'extend' => '',
    ],
    [
        'name' => 'worker_num',
        'title' => 'Worker 进程数',
        'type' => 'number',
        'content' => [],
        'value' => '2',
        'rule' => '',
        'tip' => '建议设置为CPU核数的1-4倍',
        'ok' => '',
        'extend' => '',
    ],
    [
        'name' => 'reactor_num',
        'title' => 'Reactor 线程数',
        'type' => 'number',
        'content' => [],
        'value' => '2',
        'rule' => '',
        'tip' => '建议设置为CPU核数的1-4倍',
        'ok' => '',
        'extend' => '',
    ],
    [
        'name' => 'max_connections',
        'title' => 'Swoole\\Table大小',
        'type' => 'number',
        'content' => [],
        'value' => '20480',
        'rule' => '',
        'tip' => '值越大可同时在线的用户越多(内存足够的情况下)',
        'ok' => '',
        'extend' => '',
    ],
    [
        'name' => 'ringing',
        'title' => '消息提醒铃声',
        'type' => 'file',
        'content' => [],
        'value' => '/assets/addons/fastim/audio/ringing.mp3',
        'rule' => 'required,file',
        'tip' => '',
        'ok' => '',
        'extend' => '',
    ],
];
