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

Re-add UI from monorepo #6

Merged
merged 198 commits into from
Sep 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
198 commits
Select commit Hold shift + click to select a range
224a4d1
Re-added UI for projects and create project pages
Nils-Kolvenbach Feb 22, 2024
74a4f64
Moved ipc to its own file
Nils-Kolvenbach Feb 25, 2024
9074b68
Added roboto and montserrat as local fonts. Also added working exampl…
Nils-Kolvenbach Feb 26, 2024
d77db15
Added global state storage with zustand
Nils-Kolvenbach Feb 29, 2024
4d79d6d
Added Project layout
Nils-Kolvenbach Feb 29, 2024
4fce4c9
Added settings page
Nils-Kolvenbach Feb 29, 2024
71d86c6
Added Assets page. Also added electron ipc and zustand store to tanst…
Nils-Kolvenbach Feb 29, 2024
6fb19c8
Added more Asset logic
Nils-Kolvenbach Feb 29, 2024
f48301f
Removed EmptyState component in favor of standard button to add more …
Nils-Kolvenbach Feb 29, 2024
6c4f827
Added basic Collections pages
Nils-Kolvenbach Feb 29, 2024
2c0fe5c
Added Collection and Entry pages
Nils-Kolvenbach Feb 29, 2024
b882bc6
Added Collection update page
Nils-Kolvenbach Feb 29, 2024
ea28917
Changed page title
Nils-Kolvenbach Mar 3, 2024
e62265f
Added paths config and react plugin for vite
Nils-Kolvenbach Mar 3, 2024
abe1470
shadcn/ui init
Nils-Kolvenbach Mar 3, 2024
586bb2a
Added chadcn/ui button and theme provider
Nils-Kolvenbach Mar 3, 2024
7dcb8bb
Added chadcn avatar and dropdown-menu components
Nils-Kolvenbach Mar 4, 2024
d1b0210
Added theme switch and store for project sidebar. Now using avatar an…
Nils-Kolvenbach Mar 4, 2024
880bc33
Added tooltips to project sidebar when narrow
Nils-Kolvenbach Mar 4, 2024
26cca57
Added padding to breadcrumbs
Nils-Kolvenbach Mar 8, 2024
229c14d
Added basic toast component (sonner)
Nils-Kolvenbach Mar 9, 2024
d0cdd72
Added project search with dialog
Nils-Kolvenbach Mar 9, 2024
e781eeb
Dialog is now using provided options
Nils-Kolvenbach Mar 10, 2024
a01745f
Modified Asset display
Nils-Kolvenbach Mar 10, 2024
27fa6ca
Fixed triggering multiple notifications
Nils-Kolvenbach Mar 13, 2024
c758eb8
Page now supports darkmode
Nils-Kolvenbach Mar 13, 2024
3b915ea
Dashboard now supports darkmode
Nils-Kolvenbach Mar 13, 2024
1f510eb
Using new Page component for Collection index page
Nils-Kolvenbach Mar 13, 2024
c10a3be
Added chadcn form
Nils-Kolvenbach Mar 13, 2024
6341ad0
Added label, form and breadcrumb components
Nils-Kolvenbach Mar 13, 2024
2221c7e
Using new breadcrumb component and Project sidebar trigger now rotates
Nils-Kolvenbach Mar 13, 2024
a02aeae
Small lightmode fix
Nils-Kolvenbach Mar 13, 2024
0f3a682
Added sidebar component
Nils-Kolvenbach Mar 13, 2024
96c5a16
Using sidebar component
Nils-Kolvenbach Mar 13, 2024
571ad1f
Fixed translation and using new Buttons
Nils-Kolvenbach Mar 13, 2024
c6c67b4
Added alert dialog and scroll area components
Nils-Kolvenbach Mar 14, 2024
b222b49
Using new components for collections sidebar
Nils-Kolvenbach Mar 14, 2024
c6059c2
Added spacing around user dropdown
Nils-Kolvenbach Mar 14, 2024
0c984c8
Using new page component for create collection page
Nils-Kolvenbach Mar 14, 2024
0094bfe
Creating a Collection now workiing with new components
Nils-Kolvenbach Mar 15, 2024
58995c6
Starting to cleanup icons and react warnings
Nils-Kolvenbach Mar 15, 2024
cde4baf
Changed Project display
Nils-Kolvenbach Mar 16, 2024
5ccac6c
Fixing various warnings and inconsistencies
Nils-Kolvenbach Mar 16, 2024
d1abb6f
Trying to get drag and drop for assets working
Nils-Kolvenbach Mar 27, 2024
ea1327e
drag and drop events on page component are optional
Nils-Kolvenbach Mar 27, 2024
24e8cc4
Simpler Collection creation for now
Nils-Kolvenbach Mar 27, 2024
82d2a16
First Entry inputs are now rendering based on ValueDefinition
Nils-Kolvenbach Mar 27, 2024
c30d478
Now creating Values for each new Entry - for some reason it takes two…
Nils-Kolvenbach Mar 31, 2024
ff82a84
Creating Entries with direct string Value definitions is working now
Nils-Kolvenbach Apr 7, 2024
3122f57
Added Chadcn sheet component
Nils-Kolvenbach Apr 7, 2024
eb542c9
Extracted form for adding text Value definitions into custom componen…
Nils-Kolvenbach Apr 7, 2024
fd74dc6
Added option to show content inside sheet overlay
Nils-Kolvenbach Apr 11, 2024
b7ce263
Altered form to export all necesarry components and state
Nils-Kolvenbach Apr 11, 2024
478cd2b
Using new sheet overlay content to show form definition example
Nils-Kolvenbach Apr 11, 2024
c374edc
fix: sheets and dialogs are not part of the draggable area
Nils-Kolvenbach Apr 11, 2024
075b105
fix: Hooks are only allowed inside components
Nils-Kolvenbach Apr 11, 2024
2d2abcb
Changed text and border
Nils-Kolvenbach Apr 11, 2024
6805ec8
Small improvements for form display
Nils-Kolvenbach Apr 11, 2024
853e51d
Added Collection singular name field
Nils-Kolvenbach Apr 11, 2024
7d9657d
Using Project name for breadcrumbs instead of ID
Nils-Kolvenbach Apr 11, 2024
7c87d10
Added number Value definition form
Nils-Kolvenbach Apr 11, 2024
b9629a7
Working example of dynamic Value definition creation
Nils-Kolvenbach Apr 11, 2024
79c3989
Small accessibility and color tweaks
Nils-Kolvenbach Apr 11, 2024
90805b7
fix: duplicated Value definition ID when adding multiple
Nils-Kolvenbach Apr 12, 2024
84b1b95
Small color adjustment for primary button and page header
Nils-Kolvenbach Apr 12, 2024
a0aae0d
Primarry button now has brand color
Nils-Kolvenbach Apr 12, 2024
b79b0be
Using brand color for input focus ring
Nils-Kolvenbach Apr 12, 2024
7f962f0
fix: no results message in table should span over all columns
Nils-Kolvenbach Apr 12, 2024
22572c8
fix: row can have multiple types
Nils-Kolvenbach Apr 12, 2024
116f4ac
Disabled buttons now show a cursor to indicate they are not clickable
Nils-Kolvenbach Apr 12, 2024
0c78c4e
Added pagination component
Nils-Kolvenbach Apr 12, 2024
6520f8c
Using pagination component for Entry display in Collection index page
Nils-Kolvenbach Apr 12, 2024
bb472db
Added TanStack Query
Nils-Kolvenbach Apr 12, 2024
8b2939e
TanStack Query init
Nils-Kolvenbach Apr 12, 2024
59dcd6d
A little more default padding for pages
Nils-Kolvenbach Apr 12, 2024
9f82d90
Using TanStack Query and Table to display server side paginated Entries
Nils-Kolvenbach Apr 12, 2024
ba5f2ff
Now we do not need to query Entries before loading the page itself
Nils-Kolvenbach Apr 12, 2024
b7d918c
Set default page size back to 15
Nils-Kolvenbach Apr 12, 2024
66f691b
fix: Entry cache now invalidates if switching between Collections
Nils-Kolvenbach Apr 12, 2024
48abd32
Added Value visibility switch and using filter (not working properly …
Nils-Kolvenbach Apr 13, 2024
39cf60d
fix: normalize page padding
Nils-Kolvenbach Apr 13, 2024
b2f4c6b
Using a map inside our store to lookup names to display instead of ID…
Nils-Kolvenbach Apr 14, 2024
b5220e6
Added placeholder for static breadcrumb translations
Nils-Kolvenbach Apr 14, 2024
4c1bfd6
Added loading state for button component
Nils-Kolvenbach Apr 14, 2024
44c7159
Now using new components for Project settings page. Also page compone…
Nils-Kolvenbach Apr 14, 2024
4d3fb3f
Added Project deletion dialog for confirmation
Nils-Kolvenbach Apr 14, 2024
148b6ed
Changed descriptions
Nils-Kolvenbach Apr 14, 2024
8b93bc6
Added spinner to button when isLoading
Nils-Kolvenbach Apr 16, 2024
0be47d9
Using isLoading on buttons where needed and using new input components
Nils-Kolvenbach Apr 16, 2024
2fb384d
Added messages and re-added default value, unique, min and max fields
Nils-Kolvenbach Apr 24, 2024
e4dcac6
locale ID and localized name mapping example
Nils-Kolvenbach Apr 24, 2024
f265460
Set default pagination page size to 10
Nils-Kolvenbach Apr 24, 2024
25ea107
Added setValueAsNumber util function to return numbers instead of str…
Nils-Kolvenbach Apr 27, 2024
d91ded2
Added ValueInputFromDefinition function to return the correct input b…
Nils-Kolvenbach Apr 27, 2024
1b9e231
Dynamically show form inputs based on current Collections definition
Nils-Kolvenbach Apr 27, 2024
d409fa1
Set correct defaults for Values based on definition valueType
Nils-Kolvenbach Apr 27, 2024
ced3fe5
fix: Support cmdk 1.0.0
Nils-Kolvenbach May 5, 2024
09c7d3c
Updated shared and core packages and added popover component
Nils-Kolvenbach May 5, 2024
f6aa0e9
Added chip component
Nils-Kolvenbach May 5, 2024
6b5d7f0
Added project settings language select
Nils-Kolvenbach May 5, 2024
9cead79
Updated forms to support simple language instead of locale object.
Nils-Kolvenbach May 5, 2024
7c00331
fix: use language instead of locale
Nils-Kolvenbach May 5, 2024
cd0208f
Example of handling translatable string fields. @todo create componen…
Nils-Kolvenbach May 5, 2024
8b07fd2
Fixed scroll area inside flex-auto and changed scroll colors. Also ad…
Nils-Kolvenbach May 16, 2024
3602522
Added default definition form to share between all types of Values
Nils-Kolvenbach May 20, 2024
36d12bb
Using isRequired for form labels
Nils-Kolvenbach May 20, 2024
51a1a97
Using default value definition form to reduce number of duplicated fi…
Nils-Kolvenbach May 20, 2024
f9317c1
Added language dialog for name and description
Nils-Kolvenbach May 20, 2024
ff56d3c
fix: Warning: React does not recognize the `isRequired` prop on a DOM…
Nils-Kolvenbach May 25, 2024
2f3fe2c
fix: missing key on SelectItem and improved label content
Nils-Kolvenbach May 25, 2024
a75e6c8
fix: missing key for FormFields
Nils-Kolvenbach May 25, 2024
eea4ac0
Made isUnique a seperate component
Nils-Kolvenbach May 25, 2024
34695f4
Made generic to use in different Forms
Nils-Kolvenbach May 25, 2024
dfc82dd
Using new isUnique component and generic default Form
Nils-Kolvenbach May 25, 2024
6bf61f0
Re-adding text value definition form
Nils-Kolvenbach May 25, 2024
32f684e
Added toggle value definition form
Nils-Kolvenbach May 27, 2024
eb7eceb
Added textarea value definition
Nils-Kolvenbach May 27, 2024
ae428f5
Added slider component. Added range value definition with new slider …
Nils-Kolvenbach May 27, 2024
e0360e7
fix: text inputs now correctly use minLength and maxLength since the …
Nils-Kolvenbach May 27, 2024
17d29b9
fix: min and max length for the text and textarea value definitions i…
Nils-Kolvenbach May 27, 2024
dcc9ee0
Updated to use latest shared (0.5.0) and core (0.3.0) libraries. Adde…
Nils-Kolvenbach Jun 11, 2024
ac09a1e
Updated shared and core to fix isRequired for range and toggle Values…
Nils-Kolvenbach Jun 14, 2024
cd7c784
Collection create and update pages are now using the same shared comp…
Nils-Kolvenbach Jun 14, 2024
886c6ed
Added basic Entry index page
Nils-Kolvenbach Jun 14, 2024
f4c051d
WIP: added Entry form field rendering - still failing to validate Value
Nils-Kolvenbach Jun 15, 2024
0aac365
Added dialog boxes for Entry Value content
Nils-Kolvenbach Jun 16, 2024
88727c8
Range and toggle Values are always required. isUnique will be part of…
Nils-Kolvenbach Jun 25, 2024
159db36
Removed ui and shared lib. Now only using core. Dev and build working.
Nils-Kolvenbach Jul 7, 2024
bff3ddb
Only lint src dir. All imports are now relative. Fixed all eslint errors
Nils-Kolvenbach Jul 7, 2024
75c7180
Increased network timeout for yarn install inside github actions and …
Nils-Kolvenbach Jul 7, 2024
0b4ae58
Updated most dependencies
Nils-Kolvenbach Jul 7, 2024
fbce9bb
Added vite as dev dependency
Nils-Kolvenbach Jul 7, 2024
4cef907
Switched to electron-vite
Nils-Kolvenbach Jul 12, 2024
fe08d5e
Ignore linter for now
Nils-Kolvenbach Jul 12, 2024
b8a6199
No typecheck for now
Nils-Kolvenbach Jul 12, 2024
a5ed88d
Added icons
Nils-Kolvenbach Jul 12, 2024
5fe69f6
fix: chadcn paths
Nils-Kolvenbach Jul 12, 2024
ff65330
Added rimraf to clean the out and dist folders
Nils-Kolvenbach Jul 12, 2024
a113df4
fix: hdiutil process failed ERR_ELECTRON_BUILDER_CANNOT_EXECUTE. Prob…
Nils-Kolvenbach Jul 12, 2024
c8e6908
Using Node 20 for CI/CD
Nils-Kolvenbach Jul 12, 2024
4aab258
fix: Upload artifact path
Nils-Kolvenbach Jul 12, 2024
9f00a6a
Removed unused file
Nils-Kolvenbach Jul 12, 2024
bdf0bfd
Set all versions fixed
Nils-Kolvenbach Jul 12, 2024
60bf456
Updated all dependencies to latest versions
Nils-Kolvenbach Jul 12, 2024
3d34828
Allow HMR in dev mode
Nils-Kolvenbach Jul 12, 2024
c3fecd6
Too many changes with eslint 9 - rollback
Nils-Kolvenbach Jul 12, 2024
c3bae3c
Do not cancel other builds if one is failing
Nils-Kolvenbach Jul 12, 2024
457bd5e
set publisher to github
Nils-Kolvenbach Jul 13, 2024
df5e30e
Formatted code
Nils-Kolvenbach Jul 13, 2024
ab7deab
To dev dependency
Nils-Kolvenbach Jul 13, 2024
79f6695
Switched from @electron-toolkit/tsconfig to more modern @tsconfig/nod…
Nils-Kolvenbach Jul 13, 2024
56912e3
Trying to get linux build to work by overwriting package.json name
Nils-Kolvenbach Jul 25, 2024
fef932d
Added linux distribution files to artifact
Nils-Kolvenbach Jul 25, 2024
1d9990a
Better simple name
Nils-Kolvenbach Jul 25, 2024
597adad
Added rollup config for preload build to be CJS instead of ESM since …
Nils-Kolvenbach Jul 25, 2024
70cce29
Updated versions and added separator component
Nils-Kolvenbach Jul 25, 2024
cd10032
Enabled sandboxing again.
Nils-Kolvenbach Jul 25, 2024
d1c5f75
Using @renderer alias. Core is now using datetime strings instead of …
Nils-Kolvenbach Jul 25, 2024
ce5d9c1
Updated actions/upload-artifact to v4
Nils-Kolvenbach Jul 25, 2024
eb00217
Re-Added lint and typecheck step to CI
Nils-Kolvenbach Jul 25, 2024
02fb25c
Added missing @typescript-eslint/eslint-plugin dependency
Nils-Kolvenbach Jul 25, 2024
29ad0cc
Disabled linter and typecheck again. They are running in CI but need …
Nils-Kolvenbach Jul 25, 2024
3bddcbd
Merge pull request #8 from elek-io/switch-to-electron-vite
Nils-Kolvenbach Jul 26, 2024
8b06d4c
Fixed linting problems
Nils-Kolvenbach Jul 26, 2024
750a7f4
Fixed most linting issues. Found a solution for forward refs with gen…
Nils-Kolvenbach Jul 28, 2024
03322f5
fix: missing key and breadcrumb navigation. Adjusted CSP to allow loc…
Nils-Kolvenbach Jul 31, 2024
ff54e42
fix: Assets are loading now. Also added a security check if renderer …
Nils-Kolvenbach Aug 1, 2024
11f2fc1
Updated core to 0.9.1
Nils-Kolvenbach Aug 2, 2024
cc213fa
Refactored index main and added persitent window size and position in…
Nils-Kolvenbach Aug 2, 2024
b538b4c
formatDatetime needs to be able to handle undefined too
Nils-Kolvenbach Aug 2, 2024
b6fa2e8
Using ContextBridgeApi directly
Nils-Kolvenbach Aug 2, 2024
99453ee
Using correct RouterContext types
Nils-Kolvenbach Aug 2, 2024
434289b
Fixed types for Asset drag events
Nils-Kolvenbach Aug 2, 2024
9d2cf48
fix: dialog button alignment
Nils-Kolvenbach Aug 14, 2024
f1491f7
Added custom error component with refresh. Successfully generating Fi…
Nils-Kolvenbach Aug 14, 2024
ec04226
Updated tanstack router, router devtools and router plugin
Nils-Kolvenbach Aug 21, 2024
2a64468
Added git methods to IPC and installed hookform devtools
Nils-Kolvenbach Aug 21, 2024
211a268
Added setting page for git remote origin url configuration and the sy…
Nils-Kolvenbach Aug 21, 2024
d2b9a28
Added RHF devtools for FieldDefinitionForm
Nils-Kolvenbach Aug 21, 2024
863aaed
Increased margin between page section header and content
Nils-Kolvenbach Aug 21, 2024
56a7319
Added refetching project changes button
Nils-Kolvenbach Aug 21, 2024
9d1706b
Added option to clone projects by URL. Split Header into AppHeader an…
Nils-Kolvenbach Sep 1, 2024
152bdba
Updated to latest Core version
Nils-Kolvenbach Sep 5, 2024
49ef467
Added new save dialog IPC method
Nils-Kolvenbach Sep 5, 2024
c78d5f6
Implemented saving an Asset to disk
Nils-Kolvenbach Sep 5, 2024
5afdd78
Changed name of translate method to reflect its purpose - translating…
Nils-Kolvenbach Sep 5, 2024
acd420a
Added user profile page
Nils-Kolvenbach Sep 5, 2024
aa5dd8e
Updated lucide icons
Nils-Kolvenbach Sep 8, 2024
0447005
Added commit and commit history components. Added history page. Chang…
Nils-Kolvenbach Sep 8, 2024
8a70387
Updated to latest Core
Nils-Kolvenbach Sep 13, 2024
c4ac931
Added more IPC methods. Log level is set based on dev or prod environ…
Nils-Kolvenbach Sep 13, 2024
e257296
Added info log on navigation
Nils-Kolvenbach Sep 13, 2024
058fc31
Updated to use latest Core
Nils-Kolvenbach Sep 13, 2024
647e8d7
Using translateContent name to show that this is translating the user…
Nils-Kolvenbach Sep 13, 2024
8e975df
Renamed to user
Nils-Kolvenbach Sep 13, 2024
e289265
Dashboard only shows latest 5 commits
Nils-Kolvenbach Sep 13, 2024
3c5d46b
Added changeset
Nils-Kolvenbach Sep 13, 2024
16c7ae7
Added release workflow - first test
Nils-Kolvenbach Sep 13, 2024
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
11 changes: 11 additions & 0 deletions .changeset/eighty-carrots-mate.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
'@elek-io/client': minor
---

Re-added GUI - instead of using the old UI repository where we created completely custom UI components with headlessui for accessibility, I've switched to shadcn (which uses Radix UI) base components with custom changes. Currently all components exist inside this repository. Once "finished" I'll extract them into the elek-io/ui component library to use them for the website and docs too.

Also switched from electron-forge to electron-vite and use ESM wherever possible - which is everywhere except the preload.

There is still some UI isses especially when creating a collection - where the dialog is closing whenever the user inputs something into the modal.
This can also be seen when the clone Project dialog is used.
Also buttons sometimes need two clicks to work.
17 changes: 5 additions & 12 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,9 @@
{
"env": {
"browser": true,
"es6": true,
"node": true
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:import/recommended",
"plugin:import/electron",
"plugin:import/typescript"
],
"parser": "@typescript-eslint/parser"
"plugin:react/recommended",
"plugin:react/jsx-runtime",
"@electron-toolkit/eslint-config-ts/recommended",
"@electron-toolkit/eslint-config-prettier"
]
}
16 changes: 9 additions & 7 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ concurrency: ${{ github.workflow }}-${{ github.ref }}
jobs:
release:
name: Releasing on ${{ matrix.platform }} with Node.js ${{ matrix.node-version }}
timeout-minutes: 15
timeout-minutes: 20
strategy:
matrix:
# @see https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners#standard-github-hosted-runners-for-public-repositories
# macos-12 = intel
# macos-14 = M1 (arm)
platform: [ubuntu-22.04, macos-12, macos-14, windows-2022]
node-version: [18]
node-version: [20]
runs-on: ${{ matrix.platform }}
steps:
- name: Check out code
Expand All @@ -27,15 +27,17 @@ jobs:
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: yarn install
- name: Run linter
run: yarn run lint
- name: Build and create pull request or publish to GitHub
run: npm install
# - name: Run linter
# run: npm run lint
- name: Build
run: npm run build
- name: Create pull request or publish to GitHub
uses: changesets/action@v1
with:
title: 'WIP: Release x.x.x'
commit: Release new version
publish: yarn run release
publish: npm run release
env:
# See https://github.com/changesets/action/issues/147
HOME: ${{ github.workspace }}
Expand Down
37 changes: 23 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,15 @@ on:
jobs:
test:
name: Testing on ${{ matrix.platform }} with Node.js ${{ matrix.node-version }}
timeout-minutes: 15
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
# @see https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners#standard-github-hosted-runners-for-public-repositories
# macos-12 = intel
# macos-14 = M1 (arm)
platform: [ubuntu-22.04, macos-12, macos-14, windows-2022]
node-version: [18]
node-version: [20]
runs-on: ${{ matrix.platform }}
steps:
- name: Check out code
Expand All @@ -25,22 +26,30 @@ jobs:
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: yarn install
- name: Run linter
run: yarn run lint
- name: Identify misconfigurations and security anti-patterns
uses: doyensec/electronegativity-action@v2
- name: Upload report
uses: github/codeql-action/upload-sarif@v1
with:
sarif_file: ../electronegativity_results
run: npm install
# - name: Run linter
# run: npm run lint
# - name: Run typecheck
# run: npm run typecheck
# - name: Identify misconfigurations and security anti-patterns
# uses: doyensec/electronegativity-action@v2
# - name: Upload report
# uses: github/codeql-action/upload-sarif@v1
# with:
# sarif_file: ../electronegativity_results
- name: Build
run: yarn run build
run: npm run build
# Uncomment if necessary
# For example to inspect the build applications
- name: Upload artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: artifact_${{ matrix.platform }}
path: out/make
path: |
dist/*.exe
dist/*.dmg
dist/*.zip
dist/*.AppImage
dist/*.snap
dist/*.deb
if-no-files-found: error
52 changes: 52 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Release

on:
push:
tags:
- v*.*.*

jobs:
release:
name: Releasing on ${{ matrix.platform }} with Node.js ${{ matrix.node-version }}
timeout-minutes: 20
strategy:
matrix:
# @see https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners#standard-github-hosted-runners-for-public-repositories
# macos-12 = intel
# macos-14 = M1 (arm)
platform: [ubuntu-22.04, macos-12, macos-14, windows-2022]
node-version: [20]
runs-on: ${{ matrix.platform }}
steps:
- name: Check out code
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Setup Node.js ${{ matrix.node-version }} environment
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: npm install
# - name: Run linter
# run: npm run lint
- name: Build
run: npm run build
- name: Release
uses: softprops/action-gh-release@v2
with:
draft: true
body_path: ${{ github.workspace }}/CHANGELOG.md
files: |
dist/*.exe
dist/*.zip
dist/*.dmg
dist/*.AppImage
dist/*.snap
dist/*.deb
dist/*.rpm
dist/*.tar.gz
dist/*.yml
dist/*.blockmap
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ typings/

# Electron-Forge
out/
dist/

# Sentry Config File
.env.sentry-build-plugin
3 changes: 3 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"recommendations": ["dbaeumer.vscode-eslint"]
}
40 changes: 27 additions & 13 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -1,25 +1,39 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Dev (Electron Main)",
"name": "Debug Main Process",
"type": "node",
"request": "launch",
"runtimeExecutable": "${workspaceFolder}/node_modules/@electron-forge/cli/script/vscode.sh",
"cwd": "${workspaceRoot}",
"runtimeExecutable": "${workspaceRoot}/node_modules/.bin/electron-vite",
"windows": {
"runtimeExecutable": "${workspaceFolder}/node_modules/@electron-forge/cli/script/vscode.cmd"
"runtimeExecutable": "${workspaceRoot}/node_modules/.bin/electron-vite.cmd"
},
// runtimeArgs will be passed directly to your Electron application
"runtimeArgs": [],
"cwd": "${workspaceFolder}",
"console": "integratedTerminal"
"runtimeArgs": ["--sourcemap"],
"env": {
"REMOTE_DEBUGGING_PORT": "9222"
}
},
{
"name": "Build process",
"request": "launch",
"runtimeExecutable": "yarn",
"runtimeArgs": ["run", "build"],
"skipFiles": ["<node_internals>/**"],
"type": "node"
"name": "Debug Renderer Process",
"port": 9222,
"request": "attach",
"type": "chrome",
"webRoot": "${workspaceFolder}/src/renderer",
"timeout": 60000,
"presentation": {
"hidden": true
}
}
],
"compounds": [
{
"name": "Debug All",
"configurations": ["Debug Main Process", "Debug Renderer Process"],
"presentation": {
"order": 1
}
}
]
}
12 changes: 12 additions & 0 deletions build/entitlements.mac.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.cs.allow-jit</key>
<true/>
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
<true/>
<key>com.apple.security.cs.allow-dyld-environment-variables</key>
<true/>
</dict>
</plist>
Binary file added build/icon.icns
Binary file not shown.
Binary file added build/icon.ico
Binary file not shown.
Binary file added build/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 17 additions & 0 deletions components.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"$schema": "https://ui.shadcn.com/schema.json",
"style": "new-york",
"rsc": true,
"tsx": true,
"tailwind": {
"config": "tailwind.config.js",
"css": "src/renderer/src/index.css",
"baseColor": "zinc",
"cssVariables": false,
"prefix": ""
},
"aliases": {
"components": "@renderer/components",
"utils": "@renderer/util"
}
}
3 changes: 3 additions & 0 deletions dev-app-update.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
provider: generic
url: https://example.com/auto-updates
updaterCacheDirName: electron-vite-updater
43 changes: 43 additions & 0 deletions electron-builder.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
appId: io.elek.client
productName: 'elek.io Client'
directories:
buildResources: build
files:
- '!**/.vscode/*'
- '!src/*'
- '!electron.vite.config.{js,ts,mjs,cjs}'
- '!{.eslintignore,.eslintrc.cjs,.prettierignore,.prettierrc.yaml,dev-app-update.yml,CHANGELOG.md,README.md}'
- '!{.env,.env.*,.npmrc,pnpm-lock.yaml}'
- '!{tsconfig.json,tsconfig.node.json,tsconfig.web.json}'
extraMetadata:
name: 'elek-io-client' # Overwrites package.json name, since it cannot handle special characters
asarUnpack:
- resources/**
win:
executableName: 'elek.io Client'
nsis:
artifactName: elek-io-client-${version}-setup.${ext}
shortcutName: ${productName}
uninstallDisplayName: ${productName}
createDesktopShortcut: always
mac:
entitlementsInherit: build/entitlements.mac.plist
extendInfo:
- NSCameraUsageDescription: Application requests access to the device's camera.
- NSMicrophoneUsageDescription: Application requests access to the device's microphone.
- NSDocumentsFolderUsageDescription: Application requests access to the user's Documents folder.
- NSDownloadsFolderUsageDescription: Application requests access to the user's Downloads folder.
notarize: false
dmg:
artifactName: elek-io-client-${version}.${ext}
linux:
target:
- AppImage
- snap
- deb
category: Office
appImage:
artifactName: elek-io-client-${version}.${ext}
npmRebuild: false
publish:
provider: github
46 changes: 46 additions & 0 deletions electron.vite.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
import { sentryVitePlugin } from '@sentry/vite-plugin';
import { TanStackRouterVite } from '@tanstack/router-plugin/vite';
import viteReact from '@vitejs/plugin-react';
import { defineConfig, externalizeDepsPlugin } from 'electron-vite';
import { resolve } from 'path';

export default defineConfig({
main: {
build: { sourcemap: true },
plugins: [
externalizeDepsPlugin(),
sentryVitePlugin({
org: 'elek-io',
project: 'client',
}),
],
},
preload: {
build: {
rollupOptions: {
output: {
// With a sandboxed renderer and preload process the preload cannot use ESM
// This is a current (v31.2) limitation of using ESM in Electron
// @see https://www.electronjs.org/docs/latest/tutorial/esm#summary-esm-support-matrix
// @see https://github.com/alex8088/electron-vite/discussions/423#discussioncomment-8922407
format: 'cjs',
},
},
},
// plugins: [externalizeDepsPlugin()], @see above
},
renderer: {
resolve: {
alias: {
'@renderer': resolve('src/renderer/src'),
},
},
plugins: [
TanStackRouterVite({
routesDirectory: './src/renderer/src/routes',
generatedRouteTree: './src/renderer/src/routeTree.gen.ts',
}),
viteReact(),
],
},
});
Loading