Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add basic rate conversion #3

Merged
merged 35 commits into from
Sep 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
21fb372
Add basic rate conversion
virtualdesigner Sep 2, 2023
ca44978
Make search independent of the text case,
virtualdesigner Sep 2, 2023
47b24c0
Get rid of duplicates between fiat and crypto rates
virtualdesigner Sep 2, 2023
5763e84
Rectify calculations,
virtualdesigner Sep 2, 2023
42aead9
Make the close button bolder,
virtualdesigner Sep 3, 2023
afa47ff
Auto-detect current tab
virtualdesigner Sep 3, 2023
3a61d4b
Limit decimal precision to 8 digits
virtualdesigner Sep 3, 2023
ee5b176
Reset existing amount to zero if deselected,
virtualdesigner Sep 3, 2023
9f3a33e
Remove unnecessary file
virtualdesigner Sep 3, 2023
3930d03
Remove unused style
virtualdesigner Sep 3, 2023
df2f329
Add installation and build instructions
virtualdesigner Sep 4, 2023
955a450
Change identifier
virtualdesigner Sep 4, 2023
7050723
Add more details on the readme for installing the prerequisites
virtualdesigner Sep 4, 2023
e9c45cd
Add github workflow scripts for build and release
virtualdesigner Sep 4, 2023
dd37796
Limit build targets to "msi", "app" & "dmg"
virtualdesigner Sep 4, 2023
4797ed0
Remove uploading .deb & binary files
virtualdesigner Sep 4, 2023
67f23c4
Add missing library to install during the build
virtualdesigner Sep 4, 2023
d0c48b7
Add missing dependency to install
virtualdesigner Sep 4, 2023
c8c9f19
Move currency total calculation and exchange calculation to Rust
virtualdesigner Sep 4, 2023
4f8a297
Downgrade to a stable version of Tauri,
virtualdesigner Sep 9, 2023
90d09ac
Change workflow build dependency
virtualdesigner Sep 9, 2023
e2888b4
Add type for children node
virtualdesigner Sep 11, 2023
923eadf
Fetch rates from Rust,
virtualdesigner Sep 14, 2023
8e6967c
Remove package in build workflow
virtualdesigner Sep 14, 2023
cedc566
Add missing package in build workflow
virtualdesigner Sep 14, 2023
3dbd7f9
Change config for build workflow
virtualdesigner Sep 14, 2023
0c6f0bc
Fix image bundle name
virtualdesigner Sep 15, 2023
45dfc1e
Change path for artifact
virtualdesigner Sep 15, 2023
1381c13
Use the rates data provided by Rust code
virtualdesigner Sep 16, 2023
6b2fa5d
Replace default icons
virtualdesigner Sep 18, 2023
ecf3fb4
Add URL strings to the top of the file
virtualdesigner Sep 18, 2023
f97821f
Use directories crate to store the rates
virtualdesigner Sep 23, 2023
ef96fd8
Bump actions/checkout package & use newer toolchain to install Rust
virtualdesigner Sep 23, 2023
a1db788
Refactor data fetch and storage
virtualdesigner Sep 24, 2023
0510b6a
Add test cases
virtualdesigner Sep 24, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Build

env:
CARGO_TERM_COLOR: always

on: [push]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy

- name: Setup Node.js
uses: actions/setup-node@v3.2.0
with:
node-version: '16.x'

- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev \
webkit2gtk-4.0 javascriptcoregtk-4.1 libappindicator3-dev \
librsvg2-dev patchelf libdbus-1-dev \
pkg-config \

- name: Fetch Node.js Dependencies
run: yarn

- name: Build Release version
run: yarn tauri build

- name: Upload AppImage
uses: actions/upload-artifact@v3.1.0
with:
name: ark-rate-desktop.AppImage
path: ./src-tauri/target/release/bundle/appimage/ark-rate-desktop_*_amd64.AppImage
45 changes: 45 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Release the app

on:
push:
tags:
- '*'

jobs:
release:
runs-on: ubuntu-latest
environment: Development
steps:
- uses: actions/checkout@v3

- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
components: rustfmt, clippy

- name: Setup Node.js
uses: actions/setup-node@v3.2.0
with:
node-version: '16.x'

- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev \
webkit2gtk-4.0 libappindicator3-dev \
librsvg2-dev patchelf libdbus-1-dev \
pkg-config

- name: Fetch Node.js dependencies
run: yarn

- name: Build Release version
run: yarn tauri build

- name: Release AppImage
uses: ncipollo/release-action@v1
with:
artifacts: "./target/release/bundle/appimage/*.AppImage"
token: ${{ secrets.GITHUB_TOKEN }}
24 changes: 24 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
3 changes: 3 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"recommendations": ["tauri-apps.tauri-vscode", "rust-lang.rust-analyzer"]
}
35 changes: 35 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Ark-Rate Desktop App

Get started with currency rate conversions from your desktop.

## Recommended IDE Setup

- [VS Code](https://code.visualstudio.com/) + [Tauri](https://marketplace.visualstudio.com/items?itemName=tauri-apps.tauri-vscode) + [rust-analyzer](https://marketplace.visualstudio.com/items?itemName=rust-lang.rust-analyzer)

## Getting Started

All the prerequisites mentioned below are taken from the [official documentation](https://tauri.app/v1/guides/getting-started/prerequisites/).
### Prerequisites for Windows
- Install [Microsoft Visual Studio C++ Build Tools](https://tauri.app/v1/guides/getting-started/prerequisites/#1-microsoft-visual-studio-c-build-tools),
- Install [WebView2](https://tauri.app/v1/guides/getting-started/prerequisites/#2-webview2),
- Install [Rust](https://www.rust-lang.org/tools/install)

### Prerequisites for Linux
- Make sure to install all the Linux-specific dependencies listed [here](https://tauri.app/v1/guides/getting-started/prerequisites/#1-system-dependencies),
- Install [Rust](https://tauri.app/v1/guides/getting-started/prerequisites/#2-rust-1)

### Prerequisites for MacOS
- Install [CLang and MacOS-specific dependencies](https://tauri.app/v1/guides/getting-started/prerequisites/#1-clang-and-macos-development-dependencies),
- Install [Rust](https://tauri.app/v1/guides/getting-started/prerequisites/#2-rust)

## To Run and build the app

For OS-specific instructions, follow the steps provided [here](https://tauri.app/v1/guides/building/).

You can use any package managers such as `yarn`, `npm`, `pnpm`, etc. But the below steps will use `yarn` for demonstration purposes.

1. Install all the packages: `yarn`

2. Run the Tauri app in development mode: `yarn tauri dev`

3. To build the app, run: `yarn tauri build`. <br>
14 changes: 14 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Ark Rate</title>
</head>

<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>
27 changes: 27 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"name": "ark-rate-desktop",
"private": true,
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
"preview": "vite preview",
"tauri": "tauri"
},
"dependencies": {
"@tauri-apps/api": "^1.4.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-router-dom": "^6.15.0",
"styled-components": "^6.0.7"
},
"devDependencies": {
"@tauri-apps/cli": "^1.4.0",
"@types/react": "^18.2.15",
"@types/react-dom": "^18.2.7",
"@vitejs/plugin-react": "^4.0.3",
"typescript": "^5.0.2",
"vite": "^4.4.4"
}
}
Loading