diff --git a/res/include/md/subscribe.md b/res/include/md/subscribe.md index 4989538..6bb7c17 100644 --- a/res/include/md/subscribe.md +++ b/res/include/md/subscribe.md @@ -6,6 +6,36 @@ ✅ You are logged in to your pixeldrain account. Continue to the next step. +## Join a support tier in Patreon + +
+ {{$plan := .URLQuery.Get "plan"}} + {{if eq $plan "t5"}} + + Order plan 'Resolve' + + {{else if eq $plan "t2"}} + + Order plan 'Persistence' + + {{else if eq $plan "t3"}} + + Order plan 'Tenacity' + + {{else if eq $plan "t4"}} + + Order plan 'Eternity' + + {{else}} + + Order Pixeldrain Pro Plan + + {{end}} +
+ +After ordering you will receive an e-mail on your Patreon e-mail address with a +link to activate your subscription. + {{else}} ❌ You are not logged into a pixeldrain account. If you do not have an account @@ -13,56 +43,3 @@ yet you need to register one. You can do so with our [registration form](/register). If you already have an account you can [log in here](/login). {{end}} - -## Verify your e-mail address - -{{if eq .User.Email ""}} - -❌ Your e-mail address is not yet verified. You can change your e-mail address on -the [user settings page](/user/settings). After submitting your e-mail address -you will receive a verification link in your inbox. Click the verification link -to verify your e-mail address. - -{{else}} - -✅ Your e-mail address is verified. Continue to the next step. - -{{end}} - -## Join a support tier in Patreon - -Make sure your Patreon account uses the same e-mail address as your pixeldrain -account. {{if .Authenticated}}(Your e-mail address: {{.User.Email}}){{end}} - -{{$plan := .URLQuery.Get "plan"}} -{{if eq $plan "t1"}} - -Order plan 'I'm doing my part!' - -{{else if eq $plan "t5"}} - -Order plan 'Resolve' - -{{else if eq $plan "t2"}} - -Order plan 'Persistence' - -{{else if eq $plan "t3"}} - -Order plan 'Tenacity' - -{{else if eq $plan "t4"}} - -Order plan 'Eternity' - -{{else}} -
- -See our subscription plans on Patreon - -
-{{end}} - -After ordering you will receive an e-mail with a link to activate your -subscription. The subscription will be linked to the pixeldrain account you're -currently logged into. diff --git a/res/include/script/dependencies/UploadManager.js b/res/include/script/dependencies/UploadManager.js index 92ca40b..4c2d8be 100644 --- a/res/include/script/dependencies/UploadManager.js +++ b/res/include/script/dependencies/UploadManager.js @@ -34,14 +34,14 @@ function UploadManager(uploadEndpoint, uploadsFinished) { this.jobCounter = 0; } -UploadManager.prototype.finishedUploads = function() { +UploadManager.prototype.finishedUploads = function () { this.uploadLog.sort((a, b) => { return a.jobID - b.jobID; }) return this.uploadLog; } -UploadManager.prototype.addFile = function( +UploadManager.prototype.addFile = function ( file, // Blob name, // string onProgress, // func (progress: number) @@ -67,7 +67,7 @@ UploadManager.prototype.addFile = function( } } -UploadManager.prototype.startUpload = function() { +UploadManager.prototype.startUpload = function () { if (this.uploadQueue.length === 0) { return; // Nothing to upload } @@ -78,13 +78,13 @@ UploadManager.prototype.startUpload = function() { } } -UploadManager.prototype.finishUpload = function() { +UploadManager.prototype.finishUpload = function () { this.activeWorkers--; if ( this.uploadQueue.length === 0 && this.activeWorkers === 0 && - typeof(this.uploadsFinished) === "function" + typeof (this.uploadsFinished) === "function" ) { this.uploadsFinished(); return; @@ -94,7 +94,7 @@ UploadManager.prototype.finishUpload = function() { this.startUpload(); } -UploadManager.prototype.uploadThread = function() { +UploadManager.prototype.uploadThread = function () { let job = this.uploadQueue.shift(); // Get the first element of the array console.debug("Starting upload of " + job.name); @@ -107,7 +107,7 @@ UploadManager.prototype.uploadThread = function() { // Report progress updates back to the caller xhr.upload.addEventListener("progress", evt => { - if (evt.lengthComputable && typeof(job.onProgress) === "function") { + if (evt.lengthComputable && typeof (job.onProgress) === "function") { job.onProgress(evt.loaded / evt.total); } }); @@ -128,7 +128,7 @@ UploadManager.prototype.uploadThread = function() { fileName: job.name }); - if (typeof(job.onFinished) === "function") { + if (typeof (job.onFinished) === "function") { job.onFinished(resp.id); } @@ -138,7 +138,7 @@ UploadManager.prototype.uploadThread = function() { // Request failed console.log("Upload error. status: " + xhr.status + " response: " + xhr.response); let resp = JSON.parse(xhr.response); - if (job.tries === 3) { // Upload failed + if (resp.value == "file_too_large" || job.tries === 3) { // Upload failed job.onFailure(resp.value, resp.message); } else { // Try again job.tries++; @@ -150,7 +150,7 @@ UploadManager.prototype.uploadThread = function() { } else { // Request did not arrive if (job.tries === 3) { // Upload failed - if (typeof(job.onFailure) === "function") { + if (typeof (job.onFailure) === "function") { job.onFailure(xhr.responseText, xhr.responseText); } } else { // Try again diff --git a/res/include/style/layout.css b/res/include/style/layout.css index 8993502..e4b1853 100644 --- a/res/include/style/layout.css +++ b/res/include/style/layout.css @@ -346,7 +346,7 @@ pre { .file_button{ position: relative; box-sizing: border-box; - width: 300px; + width: 400px; max-width: 90%; height: 3.6em; margin: 10px; @@ -432,6 +432,7 @@ select { overflow: hidden; font-size: 1em; /* Sometimes user-agents have different font sizes for buttons and links */ text-decoration: none; + text-shadow: none; color: #bfbfbf; /* Fallback */ color: var(--input_text_color); outline: 0; diff --git a/res/static/img/misc/clock.gif b/res/static/img/misc/clock.gif new file mode 100644 index 0000000..0f02127 Binary files /dev/null and b/res/static/img/misc/clock.gif differ diff --git a/res/template/account/user_home.html b/res/template/account/user_home.html index 862feee..1db1940 100644 --- a/res/template/account/user_home.html +++ b/res/template/account/user_home.html @@ -18,22 +18,20 @@
  • Username: {{.User.Username}}
  • E-mail address: {{.User.Email}}
  • - {{if eq .User.Subscription.Name ""}} - Supporter status: Not a pixeldrain supporter
    - Learn how to support pixeldrain. - {{else}} - Supporter level {{.User.Subscription.Name}} - + Supporter level: {{.User.Subscription.Name}} + {{if ne .User.Subscription.ID ""}} + (Manage subscription) {{end}} +
  • Change account settings diff --git a/res/template/fragments/form.html b/res/template/fragments/form.html index 7c89ce5..6d7b674 100644 --- a/res/template/fragments/form.html +++ b/res/template/fragments/form.html @@ -60,7 +60,7 @@
    {{ end }} {{else if eq $field.Type "description"}} -

    {{$field.DefaultValue}}

    + {{$field.DefaultValue}} {{end}} {{end}} diff --git a/res/template/home.html b/res/template/home.html index e682ff0..073a77d 100644 --- a/res/template/home.html +++ b/res/template/home.html @@ -44,7 +44,7 @@ .instruction_text { margin: 0.1em; font-size: 1.5em; - display: inline-block; + display: inline; box-sizing: border-box; vertical-align: middle; } @@ -57,20 +57,31 @@ margin: 5px 15px; } + .table_container { + width: 100%; + overflow-x: auto; + overflow-y: hidden; + } .feat_table { display: flex; flex-direction: column; + min-width: 400px; } .feat_table > div { display: flex; flex-direction: row; } - .feat_table > div > div:first-child { max-width: 14em; } + .feat_table > div > div:first-child { + flex: 0 0 20%; + max-width: 20%; + } .feat_table > div > div { - flex: 1 0 0; + flex: 1 1 0; margin: 0.2em; padding: 0.5em; text-align: center; + word-wrap: break-word; + hyphens: auto; } .feat_table > div > .feat_label { border-top-left-radius: 0.5em; @@ -97,23 +108,10 @@ font-weight: bold; } - @media (max-width: 800px) { - .feat_table > div { - flex-direction: column; - margin: 0.2em; - border-radius: 6px; - } - .feat_table > div > div { - margin: 0; - border-radius: 0; - } - } - @media (min-width: 800px) { - .feat_table > div > div.round_tl { border-top-left-radius: 0.5em; } - .feat_table > div > div.round_tr { border-top-right-radius: 0.5em; } - .feat_table > div > div.round_br { border-bottom-right-radius: 0.5em; } - .feat_table > div > div.round_bl { border-bottom-left-radius: 0.5em; } - } + .feat_table > div > div.round_tl { border-top-left-radius: 0.5em; } + .feat_table > div > div.round_tr { border-top-right-radius: 0.5em; } + .feat_table > div > div.round_br { border-bottom-right-radius: 0.5em; } + .feat_table > div > div.round_bl { border-bottom-left-radius: 0.5em; } {{template `modal.css`}} @@ -126,7 +124,7 @@ Header image
    -
    +
    1 Select files to upload @@ -185,7 +183,7 @@ {{template `tumblr.svg` .}}
    Tumblr
    -
    +

    @@ -193,44 +191,45 @@
    +
    -
    -

    What is pixeldrain?

    -

    - Pixeldrain is a file sharing website built for speed and - ease of use. Pixeldrain does not cost any money, though - donations are appreciated. See how you can support - pixeldrain below. -

    -

    - Files can be uploaded by clicking the big green upload - button, or by dragging them onto this page from your file - manager. You can not upload directories at this time, only - files. The maximum file size you can upload is 10 GB. -

    -

    - You can also create lists, which are a collection of files. - Like a photo album, a music record or a video compilation. - To do this you need to upload a bunch of files at once. The - files will be saved in the order you uploaded them. When all - files have finished uploading you click the "Create list - with uploaded files" button and you will be asked to enter a - name for your list. After picking a name the list will be - created and opened in a new window. If your browser blocks - the window you can also find a link to the list at the - bottom of your uploaded files. -

    -

    - For more information about pixeldrain see the - about page. -

    +

    What is pixeldrain?

    +
    +

    + Pixeldrain is a file sharing website built for speed and + ease of use. Pixeldrain does not cost any money, though + donations are appreciated. See how you can support + pixeldrain below. +

    +

    + Files can be uploaded by clicking the big green upload + button, or by dragging them onto this page from your file + manager. +

    +

    + You can also create lists, which are a collection of files. + Like a photo album, a music record or a video compilation. + To do this you need to upload a bunch of files at once. The + files will be saved in the order you uploaded them. When all + files have finished uploading you click the "Create list + with uploaded files" button and you will be asked to enter a + name for your list. After picking a name the list will be + created and opened in a new window. If your browser blocks + the window you can also find a link to the list at the + bottom of your uploaded files. +

    +

    + For more information about pixeldrain see the + about page. +

    -

    Pro

    -

    - By purchasing a subscription you support pixeldrain on its - mission to make content sharing easier, safer and faster for - everyone. -

    +

    Getting more out of pixeldrain

    +

    + By purchasing a subscription you support pixeldrain on its + mission to make content sharing easier, safer and faster for + everyone. +

    +
    @@ -248,12 +247,12 @@
    90 days after the last time it is viewed
    -
    Advertisements
    +
    Adver­tise­ments
    Pop-up or a banner ad on the file viewer page
    No ads on files - you share, or when viewing files from other - users + you share. No ads when viewing files uploaded by + other users
    @@ -280,27 +279,36 @@
    Free
    - + {{if ne .User.Subscription.ID ""}} + You have this plan
    + Thank you for supporting pixeldrain! + {{else}} + Only € 2 per month! (Excluding tax)
    - Billed annually. We accept Stripe and PayPal + Subscription managed by Patreon + {{end}}
    -
    -

    Premium

    -

    - Premium is more catered toward file storage and content - delivery. This plan enables the Buckets feature which - provides a more structured way to manage your files on - pixeldrain. Buckets allow direct linking to files without - running into rate limiting. -

    -

    - When you choose for Premium you will also get all the - benefits of the Pro subscription. -

    -
    +
    +

    Premium

    +
    + Pixeldrain Premium is still in development and not generally + available yet. Stay tuned. +
    +

    + Premium is more catered toward content delivery. This plan + enables the Buckets feature which provides a more structured way + to manage your files on pixeldrain. Buckets allow direct linking + to files without running into rate limiting. +

    +

    + When you choose for Premium you will also get all the benefits + of the Pro subscription. A base rate of €1 per month will be + billed regardless of your usage. +

    +