Browse Source

- Minor improvements to the design.

- Improvement: Now some notifications (like the one for updates) can be closed and hidden.
- Fixed: In case DreamPower or Waifu2X have an internal problem, an error message with information about the problem will be displayed instead of entering a "compability error" loop.
- Fixed: In case there is a problem getting information about a component from Github it will display an error message with information about the problem instead of an error related to `getPath` when clicking on the Update button.
- Fixed: The checkpoint updater downloaded the file without the `.zip` extension resulting in the installation failing on some systems.
- Improvement: DreamPower error messages have been improved in some cases by offering links for a possible solution.
- Fixed: DreamTime Updater will now open the folder with the new downloaded version instead of failing on some systems.
- Improvement: Buttons have been added to go backwards or forwards in navigation.
- Improvement: Image size and compression options are now handled correctly when in "Minimal" or "Simple" mode.
- Fixed: Part of the top bar does not allow the resizing of the window.
- Improvement: The window dimensions are now saved and restored.
tags/v1.5.5
Ivan Bravo Bravo 4 months ago
parent
commit
05ab047211
52 changed files with 1426 additions and 789 deletions
  1. 1
    1
      src/assets/css/components/_box.scss
  2. 4
    0
      src/assets/css/components/_button.scss
  3. 6
    1
      src/assets/css/components/_notification.scss
  4. 8
    1
      src/assets/css/reset/_libs.scss
  5. 22
    7
      src/components/Layout/Navbar.vue
  6. 14
    3
      src/components/Layout/Titlebar.vue
  7. 2
    1
      src/components/Nudify/NudifyMaskPhoto.vue
  8. 1
    1
      src/components/Nudify/NudifyPhotoPreview.vue
  9. 3
    1
      src/components/Nudify/NudifyPhotoRun.vue
  10. 1
    1
      src/components/Page/PageHeader.vue
  11. 2
    0
      src/components/Photo.vue
  12. 4
    6
      src/components/Queue/QueueMenu.vue
  13. 6
    0
      src/components/Settings/SettingsField.vue
  14. 55
    0
      src/components/UI/AppNotification.vue
  15. 2
    2
      src/components/UI/MenuItem.vue
  16. 29
    3
      src/components/UI/ProjectUpdate.vue
  17. 11
    4
      src/electron/src/index.js
  18. 20
    2
      src/electron/src/modules/settings.js
  19. 30
    8
      src/electron/src/modules/tools/power.js
  20. 30
    8
      src/electron/src/modules/tools/waifu.js
  21. 91
    47
      src/modules/config/cli-errors.json
  22. 6
    6
      src/modules/config/settings.yml
  23. 9
    1
      src/modules/consola/errors.js
  24. 3
    1
      src/modules/consola/log.js
  25. 3
    3
      src/modules/dream.js
  26. 6
    4
      src/modules/nudify/photo-run.js
  27. 1
    9
      src/modules/nudify/photo.js
  28. 1
    1
      src/modules/projects/checkpoints.js
  29. 4
    0
      src/modules/projects/dreamtime.js
  30. 2
    2
      src/modules/services/logrocket.js
  31. 46
    32
      src/modules/system/requirements.js
  32. 30
    37
      src/modules/updater/base.js
  33. 1
    16
      src/modules/updater/dreampower.js
  34. 3
    21
      src/modules/updater/dreamtime.js
  35. 1
    11
      src/modules/updater/waifu.js
  36. 1
    10
      src/nuxt.config.js
  37. 50
    50
      src/package.json
  38. 1
    1
      src/package.min.json
  39. 79
    0
      src/pages/garden.vue
  40. 15
    12
      src/pages/index.vue
  41. 1
    1
      src/pages/nudify/_id.vue
  42. 5
    0
      src/pages/nudify/_id/preferences.vue
  43. 5
    0
      src/pages/nudify/_id/results.vue
  44. 23
    3
      src/pages/photos.vue
  45. 3
    3
      src/pages/settings/preferences.vue
  46. 4
    0
      src/pages/settings/processing.vue
  47. 24
    4
      src/pages/wizard/checkpoints.vue
  48. 33
    13
      src/pages/wizard/dreamtime.vue
  49. 29
    4
      src/pages/wizard/power.vue
  50. 36
    8
      src/pages/wizard/waifu.vue
  51. 3
    3
      src/tailwind.config.js
  52. 656
    436
      src/yarn.lock

+ 1
- 1
src/assets/css/components/_box.scss View File

@@ -55,7 +55,7 @@
}

.box__content {
@apply flex-1 px-6 py-3 text-sm;
@apply flex-1 px-6 py-6 text-sm;

p {
@apply mb-3;

+ 4
- 0
src/assets/css/components/_button.scss View File

@@ -21,6 +21,10 @@
@apply bg-button-dark;
}

&[disabled] {
@apply opacity-50 cursor-not-allowed;
}

&.button--xs {
@apply text-xs;
height: 25px;

+ 6
- 1
src/assets/css/components/_notification.scss View File

@@ -27,7 +27,7 @@
}

&.notification--danger {
@apply bg-danger-500;
@apply bg-danger-400;
}

&.notification--success {
@@ -41,4 +41,9 @@
code {
@apply mx-1 p-1 bg-gray-300;
}

pre {
@apply text-xs overflow-auto bg-black p-2 text-white break-words whitespace-pre-wrap;
max-height: 100px;
}
}

+ 8
- 1
src/assets/css/reset/_libs.scss View File

@@ -22,6 +22,9 @@
}

.swal2-html-container {
padding: 0 1.8em;
line-height: 1.4em;

details {
@apply mt-6;

@@ -31,13 +34,17 @@
}

pre {
@apply text-xs overflow-auto bg-black p-2;
@apply text-xs overflow-auto bg-black p-2 break-words whitespace-pre-wrap;
max-height: 100px;
}

code {
@apply bg-black px-2 text-sm rounded-sm break-words;
}

a {
@apply underline text-white font-bold;
}
}

