ui

package
v0.1.16 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 30, 2024 License: AGPL-3.0 Imports: 13 Imported by: 0

README

BanBot UI

这是交易机器人banbot的前端部分;K线使用Klinecharts;基于sveltekit架构;ui使用daisyUI+tailwind

开发笔记

国际化
使用inlang的国际化插件

  1. 在 project.inlang/settings.json 中添加语言标签,并在 messages 文件夹下添加语言文件。
  2. 在需要使用语言标签的地方,使用:
import * as m from '$lib/paraglide/messages.js'
m.hello()
m['hello']()

注册新指标
在 src/lib/coms.ts 中添加新指标的字段和默认参数。

编译为静态资源
sveltekit支持编译静态资源,只需将svelte.config.js中的adapter-auto改为adapter-static,然后执行npm run build,即可在dist目录下生成静态资源。

云端指标
本项目原生支持云端指标加载和显示,后端需提供/kline/all_inds/kline/calc_ind接口,具体参数请参考src/lib/indicators/cloudInds.ts

TODO

  • 滚动条样式未全局生效

sv

Everything you need to build a Svelte project, powered by sv.

Creating a project

If you're seeing this, you've probably already done this step. Congrats!

# create a new project in the current directory
npx sv create

# create a new project in my-app
npx sv create my-app

Developing

Once you've created a project and installed dependencies with npm install (or pnpm install or yarn), start a development server:

npm run dev

# or start the server and open the app in a new browser tab
npm run dev -- --open

Building

To create a production version of your app:

npm run build

You can preview the production build with npm run preview.

To deploy your app, you may need to install an adapter for your target environment.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ServeStatic added in v0.1.13

func ServeStatic(app *fiber.App) error

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL