mirror of
https://github.com/nishiki/manage-password.git
synced 2024-11-26 23:33:03 +00:00
ui: no show wallet setup form if sync is nil
This commit is contained in:
parent
9565d40668
commit
6bbee4d2ce
1 changed files with 8 additions and 5 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue