-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add loader image, edit upscayl script
- Loading branch information
1 parent
1fc4897
commit 8351581
Showing
13 changed files
with
168 additions
and
101 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file was deleted.
Oops, something went wrong.
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
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
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 |
---|---|---|
@@ -1,50 +1,58 @@ | ||
{ | ||
"private": true, | ||
"name": "super-resolution", | ||
"description": "Free and open source AI image upscaler. It uses the latest AI technology to upscale images to higher resolutions.", | ||
"version": "1.2.0", | ||
"author": "Urij Horuzij", | ||
"homepage": "https://github.com/UrijHoruzij/super-resolution", | ||
"license": "MIT", | ||
"main": "main/background.js", | ||
"scripts": { | ||
"dev": "next dev", | ||
"electron": "electron .", | ||
"build": "next build && next export", | ||
"dist": "npm run build && electron-builder ", | ||
"dist:deb": "electron-builder build -l deb", | ||
"dist:rpm": "electron-builder build -l rpm", | ||
"dist:dmg": "electron-builder build -m dmg", | ||
"dist:pkg": "electron-builder build -m pkg", | ||
"dist:msi": "electron-builder build -w nsis", | ||
"publish-linux-app": "electron-builder -l --publish always", | ||
"publish-win-app": "electron-builder -w --publish always", | ||
"publish-mac-app": "electron-builder -m --publish always", | ||
"postinstall": "electron-builder install-app-deps", | ||
"prepare": "husky install" | ||
}, | ||
"dependencies": { | ||
"classnames": "^2.3.2", | ||
"electron-is-dev": "^2.0.0", | ||
"electron-reload": "^2.0.0-alpha.1", | ||
"electron-serve": "^1.1.0", | ||
"electron-settings": "^4.0.2", | ||
"electron-store": "^8.1.0", | ||
"electron-updater": "^5.2.1", | ||
"ui-forest": "^1.11.4" | ||
}, | ||
"devDependencies": { | ||
"@commitlint/cli": "^17.0.0", | ||
"@commitlint/config-conventional": "^17.0.0", | ||
"@semantic-release/changelog": "^6.0.2", | ||
"@semantic-release/git": "^10.0.1", | ||
"@semantic-release/npm": "^9.0.1", | ||
"electron": "^20.1.0", | ||
"electron-builder": "^23.3.3", | ||
"husky": "^8.0.1", | ||
"next": "^13.1.1", | ||
"next-transpile-modules": "^10.0.0", | ||
"react": "^18.2.0", | ||
"react-dom": "^18.2.0" | ||
} | ||
"private": true, | ||
"name": "super-resolution", | ||
"description": "Free and open source AI image upscaler. It uses the latest AI technology to upscale images to higher resolutions.", | ||
"version": "1.2.0", | ||
"author": "Urij Horuzij", | ||
"homepage": "https://github.com/UrijHoruzij/super-resolution", | ||
"license": "MIT", | ||
"main": "main/background.js", | ||
"scripts": { | ||
"dev": "next dev", | ||
"electron": "electron .", | ||
"build": "next build && next export", | ||
"dist": "npm run build && electron-builder ", | ||
"dist:deb": "electron-builder build -l deb", | ||
"dist:rpm": "electron-builder build -l rpm", | ||
"dist:dmg": "electron-builder build -m dmg", | ||
"dist:pkg": "electron-builder build -m pkg", | ||
"dist:msi": "electron-builder build -w nsis", | ||
"publish-linux-app": "electron-builder -l --publish always", | ||
"publish-win-app": "electron-builder -w --publish always", | ||
"publish-mac-app": "electron-builder -m --publish always", | ||
"postinstall": "electron-builder install-app-deps", | ||
"prepare": "husky install" | ||
}, | ||
"dependencies": { | ||
"classnames": "^2.3.2", | ||
"electron-is-dev": "^2.0.0", | ||
"electron-reload": "^2.0.0-alpha.1", | ||
"electron-serve": "^1.1.0", | ||
"electron-settings": "^4.0.2", | ||
"electron-store": "^8.1.0", | ||
"electron-updater": "^5.2.1", | ||
"ui-forest": "^1.11.4" | ||
}, | ||
"devDependencies": { | ||
"@commitlint/cli": "^17.0.0", | ||
"@commitlint/config-conventional": "^17.0.0", | ||
"@semantic-release/changelog": "^6.0.2", | ||
"@semantic-release/git": "^10.0.1", | ||
"@semantic-release/npm": "^9.0.1", | ||
"electron": "^20.1.0", | ||
"electron-builder": "^23.3.3", | ||
"husky": "^8.0.1", | ||
"next": "^13.1.1", | ||
"next-transpile-modules": "^10.0.0", | ||
"react": "^18.2.0", | ||
"react-dom": "^18.2.0" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/UrijHoruzij/super-resolution.git" | ||
}, | ||
"keywords": [], | ||
"bugs": { | ||
"url": "https://github.com/UrijHoruzij/super-resolution/issues" | ||
} | ||
} |
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 @@ | ||
.wrapper { | ||
position: relative; | ||
width: fit-content; | ||
} | ||
.loader { | ||
position: absolute; | ||
top: 50%; | ||
left: 50%; | ||
transform: translate(-50%, -50%); | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
justify-content: center; | ||
} | ||
.blur { | ||
filter: blur(8px); | ||
} | ||
.percent { | ||
margin-top: 12px; | ||
font-size: 16px; | ||
color: var(--white); | ||
} |
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,29 @@ | ||
import { SliderBeforeAfter } from 'ui-forest'; | ||
import classnames from 'classnames'; | ||
import { Spinner } from '../'; | ||
import styles from './Image.module.css'; | ||
|
||
const Image = (props) => { | ||
const { after, before, progress, percent } = props; | ||
return ( | ||
<div className={styles.wrapper}> | ||
<div | ||
className={classnames({ | ||
[styles.blur]: progress, | ||
})}> | ||
{after ? ( | ||
<SliderBeforeAfter size={250} urlFirstImage={before} urlSecondImage={after}></SliderBeforeAfter> | ||
) : ( | ||
<SliderBeforeAfter size={250} urlFirstImage={before}></SliderBeforeAfter> | ||
)} | ||
</div> | ||
{progress && ( | ||
<div className={styles.loader}> | ||
<Spinner /> | ||
<div className={styles.percent}>{percent.toFixed(0)}%</div> | ||
</div> | ||
)} | ||
</div> | ||
); | ||
}; | ||
export default Image; |
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,18 @@ | ||
.spinner { | ||
display: block; | ||
height: 50px; | ||
width: 50px; | ||
border: 4px rgba(255, 255, 255, 0.15) solid; | ||
border-top: 4px white solid; | ||
border-radius: 50%; | ||
animation: spin 1s infinite linear; | ||
} | ||
|
||
@keyframes spin { | ||
from { | ||
transform: rotate(0deg); | ||
} | ||
to { | ||
transform: rotate(359deg); | ||
} | ||
} |
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 @@ | ||
import styles from './Spinner.module.css'; | ||
|
||
const Spinner = () => { | ||
return <div className={styles.spinner}></div>; | ||
}; | ||
export default Spinner; |
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
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