Skip to content

Commit

Permalink
Merge branch 'master' into err_circles
Browse files Browse the repository at this point in the history
  • Loading branch information
Raduc4 committed Sep 18, 2023
2 parents fb497fd + c6cfca4 commit 0c3f2cc
Show file tree
Hide file tree
Showing 8 changed files with 41 additions and 5,675 deletions.
5,659 changes: 0 additions & 5,659 deletions Cargo.lock

This file was deleted.

4 changes: 0 additions & 4 deletions Cargo.toml

This file was deleted.

1 change: 0 additions & 1 deletion components/ui/AddServer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ export default function AddServerModal({
username,
proposedPassword,
});
console.log(data);
onClose(false);
}}
>
Expand Down
12 changes: 12 additions & 0 deletions framework/common/c2s/useGetAccountInfo_c2s.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { MutationHook } from '@common/types/hooks';
import { useHook, useMutationHook } from '@common/utils/useHook';

export type UseGetAccountinfo<H extends MutationHook = MutationHook<any>> =
ReturnType<H['useHook']>;

const useRegister_c2s: UseGetAccountinfo = () => {
const hook = useHook((hooks) => hooks.c2s.useGetAccountInfo);
return useMutationHook({ ...hook })();
};

export default useRegister_c2s;
7 changes: 0 additions & 7 deletions pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,7 @@ function CustomApp({
const key = Object.keys(data).at(0)!;
const payload = data[key];

console.log('Stream_packet', payload);
const req_id = payload.request_id;
console.log('ReqID stream', req_id);
handlePacket(req_id, payload);
}
);
Expand All @@ -66,19 +64,14 @@ function CustomApp({
}, []);

const handlePacket = (req_id: string, payload: { [key: string]: any }) => {
console.log('ReqID', req_id);
console.log('Payload', payload);
const { context: map } = store.getState();
console.log('Map', map);
const context = map.context[req_id];
console.log('Context', context);

if (context) {
switch (context) {
case 'GetSession':
const activeSessions = payload.sessions as Array<number | string>;
store.dispatch(setSessions(activeSessions));
console.log('Active sessions', activeSessions);
break;
case 'Register':
const x = 1;
Expand Down
27 changes: 27 additions & 0 deletions pages/server/discussions/[server].tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import { Layout } from '@components/common/Layout';
import React from 'react';
import Chat from '@components/chat';
import { useRouter } from 'next/router';
import { useAppSelector } from 'framework/redux/store';

export default function SpecificServer({ connErr }: { connErr: string }) {
const router = useRouter();
const serverCid = router.query.server;
// console.log(router.asPath);

// const current_used_session_server = useAppSelector(
// (state) => state.context.sessions.current_used_session_server
// );

return (
<>
<div className="flex flex-col justify-between">
<main className="pt-10 h-full w-full flex flex-col justify-between text-white">
<Chat />
</main>
</div>
</>
);
}

SpecificServer.Layout = Layout;
5 changes: 2 additions & 3 deletions pages/storage.tsx → pages/server/storage/[serverCid].tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import { Layout } from '@components/common/Layout';
import { useAppSelector } from 'framework/redux/store';
import React from 'react';
import { useSelector } from 'react-redux';
import { State } from 'framework/redux/store';

export default function Storage() {
const { uuid } = useSelector((state: State) => state.uuid);
const { uuid } = useAppSelector((state) => state.uuid);
// const upload = (e: any) => {
// const arr: string[] = [];
// Array.from(e.target.files).forEach((file: any) => {
Expand Down
1 change: 0 additions & 1 deletion src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ tokio-util = { version = "0.7.8", default-features = false }
citadel_logging = { version = "0.5.0", default-features = false }
tauri-plugin-log = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v1" }
log = "^0.4"

[features]
# this feature is used for production builds or when `devPath` points to the filesystem
# DO NOT REMOVE!!
Expand Down

0 comments on commit 0c3f2cc

Please sign in to comment.