enable patreon expiry benefits
This commit is contained in:
@@ -8,6 +8,8 @@ Chart.defaults.global.elements.point.radius = 0;
|
|||||||
Chart.defaults.global.tooltips.mode = "index";
|
Chart.defaults.global.tooltips.mode = "index";
|
||||||
Chart.defaults.global.tooltips.axis = "x";
|
Chart.defaults.global.tooltips.axis = "x";
|
||||||
Chart.defaults.global.tooltips.intersect = false;
|
Chart.defaults.global.tooltips.intersect = false;
|
||||||
|
Chart.defaults.global.animation.duration = 1000;
|
||||||
|
Chart.defaults.global.animation.easing = "linear";
|
||||||
|
|
||||||
var graph = new Chart(
|
var graph = new Chart(
|
||||||
document.getElementById('bandwidth_chart'),
|
document.getElementById('bandwidth_chart'),
|
||||||
@@ -19,15 +21,15 @@ var graph = new Chart(
|
|||||||
label: "Bandwidth",
|
label: "Bandwidth",
|
||||||
backgroundColor: "rgba(64, 255, 64, .01)",
|
backgroundColor: "rgba(64, 255, 64, .01)",
|
||||||
borderColor: "rgba(96, 255, 96, 1)",
|
borderColor: "rgba(96, 255, 96, 1)",
|
||||||
borderWidth: 2,
|
borderWidth: 1.5,
|
||||||
lineTension: 0.2,
|
lineTension: 0.2,
|
||||||
fill: true,
|
fill: true,
|
||||||
yAxisID: "y_bandwidth"
|
yAxisID: "y_bandwidth"
|
||||||
}, {
|
}, {
|
||||||
label: "Views",
|
label: "Views",
|
||||||
backgroundColor: "rgba(64, 64, 255, .01)",
|
backgroundColor: "rgba(64, 64, 255, .01)",
|
||||||
borderColor: "rgba(64, 64, 255, 1)",
|
borderColor: "rgba(96, 96, 255, 1)",
|
||||||
borderWidth: 2,
|
borderWidth: 1.5,
|
||||||
lineTension: 0.2,
|
lineTension: 0.2,
|
||||||
fill: true,
|
fill: true,
|
||||||
yAxisID: "y_views"
|
yAxisID: "y_views"
|
||||||
@@ -78,7 +80,7 @@ var graph = new Chart(
|
|||||||
xAxes: [
|
xAxes: [
|
||||||
{
|
{
|
||||||
ticks: {
|
ticks: {
|
||||||
maxRotation: 20
|
maxRotation: 16
|
||||||
},
|
},
|
||||||
gridLines: {
|
gridLines: {
|
||||||
display: false
|
display: false
|
||||||
@@ -94,7 +96,7 @@ let graphTimeout = null;
|
|||||||
function loadGraph(minutes, interval, live){
|
function loadGraph(minutes, interval, live){
|
||||||
if (graphTimeout !== null) { clearTimeout(graphTimeout) }
|
if (graphTimeout !== null) { clearTimeout(graphTimeout) }
|
||||||
if (live) {
|
if (live) {
|
||||||
graphTimeout = setTimeout(() => {loadGraph(60, 1, true)}, 3000)
|
graphTimeout = setTimeout(() => {loadGraph(minutes, interval, true)}, 1000)
|
||||||
}
|
}
|
||||||
|
|
||||||
let today = new Date()
|
let today = new Date()
|
||||||
|
@@ -94,18 +94,18 @@ DetailsWindow.prototype.renderGraph = function() {
|
|||||||
data: {
|
data: {
|
||||||
datasets: [
|
datasets: [
|
||||||
{
|
{
|
||||||
label: "Bandwidth",
|
label: "Downloads",
|
||||||
backgroundColor: "rgba(64, 255, 64, .01)",
|
backgroundColor: "rgba(64, 255, 64, .01)",
|
||||||
borderColor: "rgba(96, 255, 96, 1)",
|
borderColor: "rgba(96, 255, 96, 1)",
|
||||||
borderWidth: 2,
|
borderWidth: 1.5,
|
||||||
lineTension: 0.2,
|
lineTension: 0.2,
|
||||||
fill: true,
|
fill: true,
|
||||||
yAxisID: "y_bandwidth"
|
yAxisID: "y_bandwidth"
|
||||||
}, {
|
}, {
|
||||||
label: "Views",
|
label: "Views",
|
||||||
backgroundColor: "rgba(64, 64, 255, .01)",
|
backgroundColor: "rgba(64, 64, 255, .01)",
|
||||||
borderColor: "rgba(64, 64, 255, 1)",
|
borderColor: "rgba(96, 96, 255, 1)",
|
||||||
borderWidth: 2,
|
borderWidth: 1.5,
|
||||||
lineTension: 0.2,
|
lineTension: 0.2,
|
||||||
fill: true,
|
fill: true,
|
||||||
yAxisID: "y_views"
|
yAxisID: "y_views"
|
||||||
@@ -156,7 +156,7 @@ DetailsWindow.prototype.renderGraph = function() {
|
|||||||
xAxes: [
|
xAxes: [
|
||||||
{
|
{
|
||||||
ticks: {
|
ticks: {
|
||||||
maxRotation: 20
|
maxRotation: 16
|
||||||
},
|
},
|
||||||
gridLines: {
|
gridLines: {
|
||||||
display: false
|
display: false
|
||||||
|
@@ -33,21 +33,21 @@
|
|||||||
<ul>
|
<ul>
|
||||||
<li>No ads when viewing files</li>
|
<li>No ads when viewing files</li>
|
||||||
<li>No ads on uploaded files</li>
|
<li>No ads on uploaded files</li>
|
||||||
<li>2-month file expiry (Not implemented yet)</li>
|
<li>2-month file expiry</li>
|
||||||
</ul>
|
</ul>
|
||||||
{{else if eq .User.Subscription "patreon_3"}}
|
{{else if eq .User.Subscription "patreon_3"}}
|
||||||
Level 3 Patreon supporter. Benefits:
|
Level 3 Patreon supporter. Benefits:
|
||||||
<ul>
|
<ul>
|
||||||
<li>No ads when viewing files</li>
|
<li>No ads when viewing files</li>
|
||||||
<li>No ads on uploaded files</li>
|
<li>No ads on uploaded files</li>
|
||||||
<li>6-month file expiry (Not implemented yet)</li>
|
<li>6-month file expiry</li>
|
||||||
</ul>
|
</ul>
|
||||||
{{else if eq .User.Subscription "patreon_4"}}
|
{{else if eq .User.Subscription "patreon_4"}}
|
||||||
Level 4 Patreon supporter. Benefits:
|
Level 4 Patreon supporter. Benefits:
|
||||||
<ul>
|
<ul>
|
||||||
<li>No ads when viewing files</li>
|
<li>No ads when viewing files</li>
|
||||||
<li>No ads on uploaded files</li>
|
<li>No ads on uploaded files</li>
|
||||||
<li>No file expiry (Not implemented yet)</li>
|
<li>No file expiry</li>
|
||||||
</ul>
|
</ul>
|
||||||
{{end}}
|
{{end}}
|
||||||
{{end}}
|
{{end}}
|
||||||
|
@@ -20,7 +20,7 @@
|
|||||||
<button onclick="loadGraph(262800, 1440, false);">Half-year</button>
|
<button onclick="loadGraph(262800, 1440, false);">Half-year</button>
|
||||||
<button onclick="loadGraph(525600, 1440, false);">Year</button>
|
<button onclick="loadGraph(525600, 1440, false);">Year</button>
|
||||||
</div>
|
</div>
|
||||||
<div id="chart_container" class="chart-container" style="position: relative; width: 100%; height: 400px;">
|
<div id="chart_container" class="chart-container" style="position: relative; width: 100%; height: 300px;">
|
||||||
<canvas id="bandwidth_chart"></canvas>
|
<canvas id="bandwidth_chart"></canvas>
|
||||||
</div>
|
</div>
|
||||||
<hr/>
|
<hr/>
|
||||||
|
@@ -142,7 +142,7 @@
|
|||||||
|
|
||||||
<div class="info_about">
|
<div class="info_about">
|
||||||
<h3>Downloads and views</h3>
|
<h3>Downloads and views</h3>
|
||||||
<div class="chart-container" style="position: relative; width: 100%; height: 300px;">
|
<div class="chart-container" style="position: relative; width: 100%; height: 250px;">
|
||||||
<canvas id="bandwidth_chart"></canvas>
|
<canvas id="bandwidth_chart"></canvas>
|
||||||
</div>
|
</div>
|
||||||
<p style="text-align: center">
|
<p style="text-align: center">
|
||||||
|
@@ -156,7 +156,6 @@ func (wc *WebController) loginForm(td *TemplateData, r *http.Request) (f Form) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
formAPIError(err, &f)
|
formAPIError(err, &f)
|
||||||
} else {
|
} else {
|
||||||
log.Debug("key %s", loginResp.APIKey)
|
|
||||||
// Request was a success
|
// Request was a success
|
||||||
f.SubmitSuccess = true
|
f.SubmitSuccess = true
|
||||||
f.SubmitMessages = []template.HTML{"Success!"}
|
f.SubmitMessages = []template.HTML{"Success!"}
|
||||||
|
Reference in New Issue
Block a user