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

Dev #76

Closed
wants to merge 32 commits into from
Closed

Dev #76

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
c5f4c63
build(deps): bump actions/checkout from 3 to 4
dependabot[bot] Sep 4, 2023
26a0452
build(deps-dev): bump electron-builder in /desktop-app
dependabot[bot] Sep 25, 2023
a7869f5
fix(build): now works
tomjeannesson Oct 5, 2023
b09ba47
feat(ci): build
tomjeannesson Oct 6, 2023
08f611c
Merge pull request #75 from napse-invest/feature/server
tomjeannesson Oct 6, 2023
bd1243e
tmp
tomjeannesson Oct 6, 2023
4000c2e
Merge branch 'dev' into feature/server
tomjeannesson Oct 6, 2023
79f2568
chore(deps): bump lucide-react from 0.268.0 to 0.284.0 in /desktop-app
dependabot[bot] Oct 6, 2023
e09221d
chore(deps-dev): bump electron from 21.4.4 to 26.3.0 in /desktop-app
dependabot[bot] Oct 6, 2023
a760f0e
fix(ci): workfow fix
tomjeannesson Oct 6, 2023
d0b53d4
fix(ci): workflow
tomjeannesson Oct 6, 2023
96ed4c6
chore(deps-dev): bump @types/node in /desktop-app
dependabot[bot] Oct 6, 2023
ecaeece
build(deps-dev): bump eslint-config-standard-with-typescript
dependabot[bot] Oct 6, 2023
73f082e
Merge branch 'dev' of github.com:napse-invest/Napse into dependabot/n…
tomjeannesson Oct 6, 2023
32b5318
Merge pull request #72 from napse-invest/dependabot/npm_and_yarn/desk…
tomjeannesson Oct 6, 2023
8ca98ac
tmp
tomjeannesson Oct 6, 2023
76e6830
Merge branch 'dev' into dependabot/npm_and_yarn/desktop-app/dev/lucid…
tomjeannesson Oct 6, 2023
48ebb3b
Merge branch 'dev' into dependabot/npm_and_yarn/desktop-app/dev/eslin…
tomjeannesson Oct 6, 2023
60c8e57
tmp
tomjeannesson Oct 6, 2023
b1d3f5f
Merge branch 'dev' into dependabot/github_actions/dev/actions/checkout-4
tomjeannesson Oct 6, 2023
a3fbf4b
Merge branch 'main' into dev
tomjeannesson Oct 6, 2023
e0c608d
Merge pull request #73 from napse-invest/dependabot/npm_and_yarn/desk…
tomjeannesson Oct 6, 2023
8b5c73b
Merge branch 'dev' into dependabot/npm_and_yarn/desktop-app/dev/eslin…
tomjeannesson Oct 6, 2023
2f191ca
Merge branch 'dev' into feature/server
tomjeannesson Oct 6, 2023
1d79081
tmp
tomjeannesson Oct 6, 2023
312d3a5
Merge pull request #71 from napse-invest/dependabot/npm_and_yarn/desk…
tomjeannesson Oct 6, 2023
c034ae5
Merge branch 'dev' into feature/server
tomjeannesson Oct 6, 2023
a701b9f
Merge pull request #62 from napse-invest/dependabot/npm_and_yarn/desk…
tomjeannesson Oct 6, 2023
f0f7586
Merge pull request #48 from napse-invest/dependabot/github_actions/de…
tomjeannesson Oct 6, 2023
6ec0053
tmp
tomjeannesson Oct 6, 2023
feed394
Merge pull request #78 from napse-invest/feature/server
tomjeannesson Oct 6, 2023
fe43b84
Merge pull request #49 from napse-invest/dependabot/npm_and_yarn/desk…
tomjeannesson Oct 6, 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
2 changes: 1 addition & 1 deletion .github/workflows/check_no_open_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: List open PRs based on the same branch
id: list_prs
Expand Down
22 changes: 19 additions & 3 deletions .github/workflows/nextron.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,24 @@ jobs:
- run: true

