Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
M
Mirai
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
Mirai
Commits
e698f69e
Commit
e698f69e
authored
Feb 23, 2020
by
ryoii
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix build
parent
6e2c8079
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
13 deletions
+10
-13
mirai-console-graphical/src/main/kotlin/net/mamoe/mirai/console/graphical/controller/MiraiGraphicalUIController.kt
...onsole/graphical/controller/MiraiGraphicalUIController.kt
+3
-6
mirai-console-graphical/src/main/kotlin/net/mamoe/mirai/console/graphical/view/SettingsView.kt
...in/net/mamoe/mirai/console/graphical/view/SettingsView.kt
+7
-7
No files found.
mirai-console-graphical/src/main/kotlin/net/mamoe/mirai/console/graphical/controller/MiraiGraphicalUIController.kt
View file @
e698f69e
...
...
@@ -6,7 +6,6 @@ import javafx.stage.Modality
import
kotlinx.io.core.IoBuffer
import
net.mamoe.mirai.Bot
import
net.mamoe.mirai.console.MiraiConsole
import
net.mamoe.mirai.console.MiraiConsoleUI
import
net.mamoe.mirai.console.graphical.model.BotModel
import
net.mamoe.mirai.console.graphical.model.ConsoleInfo
import
net.mamoe.mirai.console.graphical.model.PluginModel
...
...
@@ -29,15 +28,15 @@ class MiraiGraphicalUIController : Controller(), MiraiConsoleUI {
val
botList
=
observableListOf
<
BotModel
>()
val
pluginList
:
ObservableList
<
PluginModel
>
by
lazy
(
::
getPluginsFromConsole
)
val
consoleConfig
:
Map
<
String
,
Any
>
by
lazy
(
::
getConfigFromConsole
)
//
val consoleConfig : Map<String, Any> by lazy(::getConfigFromConsole)
val
consoleInfo
=
ConsoleInfo
()
suspend
fun
login
(
qq
:
String
,
psd
:
String
)
{
MiraiConsole
.
CommandListener
.
commandChannel
.
send
(
"/login $qq $psd"
)
// MiraiConsole
}
suspend
fun
sendCommand
(
command
:
String
)
=
MiraiConsole
.
CommandListener
.
commandChannel
.
send
(
command
)
suspend
fun
sendCommand
(
command
:
String
)
=
Unit
override
fun
pushLog
(
identity
:
Long
,
message
:
String
)
=
Platform
.
runLater
{
when
(
identity
)
{
...
...
@@ -84,8 +83,6 @@ class MiraiGraphicalUIController : Controller(), MiraiConsoleUI {
// TODO
return
observableListOf
<
PluginModel
>()
}
private
fun
getConfigFromConsole
()
=
MiraiConsole
.
MiraiProperties
.
config
.
asMap
()
}
class
GraphicalLoginSolver
:
LoginSolver
()
{
...
...
mirai-console-graphical/src/main/kotlin/net/mamoe/mirai/console/graphical/view/SettingsView.kt
View file @
e698f69e
...
...
@@ -12,12 +12,12 @@ class SettingsView : View() {
private
val
controller
=
find
<
MiraiGraphicalUIController
>()
override
val
root
=
form
{
controller
.
consoleConfig
.
forEach
{
fieldset
{
field
(
it
.
key
)
{
jfxTextfield
(
it
.
value
.
toString
())
{
isEditable
=
false
}
}
}
}
//
controller.consoleConfig.forEach {
//
fieldset {
//
field(it.key) {
//
jfxTextfield(it.value.toString()) { isEditable = false }
//
}
//
}
//
}
}
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment