Skip to content

Commit

Permalink
Fixed bug, when markdown link had no text, added start up time measur…
Browse files Browse the repository at this point in the history
…ement, bumped version number to v2.0.16-rc.2
  • Loading branch information
ransome1 committed Jan 17, 2025
1 parent dfde333 commit aa192b1
Show file tree
Hide file tree
Showing 7 changed files with 53 additions and 44 deletions.
2 changes: 1 addition & 1 deletion flatpak/com.github.ransome1.sleek.appdata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<developer_name>ransome1</developer_name>
<content_rating type="oars-1.1"/>
<releases>
<release version="2.0.16-rc.1" date="2025-01-15"/>
<release version="2.0.16" date="2025-01-18"/>
</releases>
<url type="homepage">https://github.com/ransome1/sleek</url>
<url type="contact">https://github.com/ransome1/sleek/issues</url>
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "sleek",
"productName": "sleek",
"version": "2.0.16",
"version": "2.0.16-rc.2",
"description": "todo.txt manager for Linux, Windows and MacOS, free and open-source (FOSS)",
"synopsis": "todo.txt manager for Linux, Windows and MacOS, free and open-source (FOSS)",
"keywords": [
Expand Down Expand Up @@ -34,7 +34,7 @@
"typecheck:web": "tsc --noEmit -p tsconfig.web.json --composite false",
"typecheck": "yarn typecheck:node && yarn typecheck:web",
"start": "electron-vite preview",
"dev": "electron-vite dev",
"dev": "yarn lint && electron-vite dev",
"build": "yarn peggy && electron-vite build",
"postinstall": "electron-builder install-app-deps",
"build:unpack": "yarn build && electron-builder --dir",
Expand All @@ -48,7 +48,7 @@
"@mui/icons-material": "^6.4.0",
"@mui/material": "^6.4.0",
"@mui/system": "^6.4.0",
"@mui/x-date-pickers": "^7.23.3",
"@mui/x-date-pickers": "^7.24.0",
"chokidar": "^4.0.3",
"dayjs": "^1.11.13",
"electron-store": "^10.0.0",
Expand All @@ -67,7 +67,7 @@
"@electron-toolkit/eslint-config-prettier": "^2.0.0",
"@electron-toolkit/eslint-config-ts": "^2.0.0",
"@electron-toolkit/tsconfig": "^1.0.1",
"@types/node": "^22.10.6",
"@types/node": "^22.10.7",
"@types/react": "^19.0.7",
"@types/react-dom": "^19.0.3",
"@typescript-eslint/parser": "^8.20.0",
Expand Down
2 changes: 1 addition & 1 deletion snap/snapcraft.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: sleek
base: core24
version: '2.0.16-rc.1'
version: '2.0.16'
summary: todo.txt manager for Linux, free and open-source (FOSS)
description: |
sleek is an open-source (FOSS) todo manager based on the todo.txt syntax. Stripped down to only the most necessary features, and with a clean and simple interface, sleek aims to help you focus on getting things done.
Expand Down
32 changes: 20 additions & 12 deletions src/main/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import macIcon from '../../resources/icon.icns?asset'
import windowsIcon from '../../resources/icon.ico?asset'
import linuxIcon from '../../resources/icon.png?asset'
import './modules/IpcMain.js'
let startTime;
const environment: string | undefined = process.env.NODE_ENV
let mainWindow: BrowserWindow | null = null
const eventListeners: Record<string, any | undefined> = {}
Expand Down Expand Up @@ -126,6 +127,20 @@ const createMainWindow = () => {
}
})

mainWindow.once('ready-to-show', () => {
const endTime = performance.now();
console.log(`Startup time: ${(endTime - startTime).toFixed(2)} ms`);
});

mainWindow
.on('resize', handleResize)
.on('move', handleMove)
.on('show', handleShow)
.on('closed', handleClosed)
.on('maximize', handleMaximize)
.on('unmaximize', handleUnmaximize)


