Fully rename Pixeldrain to Nova
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<script lang="ts">
|
||||
import PixeldrainLogo from "util/PixeldrainLogo.svelte";
|
||||
import NovaLogo from "util/NovaLogo.svelte";
|
||||
import Button from "layout/Button.svelte";
|
||||
import Euro from "util/Euro.svelte";
|
||||
import { formatDataVolume } from "util/Formatting";
|
||||
@@ -10,7 +10,7 @@ let button: HTMLButtonElement = $state()
|
||||
let dialog: Dialog = $state()
|
||||
|
||||
let {
|
||||
no_login_label = "Pixeldrain",
|
||||
no_login_label = "Nova",
|
||||
hide_name = true,
|
||||
hide_logo = false,
|
||||
style = "",
|
||||
@@ -32,7 +32,7 @@ const open = () => dialog.open(button.getBoundingClientRect())
|
||||
<div class="wrapper">
|
||||
<button bind:this={button} onclick={open} class="button round" title="Menu" style={style}>
|
||||
{#if !hide_logo}
|
||||
<PixeldrainLogo style="height: 1.6em; width: 1.6em;"/>
|
||||
<NovaLogo style="height: 1.6em; width: 1.6em;"/>
|
||||
{/if}
|
||||
<span class="button_username" class:hide_name>
|
||||
{$user.username === "" ? no_login_label : $user.username}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<script lang="ts">
|
||||
import Button from "layout/Button.svelte";
|
||||
import { fs_delete_all, type FSNode } from "lib/FilesystemAPI.svelte";
|
||||
import { fs_trash, type FSNode } from "lib/FilesystemAPI.svelte";
|
||||
import type { FSNavigator } from "filesystem/FSNavigator";
|
||||
import { loading_finish, loading_start } from "lib/Loading";
|
||||
|
||||
@@ -25,7 +25,7 @@ const delete_file = async (e: MouseEvent) => {
|
||||
|
||||
try {
|
||||
loading_start()
|
||||
await fs_delete_all(file.path)
|
||||
await fs_trash(file.path)
|
||||
} catch (err) {
|
||||
console.error(err)
|
||||
alert(err)
|
||||
@@ -61,10 +61,10 @@ const delete_file = async (e: MouseEvent) => {
|
||||
<fieldset>
|
||||
<legend>Delete</legend>
|
||||
<p>
|
||||
Delete this file or directory. If this is a directory then all
|
||||
subfiles will be deleted as well. This action cannot be undone.
|
||||
Move this file or directory to the trash. You can restore it or
|
||||
permanently delete it from the <a href="/d/me/.Trash">trash bin</a>.
|
||||
</p>
|
||||
<Button click={delete_file} red icon="delete" label="Delete" style="align-self: flex-start;"/>
|
||||
<Button click={delete_file} red icon="delete" label="Move to trash" style="align-self: flex-start;"/>
|
||||
</fieldset>
|
||||
{/if}
|
||||
|
||||
|
||||
@@ -73,7 +73,7 @@ run(() => {
|
||||
<fieldset>
|
||||
<legend>Embedding</legend>
|
||||
<p>
|
||||
If you have a website you can embed pixeldrain directories and files in your
|
||||
If you have a website you can embed Nova directories and files in your
|
||||
own webpages with the code below. If you embed a directory then all
|
||||
subdirectories and files will be accessible through the frame. Branding
|
||||
options will also apply in the frame, but only when applied to this
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<script lang="ts">
|
||||
import { fs_delete_all, fs_rename } from "lib/FilesystemAPI.svelte"
|
||||
import { fs_rename, fs_trash, FSNode } from "lib/FilesystemAPI.svelte"
|
||||
import { onMount } from "svelte"
|
||||
import CreateDirectory from "./CreateDirectory.svelte"
|
||||
import ListView from "./ListView.svelte"
|
||||
@@ -15,6 +15,7 @@ import { FileAction, type FileActionHandler } from "./FileManagerLib";
|
||||
import FileMenu from "./FileMenu.svelte";
|
||||
import { loading_finish, loading_start } from "lib/Loading";
|
||||
import SearchBar from "../SearchBar.svelte";
|
||||
import type { GenericResponse } from "lib/NovaAPI";
|
||||
|
||||
let {
|
||||
nav = $bindable(),
|
||||
@@ -33,11 +34,11 @@ let {
|
||||
} = $props();
|
||||
|
||||
let large_icons = $state(false)
|
||||
let uploader: FsUploadWidget
|
||||
let uploader!: FsUploadWidget
|
||||
let mode = $state("viewing")
|
||||
let creating_dir = $state(false)
|
||||
let show_hidden = $state(false)
|
||||
let file_menu: FileMenu = $state()
|
||||
let file_menu!: FileMenu
|
||||
|
||||
export const upload = (files: File[]) => {
|
||||
return uploader.upload_files(files)
|
||||
@@ -119,12 +120,12 @@ const delete_selected = async () => {
|
||||
loading_start()
|
||||
|
||||
// Save all promises with deletion requests in an array
|
||||
let promises = []
|
||||
let promises: Promise<GenericResponse>[] = []
|
||||
nav.children.forEach(child => {
|
||||
if (!child.fm_selected) {
|
||||
return
|
||||
}
|
||||
promises.push(fs_delete_all(child.path))
|
||||
promises.push(fs_trash(child.path))
|
||||
})
|
||||
|
||||
// Wait for all the promises to finish
|
||||
@@ -175,7 +176,7 @@ const toggle_large_icons = () => {
|
||||
|
||||
// Moving functions
|
||||
|
||||
let moving_items = []
|
||||
let moving_items: FSNode[] = []
|
||||
|
||||
// We need to detect if shift is pressed so we can select multiple items
|
||||
let shift_pressed = false
|
||||
@@ -320,6 +321,14 @@ onMount(() => {
|
||||
<button onclick={() => nav.reload()} title="Refresh directory listing">
|
||||
<i class="icon">refresh</i>
|
||||
</button>
|
||||
{#if $nav.children.some(c => c.name === ".Trash" && c.type === "dir")}
|
||||
<button
|
||||
onclick={() => nav.navigate($nav.children.find(c => c.name === ".Trash").path, true)}
|
||||
title="Open trash bin"
|
||||
>
|
||||
<i class="icon">delete</i>
|
||||
</button>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
<div class="toolbar_middle">
|
||||
|
||||
@@ -4,7 +4,7 @@ import type { FSNavigator } from "filesystem/FSNavigator";
|
||||
import Button from "layout/Button.svelte";
|
||||
import Dialog from "layout/Dialog.svelte";
|
||||
import { bookmark_add, bookmark_del, bookmarks_store, is_bookmark } from "lib/Bookmarks";
|
||||
import { fs_delete, type FSNode } from "lib/FilesystemAPI.svelte";
|
||||
import { fs_trash, type FSNode } from "lib/FilesystemAPI.svelte";
|
||||
import { loading_finish, loading_start } from "lib/Loading";
|
||||
import { tick } from "svelte";
|
||||
|
||||
@@ -44,7 +44,7 @@ export const open = async (n: FSNode, target: EventTarget, event: Event) => {
|
||||
const delete_node = async () => {
|
||||
try {
|
||||
loading_start()
|
||||
await fs_delete(node.path)
|
||||
await fs_trash(node.path)
|
||||
nav.reload()
|
||||
} catch (err) {
|
||||
alert(JSON.stringify(err))
|
||||
|
||||
@@ -26,8 +26,16 @@ let {
|
||||
<thead>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td><SortButton active_field={$nav.sort_last_field} asc={$nav.sort_asc} sort_func={nav.sort_children} field="name">Name</SortButton></td>
|
||||
<td class="hide_small"><SortButton active_field={$nav.sort_last_field} asc={$nav.sort_asc} sort_func={nav.sort_children} field="file_size">Size</SortButton></td>
|
||||
<td>
|
||||
<SortButton active_field={$nav.sort_last_field} asc={$nav.sort_asc} sort_func={nav.sort_children} field="name">
|
||||
Name
|
||||
</SortButton>
|
||||
</td>
|
||||
<td class="hide_small">
|
||||
<SortButton active_field={$nav.sort_last_field} asc={$nav.sort_asc} sort_func={nav.sort_children} field="file_size">
|
||||
Size
|
||||
</SortButton>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Uploads a file to the logged in user's pixeldrain account. If no user is
|
||||
// Uploads a file to the logged in user's Nova account. If no user is
|
||||
// logged in the file is uploaded anonymously.
|
||||
//
|
||||
// on_progress reports progress on the file upload, parameter 1 is the uploaded
|
||||
|
||||
@@ -32,7 +32,7 @@ export const update = async () => {
|
||||
if (media_session) {
|
||||
navigator.mediaSession.metadata = new MediaMetadata({
|
||||
title: nav.base.name,
|
||||
artist: "pixeldrain",
|
||||
artist: "Nova",
|
||||
album: "unknown",
|
||||
});
|
||||
}
|
||||
|
||||
@@ -126,7 +126,7 @@ let magnet = $state("")
|
||||
instructions for your torrent client to download the files from
|
||||
other people who happen to be downloading the same files currently.
|
||||
This means that instead of connecting to a single server (like
|
||||
pixeldrain), you will be connecting to other people on the internet
|
||||
Nova), you will be connecting to other people on the internet
|
||||
to download these files.
|
||||
</p>
|
||||
<p>
|
||||
|
||||
@@ -24,7 +24,7 @@ export const update = async () => {
|
||||
if (media_session) {
|
||||
navigator.mediaSession.metadata = new MediaMetadata({
|
||||
title: node.name,
|
||||
artist: "pixeldrain",
|
||||
artist: "Nova",
|
||||
album: "unknown",
|
||||
});
|
||||
console.debug("Updating media session")
|
||||
|
||||
Reference in New Issue
Block a user