Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

little fixes ui #3

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions app/API.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ API.Result = class {
let data = [];
if (Array.isArray(json.data)) {
data = json.data.map(item => {
console.log(item.url);
return {
url: item.images.original.url,
page: item.url,
Expand Down
5 changes: 3 additions & 2 deletions app/Preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,16 @@ class Preview {
this._image = Element.create(
"img",
{
src: fixedWidth
src: fixedWidth,
style:'object-fit: contain'
}
);

this._element = Element.create(
"div",
{
class: "preview",
style: `height:${this._height}px`,
style: `height:${this._height}px; width: 50%;`,
},
this._image,
Element.create(
Expand Down
11 changes: 8 additions & 3 deletions app/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@
--main-radius: 5px;
}

::-webkit-scrollbar {
display: none;
}

body {
font: 14px BlinkMacSystemFont;
}
Expand Down Expand Up @@ -91,7 +95,8 @@ footer {
top: var(--main-offset);
z-index: 10;
width: 100vw;
padding: 0.25em 0.5em 0.3em;
height: 50px;
padding: 0.5em 0.8em 0.5em;
font-size: inherit;
background-color: white;
border: none;
Expand All @@ -118,9 +123,9 @@ footer {
top: 24px;
right: 0;
left: 0;
margin-top: calc(50% - 100px + 2em);
margin-top: calc(35% - 100px + 2em);
padding-top: calc(100px + 1em);
font-family: Consolas;
font-family: inherit;
text-align: center;
content: "No Results";
background: url("../assets/no-results.gif") center/contain no-repeat;
Expand Down
Binary file modified assets/Icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed assets/Tray.png
Binary file not shown.
Binary file removed assets/Tray@2x.png
Binary file not shown.
File renamed without changes.
Binary file added assets/logo-big/black/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 assets/logo-big/black/icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/logo-big/black/icon@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/logo-big/black/icon@3x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/logo-big/black/icon@4x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/logo-big/white/icon-white.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 assets/logo-big/white/icon-white.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/logo-big/white/icon-white@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/logo-big/white/icon-white@3x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/logo-big/white/icon-white@4x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 6 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const Electron = require("electron");
const {nativeImage} = require("electron");

require("electron-debug")();
require("electron-dl")();
Expand All @@ -7,7 +8,7 @@ Electron.app.dock.hide();

const Size = {
Arrow: 12,
Width: 301,
Width: 500,
Height: 400,
};

Expand All @@ -20,9 +21,10 @@ let browser = null;

function createTray() {
if (tray)
return;

tray = new Electron.Tray(`${__dirname}/assets/Tray.png`);
return
let image = nativeImage.createFromPath(`${__dirname}/assets/icon.png`);
image.setTemplateImage(true);
tray = new Electron.Tray(image);
tray.on("click", (event, bounds) => {
if (!browser)
createBrowser();
Expand Down