Refactor config page to prepare for mastodon posting
This commit is contained in:
parent
b9ecde8ed4
commit
f101b8e259
|
@ -25,30 +25,14 @@ $p_user = $db->query("SELECT * FROM users WHERE username = '" . $_GET["q"] . "';
|
||||||
<body>
|
<body>
|
||||||
<div class="main-container">
|
<div class="main-container">
|
||||||
<h1 class="title">Config</h1>
|
<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>
|
|
||||||
|
|
||||||
<div class="section">
|
<div class="section">
|
||||||
<h2>Posting to Twitter</h2>
|
<h2>Posting to social networks</h2>
|
||||||
<p>
|
<p>Work in progress, but it works.</p>
|
||||||
For now this section is under construction, but
|
|
||||||
I have activated it to log vinculate accounts with
|
<?php // Login with twitter button
|
||||||
Twitter.
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<?php
|
|
||||||
if(!$db->querySingle("SELECT tw_oauth_verify FROM users where id = " . $_SESSION["uid"] . ";")){
|
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>";
|
echo "<p><a href='/action/tw-login.php'>Login with Twitter</a></p>";
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
|
@ -57,6 +41,30 @@ else{
|
||||||
echo "</p><a href='/action/tw-unlink.php'>Unlink account</a></p>";
|
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>
|
</div>
|
||||||
|
-->
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</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";
|
else $regErrorMsg = "Wrong invitation code";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fopen("testfile.txt", "w");
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<!DOCTYPE html>
|
<!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{
|
.section{
|
||||||
margin-bottom: 30px;
|
margin: 40px 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
input{
|
input{
|
||||||
margin-bottom: 10px;
|
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;
|
font-size: 20px;
|
||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
p{
|
||||||
|
margin: 20px 0px;
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue