aboutsummaryrefslogtreecommitdiff
path: root/juick-www/src/main/resources
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2016-09-03 11:06:41 +0300
committerGravatar Vitaly Takmazov2016-09-03 18:12:15 +0300
commit26ed351bbc59767be8ce2500cbb5250de63df5c9 (patch)
tree72f83368f4c91fb7f1b79dda750c310b2346069e /juick-www/src/main/resources
parentd87a5f0ad2e912c6eff1145006c5db91de247e4b (diff)
Juick settings
Diffstat (limited to 'juick-www/src/main/resources')
-rw-r--r--juick-www/src/main/resources/views/partial/settings_tabs.html5
-rw-r--r--juick-www/src/main/resources/views/settings_about.html20
-rw-r--r--juick-www/src/main/resources/views/settings_auth-email.html9
-rw-r--r--juick-www/src/main/resources/views/settings_main.html156
-rw-r--r--juick-www/src/main/resources/views/settings_password.html17
-rw-r--r--juick-www/src/main/resources/views/settings_privacy.html9
-rw-r--r--juick-www/src/main/resources/views/settings_result.html9
7 files changed, 225 insertions, 0 deletions
diff --git a/juick-www/src/main/resources/views/partial/settings_tabs.html b/juick-www/src/main/resources/views/partial/settings_tabs.html
new file mode 100644
index 00000000..d7901d5e
--- /dev/null
+++ b/juick-www/src/main/resources/views/partial/settings_tabs.html
@@ -0,0 +1,5 @@
+<div id="pagetabs"><ul>
+ <li><a href="/settings">Main</a></li>
+ <li><a href="/settings?page=password">Password</a></li>
+ <li><a href="/settings?page=about">About</a></li>
+</ul></div> \ No newline at end of file
diff --git a/juick-www/src/main/resources/views/settings_about.html b/juick-www/src/main/resources/views/settings_about.html
new file mode 100644
index 00000000..0252af35
--- /dev/null
+++ b/juick-www/src/main/resources/views/settings_about.html
@@ -0,0 +1,20 @@
+{% extends "layouts/content.html" %}
+{% block content %}
+<article>
+ <form action="/settings" method="POST" enctype="multipart/form-data">
+ <p>Full name: <input type="text" name="fullname" value="{{ userinfo.getFullName() }}"/></p>
+ <p>Country: <input type="text" name="country" value="{{ userinfo.getCountry() }}"/></p>
+ <p>URL: <input type="text" name="url" value="{{ userinfo.getUrl() }}" size="32"/><br/>
+ <small>Please, start with &quot;http://&quot;</small></p>
+ <p>About:<br/>
+ <input type="text" name="descr" value="{{ userinfo.getDescription() }}" style="width: 100%"/><br/>
+ <small>Max. 255 symbols</small></p>
+ <p>Avatar: <input type="file" name="avatar"/><br/>
+ <small>Recommendations: PNG, 96x96, &lt;50Kb. Also, JPG and GIF supported.</small></p>
+ <p><input type="hidden" name="page" value="about"/><input type="submit" value=" OK "/></p>
+ </form>
+</article>
+{% endblock %}
+{% block "column" %}
+{% include "views/partial/settings_tabs.html" %}
+{% endblock %} \ No newline at end of file
diff --git a/juick-www/src/main/resources/views/settings_auth-email.html b/juick-www/src/main/resources/views/settings_auth-email.html
new file mode 100644
index 00000000..79691083
--- /dev/null
+++ b/juick-www/src/main/resources/views/settings_auth-email.html
@@ -0,0 +1,9 @@
+{% extends "layouts/content.html" %}
+{% block content %}
+<article>
+ <p>{{ result }}</p><p><a href="/settings">Settings</a>.</p>
+</article>
+{% endblock %}
+{% block "column" %}
+{% include "views/partial/settings_tabs.html" %}
+{% endblock %} \ No newline at end of file
diff --git a/juick-www/src/main/resources/views/settings_main.html b/juick-www/src/main/resources/views/settings_main.html
new file mode 100644
index 00000000..f4630be2
--- /dev/null
+++ b/juick-www/src/main/resources/views/settings_main.html
@@ -0,0 +1,156 @@
+{% extends "layouts/content.html" %}
+{% block content %}
+<article>
+ <h1>Настройки</h1>
+ <form action="/settings" method="POST" enctype="multipart/form-data">
+ <fieldset>
+ <legend>Notification options</legend>
+ <p><input type="checkbox" name="jnotify" value="1" {% if notify_options.isRepliesEnabled() %}
+ checked="checked" {% endif %}/> Reply notifications (&quot;Message posted&quot;)</p>
+ <p><input type="checkbox" name="subscr_notify" value="1" {% if notify_options.isSubscriptionsEnabled() %}
+ checked="checked" {% endif %}/> Subscriptions notifications (&quot;@user subscribed...&quot;)</p>
+ <p><input type="checkbox" name="recomm" value="1" {% if notify_options.isRecommendationsEnabled() %}
+ checked="checked" {% endif %}/> Posts recommendations (&quot;Recommended by @user&quot;)</p>
+ <p><input type="hidden" name="page" value="main"/><input type="submit" value=" OK "/></p>
+ </fieldset>
+ </form>
+ <fieldset>
+ <legend style="background: url(//telegram.org/favicon.ico?3) no-repeat; padding-left: 58px; line-height: 48px;">
+ Telegram</legend>
+ {% if telegram_name is not empty %}
+ <form action="/settings" method="post">
+ <div>Telegram: <b>{{ telegram_name }}</b> &mdash;
+ <input type="hidden" name="page" value="telegram-del"/>
+ <input type="submit" value=" Disable "/>
+ </div>
+ </form>
+ {% else %}
+ <p>To connect Telegram account: send any text message to <a href="https://telegram.me/Juick_bot">@Juick_bot</a>
+ </p>
+ {% endif %}
+ </fieldset>
+ <form action="/settings" method="POST" enctype="multipart/form-data">
+ <fieldset>
+ <legend style="background: url(//static.juick.com/settings/xmpp.png) no-repeat; padding-left: 58px; line-height: 48px;">
+ XMPP accounts
+ </legend>
+ <p>Your accounts:</p>
+ <p>
+ {% for jid in jids %}
+ <label><input type="radio" name="delete" value="xmpp;{{ jid }}">{{ jid }}</label><br/>
+ {% endfor %}
+ {% for auth in auths %}
+ <label><input type="radio" name="delete"
+ value="xmpp-unauth;{{ auth.getAccount() }}">{{ auth.getAccount() }}</label>
+ &mdash; <a href="#"
+ onclick="alert(\'To confirm, please send &quot;AUTH {{ auth.getAuthCode() }}&quot; (without quotes) from this account to &quot;juick@juick.com&quot;.\'); return false;">Confirm</a><br/>
+ {% endfor %}
+ </p>
+ {% if jids is not empty %}
+ <p><input type="hidden" name="page" value="jid-del"/><input type="submit" value=" Delete "/></p>
+ {% endif %}
+ <p>To add new jabber account: send any text message to <a href="xmpp:juick@juick.com?message;body=login">juick@juick.com</a>
+ </p>
+ </fieldset>
+ </form>
+ <fieldset>
+ <legend style="background: url(//static.juick.com/settings/email.png) no-repeat; padding-left: 58px; line-height: 48px;">
+ E-mail
+ </legend>
+ <form action="/settings" method="POST" enctype="multipart/form-data">
+ <p>Add account:<br/>
+ <input type="text" name="account"/>
+ <input type="hidden" name="page" value="email-add"/>
+ <input type="submit" value=" Add "/>
+ </p>
+ </form>
+ <form action="/settings" method="POST" enctype="multipart/form-data">
+ <p>Your accounts:</p>
+ <p>
+ {% for email in emails %}
+ <label><input type="radio" name="account" value="{{ email }}">{{ email }}</label><br/>
+ {% endfor %}
+ {% if emails is empty %}
+ - </p>
+ {% else %}
+ </p>
+ <p><input type="hidden" name="page" value="email-del"/><input type="submit" value=" Delete "/></p>
+ {% endif %}
+ </form>
+ {% if emails is not empty %}
+ <form action="/settings" method="POST" enctype="multipart/form-data">
+ <p>You can receive all your subscriptions by email:<br/>
+ Sent to <select name="account">
+ <option value="">Disabled</option>
+ {% for email in emails %}
+ <option value="{{ email }}" {% if eopts.getEmail()== email %} selected="selected" {% endif %}>
+ {{ email }}
+ </option>
+ {% endfor %}
+ </select> every day at <select name="time">
+ {% for hour in hours %}
+ <option value="{{ hour }}" {% if eopts.getSubscriptionHour() == hour %} selected="selected" {%
+ endif %}>
+ {{ hour }}:00 GMT
+ </option>
+ {% endfor %}
+ </select>
+ <input type="hidden" name="page" value="email-subscr"/>
+ <input type="submit" value="OK"/></p>
+ </form>
+ {% endif %}
+ <p>&nbsp;</p>
+ <p>You can post to Juick via e-mail. Send your <span style="text-decoration: underline">plain text</span>
+ messages to special secret e-mail. You can attach one photo or video file.</p>
+ <p>Secret email: {% if ehash is not empty %} <strong>{{ ehash }}</strong> {% else %}-{% endif %}</p>
+ <form action="/settings" method="post">
+ <p><input type="hidden" name="page" value="email"/><input type="submit" value=" Generate new "/></p>
+ </form>
+ </fieldset>
+ <fieldset>
+ <legend style="background: url(//static.juick.com/settings/facebook.png) no-repeat; padding-left: 58px; line-height: 48px;">
+ Facebook
+ </legend>
+ {% if fbstatus.isConnected() %}
+ {% if fbstatus.isCrosspostEnabled() %}
+ <form action="/settings" method="post">
+ <div>
+ Facebook: <b>Enabled</b> &mdash;
+ <input type="hidden" name="page" value="facebook-disable"/>
+ <input type="submit" value=" Disable "/>
+ </div>
+ </form>
+ {% else %}
+ <form action="/settings" method="post">
+ <div>
+ Facebook: <b>Disabled</b> &mdash;
+ <input type="hidden" name="page" value="facebook-enable"/>
+ <input type="submit" value=" Enable "/>
+ </div>
+ </form>
+ {% endif %}
+ {% else %}
+ <p>Cross-posting to Facebook: <a href="/_fblogin"><img src="//static.juick.com/facebook-connect.png" alt="Connect to Facebook"/></a></p>
+ {% endif %}
+ </fieldset>
+ <fieldset>
+ <legend style="background: url(//static.juick.com/settings/twitter.png) no-repeat; padding-left: 58px; line-height: 48px;">
+ Twitter</legend>
+ {% if twitter_name is not empty %}
+ <form action="/settings" method="post">
+ <div>Twitter: <b>{{ twitter_name }}</b> &mdash;
+ <input type="hidden" name="page" value="twitter-del"/>
+ <input type="submit" value=" Disable "/>
+ </div>
+ </form>
+ {% else %}
+ <p>Cross-posting to Twitter: <a href="/_twitter"><img src="//static.juick.com/twitter-connect.png"
+ alt="Connect to Twitter"/></a></p>
+ {% endif %}
+ </fieldset>
+
+</article>
+{% endblock %}
+{% block "column" %}
+{% include "views/partial/settings_tabs.html" %}
+{% endblock %} \ No newline at end of file
diff --git a/juick-www/src/main/resources/views/settings_password.html b/juick-www/src/main/resources/views/settings_password.html
new file mode 100644
index 00000000..e9c2dce0
--- /dev/null
+++ b/juick-www/src/main/resources/views/settings_password.html
@@ -0,0 +1,17 @@
+{% extends "layouts/content.html" %}
+{% block content %}
+<article>
+ <fieldset>
+ <legend>Changing your password</legend>
+ <form action="/settings" method="post">
+ <input type="hidden" name="page" value="password"/>
+ <p>Change password: <input type="password" name="password" size="8"/> <input type="submit"
+ value=" Update "/><br/>
+ <i>(max. length - 16 symbols)</i></p>
+ </form>
+ </fieldset>
+</article>
+{% endblock %}
+{% block "column" %}
+{% include "views/partial/settings_tabs.html" %}
+{% endblock %} \ No newline at end of file
diff --git a/juick-www/src/main/resources/views/settings_privacy.html b/juick-www/src/main/resources/views/settings_privacy.html
new file mode 100644
index 00000000..48756d8e
--- /dev/null
+++ b/juick-www/src/main/resources/views/settings_privacy.html
@@ -0,0 +1,9 @@
+{% extends "layouts/content.html" %}
+{% block content %}
+<article>
+ <p>Privacy</p>
+</article>
+{% endblock %}
+{% block "column" %}
+{% include "views/partial/settings_tabs.html" %}
+{% endblock %} \ No newline at end of file
diff --git a/juick-www/src/main/resources/views/settings_result.html b/juick-www/src/main/resources/views/settings_result.html
new file mode 100644
index 00000000..3f5482d4
--- /dev/null
+++ b/juick-www/src/main/resources/views/settings_result.html
@@ -0,0 +1,9 @@
+{% extends "layouts/content.html" %}
+{% block content %}
+<article>
+ <p>{{ result | raw }}</p>
+</article>
+{% endblock %}
+{% block "column" %}
+{% include "views/partial/settings_tabs.html" %}
+{% endblock %} \ No newline at end of file