build:
name: Nextron build
needs: authorize
name: Build
runs-on: ubuntu-latest
steps:
- run: true
- uses: actions/checkout@v3

- name: Set Node.js 18.x
uses: actions/setup-node@v3
with:
node-version: 18.x

- name: Run install
uses: borales/actions-yarn@v4
with:
cmd: install # will run `yarn install` command
dir: desktop-app

- name: Build production bundle
uses: borales/actions-yarn@v4
with:
cmd: build # will run `yarn build` command
dir: desktop-app
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
persist-credentials: false

Expand Down
6 changes: 5 additions & 1 deletion desktop-app/.eslint.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
{
"extends": "next/core-web-vitals"
"extends": [
"plugin:react/recommended",
"plugin:tailwindcss/recommended",
"next/core-web-vitals"
]
}
44 changes: 37 additions & 7 deletions desktop-app/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,22 @@
{
"$schema": "https://json.schemastore.org/eslintrc",
"root": true,
"env": {
"browser": true,
"es2021": true
},
"extends": [
"standard-with-typescript",
"plugin:react/recommended"
"plugin:react/recommended",
"plugin:tailwindcss/recommended",
"next/core-web-vitals"
],
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module",
"project": "./desktop-app/tsconfig.json"
"sourceType": "module"
},
"plugins": [
"react"
"react",
"tailwindcss"
],
"rules": {
"react/react-in-jsx-scope": "off",
Expand All @@ -28,6 +31,33 @@
],
"@typescript-eslint/space-before-function-paren": "off",
"@typescript-eslint/indent": "off",
"multiline-ternary": "off"
}
"multiline-ternary": "off",
//custom rules
"@next/next/no-html-link-for-pages": "off",
"tailwindcss/no-custom-classname": "off",
"tailwindcss/classnames-order": "error"
},
"settings": {
"tailwindcss": {
"callees": [
"cn",
"cva"
],
"config": "tailwind.config.cjs"
},
"next": {
"rootDir": [
"apps/*/"
]
}
},
"overrides": [
{
"files": [
"*.ts",
"*.tsx"
],
"parser": "@typescript-eslint/parser"
}
]
}
1 change: 1 addition & 0 deletions desktop-app/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ node_modules
/app
dist
next-env.d.ts
out/
5 changes: 5 additions & 0 deletions desktop-app/electron-builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,9 @@ files:
filter:
- package.json
- app

linux:
target: deb
icon: renderer/public/images/icon.svg

publish: null
4 changes: 2 additions & 2 deletions desktop-app/main/helpers/create-window.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import {
} from 'electron'
import Store from 'electron-store'

