Skip to content

Commit

Permalink
chore: update versioning
Browse files Browse the repository at this point in the history
  • Loading branch information
timeowilliams committed Oct 16, 2024
1 parent 081fa0b commit 3ede9b9
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 34 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "deepFocus",
"version": "1.2.0",
"version": "2.2.3",
"description": "DeepFocus is a productivity tool that helps you stay focused and productive by tracking your time spent on your computer.",
"main": "./out/main/main.js",
"author": "Timeo Williams",
Expand Down
18 changes: 5 additions & 13 deletions src/main/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,7 @@ import {
getBaseURL
} from './productivityUtils'
import { getInstalledApps } from './childProcess'
import {
resetCounters,
checkForUpdates,
getIconPath,
updateIconBasedOnProgress,
} from './utils'
import { resetCounters, checkForUpdates, getIconPath, updateIconBasedOnProgress } from './utils'
import log from 'electron-log/node.js'

export interface TypedStore extends Store<StoreSchema> {
Expand Down Expand Up @@ -59,12 +54,10 @@ log.info('Set up Environment')
function setupEnvironment(): void {
if (app.isPackaged) {
const envPath = path.join(process.resourcesPath, '.env')
if (fs.existsSync(envPath))
{
dotenv.config({ path: envPath })
console.error('Env file not found in production build')

}
if (fs.existsSync(envPath)) {
dotenv.config({ path: envPath })
console.error('Env file not found in production build')
}
} else {
console.log('app is not packaged')
dotenv.config()
Expand Down Expand Up @@ -450,4 +443,3 @@ function getDeepWorkHours(): DeepWorkHours {
function getSiteTrackers(): SiteTimeTracker[] {
return currentSiteTimeTrackers
}

39 changes: 19 additions & 20 deletions src/renderer/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const App = (props: ComponentProps<typeof Router>) => {
const [isNewUser, setIsNewUser] = createSignal(true)
const location = useLocation()
const navigate = useNavigate()
console.log('location: ',location.pathname)
console.log('location: ', location.pathname)

onMount(() => {
const token = localStorage.getItem('token') as string
Expand All @@ -34,7 +34,7 @@ const App = (props: ComponentProps<typeof Router>) => {
sendUserToBackend(JSON.parse(user))
setIsNewUser(false)
}
navigate('/')
navigate('/')
})

const handleLogout = () => {
Expand All @@ -54,17 +54,16 @@ const App = (props: ComponentProps<typeof Router>) => {
<header class="flex justify-between items-center p-4 bg-gray-800 opacity-[0.50] w-full">
<img alt="logo" class="logo" src={logo} />
<nav class="flex items-center justify-center space-x-4">
{!isLoggedIn() ?
(
location.pathname !== '/signup' ? (
<A href="/signup" class="px-4 py-2 rounded text-white">
<Button>Sign Up</Button>
</A>
) : (
<A href="/login" class="px-4 py-2 rounded text-white">
<Button>Login</Button>
</A>
)
{!isLoggedIn() ? (
location.pathname !== '/signup' ? (
<A href="/signup" class="px-4 py-2 rounded text-white">
<Button>Sign Up</Button>
</A>
) : (
<A href="/login" class="px-4 py-2 rounded text-white">
<Button>Login</Button>
</A>
)
) : (
<>
<A href="/" class="px-4 py-2 rounded text-white">
Expand Down Expand Up @@ -99,13 +98,13 @@ export default App
render(
() => (
<AuthProvider>
<Router root={App} >
<Route path="/" component={Home} />
<Route path="/login" component={Login} />
<Route path="/signup" component={Signup} />
<Route path="/analytics" component={BarChart} />
<Route path="/settings" component={Settings} />
<Route path="/onboarding" component={Onboarding} />
<Router root={App}>
<Route path="/" component={Home} />
<Route path="/login" component={Login} />
<Route path="/signup" component={Signup} />
<Route path="/analytics" component={BarChart} />
<Route path="/settings" component={Settings} />
<Route path="/onboarding" component={Onboarding} />
</Router>
</AuthProvider>
),
Expand Down

0 comments on commit 3ede9b9

Please sign in to comment.