Skip to content

Commit

Permalink
notifications;sounds;update improvements;
Browse files Browse the repository at this point in the history
  • Loading branch information
lacymorrow committed Mar 24, 2022
1 parent 5789143 commit f452b79
Show file tree
Hide file tree
Showing 61 changed files with 391 additions and 84 deletions.
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@
"test": "npm run lint",
"css": "sass src/index.scss:src/css/index.css src/preferences.scss:src/css/preferences.css -s compressed",
"start": "npm run css && electron --trace-warnings . ",
"dev": "nodemon 'npm run css && electron .'",
"watch": "watch 'npm run css && electron .' --ignoreDirectoryPattern '/css/'",
"release": "np",
"release:snap": "snapcraft upload --release=CrossOver*.snap",
"pack": "rm -f *.tgz && electron-builder --dir",
Expand All @@ -39,10 +37,13 @@
"build:wl": "electron-builder -wl --ia32 --x64",
"build:mw": "electron-builder -wm --arm64 --ia32 --x64",
"build:deb": "electron-builder --linux deb",
"build:release": "rm -rf dist && npm run build:mac && npm run build:wl && npm run sh:copyexe"
"build:snap": "electron-builder --linux snap",
"build:release": "rm -rf dist && npm run build:mac && npm run build:wl && npm run build:snap && npm run sh:copyexe",
"deploy": "electron-builder build --macos --win --publish always"
},
"dependencies": {
"electron-debug": "^3.0.1",
"electron-log": "^4.4.6",
"electron-preferences": "../electron-preferences",
"electron-reloader": "^1.2.0",
"electron-unhandled": "^4.0.1",
Expand Down
10 changes: 10 additions & 0 deletions src/config/config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
/* eslint unicorn/prefer-module: 0 */
// Constants
const HOMEPAGE_URL = 'https://lacymorrow.github.io/crossover'
const RELEASES_URL = 'https://github.com/lacymorrow/crossover/releases/latest'
const APP_HEIGHT = 124
const APP_WIDTH = 200
const MAX_SHADOW_WINDOWS = 20
Expand All @@ -8,9 +10,17 @@ const SHADOW_WINDOW_OFFSET = 40

const SUPPORTED_IMAGE_FILE_TYPES = [ '.bmp', '.jpg', '.jpeg', 'jfif', 'jfi', 'jif', '.png', '.gif', '.webp' ]

const FILE_FILTERS = [
{ name: 'Images', extensions: SUPPORTED_IMAGE_FILE_TYPES },
{ name: 'All Files', extensions: [ '*' ] },
]

module.exports = {
APP_HEIGHT,
APP_WIDTH,
FILE_FILTERS,
HOMEPAGE_URL,
RELEASES_URL,
MAX_SHADOW_WINDOWS,
SETTINGS_WINDOW_DEVTOOLS,
SHADOW_WINDOW_OFFSET,
Expand Down
4 changes: 4 additions & 0 deletions src/config/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
const config = require( './config.js' )
const EXIT_CODES = require( './exit-codes.js' )

module.exports = { config, EXIT_CODES }
2 changes: 1 addition & 1 deletion src/css/index.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/css/index.css.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<button class="close-button main button"><i data-feather="x-circle"></i></button>
<button class="settings-button button"><i data-feather="settings"></i></button>
<button class="center-button button"><i data-feather="target"></i></button>
<div class="drag-button button"><div class="aligner"><i data-feather="move"></i></div></div>
<div class="info-button button"><div class="aligner"><i class="move-icon" data-feather="move"></i><i class="info-icon d-none" data-feather="alert-circle"></i></div></div>

<div class="crosshair-wrapper">
<div id="crosshair">
Expand Down
29 changes: 22 additions & 7 deletions src/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ $border_color_focus: #569aff;
$border_color_hover: #888888;
$text_color: #676767;
$main_color: #555;

* {
box-sizing: border-box;
}
Expand Down Expand Up @@ -52,6 +53,14 @@ button {
}
}

.d-none {
display: none;
}

.d-inline-block {
display: inline-block;
}

.d-flex {
display: flex;
justify-content: space-between;
Expand Down Expand Up @@ -167,18 +176,22 @@ button {
}
}

.drag-button {
top: 2px;
right: 2px;
.info-button {
top: 3px;
right: 3px;
left: 30px;
.feather {
width: 12px;
height: 12px;
width: 18px;
height: 18px;
}
.aligner {
display: flex;
justify-content: flex-end;
}
.info-icon.feather {
stroke: rgba(255, 87, 51, 0.95);
fill: white;
}
}

#crosshair {
Expand Down Expand Up @@ -219,7 +232,6 @@ button {
border-bottom-right-radius: 0;
border-bottom-left-radius: 0;
&:not(.dropping) {
.drag-button,
.crosshair-wrapper,
.crosshair-wrapper * {
// This is the magic to make things draggable
Expand All @@ -240,11 +252,14 @@ button {
&.mac .main.close-button {
display: none;
}
.drag-button {
.info-button {
cursor: grab;
&:active {
cursor: grabbing;
}
.info-icon {
cursor: pointer;
}
}
.center-button {
// Allow center on double-click (Windows; https://github.com/lacymorrow/crossover/issues/32)
Expand Down

0 comments on commit f452b79

Please sign in to comment.