export default (
export default function Main(
windowName: string,
options: BrowserWindowConstructorOptions
): BrowserWindow => {
): BrowserWindow {
const key = 'window-state'
const name = `window-state-${windowName}`
const store = new Store({ name })
Expand Down
23 changes: 14 additions & 9 deletions desktop-app/package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
{
"private": true,
"name": "my-nextron-app",
"description": "My application description",
"name": "napse",
"description": "Napse Desktop App",
"homepage": "https://napse.invest.com",
"version": "1.0.0",
"author": "Yoshihide Shiono <shiono.yoshihide@gmail.com>",
"author": "Napse Invest <napse.invest@gmail.com>",
"main": "app/background.js",
"scripts": {
"start": "nextron",
Expand Down Expand Up @@ -36,9 +37,8 @@
"date-fns": "^2.30.0",
"electron-serve": "^1.1.0",
"electron-store": "^8.1.0",
"lucide-react": "^0.268.0",
"lucide-react": "^0.284.0",
"next-themes": "^0.2.1",
"prop-types": "^15.8.1",
"react-day-picker": "^8.8.1",
"react-hook-form": "^7.45.4",
"react-redux": "^8.1.2",
Expand All @@ -53,24 +53,29 @@
"zod": "^3.22.2"
},
"devDependencies": {
"@types/node": "^18.11.18",
"@types/node": "^20.8.2",
"@types/prop-types": "^15.7.8",
"@types/react": "^18.0.26",
"@typescript-eslint/eslint-plugin": "^6.1.0",
"@typescript-eslint/parser": "^6.0.0",
"autoprefixer": "^10.4.7",
"electron": "^21.3.3",
"electron-builder": "^23.6.0",
"electron": "^26.3.0",
"electron-builder": "^24.6.4",
"eslint": "^8.48.0",
"eslint-config-next": "13.4.19",
"eslint-config-standard-with-typescript": "^38.0.0",
"eslint-config-standard-with-typescript": "^39.1.0",
"eslint-plugin-import": "^2.25.2",
"eslint-plugin-n": "^15.0.0 || ^16.0.0 ",
"eslint-plugin-promise": "^6.0.0",
"eslint-plugin-react": "^7.33.2",
"eslint-plugin-tailwind": "^0.2.1",
"eslint-plugin-tailwindcss": "^3.13.0",
"next": "^13.4.19",
"nextron": "^8.5.0",
"postcss": "^8.4.13",
"prettier": "^3.0.2",
"prettier-plugin-tailwindcss": "^0.5.3",
"prop-types": "^15.8.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"tailwindcss": "^3.1.8",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import PanelCard from '@/components/custom/panel/panelCard'
import { string } from 'prop-types'
import React from 'react'

type MinimalistPanelCardProps = {
Expand Down
2 changes: 2 additions & 0 deletions desktop-app/renderer/components/custom/panel/panelCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ function PanelCard({
)
})

CardComponent.displayName = 'Card'

return tooltip ? (
<TooltipProvider>
<Tooltip>
Expand Down
2 changes: 2 additions & 0 deletions desktop-app/renderer/components/custom/statCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ function StatCard({
)
})

StatCardComponent.displayName = 'StatCard'

return tooltip ? (
<TooltipProvider>
<Tooltip>
Expand Down
2 changes: 1 addition & 1 deletion desktop-app/renderer/components/layout/contextHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export default function ContextHeader({
})
}}
>
<Image src="/images/logo.svg" alt="Napse Logo" fill priority />
<Image src="/images/logo.svg" alt="Napse logo" fill priority />
</Button>
<Separator className="relative h-2/3" orientation="vertical" />
</div>
Expand Down
4 changes: 2 additions & 2 deletions desktop-app/renderer/components/ui/button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ import { cn } from '@/lib/utils'
import { Close } from '@radix-ui/react-popover'

const buttonVariants = cva(
'inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50',
'ring-offset-background focus-visible:ring-ring inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50',
{
variants: {
variant: {
default: 'bg-primary text-primary-foreground hover:bg-primary/90',
destructive:
'bg-destructive text-destructive-foreground hover:bg-destructive/90',
outline:
'border border-input bg-background hover:bg-accent hover:text-accent-foreground',
'border-input bg-background hover:bg-accent hover:text-accent-foreground border',
secondary:
'bg-secondary text-secondary-foreground hover:bg-secondary/80',
ghost: 'hover:bg-accent hover:text-accent-foreground',
Expand Down
2 changes: 1 addition & 1 deletion desktop-app/renderer/components/ui/input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const Input = React.forwardRef<HTMLInputElement, InputProps>(
<input
type={type}
className={cn(
'flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50',
'border-input bg-background ring-offset-background placeholder:text-muted-foreground focus-visible:ring-ring flex h-10 w-full rounded-md border px-3 py-2 text-sm file:border-0 file:bg-transparent file:text-sm file:font-medium focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50',
className
)}
ref={ref}
Expand Down
2 changes: 1 addition & 1 deletion desktop-app/renderer/components/ui/popover.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const PopoverContent = React.forwardRef<
align={align}
sideOffset={sideOffset}
className={cn(
'z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2',
'bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 rounded-md border p-4 shadow-md outline-none',
className
)}
{...props}
Expand Down
12 changes: 6 additions & 6 deletions desktop-app/renderer/components/ui/progress.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
"use client"
'use client'

import * as React from "react"
import * as ProgressPrimitive from "@radix-ui/react-progress"
import * as React from 'react'
import * as ProgressPrimitive from '@radix-ui/react-progress'

import { cn } from "@/lib/utils"
import { cn } from '@/lib/utils'

const Progress = React.forwardRef<
React.ElementRef<typeof ProgressPrimitive.Root>,
Expand All @@ -12,13 +12,13 @@ const Progress = React.forwardRef<
<ProgressPrimitive.Root
ref={ref}
className={cn(
"relative h-4 w-full overflow-hidden rounded-full bg-secondary",
'bg-secondary relative h-4 w-full overflow-hidden rounded-full',
className
)}
{...props}
>
<ProgressPrimitive.Indicator
className="h-full w-full flex-1 bg-primary transition-all"
className="bg-primary h-full w-full flex-1 transition-all"
style={{ transform: `translateX(-${100 - (value || 0)}%)` }}
/>
</ProgressPrimitive.Root>
Expand Down
34 changes: 17 additions & 17 deletions desktop-app/renderer/components/ui/select.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
"use client"
'use client'

import * as React from "react"
import * as SelectPrimitive from "@radix-ui/react-select"
import { Check, ChevronDown } from "lucide-react"
import * as React from 'react'
import * as SelectPrimitive from '@radix-ui/react-select'
import { Check, ChevronDown } from 'lucide-react'

import { cn } from "@/lib/utils"
import { cn } from '@/lib/utils'

const Select = SelectPrimitive.Root

Expand All @@ -19,7 +19,7 @@ const SelectTrigger = React.forwardRef<
<SelectPrimitive.Trigger
ref={ref}
className={cn(
"flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
'border-input bg-background ring-offset-background placeholder:text-muted-foreground focus:ring-ring flex h-10 w-full items-center justify-between rounded-md border px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50',
className
)}
{...props}
Expand All @@ -35,24 +35,24 @@ SelectTrigger.displayName = SelectPrimitive.Trigger.displayName
const SelectContent = React.forwardRef<
React.ElementRef<typeof SelectPrimitive.Content>,
React.ComponentPropsWithoutRef<typeof SelectPrimitive.Content>
>(({ className, children, position = "popper", ...props }, ref) => (
>(({ className, children, position = 'popper', ...props }, ref) => (
<SelectPrimitive.Portal>
<SelectPrimitive.Content
ref={ref}
className={cn(
"relative z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
position === "popper" &&
"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
'bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 min-w-[8rem] overflow-hidden rounded-md border shadow-md',
position === 'popper' &&
'data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1',
className
)}
position={position}
{...props}
>
<SelectPrimitive.Viewport
className={cn(
"p-1",
position === "popper" &&
"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"
'p-1',
position === 'popper' &&
'h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]'
)}
>
{children}
Expand All @@ -68,7 +68,7 @@ const SelectLabel = React.forwardRef<
>(({ className, ...props }, ref) => (
<SelectPrimitive.Label
ref={ref}
className={cn("py-1.5 pl-8 pr-2 text-sm font-semibold", className)}
className={cn('py-1.5 pl-8 pr-2 text-sm font-semibold', className)}
{...props}
/>
))
Expand All @@ -81,7 +81,7 @@ const SelectItem = React.forwardRef<
<SelectPrimitive.Item
ref={ref}
className={cn(
"relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
'focus:bg-accent focus:text-accent-foreground relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50',
className
)}
{...props}
Expand All @@ -103,7 +103,7 @@ const SelectSeparator = React.forwardRef<
>(({ className, ...props }, ref) => (
<SelectPrimitive.Separator
ref={ref}
className={cn("-mx-1 my-1 h-px bg-muted", className)}
className={cn('bg-muted -mx-1 my-1 h-px', className)}
{...props}
/>
))
Expand All @@ -117,5 +117,5 @@ export {
SelectContent,
SelectLabel,
SelectItem,
SelectSeparator,
SelectSeparator
}
Loading