/**
 * 网站配置文件
 */
const greenText = (text) => `\x1b[32m${text}\x1b[0m`

export const config = {
  appName: 'Kra',
  showViteLogo: true,
  keepAliveTabs: false,
  logs: []
}

export const viteLogo = (env) => {
  if (config.showViteLogo) {
    console.log(greenText('> Kra administration console'))
    console.log(greenText('> 当前版本:v3.0.0'))
    if (env.VITE_SERVER_PORT) console.log(greenText(`> API:http://127.0.0.1:${env.VITE_SERVER_PORT}`))
    if (env.VITE_CLI_PORT) console.log(greenText(`> Web:http://127.0.0.1:${env.VITE_CLI_PORT}`))
  }
}

export default config
