Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
simon-jaeger committed Nov 26, 2020
0 parents commit 300083e
Show file tree
Hide file tree
Showing 47 changed files with 13,169 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
.DS_Store
node_modules
/dist
/out


# local env files
.env.local
.env.*.local

# Log files
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*

# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Magius

A tag based image manager.

## Features

- Open existing directories and browse the images within
- Tag your images to easily find them again
- Tags can be added and removed in bulk and even renamed later on
- Drag and drop files directly into and out of Magius

## Screenshots

![](./readme/demo1.png)

![](./readme/demo2.png)
2 changes: 2 additions & 0 deletions chrome-extensions/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*
!.gitignore
Binary file added drag-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions drag-icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
44 changes: 44 additions & 0 deletions init.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
const {app, session, protocol, ipcMain, BrowserWindow} = require("electron")
const config = require("./magius.config")

if (config.devMode) process.env["ELECTRON_DISABLE_SECURITY_WARNINGS"] = "true"

app.whenReady().then(async () => {
if (config.devMode) {
await session["defaultSession"].loadExtension(__dirname + "/chrome-extensions/vue-devtools")
await session["defaultSession"].loadExtension(__dirname + "/chrome-extensions/surfingkeys")
protocol.registerFileProtocol("file", (request, cb) => {
const pathname = request.url.replace("file:///", "").replace("%20", " ")
cb(pathname)
})
}

const win = new BrowserWindow({
show: false,
backgroundColor: "#1E1E21",
webPreferences: {
nodeIntegration: true,
enableRemoteModule: true,
webSecurity: !config.devMode,
},
})
if (config.devMode)
await win.loadURL("http://localhost:8080")
else
await win.loadFile("./dist/index.html")
win.setMenuBarVisibility(false)
win.maximize()
win.show()

if (config.devMode) {
win.setMenuBarVisibility(true)
win.webContents.openDevTools()
}
})

ipcMain.on('ondragstart', (event, filePaths) => {
event.sender.startDrag({
files: filePaths,
icon: __dirname + '/drag-icon.png'
})
})
3 changes: 3 additions & 0 deletions magius.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
devMode: 1,
}
Loading

0 comments on commit 300083e

Please sign in to comment.