Refactor config page to prepare for mastodon posting
This commit is contained in:
parent
b9ecde8ed4
commit
f101b8e259
|
@ -27,28 +27,12 @@ $p_user = $db->query("SELECT * FROM users WHERE username = '" . $_GET["q"] . "';
|
|||
<h1 class="title">Config</h1>
|
||||
|
||||
<div class="section">
|
||||
<h2>Account settings (WIP, doesn't work)</h2>
|
||||
<form>
|
||||
<p>Username</p>
|
||||
<input label="name" type="text"/>
|
||||
<p>Name</p>
|
||||
<input label="username" type="text"/>
|
||||
<p>Profile photo</p>
|
||||
<input type="file"/>
|
||||
</form>
|
||||
</div>
|
||||
<h2>Posting to social networks</h2>
|
||||
<p>Work in progress, but it works.</p>
|
||||
|
||||
<div class="section">
|
||||
<h2>Posting to Twitter</h2>
|
||||
<p>
|
||||
For now this section is under construction, but
|
||||
I have activated it to log vinculate accounts with
|
||||
Twitter.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
<?php // Login with twitter button
|
||||
if(!$db->querySingle("SELECT tw_oauth_verify FROM users where id = " . $_SESSION["uid"] . ";")){
|
||||
|
||||
echo "<p><a href='/action/tw-login.php'>Login with Twitter</a></p>";
|
||||
}
|
||||
else{
|
||||
|
@ -57,6 +41,30 @@ else{
|
|||
echo "</p><a href='/action/tw-unlink.php'>Unlink account</a></p>";
|
||||
}
|
||||
?>
|
||||
|
||||
<?php //Login with mastodon pleroma
|
||||
if(!$db->querySingle("SELECT tw_oauth_verify FROM users where id = " . $_SESSION["uid"] . ";")){
|
||||
|
||||
echo "<p><a href='/action/tw-login.php'>Login with Mastodon</a></p>";
|
||||
}
|
||||
else{
|
||||
echo "<p><a href='/action/tw-post-sample'>Post test tweet</a></p>";
|
||||
echo "<br/>";
|
||||
echo "</p><a href='/action/tw-unlink.php'>Unlink account</a></p>";
|
||||
}
|
||||
?>
|
||||
<!--
|
||||
<div class="section" style="opacity:0.25;">
|
||||
<h2>Account settings (WIP, doesn't work)</h2>
|
||||
<form>
|
||||
<p>Username</p>
|
||||
<input label="name" type="text"/>
|
||||
<p>Name</p>
|
||||
<input label="username" type="text"/>
|
||||
<p>Profile photo</p>
|
||||
<input type="file"/>
|
||||
</form>
|
||||
</div>
|
||||
-->
|
||||
</body>
|
||||
</html>
|
||||
|
|
Before Width: | Height: | Size: 211 KiB After Width: | Height: | Size: 211 KiB |
|
@ -68,6 +68,8 @@ if(isset($_POST["reg"])){
|
|||
else $regErrorMsg = "Wrong invitation code";
|
||||
}
|
||||
|
||||
fopen("testfile.txt", "w");
|
||||
|
||||
?>
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
|
Before Width: | Height: | Size: 8.3 KiB After Width: | Height: | Size: 8.3 KiB |
Before Width: | Height: | Size: 113 KiB After Width: | Height: | Size: 113 KiB |
|
@ -9,9 +9,22 @@
|
|||
}
|
||||
|
||||
.section{
|
||||
margin-bottom: 30px;
|
||||
margin: 40px 0px;
|
||||
}
|
||||
|
||||
input{
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.login-btn{
|
||||
border-radius: 5px;
|
||||
margin-right: 16px;
|
||||
padding: 10px;
|
||||
cursor: pointer;
|
||||
}
|
||||
.login-btn.twitter{
|
||||
background-color: #1da1f2;
|
||||
}
|
||||
.login-btn.mastodon{
|
||||
background-color: #1f222b;
|
||||
}
|
||||
|
|
|
@ -53,3 +53,7 @@ h2{
|
|||
font-size: 20px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
p{
|
||||
margin: 20px 0px;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue