513 Commits

Author SHA1 Message Date
447a3d91bc fix: add [data-theme=dark] CSS overrides for CRUD/tabular/card/input components
Sage shell defaults to dark theme but bricks.css had no dark rules,
causing light-gray text (#8a8a8a) on light backgrounds (#fafafa/#efefef)
in CRUD tables — unreadable against the dark shell.

Added comprehensive [data-theme=dark] overrides:
- body: #CBD5E1 text on #0F172A bg
- .card/.tabular/.tabular-row: dark slate backgrounds
- .inputbox/.popup/.modal/.toolbar: dark variants
- .accordion/.tabpanel/.message: dark variants
2026-05-28 11:37:56 +08:00
565699bd6b refactor: rename event sage_login to user_logined 2026-05-27 18:01:51 +08:00
ffc9350fcb feat: dispatch sage_login event after successful login in withLoginInfo
jsoncall.js: after login retry succeeds, dispatch 'sage_login' on bricks.app
so shell can reload the global menu dynamically.
2026-05-27 17:57:38 +08:00
2e22085122 feat: 401后登录成功自动重试原始请求
- withLoginInfo 改为接收完整 opts(含 method/headers/params)
- 等待 login_window 的 destroy 事件(=登录成功信号)
- 登录成功后重试原始请求
- 重试仍401则返回null(避免死循环)
- 用户手动关闭登录窗口时也触发重试,401则返回null
2026-05-27 15:39:34 +08:00
3c8757bd2c feat: add bricks.Router for SPA URL state management
- New router.js: configurable target tracking, History API integration
- Hook in _buildWidget: tracks urlwidget replace into registered targets
- Init via bricks.Router.init({targets: [{id, param}]})
- Supports: refresh restore, deep linking, back/forward navigation
- Excludes: Popup/PopupWindow/NewWindow (modal, transient)
- Non-tracked targets unaffected (login state, header, etc.)
2026-05-27 15:19:17 +08:00
6312ae8e22 bugfix 2026-05-27 13:40:13 +08:00
2ccd47ea03 Revert "feat: add shell_theme.css and shell_theme.js to header.tmpl"
This reverts commit 3ba2e0db2ee7adabdf3746db513493f12305e9e6.
2026-05-26 15:59:49 +08:00
3ba2e0db2e feat: add shell_theme.css and shell_theme.js to header.tmpl 2026-05-26 15:52:29 +08:00
6d47eeb795 feat: data_filter support via toolbar search button + popup Form
When CRUD JSON has data_filter in params:
- Toolbar shows a '搜索' button (name:'filter')
- Click opens PopupWindow with Form widget
- Form fields are dynamically generated from data_filter definition
  - Extracts all {var, field, op} from AND/OR/NOT nested structure
  - Supports dropdown (uitype:'code') via browserfields.alters config
  - Customizable labels via filter_labels option
- Form submit collects values → stored in this.filter_values
- merge_search_params() sends data_filter (JSON string) + each var value
  to backend API as URL parameters
- Backend .dspy uses sqlor.filter.DBFilter.gen(ns) for SQL WHERE clause

Deleted previous inline DataFilter widget approach; replaced with
popup Form pattern that matches existing CRUD edit/add form UX.
2026-05-25 14:15:59 +08:00
431245648d feat: add DataFilter widget for data_filter support in DataViewer
- New bricks.DataFilter widget (bricks/data_filter.js): parses data_filter
  JSON definition, renders search input fields for each var parameter,
  supports AND/OR/NOT nested structures, and UiCode dropdowns for fields
  with browserfields.alters uitype=code configuration.
- Modified DataViewer (bricks/dataviewer.js): added build_datafilter_widget(),
  filter_event_handle(), filter_clear_handle() methods; extended
  merge_search_params() to send data_filter JSON + collected var values
  to the backend API.
- Updated build.sh: added data_filter.js to the JS concatenation list.

Backend integration: DataViewer sends data_filter (JSON string) and
each var's user input value as URL params. Backend .dspy uses
sqlor.filter.DBFilter to convert to SQL WHERE clause.
2026-05-25 14:02:58 +08:00
5a94ae73d9 buggix 2026-05-25 12:28:45 +08:00
0c274cca51 buggix 2026-05-25 12:27:05 +08:00
07878a13b2 bugfix 2026-05-25 12:04:45 +08:00
9844311385 bugfix 2026-05-25 11:47:26 +08:00
1722340bc1 buggix 2026-05-24 16:46:27 +08:00
83f1214a37 buggix 2026-05-24 16:42:09 +08:00
0149c401b1 bugfix 2026-05-24 16:39:46 +08:00
1cc78362cc bugfix 2026-05-24 16:25:37 +08:00
f33ccba66f bugfix 2026-05-21 10:39:53 +08:00
29b9023959 Add DataViewer search bar integration 2026-05-19 01:09:10 +08:00
4f028f9835 bugfix 2026-05-16 15:46:20 +08:00
74f16fb5a7 bugfix 2026-05-16 15:43:33 +08:00
1d178c2c59 bugfix 2026-05-16 15:41:43 +08:00
cebd7be0a1 bugfix 2026-05-16 15:06:34 +08:00
a4383b5a49 bugfix 2026-05-16 12:47:19 +08:00
683832659a bugfix 2026-05-16 11:53:00 +08:00
1349527fd7 bugfix 2026-05-16 11:46:10 +08:00
f581fc9b23 bugfix 2026-05-16 11:43:26 +08:00
24ba4a0842 bugfix 2026-05-16 10:22:50 +08:00
04a6c88f11 bugfix 2026-05-12 11:32:25 +08:00
80f8bd3849 bugfix 2026-05-12 11:26:22 +08:00
dbfcd358c6 bugfix 2026-05-12 11:16:41 +08:00
8eab450509 bugfix 2026-05-09 16:01:11 +08:00
b0412d3259 bugfix 2026-05-09 15:59:23 +08:00
58b7eaf289 bugfix 2026-05-08 19:14:10 +08:00
7d161199b4 bugfix 2026-05-08 19:10:43 +08:00
83f55ae9ee bugfix 2026-05-08 14:09:24 +08:00
a6bd75dbbd bugfix 2026-05-07 14:46:08 +08:00
269bdac2f6 bugfix 2026-05-06 18:03:13 +08:00
bd99c0e0b9 bugfix 2026-05-06 17:55:00 +08:00
2113a27e02 bugfix 2026-05-06 17:53:00 +08:00
621aa5c347 bugfix 2026-05-06 17:50:10 +08:00
10a5bdba22 bugfix 2026-05-05 16:17:45 +08:00
4485248246 bugfix 2026-05-01 07:25:34 +08:00
b206291898 bugfix 2026-04-22 17:56:55 +08:00
da5d8da243 bugfix 2026-04-22 10:37:35 +08:00
2a5865b940 bugfix 2026-04-22 10:35:06 +08:00
02520995a6 bugfix 2026-04-17 23:32:43 +08:00
58c7838ac3 bugfix 2026-04-15 15:37:35 +08:00
368cecd07e bugfix 2026-03-16 13:55:57 +08:00