2018-09-01 03:14:12 +02:00
|
|
|
<?php
|
2018-09-11 22:10:15 +02:00
|
|
|
$LBRY = LBRY();
|
|
|
|
$wallet_balance = $LBRY->daemon->wallet_balance();
|
2022-01-25 21:27:12 +01:00
|
|
|
$available_balance = $wallet_balance->result->available;
|
2018-09-13 01:39:13 +02:00
|
|
|
$channel_list = $LBRY->daemon->channel_list();
|
2018-10-12 08:22:20 +02:00
|
|
|
// TODO: Make this page look cleaner
|
2018-09-01 03:14:12 +02:00
|
|
|
?>
|
2018-08-21 01:39:57 +02:00
|
|
|
<div class="wrap">
|
|
|
|
<h1><?= esc_html(get_admin_page_title()); ?></h1>
|
2018-09-01 03:14:12 +02:00
|
|
|
<h2>Your wallet amount:</h2>
|
2022-01-25 21:27:12 +01:00
|
|
|
<img src="<?php echo esc_url( plugin_dir_url(LBRY_PLUGIN_FILE) . 'admin/images/lbc.png') ?>" class="icon icon-lbc wallet-icon-lbc" style="height: 1.8em; margin-right: .5em; margin-bottom: -.5em;"><code><?= number_format($available_balance, 2, '.', ','); ?></code>
|
2018-08-21 01:39:57 +02:00
|
|
|
<form action="options.php" method="post">
|
|
|
|
<?php
|
2018-09-13 01:39:13 +02:00
|
|
|
settings_fields(LBRY_SETTINGS_GROUP);
|
|
|
|
do_settings_sections(LBRY_ADMIN_PAGE);
|
2018-08-21 01:39:57 +02:00
|
|
|
submit_button('Save Settings');
|
|
|
|
?>
|
|
|
|
</form>
|
2018-09-13 01:39:13 +02:00
|
|
|
<h2>Your Publishable Channels</h2>
|
|
|
|
<?php if ($channel_list): ?>
|
2018-10-05 02:43:19 +02:00
|
|
|
<ul class="lbry-channel-list">
|
|
|
|
<?php foreach ($channel_list as $channel): ?>
|
|
|
|
<li><?= $channel->name ?></li>
|
|
|
|
<?php endforeach; ?>
|
|
|
|
</ul>
|
2018-09-13 01:39:13 +02:00
|
|
|
<?php else: ?>
|
|
|
|
<p>Looks like you haven't added any channels yet, feel free to do so below:</p>
|
|
|
|
<?php endif; ?>
|
|
|
|
<h2>Add a new channel to publish to:</h2>
|
2018-09-13 21:02:32 +02:00
|
|
|
<form action="<?php echo esc_url(admin_url('admin-post.php')); ?>" method="post">
|
|
|
|
<?php wp_nonce_field('lbry_add_channel', '_lbrynonce'); ?>
|
|
|
|
<input type="hidden" name="action" value="lbry_add_channel">
|
|
|
|
<table class="form-table">
|
|
|
|
<tbody>
|
|
|
|
<tr>
|
|
|
|
<th scope="row">New Channel Name</th>
|
|
|
|
<td>
|
2018-10-05 19:22:47 +02:00
|
|
|
<span>@</span>
|
|
|
|
<input type="text" name="new_channel" value="" placeholder="your-new-channel" required>
|
2018-09-13 21:02:32 +02:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<th scope="row">Amount of LBC to Bid</th>
|
|
|
|
<td>
|
|
|
|
<input type="number" step="0.1" min="0.1" name="bid_amount" value="10" required>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
2018-09-13 01:39:13 +02:00
|
|
|
<?php submit_button('Add New Channel'); ?>
|
|
|
|
</form>
|
2018-08-21 01:39:57 +02:00
|
|
|
</div>
|