Skip to content

Commit

Permalink
Merge branch 'main' into release
Browse files Browse the repository at this point in the history
  • Loading branch information
beckthetech committed Jan 8, 2025
2 parents b2b1026 + e5ab896 commit 8a43749
Show file tree
Hide file tree
Showing 12 changed files with 166 additions and 304 deletions.
164 changes: 89 additions & 75 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,75 +1,89 @@
# Nuxt Minimal Starter

Look at the [Nuxt documentation](https://nuxt.com/docs/getting-started/introduction) to learn more.

## Setup

Make sure to install dependencies:

```bash
# npm
npm install

# pnpm
pnpm install

# yarn
yarn install

# bun
bun install
```

## Development Server

Start the development server on `http://localhost:3000`:

```bash
# npm
npm run dev

# pnpm
pnpm dev

# yarn
yarn dev

# bun
bun run dev
```

## Production

Build the application for production:

```bash
# npm
npm run build

# pnpm
pnpm build

# yarn
yarn build

# bun
bun run build
```

Locally preview production build:

```bash
# npm
npm run preview

# pnpm
pnpm preview

# yarn
yarn preview

# bun
bun run preview
```

Check out the [deployment documentation](https://nuxt.com/docs/getting-started/deployment) for more information.
# Project Dave

Project Dave is a web application built with Rust, Tauri, Vue.js, and Nuxt.js that demonstrates the core functionality of the Autonomi network. It provides a user-friendly interface for interacting with the Autonomi network to upload data, and view and download uploaded data.

## Getting Started

### Prerequisites

- Node.js 16.x or later
- npm package manager
- Rust 1.70.0 or later
- rustc (Rust compiler)
- cargo (Rust package manager)

### Installation

1. Clone the repository: `git clone https://github.com/maidsafe/project-dave.git`

2. Navigate into the top level of the repo: `cd project-dave`

3. Install Node.js dependencies: `npm install`

## Development Server

Start the application for development `npm run tauri dev`

## Contributing

We welcome contributions! Here's how you can help:

1. Fork the repository
2. Create your feature branch (git checkout -b feat/amazing-feature)
3. Commit your changes (git commit -m 'adds amazing feature'). <br>Please ensure that your commit messages clearly describe the changes you have made and use the [Conventional Commits](https://www.conventionalcommits.org/) specification.
4. Push to the branch (git push origin feat/amazing-feature)
5. Open a Pull Request to the `development` branch instead of the `main` branch

You can also visit the [Autonomi Website](https://autonomi.com/) if you would like to learn more and please join our
online community through our [Discord server](https://discord.com/invite/autonomi) or [forum](https://forum.autonomi.community/).

## Development Guidelines

1. Follow the existing code style and conventions
2. Write meaningful commit messages
3. Add tests for new features
4. Update documentation as needed

## Project Structure

```
project-dave
├─ README.md
├─ app.vue
├─ assets
│ ├─ abi
│ └─ css
├─ components
│ ├─ Common
│ ├─ Icon
├─ config
├─ lib
├─ nuxt.config.ts
├─ package-lock.json
├─ package.json
├─ pages
├─ plugins
├─ public
├─ src-tauri
│ ├─ Cargo.lock
│ ├─ Cargo.toml
│ ├─ capabilities
│ ├─ gen
│ │ └─ schemas
│ ├─ icons
│ │ ├─ android
│ │ └─ ios
│ ├─ src
│ │ ├─ ant
│ ├─ target
│ └─ tauri.conf.json
├─ stores
├─ types
├─ utils
└─ vite.config.ts
```

## License

This repository is licensed under the General Public License (GPL), version
3 ([LICENSE](http://www.gnu.org/licenses/gpl-3.0.en.html)).
4 changes: 2 additions & 2 deletions app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { createAppKit } from '@reown/appkit/vue';
import { networks, projectId, wagmiAdapter } from '~/config';
import { useFileStore } from '~/stores/files';
import { storeToRefs } from 'pinia';
import { updater } from './src/lib/updater';
import { updater } from './lib/updater';
// Initialize AppKit
createAppKit({
Expand Down Expand Up @@ -135,7 +135,7 @@ onMounted(async () => {

<NuxtLink :class="`${classesLinks}`" to="/settings">
<IconSettings class="w-6 h-6" />
Settings
Support
</NuxtLink>
</div>
</div>
Expand Down
6 changes: 5 additions & 1 deletion components/DialogConnectWallet.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const props = defineProps<{
const emit = defineEmits(["close-login"]);
const toast = useToast();
const walletStore = useWalletStore();
const { pendingConnectWallet, wallet } = storeToRefs(walletStore);
const { pendingConnectWallet, wallet, callbackConnectWallet } = storeToRefs(walletStore);
const { visible } = props;
Expand All @@ -33,6 +33,10 @@ const handleLogIn = async () => {
detail: "TEST: Logged in successfully",
life: 3000,
});
if (callbackConnectWallet.value) {
callbackConnectWallet.value();
}
} else {
throw new Error("Failed to log in");
}
Expand Down
68 changes: 25 additions & 43 deletions components/Header.vue
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,16 @@ const handleClickWallet = () => {
}
};
const handleClickUpload = ()=> {
if (wallet.value.isConnected) {
navigateTo('/upload');
} else {
walletStore.showConnectWallet(() => {
navigateTo('/upload');
});
}
};
const toggleTokenDropdown = () => {
if (!wallet.value.isConnected) {
return walletStore.showConnectWallet();
Expand Down Expand Up @@ -199,17 +209,25 @@ onBeforeUnmount(() => {
<!-- MOBILE SETTINGS / DETAILS -->
<div class="ml-auto flex gap-2 items-center lg:hidden">
<NuxtLink
to="/upload"
to="/"
class="w-10 h-10 bg-autonomi-gray-200 flex items-center justify-center rounded-full cursor-pointer"
v-tooltip.bottom="'Files'"
>
<IconFiles class="w-5 h-5" />
</NuxtLink>
<div
@click="handleClickUpload"
class="w-10 h-10 bg-autonomi-red-300 flex items-center justify-center rounded-full cursor-pointer"
v-tooltip.bottom="'Upload'"
>
<i class="pi pi-plus-circle text-white" />
</NuxtLink>
</div>

<!-- TOKEN BALANCE DROPDOWN -->
<div ref="refTokenDropdown">
<button
class="w-10 h-10 bg-autonomi-blue-800 flex items-center justify-center rounded-full cursor-pointer"
@click="toggleTokenDropdown"
@click="handleClickWallet"
>
<i class="pi pi-wallet text-white" />
</button>
Expand Down Expand Up @@ -271,47 +289,11 @@ onBeforeUnmount(() => {
class="bg-autonomi-gray-200 dark:bg-autonomi-blue-800 absolute right-0 w-full max-w-[400px] rounded-b-3xl overflow-hidden transition-all duration-500"
:class="{
'h-0': !isHamburgerMenuOpen,
'h-[300px]': isHamburgerMenuOpen,
'h-[100px]': isHamburgerMenuOpen,
'top-[150px]': wallet.isConnected,
'top-[68px]': !wallet.isConnected,
}"
>
<div
class="h-[100px] flex items-center justify-between px-10 border-t-2 border-t-white hover:bg-white transition-all duration-300"
>
<div>
<div class="text-2xl font-semibold text-autonomi-header-text">
Wallet
</div>
<div class="text-xs font-semibold text-autonomi-gray-500">
Balance 436.06
</div>
</div>
<div>
<IconWallet class="w-12 h-12" />
</div>
</div>
<div
@click="
() => {
toggleHamburgerMenu();
navigateTo('/');
}
"
class="h-[100px] flex items-center justify-between px-10 border-t-2 border-t-white hover:bg-white transition-all duration-300 cursor-pointer"
>
<div>
<div class="text-2xl font-semibold text-autonomi-header-text">
Files
</div>
<div class="text-xs font-semibold text-autonomi-gray-500">
Current 369GB
</div>
</div>
<div>
<IconFiles class="w-12 h-12" />
</div>
</div>
<div
@click="
() => {
Expand All @@ -323,11 +305,11 @@ onBeforeUnmount(() => {
>
<div>
<div class="text-2xl font-semibold text-autonomi-header-text">
Settings
Support
</div>
<div class="text-xs font-semibold text-autonomi-gray-500">
<!-- <div class="text-xs font-semibold text-autonomi-gray-500">
Current: Default
</div>
</div> -->
</div>
<div>
<IconSettings class="w-12 h-12" />
Expand Down
14 changes: 7 additions & 7 deletions config/index.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import {WagmiAdapter} from '@reown/appkit-adapter-wagmi'
import {arbitrumSepolia, type AppKitNetwork} from '@reown/appkit/networks'
import { WagmiAdapter } from '@reown/appkit-adapter-wagmi';
import { arbitrumSepolia, type AppKitNetwork } from '@reown/appkit/networks';

export const projectId = "c57e0bb001a4dc96b54b9ced656a3cb8"
export const projectId = 'c57e0bb001a4dc96b54b9ced656a3cb8';

export const networks: [AppKitNetwork, ...AppKitNetwork[]] = [arbitrumSepolia]
export const networks: [AppKitNetwork, ...AppKitNetwork[]] = [arbitrumSepolia];

export const wagmiAdapter = new WagmiAdapter({
networks,
projectId
})
networks,
projectId,
});
Loading

0 comments on commit 8a43749

Please sign in to comment.