feat: add nim-chronicles
This commit is contained in:
parent
6d34c8fa79
commit
1a92cda0d9
|
@ -19,3 +19,18 @@
|
|||
[submodule "vendor/nimqml"]
|
||||
path = vendor/nimqml
|
||||
url = https://github.com/status-im/nimqml
|
||||
[submodule "vendor/nim-chronicles"]
|
||||
path = vendor/nim-chronicles
|
||||
url = https://github.com/status-im/nim-chronicles
|
||||
[submodule "vendor/nim-faststreams"]
|
||||
path = vendor/nim-faststreams
|
||||
url = https://github.com/status-im/nim-faststreams/
|
||||
[submodule "vendor/nim-chronos"]
|
||||
path = vendor/nim-chronos
|
||||
url = https://github.com/status-im/nim-chronos
|
||||
[submodule "vendor/nim-json-serialization"]
|
||||
path = vendor/nim-json-serialization
|
||||
url = https://github.com/status-im/nim-json-serialization
|
||||
[submodule "vendor/nim-serialization"]
|
||||
path = vendor/nim-serialization
|
||||
url = https://github.com/status-im/nim-serialization/
|
||||
|
|
|
@ -1,8 +1,12 @@
|
|||
import NimQml
|
||||
import chronicles
|
||||
import "../../status/core" as status
|
||||
import ../signals/types
|
||||
import nodeView
|
||||
|
||||
logScope:
|
||||
topics = "node"
|
||||
|
||||
type NodeController* = ref object of SignalSubscriber
|
||||
view*: NodeView
|
||||
variant*: QVariant
|
||||
|
@ -24,6 +28,6 @@ proc init*(self: NodeController) =
|
|||
discard
|
||||
|
||||
method onSignal(self: NodeController, data: Signal) =
|
||||
echo "new signal received"
|
||||
debug "New signal received"
|
||||
var msg = cast[WalletSignal](data)
|
||||
self.view.setLastMessage(msg.content)
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import NimQml
|
||||
import chronicles
|
||||
import app/chat/core as chat
|
||||
import app/wallet/core as wallet
|
||||
import app/node/core as node
|
||||
|
@ -18,6 +19,9 @@ import state
|
|||
|
||||
var signalsQObjPointer: pointer
|
||||
|
||||
logScope:
|
||||
topics = "main"
|
||||
|
||||
proc mainProc() =
|
||||
let app = newQApplication()
|
||||
let engine = newQQmlApplicationEngine()
|
||||
|
@ -33,13 +37,10 @@ proc mainProc() =
|
|||
signalsQObjPointer = cast[pointer](signalController.vptr)
|
||||
|
||||
var appState = state.newAppState()
|
||||
echo appState.title
|
||||
debug "Application State", title=appState.title
|
||||
|
||||
var accounts = status_test.setupNewAccount()
|
||||
echo "---------"
|
||||
echo parseJSON(accounts)[0]
|
||||
echo parseJSON(accounts)[1]
|
||||
echo "---------"
|
||||
debug "Accounts", accounts0 = parseJSON(accounts)[0], accounts1 = parseJSON(accounts)[1]
|
||||
|
||||
status_chat.startMessenger()
|
||||
|
||||
|
@ -69,8 +70,6 @@ proc mainProc() =
|
|||
appState.subscribe(proc () =
|
||||
# chatsModel.names = @[]
|
||||
for channel in appState.channels:
|
||||
echo channel.name
|
||||
# chatsModel.addNameTolist(channel.name)
|
||||
chat.join(channel.name)
|
||||
)
|
||||
|
||||
|
@ -91,6 +90,7 @@ proc mainProc() =
|
|||
|
||||
# Qt main event loop is entered here
|
||||
# The termination of the loop will be performed when exit() or quit() is called
|
||||
info "Starting application..."
|
||||
app.exec()
|
||||
|
||||
when isMainModule:
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
Subproject commit fc3f2d3755e035387ebcf20d87a45eb9dcefadbb
|
|
@ -0,0 +1 @@
|
|||
Subproject commit bce0f878d16bea14395dc8944ff8dbdeffe33496
|
|
@ -0,0 +1 @@
|
|||
Subproject commit d3ef34b325eafca43405ee2b8390e1b6f218b644
|
|
@ -0,0 +1 @@
|
|||
Subproject commit aa51f6fed1715a91fd8b58072a1915422a133d4a
|
|
@ -0,0 +1 @@
|
|||
Subproject commit 8a013591bda4c5357154207060e62b5cc1eff6c8
|
Loading…
Reference in New Issue