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

Company ID GUI tool #111

Merged
merged 29 commits into from
Nov 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
ad1f266
Scaffold Tauri project
lassemoldrup Oct 25, 2023
1ecf0dd
Re-scaffold project
lassemoldrup Oct 31, 2023
ca2be20
Create UI for RequestIdentity flow
lassemoldrup Nov 1, 2023
5095061
Implement generate request flow
lassemoldrup Nov 1, 2023
9b64678
Company GUI: Prepare for account creation
lassemoldrup Nov 7, 2023
b3385b8
Mostly implement create account flow
lassemoldrup Nov 8, 2023
29bfdad
Add created account to list.
lassemoldrup Nov 8, 2023
719fb04
Scaffold identity recovery
lassemoldrup Nov 8, 2023
160db96
Use consistent expiry time to make sure proofs are valid.
abizjak Nov 9, 2023
5b52f42
Make the code less error prone.
abizjak Nov 9, 2023
10ccb98
Allow saving credentials for all accounts
lassemoldrup Nov 14, 2023
b7e3717
Identity recovery UI and refactor
lassemoldrup Nov 14, 2023
776426d
Implement identity recovery
lassemoldrup Nov 15, 2023
6ecc348
Display identity attributes
lassemoldrup Nov 15, 2023
5461285
Address some comments
lassemoldrup Nov 15, 2023
e19b52f
Add a README
lassemoldrup Nov 15, 2023
209e127
Update icons, minor tweaks.
abizjak Nov 19, 2023
4f2af41
Cleanup.
abizjak Nov 19, 2023
acfbc13
Fix typo.
abizjak Nov 19, 2023
caad55e
Add build and release job.
abizjak Nov 19, 2023
a79e90c
Temporary build.
abizjak Nov 19, 2023
19d6c3b
Checkout submodules.
abizjak Nov 19, 2023
6724c29
Merge remote-tracking branch 'origin/main' into company-gui
abizjak Nov 20, 2023
0b4a5dd
Add config for signed builds and documentation
Thahara Nov 20, 2023
62ddb90
Return structured errors
lassemoldrup Nov 21, 2023
1faa0b2
PR feedback
lassemoldrup Nov 21, 2023
bc53a86
Update some metadata
lassemoldrup Nov 21, 2023
ba221e5
Make node connection more reliable
lassemoldrup Nov 22, 2023
16ee804
Move version number
lassemoldrup Nov 22, 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
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
Loading