Fully rename Pixeldrain to Nova
This commit is contained in:
1 parent
3c13cd1a14
commit
7b24a9d8cf
95 files changed
+321
-1989
No files matched your search
@@ -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">
|
||||
|
||||
Reference in new issue
Block a user