Remove shuffle button, because the toolbar is too full

This commit is contained in:
2024-04-11 13:59:44 +02:00
parent 605dc29e69
commit f8a97d2183
5 changed files with 32 additions and 54 deletions

View File

@@ -9,9 +9,18 @@ will be removed when reported.
not valid it will be ignored. Takedown requests which are sent to any other not valid it will be ignored. Takedown requests which are sent to any other
address than abuse@pixeldrain.com will also be ignored. See the chapter address than abuse@pixeldrain.com will also be ignored. See the chapter
[Copyright infringement](#copyright-infringement) below. [Copyright infringement](#copyright-infringement) below.
* **Porn**: Pornographic material is not strictly banned on pixeldrain. But in
order to comply with international regulations I have to prevent it from
spreading too far. For this reason pornographic videos and images can be
reported through the file reporting form. Once reported the file will be
removed from public viewing. The IP address of the uploader will not be
banned, and if the file was uploaded with an account, the owner of the file
will still be able to download their files.
* **Abuse of minors**: Videos, images or audio fragments depicting abuse or * **Abuse of minors**: Videos, images or audio fragments depicting abuse or
inappropriate touching of minors will be removed and reported to the National inappropriate touching of minors will be removed and reported to the National
Center for Missing and Exploited Children when found. Center for Missing and Exploited Children when found.
* **Zoophilia**: Videos, images or audio depicting abuse or inappropriate
touching of animals.
* **Terrorism**: Videos, images or audio fragments which promote and * **Terrorism**: Videos, images or audio fragments which promote and
glorify acts of terrorism. glorify acts of terrorism.
* **Gore**: Graphic and shocking videos or images depicting severe harm to * **Gore**: Graphic and shocking videos or images depicting severe harm to
@@ -24,6 +33,8 @@ will be removed when reported.
* **Doxing**: Posting private information about an individual or organisation. * **Doxing**: Posting private information about an individual or organisation.
This includes publicly sharing private photos, videos or documents. Shaming This includes publicly sharing private photos, videos or documents. Shaming
and extortion are not accepted. and extortion are not accepted.
* **Revenge porn**: The distribution of sexually explicit images or videos of
individuals without their consent
Violating these rules will result in your IP address being banned from uploading Violating these rules will result in your IP address being banned from uploading
to pixeldrain. to pixeldrain.

View File

@@ -32,13 +32,7 @@ let list = list_struct
let is_list = false let is_list = false
let list_downloadable = false let list_downloadable = false
let file_preview let file_preview
let list_navigator let list_navigator
let list_shuffle = false
let toggle_shuffle = () => {
list_shuffle = !list_shuffle
}
let sharebar let sharebar
let sharebar_visible = false let sharebar_visible = false
let toggle_sharebar = () => { let toggle_sharebar = () => {
@@ -338,10 +332,8 @@ const keyboard_event = evt => {
downloader.download_file() // S to download the current file downloader.download_file() // S to download the current file
} }
break break
case "r": // R to toggle list shuffle case "r": // R to toggle the report window
if (list_navigator) { report_window.toggle()
toggle_shuffle()
}
break break
case "c": // C to copy to clipboard case "c": // C to copy to clipboard
copy_btn.copy() copy_btn.copy()
@@ -404,7 +396,6 @@ const keyboard_event = evt => {
<ListNavigator <ListNavigator
bind:this={list_navigator} bind:this={list_navigator}
files={list.files} files={list.files}
shuffle={list_shuffle}
on:set_file={e => open_file_index(e.detail)} on:set_file={e => open_file_index(e.detail)}
on:toggle_gallery={toggle_gallery} on:toggle_gallery={toggle_gallery}
> >
@@ -468,21 +459,6 @@ const keyboard_event = evt => {
<span>QR code</span> <span>QR code</span>
</button> </button>
{#if is_list}
<button
class="toolbar_button"
title="Go to a random file when pressing → or clicking the next file button"
class:button_highlight={list_shuffle}
on:click={toggle_shuffle}>
<i class="icon">shuffle</i>
{#if list_shuffle}
<span>Shuffle&nbsp;&#x2611;</span>
{:else}
<span>Shuffle&nbsp;&#x2610;</span>
{/if}
</button>
{/if}
{#if view === "file"} {#if view === "file"}
<button <button
class="toolbar_button" class="toolbar_button"
@@ -517,6 +493,15 @@ const keyboard_event = evt => {
</button> </button>
{/if} {/if}
<button
class="toolbar_button"
title="Report this file as abusive"
on:click={report_window.toggle}
class:button_highlight={report_visible}>
<i class="icon">flag</i>
<span>Report</span>
</button>
{#if !disable_download_button} {#if !disable_download_button}
<button <button
class="toolbar_button" class="toolbar_button"
@@ -527,16 +512,6 @@ const keyboard_event = evt => {
<span>E<u>m</u>bed</span> <span>E<u>m</u>bed</span>
</button> </button>
{/if} {/if}
<button
class="toolbar_button"
title="Report this file as abusive"
on:click={report_window.toggle}
class:button_highlight={report_visible}>
<i class="icon">flag</i>
<span>Report</span>
</button>
<br/>
</div> </div>
<div bind:this={file_preview_background} <div bind:this={file_preview_background}

View File

@@ -4,23 +4,12 @@ import { createEventDispatcher } from "svelte";
let dispatch = createEventDispatcher() let dispatch = createEventDispatcher()
export let files = [] export let files = []
export let shuffle = false
let file_list_div let file_list_div
let selected_file_index = 0 let selected_file_index = 0
export const next = () => { export const next = () => dispatch("set_file", selected_file_index+1)
if (shuffle) { export const prev = () => dispatch("set_file", selected_file_index-1)
rand_item() export const toggle_gallery = () => dispatch("toggle_gallery")
} else {
dispatch("set_file", selected_file_index+1)
}
}
export const prev = () => {
dispatch("set_file", selected_file_index-1)
}
export const toggle_gallery = () => {
dispatch("toggle_gallery")
}
let history = [] let history = []
export const rand_item = () => { export const rand_item = () => {

View File

@@ -130,9 +130,12 @@ onDestroy(close_socket)
.label { .label {
padding-left: 0.5em; padding-left: 0.5em;
text-align: left; text-align: left;
font-size: 0.75em; font-size: 0.8em;
line-height: 0.75em; line-height: 0.8em;
margin-top: 0.5em; margin-top: 0.25em;
}
.stat {
line-height: 1.4em;
} }
@media (max-width: 800px) { @media (max-width: 800px) {
.label { .label {

View File

@@ -166,7 +166,7 @@ Toolbar.svelte and the .label max-width in FileStats.svelte */
@media (max-width: 800px) { @media (max-width: 800px) {
.toolbar { .toolbar {
overflow-y: hidden; overflow-y: hidden;
max-height: 2.5em; max-height: 2.2em;
} }
.toolbar.expanded { .toolbar.expanded {
overflow-y: scroll; overflow-y: scroll;