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
address than abuse@pixeldrain.com will also be ignored. See the chapter
[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
inappropriate touching of minors will be removed and reported to the National
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
glorify acts of terrorism.
* **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.
This includes publicly sharing private photos, videos or documents. Shaming
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
to pixeldrain.

View File

@@ -32,13 +32,7 @@ let list = list_struct
let is_list = false
let list_downloadable = false
let file_preview
let list_navigator
let list_shuffle = false
let toggle_shuffle = () => {
list_shuffle = !list_shuffle
}
let sharebar
let sharebar_visible = false
let toggle_sharebar = () => {
@@ -338,10 +332,8 @@ const keyboard_event = evt => {
downloader.download_file() // S to download the current file
}
break
case "r": // R to toggle list shuffle
if (list_navigator) {
toggle_shuffle()
}
case "r": // R to toggle the report window
report_window.toggle()
break
case "c": // C to copy to clipboard
copy_btn.copy()
@@ -404,7 +396,6 @@ const keyboard_event = evt => {
<ListNavigator
bind:this={list_navigator}
files={list.files}
shuffle={list_shuffle}
on:set_file={e => open_file_index(e.detail)}
on:toggle_gallery={toggle_gallery}
>
@@ -468,21 +459,6 @@ const keyboard_event = evt => {
<span>QR code</span>
</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"}
<button
class="toolbar_button"
@@ -517,6 +493,15 @@ const keyboard_event = evt => {
</button>
{/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}
<button
class="toolbar_button"
@@ -527,16 +512,6 @@ const keyboard_event = evt => {
<span>E<u>m</u>bed</span>
</button>
{/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 bind:this={file_preview_background}

View File

@@ -4,23 +4,12 @@ import { createEventDispatcher } from "svelte";
let dispatch = createEventDispatcher()
export let files = []
export let shuffle = false
let file_list_div
let selected_file_index = 0
export const next = () => {
if (shuffle) {
rand_item()
} 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")
}
export const next = () => 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 = []
export const rand_item = () => {

View File

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

View File

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