if (!app.isPackaged && process.env['ELECTRON_RENDERER_URL']) {
mainWindow.loadURL(process.env['ELECTRON_RENDERER_URL'])
} else {
Expand All @@ -143,14 +158,6 @@ const createMainWindow = () => {

nativeTheme.themeSource = config.get('colorTheme')

mainWindow
.on('resize', handleResize)
.on('move', handleMove)
.on('show', handleShow)
.on('closed', handleClosed)
.on('maximize', handleMaximize)
.on('unmaximize', handleUnmaximize)

eventListeners.handleClosed = handleClosed
eventListeners.handleResize = handleResize
eventListeners.handleMove = handleMove
Expand All @@ -162,10 +169,6 @@ const createMainWindow = () => {
createTray()
}

if (environment === 'development') {
mainWindow.webContents.openDevTools()
}

const customStylesPath: string = config.get('customStylesPath')
if (customStylesPath) {
fs.readFile(customStylesPath, 'utf8', (error: Error | null, data) => {
Expand All @@ -176,6 +179,10 @@ const createMainWindow = () => {
console.error('Error reading the CSS file:', error)
}
})
}

if (environment === 'development') {
mainWindow.webContents.openDevTools()
}
}

Expand All @@ -202,6 +209,7 @@ const handleBeforeQuit = () => {
app
.whenReady()
.then(() => {
startTime = performance.now();
createMainWindow()
eventListeners.handleCreateWindow = handleCreateWindow
eventListeners.handleWindowAllClosed = handleWindowAllClosed
Expand Down
1 change: 1 addition & 0 deletions src/renderer/Grid/Renderer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ const RendererComponent: React.FC<RendererComponentProps> = memo(
})
},
a: ({ children, href }: { children: string; href?: string }): JSX.Element => {
if (!children) return false
const match = /([a-zA-Z]+:\/\/\S+)/g.exec(children)
const maxChars = 40
const truncatedChildren =
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/Themes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const baseTheme: Theme = createTheme({
borderRadius: '0.65em'
},
typography: {
fontFamily: 'FreeSans, Helvetica, Arial, sans-serif',
fontFamily: 'Helvetica, Arial, sans-serif',
fontSize: 'auto'
},
components: {
Expand Down
50 changes: 25 additions & 25 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -835,23 +835,23 @@
prop-types "^15.8.1"
react-is "^19.0.0"

"@mui/x-date-pickers@^7.23.3":
version "7.23.6"
resolved "https://registry.yarnpkg.com/@mui/x-date-pickers/-/x-date-pickers-7.23.6.tgz#0ffedd587b5efa14ac7c3ba92e0bd575b2f8a2e2"
integrity sha512-jt6rEAYLju3NZe3y2S+I5KcTiSHV79FW0jeNUEUTceg1qsPzseHbND66k3zVF0hO3N2oZtLtPywof6vN5Doe+Q==
"@mui/x-date-pickers@^7.24.0":
version "7.24.0"
resolved "https://registry.yarnpkg.com/@mui/x-date-pickers/-/x-date-pickers-7.24.0.tgz#ff19defe3ffc8918bb757727878eb4a55e6b7e99"
integrity sha512-oBM9Yp2H3tJ7qoHB4APQJYxZG4rz6JD4CwLzbzD9o3r+E1HGpGSLhwK3rDEz9VEjbOq8893Z2TGYLLWoyjeFXQ==
dependencies:
"@babel/runtime" "^7.25.7"
"@mui/utils" "^5.16.6 || ^6.0.0"
"@mui/x-internals" "7.23.6"
"@mui/x-internals" "7.24.0"
"@types/react-transition-group" "^4.4.11"
clsx "^2.1.1"
prop-types "^15.8.1"
react-transition-group "^4.4.5"

"@mui/x-internals@7.23.6":
version "7.23.6"
resolved "https://registry.yarnpkg.com/@mui/x-internals/-/x-internals-7.23.6.tgz#01b5fddf7a0045abefd6337561e6f3989baeab23"
integrity sha512-hT1Pa4PNCnxwiauPbYMC3p4DiEF1x05Iu4C1MtC/jMJ1LtthymLmTuQ6ZQ53/R9FeqK6sYd6A6noR+vNMjp5DA==
"@mui/x-internals@7.24.0":
version "7.24.0"
resolved "https://registry.yarnpkg.com/@mui/x-internals/-/x-internals-7.24.0.tgz#5d09d3d5d113e2be6ec2af49192024859951d348"
integrity sha512-lYa/XLltxNMY8YAFDopIHrXda2EAoqMCilyGMuPMz+WTG+b+StlUKqtj8cgFPQ/sa5dQ2fR7R3KJdjLREKUrlQ==
dependencies:
"@babel/runtime" "^7.25.7"
"@mui/utils" "^5.16.6 || ^6.0.0"
Expand Down Expand Up @@ -1212,21 +1212,21 @@
"@types/unist" "*"

"@types/ms@*":
version "0.7.34"
resolved "https://registry.yarnpkg.com/@types/ms/-/ms-0.7.34.tgz#10964ba0dee6ac4cd462e2795b6bebd407303433"
integrity sha512-nG96G3Wp6acyAgJqGasjODb+acrI7KltPiRxzHPXnP3NgI28bpQDRv53olbqGXbfcgF5aiiHmO3xpwEpS5Ld9g==
version "2.1.0"
resolved "https://registry.yarnpkg.com/@types/ms/-/ms-2.1.0.tgz#052aa67a48eccc4309d7f0191b7e41434b90bb78"
integrity sha512-GsCCIZDE/p3i96vtEqx+7dBUGXrc7zeSK3wwPHIaRThS+9OhWIXRqzs4d6k1SVU8g91DrNRWxWUGhp5KXQb2VA==

"@types/node@*", "@types/node@^22.10.6":
version "22.10.6"
resolved "https://registry.yarnpkg.com/@types/node/-/node-22.10.6.tgz#5c6795e71635876039f853cbccd59f523d9e4239"
integrity sha512-qNiuwC4ZDAUNcY47xgaSuS92cjf8JbSUoaKS77bmLG1rU7MlATVSiw/IlrjtIyyskXBZ8KkNfjK/P5na7rgXbQ==
"@types/node@*", "@types/node@^22.10.7":
version "22.10.7"
resolved "https://registry.yarnpkg.com/@types/node/-/node-22.10.7.tgz#14a1ca33fd0ebdd9d63593ed8d3fbc882a6d28d7"
integrity sha512-V09KvXxFiutGp6B7XkpaDXlNadZxrzajcY50EuoLIpQ6WWYCSvf19lVIazzfIzQvhUN2HjX12spLojTnhuKlGg==
dependencies:
undici-types "~6.20.0"

"@types/node@^20.9.0":
version "20.17.13"
resolved "https://registry.yarnpkg.com/@types/node/-/node-20.17.13.tgz#26a7d3e72724ed73bc2fd39a66a2ab17e6e19a00"
integrity sha512-RNf+4dEeV69PIvyp++4IKM2vnLXtmp/JovfeQm5P5+qpKb6wHoH7INywLdZ7z+gVX46kgBP/fwJJvZYaHxtdyw==
version "20.17.14"
resolved "https://registry.yarnpkg.com/@types/node/-/node-20.17.14.tgz#579e7d75eeb5d46b75c73c98821639e64b689608"
integrity sha512-w6qdYetNL5KRBiSClK/KWai+2IMEJuAj+EujKCumalFOwXtvOXaEan9AuwcRID2IcOIAWSIfR495hBtgKlx2zg==
dependencies:
undici-types "~6.19.2"

Expand Down Expand Up @@ -2448,9 +2448,9 @@ electron-store@^10.0.0:
type-fest "^4.20.0"

electron-to-chromium@^1.5.73:
version "1.5.82"
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.82.tgz#b9116ac6d6b6346c2baa49f14c1272ba2ce1ccdb"
integrity sha512-Zq16uk1hfQhyGx5GpwPAYDwddJuSGhtRhgOA2mCxANYaDT79nAeGnaXogMGng4KqLaJUVnOnuL0+TDop9nLOiA==
version "1.5.83"
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.83.tgz#3f74078f0c83e24bf7e692eaa855a998d1bec34f"
integrity sha512-LcUDPqSt+V0QmI47XLzZrz5OqILSMGsPFkDYus22rIbgorSvBYEFqq854ltTmUdHkY92FSdAAvsh4jWEULMdfQ==

electron-vite@^2.3.0:
version "2.3.0"
Expand Down Expand Up @@ -4684,9 +4684,9 @@ negotiator@^0.6.3:
integrity sha512-myRT3DiWPHqho5PrJaIRyaMv2kgYf0mUVgBNOYMuCH5Ki1yEiQaf/ZJuQ62nvpc44wL5WDbTX7yGJi1Neevw8w==

node-abi@^3.45.0:
version "3.72.0"
resolved "https://registry.yarnpkg.com/node-abi/-/node-abi-3.72.0.tgz#5b86a5aa53873a67c4c502a4a77e5a014f8f19f8"
integrity sha512-a28z9xAQXvDh40lVCknWCP5zYTZt6Av8HZqZ63U5OWxTcP20e3oOIy8yHkYfctQM2adR8ru1GxWCkS0gS+WYKA==
version "3.73.0"
resolved "https://registry.yarnpkg.com/node-abi/-/node-abi-3.73.0.tgz#4459ea77e71969edba8588387eecb05e2c2cff3b"
integrity sha512-z8iYzQGBu35ZkTQ9mtR8RqugJZ9RCLn8fv3d7LsgDBzOijGQP3RdKTX4LA7LXw03ZhU5z0l4xfhIMgSES31+cg==
dependencies:
semver "^7.3.5"

Expand Down

0 comments on commit aa192b1

Please sign in to comment.