Fix: Incorrect components update when not connected. Fix: Global alerts are displayed incorrectly at startup. Fix: CPU Cores option now displays correct information about its operation. Renamed automatic scale methods. Added: CUDA 10.2 download button for Waifu2X. Added: DreamPower v1.2.7 mp4 video support.tags/v1.5.0-rc2.2
@@ -20,7 +20,7 @@ on: | |||
jobs: | |||
build: | |||
name: ${{ matrix.platform }} | |||
name: ${{ matrix.platform }} (${{ matrix.type }}) | |||
runs-on: ${{ matrix.os }} | |||
# Strategy | |||
@@ -28,12 +28,15 @@ jobs: | |||
# https://help.github.com/en/articles/workflow-syntax-for-github-actions#jobsjob_idstrategy | |||
strategy: | |||
fail-fast: true | |||
max-parallel: 3 | |||
max-parallel: 2 | |||
matrix: | |||
os: | |||
- ubuntu-latest | |||
- windows-latest | |||
- macOS-latest | |||
type: | |||
- installer | |||
- portable | |||
include: | |||
- os: ubuntu-latest # Ubuntu | |||
@@ -69,12 +72,14 @@ jobs: | |||
- name: Build Installer | |||
working-directory: src/ | |||
if: matrix.type == 'installer' | |||
env: | |||
GITHUB_SHA: ${{ github.sha }} | |||
run: yarn run build | |||
- name: Build Portable | |||
working-directory: src/ | |||
if: matrix.type == 'portable' | |||
env: | |||
GITHUB_SHA: ${{ github.sha }} | |||
BUILD_PORTABLE: true |
@@ -34,7 +34,7 @@ | |||
.box__photo__preview { | |||
@apply absolute top-0 bottom-0 left-0 right-0 z-10; | |||
@apply bg-contain bg-no-repeat bg-center m-6; | |||
@apply bg-contain bg-no-repeat bg-center m-3; | |||
} | |||
} | |||
@@ -1,30 +1,28 @@ | |||
<template> | |||
<div class="box lesson" :class="{ 'lesson--small': small }" @click="$emit('click')"> | |||
<div class="box__photo" :class="[`photo--${lesson.photo}`]" /> | |||
<div class="box__header"> | |||
<span class="title">{{ lesson.title }}</span> | |||
</div> | |||
<div class="box__content" v-html="content" /> | |||
<div v-if="!small" class="box__footer text-center"> | |||
<a v-for="(button,key) in lesson.buttons" | |||
:key="key" | |||
:href="button.href" | |||
target="_blank" | |||
class="button button--sm"> | |||
{{ button.text }} | |||
</a> | |||
</div> | |||
</div> | |||
<AppBox class="lesson" | |||
:class="{ 'lesson--small': small }" | |||
:photo="`photo--${lesson.photo}`" | |||
:title="lesson.title" | |||
:content="content" | |||
@click="$emit('click')"> | |||
<template v-slot:footer> | |||
<div v-if="!small" class="box__footer text-center"> | |||
<a v-for="(button,key) in lesson.buttons" | |||
:key="key" | |||
:href="button.href" | |||
:data-href="button.href" | |||
target="_blank" | |||
class="button button--sm" | |||
@click="onButtonClick"> | |||
{{ button.text }} | |||
</a> | |||
</div> | |||
</template> | |||
</AppBox> | |||
</template> | |||
<script> | |||
import MarkdownIt from 'markdown-it' | |||
import { truncate } from 'lodash' | |||
const md = new MarkdownIt() | |||
import { truncate, startsWith } from 'lodash' | |||
export default { | |||
props: { | |||
@@ -49,7 +47,16 @@ export default { | |||
content = this.lesson.content | |||
} | |||
return md.render(content) | |||
return content | |||
}, | |||
}, | |||
methods: { | |||
onButtonClick(event) { | |||
if (startsWith(event.srcElement.dataset.href, '/')) { | |||
event.preventDefault() | |||
this.$router.push(event.srcElement.dataset.href) | |||
} | |||
}, | |||
}, | |||
} | |||
@@ -64,57 +71,63 @@ export default { | |||
@apply text-sm ml-3; | |||
} | |||
} | |||
} | |||
.lesson--small { | |||
.title { | |||
@apply text-base; | |||
} | |||
&::v-deep { | |||
&.lesson--small { | |||
.title { | |||
@apply text-base; | |||
} | |||
&::v-deep .box__content { | |||
@apply text-xs #{!important}; | |||
} | |||
} | |||
.box__content { | |||
@apply text-xs #{!important}; | |||
} | |||
} | |||
/* purgecss start ignore */ | |||
.box__photo { | |||
@apply bg-contain; | |||
.photo--drag { | |||
//background-color: #593C48; | |||
background-image: url('~assets/images/undraw/undraw_throw_down_ub2l.svg') | |||
} | |||
&.photo--drag { | |||
@apply bg-menus-dark; | |||
//background-color: #593C48; | |||
background-image: url('~assets/images/undraw/undraw_throw_down_ub2l.svg') | |||
} | |||
.photo--tips { | |||
//background-color: #C27091; | |||
background-image: url('~assets/images/undraw/undraw_depi_wexf.svg') | |||
} | |||
&.photo--tips { | |||
background-color: #C27091; | |||
background-image: url('~assets/images/undraw/undraw_depi_wexf.svg') | |||
} | |||
.photo--settings { | |||
//background-color: #C27091; | |||
background-image: url('~assets/images/undraw/undraw_personal_settings_kihd.svg') | |||
} | |||
&.photo--settings { | |||
background-color: #C27091; | |||
background-image: url('~assets/images/undraw/undraw_personal_settings_kihd.svg') | |||
} | |||
.photo--preferences { | |||
//background-color: #607AA9; | |||
background-image: url('~assets/images/undraw/undraw_making_art_759c.svg') | |||
} | |||
&.photo--preferences { | |||
background-color: #607AA9; | |||
background-image: url('~assets/images/undraw/undraw_making_art_759c.svg') | |||
} | |||
.photo--better-results { | |||
//background-color: #607AA9; | |||
background-image: url('~assets/images/undraw/undraw_blank_canvas_3rbb.svg') | |||
} | |||
&.photo--better-results { | |||
background-color: #607AA9; | |||
background-image: url('~assets/images/undraw/undraw_blank_canvas_3rbb.svg') | |||
} | |||
.photo--tips-ads { | |||
//background-color: #506896; | |||
background-image: url('~assets/images/undraw/undraw_elements_cipa.svg') | |||
} | |||
&.photo--tips-ads { | |||
background-color: #506896; | |||
background-image: url('~assets/images/undraw/undraw_elements_cipa.svg') | |||
} | |||
.photo--preferences-mode { | |||
//background-color: #D9B6C4; | |||
background-image: url('~assets/images/undraw/undraw_selected_options_42hx.svg') | |||
} | |||
&.photo--preferences-mode { | |||
background-color: #D9B6C4; | |||
background-image: url('~assets/images/undraw/undraw_selected_options_42hx.svg') | |||
.photo--videos { | |||
background-image: url('~assets/images/undraw/undraw_video_files_fu10.svg') | |||
} | |||
} | |||
} | |||
/* purgecss start ignore */ | |||
.box__photo { | |||
@apply bg-contain; | |||
} | |||
/* purgecss end ignore */ | |||
</style> |
@@ -1,5 +1,11 @@ | |||
<template> | |||
<div class="preview" :style="photoURL" data-private> | |||
<video v-if="isVideo" | |||
:src="file.url" | |||
autoplay | |||
muted | |||
loop /> | |||
<NudifyPhotoBadge v-if="badge" :photo="photo" /> | |||
</div> | |||
</template> | |||
@@ -24,19 +30,21 @@ export default { | |||
}, | |||
computed: { | |||
photoURL() { | |||
let { file } = this.photo | |||
isVideo() { | |||
return this.photo.file.isVideo | |||
}, | |||
if (this.live && this.photo.finished && this.photo.runs.length > 0) { | |||
const [run] = this.photo.runs | |||
file() { | |||
return this.live ? this.photo.previewFile : this.photo.file | |||
}, | |||
if (run.outputFile && run.outputFile.exists) { | |||
file = run.outputFile | |||
} | |||
photoURL() { | |||
if (this.isVideo) { | |||
return {} | |||
} | |||
return { | |||
backgroundImage: `url("${file.url}")`, | |||
backgroundImage: `url("${this.file.url}")`, | |||
} | |||
}, | |||
}, | |||
@@ -47,6 +55,10 @@ export default { | |||
.preview { | |||
@apply absolute top-0 bottom-0 left-0 right-0 z-10; | |||
@apply bg-contain bg-no-repeat bg-center; | |||
video { | |||
@apply h-full w-full overflow-hidden; | |||
} | |||
} | |||
.badge { |
@@ -1,7 +1,15 @@ | |||
<template> | |||
<div class="box run" :class="previewClass"> | |||
<div class="box__photo run__photo" data-private> | |||
<div v-if="file.exists" | |||
<video v-if="file.exists && isVideo" | |||
:src="file.url" | |||
class="run__video__preview" | |||
autoplay | |||
muted | |||
loop | |||
@click="openPreview" /> | |||
<div v-else-if="file.exists" | |||
class="run__photo__preview" | |||
:style="{ backgroundImage: `url('${file.url}')` }" | |||
@click="openPreview" /> | |||
@@ -37,34 +45,35 @@ | |||
</div> | |||
<div class="box__footer buttons"> | |||
<div v-if="run.running" class="button button--sm"> | |||
<div v-if="run.running" key="button-status" class="button button--sm"> | |||
<span class="icon"> | |||
<font-awesome-icon icon="running" /> | |||
</span> | |||
<span>{{ run.timer.duration }}s</span> | |||
</div> | |||
<div v-else-if="run.failed" class="button button--danger button--sm"> | |||
<div v-else-if="run.failed" key="button-status" class="button button--danger button--sm"> | |||
<span class="icon"> | |||
<font-awesome-icon icon="exclamation-circle" /> | |||
</span> | |||
<span>Error!</span> | |||
</div> | |||
<div v-else-if="run.finished" class="button button--sm"> | |||
<div v-else-if="run.finished" key="button-status" class="button button--sm"> | |||
<span class="icon"> | |||
<font-awesome-icon icon="heart" /> | |||
</span> | |||
<span>{{ run.timer.duration }}s</span> | |||
</div> | |||
<div v-else class="button button--sm"> | |||
<div v-else key="button-status" class="button button--sm"> | |||
<span> | |||
<font-awesome-icon icon="clock" /> | |||
</span> | |||
</div> | |||
<button | |||
key="button-terminal" | |||
v-tooltip="'View terminal'" | |||
class="button button--sm" | |||
@click.prevent="$refs.terminalDialog.showModal()"> | |||
@@ -83,6 +92,7 @@ | |||
<button | |||
v-if="run.finished && run.outputFile.exists" | |||
key="button-save" | |||
class="button button--success button--sm" | |||
@click.prevent="save"> | |||
<span class="icon"> | |||
@@ -92,6 +102,7 @@ | |||
</button> | |||
<button v-if="run.finished" | |||
key="button-rerun" | |||
class="button button--info button--sm" | |||
@click.prevent="rerun"> | |||
<span class="icon"> | |||
@@ -101,6 +112,7 @@ | |||
</button> | |||
<button v-if="run.running" | |||
key="button-stop" | |||
v-tooltip="'Stop'" | |||
class="button button--danger button--sm" | |||
@click.prevent="cancel"> | |||
@@ -153,6 +165,10 @@ export default { | |||
}, | |||
computed: { | |||
isVideo() { | |||
return this.run.photo.file.isVideo | |||
}, | |||
file() { | |||
return this.run.outputFile | |||
}, | |||
@@ -242,6 +258,11 @@ export default { | |||
cursor: zoom-in; | |||
} | |||
.run__video__preview { | |||
@apply h-full w-full overflow-hidden; | |||
cursor: zoom-in; | |||
} | |||
.run__preferences { | |||
@apply absolute top-0 z-20; | |||
@apply flex opacity-0 bg-menus-default-80 w-full; |
@@ -1,7 +1,14 @@ | |||
<template> | |||
<div class="box photo"> | |||
<div class="box__photo"> | |||
<div class="photo__preview" | |||
<video v-if="file.isVideo" | |||
:src="file.url" | |||
autoplay | |||
muted | |||
loop /> | |||
<div v-else | |||
class="photo__preview" | |||
:style="{ backgroundImage: `url('${file.url}')` }" | |||
@click="openPreview" /> | |||
</div> |
@@ -1,5 +1,5 @@ | |||
<template> | |||
<div class="box"> | |||
<div class="box" @click="$emit('click')"> | |||
<!-- Photo --> | |||
<div v-if="showPhoto" class="box__photo"> | |||
<slot name="photo"> |
@@ -38,14 +38,26 @@ | |||
<!-- Actions --> | |||
<div class="update__actions"> | |||
<button v-show="!updater.update.active" class="button button--success" @click.prevent="updater.start()"> | |||
<span class="icon"><font-awesome-icon icon="sync" /></span> | |||
Update | |||
</button> | |||
<a v-if="project === 'waifu' && $settings.processing.device === 'GPU'" | |||
v-tooltip="'Software required to use Waifu2X on GPU.'" | |||
class="button button--danger" | |||
href="https://developer.nvidia.com/cuda-10.2-download-archive" | |||
target="_blank"> | |||
<span class="icon"><font-awesome-icon icon="download" /></span> | |||
<span>CUDA 10.2</span> | |||
</a> | |||
<button v-show="updater.update.active" class="button button--danger" @click.prevent="updater.cancel()"> | |||
<span class="icon"><font-awesome-icon icon="stop" /></span> | |||
Cancel | |||
</button> | |||
<button v-tooltip="'Show a list of links to download the update manually.'" class="button button--info" @click.prevent="$refs.mirrorsDialog.show()"> | |||
<button v-tooltip="'List of links to download the update manually.'" class="button button--info" @click.prevent="$refs.mirrorsDialog.show()"> | |||
<span class="icon"><font-awesome-icon icon="link" /></span> | |||
Mirrors | |||
</button> | |||
</div> |
@@ -9,7 +9,7 @@ | |||
import fs from 'fs-extra' | |||
import { | |||
round, cloneDeep, isNil, isEmpty, isPlainObject, get, set, merge, | |||
cloneDeep, isNil, isEmpty, isPlainObject, get, set, merge, | |||
} from 'lodash' | |||
import { AppError } from './app-error' | |||
import { paths, system } from './tools' | |||
@@ -134,7 +134,6 @@ class Settings { | |||
_loadDefault() { | |||
const { v4: uuid } = require('uuid') | |||
const hasGPU = process.platform === 'darwin' ? false : system.graphics.length > 0 | |||
const cores = round(system.cpu?.cores / 2) || 1 | |||
this.payload = { | |||
version: 8, | |||
@@ -182,7 +181,7 @@ class Settings { | |||
processing: { | |||
device: hasGPU ? 'GPU' : 'CPU', | |||
gpus: [0], | |||
cores, | |||
cores: 1, | |||
usePython: false, | |||
}, | |||
@@ -438,6 +437,9 @@ class Settings { | |||
wizard: { | |||
waifu: false, | |||
}, | |||
processing: { | |||
cores: 1, | |||
}, | |||
app: { | |||
duplicates: false, | |||
showAds: true, |
@@ -154,13 +154,15 @@ export const transform = (run) => { | |||
// Device | |||
if (settings.processing.device === 'CPU') { | |||
args.push('--cpu', '--n-cores', settings.processing.cores) | |||
args.push('--cpu') | |||
} else { | |||
for (const id of settings.processing.gpus) { | |||
args.push('--gpu', id) | |||
} | |||
} | |||
args.push('--n-cores', settings.processing.cores) | |||
const { useColorTransfer, scaleMode } = preferences.advanced | |||
const { geometry } = photo | |||
@@ -7,6 +7,10 @@ | |||
"query": "The NVIDIA driver on your system is too old", | |||
"message": "The NVIDIA driver installed on your system is too old! If the drivers are up to date then your GPU is not compatible." | |||
}, | |||
{ | |||
"query": "CUDA environment is not correctly set up", | |||
"message": "To use Waifu2X with GPU it is necessary to install CUDA 10.2" | |||
}, | |||
{ | |||
"query": "no longer supports this GPU", | |||
"message": "The algorithm no longer supports your GPU." |
@@ -73,7 +73,7 @@ | |||
- text: Go to settings | |||
href: /settings | |||
summary: |- | |||
Do you think there are too many preferences? Or few? Change the preferences mode to show more or less options. | |||
Do you think there are too many preferences? Or few? Change the preferences mode! | |||
content: |- | |||
Preferences mode allows you to increase or decrease the number of options depending on your mood or experience using the application. | |||
@@ -88,10 +88,19 @@ | |||
- text: Go to settings | |||
href: /settings | |||
summary: |- | |||
In this space we can show you help tips, ads or nothing, **you are in control**. | |||
Now you can find help tips and advertising in this space. You can enable or disable this behavior in the settings. | |||
content: |- | |||
In this version of DreamTime you can find help tips and/or ads in the bottom right part of the application. | |||
You can enable or disable this behavior in the settings. | |||
- The ads displayed are controlled by DreamNet and is a way to support us and continue the development of the application. | |||
- title: Create nudes of videos! | |||
photo: videos | |||
summary: |- | |||
Don't just stay with static photos, you can also nudify gifs and mp4 videos! | |||
content: |- | |||
With DreamTime you can nudify gifs and mp4 videos, from the Internet or by uploading the files to the application. | |||
Keep in mind that this process can consume more resources from your system! |
@@ -67,7 +67,7 @@ | |||
- id: processing.device | |||
label: Device. | |||
description: Device that will be used to nudify. GPU is faster. | |||
description: Device that algorithms will use. GPU is faster. | |||
input: select | |||
options: | |||
- label: CPU | |||
@@ -81,7 +81,7 @@ | |||
- id: processing.cores | |||
label: CPU Cores. | |||
description: Increasing this can improve transformation speed but decrease system stability. | |||
description: "Using more cores increases the nudification speed for GIFs and videos but decrease stability. Recommended: 1" | |||
input: input | |||
- id: processing.usePython | |||
@@ -122,11 +122,11 @@ | |||
options: | |||
- label: None | |||
value: none | |||
- label: Fixed | |||
- label: "Automatic: Fixed" | |||
value: auto-rescale | |||
- label: Scale and Padding | |||
- label: "Automatic: Padding" | |||
value: auto-resize | |||
- label: Scale and Crop | |||
- label: "Automatic: Crop" | |||
value: auto-resize-crop | |||
- label: Overlay | |||
value: overlay | |||
@@ -137,11 +137,11 @@ | |||
animated-options: | |||
- label: None | |||
value: none | |||
- label: Fixed | |||
- label: "Automatic: Fixed" | |||
value: auto-rescale | |||
- label: Scale and Padding | |||
- label: "Automatic: Padding" | |||
value: auto-resize | |||
- label: Scale and Crop | |||
- label: "Automatic: Crop" | |||
value: auto-resize-crop | |||
- id: preferences.body.executions |
@@ -65,12 +65,22 @@ export class File extends EventEmitter { | |||
*/ | |||
exists = false | |||
/** | |||
* @type {boolean} | |||
* | |||
*/ | |||
loading = false | |||
/** | |||
* Hash MD5. | |||
* @type {string} | |||
*/ | |||
md5 | |||
/** | |||
* | |||
* | |||
*/ | |||
birthtime | |||
/** | |||
@@ -93,6 +103,24 @@ export class File extends EventEmitter { | |||
return this.dataURL || this.path | |||
} | |||
/** | |||
* | |||
* @type {boolean} | |||
* @readonly | |||
*/ | |||
get isAnimated() { | |||
return this.mimetype === 'image/gif' || this.mimetype === 'video/mp4' | |||
} | |||
/** | |||
* | |||
* @type {boolean} | |||
* @readonly | |||
*/ | |||
get isVideo() { | |||
return this.mimetype === 'video/mp4' | |||
} | |||
/** | |||
* Open a local file. | |||
* @param {string} filepath | |||
@@ -192,10 +220,16 @@ export class File extends EventEmitter { | |||
* @param {string} filepath | |||
*/ | |||
async load(filepath) { | |||
if (this.loading) { | |||
return this | |||
} | |||
if (!filepath) { | |||
filepath = this.path | |||
} | |||
this.loading = true | |||
this.emit('loading') | |||
const metadata = await getMetadata(filepath) | |||
@@ -204,6 +238,8 @@ export class File extends EventEmitter { | |||
this.emit('loaded') | |||
this.loading = false | |||
return this | |||
} | |||
@@ -223,7 +259,7 @@ export class File extends EventEmitter { | |||
this.md5 = metadata.md5 | |||
this.birthtime = metadata.birthtime | |||
if (this.options.storeDataURL) { | |||
if (this.options.storeDataURL && !this.isAnimated) { | |||
this.dataURL = metadata.dataURL | |||
} | |||
@@ -251,7 +287,14 @@ export class File extends EventEmitter { | |||
throw new Warning('Invalid photo.', `"${filePath}" does not exists.`) | |||
} | |||
if (mimetype !== 'image/jpeg' && mimetype !== 'image/png' && mimetype !== 'image/gif') { | |||
const validMimeTypes = [ | |||
'image/jpeg', | |||
'image/png', | |||
'image/gif', | |||
'video/mp4', | |||
] | |||
if (!validMimeTypes.includes(mimetype)) { | |||
throw new Warning('Invalid photo.', `<code>${filePath}</code> is not a valid photo. Only jpeg, png or gif.`) | |||
} | |||
} | |||
@@ -346,13 +389,26 @@ export class File extends EventEmitter { | |||
) | |||
} | |||
let filters = [ | |||
{ name: 'PNG', extensions: ['png'] }, | |||
{ name: 'JPG', extensions: ['jpg'] }, | |||
] | |||
if (this.mimetype === 'image/gif') { | |||
filters = [ | |||
{ name: 'GIF', extensions: ['gif'] }, | |||
] | |||
} | |||
if (this.mimetype === 'video/mp4') { | |||
filters = [ | |||
{ name: 'MP4', extensions: ['mp4'] }, | |||
] | |||
} | |||
const savePath = dialog.showSaveDialogSync({ | |||
defaultPath, | |||
filters: [ | |||
{ name: 'PNG', extensions: ['png'] }, | |||
{ name: 'JPG', extensions: ['jpg'] }, | |||
{ name: 'GIF', extensions: ['gif'] }, | |||
], | |||
filters, | |||
}) | |||
if (isNil(savePath)) { |
@@ -123,6 +123,8 @@ export class PhotoRun { | |||
if (file.extension === 'gif') { | |||
ext = 'gif' | |||
} else if (file.extension === 'mp4') { | |||
ext = 'mp4' | |||
} | |||
return `${name}-RUN${this.id}-${now}-dreamtime.${ext}` |
@@ -306,7 +306,7 @@ export class Photo { | |||
* @readonly | |||
*/ | |||
get canModify() { | |||
return this.file.mimetype !== 'image/gif' | |||
return !this.file.isAnimated | |||
} | |||
/** | |||
@@ -452,6 +452,25 @@ export class Photo { | |||
return this.file | |||
} | |||
/** | |||
* | |||
* | |||
* @readonly | |||
*/ | |||
get previewFile() { | |||
let file = this.inputFile | |||
if (this.finished && this.runs.length > 0) { | |||
const [run] = this.runs | |||
if (run.outputFile && run.outputFile.exists) { | |||
file = run.outputFile | |||
} | |||
} | |||
return file | |||
} | |||
/** | |||
* | |||
* @param {File} file |
@@ -47,7 +47,7 @@ export const achievements = { | |||
if (dice === 22) { | |||
// Lucky! | |||
window.$redirect('/games/badtime') | |||
events.emit('achievements.badtime') | |||
} | |||
} | |||
}, |
@@ -143,8 +143,8 @@ export const requirements = { | |||
version = await power.getVersion() | |||
const currentVersion = `v${process.env.npm_package_version}` | |||
const minimum = dreamtrack.get(['projects', 'dreamtime', 'releases', currentVersion, 'dreampower', 'minimum'], 'v0.0.1') | |||
const maximum = dreamtrack.get(['projects', 'dreamtime', 'releases', currentVersion, 'dreampower', 'maximum']) | |||
const minimum = dreamtrack.get(['projects', 'dreamtime', 'releases', currentVersion, 'dreampower', 'minimum'], 'v1.2.7') | |||
const maximum = dreamtrack.get(['projects', 'dreamtime', 'releases', currentVersion, 'dreampower', 'maximum'], 'v1.2.7') | |||
if (compareVersions.compare(version, minimum, '<')) { | |||
return false | |||
@@ -176,7 +176,7 @@ export const requirements = { | |||
const currentVersion = `v${process.env.npm_package_version}` | |||
const minimum = dreamtrack.get(['projects', 'dreamtime', 'releases', currentVersion, 'waifu', 'minimum'], 'v0.1.0') | |||
const maximum = dreamtrack.get(['projects', 'dreamtime', 'releases', currentVersion, 'waifu', 'maximum']) | |||
const maximum = dreamtrack.get(['projects', 'dreamtime', 'releases', currentVersion, 'waifu', 'maximum'], 'v0.1.0') | |||
if (compareVersions.compare(version, minimum, '<')) { | |||
return false |
@@ -73,8 +73,8 @@ class DreamPowerUpdater extends BaseUpdater { | |||
_getLatestCompatible(releases) { | |||
const currentVersion = `v${process.env.npm_package_version}` | |||
const minimum = dreamtrack.get(['projects', 'dreamtime', 'releases', currentVersion, 'dreampower', 'minimum'], 'v0.0.1') | |||
const maximum = dreamtrack.get(['projects', 'dreamtime', 'releases', currentVersion, 'dreampower', 'maximum']) | |||
const minimum = dreamtrack.get(['projects', 'dreamtime', 'releases', currentVersion, 'dreampower', 'minimum'], 'v1.2.7') | |||
const maximum = dreamtrack.get(['projects', 'dreamtime', 'releases', currentVersion, 'dreampower', 'maximum'], 'v1.2.7') | |||
if (!minimum) { | |||
return null |
@@ -53,8 +53,8 @@ class WaifuUpdater extends BaseUpdater { | |||
_getLatestCompatible(releases) { | |||
const currentVersion = `v${process.env.npm_package_version}` | |||
const minimum = dreamtrack.get(['projects', 'dreamtime', 'releases', currentVersion, 'waifu', 'minimum'], 'v0.0.1') | |||
const maximum = dreamtrack.get(['projects', 'dreamtime', 'releases', currentVersion, 'waifu', 'maximum']) | |||
const minimum = dreamtrack.get(['projects', 'dreamtime', 'releases', currentVersion, 'waifu', 'minimum'], 'v0.1.0') | |||
const maximum = dreamtrack.get(['projects', 'dreamtime', 'releases', currentVersion, 'waifu', 'maximum'], 'v0.1.0') | |||
if (!minimum) { | |||
return null |
@@ -121,7 +121,7 @@ module.exports = { | |||
* | |||
*/ | |||
purgeCSS: { | |||
enabled: false, // FIXME: Release Candidate 2 | |||
enabled: false, // FIXME: Final release | |||
mode: 'webpack', | |||
}, | |||
@@ -22,8 +22,9 @@ | |||
"build:nuxt": "yarn production nuxt build && yarn production nuxt export", | |||
"build:babel": "yarn production babel electron/src --out-dir electron/dist --minified", | |||
"build:electron": "yarn production electron-builder --publish=never --x64", | |||
"build:dev": "yarn run clean && yarn run build:nuxt && yarn run build:babel && yarn run build:electron", | |||
"build": "yarn run clean && yarn run build:nuxt && yarn run build:babel && yarn run optimize && yarn run build:electron", | |||
"build:pre": "yarn run clean && yarn run build:nuxt && yarn run build:babel", | |||
"build:post": "yarn run optimize && yarn run build:electron", | |||
"build": "yarn run build:pre && yarn run build:post", | |||
"preview:electron": "env-cmd -e default,production,preview --no-override electron .", | |||
"preview:production": "yarn build:nuxt && yarn build:babel && yarn preview:electron" | |||
}, |
@@ -1,31 +1,5 @@ | |||
<template> | |||
<div class="uploader"> | |||
<!-- Global alert --> | |||
<div v-if="alert" | |||
class="notification" | |||
v-html="alert" /> | |||
<!-- DreamTime Updater --> | |||
<div v-if="dreamtime.available" | |||
class="notification notification--warning cursor-pointer" | |||
@click="$router.push('/wizard/dreamtime')"> | |||
🎉 <strong>{{ $dream.name }} {{ dreamtime.latest.tag_name }}</strong> is available for download! | |||
</div> | |||
<!-- DreamPower Updater --> | |||
<div v-if="dreampower.available" | |||
class="notification notification--warning cursor-pointer" | |||
@click="$router.push('/wizard/power')"> | |||
🎉 <strong>{{ dreampower.displayName }} {{ dreampower.latest.tag_name }}</strong> is available for download! | |||
</div> | |||
<!-- Checkpoints Updater --> | |||
<div v-if="checkpoints.available" | |||
class="notification notification--warning cursor-pointer" | |||
@click="$router.push('/wizard/checkpoints')"> | |||
🎉 <strong>{{ checkpoints.displayName }} {{ checkpoints.latest.tag_name }}</strong> is available for download! | |||
</div> | |||
<!-- Menu --> | |||
<portal to="menu"> | |||
<section id="uploader-methods" class="menu__items"> | |||
@@ -59,6 +33,36 @@ | |||
</section> | |||
</portal> | |||
<!-- Global alert --> | |||
<div v-if="alert" class="notification"> | |||
<h5> | |||
<font-awesome-icon icon="exclamation-circle" /> | |||
NOTIFICATION | |||
</h5> | |||
<div v-html="alert" /> | |||
</div> | |||
<!-- DreamTime Updater --> | |||
<div v-if="dreamtime.available" | |||
class="notification notification--warning cursor-pointer" | |||
@click="$router.push('/wizard/dreamtime')"> | |||
🎉 <strong>{{ $dream.name }} {{ dreamtime.latest.tag_name }}</strong> is available for download! | |||
</div> | |||
<!-- DreamPower Updater --> | |||
<div v-if="dreampower.available" | |||
class="notification notification--warning cursor-pointer" | |||
@click="$router.push('/wizard/power')"> | |||
🎉 <strong>{{ dreampower.displayName }} {{ dreampower.latest.tag_name }}</strong> is available for download! | |||
</div> | |||
<!-- Checkpoints Updater --> | |||
<div v-if="checkpoints.available" | |||
class="notification notification--warning cursor-pointer" | |||
@click="$router.push('/wizard/checkpoints')"> | |||
🎉 <strong>{{ checkpoints.displayName }} {{ checkpoints.latest.tag_name }}</strong> is available for download! | |||
</div> | |||
<div class="uploader__methods"> | |||
<!-- Web Address --> | |||
<div v-show="selectionId === 0" class="methods__content"> | |||
@@ -70,7 +74,7 @@ | |||
<h3 class="subtitle"> | |||
Upload photos from the web. | |||
<span v-tooltip="'Only web addresses that end in: jpg, png or gif.'" class="help"> | |||
<span v-tooltip="'Only web addresses that end in: jpg, png, gif or mp4.'" class="help"> | |||
<font-awesome-icon icon="info-circle" /> | |||
</span> | |||
</h3> | |||
@@ -134,7 +138,7 @@ | |||
v-show="false" | |||
ref="photo" | |||
type="file" | |||
accept="image/jpeg, image/png, image/gif" | |||
accept="image/jpeg, image/png, image/gif, video/mp4" | |||
multiple | |||
@change="openFile"> | |||
@@ -288,7 +292,6 @@ export default { | |||
<style lang="scss" scoped> | |||
.uploader { | |||
@apply h-full flex; | |||
} | |||
.uploader__methods { |
@@ -11,7 +11,8 @@ | |||
</h3> | |||
<template v-slot:right> | |||
<button class="button" | |||
<button v-tooltip="'Open the developer tools. This includes the application logs.'" | |||
class="button" | |||
@click.prevent="openDevTools"> | |||
<span class="icon"><font-awesome-icon icon="code" /></span> | |||
<span>DevTools</span> |
@@ -36,7 +36,7 @@ | |||
</select> | |||
</SettingsField> | |||
<SettingsField v-show="value$.processing.device === 'CPU'" field-id="processing.cores" :attrs="{ type: 'number', min: 1, max: $provider.system.cores }" /> | |||
<SettingsField field-id="processing.cores" :attrs="{ type: 'number', min: 1, max: $provider.system.cores }" /> | |||
<SettingsField field-id="processing.usePython" /> | |||
</div> |
@@ -91,27 +91,21 @@ async function start() { | |||
return | |||
} | |||
const installerPath = path.resolve(DISTPATH, `${FILENAME}.${process.env.BUILD_EXTENSION}`) | |||
const portablePath = path.resolve(DISTPATH, `${FILENAME}-portable.zip`) | |||
let buildPath | |||
// Installer | |||
if (fs.existsSync(installerPath)) { | |||
console.log(`Installer: ${installerPath}`) | |||
const installer = new Release(installerPath) | |||
await run(installer) | |||
if (process.env.BUILD_PORTABLE) { | |||
buildPath = path.resolve(DISTPATH, `${FILENAME}-portable.zip`) | |||
} else { | |||
console.warn(`The installable version does not exist: ${installerPath}`) | |||
buildPath = path.resolve(DISTPATH, `${FILENAME}.${process.env.BUILD_EXTENSION}`) | |||
} | |||
// Portable | |||
if (fs.existsSync(installerPath)) { | |||
console.log(`Portable ${portablePath}`) | |||
if (fs.existsSync(buildPath)) { | |||
console.log(buildPath) | |||
const portable = new Release(portablePath) | |||
await run(portable) | |||
const release = new Release(buildPath) | |||
await run(release) | |||
} else { | |||
console.warn(`The portable version does not exist: ${portablePath}`) | |||
console.warn(`The file does not exist: ${buildPath}`) | |||
} | |||
// Print results |