.swal2-footer {

+ 22
- 7
src/components/Layout/Navbar.vue View File

@@ -1,12 +1,13 @@
<template>
<div class="nav">
<div class="nav__left">
<nuxt-link v-if="isBadTimeAvailable"
v-tooltip="'Bad Time Minigame ๐ŸŽฎ'"
to="/games/badtime"
class="nav__item nav__item--button">
<img src="~/assets/images/games/sans.png">
</nuxt-link>
<button v-tooltip="'Go back'" class="nav__item nav__item--button text-2xl" @click="$router.go(-1)">
<font-awesome-icon icon="caret-left" />
</button>

<button v-tooltip="'Go forward'" class="nav__item nav__item--button text-2xl" @click="$router.go(1)">
<font-awesome-icon icon="caret-right" />
</button>

<!--
<nuxt-link
@@ -26,6 +27,13 @@
<nuxt-link v-tooltip="'My Photos'" to="/photos" class="nav__item nav__item--link">
<font-awesome-icon icon="images" />
</nuxt-link>

<nuxt-link v-if="isDev"
v-tooltip="'Dev Garden'"
to="/garden"
class="nav__item nav__item--link">
<font-awesome-icon icon="house-damage" />
</nuxt-link>
</div>

<div class="nav__right">
@@ -40,6 +48,13 @@
<nuxt-link v-tooltip="'Help & Tips'" to="/help" class="nav__item nav__item--button">
<font-awesome-icon icon="question-circle" />
</nuxt-link>

<nuxt-link v-if="isBadTimeAvailable"
v-tooltip="'Bad Time Minigame ๐ŸŽฎ'"
to="/games/badtime"
class="nav__item nav__item--button">
<img src="~/assets/images/games/sans.png">
</nuxt-link>
</div>
</div>
</template>
@@ -159,7 +174,7 @@ export default {

&.nav__item--button {
@apply justify-center;
@apply rounded-full text-lg mx-2;
@apply rounded-full mx-2 outline-none;
height: 40px;
width: 40px;


+ 14
- 3
src/components/Layout/Titlebar.vue View File

@@ -14,7 +14,9 @@
</div>

<!-- Drag -->
<div class="titlebar__drag" />
<div class="titlebar__drag">
<div class="titlebar__drag__region" />
</div>

<!-- Window Buttons -->
<div class="titlebar__buttons">
@@ -181,8 +183,17 @@ export default {
}

.titlebar__drag {
@apply flex-1;
-webkit-app-region: drag;
@apply flex-1 relative;

.titlebar__drag__region {
@apply block absolute;
top: 5px;
left: 0;
right: 0;
bottom: 0;
z-index: -1;
-webkit-app-region: drag;
}
}

.titlebar__buttons {

+ 2
- 1
src/components/Nudify/NudifyMaskPhoto.vue View File

@@ -10,10 +10,11 @@
<h2>Drop the {{ mask.title }} here!</h2>
</div>

<div class="box__photo mask__photo" data-private>
<div class="box__photo mask__photo">
<div v-if="file.exists"
class="mask__photo__preview"
:style="{ backgroundImage: `url('${file.url}')` }"
data-private
@click="openPreview" />
</div>


+ 1
- 1
src/components/Nudify/NudifyPhotoPreview.vue View File

@@ -6,7 +6,7 @@
muted
loop />

<NudifyPhotoBadge v-if="badge" :photo="photo" />
<NudifyPhotoBadge v-if="badge && $settings.app.duplicates" :photo="photo" />
</div>
</template>


+ 3
- 1
src/components/Nudify/NudifyPhotoRun.vue View File

@@ -1,17 +1,19 @@
<template>
<div class="box run" :class="previewClass">
<div class="box__photo run__photo" data-private>
<div class="box__photo run__photo">
<video v-if="file.exists && isVideo"
:src="file.url"
class="run__video__preview"
autoplay
muted
loop
data-private
@click="openPreview" />

<div v-else-if="file.exists"
class="run__photo__preview"
:style="{ backgroundImage: `url('${file.url}')` }"
data-private
@click="openPreview" />
</div>


+ 1
- 1
src/components/Page/PageHeader.vue View File

@@ -20,7 +20,7 @@

&::v-deep {
.title {
@apply text-lg font-semibold text-white mb-0;
@apply text-lg font-bold text-white mb-1;

.icon {
@apply mr-2;

+ 2
- 0
src/components/Photo.vue View File

@@ -7,11 +7,13 @@
autoplay
muted
loop
data-private
@click="openPreview" />

<div v-else
class="photo__preview"
:style="{ backgroundImage: `url('${file.url}')` }"
data-private
@click="openPreview" />
</div>
</div>

+ 4
- 6
src/components/Queue/QueueMenu.vue View File

@@ -11,14 +11,14 @@

<div v-show="$nudify.waiting.length > 0" class="queue__section__actions">
<button
v-tooltip="{placement: 'bottom', content: 'Forget waiting'}"
v-tooltip="{placement: 'bottom', content: 'Forget those who wait'}"
class="button button--danger button--xs"
@click.prevent="$nudify.forgetAll('waiting')">
<font-awesome-icon icon="trash-alt" />
</button>

<button
v-tooltip="{placement: 'bottom', content: 'Cancel waiting' }"
v-tooltip="{placement: 'bottom', content: 'Cancel those who wait' }"
class="button button--xs"
@click.prevent="$nudify.cancelAll('waiting')">
<font-awesome-icon icon="stop" />
@@ -64,8 +64,7 @@
<QueuePhoto
v-for="(photo, index) of $nudify.pending"
:key="index"
:photo="photo"
data-private />
:photo="photo" />
</div>
</section>

@@ -99,8 +98,7 @@
<QueuePhoto
v-for="(photo, index) of $nudify.finished"
:key="index"
:photo="photo"
data-private />
:photo="photo" />
</div>
</section>
</div>

+ 6
- 0
src/components/Settings/SettingsField.vue View File

@@ -79,6 +79,7 @@ export default {
data: () => ({
localValue: null,
field: null,
firstWatchIgnored: false,
}),

computed: {
@@ -137,6 +138,11 @@ export default {

watch: {
localValue(value) {
if (!this.firstWatchIgnored) {
this.firstWatchIgnored = true
return
}

if (this.value$) {
this.value$ = set(this.value$, this.localFieldId, value)
} else {

+ 55
- 0
src/components/UI/AppNotification.vue View File

@@ -0,0 +1,55 @@
<template>
<div v-if="canShow" class="notification">
<span class="close-icon" @click="close()">
<FontAwesomeIcon icon="times-circle" />
</span>

<slot />
</div>
</template>

<script>
import { isNil } from 'lodash'

export default {
props: {
name: {
type: String,
required: true,
},
},

data: () => ({
closed: false,
}),

computed: {
canShow() {
if (!isNil(localStorage.getItem(`notification_${this.name}`))) {
return false
}

return !this.closed
},
},

methods: {
close() {
localStorage.setItem(`notification_${this.name}`, 'true')
this.closed = true
},
},
}
</script>

<style lang="scss" scoped>
.notification {
@apply relative;
}

.close-icon {
@apply absolute text-lg cursor-pointer;
top: 5px;
right: 10px;
}
</style>

+ 2
- 2
src/components/UI/MenuItem.vue View File

@@ -135,7 +135,7 @@ export default {

.item__label {
@apply flex-1 flex flex-col justify-center;
@apply text-generic-500;
@apply text-common;

&:not(:last-child) {
@apply mr-6;
@@ -146,7 +146,7 @@ export default {
}

.item__description {
@apply block text-sm text-generic-700;
@apply block text-xs text-common-dark;
}
}


+ 29
- 3
src/components/UI/ProjectUpdate.vue View File

@@ -37,17 +37,43 @@

<!-- Actions -->
<div class="update__actions">
<button v-show="!updater.update.active" class="button button--success" @click.prevent="updater.start()">
<button v-if="!updater.enabled"
key="update-disabled"
v-tooltip="'This component cannot be updated until the problem explained above is fixed.'"
class="button button--success"
disabled>
<span class="icon"><font-awesome-icon icon="sync" /></span>
Update
</button>

<button v-show="updater.update.active" class="button button--danger" @click.prevent="updater.cancel()">
<button v-else-if="!updater.update.active"
key="update-start"
class="button button--success"
@click.prevent="updater.start()">
<span class="icon"><font-awesome-icon icon="sync" /></span>
Update
</button>

<button v-else-if="updater.update.active"
key="update-cancel"
class="button button--danger"
@click.prevent="updater.cancel()">
<span class="icon"><font-awesome-icon icon="stop" /></span>
Cancel
</button>

<button v-tooltip="'List of links to download the update manually.'" class="button button--info" @click.prevent="$refs.mirrorsDialog.show()">
<button v-if="updater.downloadUrls.length > 0"
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>

<button v-else
v-tooltip="'List of links to download the update manually.'"
class="button button--info"
disabled>
<span class="icon"><font-awesome-icon icon="link" /></span>
Mirrors
</button>

+ 11
- 4
src/electron/src/index.js View File

@@ -7,7 +7,7 @@
//
// Written by Ivan Bravo Bravo <ivan@dreamnet.tech>, 2019.

import { startsWith } from 'lodash'
import { startsWith, debounce } from 'lodash'
import {
app, BrowserWindow, shell, protocol, nativeImage,
} from 'electron'
@@ -253,8 +253,8 @@ class DreamApp {

// browser window.
this.window = new BrowserWindow({
width: 1200,
height: 700,
width: settings.get('app.window.width', 1200),
height: settings.get('app.window.height', 700),
minWidth: 1200,
minHeight: 700,
frame: false,
@@ -276,9 +276,16 @@ class DreamApp {
//
this.window.webContents.once('dom-ready', () => {
this.window.show()
this.window.maximize()
// this.window.maximize()
})

// Resize
this.window.on('will-resize', debounce(function (data, newBounds) {
settings.set('app.window.width', newBounds.width)
settings.set('app.window.height', newBounds.height)
settings.save()
}, 1000))

// ui location
this.interfaceURL = this.getInterfaceURL()


+ 20
- 2
src/electron/src/modules/settings.js View File

@@ -136,7 +136,7 @@ class Settings {
const hasGPU = process.platform === 'darwin' ? false : system.graphics.length > 0

this.payload = {
version: 9,
version: 10,
user: uuid(),

wizard: {
@@ -158,6 +158,10 @@ class Settings {
duplicates: false,
showAds: true,
showTips: true,
window: {
width: 1200,
height: 700,
},
},

notifications: {
@@ -243,7 +247,7 @@ class Settings {

advanced: {
device: hasGPU ? 'GPU' : 'CPU',
scaleMode: 'overlay',
scaleMode: 'cropjs',
useColorTransfer: false,
useColorPaddingStrip: true,
compress: 0,
@@ -473,6 +477,7 @@ class Settings {
}
}

// 8 -> 9
if (this.payload?.version === 8 && this._default.version >= 9) {
this.payload = merge(this.payload, {
version: 9,
@@ -493,6 +498,19 @@ class Settings {
}
}

// 9 -> 10
if (this.payload?.version === 9 && this._default.version >= 10) {
this.payload = merge(this.payload, {
version: 10,
app: {
window: {
width: 1200,
height: 700,
},
},
})
}

this.save()
}
}

+ 30
- 8
src/electron/src/modules/tools/power.js View File

@@ -248,9 +248,13 @@ export function isInstalled() {
/**
* @return {Promise}
*/
export const getVersion = () => new Promise((resolve, reject) => {
export const getVersion = () => new Promise((resolve) => {
if (version) {
resolve(version)
resolve({
status: true,
version,
})

return
}

@@ -260,7 +264,12 @@ export const getVersion = () => new Promise((resolve, reject) => {

process.on('error', (error) => {
logger.warn(error)
reject(error)

resolve({
status: false,
version: undefined,
error,
})
})

process.stdout.on('data', (data) => {
@@ -278,13 +287,26 @@ export const getVersion = () => new Promise((resolve, reject) => {
response = `v${response[0]}`

version = response
resolve(response)
} catch (err) {
logger.warn(err)
reject(err)

resolve({
status: true,
version,
})
} catch (error) {
logger.warn(error)

resolve({
status: false,
version: undefined,
error,
})
}
} else {
reject(new Error(response))
resolve({
status: false,
version: undefined,
error: new Error(response),
})
}
})
})

+ 30
- 8
src/electron/src/modules/tools/waifu.js View File

@@ -171,9 +171,13 @@ export function isInstalled() {
/**
* @return {Promise}
*/
export const getVersion = () => new Promise((resolve, reject) => {
export const getVersion = () => new Promise((resolve) => {
if (version) {
resolve(version)
resolve({
status: true,
version,
})

return
}

@@ -183,7 +187,12 @@ export const getVersion = () => new Promise((resolve, reject) => {

process.on('error', (error) => {
logger.warn(error)
reject(error)

resolve({
status: false,
version: undefined,
error,
})
})

process.stdout.on('data', (data) => {
@@ -201,13 +210,26 @@ export const getVersion = () => new Promise((resolve, reject) => {
response = `v${response[0]}`

version = response
resolve(response)
} catch (err) {
logger.warn(err)
reject(err)

resolve({
status: true,
version,
})
} catch (error) {
logger.warn(error)

resolve({
status: false,
version: undefined,
error,
})
}
} else {
reject(new Error(response))
resolve({
status: false,
version: undefined,
error: new Error(response),
})
}
})
})

+ 91
- 47
src/modules/config/cli-errors.json View File

@@ -1,158 +1,202 @@
[
{
"query": "Found no NVIDIA driver",
"message": "Found no NVIDIA driver on your system: Please check that you have an NVIDIA GPU and the latest drivers installed."
"title": "Driver Error",
"message": "Found no NVIDIA driver on your system: Please check that you have an NVIDIA GPU and the <a href='https://www.nvidia.com/Download/index.aspx' target='_blank'>latest drivers</a> installed."
},
{
"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."
"title": "Outdated driver",
"message": "The NVIDIA driver installed on your system is too old! Please install the <a href='https://www.nvidia.com/Download/index.aspx' target='_blank'>latest drivers</a>. If you are already using the latest it is very possible that your GPU is not compatible and you need to change the <strong>processing device</strong> option to CPU."
},
{
"query": "CUDA environment is not correctly set up",
"message": "Waifu2X error: Please install <a href='https://developer.nvidia.com/cuda-10.2-download-archive' target='_blank'>CUDA 10.2</a> to use Waifu2X."
"title": "Waifu2X Error",
"message": "Please install <a href='https://developer.nvidia.com/cuda-10.2-download-archive' target='_blank'>CUDA 10.2</a> to use Waifu2X."
},
{
"query": "no longer supports this GPU",
"message": "Algorithm error: The algorithm no longer supports your GPU."
"title": "GPU Error",
"message": "The algorithm no longer supports your GPU. Please change the processing device option to CPU."
},
{
"query": "Buy new RAM!",
"message": "You have run out of RAM on your system! Please buy more RAM before using DreamTime."
"title": "System out of memory",
"message": "Please buy more RAM before using DreamTime. Also verify that your system's RAM is in good condition."
},
{
"query": "Stopped to avoid memory problems",
"message": "You have run out of RAM on your system! Please buy more RAM before using DreamTime."
"title": "System out of memory",
"message": "Please buy more RAM before using DreamTime. Also verify that your system's RAM is in good condition."
},
{
"query": "enforce fail at CPUAllocator",
"message": "You have run out of RAM on your system! Please buy more RAM before using DreamTime."
"title": "System out of memory",
"message": "Please buy more RAM before using DreamTime. Also verify that your system's RAM is in good condition."
},
{
"query": "MemoryError : Unable to allocate",
"message": "You have run out of RAM on your system! Please buy more RAM before using DreamTime."
"title": "System out of memory",
"message": "Please buy more RAM before using DreamTime. Also verify that your system's RAM is in good condition."
},
{
"query": "CUDA out of memory",
"message": "Your GPU doesn't have enough VRAM! Please use CPU processing or buy a new GPU with more than 8 GB of VRAM."
"title": "GPU out of memory",
"message": "Please use CPU processing or buy a new GPU with more than 8 GB of VRAM."
},
{
"query": "CUDNN_STATUS_ALLOC_FAILED",
"title": "GPU Error",
"message": "CUDNN_STATUS_ALLOC_FAILED: Please use CPU processing or buy a new GPU with more than 8 GB of VRAM. This error may also indicate a problem with the drivers or the VRAM of your device."
},
{
"query": "THCudaCheck FAIL",
"title": "GPU Error",
"message": "THCudaCheck FAIL: A problem has occurred while obtaining information about your GPU, please make sure you have the latest drivers for your operating system, you may also need to compile <a href='https://github.com/dreamnettech/dreampower/' target='_blank'>DreamPower</a> for this distribution."
},
{
"query": "CUDNN_STATUS_INTERNAL_ERROR",
"title": "GPU Error",
"message": "CUDNN_STATUS_INTERNAL_ERROR: A problem has occurred while using your GPU, please make sure you have the latest drivers for your operating system, you may also need to compile <a href='https://github.com/dreamnettech/dreampower/' target='_blank'>DreamPower</a> for this distribution."
},
{
"query": "codec can't decode byte",
"message": "Save error: Please make sure you have enough disk space and the folders in settings do not have special characters or spaces."
"title": "Storage error",
"message": "Please make sure you have enough disk space and the folders in settings or the photo location do not have special characters or spaces."
},
{
"query": "The final result is not a valid image file",
"message": "Save error: Please make sure you have enough disk space and the folders in settings do not have special characters or spaces."
"title": "Storage error",
"message": "Please make sure you have enough disk space and the folders in settings or the photo location do not have special characters or spaces."
},
{
"query": "invalid device ordinal",
"title": "GPU Error",
"message": "The selected GPU is not a valid device. Please make sure that the GPU option in settings is valid."
},
{
"query": "loading Python",
"message": "Algorithm error: Please reinstall DreamPower or make sure your operating system has the latest updates."
"title": "Python error",
"message": "Please reinstall DreamPower or make sure your operating system has the latest updates."
},
{
"query": "DLL",
"message": "Algorithm error: Please reinstall DreamPower or make sure your operating system has the latest updates."
"title": "Python error",
"message": "Please reinstall DreamPower or make sure your operating system has the latest updates."
},
{
"query": "file is not valid image",
"message": "Image error: The photo could not be loaded correctly. Please make sure the photo is valid, has not been deleted and is not corrupted."
"title": "File error",
"message": "The photo could not be loaded correctly. Please make sure the photo is valid, has not been deleted and is not corrupted."
},
{
"query": "cv2.error",
"message": "Image error: There was a problem trying to load the photo. Please ensure that it is a valid photo, that it has not been deleted or that the Cropper/Overlay are well positioned."
"title": "File error",
"message": "There was a problem trying to load the photo. Please ensure that it is a valid photo, that it has not been deleted or that the Cropper/Overlay are well positioned."
},
{
"query": "is not a valid file or directory or url",
"message": "Image error: The photo could not be loaded correctly. Please make sure the photo is valid, has not been deleted and is not corrupted."
"title": "File error",
"message": "The photo could not be loaded correctly. Please make sure the photo is valid, has not been deleted and is not corrupted."
},
{
"query": "file not a supported format",
"message": "Image error: The photo could not be loaded correctly. Please make sure the photo is valid, has not been deleted and is not corrupted."
"title": "File error",
"message": "The photo could not be loaded correctly. Please make sure the photo is valid, has not been deleted and is not corrupted."
},
{
"query": "invalid extension format",
"message": "Image error: The photo could not be loaded correctly. Please make sure the photo is valid, has not been deleted and is not corrupted."
"title": "File error",
"message": "The photo could not be loaded correctly. Please make sure the photo is valid, has not been deleted and is not corrupted."
},
{
"query": "The file might be corrupted",
"message": "Image error: The photo could not be loaded correctly. Please make sure the photo is valid, has not been deleted and is not corrupted."
"title": "File error",
"message": "The photo could not be loaded correctly. Please make sure the photo is valid, has not been deleted and is not corrupted."
},
{
"query": "libpng error: PNG input buffer is incomplete",
"message": "Image error: The photo could not be loaded correctly. Please make sure the photo is valid, has not been deleted and is not corrupted."
"title": "File error",
"message": "The photo could not be loaded correctly. Please make sure the photo is valid, has not been deleted and is not corrupted."
},
{
"query": "OSError: image file is truncated",
"message": "Image error: The photo could not be loaded correctly. Please make sure the photo is valid, has not been deleted and is not corrupted."
"title": "File error",
"message": "The photo could not be loaded correctly. Please make sure the photo is valid, has not been deleted and is not corrupted."
},
{
"query": "Could not find a format to read the specified file",
"message": "Image error: The photo could not be loaded correctly. Please make sure the photo is valid, has not been deleted and is not corrupted."
"title": "File error",
"message": "The photo could not be loaded correctly. Please make sure the photo is valid, has not been deleted and is not corrupted."
},
{
"query": "PIL.Image.DecompressionBombError",
"message": "Image error: The photo is too big! Please decrease the photo size with external tools or try a smaller photo."
"title": "File error",
"message": "The photo is too big! Please compress the photo with external tools or try a smaller photo."
},
{
"query": "not compiled with CUDA",
"message": "You have installed the CPU-only version of DreamPower. Please reinstall DreamPower."
"title": "DreamPower error",
"message": "You have installed the CPU-only version of DreamPower. Please change the processing device option to CPU or reinstall DreamPower to get GPU support."
},
{
"query": "float division by zero",
"message": "Crop error: Please make sure you position the cropper correctly."
"title": "Crop error",
"message": "Please make sure you position the cropper correctly."
},
{
"query": "could not broadcast input array from shape",
"message": "Overlay error: Please make sure you position the overlay correctly."
"title": "Overlay error",
"message": "Please make sure you position the overlay correctly."
},
{
"query": "CUDA error",
"message": "GPU error: Please make sure you have the latest drivers installed or reinstall."
"title": "GPU error",
"message": "Please make sure you have the <a href='https://www.nvidia.com/Download/index.aspx' target='_blank'>latest drivers</a> installed."
},
{
"query": "Python was not found",
"message": "DreamPower error: Python is not installed on the system. Please disable the 'Use Python' option if you are not using the algorithm source code."
"title": "Python error",
"message": "Python is not installed on the system. Please disable the <strong>Use Python</strong> option if you are not using the algorithm source code."
},
{
"query": "P ython was not found",
"title": "Python error",
"message": "Python is not installed on the system. Please disable the <strong>Use Python</strong> option if you are not using the algorithm source code."
},
{
"query": "No module named",
"message": "DreamPower error: If you are using the algorithm source code please make sure you have installed the necessary modules or disable the 'Use Python' option or update your operating system."
"title": "Python error",
"message": "If you are using the algorithm source code please make sure you have installed the necessary modules or disable the 'Use Python' option or update your operating system."
},
{
"query": "can't open file 'main.py'",
"message": "DreamPower error: If you are using the algorithm source code please make sure you have cloned and configured the repository correctly, if you are not using the source code please disable the 'Use Python' option."
"title": "Python error",
"message": "If you are using the algorithm source code please make sure you have cloned and configured the repository correctly, if you are not using the source code please disable the 'Use Python' option."
},
{
"query": "invalid choice",
"message": "DreamPower error: The installed version of DreamPower is not compatible with this version of DreamTime, please update."
"title": "DreamPower error",
"message": "The installed version of DreamPower is not compatible with this version of DreamTime, please update."
},
{
"query": "unrecognized arguments",
"message": "DreamPower error: The installed version of DreamPower is not compatible with this version of DreamTime, please update."
"title": "DreamPower error",
"message": "The installed version of DreamPower is not compatible with this version of DreamTime, please update."
},
{
"query": "Checkpoints file not found",
"message": "DreamPower error: The checkpoints could not be loaded, if you have changed the location of DreamPower please be sure to restart DreamTime."
"title": "DreamPower error",
"message": "The checkpoints could not be loaded, if you have changed the location of DreamPower please be sure to restart DreamTime."
},
{
"query": "No such file or directory",
"message": "DreamPower error: The checkpoints could not be loaded, if you have changed the location of DreamPower please be sure to restart DreamTime."
},
{
"query": "THCudaCheck FAIL",
"message": "THCudaCheck FAIL: This version of DreamPower may not be compatible with your operating system and it may be necessary to compile the project in your environment. Please visit our Chat or Forum for technical support."
},
{
"query": "CUDNN_STATUS_ALLOC_FAILED",
"message": "CUDNN_STATUS_ALLOC_FAILED: You have run out of VRAM on your GPU! Make sure there are no other programs using your GPU or purchase a GPU with more memory before using DreamTime."
},
{
"query": "CUDNN_STATUS_INTERNAL_ERROR",
"message": "CUDNN_STATUS_INTERNAL_ERROR: Please make sure you have the latest drivers installed, that you have available video memory and if you have installed CUDA or CUDNN that these are updated and configured."
"title": "DreamPower error",
"message": "The checkpoints could not be loaded, if you have changed the location of DreamPower please be sure to restart DreamTime."
},
{
"query": "library load disallowed by system policy",
"message": "Your operating system disallowed the correct loading of the algorithm due to the system policy on third party applications. Please see <a href='https://support.apple.com/en-us/HT202491' target='_blank'>'Safely open apps on your Mac'</a> for information on how to solve this problem."
"title": "System policy error",
"message": "Your operating system disallowed the loading of the algorithm due to the system policy on third party applications. Please see <a href='https://support.apple.com/en-us/HT202491' target='_blank'>'Safely open apps on your Mac'</a> for information on how to fix this problem."
}
]

+ 6
- 6
src/modules/config/settings.yml View File

@@ -5,7 +5,7 @@

- id: app.disableHardwareAcceleration
label: Hardware acceleration.
description: Can improve performance on some devices. (Requires restart to take effect)
description: Can improve performance on some devices. *Requires restart to take effect.
input: select
options:
- label: Disabled
@@ -47,7 +47,7 @@

- id: app.showAds
label: Show Ads.
description: Show ads that might interest you and support the development of DreamTime.
description: Show ads at the bottom of the menu. This is a way to support the development of DreamTime.
input: select
options:
- label: Enabled
@@ -57,7 +57,7 @@

- id: app.showTips
label: Show Tips.
description: Show help tips.
description: Show help tips at the bottom of the menu.
input: select
options:
- label: Enabled
@@ -105,7 +105,7 @@
value: 1
- label: Normal
value: 2
- label: Advanced (Custom masks)
- label: Custom masks
value: 3
animated-options:
- label: Minimal
@@ -215,7 +215,7 @@

- id: preferences.advanced.compress
label: Compression level.
description: Compress the photo before nudification to save RAM.
description: Compress the photo sacrificing quality but reducing RAM consumption.
input: select
options:
- label: Disabled
@@ -229,7 +229,7 @@

- id: preferences.advanced.waifu.enabled
label: Waifu2X.
description: Use an algorithm to upscale & denoise the nudified photo.
description: Use the algorithm to upscale & denoise the nudified photo.
input: select
options:
- label: Enabled

+ 9
- 1
src/modules/consola/errors.js View File

@@ -9,7 +9,7 @@
// Written by Ivan Bravo Bravo <ivan@dreamnet.tech>, 2019.

import {
isError,
isError, isString,
} from 'lodash'

/**
@@ -54,6 +54,14 @@ export class LogEvent extends Error {
constructor(...args) {
super()
this.args = args

args.forEach((value) => {
if (isString(value)) {
this.message = value
} else if (isError(value) && !this.message) {
this.message = value
}
})
}
}


+ 3
- 1
src/modules/consola/log.js View File

@@ -95,7 +95,9 @@ export class Log {
*/
parseArgs(args) {
args.forEach((value) => {
if (value instanceof Logger.Logger) {
if (isNil(value)) {
// YEP
} else if (value instanceof Logger.Logger) {
this.logger = value
} else if (isError(value)) {
this.error = value

+ 3
- 3
src/modules/dream.js View File

@@ -42,20 +42,20 @@ export default {
*
*/
openAppFolder() {
shell.openItem(getAppPath())
shell.openPath(getAppPath())
},

/**
*
*/
openAppDataFolder() {
shell.openItem(getPath('userData'))
shell.openPath(getPath('userData'))
},

/**
*
*/
openPowerFolder() {
shell.openItem(getPowerPath())
shell.openPath(getPowerPath())
},
}

+ 6
- 4
src/modules/nudify/photo-run.js View File

@@ -190,11 +190,13 @@ export class PhotoRun {
advanced: {
useColorTransfer: false,
useColorPaddingStrip: true,
compress: 0,
imageSize: 512,
waifu: {
enabled: requirements.canUseWaifu,
scale: 2,
denoise: 0,
tta: 4,
tta: 0,
arch: 0,
},
},
@@ -524,7 +526,7 @@ export class PhotoRun {

this.photo.consola.warn(terminalText.join('\n'))

const title = 'Nudification failed!'
const title = 'Unknown error!'

const extra = {
terminal: terminalText,
@@ -532,11 +534,11 @@ export class PhotoRun {

for (const payload of cliErrors) {
if (errorMessage.toLowerCase().includes(payload.query.toLowerCase())) {
return new Warning(title, payload.message, new Error(errorMessage), extra)
return new Warning(payload.title || title, payload.message, new Error(errorMessage), extra)
}
}

return new Exception(title, 'The algorithm has been interrupted by an unknown problem.', new Error(errorMessage), extra)
return new Exception(title, 'The algorithm has been interrupted by an unknown problem. Please visit our <a href="https://chat.dreamnet.tech" target="_blank">chat</a> for support, we may ask you for the photo/video and the text below to fix the problem.', new Error(errorMessage), extra)
}

/**

+ 1
- 9
src/modules/nudify/photo.js View File

@@ -666,15 +666,7 @@ export class Photo {
if (this.preferences.advanced.scaleMode === 'padding') {
await this.syncColorPadding()
} else {
try {
// ImageMagick Crop
await this.syncCrop()
} catch (error) {
this.consola.warn(error)

// HTMLCanvas Crop (Poor quality)
await this.syncLegacyCrop()
}
await this.syncCrop()
}
}


+ 1
- 1
src/modules/projects/checkpoints.js View File

@@ -12,7 +12,7 @@ class Checkpoints {
},
about: {
title: 'Checkpoints',
description: 'DeepNude trained models.',
description: 'DeepNude pre-trained models.',
logo: 'https://link.dreamnet.tech/ipfs/QmWkpwjEq6YQLSud4pS8ChkdED4NZrup6fKirFXXXLFe9u?filename=deepnude.png',
navigation: [],
},

+ 4
- 0
src/modules/projects/dreamtime.js View File

@@ -52,6 +52,10 @@ class DreamTime {
return !isNil(process.env.BUILD_PORTABLE)
}

get isDev() {
return process.env.NODE_ENV !== 'production'
}

async init() {
if (dreamtrack.enabled) {
this.data = dreamtrack.get('projects.dreamtime', this.data)

+ 2
- 2
src/modules/services/logrocket.js View File

@@ -13,7 +13,7 @@ import { BaseService } from './base'
import { dreamtrack } from './dreamtrack'
import { settings } from '../system/settings'
import { Consola } from '../consola'
import { requirements } from '../system'
// import { requirements } from '../system'

const { system } = $provider

@@ -37,7 +37,7 @@ class LogRocketService extends BaseService {
* @type {boolean}
*/
get can() {
return system.online && isString(this.accessToken) && settings.telemetry?.dom && requirements.canNudify
return system.online && isString(this.accessToken) && settings.telemetry?.dom
}

/**

+ 46
- 32
src/modules/system/requirements.js View File

@@ -26,11 +26,15 @@ export const requirements = {
installed: false,
compatible: false,
checkpoints: false,
version: undefined,
error: undefined,
},

waifu: {
installed: false,
compatible: false,
version: undefined,
error: undefined,
},

recommended: {
@@ -122,30 +126,35 @@ export const requirements = {
}

const { dreamtrack } = require('../services')

const compareVersions = require('compare-versions')
let version

try {
version = await power.getVersion()
const currentVersion = `v${process.env.npm_package_version}`
const payload = await power.getVersion()

const minimum = dreamtrack.get(['projects', 'dreamtime', 'releases', currentVersion, 'dreampower', 'minimum'], 'v1.2.10')
const maximum = dreamtrack.get(['projects', 'dreamtime', 'releases', currentVersion, 'dreampower', 'maximum'])
this.power.version = payload.version

if (compareVersions.compare(version, minimum, '<')) {
return false
}
if (!payload.status) {
consola.warn(`DreamPower compatibility check failed. (version = ${payload.version}).`, payload.error)

if (!isNil(maximum) && compareVersions.compare(version, maximum, '>')) {
return false
}
this.power.error = payload.error

return true
} catch (err) {
consola.warn(`DreamPower compatibility check failed. (version = ${version}).`, err)
return false
}

const { version } = payload
const appVersion = `v${process.env.npm_package_version}`

const minimum = dreamtrack.get(['projects', 'dreamtime', 'releases', appVersion, 'dreampower', 'minimum'], 'v1.2.10')
const maximum = dreamtrack.get(['projects', 'dreamtime', 'releases', appVersion, 'dreampower', 'maximum'])

if (compareVersions.compare(version, minimum, '<')) {
return false
}

if (!isNil(maximum) && compareVersions.compare(version, maximum, '>')) {
return false
}

return true
},

async _hasCompatibleWaifu() {
@@ -154,30 +163,35 @@ export const requirements = {
}

const { dreamtrack } = require('../services')

const compareVersions = require('compare-versions')
let version

try {
version = await waifu.getVersion()
const currentVersion = `v${process.env.npm_package_version}`
const payload = await waifu.getVersion()

const minimum = dreamtrack.get(['projects', 'dreamtime', 'releases', currentVersion, 'waifu', 'minimum'], 'v0.1.0')
const maximum = dreamtrack.get(['projects', 'dreamtime', 'releases', currentVersion, 'waifu', 'maximum'])
this.waifu.version = payload.version

if (compareVersions.compare(version, minimum, '<')) {
return false
}
if (!payload.status) {
consola.warn(`Waifu2X compatibility check failed. (version = ${payload.version}).`, payload.error)

if (!isNil(maximum) && compareVersions.compare(version, maximum, '>')) {
return false
}
this.waifu.error = payload.error

return true
} catch (err) {
consola.warn(`Waifu2X compatibility check failed. (version = ${version}).`, err)
return false
}

const { version } = payload
const appVersion = `v${process.env.npm_package_version}`

const minimum = dreamtrack.get(['projects', 'dreamtime', 'releases', appVersion, 'waifu', 'minimum'], 'v0.1.0')
const maximum = dreamtrack.get(['projects', 'dreamtime', 'releases', appVersion, 'waifu', 'maximum'])

if (compareVersions.compare(version, minimum, '<')) {
return false
}

if (!isNil(maximum) && compareVersions.compare(version, maximum, '>')) {
return false
}

return true
},

/**

+ 30
- 37
src/modules/updater/base.js View File

@@ -9,7 +9,7 @@

import {
isNil, isArray, isPlainObject, find,
startsWith, filter, isEmpty, toNumber,
startsWith, filter, isEmpty, toNumber, isString,
} from 'lodash'
import axios from 'axios'
import compareVersions from 'compare-versions'
@@ -23,10 +23,10 @@ import { Consola } from '../consola'
const { system } = $provider
const { getPath } = $provider.paths
const { existsSync, statSync, download } = $provider.fs
const { dialog, app } = $provider.api
const { dialog } = $provider.api
const { platform } = $provider.util

const extRegex = /(?:\.([^.]+))?$/
const extRegex = /(?:\.(zip|7z|exe|dmg|snap))?$/

/**
* todo: don't just depend on github
@@ -40,6 +40,15 @@ export class BaseUpdater {
*/
enabled = false

/**
* @type {Error}
*/
error

get errorResponse() {
return this.error?.response?.data?.message
}

/**
* @type {Consola}
*/
@@ -135,6 +144,10 @@ export class BaseUpdater {
return false
}

if (!isString(this.currentVersion)) {
return true
}

return compareVersions.compare(this.latestCompatibleVersion, this.currentVersion, '>')
}

@@ -188,19 +201,13 @@ export class BaseUpdater {
/**
*
*/
async setup(required = false) {
async setup() {
this.enabled = false

if (!required) {
if (!system.online) {
this.consola.warn('No internet connection.')
return
}

if (!dreamtrack.enabled) {
this.consola.warn('No connection with DreamTrack.')
return
}
if (!system.online) {
this.error = new Warning('There is no Internet connection. Please make sure you are connected before starting.')
this.consola.warn(this.error)
return
}

if (!this.can) {
@@ -217,34 +224,24 @@ export class BaseUpdater {
await this._fetchReleases()
this.consola.info(`Current: ${this.currentVersion} - Latest: ${this.latestCompatibleVersion}`)

this.enabled = true

this.refresh()

if (this.available) {
this.sendNotification()
if (this.downloadUrls.length === 0) {
throw new Warning('No available download links found, please try again later.')
}
} catch (err) {
this.consola.warn('Unable to fetch the latest version!', err)

if (required) {
dialog.showMessageBoxSync({
type: 'error',
title: 'Unable to connect to Github.',
message: 'DreamTime requires a stable Internet connection during the first start. Please connect to the Internet or try again in a few minutes.',
})
this.enabled = true

// Close.
app.quit()
if (this.available) {
this.sendNotification()
}
} catch (err) {
this.error = err
this.consola.warn('The project information could not be obtained from Github!', err)
}
}

refresh() {
if (!this.enabled) {
return
}

this.downloadUrls = this._getDownloadUrls()
}

@@ -264,7 +261,7 @@ export class BaseUpdater {
let asset

try {
urls = dreamtrack.get(['projects', this.name, 'releases', this.latestCompatibleVersion, 'urls'])
urls = dreamtrack.get(['projects', this.name, 'releases', this.latestCompatibleVersion, 'urls'], [])
} catch (err) {
// not the best way, but works
urls = []
@@ -396,10 +393,6 @@ export class BaseUpdater {
*
*/
async _download() {
if (!system.online) {
throw new Warning('Update download failed.', 'You need an Internet connection to download the update.')
}

let filepath

for (const url of this.downloadUrls) {

+ 1
- 16
src/modules/updater/dreampower.js View File

@@ -14,7 +14,6 @@ import { BaseUpdater } from './base'
import { requirements, settings } from '../system'
import { dreamtrack } from '../services'

const { getVersion } = $provider.power
const { getPowerPath } = $provider.paths
const { fs } = $provider
const { activeWindow } = $provider.util
@@ -54,21 +53,7 @@ class DreamPowerUpdater extends BaseUpdater {
* @return {string}
*/
async _getCurrentVersion() {
if (!requirements.power.installed) {
return 'v0.0.0'
}

try {
const version = await getVersion()

if (isNil(version)) {
return 'v0.0.0'
}

return version
} catch (error) {
return 'v0.0.0'
}
return requirements.power.version
}

/**

+ 3
- 21
src/modules/updater/dreamtime.js View File

@@ -7,9 +7,6 @@
//
// Written by Ivan Bravo Bravo <ivan@dreamnet.tech>, 2019.

import { dirname } from 'path'
import delay from 'delay'
import { exec } from 'child_process'
import { BaseUpdater } from './base'
import dream from '../dream'

@@ -51,25 +48,10 @@ class DreamTimeUpdater extends BaseUpdater {
* @param {string} filepath
*/
async install(filepath) {
if (!dream.isPortable) {
try {
exec(filepath)
shell.showItemInFolder(filepath)

await delay(1000)

// Quit to update
app.quit()
} catch (error) {
shell.openItem(dirname(filepath))
throw error
}
} else {
if (!shell.openItem(filepath)) {
shell.openItem(dirname(filepath))
}

app.quit()
}
// Quit to update
app.quit()
}

/**

+ 1
- 11
src/modules/updater/waifu.js View File

@@ -14,7 +14,6 @@ import { BaseUpdater } from './base'
import { requirements, settings } from '../system'
import { dreamtrack } from '../services'

const { getVersion } = $provider.waifu
const { getWaifuPath } = $provider.paths
const { fs } = $provider
const { activeWindow } = $provider.util
@@ -54,16 +53,7 @@ class WaifuUpdater extends BaseUpdater {
* @return {string}
*/
async _getCurrentVersion() {
if (!requirements.waifu.installed) {
return 'v0.0.0'
}

try {
const version = await getVersion()
return version
} catch (error) {
return 'v0.0.0'
}
return requirements.waifu.version
}

/**

+ 1
- 10
src/nuxt.config.js View File

@@ -94,8 +94,6 @@ module.exports = {
'@nuxtjs/tailwindcss',
// Doc: https://github.com/nuxt-community/style-resources-module
'@nuxtjs/style-resources',
// Doc: https://github,.com/Developmint/nuxt-purgecss
// 'nuxt-purgecss',
],

/*
@@ -117,13 +115,6 @@ module.exports = {
scss: '~/assets/css/utilities/all.scss',
},

/**
*
*/
purgeCSS: {
enabled: true,
},

/**
* Scan and auto import components.
*/
@@ -153,7 +144,7 @@ module.exports = {
/**
* Enables Common CSS Extraction using Vue Server Renderer guidelines.
*/
extractCSS: true,
extractCSS: false,

/**
*

+ 50
- 50
src/package.json View File

@@ -3,7 +3,7 @@
"private": true,
"displayName": "DreamTime",
"description": "Application that uses artificial intelligence to generate fake nudes.",
"version": "1.5.4",
"version": "1.5.5",
"homepage": "https://time.dreamnet.tech",
"main": "electron/dist/index.js",
"license": "GPL-3.0-only",
@@ -37,30 +37,30 @@
},
"dependencies": {
"7zip-bin": "^5.0.3",
"@adonisjs/websocket-client": "^1.0.9",
"@dicebear/avatars": "^4.2.1",
"@dicebear/avatars-jdenticon-sprites": "^4.2.1",
"@adonisjs/websocket-client": "1.0.9",
"@dicebear/avatars": "^4.2.5",
"@dicebear/avatars-jdenticon-sprites": "^4.2.5",
"@dreamnet/logplease": "^1.0.0",
"@dreamnet/queue": "^0.1.2",
"@fortawesome/fontawesome-svg-core": "^1.2.28",
"@fortawesome/free-brands-svg-icons": "^5.13.0",
"@fortawesome/free-regular-svg-icons": "^5.13.0",
"@fortawesome/free-solid-svg-icons": "^5.13.0",
"@fortawesome/vue-fontawesome": "^0.1.9",
"@fortawesome/fontawesome-svg-core": "^1.2.30",
"@fortawesome/free-brands-svg-icons": "^5.14.0",
"@fortawesome/free-regular-svg-icons": "^5.14.0",
"@fortawesome/free-solid-svg-icons": "^5.14.0",
"@fortawesome/vue-fontawesome": "^0.1.10",
"@imagemagick/magick-wasm": "^0.0.2",
"@sweetalert2/theme-dark": "^3.1.4",
"@sweetalert2/theme-dark": "^3.2.0",
"axios": "^0.19.2",
"chokidar": "^3.4.0",
"chokidar": "^3.4.1",
"combokeys": "^3.0.1",
"compare-versions": "^3.6.0",
"cropperjs": "^1.5.7",
"cryptr": "^6.0.2",
"dayjs": "^1.8.28",
"dayjs": "^1.8.31",
"deferred": "^0.7.11",
"delay": "^4.3.0",
"electron-context-menu": "^2.0.1",
"electron-devtools-installer": "^3.0.0",
"electron-util": "^0.14.1",
"delay": "^4.4.0",
"electron-context-menu": "^2.2.0",
"electron-devtools-installer": "^3.1.1",
"electron-util": "^0.14.2",
"emoji-strip": "^1.0.1",
"eventemitter3": "^4.0.4",
"fabric": "^3.6.3",
@@ -73,66 +73,66 @@
"is-online": "^8.4.0",
"js-event-bus": "^1.0.3",
"js-yaml": "^3.14.0",
"lodash": "^4.17.15",
"logrocket": "^1.0.7",
"lodash": "^4.17.19",
"logrocket": "^1.0.10",
"markdown-it": "^11.0.0",
"md5-file": "^5.0.0",
"melanke-watchjs": "^1.5.2",
"mime-types": "^2.1.27",
"node-7z": "^2.1.1",
"normalize-path": "^3.0.0",
"nuxt": "^2.13.0",
"nuxt": "^2.14.0",
"patch-package": "^6.2.2",
"popmotion": "^8.7.3",
"portal-vue": "^2.1.7",
"postinstall-postinstall": "^2.1.0",
"promise-worker": "^2.0.1",
"randomcolor": "^0.5.4",
"randomcolor": "^0.6.2",
"regedit": "^3.0.3",
"rollbar": "^2.16.2",
"rollbar": "^2.19.1",
"semver-regex": "^3.1.1",
"slash": "^3.0.0",
"sourcemapped-stacktrace": "^1.1.11",
"sweetalert2": "^9.15.0",
"systeminformation": "^4.26.9",
"tippy.js": "^6.2.3",
"sweetalert2": "^9.17.1",
"systeminformation": "^4.26.10",
"tippy.js": "^6.2.6",
"tui-image-editor": "3.9.0",
"unique-names-generator": "^4.2.0",
"unique-names-generator": "^4.3.0",
"unzipper": "^0.10.11",
"uuid": "^8.0.0",
"vue-slider-component": "^3.1.5"
"uuid": "^8.3.0",
"vue-slider-component": "^3.2.2"
},
"devDependencies": {
"@babel/cli": "^7.8.4",
"@babel/core": "^7.8.4",
"@babel/plugin-proposal-class-properties": "^7.8.3",
"@babel/plugin-proposal-export-default-from": "^7.8.3",
"@babel/plugin-proposal-optional-chaining": "^7.9.0",
"@babel/plugin-transform-regenerator": "^7.8.7",
"@babel/cli": "^7.10.5",
"@babel/core": "^7.11.0",
"@babel/plugin-proposal-class-properties": "^7.10.4",
"@babel/plugin-proposal-export-default-from": "^7.10.4",
"@babel/plugin-proposal-optional-chaining": "^7.11.0",
"@babel/plugin-transform-regenerator": "^7.10.4",
"@dreamnet/deploy": "^0.1.0",
"@nuxtjs/eslint-config": "^3.0.0",
"@nuxtjs/eslint-config": "^3.1.0",
"@nuxtjs/eslint-module": "^2.0.0",
"@nuxtjs/style-resources": "^1.0.0",
"@nuxtjs/tailwindcss": "^2.0.0",
"@nuxtjs/tailwindcss": "^2.1.1",
"babel-eslint": "^10.1.0",
"babel-plugin-lodash": "^3.3.4",
"babel-plugin-module-resolver": "^4.0.0",
"babel-plugin-transform-inline-environment-variables": "^0.4.3",
"babel-watch": "^7.0.0",
"cross-env": "^7.0.2",
"electron": "9.1.1",
"electron-builder": "^22.6.1",
"electron": "9.1.2",
"electron-builder": "^22.8.0",
"env-cmd": "^10.1.0",
"eslint": "^7.0.0",
"eslint-config-airbnb-base": "^14.1.0",
"eslint": "^7.6.0",
"eslint-config-airbnb-base": "^14.2.0",
"eslint-config-standard": ">=14.1.1",
"eslint-import-resolver-node": "^0.3.3",
"eslint-import-resolver-node": "^0.3.4",
"eslint-import-resolver-nuxt": "^1.0.1",
"eslint-import-resolver-webpack": "^0.12.1",
"eslint-plugin-import": ">=2.20.2",
"eslint-plugin-jest": ">=23.13.1",
"eslint-import-resolver-webpack": "^0.12.2",
"eslint-plugin-import": ">=2.22.0",
"eslint-plugin-jest": ">=23.20.0",
"eslint-plugin-lodash": "^7.1.0",
"eslint-plugin-mocha": "^7.0.0",
"eslint-plugin-mocha": "^7.0.1",
"eslint-plugin-node": ">=11.1.0",
"eslint-plugin-nuxt": ">=1.0.0",
"eslint-plugin-promise": ">=4.2.1",
@@ -141,17 +141,17 @@
"fibers": "^5.0.0",
"husky": "^4.2.5",
"js-yaml-loader": "^1.2.2",
"lint-staged": "^10.2.4",
"mocha": "^7.1.2",
"lint-staged": "^10.2.11",
"mocha": "^8.1.0",
"modclean": "^3.0.0-beta.1",
"ndjson-parse": "^1.0.4",
"ngrok": "^3.2.7",
"nuxt-purgecss": "^1.0.0",
"sass": "^1.25.0",
"sass-loader": "^8.0.2",
"sass": "^1.26.10",
"sass-loader": "^9.0.2",
"shx": "^0.3.2",
"spectron": "^11.0.0",
"tailwindcss": "^1.4.6",
"spectron": "^11.1.0",
"tailwindcss": "^1.6.0",
"tailwindcss-alpha": "hacknug/tailwindcss-alpha#feature/tests",
"worker-loader": "^2.0.0"
},

+ 1
- 1
src/package.min.json View File

@@ -3,7 +3,7 @@
"private": true,
"displayName": "DreamTime",
"description": "Application that uses artificial intelligence to generate fake nudes.",
"version": "1.5.4",
"version": "1.5.5",
"main": "electron/dist/index.js",
"license": "GPL-3.0-only"
}

+ 79
- 0
src/pages/garden.vue View File

@@ -0,0 +1,79 @@
<template>
<div class="dev-garden">
<section class="box cli-errors">
<div class="box__header">
<h2 class="title">
DreamPower Errors
</h2>
</div>

<div class="box__content">
<button v-for="(item, index) of cliErrors"
:key="index"
class="button"
@click="showCliError(item)">
{{ item.query }}
</button>

<button class="button"
@click="showCliError(null)">
Others
</button>
</div>
</section>

<section class="box cli-errors">
<div class="box__header">
<h2 class="title">
Updaters
</h2>
</div>

<div class="box__content">
<nuxt-link to="/wizard/dreamtime?forced=true" class="button">
DreamTime
</nuxt-link>

<nuxt-link to="/wizard/power?forced=true" class="button">
DreamPower
</nuxt-link>

<nuxt-link to="/wizard/checkpoints?forced=true" class="button">
Checkpoints
</nuxt-link>

<nuxt-link to="/wizard/waifu?forced=true" class="button">
Waifu2X
</nuxt-link>
</div>
</section>
</div>
</template>

<script>
import cliErrors from '~/modules/config/cli-errors.json'

export default {
data: () => ({
cliErrors,
}),

methods: {
showCliError(item) {
if (!item) {
throw new Warning('Unknown error!', 'The algorithm has been interrupted by an unknown problem. Please visit our <a href="https://chat.dreamnet.tech" target="_blank">chat</a> for support, we may ask you for the photo/video and the text below to fix the problem.', new Error('Im a bug! ๐Ÿž'))
}

throw new Warning(item.title || 'Unknown error!', item.message, new Error('Im a bug! ๐Ÿž'))
},
},
}
</script>

<style lang="scss" scoped>
.cli-errors {
.button {
@apply m-3;
}
}
</style>

+ 15
- 12
src/pages/index.vue View File

@@ -43,25 +43,28 @@
</div>

<!-- DreamTime Updater -->
<div v-if="dreamtime.available"
class="notification notification--warning cursor-pointer"
@click="$router.push('/wizard/dreamtime')">
<AppNotification v-if="dreamtime.available"
:name="`update-dreamtime-${dreamtime.latest.tag_name}`"
class="cursor-pointer"
@click="$router.push('/wizard/dreamtime')">
๐ŸŽ‰ <strong>{{ $dream.name }} {{ dreamtime.latest.tag_name }}</strong> is available for download!
</div>
</AppNotification>

<!-- DreamPower Updater -->
<div v-if="dreampower.available"
class="notification notification--warning cursor-pointer"
@click="$router.push('/wizard/power')">
<AppNotification v-if="dreampower.available"
:name="`update-dreampower-${dreampower.latest.tag_name}`"
class="cursor-pointer"
@click="$router.push('/wizard/power')">
๐ŸŽ‰ <strong>{{ dreampower.displayName }} {{ dreampower.latest.tag_name }}</strong> is available for download!
</div>
</AppNotification>

<!-- Checkpoints Updater -->
<div v-if="checkpoints.available"
class="notification notification--warning cursor-pointer"
@click="$router.push('/wizard/checkpoints')">
<AppNotification v-if="checkpoints.available"
class="notification notification--warning cursor-pointer"
:name="`update-checkpoints-${checkpoints.latest.tag_name}`"
@click="$router.push('/wizard/checkpoints')">
๐ŸŽ‰ <strong>{{ checkpoints.displayName }} {{ checkpoints.latest.tag_name }}</strong> is available for download!
</div>
</AppNotification>

<div class="uploader__methods">
<!-- Web Address -->

+ 1
- 1
src/pages/nudify/_id.vue View File

@@ -214,7 +214,7 @@ export default {

.nudify__buttons {
.button {
@apply w-full mb-3;
@apply w-full mb-6;
}
}
</style>

+ 5
- 0
src/pages/nudify/_id/preferences.vue View File

@@ -12,6 +12,11 @@
</h3>
</PageHeader>

<AppNotification v-if="photo.preferences.mode === 3" name="advanced-mode" class="notification--info">
<span class="icon"><font-awesome-icon icon="exclamation-triangle" /></span>
<span>Custom masks mode is recommended only for experienced users. <a href="https://dreamtime.tech/docs/guide/custom-masks/" target="_blank">Click here to visit the guide</a>.</span>
</AppNotification>

<SettingsPreferences v-model="photo.preferences" :animated="!photo.canModify" />
</div>
</template>

+ 5
- 0
src/pages/nudify/_id/results.vue View File

@@ -49,6 +49,11 @@
</template>
</PageHeader>

<div v-if="photo.isScaleModeCorrected" class="notification notification--warning">
<span class="icon"><font-awesome-icon icon="exclamation-triangle" /></span>
You have selected the scale method <strong>{{ photo.preferences.advanced.scaleMode }}</strong> but have not used the tool! <strong>Automatic Resize</strong> will be used instead.
</div>

<!-- Custom Masks -->
<section v-if="photo.withCustomMasks" class="results__masks">
<NudifyMaskPhoto :mask="photo.masks.correct" />

+ 23
- 3
src/pages/photos.vue View File

@@ -19,11 +19,18 @@
</template>
</PageHeader>

<div class="photos__content">
<div v-if="photos.length === 0" class="photos__empty">
<font-awesome-icon icon="cloud-showers-heavy" class="icon" />

<h2>
No dreams have been created yet...
</h2>
</div>

<div v-else class="photos__content">
<Photo v-for="(file, index) in photos"
:key="index"
:file="file"
data-private />
:file="file" />
</div>
</div>
</template>
@@ -59,6 +66,19 @@ export default {

}

.photos__empty {
@apply flex flex-col justify-center items-center;
height: 300px;

.icon {
@apply text-6xl text-white mb-4;
}

h2 {
@apply text-2xl;
}
}

.photos__content {
@apply grid grid-cols-4 gap-6;


+ 3
- 3
src/pages/settings/preferences.vue View File

@@ -12,10 +12,10 @@
</h3>
</PageHeader>

<div v-if="value$.preferences.mode === 3" class="notification notification--info">
<AppNotification v-if="value$.preferences.mode === 3" name="advanced-mode" class="notification--info">
<span class="icon"><font-awesome-icon icon="exclamation-triangle" /></span>
<span>Advanced mode is recommended only for experienced users. <a href="https://dreamtime.tech/docs/guide/custom-masks/" target="_blank">Click here to visit the guide</a>.</span>
</div>
<span>Custom masks mode is recommended only for experienced users. <a href="https://dreamtime.tech/docs/guide/custom-masks/" target="_blank">Click here to visit the guide</a>.</span>
</AppNotification>

<SettingsPreferences v-model="value$.preferences" />
</div>

+ 4
- 0
src/pages/settings/processing.vue View File

@@ -11,6 +11,10 @@
</h3>
</PageHeader>

<AppNotification name="device-change">
The <strong>device</strong> option is now part of the preferences for each photo. If you already have photos in the queue, you should change the device in those photos too.
</AppNotification>

<section class="box">
<div class="box__content">
<SettingsField v-if="!isMacOS"

+ 24
- 4
src/pages/wizard/checkpoints.vue View File

@@ -24,7 +24,18 @@
</div>

<div v-else class="notification">
Installed version: <strong>{{ $checkpoints.currentVersion }}</strong>
Installed version: <strong>{{ $checkpoints.version }}</strong>
</div>

<div v-if="updater.error" class="notification notification--danger">
<h5>CONNECTION ERROR!</h5>
<span>It is not possible to update this component because a problem has occurred when trying to get the information from Github, please make sure you have a stable internet connection and restart the application.</span>
<br><br>

<pre>
<span v-if="updater.errorResponse">{{ updater.errorResponse }}</span>
{{ updater.error.stack }}
</pre>
</div>

<AppBox>
@@ -36,19 +47,28 @@

<script>
import { requirements } from '~/modules/system'
import { checkpoints } from '~/modules/projects'

export default {
layout: 'wizard',

middleware({ redirect }) {
if (requirements.power.checkpoints) {
redirect('/wizard/waifu')
middleware({ redirect, route }) {
if (!route.query.forced) {
if (requirements.power.checkpoints) {
redirect('/wizard/waifu')
}
}
},

data: () => ({
requirements,
}),

computed: {
updater() {
return checkpoints.updater
},
},
}
</script>


+ 33
- 13
src/pages/wizard/dreamtime.vue View File

@@ -1,19 +1,31 @@
<template>
<div class="wizard-project">
<div class="layout__header">
<h1 class="title">
<font-awesome-icon icon="sync-alt" /> Updater
</h1>

<h2 class="subtitle">
{{ $dream.name }}
<PageHeader>
<h2 class="title">
<span class="icon"><font-awesome-icon icon="sync-alt" /></span>
<span>Updater</span>
</h2>
</div>

<h3 class="subtitle">
{{ $dreamtime.name }}
</h3>
</PageHeader>

<div class="project__content">
<div class="project__update">
<ProjectUpdate project="dreamtime" />
<div v-if="updater.error" class="notification notification--danger">
<h5>CONNECTION ERROR!</h5>
<span>It is not possible to update this component because a problem has occurred when trying to get the information from Github, please make sure you have a stable internet connection and restart the application.</span>
<br><br>

<pre>
<span v-if="updater.errorResponse">{{ updater.errorResponse }}</span>
{{ updater.error.stack }}
</pre>
</div>

<AppBox>
<ProjectUpdate project="dreamtime" />
</AppBox>
</div>
<