1
0
Fork 0
mirror of https://github.com/nishiki/manage-password.git synced 2024-11-23 13:57:52 +00:00

ui: no show wallet setup form if sync is nil

This commit is contained in:
nishiki 2016-07-05 22:59:52 +02:00
parent 9565d40668
commit 6bbee4d2ce

View file

@ -104,11 +104,14 @@ class Cli
puts I18n.t('form.setup_wallet.title')
puts '--------------------'
config['sync']['type'] = ask(I18n.t('form.setup_wallet.sync_type')).to_s
config['sync']['host'] = ask(I18n.t('form.setup_wallet.sync_host')).to_s
config['sync']['port'] = ask(I18n.t('form.setup_wallet.sync_port')).to_s
config['sync']['user'] = ask(I18n.t('form.setup_wallet.sync_user')).to_s
config['sync']['password'] = ask(I18n.t('form.setup_wallet.sync_pwd')).to_s
config['sync']['path'] = ask(I18n.t('form.setup_wallet.sync_path')).to_s
if ['ftp', 'ssh'].include?(config['sync']['type'].downcase)
config['sync']['host'] = ask(I18n.t('form.setup_wallet.sync_host')).to_s
config['sync']['port'] = ask(I18n.t('form.setup_wallet.sync_port')).to_s
config['sync']['user'] = ask(I18n.t('form.setup_wallet.sync_user')).to_s
config['sync']['password'] = ask(I18n.t('form.setup_wallet.sync_pwd')).to_s
config['sync']['path'] = ask(I18n.t('form.setup_wallet.sync_path')).to_s
end
@mpw.set_config(config)
@mpw.write_data