Minor updates:
- Improve layout of TX request GRIDS screen - Add clipboard copy option to mnemonic dialog - Silence a few old tell/2 calls - Refresh main sizer layout on gmc_gui:show/1 - Resize a few silly looking single-input dialogs
This commit is contained in:
parent
b7d782e5e5
commit
4cecb23001
@ -3,6 +3,8 @@
|
|||||||
{registered,[]},
|
{registered,[]},
|
||||||
{included_applications,[]},
|
{included_applications,[]},
|
||||||
{applications,[stdlib,kernel]},
|
{applications,[stdlib,kernel]},
|
||||||
{vsn,"0.1.0"},
|
{vsn,"0.1.1"},
|
||||||
{modules,[clutch,gmc_con,gmc_gui,gmc_jt,gmc_key_master,gmc_sup]},
|
{modules,[clutch,gmc_con,gmc_grids,gmc_gui,gmc_jt,
|
||||||
|
gmc_key_master,gmc_sup,gmc_v,gmc_v_netman,
|
||||||
|
gmc_v_wallman]},
|
||||||
{mod,{clutch,[]}}]}.
|
{mod,{clutch,[]}}]}.
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
%%% @end
|
%%% @end
|
||||||
|
|
||||||
-module(clutch).
|
-module(clutch).
|
||||||
-vsn("0.1.0").
|
-vsn("0.1.1").
|
||||||
-behavior(application).
|
-behavior(application).
|
||||||
-author("Craig Everett <craigeverett@qpq.swiss>").
|
-author("Craig Everett <craigeverett@qpq.swiss>").
|
||||||
-copyright("QPQ AG <info@qpq.swiss>").
|
-copyright("QPQ AG <info@qpq.swiss>").
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
%%% @end
|
%%% @end
|
||||||
|
|
||||||
-module(gmc_con).
|
-module(gmc_con).
|
||||||
-vsn("0.1.0").
|
-vsn("0.1.1").
|
||||||
-author("Craig Everett <craigeverett@qpq.swiss>").
|
-author("Craig Everett <craigeverett@qpq.swiss>").
|
||||||
-copyright("QPQ AG <info@qpq.swiss>").
|
-copyright("QPQ AG <info@qpq.swiss>").
|
||||||
-license("GPL-3.0-or-later").
|
-license("GPL-3.0-or-later").
|
||||||
@ -167,7 +167,7 @@ sign_tx(Request) ->
|
|||||||
Name :: string(),
|
Name :: string(),
|
||||||
Seed :: string(),
|
Seed :: string(),
|
||||||
Encoding :: utf8 | base64 | base58,
|
Encoding :: utf8 | base64 | base58,
|
||||||
Transform :: raw | {Algo, Yugeness},
|
Transform :: {Algo, Yugeness},
|
||||||
Algo :: sha3 | sha2 | x_or | pbkdf2,
|
Algo :: sha3 | sha2 | x_or | pbkdf2,
|
||||||
Yugeness :: rand | non_neg_integer().
|
Yugeness :: rand | non_neg_integer().
|
||||||
%% @doc
|
%% @doc
|
||||||
@ -542,16 +542,17 @@ do_grids(String) ->
|
|||||||
end.
|
end.
|
||||||
|
|
||||||
do_grids2({{sign, http}, URL}) ->
|
do_grids2({{sign, http}, URL}) ->
|
||||||
ok = tell("Making request to ~p", [URL]),
|
ok = log(info, "Making request to ~p", [URL]),
|
||||||
case httpc:request(URL) of
|
case httpc:request(URL) of
|
||||||
{ok, {{_, 200, _}, _, JSON}} -> do_grids_sig(JSON, URL);
|
{ok, {{_, 200, _}, _, JSON}} -> do_grids_sig(JSON, URL);
|
||||||
|
{error, socket_closed_remotely} -> tell("Yep, closed remotely.");
|
||||||
Error -> gmc_gui:trouble(Error)
|
Error -> gmc_gui:trouble(Error)
|
||||||
end;
|
end;
|
||||||
do_grids2(Instruction) ->
|
do_grids2(Instruction) ->
|
||||||
tell("GRIDS: ~tp", [Instruction]).
|
tell("GRIDS: ~tp", [Instruction]).
|
||||||
|
|
||||||
do_grids_sig(JSON, URL) ->
|
do_grids_sig(JSON, URL) ->
|
||||||
ok = tell("Received: ~p", [JSON]),
|
ok = log(info, "Received: ~p", [JSON]),
|
||||||
case zj:decode(JSON) of
|
case zj:decode(JSON) of
|
||||||
{ok, GRIDS} -> do_grids_sig2(GRIDS#{"url" => URL});
|
{ok, GRIDS} -> do_grids_sig2(GRIDS#{"url" => URL});
|
||||||
Error -> gmc_gui:trouble(Error)
|
Error -> gmc_gui:trouble(Error)
|
||||||
@ -587,6 +588,7 @@ do_sign_mess2(Request = #{"url" := URL}) ->
|
|||||||
Response = zj:encode(maps:with(ResponseKeys, Request)),
|
Response = zj:encode(maps:with(ResponseKeys, Request)),
|
||||||
case httpc:request(post, {URL, [], "application/json", Response}, [], []) of
|
case httpc:request(post, {URL, [], "application/json", Response}, [], []) of
|
||||||
{ok, {{_, 200, _}, _, JSON}} -> log(info, "Signature posted: ~p", [JSON]);
|
{ok, {{_, 200, _}, _, JSON}} -> log(info, "Signature posted: ~p", [JSON]);
|
||||||
|
{error, socket_closed_remotely} -> tell("Yep, closed remotely.");
|
||||||
Error -> gmc_gui:trouble(Error)
|
Error -> gmc_gui:trouble(Error)
|
||||||
end.
|
end.
|
||||||
|
|
||||||
@ -645,7 +647,8 @@ do_sign_tx2(Request = #{"url" := URL}) ->
|
|||||||
"signed"],
|
"signed"],
|
||||||
Response = zj:encode(maps:with(ResponseKeys, Request)),
|
Response = zj:encode(maps:with(ResponseKeys, Request)),
|
||||||
case httpc:request(post, {URL, [], "application/json", Response}, [], []) of
|
case httpc:request(post, {URL, [], "application/json", Response}, [], []) of
|
||||||
{ok, {{_, 200, _}, _, JSON}} -> log(info, "Signature posted: ~p", [JSON]);
|
{ok, {{_, 200, _}, _, JSON}} -> log(info, "Signed TX posted: ~p", [JSON]);
|
||||||
|
{error, socket_closed_remotely} -> tell("Closed remotely.");
|
||||||
Error -> gmc_gui:trouble(Error)
|
Error -> gmc_gui:trouble(Error)
|
||||||
end.
|
end.
|
||||||
|
|
||||||
@ -795,9 +798,7 @@ transform({sha3, 256}) ->
|
|||||||
transform({sha2, 256}) ->
|
transform({sha2, 256}) ->
|
||||||
fun(D) -> crypto:hash(sha256, D) end;
|
fun(D) -> crypto:hash(sha256, D) end;
|
||||||
transform({x_or, 256}) ->
|
transform({x_or, 256}) ->
|
||||||
fun t_xor/1;
|
fun t_xor/1.
|
||||||
transform(raw) ->
|
|
||||||
fun(D) -> D end.
|
|
||||||
|
|
||||||
|
|
||||||
t_xor(Bin) -> t_xor(Bin, <<0:256>>).
|
t_xor(Bin) -> t_xor(Bin, <<0:256>>).
|
||||||
|
@ -37,7 +37,7 @@
|
|||||||
%%% @end
|
%%% @end
|
||||||
|
|
||||||
-module(gmc_grids).
|
-module(gmc_grids).
|
||||||
-vsn("0.1.0").
|
-vsn("0.1.1").
|
||||||
-author("Craig Everett <craigeverett@qpq.swiss>").
|
-author("Craig Everett <craigeverett@qpq.swiss>").
|
||||||
-copyright("QPQ AG <info@qpq.swiss>").
|
-copyright("QPQ AG <info@qpq.swiss>").
|
||||||
-license("GPL-3.0-or-later").
|
-license("GPL-3.0-or-later").
|
||||||
|
106
src/gmc_gui.erl
106
src/gmc_gui.erl
@ -7,7 +7,7 @@
|
|||||||
%%% @end
|
%%% @end
|
||||||
|
|
||||||
-module(gmc_gui).
|
-module(gmc_gui).
|
||||||
-vsn("0.1.0").
|
-vsn("0.1.1").
|
||||||
-author("Craig Everett <craigeverett@qpq.swiss>").
|
-author("Craig Everett <craigeverett@qpq.swiss>").
|
||||||
-copyright("QPQ AG <info@qpq.swiss>").
|
-copyright("QPQ AG <info@qpq.swiss>").
|
||||||
-license("GPL-3.0-or-later").
|
-license("GPL-3.0-or-later").
|
||||||
@ -31,6 +31,7 @@
|
|||||||
-record(s,
|
-record(s,
|
||||||
{wx = none :: none | wx:wx_object(),
|
{wx = none :: none | wx:wx_object(),
|
||||||
frame = none :: none | wx:wx_object(),
|
frame = none :: none | wx:wx_object(),
|
||||||
|
sizer = none :: none | wx:wx_object(),
|
||||||
lang = en :: en | jp,
|
lang = en :: en | jp,
|
||||||
j = none :: none | fun(),
|
j = none :: none | fun(),
|
||||||
prefs = #{} :: #{atom() := term()},
|
prefs = #{} :: #{atom() := term()},
|
||||||
@ -193,7 +194,7 @@ init(Prefs) ->
|
|||||||
ok = wxFrame:connect(Frame, close_window),
|
ok = wxFrame:connect(Frame, close_window),
|
||||||
true = wxFrame:show(Frame),
|
true = wxFrame:show(Frame),
|
||||||
ok = wxListBox:connect(Picker, command_listbox_selected),
|
ok = wxListBox:connect(Picker, command_listbox_selected),
|
||||||
State = #s{wx = Wx, frame = Frame, lang = Lang, j = J, prefs = Prefs,
|
State = #s{wx = Wx, frame = Frame, sizer = MainSz, lang = Lang, j = J, prefs = Prefs,
|
||||||
accounts = [],
|
accounts = [],
|
||||||
picker = Picker,
|
picker = Picker,
|
||||||
id = ID_W,
|
id = ID_W,
|
||||||
@ -381,8 +382,8 @@ set_node(State = #s{frame = Frame, j = J}) ->
|
|||||||
|
|
||||||
ok = wxDialog:setSizer(Dialog, Sizer),
|
ok = wxDialog:setSizer(Dialog, Sizer),
|
||||||
ok = wxBoxSizer:layout(Sizer),
|
ok = wxBoxSizer:layout(Sizer),
|
||||||
ok = wxFrame:setSize(Dialog, {500, 200}),
|
ok = wxDialog:setSize(Dialog, {500, 200}),
|
||||||
ok = wxFrame:center(Dialog),
|
ok = wxDialog:center(Dialog),
|
||||||
ok = wxStyledTextCtrl:setFocus(AddressTx),
|
ok = wxStyledTextCtrl:setFocus(AddressTx),
|
||||||
|
|
||||||
ok =
|
ok =
|
||||||
@ -448,8 +449,7 @@ make_key(State = #s{frame = Frame, j = J}) ->
|
|||||||
Transforms =
|
Transforms =
|
||||||
["SHA-3 (256)",
|
["SHA-3 (256)",
|
||||||
"SHA-2 (256)",
|
"SHA-2 (256)",
|
||||||
"XOR",
|
"XOR"],
|
||||||
"Direct Input (no transform)"],
|
|
||||||
TransformOptions = wxChoice:new(Dialog, ?wxID_ANY, [{choices, Transforms}]),
|
TransformOptions = wxChoice:new(Dialog, ?wxID_ANY, [{choices, Transforms}]),
|
||||||
ok = wxChoice:setSelection(TransformOptions, 0),
|
ok = wxChoice:setSelection(TransformOptions, 0),
|
||||||
|
|
||||||
@ -491,8 +491,7 @@ make_key(State = #s{frame = Frame, j = J}) ->
|
|||||||
case wxChoice:getSelection(TransformOptions) of
|
case wxChoice:getSelection(TransformOptions) of
|
||||||
0 -> {sha3, 256};
|
0 -> {sha3, 256};
|
||||||
1 -> {sha2, 256};
|
1 -> {sha2, 256};
|
||||||
2 -> {x_or, 256};
|
2 -> {x_or, 256}
|
||||||
3 -> raw
|
|
||||||
end,
|
end,
|
||||||
gmc_con:make_key(Type, Size, Name, Seed, Encoding, Transform);
|
gmc_con:make_key(Type, Size, Name, Seed, Encoding, Transform);
|
||||||
?wxID_CANCEL ->
|
?wxID_CANCEL ->
|
||||||
@ -549,15 +548,21 @@ show_mnemonic(Selected, State = #s{frame = Frame, j = J, accounts = Accounts}) -
|
|||||||
MnemTx = wxTextCtrl:new(Dialog, ?wxID_ANY, Options),
|
MnemTx = wxTextCtrl:new(Dialog, ?wxID_ANY, Options),
|
||||||
_ = wxStaticBoxSizer:add(MnemSz, MnemTx, zxw:flags(wide)),
|
_ = wxStaticBoxSizer:add(MnemSz, MnemTx, zxw:flags(wide)),
|
||||||
ButtSz = wxBoxSizer:new(?wxHORIZONTAL),
|
ButtSz = wxBoxSizer:new(?wxHORIZONTAL),
|
||||||
Affirm = wxButton:new(Dialog, ?wxID_OK),
|
CloseB = wxButton:new(Dialog, ?wxID_CANCEL, [{label, J("Close")}]),
|
||||||
_ = wxBoxSizer:add(ButtSz, Affirm, zxw:flags(wide)),
|
CopyB = wxButton:new(Dialog, ?wxID_OK, [{label, J("Copy to Clipboard")}]),
|
||||||
|
_ = wxBoxSizer:add(ButtSz, CloseB, zxw:flags(wide)),
|
||||||
|
_ = wxBoxSizer:add(ButtSz, CopyB, zxw:flags(wide)),
|
||||||
_ = wxBoxSizer:add(Sizer, MnemSz, zxw:flags(wide)),
|
_ = wxBoxSizer:add(Sizer, MnemSz, zxw:flags(wide)),
|
||||||
_ = wxBoxSizer:add(Sizer, ButtSz, zxw:flags(base)),
|
_ = wxBoxSizer:add(Sizer, ButtSz, zxw:flags(base)),
|
||||||
ok = wxDialog:setSizer(Dialog, Sizer),
|
ok = wxDialog:setSizer(Dialog, Sizer),
|
||||||
ok = wxBoxSizer:layout(Sizer),
|
ok = wxBoxSizer:layout(Sizer),
|
||||||
ok = wxFrame:center(Dialog),
|
ok = wxFrame:center(Dialog),
|
||||||
ok = wxStyledTextCtrl:setFocus(MnemTx),
|
ok = wxStyledTextCtrl:setFocus(MnemTx),
|
||||||
?wxID_OK = wxDialog:showModal(Dialog),
|
ok =
|
||||||
|
case wxDialog:showModal(Dialog) of
|
||||||
|
?wxID_CANCEL -> ok;
|
||||||
|
?wxID_OK -> copy_to_clipboard(Mnemonic)
|
||||||
|
end,
|
||||||
ok = wxDialog:destroy(Dialog),
|
ok = wxDialog:destroy(Dialog),
|
||||||
State.
|
State.
|
||||||
|
|
||||||
@ -584,10 +589,11 @@ rename_key(Selected, State = #s{frame = Frame, j = J, accounts = Accounts}) ->
|
|||||||
_ = wxBoxSizer:add(ButtSz, Affirm, zxw:flags(wide)),
|
_ = wxBoxSizer:add(ButtSz, Affirm, zxw:flags(wide)),
|
||||||
_ = wxBoxSizer:add(ButtSz, Cancel, zxw:flags(wide)),
|
_ = wxBoxSizer:add(ButtSz, Cancel, zxw:flags(wide)),
|
||||||
_ = wxBoxSizer:add(Sizer, NameSz, zxw:flags(base)),
|
_ = wxBoxSizer:add(Sizer, NameSz, zxw:flags(base)),
|
||||||
_ = wxBoxSizer:add(Sizer, ButtSz, zxw:flags(base)),
|
_ = wxBoxSizer:add(Sizer, ButtSz, zxw:flags(wide)),
|
||||||
ok = wxDialog:setSizer(Dialog, Sizer),
|
ok = wxDialog:setSizer(Dialog, Sizer),
|
||||||
ok = wxBoxSizer:layout(Sizer),
|
ok = wxBoxSizer:layout(Sizer),
|
||||||
ok = wxFrame:center(Dialog),
|
ok = wxDialog:setSize(Dialog, {500, 130}),
|
||||||
|
ok = wxDialog:center(Dialog),
|
||||||
ok = wxStyledTextCtrl:setFocus(NameTx),
|
ok = wxStyledTextCtrl:setFocus(NameTx),
|
||||||
ok =
|
ok =
|
||||||
case wxDialog:showModal(Dialog) of
|
case wxDialog:showModal(Dialog) of
|
||||||
@ -643,23 +649,25 @@ drop_key(Selected, State = #s{frame = Frame, j = J, accounts = Accounts, prefs =
|
|||||||
|
|
||||||
copy(State = #s{id = {_, #w{wx = ID_T}}}) ->
|
copy(State = #s{id = {_, #w{wx = ID_T}}}) ->
|
||||||
String = wxStaticText:getLabel(ID_T),
|
String = wxStaticText:getLabel(ID_T),
|
||||||
|
ok = copy_to_clipboard(String),
|
||||||
|
State.
|
||||||
|
|
||||||
|
copy_to_clipboard(String) ->
|
||||||
CB = wxClipboard:get(),
|
CB = wxClipboard:get(),
|
||||||
ok =
|
|
||||||
case wxClipboard:open(CB) of
|
case wxClipboard:open(CB) of
|
||||||
true ->
|
true ->
|
||||||
Text = wxTextDataObject:new([{text, String}]),
|
Text = wxTextDataObject:new([{text, String}]),
|
||||||
case wxClipboard:setData(CB, Text) of
|
case wxClipboard:setData(CB, Text) of
|
||||||
true ->
|
true ->
|
||||||
R = wxClipboard:flush(CB),
|
R = wxClipboard:flush(CB),
|
||||||
log(info, "Address copied to system clipboard. Flushed: ~p", [R]);
|
log(info, "String copied to system clipboard. Flushed: ~p", [R]);
|
||||||
false ->
|
false ->
|
||||||
log(info, "Failed to copy to clipboard")
|
log(info, "Failed to copy to clipboard")
|
||||||
end,
|
end,
|
||||||
ok = wxClipboard:close(CB);
|
ok = wxClipboard:close(CB);
|
||||||
false ->
|
false ->
|
||||||
log(info, "Failed to acquire the clipboard.")
|
log(info, "Failed to acquire the clipboard.")
|
||||||
end,
|
end.
|
||||||
State.
|
|
||||||
|
|
||||||
|
|
||||||
www(State = #s{id = {_, #w{wx = ID_T}}}) ->
|
www(State = #s{id = {_, #w{wx = ID_T}}}) ->
|
||||||
@ -812,12 +820,15 @@ grids_dialogue(State = #s{frame = Frame, j = J}) ->
|
|||||||
_ = wxStaticBoxSizer:add(URL_Sz, URL_Tx, zxw:flags(wide)),
|
_ = wxStaticBoxSizer:add(URL_Sz, URL_Tx, zxw:flags(wide)),
|
||||||
ButtSz = wxBoxSizer:new(?wxHORIZONTAL),
|
ButtSz = wxBoxSizer:new(?wxHORIZONTAL),
|
||||||
Affirm = wxButton:new(Dialog, ?wxID_OK),
|
Affirm = wxButton:new(Dialog, ?wxID_OK),
|
||||||
|
Cancel = wxButton:new(Dialog, ?wxID_CANCEL),
|
||||||
_ = wxBoxSizer:add(ButtSz, Affirm, zxw:flags(wide)),
|
_ = wxBoxSizer:add(ButtSz, Affirm, zxw:flags(wide)),
|
||||||
|
_ = wxBoxSizer:add(ButtSz, Cancel, zxw:flags(wide)),
|
||||||
_ = wxBoxSizer:add(Sizer, URL_Sz, zxw:flags(base)),
|
_ = wxBoxSizer:add(Sizer, URL_Sz, zxw:flags(base)),
|
||||||
_ = wxBoxSizer:add(Sizer, ButtSz, zxw:flags(base)),
|
_ = wxBoxSizer:add(Sizer, ButtSz, zxw:flags(wide)),
|
||||||
ok = wxDialog:setSizer(Dialog, Sizer),
|
ok = wxDialog:setSizer(Dialog, Sizer),
|
||||||
ok = wxBoxSizer:layout(Sizer),
|
ok = wxBoxSizer:layout(Sizer),
|
||||||
ok = wxFrame:center(Dialog),
|
ok = wxDialog:setSize(Dialog, {500, 130}),
|
||||||
|
ok = wxDialog:center(Dialog),
|
||||||
ok = wxStyledTextCtrl:setFocus(URL_Tx),
|
ok = wxStyledTextCtrl:setFocus(URL_Tx),
|
||||||
ok =
|
ok =
|
||||||
case wxDialog:showModal(Dialog) of
|
case wxDialog:showModal(Dialog) of
|
||||||
@ -852,9 +863,10 @@ do_selection(_, State) ->
|
|||||||
do_selection(0, State).
|
do_selection(0, State).
|
||||||
|
|
||||||
|
|
||||||
do_show(Accounts, State = #s{prefs = Prefs, picker = Picker}) ->
|
do_show(Accounts, State = #s{sizer = Sizer, prefs = Prefs, picker = Picker}) ->
|
||||||
AKs = [Name || #poa{name = Name} <- Accounts],
|
AKs = [Name || #poa{name = Name} <- Accounts],
|
||||||
ok = wxListBox:set(Picker, AKs),
|
ok = wxListBox:set(Picker, AKs),
|
||||||
|
NewState =
|
||||||
case Accounts of
|
case Accounts of
|
||||||
[] ->
|
[] ->
|
||||||
State;
|
State;
|
||||||
@ -866,7 +878,9 @@ do_show(Accounts, State = #s{prefs = Prefs, picker = Picker}) ->
|
|||||||
Selected = maps:get(selected, Prefs, 0),
|
Selected = maps:get(selected, Prefs, 0),
|
||||||
ok = wxListBox:setSelection(Picker, Selected),
|
ok = wxListBox:setSelection(Picker, Selected),
|
||||||
do_selection(Selected, State#s{accounts = Accounts})
|
do_selection(Selected, State#s{accounts = Accounts})
|
||||||
end.
|
end,
|
||||||
|
ok = wxSizer:layout(Sizer),
|
||||||
|
NewState.
|
||||||
|
|
||||||
|
|
||||||
do_wallet(none, #s{buttons = Buttons}) ->
|
do_wallet(none, #s{buttons = Buttons}) ->
|
||||||
@ -1006,32 +1020,44 @@ do_grids_mess_sig2(Request = #{"grids" := 1,
|
|||||||
#s{frame = Frame, j = J}) ->
|
#s{frame = Frame, j = J}) ->
|
||||||
Dialog = wxDialog:new(Frame, ?wxID_ANY, J("Message Signature Request")),
|
Dialog = wxDialog:new(Frame, ?wxID_ANY, J("Message Signature Request")),
|
||||||
Sizer = wxBoxSizer:new(?wxVERTICAL),
|
Sizer = wxBoxSizer:new(?wxVERTICAL),
|
||||||
Instruction =
|
|
||||||
J("The server at the URL below is requesting you sign the following message."),
|
Title = J("Transaction Signature Request"),
|
||||||
InstTx = wxStaticText:new(Dialog, ?wxID_ANY, Instruction),
|
TitleTx = wxStaticText:new(Dialog, ?wxID_ANY, Title),
|
||||||
AcctSz = wxStaticBoxSizer:new(?wxVERTICAL, Dialog, [{label, J("Signature Account")}]),
|
Big = wxFont:new(20, ?wxMODERN, ?wxNORMAL, ?wxNORMAL, [{face, "Sans"}]),
|
||||||
AcctTx = wxStaticText:new(Dialog, ?wxID_ANY, ID),
|
true = wxStaticText:setFont(TitleTx, Big),
|
||||||
_ = wxStaticBoxSizer:add(AcctSz, AcctTx, zxw:flags(wide)),
|
|
||||||
URL_Label = J("Originating URL"),
|
LabeledSz = wxStaticBoxSizer:new(?wxVERTICAL, Dialog, [{label, J("Details")}]),
|
||||||
URL_Sz = wxStaticBoxSizer:new(?wxVERTICAL, Dialog, [{label, URL_Label}]),
|
DetailSz = wxFlexGridSizer:new(4, 2, 5, 5),
|
||||||
URL_Tx = wxStaticText:new(Dialog, ?wxID_ANY, URL),
|
Details =
|
||||||
_ = wxStaticBoxSizer:add(URL_Sz, URL_Tx, zxw:flags(wide)),
|
[J("Account"), ID,
|
||||||
MessSz = wxStaticBoxSizer:new(?wxVERTICAL, Dialog, [{label, J("CallData")}]),
|
J("Chain"), Chain,
|
||||||
MessStyle = ?wxTE_MULTILINE bor ?wxTE_READONLY,
|
J("Network ID"), NetID,
|
||||||
MessTx = wxTextCtrl:new(Dialog, ?wxID_ANY, [{value, CallData}, {style, MessStyle}]),
|
J("Originating URL"), URL],
|
||||||
_ = wxStaticBoxSizer:add(MessSz, MessTx, zxw:flags(wide)),
|
AddDetail =
|
||||||
|
fun(D) ->
|
||||||
|
T = wxStaticText:new(Dialog, ?wxID_ANY, D),
|
||||||
|
_ = wxFlexGridSizer:add(DetailSz, T)
|
||||||
|
end,
|
||||||
|
ok = lists:foreach(AddDetail, Details),
|
||||||
|
_ = wxStaticBoxSizer:add(LabeledSz, DetailSz, zxw:flags(wide)),
|
||||||
|
|
||||||
|
DataLabel = wxStaticText:new(Dialog, ?wxID_ANY, J("TX Data")),
|
||||||
|
DataStyle = ?wxTE_MULTILINE bor ?wxTE_READONLY,
|
||||||
|
DataTx = wxTextCtrl:new(Dialog, ?wxID_ANY, [{value, CallData}, {style, DataStyle}]),
|
||||||
|
|
||||||
ButtSz = wxBoxSizer:new(?wxHORIZONTAL),
|
ButtSz = wxBoxSizer:new(?wxHORIZONTAL),
|
||||||
Affirm = wxButton:new(Dialog, ?wxID_OK),
|
Affirm = wxButton:new(Dialog, ?wxID_OK),
|
||||||
Cancel = wxButton:new(Dialog, ?wxID_CANCEL),
|
Cancel = wxButton:new(Dialog, ?wxID_CANCEL),
|
||||||
_ = wxBoxSizer:add(ButtSz, Affirm, zxw:flags(wide)),
|
_ = wxBoxSizer:add(ButtSz, Affirm, zxw:flags(wide)),
|
||||||
_ = wxBoxSizer:add(ButtSz, Cancel, zxw:flags(wide)),
|
_ = wxBoxSizer:add(ButtSz, Cancel, zxw:flags(wide)),
|
||||||
_ = wxBoxSizer:add(Sizer, InstTx, zxw:flags(wide)),
|
|
||||||
_ = wxBoxSizer:add(Sizer, AcctSz, zxw:flags(wide)),
|
_ = wxBoxSizer:add(Sizer, TitleTx, zxw:flags(base)),
|
||||||
_ = wxBoxSizer:add(Sizer, URL_Sz, zxw:flags(wide)),
|
_ = wxBoxSizer:add(Sizer, LabeledSz, zxw:flags(base)),
|
||||||
_ = wxBoxSizer:add(Sizer, MessSz, zxw:flags(wide)),
|
_ = wxBoxSizer:add(Sizer, DataLabel, zxw:flags(base)),
|
||||||
|
_ = wxBoxSizer:add(Sizer, DataTx, zxw:flags(wide)),
|
||||||
_ = wxBoxSizer:add(Sizer, ButtSz, zxw:flags(base)),
|
_ = wxBoxSizer:add(Sizer, ButtSz, zxw:flags(base)),
|
||||||
ok = wxDialog:setSizer(Dialog, Sizer),
|
ok = wxDialog:setSizer(Dialog, Sizer),
|
||||||
ok = wxDialog:setSize(Dialog, {500, 500}),
|
ok = wxDialog:setSize(Dialog, {700, 400}),
|
||||||
ok = wxBoxSizer:layout(Sizer),
|
ok = wxBoxSizer:layout(Sizer),
|
||||||
ok = wxFrame:center(Dialog),
|
ok = wxFrame:center(Dialog),
|
||||||
ok =
|
ok =
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
%%% translation library is retained).
|
%%% translation library is retained).
|
||||||
|
|
||||||
-module(gmc_jt).
|
-module(gmc_jt).
|
||||||
|
-vsn("0.1.1").
|
||||||
-export([read_translations/1, j/2, oneshot_j/2]).
|
-export([read_translations/1, j/2, oneshot_j/2]).
|
||||||
|
|
||||||
|
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
%%% @end
|
%%% @end
|
||||||
|
|
||||||
-module(gmc_key_master).
|
-module(gmc_key_master).
|
||||||
|
-vsn("0.1.1").
|
||||||
|
|
||||||
|
|
||||||
-export([make_key/2, encode/1, decode/1]).
|
-export([make_key/2, encode/1, decode/1]).
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
%%% @end
|
%%% @end
|
||||||
|
|
||||||
-module(gmc_sup).
|
-module(gmc_sup).
|
||||||
-vsn("0.1.0").
|
-vsn("0.1.1").
|
||||||
-behaviour(supervisor).
|
-behaviour(supervisor).
|
||||||
-author("Craig Everett <craigeverett@qpq.swiss>").
|
-author("Craig Everett <craigeverett@qpq.swiss>").
|
||||||
-copyright("QPQ AG <info@qpq.swiss>").
|
-copyright("QPQ AG <info@qpq.swiss>").
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
-module(gmc_v).
|
-module(gmc_v).
|
||||||
-vsn("0.1.0").
|
-vsn("0.1.1").
|
||||||
-author("Craig Everett <craigeverett@qpq.swiss>").
|
-author("Craig Everett <craigeverett@qpq.swiss>").
|
||||||
-copyright("QPQ AG <info@qpq.swiss>").
|
-copyright("QPQ AG <info@qpq.swiss>").
|
||||||
-license("GPL-3.0-or-later").
|
-license("GPL-3.0-or-later").
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
-module(gmc_v_netman).
|
-module(gmc_v_netman).
|
||||||
-vsn("0.1.0").
|
-vsn("0.1.1").
|
||||||
-author("Craig Everett <zxq9@zxq9.com>").
|
-author("Craig Everett <zxq9@zxq9.com>").
|
||||||
-copyright("QPQ AG <info@qpq.swiss>").
|
-copyright("QPQ AG <info@qpq.swiss>").
|
||||||
-license("GPL-3.0-or-later").
|
-license("GPL-3.0-or-later").
|
||||||
|
|
||||||
-behavior(wx_object).
|
-behavior(wx_object).
|
||||||
-behavior(gmc_v).
|
%-behavior(gmc_v).
|
||||||
-include_lib("wx/include/wx.hrl").
|
-include_lib("wx/include/wx.hrl").
|
||||||
-export([to_front/1]).
|
-export([to_front/1]).
|
||||||
-export([set_manifest/1]).
|
-export([set_manifest/1]).
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
-module(gmc_v_wallman).
|
-module(gmc_v_wallman).
|
||||||
-vsn("0.1.0").
|
-vsn("0.1.1").
|
||||||
-author("Craig Everett <zxq9@zxq9.com>").
|
-author("Craig Everett <zxq9@zxq9.com>").
|
||||||
-copyright("QPQ AG <info@qpq.swiss>").
|
-copyright("QPQ AG <info@qpq.swiss>").
|
||||||
-license("GPL-3.0-or-later").
|
-license("GPL-3.0-or-later").
|
||||||
|
|
||||||
-behavior(wx_object).
|
-behavior(wx_object).
|
||||||
-behavior(gmc_v).
|
%-behavior(gmc_v).
|
||||||
-include_lib("wx/include/wx.hrl").
|
-include_lib("wx/include/wx.hrl").
|
||||||
-export([to_front/1]).
|
-export([to_front/1]).
|
||||||
-export([show/2]).
|
-export([show/2]).
|
||||||
|
10
zomp.meta
10
zomp.meta
@ -2,14 +2,14 @@
|
|||||||
{type,gui}.
|
{type,gui}.
|
||||||
{modules,[]}.
|
{modules,[]}.
|
||||||
{prefix,"gmc"}.
|
{prefix,"gmc"}.
|
||||||
{desc,"A desktop client for the Gajumaru network of blockchain networks"}.
|
|
||||||
{author,"Craig Everett"}.
|
{author,"Craig Everett"}.
|
||||||
{package_id,{"otpr","clutch",{0,1,0}}}.
|
{desc,"A desktop client for the Gajumaru network of blockchain networks"}.
|
||||||
{deps,[{"otpr","aeserialization",{0,1,2}},
|
{package_id,{"otpr","clutch",{0,1,1}}}.
|
||||||
|
{deps,[{"otpr","hakuzaru",{0,2,0}},
|
||||||
|
{"otpr","aesophia",{8,0,1}},
|
||||||
|
{"otpr","aeserialization",{0,1,2}},
|
||||||
{"otpr","zj",{1,1,0}},
|
{"otpr","zj",{1,1,0}},
|
||||||
{"otpr","aesophia",{7,1,2}},
|
|
||||||
{"otpr","aebytecode",{3,2,1}},
|
{"otpr","aebytecode",{3,2,1}},
|
||||||
{"otpr","hakuzaru",{0,1,0}},
|
|
||||||
{"otpr","erl_base58",{0,1,0}},
|
{"otpr","erl_base58",{0,1,0}},
|
||||||
{"otpr","eblake2",{1,0,0}},
|
{"otpr","eblake2",{1,0,0}},
|
||||||
{"otpr","ec_utils",{1,0,0}},
|
{"otpr","ec_utils",{1,0,0}},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user