Skip to content

Commit

Permalink
index.php: remove > in css, clarify solder setup
Browse files Browse the repository at this point in the history
  • Loading branch information
cowpod committed Nov 15, 2024
1 parent 81c1400 commit e262c7e
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ function uri($uri) {
overflow: auto;
color:#4F5F6D;
}
.tab-content>.active {
.tab-content.active {
display: block;
min-height: 165px;
overflow: auto;
Expand Down Expand Up @@ -2366,24 +2366,23 @@ class="btn btn-primary">Edit</button>
</div>
<div class="card">
<h2>Technic Solder integration</h2>
<?php if (!empty($config['api_key'])) { ?>
<?php if (!empty($config['api_key'])) { ?>
<font class="text-danger">A server-wide API key has been set.</font>
As such, you cannot set your own API key. Contact your server administrator if you think this is a mistake.
<?php if ($_SESSION['privileged']) { ?>
<span>You, an administrator, can update the server-wide API key in <a href="admin#solder">Server Settings</a></span>
<?php } else { ?>
<p>To integrate with the Technic API, you will need your API key at <a href="https://technicpack.net/" target="_blank">technicpack.net</a>.</p>
<p>Sign in (or register), Click on "Edit [My] Profile" in the top right account menu, Click "Solder Configuration", and copy the API key and paste it in the text box below.</p>
As such, you cannot set your own API key. Contact your server administrator if you think this is a mistake.
<?php }
} else { ?>
<p>To integrate with the Technic API, you will need your API key from <a href="https://technicpack.net/" target="_blank">technicpack.net</a>; Sign in (or register), "Edit [My] Profile" in the top right account menu, "Solder Configuration", and copy the API key and paste it in the text box below.</p>
<form>
<input id="api_key" class="form-control" type="text" autocomplete="off" placeholder="Technic Solder API Key" <?php if (get_setting('api_key')) echo 'value="'.get_setting('api_key').'"' ?> <?php if (!empty($config['api_key'])) echo "disabled" ?>/>
<br/>
<input class="btn btn-success" type="button" id="save_api_key" value="Save" disabled />
</form>
<br/>
<p>Then, copy <?php echo $SERVER_PROTOCOL.$config['host'].$config['dir'].'api' ?> into "Solder URL" text box, and click "Link Solder".</p>
<?php } ?>
<?php if ($_SESSION['privileged']) { ?>
<hr/>
<b>You, an administrator, can update the server-wide API key in <a href="admin#solder">Server Settings</a></b>
<?php } ?>
<?php } ?>
</div>
</div>
<script>
Expand Down Expand Up @@ -2494,8 +2493,7 @@ class="btn btn-primary">Edit</button>
<div class="card">
<a name="solder"/>
<h2>Server-wide Technic Solder integration</h2>
<p>To integrate with the Technic API, you will need your API key at <a href="https://technicpack.net/" target="_blank">technicpack.net</a>.</p>
<p>Sign in (or register), Click on "Edit [My] Profile" in the top right account menu, Click "Solder Configuration", and copy the API key and paste it in the text box below.</p>
<p>To integrate with the Technic API, you will need your API key from <a href="https://technicpack.net/" target="_blank">technicpack.net</a>; Sign in (or register), "Edit [My] Profile" in the top right account menu, "Solder Configuration", and copy the API key and paste it in the text box below.</p>
<form>
<input id="api_key" class="form-control" type="text" autocomplete="off" placeholder="Technic Solder API Key" <?php if (!empty($config['api_key'])) echo 'value="'.$config['api_key'].'"' ?>/>
<br/>
Expand Down

0 comments on commit e262c7e

Please sign in to comment.