Move back to relative paths because somehow the alternative is even worse
This commit is contained in:
@@ -5,7 +5,6 @@ import livereload from 'rollup-plugin-livereload';
|
|||||||
import terser from '@rollup/plugin-terser';
|
import terser from '@rollup/plugin-terser';
|
||||||
import babel from '@rollup/plugin-babel'
|
import babel from '@rollup/plugin-babel'
|
||||||
import typescript from '@rollup/plugin-typescript'
|
import typescript from '@rollup/plugin-typescript'
|
||||||
import includePaths from 'rollup-plugin-includepaths';
|
|
||||||
import { sveltePreprocess } from 'svelte-preprocess';
|
import { sveltePreprocess } from 'svelte-preprocess';
|
||||||
|
|
||||||
const production = !process.env.ROLLUP_WATCH;
|
const production = !process.env.ROLLUP_WATCH;
|
||||||
@@ -40,14 +39,13 @@ export default [
|
|||||||
}),
|
}),
|
||||||
|
|
||||||
babel({
|
babel({
|
||||||
extensions: [".js", ".ts", ".html", ".svelte"],
|
extensions: [".js", ".ts", ".svelte"],
|
||||||
babelHelpers: "bundled",
|
babelHelpers: "bundled",
|
||||||
}),
|
}),
|
||||||
|
|
||||||
// If you have external dependencies installed from
|
// If you have external dependencies installed from npm, you'll most
|
||||||
// npm, you'll most likely need these plugins. In
|
// likely need these plugins. In some cases you'll need additional
|
||||||
// some cases you'll need additional configuration -
|
// configuration - consult the documentation for details:
|
||||||
// consult the documentation for details:
|
|
||||||
// https://github.com/rollup/plugins/tree/master/packages/commonjs
|
// https://github.com/rollup/plugins/tree/master/packages/commonjs
|
||||||
resolve({
|
resolve({
|
||||||
browser: true,
|
browser: true,
|
||||||
@@ -60,23 +58,16 @@ export default [
|
|||||||
compilerOptions: { lib: ["es2015", "dom"] },
|
compilerOptions: { lib: ["es2015", "dom"] },
|
||||||
verbatimModuleSyntax: true,
|
verbatimModuleSyntax: true,
|
||||||
}),
|
}),
|
||||||
includePaths({
|
|
||||||
paths: ["."],
|
|
||||||
}),
|
|
||||||
|
|
||||||
// In dev mode, call `npm run start` once
|
// Watch the `public` directory and refresh the browser on changes when
|
||||||
// the bundle has been generated
|
// not in production
|
||||||
// !production && serve(),
|
|
||||||
|
|
||||||
// Watch the `public` directory and refresh the
|
|
||||||
// browser on changes when not in production
|
|
||||||
!production && livereload({
|
!production && livereload({
|
||||||
watch: `${builddir}/${name}.*`,
|
watch: `${builddir}/${name}.*`,
|
||||||
port: 5000 + index,
|
port: 5000 + index,
|
||||||
}),
|
}),
|
||||||
|
|
||||||
// If we're building for production (npm run build
|
// If we're building for production (npm run build instead of npm run
|
||||||
// instead of npm run dev), minify
|
// dev), minify
|
||||||
production && terser(),
|
production && terser(),
|
||||||
],
|
],
|
||||||
watch: {
|
watch: {
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
<script>
|
<script>
|
||||||
import { formatDataVolume, formatThousands } from "../util/Formatting.svelte"
|
import { formatDataVolume, formatThousands } from "../util/Formatting.svelte"
|
||||||
import { set_file, stats } from "src/util/StatsSocket"
|
import { set_file, stats } from "../util/StatsSocket"
|
||||||
|
|
||||||
export let file = {
|
export let file = {
|
||||||
id: "",
|
id: "",
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
<script>
|
<script>
|
||||||
import { formatDataVolume } from "../util/Formatting.svelte";
|
import { formatDataVolume } from "../util/Formatting.svelte";
|
||||||
import { stats } from "src/util/StatsSocket.js"
|
import { stats } from "../util/StatsSocket.js"
|
||||||
|
|
||||||
let percent = 0
|
let percent = 0
|
||||||
let title = ""
|
let title = ""
|
||||||
|
@@ -1,8 +1,8 @@
|
|||||||
<script>
|
<script>
|
||||||
import { createEventDispatcher } from "svelte";
|
import { createEventDispatcher } from "svelte";
|
||||||
import IconBlock from "src/layout/IconBlock.svelte";
|
import IconBlock from "../../layout/IconBlock.svelte";
|
||||||
import TextBlock from "src/layout/TextBlock.svelte"
|
import TextBlock from "../../layout/TextBlock.svelte"
|
||||||
import FileTitle from "src/layout/FileTitle.svelte";
|
import FileTitle from "../../layout/FileTitle.svelte";
|
||||||
|
|
||||||
let dispatch = createEventDispatcher()
|
let dispatch = createEventDispatcher()
|
||||||
|
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import { createEventDispatcher, tick } from "svelte";
|
import { createEventDispatcher, tick } from "svelte";
|
||||||
import BandwidthUsage from "./BandwidthUsage.svelte";
|
import BandwidthUsage from "./BandwidthUsage.svelte";
|
||||||
import FileTitle from "src/layout/FileTitle.svelte";
|
import FileTitle from "../../layout/FileTitle.svelte";
|
||||||
let dispatch = createEventDispatcher()
|
let dispatch = createEventDispatcher()
|
||||||
|
|
||||||
export let is_list = false
|
export let is_list = false
|
||||||
|
@@ -1,8 +1,8 @@
|
|||||||
<script>
|
<script>
|
||||||
import { formatDataVolume } from "../../util/Formatting.svelte";
|
import { formatDataVolume } from "../../util/Formatting.svelte";
|
||||||
import TextBlock from "src/layout/TextBlock.svelte"
|
import TextBlock from "../../layout/TextBlock.svelte"
|
||||||
import ProgressBar from "../../util/ProgressBar.svelte";
|
import ProgressBar from "../../util/ProgressBar.svelte";
|
||||||
import { stats } from "src/util/StatsSocket.js"
|
import { stats } from "../../util/StatsSocket.js"
|
||||||
|
|
||||||
export let file = {
|
export let file = {
|
||||||
size: 0,
|
size: 0,
|
||||||
|
@@ -1,8 +1,8 @@
|
|||||||
<script>
|
<script>
|
||||||
import { createEventDispatcher } from "svelte";
|
import { createEventDispatcher } from "svelte";
|
||||||
import BandwidthUsage from "./BandwidthUsage.svelte";
|
import BandwidthUsage from "./BandwidthUsage.svelte";
|
||||||
import IconBlock from "src/layout/IconBlock.svelte";
|
import IconBlock from "../../layout/IconBlock.svelte";
|
||||||
import FileTitle from "src/layout/FileTitle.svelte";
|
import FileTitle from "../../layout/FileTitle.svelte";
|
||||||
import { formatDataVolume } from "../../util/Formatting.svelte";
|
import { formatDataVolume } from "../../util/Formatting.svelte";
|
||||||
let dispatch = createEventDispatcher()
|
let dispatch = createEventDispatcher()
|
||||||
|
|
||||||
|
@@ -11,9 +11,9 @@ import Abuse from "./Abuse.svelte";
|
|||||||
import { file_type } from "../FileUtilities.svelte";
|
import { file_type } from "../FileUtilities.svelte";
|
||||||
import RateLimit from "./RateLimit.svelte";
|
import RateLimit from "./RateLimit.svelte";
|
||||||
import Torrent from "./Torrent.svelte";
|
import Torrent from "./Torrent.svelte";
|
||||||
import { stats } from "src/util/StatsSocket.js"
|
import { stats } from "../../util/StatsSocket.js"
|
||||||
import Zip from "./Zip.svelte";
|
import Zip from "./Zip.svelte";
|
||||||
import SlowDown from "src/layout/SlowDown.svelte";
|
import SlowDown from "../../layout/SlowDown.svelte";
|
||||||
|
|
||||||
let viewer
|
let viewer
|
||||||
let viewer_type = "loading"
|
let viewer_type = "loading"
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
<script>
|
<script>
|
||||||
import { createEventDispatcher } from "svelte"
|
import { createEventDispatcher } from "svelte"
|
||||||
import { swipe_nav } from "src/util/SwipeNavigate.ts";
|
import { swipe_nav } from "../../util/SwipeNavigate.ts";
|
||||||
let dispatch = createEventDispatcher()
|
let dispatch = createEventDispatcher()
|
||||||
|
|
||||||
export const set_file = f => {
|
export const set_file = f => {
|
||||||
|
@@ -1,9 +1,9 @@
|
|||||||
<script>
|
<script>
|
||||||
import { createEventDispatcher } from "svelte";
|
import { createEventDispatcher } from "svelte";
|
||||||
import { formatDataVolume } from "../../util/Formatting.svelte";
|
import { formatDataVolume } from "../../util/Formatting.svelte";
|
||||||
import { stats } from "src/util/StatsSocket.js"
|
import { stats } from "../../util/StatsSocket.js"
|
||||||
import IconBlock from "src/layout/IconBlock.svelte";
|
import IconBlock from "../../layout/IconBlock.svelte";
|
||||||
import TextBlock from "src/layout/TextBlock.svelte"
|
import TextBlock from "../../layout/TextBlock.svelte"
|
||||||
let dispatch = createEventDispatcher()
|
let dispatch = createEventDispatcher()
|
||||||
|
|
||||||
export const set_file = f => file = f
|
export const set_file = f => file = f
|
||||||
|
@@ -1,12 +1,12 @@
|
|||||||
<script>
|
<script>
|
||||||
import { createEventDispatcher } from "svelte";
|
import { createEventDispatcher } from "svelte";
|
||||||
import Magnet from "src/icons/Magnet.svelte";
|
import Magnet from "../../icons/Magnet.svelte";
|
||||||
import { formatDate } from "src/util/Formatting.svelte"
|
import { formatDate } from "../../util/Formatting.svelte"
|
||||||
import IconBlock from "src/layout/IconBlock.svelte";
|
import IconBlock from "../../layout/IconBlock.svelte";
|
||||||
import TextBlock from "src/layout/TextBlock.svelte";
|
import TextBlock from "../../layout/TextBlock.svelte";
|
||||||
import TorrentItem from "./TorrentItem.svelte"
|
import TorrentItem from "./TorrentItem.svelte"
|
||||||
import FileTitle from "src/layout/FileTitle.svelte";
|
import FileTitle from "../../layout/FileTitle.svelte";
|
||||||
import CopyButton from "src/layout/CopyButton.svelte";
|
import CopyButton from "../../layout/CopyButton.svelte";
|
||||||
|
|
||||||
let dispatch = createEventDispatcher()
|
let dispatch = createEventDispatcher()
|
||||||
|
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import { onMount, createEventDispatcher, tick } from "svelte";
|
import { onMount, createEventDispatcher, tick } from "svelte";
|
||||||
import BandwidthUsage from "./BandwidthUsage.svelte";
|
import BandwidthUsage from "./BandwidthUsage.svelte";
|
||||||
import IconBlock from "src/layout/IconBlock.svelte";
|
import IconBlock from "../../layout/IconBlock.svelte";
|
||||||
let dispatch = createEventDispatcher()
|
let dispatch = createEventDispatcher()
|
||||||
|
|
||||||
export let is_list = false
|
export let is_list = false
|
||||||
|
@@ -1,11 +1,11 @@
|
|||||||
<script>
|
<script>
|
||||||
import { createEventDispatcher } from "svelte";
|
import { createEventDispatcher } from "svelte";
|
||||||
import { formatDataVolume, formatDate } from "../../util/Formatting.svelte"
|
import { formatDataVolume, formatDate } from "../../util/Formatting.svelte"
|
||||||
import IconBlock from "src/layout/IconBlock.svelte";
|
import IconBlock from "../../layout/IconBlock.svelte";
|
||||||
import TextBlock from "src/layout/TextBlock.svelte"
|
import TextBlock from "../../layout/TextBlock.svelte"
|
||||||
import ZipItem from "./ZipItem.svelte";
|
import ZipItem from "./ZipItem.svelte";
|
||||||
import BandwidthUsage from "./BandwidthUsage.svelte";
|
import BandwidthUsage from "./BandwidthUsage.svelte";
|
||||||
import FileTitle from "src/layout/FileTitle.svelte";
|
import FileTitle from "../../layout/FileTitle.svelte";
|
||||||
|
|
||||||
let dispatch = createEventDispatcher()
|
let dispatch = createEventDispatcher()
|
||||||
|
|
||||||
|
@@ -70,7 +70,7 @@ export class FSNavigator {
|
|||||||
this.set_loading(true)
|
this.set_loading(true)
|
||||||
const resp = await fs_get_node(path)
|
const resp = await fs_get_node(path)
|
||||||
this.open_node(resp, push_history)
|
this.open_node(resp, push_history)
|
||||||
} catch (err) {
|
} catch (err: any) {
|
||||||
if (err.value && err.value === "path_not_found") {
|
if (err.value && err.value === "path_not_found") {
|
||||||
if (path !== this.path[0].path && path !== "/" && path !== "") {
|
if (path !== this.path[0].path && path !== "/" && path !== "") {
|
||||||
console.debug("Path", path, "was not found, trying to navigate to parent")
|
console.debug("Path", path, "was not found, trying to navigate to parent")
|
||||||
|
@@ -13,7 +13,7 @@ import Menu from './Menu.svelte';
|
|||||||
import { FSNavigator } from "./FSNavigator"
|
import { FSNavigator } from "./FSNavigator"
|
||||||
import { writable } from 'svelte/store';
|
import { writable } from 'svelte/store';
|
||||||
import TransferLimit from '../file_viewer/TransferLimit.svelte';
|
import TransferLimit from '../file_viewer/TransferLimit.svelte';
|
||||||
import { stats } from "src/util/StatsSocket.js"
|
import { stats } from "../util/StatsSocket.js"
|
||||||
import { css_from_path } from './edit_window/Branding';
|
import { css_from_path } from './edit_window/Branding';
|
||||||
|
|
||||||
let file_viewer
|
let file_viewer
|
||||||
|
@@ -7,7 +7,7 @@ import GalleryView from './GalleryView.svelte'
|
|||||||
import Button from '../../layout/Button.svelte';
|
import Button from '../../layout/Button.svelte';
|
||||||
import FileImporter from './FileImporter.svelte';
|
import FileImporter from './FileImporter.svelte';
|
||||||
import { formatDate } from '../../util/Formatting.svelte';
|
import { formatDate } from '../../util/Formatting.svelte';
|
||||||
import { drop_target } from "src/util/DropTarget.ts"
|
import { drop_target } from "../../util/DropTarget.ts"
|
||||||
|
|
||||||
export let nav
|
export let nav
|
||||||
export let upload_widget
|
export let upload_widget
|
||||||
|
@@ -1,8 +1,8 @@
|
|||||||
<script>
|
<script>
|
||||||
import { onMount } from 'svelte'
|
import { onMount } from 'svelte'
|
||||||
import { fs_path_url, fs_encode_path, fs_node_icon } from "src/filesystem/FilesystemAPI.ts"
|
import { fs_path_url, fs_encode_path, fs_node_icon } from "../../filesystem/FilesystemAPI.ts"
|
||||||
import FileTitle from "src/layout/FileTitle.svelte";
|
import FileTitle from "../../layout/FileTitle.svelte";
|
||||||
import TextBlock from "src/layout/TextBlock.svelte"
|
import TextBlock from "../../layout/TextBlock.svelte"
|
||||||
|
|
||||||
export let nav
|
export let nav
|
||||||
let player
|
let player
|
||||||
|
@@ -1,8 +1,8 @@
|
|||||||
<script>
|
<script>
|
||||||
import { createEventDispatcher } from "svelte";
|
import { createEventDispatcher } from "svelte";
|
||||||
import IconBlock from "src/layout/IconBlock.svelte";
|
import IconBlock from "../../layout/IconBlock.svelte";
|
||||||
import { fs_thumbnail_url } from "../FilesystemAPI";
|
import { fs_thumbnail_url } from "../FilesystemAPI";
|
||||||
import TextBlock from "src/layout/TextBlock.svelte"
|
import TextBlock from "../../layout/TextBlock.svelte"
|
||||||
let dispatch = createEventDispatcher()
|
let dispatch = createEventDispatcher()
|
||||||
|
|
||||||
export let nav
|
export let nav
|
||||||
|
@@ -12,8 +12,8 @@ import Video from "./Video.svelte";
|
|||||||
import Torrent from "./Torrent.svelte";
|
import Torrent from "./Torrent.svelte";
|
||||||
import Zip from "./Zip.svelte";
|
import Zip from "./Zip.svelte";
|
||||||
import CustomBanner from "./CustomBanner.svelte";
|
import CustomBanner from "./CustomBanner.svelte";
|
||||||
import { stats } from "src/util/StatsSocket.js"
|
import { stats } from "../../util/StatsSocket.js"
|
||||||
import SlowDown from "src/layout/SlowDown.svelte";
|
import SlowDown from "../../layout/SlowDown.svelte";
|
||||||
|
|
||||||
export let nav
|
export let nav
|
||||||
export let upload_widget
|
export let upload_widget
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
<script>
|
<script>
|
||||||
import { createEventDispatcher } from "svelte";
|
import { createEventDispatcher } from "svelte";
|
||||||
import { swipe_nav } from "src/util/SwipeNavigate.ts";
|
import { swipe_nav } from "../../util/SwipeNavigate.ts";
|
||||||
import { fs_path_url } from "./../FilesystemAPI";
|
import { fs_path_url } from "./../FilesystemAPI";
|
||||||
|
|
||||||
let dispatch = createEventDispatcher();
|
let dispatch = createEventDispatcher();
|
||||||
|
@@ -3,8 +3,8 @@ import { createEventDispatcher } from "svelte";
|
|||||||
import Magnet from "../../icons/Magnet.svelte";
|
import Magnet from "../../icons/Magnet.svelte";
|
||||||
import { formatDate } from "../../util/Formatting.svelte"
|
import { formatDate } from "../../util/Formatting.svelte"
|
||||||
import TorrentItem from "./TorrentItem.svelte"
|
import TorrentItem from "./TorrentItem.svelte"
|
||||||
import IconBlock from "src/layout/IconBlock.svelte";
|
import IconBlock from "../../layout/IconBlock.svelte";
|
||||||
import TextBlock from "src/layout/TextBlock.svelte"
|
import TextBlock from "../../layout/TextBlock.svelte"
|
||||||
import { fs_node_icon, fs_path_url } from "../FilesystemAPI";
|
import { fs_node_icon, fs_path_url } from "../FilesystemAPI";
|
||||||
import CopyButton from "../../layout/CopyButton.svelte";
|
import CopyButton from "../../layout/CopyButton.svelte";
|
||||||
|
|
||||||
|
@@ -2,8 +2,8 @@
|
|||||||
import { createEventDispatcher } from "svelte";
|
import { createEventDispatcher } from "svelte";
|
||||||
import { formatDataVolume, formatDate } from "../../util/Formatting.svelte"
|
import { formatDataVolume, formatDate } from "../../util/Formatting.svelte"
|
||||||
import ZipItem from "../../file_viewer/viewers/ZipItem.svelte";
|
import ZipItem from "../../file_viewer/viewers/ZipItem.svelte";
|
||||||
import IconBlock from "src/layout/IconBlock.svelte";
|
import IconBlock from "../../layout/IconBlock.svelte";
|
||||||
import TextBlock from "src/layout/TextBlock.svelte"
|
import TextBlock from "../../layout/TextBlock.svelte"
|
||||||
import { fs_node_icon, fs_path_url } from "../FilesystemAPI";
|
import { fs_node_icon, fs_path_url } from "../FilesystemAPI";
|
||||||
|
|
||||||
let dispatch = createEventDispatcher()
|
let dispatch = createEventDispatcher()
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
import Login from "../login/Login.svelte";
|
import Login from "../login/Login.svelte";
|
||||||
import Register from "../login/Register.svelte";
|
import Register from "../login/Register.svelte";
|
||||||
import UploadWidget from "./UploadWidget.svelte";
|
import UploadWidget from "./UploadWidget.svelte";
|
||||||
import { drop_target } from "src/util/DropTarget.ts"
|
import { drop_target } from "../util/DropTarget.ts"
|
||||||
|
|
||||||
const finish_login = async e => {
|
const finish_login = async e => {
|
||||||
location.reload()
|
location.reload()
|
||||||
|
@@ -1,9 +1,9 @@
|
|||||||
<script>
|
<script>
|
||||||
import { createEventDispatcher } from "svelte";
|
import { createEventDispatcher } from "svelte";
|
||||||
import { formatDataVolume, formatDuration } from "../util/Formatting.svelte";
|
import { formatDataVolume, formatDuration } from "../util/Formatting.svelte";
|
||||||
import { stats } from "src/util/StatsSocket.js"
|
import { stats } from "../util/StatsSocket.js"
|
||||||
import TextBlock from "src/layout/TextBlock.svelte"
|
import TextBlock from "./TextBlock.svelte"
|
||||||
import IconBlock from "src/layout/IconBlock.svelte";
|
import IconBlock from "./IconBlock.svelte";
|
||||||
let dispatch = createEventDispatcher()
|
let dispatch = createEventDispatcher()
|
||||||
|
|
||||||
export let file_size = 0
|
export let file_size = 0
|
||||||
|
@@ -1,11 +1,11 @@
|
|||||||
<script>
|
<script>
|
||||||
import { onMount } from "svelte";
|
import { onMount } from "svelte";
|
||||||
import { FSNavigator } from "src/filesystem/FSNavigator.ts"
|
import { FSNavigator } from "../../filesystem/FSNavigator.ts"
|
||||||
import { fs_encode_path, fs_node_icon } from "src/filesystem/FilesystemAPI.ts";
|
import { fs_encode_path, fs_node_icon } from "../../filesystem/FilesystemAPI.ts";
|
||||||
import Button from "src/layout/Button.svelte";
|
import Button from "../../layout/Button.svelte";
|
||||||
import CreateDirectory from "src/filesystem/filemanager/CreateDirectory.svelte";
|
import CreateDirectory from "../../filesystem/filemanager/CreateDirectory.svelte";
|
||||||
import FSUploadWidget from "src/filesystem/upload_widget/FSUploadWidget.svelte";
|
import FSUploadWidget from "../../filesystem/upload_widget/FSUploadWidget.svelte";
|
||||||
import { drop_target } from "src/util/DropTarget.ts"
|
import { drop_target } from "../../util/DropTarget.ts"
|
||||||
|
|
||||||
const nav = new FSNavigator(false)
|
const nav = new FSNavigator(false)
|
||||||
let upload_widget
|
let upload_widget
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
<script>
|
<script>
|
||||||
import UploadLib from "./UploadLib.svelte";
|
import UploadLib from "./UploadLib.svelte";
|
||||||
import { drop_target } from "src/util/DropTarget.ts"
|
import { drop_target } from "../../util/DropTarget.ts"
|
||||||
|
|
||||||
let upload_widget
|
let upload_widget
|
||||||
</script>
|
</script>
|
||||||
|
Reference in New Issue
Block a user