1
0

app.wxss 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562
  1. page {
  2. --page-bg: #f6f8fb;
  3. --text-main: #111827;
  4. --accent: #0f8f87;
  5. --accent-dark: #08746e;
  6. --accent-soft: #e8f6f5;
  7. --danger: #c2410c;
  8. --shadow-soft: 0 10rpx 28rpx rgba(15, 23, 42, 0.05);
  9. height: 100vh;
  10. display: flex;
  11. flex-direction: column;
  12. font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
  13. background: var(--page-bg);
  14. color: var(--text-main);
  15. }
  16. .scrollarea {
  17. flex: 1;
  18. overflow-y: auto;
  19. }
  20. .page-shell {
  21. min-height: 100%;
  22. padding: 24rpx 24rpx 52rpx;
  23. box-sizing: border-box;
  24. }
  25. .page-toast {
  26. position: fixed;
  27. z-index: 50;
  28. top: calc(env(safe-area-inset-top) + 108rpx);
  29. left: 24rpx;
  30. right: 24rpx;
  31. min-height: 68rpx;
  32. padding: 16rpx 22rpx;
  33. border: 1rpx solid #d9edeb;
  34. border-radius: 14rpx;
  35. background: rgba(244, 251, 250, 0.98);
  36. color: var(--accent-dark);
  37. box-shadow: 0 12rpx 32rpx rgba(15, 23, 42, 0.16);
  38. font-size: 25rpx;
  39. line-height: 1.35;
  40. font-weight: 700;
  41. text-align: center;
  42. word-break: break-all;
  43. box-sizing: border-box;
  44. }
  45. .page-toast--error {
  46. border-color: #ffd4bf;
  47. background: rgba(255, 247, 237, 0.98);
  48. color: var(--danger);
  49. }
  50. .panel {
  51. margin-top: 24rpx;
  52. border: 1rpx solid #e6ebf2;
  53. border-radius: 18rpx;
  54. background: #ffffff;
  55. box-shadow: var(--shadow-soft);
  56. box-sizing: border-box;
  57. overflow: hidden;
  58. }
  59. .panel:first-child {
  60. margin-top: 0;
  61. }
  62. .panel-header {
  63. position: relative;
  64. display: flex;
  65. align-items: center;
  66. gap: 14rpx;
  67. padding: 24rpx 24rpx 8rpx;
  68. }
  69. .outside-header {
  70. padding: 0;
  71. margin-bottom: 16rpx;
  72. }
  73. .panel-icon {
  74. flex: none;
  75. position: relative;
  76. width: 38rpx;
  77. height: 38rpx;
  78. border-radius: 12rpx;
  79. background:
  80. radial-gradient(circle at 30% 28%, rgba(255, 255, 255, 0.26) 0%, rgba(255, 255, 255, 0.12) 22%, rgba(255, 255, 255, 0) 50%),
  81. linear-gradient(180deg, var(--icon-start, #129a91) 0%, var(--icon-end, #08746e) 100%);
  82. border: 1rpx solid rgba(255, 255, 255, 0.12);
  83. box-shadow: 0 8rpx 16rpx rgba(15, 143, 135, 0.18);
  84. overflow: hidden;
  85. }
  86. .panel-title {
  87. min-width: 0;
  88. color: #111827;
  89. font-size: 31rpx;
  90. line-height: 1.35;
  91. font-weight: 800;
  92. word-break: break-all;
  93. }
  94. .panel-header--with-actions {
  95. padding-right: 18rpx;
  96. }
  97. .panel-heading-toggle {
  98. min-width: 0;
  99. flex: 1;
  100. display: flex;
  101. align-items: center;
  102. gap: 14rpx;
  103. }
  104. .panel-heading-toggle:active {
  105. opacity: 0.72;
  106. }
  107. .panel-header--with-actions .panel-title {
  108. flex: 1;
  109. white-space: nowrap;
  110. word-break: keep-all;
  111. }
  112. .collapse-indicator {
  113. flex: none;
  114. position: relative;
  115. width: 28rpx;
  116. height: 28rpx;
  117. }
  118. .collapse-indicator::before {
  119. content: "";
  120. position: absolute;
  121. left: 8rpx;
  122. top: 6rpx;
  123. width: 10rpx;
  124. height: 10rpx;
  125. border-right: 3rpx solid #94a3b8;
  126. border-bottom: 3rpx solid #94a3b8;
  127. transform: rotate(45deg);
  128. transform-origin: center;
  129. transition: transform 0.16s ease;
  130. }
  131. .collapse-toggle.is-collapsed .collapse-indicator::before {
  132. top: 9rpx;
  133. transform: rotate(-45deg);
  134. }
  135. .collapse-toggle {
  136. flex: none;
  137. display: flex;
  138. align-items: center;
  139. justify-content: center;
  140. width: 34rpx;
  141. height: 50rpx;
  142. }
  143. .collapse-toggle:active {
  144. opacity: 0.72;
  145. }
  146. .panel--collapsed .panel-header {
  147. padding-bottom: 24rpx;
  148. }
  149. .panel-actions {
  150. flex: none;
  151. display: flex;
  152. align-items: center;
  153. gap: 8rpx;
  154. margin-left: auto;
  155. }
  156. .panel-actions--three {
  157. gap: 6rpx;
  158. }
  159. .panel-actions--status {
  160. gap: 8rpx;
  161. }
  162. .panel-action-button {
  163. flex: none;
  164. display: flex;
  165. align-items: center;
  166. justify-content: center;
  167. width: 86rpx;
  168. min-width: 0;
  169. height: 50rpx;
  170. min-height: 0;
  171. margin: 0;
  172. padding: 0;
  173. border: 1rpx solid #b9d8d1;
  174. border-radius: 10rpx;
  175. background: #ffffff;
  176. color: var(--accent-dark);
  177. font-size: 22rpx;
  178. line-height: 1.3;
  179. font-weight: 800;
  180. box-sizing: border-box;
  181. }
  182. .panel-action-button::after {
  183. border: 0;
  184. }
  185. .panel-action-button:active {
  186. opacity: 0.72;
  187. }
  188. .panel-action-button.is-disabled {
  189. background: #eef1f5;
  190. color: #94a3b8;
  191. box-shadow: none;
  192. }
  193. .panel-action-button.is-active {
  194. border-color: var(--accent-dark);
  195. background: var(--accent);
  196. color: #ffffff;
  197. }
  198. .panel-icon::before,
  199. .panel-icon::after {
  200. content: "";
  201. position: absolute;
  202. box-sizing: border-box;
  203. }
  204. .panel-icon::before {
  205. left: 7rpx;
  206. top: 7rpx;
  207. width: 24rpx;
  208. height: 24rpx;
  209. background-position: center;
  210. background-repeat: no-repeat;
  211. background-size: contain;
  212. }
  213. .panel-icon::after {
  214. left: 0;
  215. top: 0;
  216. width: 100%;
  217. height: 100%;
  218. border-radius: inherit;
  219. box-shadow: inset 0 1rpx 0 rgba(255, 255, 255, 0.2);
  220. }
  221. .icon-motor {
  222. --icon-start: #16b0a5;
  223. --icon-end: #0d7c76;
  224. }
  225. .icon-motor::before {
  226. background-image: url("/assets/icons/motor-white.png");
  227. }
  228. .icon-chip {
  229. --icon-start: #5a86a6;
  230. --icon-end: #2f5e7c;
  231. }
  232. .icon-chip::before {
  233. background-image: url("/assets/icons/chip-white.png");
  234. }
  235. .icon-control {
  236. --icon-start: #18a58b;
  237. --icon-end: #0e746f;
  238. }
  239. .icon-control::before {
  240. background-image: url("/assets/icons/control-white.png");
  241. }
  242. .icon-bluetooth {
  243. --icon-start: #16a8cf;
  244. --icon-end: #0f7a9a;
  245. }
  246. .icon-bluetooth::before {
  247. background-image: url("/assets/icons/bluetooth-connected-white.png");
  248. }
  249. .icon-radar {
  250. --icon-start: #23b0d7;
  251. --icon-end: #137e8f;
  252. }
  253. .icon-radar::before {
  254. background-image: url("/assets/icons/radar-white.png");
  255. }
  256. .icon-terminal {
  257. --icon-start: #63758f;
  258. --icon-end: #324056;
  259. }
  260. .icon-terminal::before {
  261. background-image: url("/assets/icons/terminal-white.png");
  262. }
  263. .icon-send {
  264. --icon-start: #39bdf0;
  265. --icon-end: #1684c5;
  266. }
  267. .icon-send::before {
  268. background-image: url("/assets/icons/send-white.png");
  269. }
  270. .icon-history {
  271. --icon-start: #64748b;
  272. --icon-end: #475569;
  273. }
  274. .icon-history::before {
  275. background-image: url("/assets/icons/history-white.png");
  276. }
  277. .icon-status {
  278. --icon-start: #14a79a;
  279. --icon-end: #2563eb;
  280. }
  281. .icon-status::before {
  282. background-image: url("/assets/icons/status-white.png");
  283. }
  284. .icon-bars {
  285. --icon-start: #148f85;
  286. --icon-end: #105f8b;
  287. }
  288. .icon-bars::before {
  289. background-image: url("/assets/icons/estimator-white.png");
  290. }
  291. .icon-tune {
  292. --icon-start: #17a59f;
  293. --icon-end: #0d7280;
  294. }
  295. .icon-tune::before {
  296. background-image: url("/assets/icons/sliders-white.png");
  297. }
  298. .icon-speed {
  299. --icon-start: #f7a623;
  300. --icon-end: #d97f0c;
  301. }
  302. .icon-speed::before {
  303. background-image: url("/assets/icons/speed-white.png");
  304. }
  305. .icon-wind {
  306. --icon-start: #22b8cf;
  307. --icon-end: #0b7888;
  308. }
  309. .icon-wind::before {
  310. background-image: url("/assets/icons/wind-white.png");
  311. }
  312. .icon-target {
  313. --icon-start: #21a37e;
  314. --icon-end: #0f766e;
  315. }
  316. .icon-target::before {
  317. background-image: url("/assets/icons/target-white.png");
  318. }
  319. .icon-curve {
  320. --icon-start: #0ea5a4;
  321. --icon-end: #2563eb;
  322. }
  323. .icon-curve::before {
  324. background-image: url("/assets/icons/curve-white.png");
  325. }
  326. .icon-shield-check {
  327. --icon-start: #16a34a;
  328. --icon-end: #0f766e;
  329. }
  330. .icon-shield-check::before {
  331. background-image: url("/assets/icons/shield-check-white.png");
  332. }
  333. .icon-shield-alert {
  334. --icon-start: #f59e0b;
  335. --icon-end: #d97706;
  336. }
  337. .icon-shield-alert::before {
  338. background-image: url("/assets/icons/shield-alert-white.png");
  339. }
  340. .icon-oil {
  341. --icon-start: #f2b44c;
  342. --icon-end: #d97815;
  343. }
  344. .icon-oil::before {
  345. background-image: url("/assets/icons/oil-white.png");
  346. }
  347. .param-row {
  348. display: flex;
  349. align-items: center;
  350. justify-content: space-between;
  351. gap: 18rpx;
  352. min-height: 96rpx;
  353. padding: 0 24rpx;
  354. border-top: 1rpx solid #edf2f7;
  355. box-sizing: border-box;
  356. }
  357. .panel-header + .param-row,
  358. .panel-header + view .param-row:first-child {
  359. border-top: 0;
  360. }
  361. .param-row:first-child {
  362. border-top: 0;
  363. }
  364. .input-row {
  365. min-height: 106rpx;
  366. }
  367. .param-main {
  368. min-width: 0;
  369. flex: 1;
  370. }
  371. .param-name {
  372. min-width: 0;
  373. color: #111827;
  374. font-size: 28rpx;
  375. line-height: 1.35;
  376. font-weight: 700;
  377. word-break: break-all;
  378. }
  379. .param-meta {
  380. margin-top: 7rpx;
  381. color: #6b7280;
  382. font-size: 22rpx;
  383. line-height: 1.35;
  384. word-break: break-all;
  385. }
  386. .param-meta--dirty {
  387. color: #d97706;
  388. font-weight: 800;
  389. }
  390. .param-value {
  391. flex: none;
  392. max-width: 320rpx;
  393. color: #0f8f87;
  394. font-size: 30rpx;
  395. line-height: 1.35;
  396. font-weight: 800;
  397. text-align: right;
  398. word-break: break-all;
  399. }
  400. .input-wrap {
  401. flex: none;
  402. display: flex;
  403. align-items: center;
  404. gap: 10rpx;
  405. }
  406. .value-input {
  407. width: 300rpx;
  408. height: 70rpx;
  409. padding: 0 18rpx;
  410. border: 1rpx solid #e7edf3;
  411. border-radius: 10rpx;
  412. background: #fafbfd;
  413. color: #111827;
  414. font-size: 28rpx;
  415. line-height: 70rpx;
  416. text-align: right;
  417. box-sizing: border-box;
  418. }
  419. .value-input--with-unit {
  420. width: 300rpx;
  421. }
  422. .value-input:focus {
  423. border-color: #0f8f87;
  424. background: #f4fbfa;
  425. }
  426. .status-auto-controls {
  427. flex: none;
  428. display: flex;
  429. align-items: center;
  430. gap: 6rpx;
  431. }
  432. .auto-read-interval {
  433. width: 112rpx;
  434. height: 50rpx;
  435. padding: 0 12rpx;
  436. border: 1rpx solid #e7edf3;
  437. border-radius: 10rpx;
  438. background: #fafbfd;
  439. color: #111827;
  440. font-size: 22rpx;
  441. line-height: 50rpx;
  442. text-align: right;
  443. box-sizing: border-box;
  444. }
  445. .auto-read-unit {
  446. color: #64748b;
  447. font-size: 22rpx;
  448. }
  449. .auto-read-button {
  450. margin-left: 2rpx;
  451. }
  452. @media (max-width: 360px) {
  453. .panel-title {
  454. font-size: 28rpx;
  455. }
  456. .param-name {
  457. font-size: 26rpx;
  458. }
  459. .param-meta {
  460. font-size: 21rpx;
  461. }
  462. .value-input {
  463. width: 260rpx;
  464. }
  465. .value-input--with-unit {
  466. width: 260rpx;
  467. }
  468. .auto-read-interval {
  469. width: 96rpx;
  470. }
  471. }