Compare commits

..

No commits in common. "b7f9b2d830066a0902e1c7f7719396a62a50e6da" and "62a4476fc37393d6c59caa38380260de7f5bebb2" have entirely different histories.

26 changed files with 121 additions and 154 deletions

3
.gitignore vendored
View file

@ -5,6 +5,3 @@ zenith.db
zenith.log
zenith.db-shm
zenith.db-wal
installer/*.tar.gz
installer/*.tar.gz.prev
docker_files/zenith-docker_*

View file

@ -28,7 +28,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed
- Upgraded to GHC 9.6.5
- Implemented config and data folder
### Fixed

View file

@ -28,9 +28,9 @@ RUN echo "1234\n1234\n" | passwd zenusr
RUN mkdir /home/zenusr/Zenith
RUN chown zenusr:zenusr -R /home/zenusr/Zenith
#RUN mkdir /home/zenusr/Zenith/assets
#COPY assets/* /home/zenusr/Zenith/assets/
#RUN chown zenusr:zenusr -R /home/zenusr/Zenith/assets
RUN mkdir /home/zenusr/assets
COPY assets/* /home/zenusr/assets/
RUN chown zenusr:zenusr -R /home/zenusr/assets
COPY scripts/bash_rc_adm /root/.bashrc
COPY scripts/bash_rc_usr /home/zenusr/.bashrc

View file

@ -1,4 +1,4 @@
#!/bin/bash
#/bin/bash
ZVERSION="0.6.0.0"
echo
echo "Zenith Full Node Docker Image Setup"
@ -27,10 +27,8 @@ if systemctl is-active --quiet docker; then
docker load < zenith-docker_$ZVERSION.tar
echo "... docker image zenith-docker:"$ZVERSION" loaded."
echo "... creating Zenith folder"
mkdir -p $HOME/Zenith/assets
echo "... creating default configuration"
mkdir $HOME/Zenith
cp cfg/zenith.cfg $HOME/Zenith/
cp -r /assets/ $HOME/Zenith/assets
if ! [ -d $HOME/.local/bin ]; then
echo "... creating $HOME/.local/bin folder"
mkdir -p $HOME/.local/bin
@ -43,7 +41,7 @@ if systemctl is-active --quiet docker; then
echo "... copying runzenith to $HOME/.local/bin "
cp cfg/runzenith $HOME/.local/bin/
if echo $PATH | grep -q $HOME/.local/bin ; then
echo PATH=$PATH:$HOME/.local/bin | tee -a $HOME/.bashrc
echo PATH=$PATH:$HOME/.local/bin' | tee -a $HOME/.bashrc
echo "Reloading configuration ...."
source $HOME/.bashrc
fi

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -15,11 +15,12 @@ else
mkdir -p $HOME/Zenith
echo "Copying default configuration ...."
cp ./cfg/zenith.cfg $HOME/Zenith/
echo "Creating assets folder ...."
mkdir -p $HOME/Zenith/assets
echo "Transfering assets to new folder ...."
cp ./assets/* $HOME/Zenith/assets
chown -R $USER $HOME/Zenith
echo "Creating assets folder ...."
mkdir -p $HOME/assets
echo "Transfering assets to new folder ...."
cp ./assets/* $HOME/assets
chown -R $USER $HOME/assets
echo "Configuring library path ...."
if [ ! grep -q "LD_LIBRARY_PATH" "$HOME/.bashrc" ]; then
echo 'export LD_LIBRARY_PATH=/usr/local/lib' | tee -a $HOME/.bashrc

View file

@ -25,8 +25,6 @@ import Lens.Micro ((&), (+~), (.~), (?~), (^.), set)
import Lens.Micro.TH
import Monomer
import qualified Monomer.Lens as L
import System.Directory (getHomeDirectory)
import System.FilePath ((</>))
import System.Hclip
import Text.Printf
import Text.Wrap (FillScope(..), FillStrategy(..), WrapSettings(..), wrapText)
@ -143,7 +141,6 @@ data AppModel = AppModel
, _recipientValid :: !Bool
, _amountValid :: !Bool
, _showId :: !(Maybe T.Text)
, _home :: !FilePath
} deriving (Eq, Show)
makeLenses ''AppModel
@ -443,11 +440,7 @@ buildUI wenv model = widgetTree
(fromIntegral $ qrCodeWidth qr))
[fitWidth]
Nothing ->
image_
(T.pack $
(model ^. home) </>
"Zenith/assets/1F928_color.png")
[fitEither]) `styleBasic`
image_ "./assets/1F928_color.png" [fitEither]) `styleBasic`
[bgColor white, height 100, width 100]
, filler
] `styleBasic`
@ -511,9 +504,7 @@ buildUI wenv model = widgetTree
, spacer
, label (showt $ model ^. timer) `styleBasic` [padding 3, textSize 8]
, filler
, image_
(T.pack $ (model ^. home) </> "Zenith/assets/1F993.png")
[fitHeight] `styleBasic`
, image_ "./assets/1F993.png" [fitHeight] `styleBasic`
[height 24, width 24] `nodeVisible`
(model ^. zebraOn)
, label
@ -1251,10 +1242,6 @@ txtWrap = wrapText (WrapSettings False True NoFill FillAfterFirst) 32
runZenithGUI :: Config -> IO ()
runZenithGUI config = do
homeDir <- try getHomeDirectory :: IO (Either IOError FilePath)
case homeDir of
Left e -> print e
Right hD -> do
let host = c_zebraHost config
let port = c_zebraPort config
let dbFilePath = c_dbPath config
@ -1273,13 +1260,11 @@ runZenithGUI config = do
walList <- getWallets pool $ zgb_net chainInfo
accList <-
if not (null walList)
then runNoLoggingT $
getAccounts pool $ entityKey $ head walList
then runNoLoggingT $ getAccounts pool $ entityKey $ head walList
else return []
addrList <-
if not (null accList)
then runNoLoggingT $
getAddresses pool $ entityKey $ head accList
then runNoLoggingT $ getAddresses pool $ entityKey $ head accList
else return []
txList <-
if not (null addrList)
@ -1342,8 +1327,7 @@ runZenithGUI config = do
False
False
Nothing
hD
startApp model handleEvent buildUI (params hD)
startApp model handleEvent buildUI params
Left e -> do
initDb dbFilePath
let model =
@ -1388,26 +1372,16 @@ runZenithGUI config = do
False
False
Nothing
hD
startApp model handleEvent buildUI (params hD)
startApp model handleEvent buildUI params
where
params hd =
params =
[ appWindowTitle "Zenith - Zcash Full Node Wallet"
, appWindowState $ MainWindowNormal (1000, 700)
, appTheme zenithTheme
, appFontDef
"Regular"
(T.pack $
hd </>
"Zenith/assets/Atkinson-Hyperlegible-Regular-102.ttf" --"./assets/DejaVuSansMono.ttf"
)
, appFontDef
"Bold"
(T.pack $ hd </> "Zenith/assets/Atkinson-Hyperlegible-Bold-102.ttf")
, appFontDef
"Italic"
(T.pack $ hd </> "Zenith/assets/Atkinson-Hyperlegible-Italic-102.ttf")
, appFontDef "Remix" (T.pack $ hd </> "Zenith/assets/remixicon.ttf")
, appFontDef "Regular" "./assets/Atkinson-Hyperlegible-Regular-102.ttf" --"./assets/DejaVuSansMono.ttf"
, appFontDef "Bold" "./assets/Atkinson-Hyperlegible-Bold-102.ttf"
, appFontDef "Italic" "./assets/Atkinson-Hyperlegible-Italic-102.ttf"
, appFontDef "Remix" "./assets/remixicon.ttf"
, appDisableAutoScale True
, appScaleFactor 2.0
, appInitEvent AppInit

View file

@ -47,8 +47,6 @@ library
, brick
, bytestring
, data-default
, directory
, filepath
, esqueleto
, resource-pool
, binary