English Translations
This commit is contained in:
parent
c13057af78
commit
f13c022a18
247
logs/common.log
Normal file
247
logs/common.log
Normal file
@ -0,0 +1,247 @@
|
||||
[SYS] 2023/05/20 - 10:50:07 | One API v0.0.0 started
|
||||
[SYS] 2023/05/20 - 10:50:07 | SQL_DSN not set, using SQLite as database
|
||||
[SYS] 2023/05/20 - 10:50:07 | no user exists, create a root user for you: username is root, password is 123456
|
||||
[SYS] 2023/05/20 - 10:50:07 | REDIS_CONN_STRING not set, Redis is not enabled
|
||||
[GIN] 2023/05/20 - 10:50:12 | 200 | 12.859666ms | ::1 | GET "/"
|
||||
[GIN] 2023/05/20 - 10:50:12 | 200 | 26.413125ms | ::1 | GET "/static/css/main.44582e8c.css"
|
||||
[GIN] 2023/05/20 - 10:50:12 | 200 | 37.66425ms | ::1 | GET "/static/js/main.35f71d41.js"
|
||||
[GIN] 2023/05/20 - 10:50:12 | 200 | 233.625µs | ::1 | GET "/logo.png"
|
||||
[GIN] 2023/05/20 - 10:50:12 | 200 | 2.301584ms | ::1 | GET "/static/js/416.8b714abc.chunk.js"
|
||||
[GIN] 2023/05/20 - 10:50:12 | 200 | 504.458µs | ::1 | GET "/api/status"
|
||||
[GIN] 2023/05/20 - 10:50:12 | 200 | 3.158792ms | ::1 | GET "/static/media/icons.38c6d8bab26db77d8c80.woff2"
|
||||
[GIN] 2023/05/20 - 10:50:12 | 200 | 295.667µs | ::1 | GET "/api/notice"
|
||||
[GIN] 2023/05/20 - 10:50:12 | 200 | 86.75µs | ::1 | GET "/api/home_page_content"
|
||||
[SYS] 2023/05/20 - 10:53:52 | One API v0.0.0 started
|
||||
[SYS] 2023/05/20 - 10:53:52 | SQL_DSN not set, using SQLite as database
|
||||
[SYS] 2023/05/20 - 10:53:52 | REDIS_CONN_STRING not set, Redis is not enabled
|
||||
[GIN] 2023/05/20 - 10:53:55 | 200 | 4.574625ms | ::1 | GET "/about"
|
||||
[GIN] 2023/05/20 - 10:53:55 | 200 | 19.270708ms | ::1 | GET "/static/js/main.563ef435.js"
|
||||
[GIN] 2023/05/20 - 10:53:55 | 200 | 152.334µs | ::1 | GET "/static/js/651.506a78d5.chunk.js"
|
||||
[GIN] 2023/05/20 - 10:53:55 | 200 | 1.168292ms | ::1 | GET "/api/status"
|
||||
[GIN] 2023/05/20 - 10:53:55 | 200 | 347.042µs | ::1 | GET "/api/about"
|
||||
[SYS] 2023/05/20 - 10:57:07 | One API v0.0.0 started
|
||||
[SYS] 2023/05/20 - 10:57:07 | SQL_DSN not set, using SQLite as database
|
||||
[SYS] 2023/05/20 - 10:57:07 | REDIS_CONN_STRING not set, Redis is not enabled
|
||||
[GIN] 2023/05/20 - 10:57:10 | 200 | 5.57525ms | ::1 | GET "/login"
|
||||
[GIN] 2023/05/20 - 10:57:10 | 200 | 437.416µs | ::1 | GET "/api/status"
|
||||
[GIN] 2023/05/20 - 10:57:16 | 200 | 92.48725ms | ::1 | POST "/api/user/login"
|
||||
[GIN] 2023/05/20 - 10:57:16 | 200 | 346.416µs | ::1 | GET "/api/notice"
|
||||
[GIN] 2023/05/20 - 10:57:16 | 200 | 1.17375ms | ::1 | GET "/api/home_page_content"
|
||||
[SYS] 2023/05/20 - 11:02:29 | One API v0.0.0 started
|
||||
[SYS] 2023/05/20 - 11:02:29 | SQL_DSN not set, using SQLite as database
|
||||
[SYS] 2023/05/20 - 11:02:29 | REDIS_CONN_STRING not set, Redis is not enabled
|
||||
[SYS] 2023/05/20 - 11:03:31 | One API v0.0.0 started
|
||||
[SYS] 2023/05/20 - 11:03:31 | SQL_DSN not set, using SQLite as database
|
||||
[SYS] 2023/05/20 - 11:03:31 | REDIS_CONN_STRING not set, Redis is not enabled
|
||||
[GIN] 2023/05/20 - 11:04:23 | 200 | 10.946667ms | ::1 | GET "/"
|
||||
[GIN] 2023/05/20 - 11:04:23 | 200 | 17.728625ms | ::1 | GET "/static/js/main.cabf255c.js"
|
||||
[GIN] 2023/05/20 - 11:04:23 | 200 | 587.542µs | ::1 | GET "/static/js/416.1d27c003.chunk.js"
|
||||
[GIN] 2023/05/20 - 11:04:23 | 200 | 817.292µs | ::1 | GET "/api/status"
|
||||
[GIN] 2023/05/20 - 11:04:23 | 200 | 844.167µs | ::1 | GET "/api/home_page_content"
|
||||
[GIN] 2023/05/20 - 11:04:23 | 200 | 1.285375ms | ::1 | GET "/api/notice"
|
||||
[GIN] 2023/05/20 - 11:04:30 | 401 | 1.201041ms | ::1 | GET "/api/channel/?p=0"
|
||||
[GIN] 2023/05/20 - 11:04:30 | 200 | 317.333µs | ::1 | GET "/login?expired=true"
|
||||
[GIN] 2023/05/20 - 11:04:30 | 200 | 394.875µs | ::1 | GET "/api/status"
|
||||
[GIN] 2023/05/20 - 11:04:35 | 200 | 110.355417ms | ::1 | POST "/api/user/login"
|
||||
[GIN] 2023/05/20 - 11:04:35 | 200 | 308.167µs | ::1 | GET "/api/notice"
|
||||
[GIN] 2023/05/20 - 11:04:35 | 200 | 1.375292ms | ::1 | GET "/api/home_page_content"
|
||||
[GIN] 2023/05/20 - 11:04:37 | 200 | 2.070208ms | ::1 | GET "/api/channel/?p=0"
|
||||
[SYS] 2023/05/20 - 11:13:57 | One API v0.0.0 started
|
||||
[SYS] 2023/05/20 - 11:13:57 | SQL_DSN not set, using SQLite as database
|
||||
[SYS] 2023/05/20 - 11:13:57 | REDIS_CONN_STRING not set, Redis is not enabled
|
||||
[GIN] 2023/05/20 - 11:13:59 | 200 | 3.902791ms | ::1 | GET "/redemption"
|
||||
[GIN] 2023/05/20 - 11:13:59 | 200 | 20.436084ms | ::1 | GET "/static/js/main.f1005143.js"
|
||||
[GIN] 2023/05/20 - 11:13:59 | 401 | 1.785625ms | ::1 | GET "/api/redemption/?p=0"
|
||||
[GIN] 2023/05/20 - 11:13:59 | 200 | 1.757167ms | ::1 | GET "/api/status"
|
||||
[GIN] 2023/05/20 - 11:14:00 | 200 | 339.667µs | ::1 | GET "/api/status"
|
||||
[GIN] 2023/05/20 - 11:14:03 | 200 | 102.874875ms | ::1 | POST "/api/user/login"
|
||||
[GIN] 2023/05/20 - 11:14:03 | 200 | 68.916µs | ::1 | GET "/api/notice"
|
||||
[GIN] 2023/05/20 - 11:14:03 | 200 | 259µs | ::1 | GET "/api/home_page_content"
|
||||
[GIN] 2023/05/20 - 11:14:05 | 200 | 801.083µs | ::1 | GET "/api/token/?p=0"
|
||||
[GIN] 2023/05/20 - 11:14:06 | 200 | 1.199667ms | ::1 | GET "/api/redemption/?p=0"
|
||||
[GIN] 2023/05/20 - 11:14:07 | 200 | 579.958µs | ::1 | GET "/api/channel/?p=0"
|
||||
[GIN] 2023/05/20 - 11:14:08 | 200 | 350.75µs | ::1 | GET "/channel"
|
||||
[GIN] 2023/05/20 - 11:14:08 | 200 | 210.958µs | ::1 | GET "/api/status"
|
||||
[GIN] 2023/05/20 - 11:14:08 | 200 | 358.209µs | ::1 | GET "/api/channel/?p=0"
|
||||
[GIN] 2023/05/20 - 11:14:09 | 200 | 835.541µs | ::1 | GET "/api/token/?p=0"
|
||||
[GIN] 2023/05/20 - 11:14:13 | 200 | 1.744458ms | ::1 | GET "/api/redemption/?p=0"
|
||||
[GIN] 2023/05/20 - 11:14:14 | 200 | 596.75µs | ::1 | GET "/api/token/?p=0"
|
||||
[GIN] 2023/05/20 - 11:14:15 | 200 | 1.115042ms | ::1 | GET "/api/user/self"
|
||||
[GIN] 2023/05/20 - 11:15:25 | 200 | 8.254125ms | ::1 | GET "/api/redemption/?p=0"
|
||||
[SYS] 2023/05/20 - 11:22:16 | One API v0.0.0 started
|
||||
[SYS] 2023/05/20 - 11:22:16 | SQL_DSN not set, using SQLite as database
|
||||
[SYS] 2023/05/20 - 11:22:16 | REDIS_CONN_STRING not set, Redis is not enabled
|
||||
[GIN] 2023/05/20 - 11:22:28 | 200 | 2.60625ms | ::1 | GET "/redemption"
|
||||
[GIN] 2023/05/20 - 11:22:28 | 200 | 29.388167ms | ::1 | GET "/static/js/main.db5a4b5f.js"
|
||||
[GIN] 2023/05/20 - 11:22:28 | 401 | 292.208µs | ::1 | GET "/api/redemption/?p=0"
|
||||
[GIN] 2023/05/20 - 11:22:28 | 200 | 1.564792ms | ::1 | GET "/api/status"
|
||||
[GIN] 2023/05/20 - 11:22:28 | 200 | 331.083µs | ::1 | GET "/api/status"
|
||||
[GIN] 2023/05/20 - 11:22:32 | 200 | 102.481375ms | ::1 | POST "/api/user/login"
|
||||
[GIN] 2023/05/20 - 11:22:32 | 200 | 59.25µs | ::1 | GET "/api/home_page_content"
|
||||
[GIN] 2023/05/20 - 11:22:32 | 200 | 343.042µs | ::1 | GET "/api/notice"
|
||||
[GIN] 2023/05/20 - 11:22:36 | 200 | 1.732458ms | ::1 | GET "/api/option/"
|
||||
[GIN] 2023/05/20 - 11:22:37 | 200 | 2.01025ms | ::1 | GET "/api/option/"
|
||||
[GIN] 2023/05/20 - 11:22:50 | 200 | 4.890791ms | ::1 | GET "/api/channel/?p=0"
|
||||
[GIN] 2023/05/20 - 11:22:51 | 200 | 1.106041ms | ::1 | GET "/api/token/?p=0"
|
||||
[GIN] 2023/05/20 - 11:22:52 | 200 | 2.122375ms | ::1 | GET "/api/redemption/?p=0"
|
||||
[GIN] 2023/05/20 - 11:22:52 | 200 | 528µs | ::1 | GET "/api/token/?p=0"
|
||||
[GIN] 2023/05/20 - 11:22:53 | 200 | 1.728416ms | ::1 | GET "/token"
|
||||
[GIN] 2023/05/20 - 11:22:54 | 200 | 155.584µs | ::1 | GET "/api/status"
|
||||
[GIN] 2023/05/20 - 11:22:54 | 200 | 367.541µs | ::1 | GET "/api/token/?p=0"
|
||||
[GIN] 2023/05/20 - 11:22:55 | 200 | 1.617834ms | ::1 | GET "/api/redemption/?p=0"
|
||||
[GIN] 2023/05/20 - 11:22:59 | 200 | 550.5µs | ::1 | GET "/redemption"
|
||||
[GIN] 2023/05/20 - 11:22:59 | 200 | 687.542µs | ::1 | GET "/api/redemption/?p=0"
|
||||
[GIN] 2023/05/20 - 11:22:59 | 200 | 208.959µs | ::1 | GET "/api/status"
|
||||
[GIN] 2023/05/20 - 11:23:05 | 200 | 7.089083ms | ::1 | GET "/redemption"
|
||||
[GIN] 2023/05/20 - 11:23:05 | 200 | 230.041µs | ::1 | GET "/api/status"
|
||||
[GIN] 2023/05/20 - 11:23:05 | 200 | 5.105042ms | ::1 | GET "/api/redemption/?p=0"
|
||||
[GIN] 2023/05/20 - 11:23:06 | 200 | 353.125µs | ::1 | GET "/redemption"
|
||||
[GIN] 2023/05/20 - 11:23:06 | 200 | 498µs | ::1 | GET "/api/redemption/?p=0"
|
||||
[GIN] 2023/05/20 - 11:23:06 | 200 | 509.75µs | ::1 | GET "/api/status"
|
||||
[GIN] 2023/05/20 - 11:23:07 | 200 | 369.208µs | ::1 | GET "/redemption"
|
||||
[GIN] 2023/05/20 - 11:23:07 | 200 | 699.208µs | ::1 | GET "/api/status"
|
||||
[GIN] 2023/05/20 - 11:23:07 | 200 | 1.711833ms | ::1 | GET "/api/redemption/?p=0"
|
||||
[GIN] 2023/05/20 - 11:23:12 | 200 | 23.809125ms | ::1 | POST "/api/redemption/"
|
||||
[GIN] 2023/05/20 - 11:23:18 | 200 | 14.702917ms | ::1 | GET "/api/redemption/?p=0"
|
||||
[GIN] 2023/05/20 - 11:23:21 | 200 | 5.68275ms | ::1 | GET "/api/user/self"
|
||||
[GIN] 2023/05/20 - 11:23:27 | 200 | 505.375µs | ::1 | GET "/api/home_page_content"
|
||||
[GIN] 2023/05/20 - 11:23:27 | 200 | 502.25µs | ::1 | GET "/api/notice"
|
||||
[GIN] 2023/05/20 - 11:23:29 | 200 | 1.938708ms | ::1 | GET "/api/token/?p=0"
|
||||
[GIN] 2023/05/20 - 11:30:43 | 200 | 201.933667ms | ::1 | GET "/api/redemption/?p=0"
|
||||
[GIN] 2023/05/20 - 11:30:44 | 200 | 6.772667ms | ::1 | GET "/api/channel/?p=0"
|
||||
[GIN] 2023/05/20 - 11:30:44 | 200 | 89.042µs | ::1 | GET "/api/notice"
|
||||
[GIN] 2023/05/20 - 11:30:44 | 200 | 157.833µs | ::1 | GET "/api/home_page_content"
|
||||
[GIN] 2023/05/20 - 11:30:47 | 200 | 3.390667ms | ::1 | GET "/api/option/"
|
||||
[GIN] 2023/05/20 - 11:30:55 | 200 | 581.708µs | ::1 | GET "/api/option/"
|
||||
[GIN] 2023/05/20 - 11:30:59 | 200 | 1.142333ms | ::1 | GET "/setting"
|
||||
[GIN] 2023/05/20 - 11:30:59 | 200 | 317.667µs | ::1 | GET "/api/status"
|
||||
[GIN] 2023/05/20 - 11:31:04 | 200 | 1.150167ms | ::1 | GET "/api/option/"
|
||||
[GIN] 2023/05/20 - 11:31:07 | 200 | 86.75µs | ::1 | GET "/api/about"
|
||||
[GIN] 2023/05/20 - 11:31:09 | 200 | 283.708µs | ::1 | GET "/api/home_page_content"
|
||||
[GIN] 2023/05/20 - 11:31:09 | 200 | 408.292µs | ::1 | GET "/api/notice"
|
||||
[SYS] 2023/05/20 - 11:31:32 | One API v0.0.0 started
|
||||
[SYS] 2023/05/20 - 11:31:32 | SQL_DSN not set, using SQLite as database
|
||||
[SYS] 2023/05/20 - 11:31:32 | REDIS_CONN_STRING not set, Redis is not enabled
|
||||
[GIN] 2023/05/20 - 11:40:34 | 200 | 12.623208ms | ::1 | GET "/"
|
||||
[GIN] 2023/05/20 - 11:40:34 | 200 | 26.049708ms | ::1 | GET "/static/js/main.eabb3f33.js"
|
||||
[GIN] 2023/05/20 - 11:40:34 | 200 | 2.1255ms | ::1 | GET "/api/status"
|
||||
[GIN] 2023/05/20 - 11:40:34 | 200 | 88.875µs | ::1 | GET "/api/notice"
|
||||
[GIN] 2023/05/20 - 11:40:34 | 200 | 247.5µs | ::1 | GET "/api/home_page_content"
|
||||
[GIN] 2023/05/20 - 11:40:36 | 401 | 3.135833ms | ::1 | GET "/api/user/?p=0"
|
||||
[GIN] 2023/05/20 - 11:40:37 | 200 | 456.625µs | ::1 | GET "/api/status"
|
||||
[GIN] 2023/05/20 - 11:40:49 | 200 | 107.857125ms | ::1 | POST "/api/user/register?turnstile="
|
||||
[GIN] 2023/05/20 - 11:40:56 | 200 | 104.766542ms | ::1 | POST "/api/user/login"
|
||||
[GIN] 2023/05/20 - 11:40:57 | 200 | 70.167µs | ::1 | GET "/api/notice"
|
||||
[GIN] 2023/05/20 - 11:40:57 | 200 | 53.042µs | ::1 | GET "/api/home_page_content"
|
||||
[GIN] 2023/05/20 - 11:40:58 | 200 | 3.044375ms | ::1 | GET "/api/token/?p=0"
|
||||
[GIN] 2023/05/20 - 11:41:00 | 200 | 64.208µs | ::1 | GET "/api/home_page_content"
|
||||
[GIN] 2023/05/20 - 11:41:00 | 200 | 383.917µs | ::1 | GET "/api/notice"
|
||||
[GIN] 2023/05/20 - 11:41:00 | 200 | 908.375µs | ::1 | GET "/api/token/?p=0"
|
||||
[GIN] 2023/05/20 - 11:41:01 | 200 | 1.000334ms | ::1 | GET "/token"
|
||||
[GIN] 2023/05/20 - 11:41:01 | 200 | 301.833µs | ::1 | GET "/api/status"
|
||||
[GIN] 2023/05/20 - 11:41:01 | 200 | 531.334µs | ::1 | GET "/api/token/?p=0"
|
||||
[GIN] 2023/05/20 - 11:41:02 | 200 | 1.114709ms | ::1 | GET "/api/user/self"
|
||||
[GIN] 2023/05/20 - 11:41:03 | 200 | 2.626583ms | ::1 | GET "/api/token/?p=0"
|
||||
[GIN] 2023/05/20 - 11:41:03 | 200 | 322.417µs | ::1 | GET "/token"
|
||||
[GIN] 2023/05/20 - 11:41:03 | 200 | 229.292µs | ::1 | GET "/api/status"
|
||||
[GIN] 2023/05/20 - 11:41:03 | 200 | 556.541µs | ::1 | GET "/api/token/?p=0"
|
||||
[GIN] 2023/05/20 - 11:41:04 | 200 | 430.208µs | ::1 | GET "/api/user/self"
|
||||
[GIN] 2023/05/20 - 11:41:30 | 200 | 32.115333ms | ::1 | GET "/api/about"
|
||||
[GIN] 2023/05/20 - 11:41:33 | 200 | 320.583µs | ::1 | GET "/api/about"
|
||||
[GIN] 2023/05/20 - 11:41:38 | 200 | 24.351625ms | ::1 | GET "/api/user/self"
|
||||
[GIN] 2023/05/20 - 11:41:39 | 200 | 674.667µs | ::1 | GET "/api/token/?p=0"
|
||||
[SYS] 2023/05/20 - 11:42:42 | One API v0.0.0 started
|
||||
[SYS] 2023/05/20 - 11:42:42 | SQL_DSN not set, using SQLite as database
|
||||
[SYS] 2023/05/20 - 11:42:42 | REDIS_CONN_STRING not set, Redis is not enabled
|
||||
[GIN] 2023/05/20 - 11:43:42 | 200 | 5.192417ms | ::1 | GET "/api/about"
|
||||
[GIN] 2023/05/20 - 11:43:45 | 200 | 2.559209ms | ::1 | GET "/api/user/logout"
|
||||
[GIN] 2023/05/20 - 11:43:48 | 200 | 114.867958ms | ::1 | POST "/api/user/login"
|
||||
[GIN] 2023/05/20 - 11:43:48 | 200 | 659.209µs | ::1 | GET "/api/notice"
|
||||
[GIN] 2023/05/20 - 11:43:48 | 200 | 720.042µs | ::1 | GET "/api/home_page_content"
|
||||
[GIN] 2023/05/20 - 11:43:50 | 200 | 4.758833ms | ::1 | GET "/api/token/?p=0"
|
||||
[GIN] 2023/05/20 - 11:43:51 | 200 | 1.15525ms | ::1 | GET "/api/channel/?p=0"
|
||||
[GIN] 2023/05/20 - 11:43:52 | 200 | 598.667µs | ::1 | GET "/api/notice"
|
||||
[GIN] 2023/05/20 - 11:43:52 | 200 | 94.833µs | ::1 | GET "/api/home_page_content"
|
||||
[GIN] 2023/05/20 - 11:43:54 | 200 | 566.042µs | ::1 | GET "/api/token/?p=0"
|
||||
[GIN] 2023/05/20 - 11:43:56 | 200 | 6.009166ms | ::1 | GET "/api/redemption/?p=0"
|
||||
[GIN] 2023/05/20 - 11:43:58 | 200 | 1.360416ms | ::1 | GET "/api/user/self"
|
||||
[GIN] 2023/05/20 - 11:43:58 | 200 | 981.875µs | ::1 | GET "/api/user/?p=0"
|
||||
[GIN] 2023/05/20 - 11:44:02 | 200 | 9.3375ms | ::1 | POST "/api/user/manage"
|
||||
[GIN] 2023/05/20 - 11:44:03 | 200 | 3.222792ms | ::1 | POST "/api/user/manage"
|
||||
[GIN] 2023/05/20 - 11:44:05 | 200 | 1.084292ms | ::1 | GET "/api/user/?p=0"
|
||||
[GIN] 2023/05/20 - 11:44:07 | 200 | 749.25µs | ::1 | GET "/api/option/"
|
||||
[GIN] 2023/05/20 - 11:44:09 | 200 | 593.25µs | ::1 | GET "/api/option/"
|
||||
[SYS] 2023/05/20 - 11:48:39 | One API v0.0.0 started
|
||||
[SYS] 2023/05/20 - 11:48:39 | SQL_DSN not set, using SQLite as database
|
||||
[SYS] 2023/05/20 - 11:48:39 | REDIS_CONN_STRING not set, Redis is not enabled
|
||||
[GIN] 2023/05/20 - 11:48:48 | 200 | 1.689542ms | ::1 | GET "/api/home_page_content"
|
||||
[GIN] 2023/05/20 - 11:48:48 | 200 | 1.726833ms | ::1 | GET "/api/notice"
|
||||
[GIN] 2023/05/20 - 11:48:53 | 401 | 238.167µs | ::1 | GET "/api/channel/?p=0"
|
||||
[GIN] 2023/05/20 - 11:48:53 | 200 | 493.708µs | ::1 | GET "/api/status"
|
||||
[GIN] 2023/05/20 - 11:48:59 | 200 | 79.901166ms | ::1 | POST "/api/user/login"
|
||||
[GIN] 2023/05/20 - 11:48:59 | 200 | 84.875µs | ::1 | GET "/api/notice"
|
||||
[GIN] 2023/05/20 - 11:48:59 | 200 | 462.5µs | ::1 | GET "/api/home_page_content"
|
||||
[GIN] 2023/05/20 - 11:49:00 | 200 | 4.78ms | ::1 | GET "/api/channel/?p=0"
|
||||
[GIN] 2023/05/20 - 11:49:30 | 200 | 5.747209ms | ::1 | GET "/channel"
|
||||
[GIN] 2023/05/20 - 11:49:30 | 200 | 27.551167ms | ::1 | GET "/static/js/main.58eb6be2.js"
|
||||
[GIN] 2023/05/20 - 11:49:30 | 200 | 1.23575ms | ::1 | GET "/api/status"
|
||||
[GIN] 2023/05/20 - 11:49:30 | 200 | 4.132417ms | ::1 | GET "/api/channel/?p=0"
|
||||
[GIN] 2023/05/20 - 11:49:31 | 200 | 211.833µs | ::1 | GET "/channel"
|
||||
[GIN] 2023/05/20 - 11:49:31 | 200 | 3.979709ms | ::1 | GET "/api/channel/?p=0"
|
||||
[GIN] 2023/05/20 - 11:49:31 | 200 | 1.640167ms | ::1 | GET "/api/status"
|
||||
[GIN] 2023/05/20 - 11:49:32 | 200 | 254.042µs | ::1 | GET "/channel"
|
||||
[GIN] 2023/05/20 - 11:49:32 | 200 | 25.220916ms | ::1 | GET "/static/css/main.44582e8c.css"
|
||||
[GIN] 2023/05/20 - 11:49:32 | 200 | 27.9145ms | ::1 | GET "/static/js/main.58eb6be2.js"
|
||||
[GIN] 2023/05/20 - 11:49:32 | 200 | 693.583µs | ::1 | GET "/logo.png"
|
||||
[GIN] 2023/05/20 - 11:49:32 | 200 | 224.959µs | ::1 | GET "/api/status"
|
||||
[GIN] 2023/05/20 - 11:49:32 | 200 | 1.3275ms | ::1 | GET "/api/channel/?p=0"
|
||||
[GIN] 2023/05/20 - 11:49:32 | 200 | 4.942209ms | ::1 | GET "/static/media/icons.38c6d8bab26db77d8c80.woff2"
|
||||
[GIN] 2023/05/20 - 11:49:32 | 200 | 185.25µs | ::1 | GET "/logo.png"
|
||||
[GIN] 2023/05/20 - 11:49:34 | 200 | 1.939833ms | ::1 | GET "/api/token/?p=0"
|
||||
[GIN] 2023/05/20 - 11:49:35 | 200 | 2.873667ms | ::1 | GET "/api/redemption/?p=0"
|
||||
[GIN] 2023/05/20 - 11:49:35 | 200 | 4.074708ms | ::1 | GET "/api/user/self"
|
||||
[GIN] 2023/05/20 - 11:49:39 | 200 | 1.153291ms | ::1 | GET "/api/user/?p=0"
|
||||
[GIN] 2023/05/20 - 11:49:42 | 200 | 835.75µs | ::1 | GET "/api/option/"
|
||||
[GIN] 2023/05/20 - 11:49:57 | 200 | 1.550666ms | ::1 | GET "/api/user/self"
|
||||
[GIN] 2023/05/20 - 11:49:57 | 200 | 2.227125ms | ::1 | GET "/api/redemption/?p=0"
|
||||
[GIN] 2023/05/20 - 11:54:08 | 200 | 4.533875ms | ::1 | GET "/redemption"
|
||||
[GIN] 2023/05/20 - 11:54:08 | 200 | 1.592542ms | ::1 | GET "/api/status"
|
||||
[GIN] 2023/05/20 - 11:54:08 | 200 | 40.118583ms | ::1 | GET "/api/redemption/?p=0"
|
||||
[GIN] 2023/05/20 - 11:54:09 | 200 | 86.708µs | ::1 | GET "/api/home_page_content"
|
||||
[GIN] 2023/05/20 - 11:54:09 | 200 | 66.666µs | ::1 | GET "/api/notice"
|
||||
[GIN] 2023/05/20 - 11:54:09 | 200 | 1.1075ms | ::1 | GET "/api/channel/?p=0"
|
||||
[GIN] 2023/05/20 - 11:54:10 | 200 | 772.167µs | ::1 | GET "/api/token/?p=0"
|
||||
[GIN] 2023/05/20 - 11:54:10 | 200 | 748µs | ::1 | GET "/api/redemption/?p=0"
|
||||
[GIN] 2023/05/20 - 11:54:10 | 200 | 1.773459ms | ::1 | GET "/api/user/self"
|
||||
[GIN] 2023/05/20 - 11:54:11 | 200 | 956.625µs | ::1 | GET "/api/user/?p=0"
|
||||
[GIN] 2023/05/20 - 11:54:13 | 200 | 313.167µs | ::1 | GET "/api/about"
|
||||
[GIN] 2023/05/20 - 11:54:39 | 200 | 2.360292ms | ::1 | GET "/api/channel/?p=0"
|
||||
[GIN] 2023/05/20 - 11:54:41 | 200 | 476.542µs | ::1 | GET "/api/token/?p=0"
|
||||
[GIN] 2023/05/20 - 11:54:43 | 200 | 1.035833ms | ::1 | GET "/api/redemption/?p=0"
|
||||
[GIN] 2023/05/20 - 11:54:44 | 200 | 1.151625ms | ::1 | GET "/api/user/self"
|
||||
[GIN] 2023/05/20 - 11:54:46 | 200 | 1.51825ms | ::1 | GET "/api/user/?p=0"
|
||||
[GIN] 2023/05/20 - 11:54:50 | 200 | 1.077125ms | ::1 | GET "/api/option/"
|
||||
[GIN] 2023/05/20 - 11:54:51 | 200 | 387.875µs | ::1 | GET "/api/option/"
|
||||
[GIN] 2023/05/20 - 11:55:01 | 200 | 16.721208ms | ::1 | PUT "/api/option/"
|
||||
[GIN] 2023/05/20 - 11:55:03 | 200 | 1.328625ms | ::1 | PUT "/api/option/"
|
||||
[GIN] 2023/05/20 - 11:55:06 | 200 | 3.265042ms | ::1 | PUT "/api/option/"
|
||||
[GIN] 2023/05/20 - 11:55:10 | 200 | 2.295333ms | ::1 | PUT "/api/option/"
|
||||
[GIN] 2023/05/20 - 11:55:15 | 200 | 811.917µs | ::1 | GET "/api/notice"
|
||||
[GIN] 2023/05/20 - 11:55:15 | 200 | 740.583µs | ::1 | GET "/api/home_page_content"
|
||||
[GIN] 2023/05/20 - 11:55:18 | 200 | 2.017ms | ::1 | GET "/"
|
||||
[GIN] 2023/05/20 - 11:55:18 | 200 | 394.542µs | ::1 | GET "/api/status"
|
||||
[GIN] 2023/05/20 - 11:55:18 | 200 | 119.958µs | ::1 | GET "/api/home_page_content"
|
||||
[GIN] 2023/05/20 - 11:55:18 | 200 | 215.583µs | ::1 | GET "/api/notice"
|
||||
[GIN] 2023/05/20 - 11:55:19 | 200 | 1.454833ms | ::1 | GET "/api/channel/?p=0"
|
||||
[GIN] 2023/05/20 - 11:55:20 | 200 | 191.958µs | ::1 | GET "/api/notice"
|
||||
[GIN] 2023/05/20 - 11:55:20 | 200 | 133.167µs | ::1 | GET "/api/home_page_content"
|
||||
[GIN] 2023/05/20 - 11:55:22 | 200 | 226.083µs | ::1 | GET "/api/about"
|
||||
[GIN] 2023/05/20 - 11:55:23 | 200 | 1.497625ms | ::1 | GET "/api/option/"
|
||||
[GIN] 2023/05/20 - 11:55:32 | 200 | 2.831792ms | ::1 | GET "/api/token/?p=0"
|
||||
[GIN] 2023/05/20 - 11:55:32 | 200 | 713.542µs | ::1 | GET "/api/channel/?p=0"
|
||||
[GIN] 2023/05/20 - 11:55:34 | 200 | 88.375µs | ::1 | GET "/api/about"
|
||||
[GIN] 2023/05/20 - 11:55:47 | 200 | 814.583µs | ::1 | GET "/api/option/"
|
||||
[GIN] 2023/05/20 - 11:55:49 | 200 | 7.444959ms | ::1 | GET "/setting"
|
||||
[GIN] 2023/05/20 - 11:55:49 | 200 | 254.417µs | ::1 | GET "/api/status"
|
||||
[GIN] 2023/05/20 - 11:55:50 | 200 | 448.625µs | ::1 | GET "/api/option/"
|
||||
[GIN] 2023/05/20 - 11:55:58 | 200 | 270.292µs | ::1 | GET "/api/about"
|
0
logs/error.log
Normal file
0
logs/error.log
Normal file
5
rebuild.sh
Executable file
5
rebuild.sh
Executable file
@ -0,0 +1,5 @@
|
||||
cd web
|
||||
npm run build
|
||||
cd ..
|
||||
go build -ldflags "-s -w" -o one-api
|
||||
./one-api --port 3001 --log-dir ./logs
|
@ -96,7 +96,7 @@ const LoginForm = () => {
|
||||
<Grid textAlign="center" style={{ marginTop: '48px' }}>
|
||||
<Grid.Column style={{ maxWidth: 450 }}>
|
||||
<Header as="h2" color="" textAlign="center">
|
||||
<Image src={logo} /> 用户登录
|
||||
<Image src={logo} /> Login
|
||||
</Header>
|
||||
<Form size="large">
|
||||
<Segment>
|
||||
@ -129,7 +129,7 @@ const LoginForm = () => {
|
||||
<Link to="/reset" className="btn btn-link">
|
||||
Reset Password
|
||||
</Link>
|
||||
; No account ?
|
||||
; No account?
|
||||
<Link to="/register" className="btn btn-link">
|
||||
Click to Register
|
||||
</Link>
|
||||
|
@ -89,7 +89,7 @@ const OtherSetting = () => {
|
||||
|
||||
const checkUpdate = async () => {
|
||||
const res = await API.get(
|
||||
'https://api.github.com/repos/analogpvt/one-api/releases/latest'
|
||||
'https://api.github.com/repos/analogpvt/one-api-en/releases/latest'
|
||||
);
|
||||
const { tag_name, body } = res.data;
|
||||
if (tag_name === process.env.REACT_APP_VERSION) {
|
||||
@ -108,7 +108,7 @@ const OtherSetting = () => {
|
||||
<Grid.Column>
|
||||
<Form loading={loading}>
|
||||
<Header as='h3'>General Settings</Header>
|
||||
<Form.Button onClick={checkUpdate}>检查更新</Form.Button>
|
||||
<Form.Button onClick={checkUpdate}>Check for updates</Form.Button>
|
||||
<Form.Group widths='equal'>
|
||||
<Form.TextArea
|
||||
label='Announcement'
|
||||
@ -131,7 +131,7 @@ const OtherSetting = () => {
|
||||
onChange={handleInputChange}
|
||||
/>
|
||||
</Form.Group>
|
||||
<Form.Button onClick={submitSystemName}>设置系统名称</Form.Button>
|
||||
<Form.Button onClick={submitSystemName}>Set System Name</Form.Button>
|
||||
<Form.Group widths='equal'>
|
||||
<Form.Input
|
||||
label='Logo Image URL'
|
||||
@ -164,7 +164,7 @@ const OtherSetting = () => {
|
||||
style={{ minHeight: 150, fontFamily: 'JetBrains Mono, Consolas' }}
|
||||
/>
|
||||
</Form.Group>
|
||||
<Form.Button onClick={submitAbout}>保存关于</Form.Button>
|
||||
<Form.Button onClick={submitAbout}>Save About</Form.Button>
|
||||
<Form.Group widths='equal'>
|
||||
<Form.Input
|
||||
label='Footer'
|
||||
@ -189,7 +189,7 @@ const OtherSetting = () => {
|
||||
</Modal.Description>
|
||||
</Modal.Content>
|
||||
<Modal.Actions>
|
||||
<Button onClick={() => setShowUpdateModal(false)}>关闭</Button>
|
||||
<Button onClick={() => setShowUpdateModal(false)}>Close</Button>
|
||||
<Button
|
||||
content='Details'
|
||||
onClick={() => {
|
||||
|
@ -58,9 +58,9 @@ const EditChannel = () => {
|
||||
const { success, message } = res.data;
|
||||
if (success) {
|
||||
if (isEdit) {
|
||||
showSuccess('渠道更新成功!');
|
||||
showSuccess('Channel successfully updated!');
|
||||
} else {
|
||||
showSuccess('渠道创建成功!');
|
||||
showSuccess('Channel successfully created!');
|
||||
setInputs(originInputs);
|
||||
}
|
||||
} else {
|
||||
@ -71,7 +71,7 @@ const EditChannel = () => {
|
||||
return (
|
||||
<>
|
||||
<Segment loading={loading}>
|
||||
<Header as='h3'>{isEdit ? '更新渠道信息' : '创建新的渠道'}</Header>
|
||||
<Header as='h3'>{isEdit ? 'Update Channel Information' : 'Create New Channel'}</Header>
|
||||
<Form autoComplete='new-password'>
|
||||
<Form.Field>
|
||||
<Form.Select
|
||||
@ -86,13 +86,13 @@ const EditChannel = () => {
|
||||
inputs.type === 3 && (
|
||||
<>
|
||||
<Message>
|
||||
注意,<strong>模型部署名称必须和模型名称保持一致</strong>,因为 One API 会把请求体中的 model 参数替换为你的部署名称(模型名称中的点会被剔除)。
|
||||
<strong>Note that the model deployment name must be consistent with the model name</strong>, because AnalogAI will replace the model parameter in the request body with your deployment name (dots in the model name will be removed).
|
||||
</Message>
|
||||
<Form.Field>
|
||||
<Form.Input
|
||||
label='AZURE_OPENAI_ENDPOINT'
|
||||
name='base_url'
|
||||
placeholder={'请输入 AZURE_OPENAI_ENDPOINT,例如:https://docs-test-001.openai.azure.com'}
|
||||
placeholder={'Please enter AZURE_OPENAI_ENDPOINT, for example: https://docs-test-001.openai.azure.com'}
|
||||
onChange={handleInputChange}
|
||||
value={inputs.base_url}
|
||||
autoComplete='new-password'
|
||||
@ -100,9 +100,9 @@ const EditChannel = () => {
|
||||
</Form.Field>
|
||||
<Form.Field>
|
||||
<Form.Input
|
||||
label='默认 API 版本'
|
||||
label='Default API Version'
|
||||
name='other'
|
||||
placeholder={'请输入默认 API 版本,例如:2023-03-15-preview,该配置可以被实际的请求查询参数所覆盖'}
|
||||
placeholder={'Please enter the default API version, for example: 2023-03-15-preview, this configuration can be overridden by actual request query parameters'}
|
||||
onChange={handleInputChange}
|
||||
value={inputs.other}
|
||||
autoComplete='new-password'
|
||||
@ -117,7 +117,7 @@ const EditChannel = () => {
|
||||
<Form.Input
|
||||
label='Base URL'
|
||||
name='base_url'
|
||||
placeholder={'请输入自定义渠道的 Base URL,例如:https://openai.justsong.cn'}
|
||||
placeholder={'Please enter the Base URL of the custom channel, for example: https://openai.justsong.cn'}
|
||||
onChange={handleInputChange}
|
||||
value={inputs.base_url}
|
||||
autoComplete='new-password'
|
||||
@ -127,9 +127,9 @@ const EditChannel = () => {
|
||||
}
|
||||
<Form.Field>
|
||||
<Form.Input
|
||||
label='名称'
|
||||
label='Name'
|
||||
name='name'
|
||||
placeholder={'请输入名称'}
|
||||
placeholder={'Please enter a name'}
|
||||
onChange={handleInputChange}
|
||||
value={inputs.name}
|
||||
autoComplete='new-password'
|
||||
@ -138,9 +138,9 @@ const EditChannel = () => {
|
||||
{
|
||||
batch ? <Form.Field>
|
||||
<Form.TextArea
|
||||
label='密钥'
|
||||
label='Key'
|
||||
name='key'
|
||||
placeholder={'请输入密钥,一行一个'}
|
||||
placeholder={'Please enter keys, one per line'}
|
||||
onChange={handleInputChange}
|
||||
value={inputs.key}
|
||||
style={{ minHeight: 150, fontFamily: 'JetBrains Mono, Consolas' }}
|
||||
@ -148,9 +148,9 @@ const EditChannel = () => {
|
||||
/>
|
||||
</Form.Field> : <Form.Field>
|
||||
<Form.Input
|
||||
label='密钥'
|
||||
label='Key'
|
||||
name='key'
|
||||
placeholder={'请输入密钥'}
|
||||
placeholder={'Please enter a key'}
|
||||
onChange={handleInputChange}
|
||||
value={inputs.key}
|
||||
autoComplete='new-password'
|
||||
@ -161,13 +161,13 @@ const EditChannel = () => {
|
||||
!isEdit && (
|
||||
<Form.Checkbox
|
||||
checked={batch}
|
||||
label='批量创建'
|
||||
label='Batch creation'
|
||||
name='batch'
|
||||
onChange={() => setBatch(!batch)}
|
||||
/>
|
||||
)
|
||||
}
|
||||
<Button onClick={submit}>提交</Button>
|
||||
<Button onClick={submit}>Submit</Button>
|
||||
</Form>
|
||||
</Segment>
|
||||
</>
|
||||
|
@ -5,7 +5,7 @@ import ChannelsTable from '../../components/ChannelsTable';
|
||||
const File = () => (
|
||||
<>
|
||||
<Segment>
|
||||
<Header as='h3'>管理渠道</Header>
|
||||
<Header as='h3'>Channel Management</Header>
|
||||
<ChannelsTable />
|
||||
</Segment>
|
||||
</>
|
||||
|
@ -36,7 +36,7 @@ const Home = () => {
|
||||
localStorage.setItem('home_page_content', content);
|
||||
} else {
|
||||
showError(message);
|
||||
setHomePageContent('加载首页内容失败...');
|
||||
setHomePageContent('Failed to load home page content...');
|
||||
}
|
||||
setHomePageContentLoaded(true);
|
||||
};
|
||||
@ -55,18 +55,18 @@ const Home = () => {
|
||||
{
|
||||
homePageContentLoaded && homePageContent === '' ? <>
|
||||
<Segment>
|
||||
<Header as='h3'>系统状况</Header>
|
||||
<Header as='h3'>System Status</Header>
|
||||
<Grid columns={2} stackable>
|
||||
<Grid.Column>
|
||||
<Card fluid>
|
||||
<Card.Content>
|
||||
<Card.Header>系统信息</Card.Header>
|
||||
<Card.Meta>系统信息总览</Card.Meta>
|
||||
<Card.Header>System Message</Card.Header>
|
||||
<Card.Meta>System Information Overview</Card.Meta>
|
||||
<Card.Description>
|
||||
<p>名称:{statusState?.status?.system_name}</p>
|
||||
<p>版本:{statusState?.status?.version}</p>
|
||||
<p>Name: {statusState?.status?.system_name}</p>
|
||||
<p>Version: {statusState?.status?.version}</p>
|
||||
<p>
|
||||
源码:
|
||||
Source Code:
|
||||
<a
|
||||
href='https://github.com/songquanpeng/one-api'
|
||||
target='_blank'
|
||||
@ -74,7 +74,7 @@ const Home = () => {
|
||||
https://github.com/songquanpeng/one-api
|
||||
</a>
|
||||
</p>
|
||||
<p>启动时间:{getStartTimeString()}</p>
|
||||
<p>Start Time: {getStartTimeString()}</p>
|
||||
</Card.Description>
|
||||
</Card.Content>
|
||||
</Card>
|
||||
@ -82,32 +82,32 @@ const Home = () => {
|
||||
<Grid.Column>
|
||||
<Card fluid>
|
||||
<Card.Content>
|
||||
<Card.Header>系统配置</Card.Header>
|
||||
<Card.Meta>系统配置总览</Card.Meta>
|
||||
<Card.Header>System Configuration</Card.Header>
|
||||
<Card.Meta>System configuration overview</Card.Meta>
|
||||
<Card.Description>
|
||||
<p>
|
||||
邮箱验证:
|
||||
E-mail verification:
|
||||
{statusState?.status?.email_verification === true
|
||||
? '已启用'
|
||||
: '未启用'}
|
||||
? 'Enabled'
|
||||
: 'Not Enabled'}
|
||||
</p>
|
||||
<p>
|
||||
GitHub 身份验证:
|
||||
GitHub authentication:
|
||||
{statusState?.status?.github_oauth === true
|
||||
? '已启用'
|
||||
: '未启用'}
|
||||
? 'Enabled'
|
||||
: 'Not Enabled'}
|
||||
</p>
|
||||
<p>
|
||||
微信身份验证:
|
||||
WeChat authentication:
|
||||
{statusState?.status?.wechat_login === true
|
||||
? '已启用'
|
||||
: '未启用'}
|
||||
? 'Enabled'
|
||||
: 'Not Enabled'}
|
||||
</p>
|
||||
<p>
|
||||
Turnstile 用户校验:
|
||||
Turnstile user validation:
|
||||
{statusState?.status?.turnstile_check === true
|
||||
? '已启用'
|
||||
: '未启用'}
|
||||
? 'Enabled'
|
||||
: 'Not Enabled'}
|
||||
</p>
|
||||
</Card.Description>
|
||||
</Card.Content>
|
||||
|
@ -52,9 +52,9 @@ const EditRedemption = () => {
|
||||
const { success, message, data } = res.data;
|
||||
if (success) {
|
||||
if (isEdit) {
|
||||
showSuccess('兑换码更新成功!');
|
||||
showSuccess('Redemption code updated successfully!');
|
||||
} else {
|
||||
showSuccess('兑换码创建成功!');
|
||||
showSuccess('Redemption code created successfully!');
|
||||
setInputs(originInputs);
|
||||
}
|
||||
} else {
|
||||
@ -72,13 +72,13 @@ const EditRedemption = () => {
|
||||
return (
|
||||
<>
|
||||
<Segment loading={loading}>
|
||||
<Header as='h3'>{isEdit ? '更新兑换码信息' : '创建新的兑换码'}</Header>
|
||||
<Header as='h3'>{isEdit ? 'Edit redemption code' : 'Create a redemption code'}</Header>
|
||||
<Form autoComplete='new-password'>
|
||||
<Form.Field>
|
||||
<Form.Input
|
||||
label='名称'
|
||||
label='Name'
|
||||
name='name'
|
||||
placeholder={'请输入名称'}
|
||||
placeholder={'Please enter a name'}
|
||||
onChange={handleInputChange}
|
||||
value={name}
|
||||
autoComplete='new-password'
|
||||
@ -87,9 +87,9 @@ const EditRedemption = () => {
|
||||
</Form.Field>
|
||||
<Form.Field>
|
||||
<Form.Input
|
||||
label='额度'
|
||||
label='Quota'
|
||||
name='quota'
|
||||
placeholder={'请输入单个兑换码中包含的额度'}
|
||||
placeholder={'Please enter the amount of a single redemption code'}
|
||||
onChange={handleInputChange}
|
||||
value={quota}
|
||||
autoComplete='new-password'
|
||||
@ -100,9 +100,9 @@ const EditRedemption = () => {
|
||||
!isEdit && <>
|
||||
<Form.Field>
|
||||
<Form.Input
|
||||
label='生成数量'
|
||||
label='Number of codes to generate'
|
||||
name='count'
|
||||
placeholder={'请输入生成数量'}
|
||||
placeholder={'Please enter the number of codes you want to generate.'}
|
||||
onChange={handleInputChange}
|
||||
value={count}
|
||||
autoComplete='new-password'
|
||||
@ -111,7 +111,7 @@ const EditRedemption = () => {
|
||||
</Form.Field>
|
||||
</>
|
||||
}
|
||||
<Button onClick={submit}>提交</Button>
|
||||
<Button onClick={submit}>Submit</Button>
|
||||
</Form>
|
||||
</Segment>
|
||||
</>
|
||||
|
@ -5,7 +5,7 @@ import RedemptionsTable from '../../components/RedemptionsTable';
|
||||
const Redemption = () => (
|
||||
<>
|
||||
<Segment>
|
||||
<Header as='h3'>管理兑换码</Header>
|
||||
<Header as='h3'>Manage redemption code</Header>
|
||||
<RedemptionsTable/>
|
||||
</Segment>
|
||||
</>
|
||||
|
@ -8,7 +8,7 @@ import PersonalSetting from '../../components/PersonalSetting';
|
||||
const Setting = () => {
|
||||
let panes = [
|
||||
{
|
||||
menuItem: '个人设置',
|
||||
menuItem: 'Personal Settings',
|
||||
render: () => (
|
||||
<Tab.Pane attached={false}>
|
||||
<PersonalSetting />
|
||||
@ -19,7 +19,7 @@ const Setting = () => {
|
||||
|
||||
if (isRoot()) {
|
||||
panes.push({
|
||||
menuItem: '系统设置',
|
||||
menuItem: 'System Settings',
|
||||
render: () => (
|
||||
<Tab.Pane attached={false}>
|
||||
<SystemSetting />
|
||||
@ -27,7 +27,7 @@ const Setting = () => {
|
||||
)
|
||||
});
|
||||
panes.push({
|
||||
menuItem: '其他设置',
|
||||
menuItem: 'Other Settings',
|
||||
render: () => (
|
||||
<Tab.Pane attached={false}>
|
||||
<OtherSetting />
|
||||
|
@ -66,7 +66,7 @@ const EditToken = () => {
|
||||
if (localInputs.expired_time !== -1) {
|
||||
let time = Date.parse(localInputs.expired_time);
|
||||
if (isNaN(time)) {
|
||||
showError('过期时间格式错误!');
|
||||
showError('Expiration time format error!');
|
||||
return;
|
||||
}
|
||||
localInputs.expired_time = Math.ceil(time / 1000);
|
||||
@ -80,9 +80,9 @@ const EditToken = () => {
|
||||
const { success, message } = res.data;
|
||||
if (success) {
|
||||
if (isEdit) {
|
||||
showSuccess('令牌更新成功!');
|
||||
showSuccess('Token updated successfully!');
|
||||
} else {
|
||||
showSuccess('令牌创建成功!');
|
||||
showSuccess('Token created successfully!');
|
||||
setInputs(originInputs);
|
||||
}
|
||||
} else {
|
||||
@ -93,25 +93,25 @@ const EditToken = () => {
|
||||
return (
|
||||
<>
|
||||
<Segment loading={loading}>
|
||||
<Header as='h3'>{isEdit ? '更新令牌信息' : '创建新的令牌'}</Header>
|
||||
<Header as='h3'>{isEdit ? 'Edit token' : 'Create a new token'}</Header>
|
||||
<Form autoComplete='new-password'>
|
||||
<Form.Field>
|
||||
<Form.Input
|
||||
label='名称'
|
||||
label='Name'
|
||||
name='name'
|
||||
placeholder={'请输入名称'}
|
||||
placeholder={'Please enter a name'}
|
||||
onChange={handleInputChange}
|
||||
value={name}
|
||||
autoComplete='new-password'
|
||||
required={!isEdit}
|
||||
/>
|
||||
</Form.Field>
|
||||
<Message>注意,令牌的额度仅用于限制令牌本身的最大额度使用量,实际的使用受到账户的剩余额度限制。</Message>
|
||||
<Message>Note that the amount of the token is only used to limit the maximum usage of the token itself, and the actual usage is limited by the remaining amount of the account.</Message>
|
||||
<Form.Field>
|
||||
<Form.Input
|
||||
label='额度'
|
||||
label='Quota'
|
||||
name='remain_quota'
|
||||
placeholder={'请输入额度'}
|
||||
placeholder={'Please enter an amount'}
|
||||
onChange={handleInputChange}
|
||||
value={remain_quota}
|
||||
autoComplete='new-password'
|
||||
@ -121,12 +121,12 @@ const EditToken = () => {
|
||||
</Form.Field>
|
||||
<Button type={'button'} style={{ marginBottom: '14px' }} onClick={() => {
|
||||
setUnlimitedQuota();
|
||||
}}>{unlimited_quota ? '取消无限额度' : '设置为无限额度'}</Button>
|
||||
}}>{unlimited_quota ? 'Unlimited' : 'Set to unlimited'}</Button>
|
||||
<Form.Field>
|
||||
<Form.Input
|
||||
label='过期时间'
|
||||
label='Expiration'
|
||||
name='expired_time'
|
||||
placeholder={'请输入过期时间,格式为 yyyy-MM-dd HH:mm:ss,-1 表示无限制'}
|
||||
placeholder={'Please enter the expiration time in the format of yyyy-MM-dd HH:mm:ss, -1 means unlimited'}
|
||||
onChange={handleInputChange}
|
||||
value={expired_time}
|
||||
autoComplete='new-password'
|
||||
@ -135,20 +135,21 @@ const EditToken = () => {
|
||||
</Form.Field>
|
||||
<Button type={'button'} onClick={() => {
|
||||
setExpiredTime(0, 0, 0, 0);
|
||||
}}>永不过期</Button>
|
||||
}}>Never expires</Button>
|
||||
<Button type={'button'} onClick={() => {
|
||||
setExpiredTime(1, 0, 0, 0);
|
||||
}}>一个月后过期</Button>
|
||||
}}>Expires in one month</Button>
|
||||
<Button type={'button'} onClick={() => {
|
||||
setExpiredTime(0, 1, 0, 0);
|
||||
}}>一天后过期</Button>
|
||||
}}>Expires in one day</Button>
|
||||
<Button type={'button'} onClick={() => {
|
||||
setExpiredTime(0, 0, 1, 0);
|
||||
}}>一小时后过期</Button>
|
||||
}}>Expires in one hour</Button>
|
||||
<Button type={'button'} onClick={() => {
|
||||
setExpiredTime(0, 0, 0, 1);
|
||||
}}>一分钟后过期</Button>
|
||||
<Button onClick={submit}>提交</Button>
|
||||
}}>Expires in one minute</Button>
|
||||
<br/>
|
||||
<Button onClick={submit}>Submit</Button>
|
||||
</Form>
|
||||
</Segment>
|
||||
</>
|
||||
|
@ -5,7 +5,7 @@ import TokensTable from '../../components/TokensTable';
|
||||
const Token = () => (
|
||||
<>
|
||||
<Segment>
|
||||
<Header as='h3'>我的令牌</Header>
|
||||
<Header as='h3'>My token</Header>
|
||||
<TokensTable/>
|
||||
</Segment>
|
||||
</>
|
||||
|
@ -28,7 +28,7 @@ const TopUp = () => {
|
||||
|
||||
const openTopUpLink = () => {
|
||||
if (!topUpLink) {
|
||||
showError('超级管理员未设置充值链接!');
|
||||
showError('The super administrator has not set a recharge link!');
|
||||
return;
|
||||
}
|
||||
window.open(topUpLink, '_blank');
|
||||
@ -57,12 +57,12 @@ const TopUp = () => {
|
||||
|
||||
return (
|
||||
<Segment>
|
||||
<Header as='h3'>充值额度</Header>
|
||||
<Header as='h3'>Recharge amount</Header>
|
||||
<Grid columns={2} stackable>
|
||||
<Grid.Column>
|
||||
<Form>
|
||||
<Form.Input
|
||||
placeholder='兑换码'
|
||||
placeholder='Redemption code'
|
||||
name='redemptionCode'
|
||||
value={redemptionCode}
|
||||
onChange={(e) => {
|
||||
@ -70,10 +70,10 @@ const TopUp = () => {
|
||||
}}
|
||||
/>
|
||||
<Button color='green' onClick={openTopUpLink}>
|
||||
获取兑换码
|
||||
Get Redemption Code
|
||||
</Button>
|
||||
<Button color='yellow' onClick={topUp}>
|
||||
充值
|
||||
Recharge
|
||||
</Button>
|
||||
</Form>
|
||||
</Grid.Column>
|
||||
@ -81,7 +81,7 @@ const TopUp = () => {
|
||||
<Statistic.Group widths='one'>
|
||||
<Statistic>
|
||||
<Statistic.Value>{userQuota}</Statistic.Value>
|
||||
<Statistic.Label>剩余额度</Statistic.Label>
|
||||
<Statistic.Label>Balance</Statistic.Label>
|
||||
</Statistic>
|
||||
</Statistic.Group>
|
||||
</Grid.Column>
|
||||
|
@ -20,7 +20,7 @@ const AddUser = () => {
|
||||
const res = await API.post(`/api/user/`, inputs);
|
||||
const { success, message } = res.data;
|
||||
if (success) {
|
||||
showSuccess('用户账户创建成功!');
|
||||
showSuccess('User account created successfully!');
|
||||
setInputs(originInputs);
|
||||
} else {
|
||||
showError(message);
|
||||
@ -30,13 +30,13 @@ const AddUser = () => {
|
||||
return (
|
||||
<>
|
||||
<Segment>
|
||||
<Header as="h3">创建新用户账户</Header>
|
||||
<Header as="h3">Create new user account</Header>
|
||||
<Form autoComplete="off">
|
||||
<Form.Field>
|
||||
<Form.Input
|
||||
label="用户名"
|
||||
label="Username"
|
||||
name="username"
|
||||
placeholder={'请输入用户名'}
|
||||
placeholder={'Please enter a username'}
|
||||
onChange={handleInputChange}
|
||||
value={username}
|
||||
autoComplete="off"
|
||||
@ -45,9 +45,9 @@ const AddUser = () => {
|
||||
</Form.Field>
|
||||
<Form.Field>
|
||||
<Form.Input
|
||||
label="显示名称"
|
||||
label="Display name"
|
||||
name="display_name"
|
||||
placeholder={'请输入显示名称'}
|
||||
placeholder={'Please enter a display name'}
|
||||
onChange={handleInputChange}
|
||||
value={display_name}
|
||||
autoComplete="off"
|
||||
@ -55,10 +55,10 @@ const AddUser = () => {
|
||||
</Form.Field>
|
||||
<Form.Field>
|
||||
<Form.Input
|
||||
label="密码"
|
||||
label="Password"
|
||||
name="password"
|
||||
type={'password'}
|
||||
placeholder={'请输入密码'}
|
||||
placeholder={'Please enter a password!'}
|
||||
onChange={handleInputChange}
|
||||
value={password}
|
||||
autoComplete="off"
|
||||
@ -66,7 +66,7 @@ const AddUser = () => {
|
||||
/>
|
||||
</Form.Field>
|
||||
<Button type={'submit'} onClick={submit}>
|
||||
提交
|
||||
Submit
|
||||
</Button>
|
||||
</Form>
|
||||
</Segment>
|
||||
|
@ -50,7 +50,7 @@ const EditUser = () => {
|
||||
}
|
||||
const { success, message } = res.data;
|
||||
if (success) {
|
||||
showSuccess('用户信息更新成功!');
|
||||
showSuccess('User information updated successfully!');
|
||||
} else {
|
||||
showError(message);
|
||||
}
|
||||
@ -59,13 +59,13 @@ const EditUser = () => {
|
||||
return (
|
||||
<>
|
||||
<Segment loading={loading}>
|
||||
<Header as='h3'>更新用户信息</Header>
|
||||
<Header as='h3'>Update User Information</Header>
|
||||
<Form autoComplete='new-password'>
|
||||
<Form.Field>
|
||||
<Form.Input
|
||||
label='用户名'
|
||||
label='Username'
|
||||
name='username'
|
||||
placeholder={'请输入新的用户名'}
|
||||
placeholder={'Please enter a new username'}
|
||||
onChange={handleInputChange}
|
||||
value={username}
|
||||
autoComplete='new-password'
|
||||
@ -73,10 +73,10 @@ const EditUser = () => {
|
||||
</Form.Field>
|
||||
<Form.Field>
|
||||
<Form.Input
|
||||
label='密码'
|
||||
label='Password'
|
||||
name='password'
|
||||
type={'password'}
|
||||
placeholder={'请输入新的密码'}
|
||||
placeholder={'Please enter a new password'}
|
||||
onChange={handleInputChange}
|
||||
value={password}
|
||||
autoComplete='new-password'
|
||||
@ -84,9 +84,9 @@ const EditUser = () => {
|
||||
</Form.Field>
|
||||
<Form.Field>
|
||||
<Form.Input
|
||||
label='显示名称'
|
||||
label='Display name'
|
||||
name='display_name'
|
||||
placeholder={'请输入新的显示名称'}
|
||||
placeholder={'Please enter a new display name'}
|
||||
onChange={handleInputChange}
|
||||
value={display_name}
|
||||
autoComplete='new-password'
|
||||
@ -94,35 +94,35 @@ const EditUser = () => {
|
||||
</Form.Field>
|
||||
<Form.Field>
|
||||
<Form.Input
|
||||
label='已绑定的 GitHub 账户'
|
||||
label='Connected Github Account'
|
||||
name='github_id'
|
||||
value={github_id}
|
||||
autoComplete='new-password'
|
||||
placeholder='此项只读,需要用户通过个人设置页面的相关绑定按钮进行绑定,不可直接修改'
|
||||
placeholder='This setting is read-only. To change the connected account, please use the button on the personal settings page.'
|
||||
readOnly
|
||||
/>
|
||||
</Form.Field>
|
||||
<Form.Field>
|
||||
<Form.Input
|
||||
label='已绑定的微信账户'
|
||||
label='Connected Wechat Account'
|
||||
name='wechat_id'
|
||||
value={wechat_id}
|
||||
autoComplete='new-password'
|
||||
placeholder='此项只读,需要用户通过个人设置页面的相关绑定按钮进行绑定,不可直接修改'
|
||||
placeholder='This setting is read-only. To change the connected account, please use the button on the personal settings page.'
|
||||
readOnly
|
||||
/>
|
||||
</Form.Field>
|
||||
<Form.Field>
|
||||
<Form.Input
|
||||
label='已绑定的邮箱账户'
|
||||
label='Connected Email Account'
|
||||
name='email'
|
||||
value={email}
|
||||
autoComplete='new-password'
|
||||
placeholder='此项只读,需要用户通过个人设置页面的相关绑定按钮进行绑定,不可直接修改'
|
||||
placeholder='This setting is read-only. To change the connected account, please use the button on the personal settings page.'
|
||||
readOnly
|
||||
/>
|
||||
</Form.Field>
|
||||
<Button onClick={submit}>提交</Button>
|
||||
<Button onClick={submit}>Submit</Button>
|
||||
</Form>
|
||||
</Segment>
|
||||
</>
|
||||
|
@ -5,7 +5,7 @@ import UsersTable from '../../components/UsersTable';
|
||||
const User = () => (
|
||||
<>
|
||||
<Segment>
|
||||
<Header as='h3'>管理用户</Header>
|
||||
<Header as='h3'>Manage Users</Header>
|
||||
<UsersTable/>
|
||||
</Segment>
|
||||
</>
|
||||
|
Loading…
Reference in New Issue
Block a user