mirror of
https://github.com/spacedriveapp/spacedrive.git
synced 2026-02-25 03:08:27 -05:00
Merge branch 'main' into jamie-unsorted-changes
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
{
|
||||
"plugins": ["@trivago/prettier-plugin-sort-imports"],
|
||||
"useTabs": true,
|
||||
"printWidth": 100,
|
||||
"singleQuote": true,
|
||||
"trailingComma": "none",
|
||||
"jsxBracketSameLine": false,
|
||||
"bracketSameLine": false,
|
||||
"semi": true,
|
||||
"quoteProps": "consistent",
|
||||
"importOrder": [
|
||||
|
||||
4
.vscode/settings.json
vendored
4
.vscode/settings.json
vendored
@@ -22,7 +22,5 @@
|
||||
"editor.defaultFormatter": "matklad.rust-analyzer"
|
||||
},
|
||||
"rust-analyzer.procMacro.enable": true,
|
||||
"rust-analyzer.diagnostics.experimental.enable": false,
|
||||
"rust-analyzer.inlayHints.parameterHints.enable": false,
|
||||
"rust-analyzer.inlayHints.typeHints.enable": false
|
||||
"rust-analyzer.diagnostics.experimental.enable": false
|
||||
}
|
||||
|
||||
@@ -1,17 +1,18 @@
|
||||
import React, { useEffect, useState } from 'react';
|
||||
import { createRoot } from 'react-dom/client';
|
||||
// import Spacedrive interface
|
||||
import SpacedriveInterface, { Platform } from '@sd/interface';
|
||||
import { listen, Event } from '@tauri-apps/api/event';
|
||||
// import types from Spacedrive core (TODO: re-export from client would be cleaner)
|
||||
import { ClientCommand, ClientQuery, CoreEvent } from '@sd/core';
|
||||
// import Spacedrive JS client
|
||||
import { BaseTransport } from '@sd/client';
|
||||
// import types from Spacedrive core (TODO: re-export from client would be cleaner)
|
||||
import { ClientCommand, ClientQuery, CoreEvent } from '@sd/core';
|
||||
// import Spacedrive interface
|
||||
import SpacedriveInterface, { Platform } from '@sd/interface';
|
||||
// import tauri apis
|
||||
import { dialog, invoke, os, shell } from '@tauri-apps/api';
|
||||
import { Event, listen } from '@tauri-apps/api/event';
|
||||
import { convertFileSrc } from '@tauri-apps/api/tauri';
|
||||
import '@sd/ui/style';
|
||||
import { appWindow } from '@tauri-apps/api/window';
|
||||
import React, { useEffect, useState } from 'react';
|
||||
import { createRoot } from 'react-dom/client';
|
||||
|
||||
import '@sd/ui/style';
|
||||
|
||||
// bind state to core via Tauri
|
||||
class Transport extends BaseTransport {
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
import { defineConfig } from 'vite';
|
||||
import react from '@vitejs/plugin-react';
|
||||
import { name, version } from './package.json';
|
||||
import { defineConfig } from 'vite';
|
||||
import svg from 'vite-plugin-svgr';
|
||||
|
||||
import { name, version } from './package.json';
|
||||
|
||||
// https://vitejs.dev/config/
|
||||
export default defineConfig({
|
||||
server: {
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
import React, { useEffect } from 'react';
|
||||
|
||||
import SpacedriveInterface from '@sd/interface';
|
||||
import { ClientCommand, ClientQuery, CoreEvent } from '@sd/core';
|
||||
import { BaseTransport } from '@sd/client';
|
||||
import { ClientCommand, ClientQuery, CoreEvent } from '@sd/core';
|
||||
import SpacedriveInterface from '@sd/interface';
|
||||
import React, { useEffect } from 'react';
|
||||
|
||||
const websocket = new WebSocket(import.meta.env.VITE_SDSERVER_BASE_URL || 'ws://localhost:8080/ws');
|
||||
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
import React from 'react';
|
||||
import ReactDOM from 'react-dom/client';
|
||||
import App from './App';
|
||||
|
||||
import '@sd/ui/style';
|
||||
|
||||
import App from './App';
|
||||
|
||||
const root = ReactDOM.createRoot(document.getElementById('root') as HTMLElement);
|
||||
root.render(
|
||||
<React.StrictMode>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { defineConfig } from 'vite';
|
||||
import react from '@vitejs/plugin-react';
|
||||
import { defineConfig } from 'vite';
|
||||
import svg from 'vite-plugin-svgr';
|
||||
import tsconfigPaths from 'vite-plugin-tsconfig-paths';
|
||||
|
||||
|
||||
@@ -67,10 +67,7 @@ impl LibraryNode {
|
||||
.create(
|
||||
node::pub_id::set(config.node_pub_id.clone()),
|
||||
node::name::set(hostname.clone()),
|
||||
vec![
|
||||
node::platform::set(platform as i32),
|
||||
node::online::set(Some(true)),
|
||||
],
|
||||
vec![node::platform::set(platform as i32)],
|
||||
)
|
||||
.exec()
|
||||
.await?
|
||||
|
||||
@@ -1,13 +1,9 @@
|
||||
## Database backup
|
||||
|
||||
|
||||
|
||||
## Database migrations
|
||||
|
||||
Currently migrations are applied on app launch with no visual feedback, backup or error handling.
|
||||
|
||||
It doesn't appear that migrations are applied succesfully
|
||||
It doesn't appear that migrations are applied succesfully
|
||||
|
||||
|
||||
|
||||
##
|
||||
##
|
||||
|
||||
@@ -81,7 +81,7 @@ This allows us to entirely avoid the need to synchronize time between clients, a
|
||||
|
||||
Sync happens in the following order:
|
||||
|
||||
Owned data → Bulk shared data → Shared data
|
||||
Owned data → Bulk shared data → Shared data
|
||||
|
||||
### Types of CRDT:
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
"db:migrate": "pnpm core prisma migrate dev",
|
||||
"db:gen": "pnpm core prisma generate",
|
||||
"lint": "turbo run lint",
|
||||
"format": "prettier --write \"**/*.{ts,tsx,md}\"",
|
||||
"format": "prettier --write \"**/*.{ts,tsx,html,scss,json,yml,md}\"",
|
||||
"desktop": "pnpm --filter @sd/desktop --",
|
||||
"mobile": "pnpm --filter @sd/mobile -- ",
|
||||
"web": "pnpm --filter @sd/web -- ",
|
||||
@@ -23,6 +23,7 @@
|
||||
"typecheck": "pnpm -r exec tsc"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@trivago/prettier-plugin-sort-imports": "^3.2.0",
|
||||
"prettier": "^2.6.2",
|
||||
"turbo": "^1.2.4"
|
||||
},
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import { ClientCommand, ClientQuery, CoreResponse } from '@sd/core';
|
||||
import { EventEmitter } from 'eventemitter3';
|
||||
import {
|
||||
useMutation,
|
||||
useQuery,
|
||||
UseMutationOptions,
|
||||
UseQueryOptions,
|
||||
UseQueryResult,
|
||||
UseMutationOptions
|
||||
useMutation,
|
||||
useQuery
|
||||
} from 'react-query';
|
||||
|
||||
// global var to store the transport TODO: not global :D
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import { useQuery } from 'react-query';
|
||||
import { useState } from 'react';
|
||||
import { useFileExplorerState } from './state';
|
||||
import { useQuery } from 'react-query';
|
||||
|
||||
import { useBridgeCommand, useBridgeQuery } from '../bridge';
|
||||
import { useFileExplorerState } from './state';
|
||||
|
||||
// this hook initializes the explorer state and queries the core
|
||||
export function useFileExplorer(initialPath = '/', initialLocation: number | null = null) {
|
||||
|
||||
@@ -54,7 +54,6 @@
|
||||
"zustand": "^3.7.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@trivago/prettier-plugin-sort-imports": "^3.2.0",
|
||||
"@types/babel-core": "^6.25.7",
|
||||
"@types/byte-size": "^8.1.0",
|
||||
"@types/lodash": "^4.14.182",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import React from 'react';
|
||||
import clsx from 'clsx';
|
||||
import React from 'react';
|
||||
|
||||
const sizes = {
|
||||
default: 'py-1 px-3 text-md font-medium',
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import React from 'react';
|
||||
import { Menu } from '@headlessui/react';
|
||||
import { ChevronDownIcon } from '@heroicons/react/solid';
|
||||
import clsx from 'clsx';
|
||||
import React from 'react';
|
||||
|
||||
import { Button } from './Button';
|
||||
|
||||
type Section = {
|
||||
|
||||
BIN
pnpm-lock.yaml
generated
BIN
pnpm-lock.yaml
generated
Binary file not shown.
Reference in New Issue
Block a user