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