-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit fab2c30
Showing
30 changed files
with
346 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
indent_style = space | ||
indent_size = 2 | ||
end_of_line = lf | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
node_modules | ||
dist | ||
out | ||
.gitignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
/* eslint-env node */ | ||
require('@rushstack/eslint-patch/modern-module-resolution') | ||
|
||
module.exports = { | ||
extends: [ | ||
'eslint:recommended', | ||
'plugin:@typescript-eslint/recommended', | ||
'plugin:prettier/recommended', | ||
'@electron-toolkit', | ||
'@electron-toolkit/eslint-config-ts/eslint-recommended' | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
node_modules | ||
dist | ||
out | ||
.DS_Store | ||
*.log* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
out | ||
dist | ||
pnpm-lock.yaml | ||
LICENSE.md | ||
tsconfig.json | ||
tsconfig.*.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
singleQuote: true | ||
semi: false | ||
printWidth: 100 | ||
trailingComma: none |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"recommendations": ["dbaeumer.vscode-eslint"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "Debug Main Process", | ||
"type": "node", | ||
"request": "launch", | ||
"cwd": "${workspaceRoot}", | ||
"runtimeExecutable": "${workspaceRoot}/node_modules/.bin/electron-vite", | ||
"windows": { | ||
"runtimeExecutable": "${workspaceRoot}/node_modules/.bin/electron-vite.cmd" | ||
}, | ||
"runtimeArgs": [ | ||
"--sourcemap" | ||
], | ||
"env": { | ||
"REMOTE_DEBUGGING_PORT": "9222" | ||
} | ||
}, | ||
], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"[typescript]": { | ||
"editor.defaultFormatter": "dbaeumer.vscode-eslint" | ||
}, | ||
"[javascript]": { | ||
"editor.defaultFormatter": "dbaeumer.vscode-eslint" | ||
}, | ||
"[json]": { | ||
"editor.defaultFormatter": "dbaeumer.vscode-eslint" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# 🔐 Kaspersky Password Manager for Linux | ||
|
||
Unofficial Electron application based on web version | ||
|
||
## Project Setup | ||
|
||
### Install | ||
|
||
```bash | ||
$ bun install | ||
``` | ||
|
||
### Development | ||
|
||
```bash | ||
$ bun run dev | ||
``` | ||
|
||
### Build | ||
|
||
```bash | ||
$ bun run build-linux | ||
``` |
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
[Desktop Entry] | ||
Name=Kaspersky Password Manager | ||
Name[en_US]=Kaspersky Password Manager | ||
Name[en_GB]=Kaspersky Password Manager | ||
Icon=${HOME}/.appimage/kpm/icon.png | ||
Exec=${HOME}/.appimage/kpm/kpm-linux.AppImage | ||
Path=${HOME}/.appimage/kpm | ||
Type=Application | ||
Categories=X-GNOME-Utilities; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
appId: ru.app64mb.kpm | ||
productName: kpm-linux | ||
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}' | ||
asarUnpack: | ||
- resources/** | ||
linux: | ||
target: | ||
- AppImage | ||
maintainer: 64mb | ||
category: Utility | ||
icon: resources/icons | ||
appImage: | ||
artifactName: ${name}.${ext} | ||
npmRebuild: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { defineConfig, externalizeDepsPlugin } from 'electron-vite' | ||
|
||
export default defineConfig({ | ||
main: { | ||
plugins: [externalizeDepsPlugin()] | ||
}, | ||
preload: { | ||
plugins: [externalizeDepsPlugin()] | ||
} | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
{ | ||
"name": "kpm-linux", | ||
"productName": "Kaspersky Password Manager", | ||
"description": "Kaspersky Password Manager for Linux", | ||
"version": "1.0.0", | ||
"main": "./out/main/index.js", | ||
"author": { | ||
"name": "64mb", | ||
"url": "https://github.com/64mb", | ||
"email": "[email protected]" | ||
}, | ||
"homepage": "https://github.com/64mb/kpm-linux", | ||
"repository": { | ||
"url": "https://github.com/64mb/kpm-linux" | ||
}, | ||
"scripts": { | ||
"format": "prettier --write .", | ||
"lint": "eslint . --ext .js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix", | ||
"typecheck": "tsc --noEmit -p tsconfig.node.json --composite false", | ||
"start": "electron-vite preview", | ||
"dev": "electron-vite dev", | ||
"postinstall": "electron-builder install-app-deps", | ||
"build": "npm run typecheck && electron-vite build", | ||
"build-linux": "npm run build && electron-builder --linux" | ||
}, | ||
"dependencies": { | ||
"@electron-toolkit/preload": "^3.0.0", | ||
"@electron-toolkit/utils": "^3.0.0" | ||
}, | ||
"devDependencies": { | ||
"@electron-toolkit/eslint-config": "^1.0.2", | ||
"@electron-toolkit/eslint-config-ts": "^1.0.1", | ||
"@electron-toolkit/tsconfig": "^1.0.1", | ||
"@typescript-eslint/eslint-plugin": "7.4.0", | ||
"@rushstack/eslint-patch": "^1.7.1", | ||
"@types/node": "^18.19.9", | ||
"electron": "^28.2.0", | ||
"electron-builder": "^24.9.1", | ||
"electron-vite": "^2.0.0", | ||
"eslint": "^8.56.0", | ||
"eslint-config-prettier": "9.1.0", | ||
"eslint-plugin-prettier": "5.1.3", | ||
"prettier": "^3.2.4", | ||
"typescript": "^5.3.3", | ||
"vite": "^5.0.12" | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
import { app, shell, BrowserWindow } from 'electron' | ||
import { join } from 'path' | ||
import { electronApp, optimizer } from '@electron-toolkit/utils' | ||
import icon from '../../resources/icon.png?asset' | ||
import { style } from './style' | ||
|
||
function createWindow(): void { | ||
const mainWindow = new BrowserWindow({ | ||
width: 900, | ||
height: 680, | ||
show: false, | ||
title: 'Kaspersky Password Manager', | ||
fullscreen: false, | ||
fullscreenable: false, | ||
autoHideMenuBar: true, | ||
...(process.platform === 'linux' ? { icon } : {}), | ||
minHeight: 560, | ||
minWidth: 780, | ||
webPreferences: { | ||
preload: join(__dirname, '../preload/index.js'), | ||
sandbox: false | ||
} | ||
}) | ||
|
||
mainWindow.loadURL('https://my.kaspersky.com/MyPasswords#/portal/pages/kpm/all') | ||
|
||
mainWindow.on('ready-to-show', () => { | ||
mainWindow.show() | ||
}) | ||
|
||
mainWindow.webContents.setWindowOpenHandler((details) => { | ||
shell.openExternal(details.url) | ||
return { action: 'deny' } | ||
}) | ||
|
||
const styleMin = style.replace(/\n/g, '') | ||
|
||
const contents = mainWindow.webContents | ||
contents.addListener('did-finish-load', () => { | ||
contents.insertCSS(styleMin) | ||
}) | ||
} | ||
|
||
app.whenReady().then(() => { | ||
// set app user model id for windows | ||
electronApp.setAppUserModelId('ru.app64mb.kpm') | ||
|
||
// default open or close DevTools by F12 in development | ||
// and ignore CommandOrControl + R in production | ||
// see https://github.com/alex8088/electron-toolkit/tree/master/packages/utils | ||
app.on('browser-window-created', (_, window) => { | ||
optimizer.watchWindowShortcuts(window) | ||
}) | ||
|
||
createWindow() | ||
|
||
app.on('activate', function () { | ||
// on macOS it's common to re-create a window in the app when the | ||
// dock icon is clicked and there are no other windows open | ||
if (BrowserWindow.getAllWindows().length === 0) createWindow() | ||
}) | ||
}) | ||
|
||
// quit when all windows are closed, except on macOS. There, it's common | ||
// for applications and their menu bar to stay active until the user quits | ||
// explicitly with Cmd + Q | ||
app.on('window-all-closed', () => { | ||
if (process.platform !== 'darwin') { | ||
app.quit() | ||
} | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
export const style = ` | ||
kl-header-menu, kpm-download-link, .header, .footer, .w-kpmSearch__voice-img, .microphone.microphone_off { | ||
display: none !important; | ||
} | ||
.w-kpmPageLayout__header { | ||
height: 52px !important; | ||
} | ||
.w-kpmPageLayout__header-title { | ||
font-size: 14px !important; | ||
} | ||
kl-desktop-menu ul kl-desktop-menu-item:nth-child(1), | ||
kl-desktop-menu ul kl-desktop-menu-item:nth-child(2), | ||
kl-desktop-menu ul kl-desktop-menu-item:nth-child(6), | ||
kl-desktop-menu ul kl-desktop-menu-item:nth-child(7), | ||
kl-desktop-menu ul kl-desktop-menu-item:nth-child(8) { | ||
display: none !important; | ||
} | ||
kl-desktop-menu ul .w-menu__item-scroller { | ||
display: none !important; | ||
} | ||
kl-desktop-menu ul { | ||
text-align: center !important; | ||
} | ||
.w-kpmListMenu { | ||
height: 680px !important; | ||
} | ||
.w-kpmPageLayout__nav-side { | ||
height: auto !important; | ||
} | ||
` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { ElectronAPI } from '@electron-toolkit/preload' | ||
|
||
declare global { | ||
interface Window { | ||
electron: ElectronAPI | ||
api: unknown | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { contextBridge } from 'electron' | ||
import { electronAPI } from '@electron-toolkit/preload' | ||
|
||
// Custom APIs for renderer | ||
const api = {} | ||
|
||
// use `contextBridge` APIs to expose Electron APIs to | ||
// renderer only if context isolation is enabled, otherwise | ||
// just add to the DOM global. | ||
if (process.contextIsolated) { | ||
try { | ||
contextBridge.exposeInMainWorld('electron', electronAPI) | ||
contextBridge.exposeInMainWorld('api', api) | ||
} catch (error) { | ||
console.error(error) | ||
} | ||
} else { | ||
// @ts-ignore (define in dts) | ||
window.electron = electronAPI | ||
// @ts-ignore (define in dts) | ||
window.api = api | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"files": [], | ||
"references": [ | ||
{ | ||
"path": "./tsconfig.node.json" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"extends": "@electron-toolkit/tsconfig/tsconfig.node.json", | ||
"include": [ | ||
"src/main/**/*", | ||
"src/preload/**/*" | ||
], | ||
"compilerOptions": { | ||
"composite": true, | ||
"types": [ | ||
"electron-vite/node" | ||
] | ||
} | ||
} |