Skip to content

Commit

Permalink
Move all separate folders to lib
Browse files Browse the repository at this point in the history
This allows changing '../../..' imports to '$lib/'
  • Loading branch information
Radiokot committed Dec 2, 2023
1 parent 56d51f8 commit a77332e
Show file tree
Hide file tree
Showing 13 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script>
import tunnelStatus from "../stores/tunnel-status";
import tunnelStatus from "$lib/stores/tunnel-status";
$: isTunnelStatusLoading = $tunnelStatus == null;
$: tunnelStatusString = $tunnelStatus?.isUnreachable()
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type TunnelRoute from './TunnelRoute'
import type TunnelRoute from '$lib/model/TunnelRoute'

export default class TunnelStatus {
status: string
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { readable } from "svelte/store";
import { browser } from '$app/environment';

import TunnelStatus from "../model/TunnelStatus";
import TunnelStatus from "$lib/model/TunnelStatus";

export let setTunnelStatusRestarting: (() => void) | null = null

Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion src/routes/+layout.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script>
import "$lib/bootstrap-grid.min.css";
import "$lib/vendor/bootstrap/bootstrap-grid.min.css";
</script>

<div id="content" class="mx-auto px-2 pt-2 pt-md-4 pb-4">
Expand Down
6 changes: 3 additions & 3 deletions src/routes/+page.svelte
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script lang="ts">
import AppHeader from "../components/AppHeader.svelte";
import TunnelRoute from "../components/TunnelRoute.svelte";
import tunnelStatus from "../stores/tunnel-status";
import AppHeader from "$lib/components/AppHeader.svelte";
import TunnelRoute from "$lib/components/TunnelRoute.svelte";
import tunnelStatus from "$lib/stores/tunnel-status";
import { PUBLIC_GUIDE_URL } from "$env/static/public";
$: isTunnelHealthy = $tunnelStatus?.isOk() == true;
Expand Down
2 changes: 1 addition & 1 deletion src/routes/api/settings/+server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
promises as fsPromises
} from 'fs';

import TunnelSettings from '../../../model/TunnelSettings';
import TunnelSettings from '$lib/model/TunnelSettings';
import { env } from '$env/dynamic/private';

const TOKEN_FILE_ENCODING = 'utf8'
Expand Down
4 changes: 2 additions & 2 deletions src/routes/api/status/+server.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { json } from '@sveltejs/kit';
import TunnelStatus from '../../../model/TunnelStatus';
import TunnelRoute from '../../../model/TunnelRoute';
import TunnelStatus from '$lib/model/TunnelStatus';
import TunnelRoute from '$lib/model/TunnelRoute';

import { env } from '$env/dynamic/private';

Expand Down
4 changes: 2 additions & 2 deletions src/routes/settings/+page.svelte
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script lang="ts">
import { PUBLIC_GUIDE_URL } from "$env/static/public";
import TunnelSettings from "../../model/TunnelSettings";
import { setTunnelStatusRestarting } from "../../stores/tunnel-status";
import TunnelSettings from "$lib/model/TunnelSettings";
import { setTunnelStatusRestarting } from "$lib/stores/tunnel-status";
const tokenRegex = /[A-Za-z0-9+/]+={0,2}$/g;
Expand Down

0 comments on commit a77332e

Please sign in to comment.