mirror of
https://github.com/Jackzmc/storage.git
synced 2025-05-06 14:43:20 +00:00
Cleanup
This commit is contained in:
parent
331001091a
commit
8b401b6bc6
29 changed files with 0 additions and 3135 deletions
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
2
web/.gitignore
vendored
2
web/.gitignore
vendored
|
@ -1,2 +0,0 @@
|
|||
node_modules
|
||||
.svelte-kit
|
|
@ -1,38 +0,0 @@
|
|||
# sv
|
||||
|
||||
Everything you need to build a Svelte project, powered by [`sv`](https://github.com/sveltejs/cli).
|
||||
|
||||
## Creating a project
|
||||
|
||||
If you're seeing this, you've probably already done this step. Congrats!
|
||||
|
||||
```bash
|
||||
# create a new project in the current directory
|
||||
npx sv create
|
||||
|
||||
# create a new project in my-app
|
||||
npx sv create my-app
|
||||
```
|
||||
|
||||
## Developing
|
||||
|
||||
Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server:
|
||||
|
||||
```bash
|
||||
npm run dev
|
||||
|
||||
# or start the server and open the app in a new browser tab
|
||||
npm run dev -- --open
|
||||
```
|
||||
|
||||
## Building
|
||||
|
||||
To create a production version of your app:
|
||||
|
||||
```bash
|
||||
npm run build
|
||||
```
|
||||
|
||||
You can preview the production build with `npm run preview`.
|
||||
|
||||
> To deploy your app, you may need to install an [adapter](https://svelte.dev/docs/kit/adapters) for your target environment.
|
|
@ -1,4 +0,0 @@
|
|||
{
|
||||
"$schema": "https://inlang.com/schema/inlang-message-format",
|
||||
"hello_world": "Hello, {name} from en!"
|
||||
}
|
|
@ -1,38 +0,0 @@
|
|||
{
|
||||
"name": "storage-web",
|
||||
"private": true,
|
||||
"version": "0.0.1",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite dev",
|
||||
"build": "vite build",
|
||||
"preview": "vite preview",
|
||||
"prepare": "svelte-kit sync || echo ''",
|
||||
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
|
||||
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
|
||||
"test:unit": "vitest",
|
||||
"test": "npm run test:unit -- --run"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@iconify/svelte": "^4.2.0",
|
||||
"@sveltejs/adapter-auto": "^4.0.0",
|
||||
"@sveltejs/kit": "^2.16.0",
|
||||
"@sveltejs/vite-plugin-svelte": "^5.0.0",
|
||||
"@tailwindcss/typography": "^0.5.15",
|
||||
"@tailwindcss/vite": "^4.0.0",
|
||||
"@testing-library/jest-dom": "^6.6.3",
|
||||
"@testing-library/svelte": "^5.2.4",
|
||||
"jsdom": "^26.0.0",
|
||||
"svelte": "^5.0.0",
|
||||
"svelte-check": "^4.0.0",
|
||||
"typescript": "^5.0.0",
|
||||
"vite": "^6.2.5",
|
||||
"vitest": "^3.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@inlang/paraglide-js": "^2.0.0",
|
||||
"bulma": "^1.0.3",
|
||||
"rollup-plugin-postcss": "^4.0.2",
|
||||
"svelte-preprocess": "^6.0.3"
|
||||
}
|
||||
}
|
File diff suppressed because one or more lines are too long
16
web/project.inlang/cache/plugins/ygx0uiahq6uw
vendored
16
web/project.inlang/cache/plugins/ygx0uiahq6uw
vendored
File diff suppressed because one or more lines are too long
|
@ -1 +0,0 @@
|
|||
Rvrk3EOCw3V6oHZLmA
|
|
@ -1,14 +0,0 @@
|
|||
{
|
||||
"$schema": "https://inlang.com/schema/project-settings",
|
||||
"modules": [
|
||||
"https://cdn.jsdelivr.net/npm/@inlang/plugin-message-format@4/dist/index.js",
|
||||
"https://cdn.jsdelivr.net/npm/@inlang/plugin-m-function-matcher@2/dist/index.js"
|
||||
],
|
||||
"plugin.inlang.messageFormat": {
|
||||
"pathPattern": "./messages/{locale}.json"
|
||||
},
|
||||
"baseLocale": "en",
|
||||
"locales": [
|
||||
"en"
|
||||
]
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
@import 'bulma';
|
||||
html,
|
||||
body {
|
||||
height: 100%;
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
}
|
13
web/src/app.d.ts
vendored
13
web/src/app.d.ts
vendored
|
@ -1,13 +0,0 @@
|
|||
// See https://svelte.dev/docs/kit/types#app.d.ts
|
||||
// for information about these interfaces
|
||||
declare global {
|
||||
namespace App {
|
||||
// interface Error {}
|
||||
// interface Locals {}
|
||||
// interface PageData {}
|
||||
// interface PageState {}
|
||||
// interface Platform {}
|
||||
}
|
||||
}
|
||||
|
||||
export {};
|
|
@ -1,12 +0,0 @@
|
|||
<!doctype html>
|
||||
<html lang="%paraglide.lang%">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<link rel="icon" href="%sveltekit.assets%/favicon.png" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
%sveltekit.head%
|
||||
</head>
|
||||
<body data-sveltekit-preload-data="hover">
|
||||
<div style="display: contents">%sveltekit.body%</div>
|
||||
</body>
|
||||
</html>
|
|
@ -1,7 +0,0 @@
|
|||
import { describe, it, expect } from 'vitest';
|
||||
|
||||
describe('sum test', () => {
|
||||
it('adds 1 + 2 to equal 3', () => {
|
||||
expect(1 + 2).toBe(3);
|
||||
});
|
||||
});
|
|
@ -1,12 +0,0 @@
|
|||
import type { Handle } from '@sveltejs/kit';
|
||||
import { paraglideMiddleware } from '$lib/paraglide/server';
|
||||
|
||||
const handleParaglide: Handle = ({ event, resolve }) => paraglideMiddleware(event.request, ({ request, locale }) => {
|
||||
event.request = request;
|
||||
|
||||
return resolve(event, {
|
||||
transformPageChunk: ({ html }) => html.replace('%paraglide.lang%', locale)
|
||||
});
|
||||
});
|
||||
|
||||
export const handle: Handle = handleParaglide;
|
|
@ -1,3 +0,0 @@
|
|||
import { deLocalizeUrl } from '$lib/paraglide/runtime';
|
||||
|
||||
export const reroute = (request) => deLocalizeUrl(request.url).pathname;
|
|
@ -1,24 +0,0 @@
|
|||
<nav class="navbar mb-4 has-background-white-ter" aria-label="main navigation">
|
||||
<div class="navbar-brand">
|
||||
<a class="navbar-item" href="/">
|
||||
<h3 class="title is-3">storage-app</h3>
|
||||
</a>
|
||||
<button class="navbar-burger" aria-label="menu" aria-expanded="false">
|
||||
<span aria-hidden="true"></span>
|
||||
<span aria-hidden="true"></span>
|
||||
<span aria-hidden="true"></span>
|
||||
<span aria-hidden="true"></span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="navbar-start">
|
||||
|
||||
</div>
|
||||
<div class="navbar-end">
|
||||
<div class="navbar-item">
|
||||
Bell
|
||||
</div>
|
||||
<div class="navbar-item">
|
||||
User
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
|
@ -1,47 +0,0 @@
|
|||
<aside class="sidebar pl-0 mb-0">
|
||||
<p class="sidebar-header">Workspace</p>
|
||||
<ul class="sidebar-list">
|
||||
<li class="is-active"><button><Icon icon="akar-icons:copy"></Icon> Files</button></li>
|
||||
<li><button><Icon icon="akar-icons:heart"></Icon> Favorites</button></li>
|
||||
<li><button><Icon icon="akar-icons:clock"></Icon> Activities</button></li>
|
||||
</ul>
|
||||
<p class="sidebar-header">Help</p>
|
||||
<ul class="sidebar-list">
|
||||
<li><button>Help</button></li>
|
||||
<li><button>About</button></li>
|
||||
</ul>
|
||||
</aside>
|
||||
|
||||
|
||||
<script lang="ts">
|
||||
import Icon from "@iconify/svelte";
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.sidebar {
|
||||
|
||||
}
|
||||
.sidebar-header {
|
||||
color: hsl(0, 0%, 48%);
|
||||
padding-left: 8px;
|
||||
}
|
||||
.sidebar-list {
|
||||
/* margin-top: 2px; */
|
||||
padding-top: 10px;
|
||||
padding-left: 5px;
|
||||
margin-bottom: 25px;
|
||||
}
|
||||
.sidebar-list li button {
|
||||
padding-left: 8px;
|
||||
padding-top: 10px;
|
||||
padding-bottom: 10px;
|
||||
padding-right: 5px;
|
||||
border-radius: 2.5px;
|
||||
/* margin-top: 4px; */
|
||||
width: 100%;
|
||||
text-align: left;
|
||||
}
|
||||
.sidebar-list li button:hover, .sidebar-list li button.is-active {
|
||||
background-color: lightgray;
|
||||
}
|
||||
</style>
|
|
@ -1 +0,0 @@
|
|||
// place files you want to import through the `$lib` alias in this folder.
|
|
@ -1,26 +0,0 @@
|
|||
<script lang="ts">
|
||||
import '../app.css';
|
||||
import Nav from '$lib/components/nav.svelte';
|
||||
import Sidebar from '$lib/components/sidebar.svelte'
|
||||
|
||||
let { children } = $props();
|
||||
</script>
|
||||
|
||||
<Nav />
|
||||
<div class="mx-5 columns">
|
||||
<div class="column pl-0 sidebar-column">
|
||||
<Sidebar />
|
||||
</div>
|
||||
<div class="column is-10">
|
||||
{@render children()}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
.columns, .sidebar-column {
|
||||
height: 100%;
|
||||
}
|
||||
.sidebar-column {
|
||||
border-right: 1px solid lightgray;
|
||||
}
|
||||
</style>
|
|
@ -1,39 +0,0 @@
|
|||
<div class="">
|
||||
<h4 class="title is-4 is-inline">Libraries</h4>
|
||||
<div class="is-pulled-right is-inline-block">
|
||||
<div class="buttons">
|
||||
<div class="button is-small">
|
||||
Display
|
||||
</div>
|
||||
<div class="button is-small">
|
||||
Sort
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<hr class="my-2">
|
||||
<table class="table is-fullwidth">
|
||||
<thead>
|
||||
<tr>
|
||||
<td>Name </td>
|
||||
<td>Size </td>
|
||||
<td>Last Updated </td>
|
||||
<td>Owner </td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="px-4 py-4">
|
||||
<a href="/libraries/dbabbf7d-9b63-487b-9908-57c2df11b2d2">My Library</a>
|
||||
</td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td>Me</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<FileList />
|
||||
|
||||
<script lang="ts">
|
||||
import FileList from '$lib/components/filelist.svelte'
|
||||
</script>
|
|
@ -1,50 +0,0 @@
|
|||
<div class="">
|
||||
<h4 class="title is-4 is-inline">{ library.name } > Files</h4>
|
||||
<div class="is-pulled-right is-inline-block">
|
||||
<div class="buttons">
|
||||
<div class="button is-small">
|
||||
Display
|
||||
</div>
|
||||
<div class="button is-small">
|
||||
Sort
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<hr class="my-2">
|
||||
<table class="table is-fullwidth">
|
||||
<thead>
|
||||
<tr>
|
||||
<td>Name </td>
|
||||
<td>Size </td>
|
||||
<td>Last Updated </td>
|
||||
<td>Owner </td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="px-4 py-4">
|
||||
<a href="/libraries/dbabbf7d-9b63-487b-9908-57c2df11b2d2">My Library</a>
|
||||
</td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td>Me</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<FileList />
|
||||
|
||||
<script lang="ts">
|
||||
import FileList from '$lib/components/filelist.svelte'
|
||||
|
||||
let { data } = $props();
|
||||
|
||||
let library = {
|
||||
id: "",
|
||||
name: "Unknown"
|
||||
}
|
||||
|
||||
async function fetchLibrary() {
|
||||
const response = fetch(`/api/libraries/${data.id}`)
|
||||
}
|
||||
</script>
|
|
@ -1,11 +0,0 @@
|
|||
import { describe, test, expect } from 'vitest';
|
||||
import '@testing-library/jest-dom/vitest';
|
||||
import { render, screen } from '@testing-library/svelte';
|
||||
import Page from './+page.svelte';
|
||||
|
||||
describe('/+page.svelte', () => {
|
||||
test('should render h1', () => {
|
||||
render(Page);
|
||||
expect(screen.getByRole('heading', { level: 1 })).toBeInTheDocument();
|
||||
});
|
||||
});
|
Binary file not shown.
Before Width: | Height: | Size: 1.5 KiB |
|
@ -1,18 +0,0 @@
|
|||
import adapter from '@sveltejs/adapter-auto';
|
||||
import { vitePreprocess } from '@sveltejs/vite-plugin-svelte';
|
||||
|
||||
/** @type {import('@sveltejs/kit').Config} */
|
||||
const config = {
|
||||
// Consult https://svelte.dev/docs/kit/integrations
|
||||
// for more information about preprocessors
|
||||
preprocess: vitePreprocess(),
|
||||
|
||||
kit: {
|
||||
// adapter-auto only supports some environments, see https://svelte.dev/docs/kit/adapter-auto for a list.
|
||||
// If your environment is not supported, or you settled on a specific environment, switch out the adapter.
|
||||
// See https://svelte.dev/docs/kit/adapters for more information about adapters.
|
||||
adapter: adapter()
|
||||
}
|
||||
};
|
||||
|
||||
export default config;
|
|
@ -1,19 +0,0 @@
|
|||
{
|
||||
"extends": "./.svelte-kit/tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"allowJs": true,
|
||||
"checkJs": true,
|
||||
"esModuleInterop": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"resolveJsonModule": true,
|
||||
"skipLibCheck": true,
|
||||
"sourceMap": true,
|
||||
"strict": true,
|
||||
"moduleResolution": "bundler"
|
||||
}
|
||||
// Path aliases are handled by https://svelte.dev/docs/kit/configuration#alias
|
||||
// except $lib which is handled by https://svelte.dev/docs/kit/configuration#files
|
||||
//
|
||||
// If you want to overwrite includes/excludes, make sure to copy over the relevant includes/excludes
|
||||
// from the referenced tsconfig.json - TypeScript does not merge them in
|
||||
}
|
|
@ -1,54 +0,0 @@
|
|||
import { svelteTesting } from '@testing-library/svelte/vite';
|
||||
import tailwindcss from '@tailwindcss/vite';
|
||||
import { paraglideVitePlugin } from '@inlang/paraglide-js';
|
||||
import { sveltekit } from '@sveltejs/kit/vite';
|
||||
import { defineConfig } from 'vite';
|
||||
import Icons from 'unplugin-icons/vite'
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [
|
||||
tailwindcss(),
|
||||
sveltekit(),
|
||||
paraglideVitePlugin({
|
||||
project: './project.inlang',
|
||||
outdir: './src/lib/paraglide'
|
||||
} ),
|
||||
Icons( {
|
||||
compiler: 'svelte',
|
||||
})
|
||||
],
|
||||
server: {
|
||||
proxy: {
|
||||
'^/api': {
|
||||
target: "http://localhost:8080",
|
||||
changeOrigin: true,
|
||||
ws: true
|
||||
}
|
||||
}
|
||||
},
|
||||
test: {
|
||||
workspace: [
|
||||
{
|
||||
extends: './vite.config.ts',
|
||||
plugins: [svelteTesting()],
|
||||
test: {
|
||||
name: 'client',
|
||||
environment: 'jsdom',
|
||||
clearMocks: true,
|
||||
include: ['src/**/*.svelte.{test,spec}.{js,ts}'],
|
||||
exclude: ['src/lib/server/**'],
|
||||
setupFiles: ['./vitest-setup-client.ts']
|
||||
}
|
||||
},
|
||||
{
|
||||
extends: './vite.config.ts',
|
||||
test: {
|
||||
name: 'server',
|
||||
environment: 'node',
|
||||
include: ['src/**/*.{test,spec}.{js,ts}'],
|
||||
exclude: ['src/**/*.svelte.{test,spec}.{js,ts}']
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
});
|
|
@ -1,18 +0,0 @@
|
|||
import '@testing-library/jest-dom/vitest';
|
||||
import { vi } from 'vitest';
|
||||
|
||||
// required for svelte5 + jsdom as jsdom does not support matchMedia
|
||||
Object.defineProperty(window, 'matchMedia', {
|
||||
writable: true,
|
||||
enumerable: true,
|
||||
value: vi.fn().mockImplementation(query => ({
|
||||
matches: false,
|
||||
media: query,
|
||||
onchange: null,
|
||||
addEventListener: vi.fn(),
|
||||
removeEventListener: vi.fn(),
|
||||
dispatchEvent: vi.fn(),
|
||||
})),
|
||||
})
|
||||
|
||||
// add more mocks here if you need them
|
2660
web/yarn.lock
2660
web/yarn.lock
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue