Skip to content

Commit

Permalink
Merge pull request #111 from Concordium/company-gui
Browse files Browse the repository at this point in the history
Company ID GUI tool
  • Loading branch information
abizjak authored Nov 22, 2023
2 parents 97a8433 + 16ee804 commit 75df48b
Show file tree
Hide file tree
Showing 64 changed files with 16,087 additions and 0 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/company-id.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: 'Publish Company ID'
on:
# push:
# branches:
# - release

workflow_dispatch: # allows manual trigger

jobs:
publish-tauri:
permissions:
contents: write
strategy:
fail-fast: false
matrix:
platform: [macos-latest, ubuntu-20.04, windows-latest]

runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: setup node
uses: actions/setup-node@v4
with:
node-version: 20
- name: install Rust stable
uses: dtolnay/rust-toolchain@stable
- name: install dependencies (ubuntu only)
if: matrix.platform == 'ubuntu-20.04'
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf
- name: install frontend dependencies
working-directory: ./company-id-gui
run: yarn install # change this to npm or pnpm depending on which one you use
- uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
projectPath: 'company-id-gui'
tagName: company-id-gui/v__VERSION__ # the action automatically replaces \_\_VERSION\_\_ with the app version
releaseName: 'Company ID GUI v__VERSION__'
releaseBody: 'See the assets to download this version and install.'
releaseDraft: true
prerelease: false
5 changes: 5 additions & 0 deletions company-id-gui/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.eslintrc.cjs
.yarn/
node_modules/
dist/
src-tauri/
40 changes: 40 additions & 0 deletions company-id-gui/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
module.exports = {
root: true,
env: { browser: true, es2020: true },
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended-type-checked',
'plugin:@typescript-eslint/stylistic-type-checked',
'plugin:react-hooks/recommended',
'plugin:react/recommended',
'plugin:react/jsx-runtime',
'plugin:jsx-a11y/recommended',
'eslint-config-prettier',
],
parser: '@typescript-eslint/parser',
plugins: ['react', 'react-refresh'],
rules: {
'react-refresh/only-export-components': ['warn', { allowConstantExport: true }],
'@typescript-eslint/unbound-method': 0,
'@typescript-eslint/no-misused-promises': [
'error',
{
checksVoidReturn: {
attributes: false,
},
},
],
},
parserOptions: {
ecmaVersion: 'latest',
ecmaFeatures: { jsx: true },
sourceType: 'module',
project: ['./tsconfig.json', './tsconfig.node.json'],
tsconfigRootDir: __dirname,
},
settings: {
react: {
version: 'detect',
},
},
};
32 changes: 32 additions & 0 deletions company-id-gui/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions
node_modules

dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
4 changes: 4 additions & 0 deletions company-id-gui/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.yarn/
node_modules/
dist/
src-tauri/
8 changes: 8 additions & 0 deletions company-id-gui/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"trailingComma": "all",
"semi": true,
"singleQuote": true,
"printWidth": 120,
"bracketSpacing": true,
"tabWidth": 4
}
874 changes: 874 additions & 0 deletions company-id-gui/.yarn/releases/yarn-3.6.3.cjs

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions company-id-gui/.yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
yarnPath: .yarn/releases/yarn-3.6.3.cjs
nodeLinker: node-modules
29 changes: 29 additions & 0 deletions company-id-gui/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Company ID GUI Tool

## Building and Running

Install `tauri-cli`:

```bash
cargo install tauri-cli
```

To build or run, first install the dependencies:

```bash
yarn install
```

Then, to build:

```bash
cargo tauri build
```

To build a signed version for windows the `src-tauri/tauri.conf.json` has to be updated with the correct thumbprint following the last part of the procedure outline in the [documentation](https://tauri.app/v1/guides/distribution/sign-windows#c-prepare-variables).

Or, to run:

```bash
cargo tauri dev
```
14 changes: 14 additions & 0 deletions company-id-gui/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="/ccd-logo.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Tauri + React + TS</title>
</head>

<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>
44 changes: 44 additions & 0 deletions company-id-gui/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"name": "company-id-gui",
"private": true,
"version": "1.0.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
"lint-fix": "yarn lint --fix",
"fmt": "prettier -w .",
"preview": "vite preview"
},
"dependencies": {
"@fontsource/ibm-plex-sans": "^5.0.17",
"@tauri-apps/api": "^1.5.1",
"bootstrap": "^5.3.2",
"bootstrap-icons": "^1.11.1",
"react": "^18.2.0",
"react-bootstrap": "^2.8.0",
"react-dom": "^18.2.0"
},
"devDependencies": {
"@tauri-apps/cli": "^1.5.0",
"@types/react": "^18.2.15",
"@types/react-dom": "^18.2.7",
"@typescript-eslint/eslint-plugin": "^6.0.0",
"@typescript-eslint/parser": "^6.0.0",
"@vitejs/plugin-react-swc": "^3.3.2",
"eslint": "^8.45.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-jsx-a11y": "^6.7.1",
"eslint-plugin-react": "^7.33.2",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-refresh": "^0.4.3",
"prettier": "^3.0.3",
"sass": "^1.67.0",
"typescript": "^5.0.2",
"vite": "^4.4.5",
"vite-plugin-top-level-await": "^1.3.1",
"vite-plugin-wasm": "^3.2.2"
},
"packageManager": "[email protected]"
}
3 changes: 3 additions & 0 deletions company-id-gui/public/ccd-logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
874 changes: 874 additions & 0 deletions company-id-gui/releases/yarn-3.6.3.cjs

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions company-id-gui/src-tauri/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Generated by Cargo
# will have compiled files and executables
/target/

Loading

0 comments on commit 75df48b

Please sign in to comment.