Browse Source

Several bugfixes.

tags/v1.4.4
Ivan Bravo Bravo 9 months ago
parent
commit
ad1255395d

+ 2495
- 0
NOTICE.md
File diff suppressed because it is too large
View File


+ 8
- 1
README.md View File

@@ -8,6 +8,7 @@
<p align="center">
<a href="https://github.com/dreamnettech/dreamtime/actions"><img src="https://github.com/dreamnettech/dreamtime/workflows/CI/CD/badge.svg" /></a>
<a href="https://github.com/dreamnettech/dreamtime/releases"><img src="https://img.shields.io/github/downloads/dreamnettech/dreamtime/total?logo=github&logoColor=white" /></a>
<a href="https://app.fossa.io/projects/git%2Bgithub.com%2Fdreamnettech%2Fdreamtime?ref=badge_shield" target="_blank"><img src="https://app.fossa.io/api/projects/git%2Bgithub.com%2Fdreamnettech%2Fdreamtime.svg?type=shield" /></a>
<a href="https://www.codacy.com/app/kolessios/dreamtime?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=dreamnettech/dreamtime&amp;utm_campaign=Badge_Grade"><img src="https://api.codacy.com/project/badge/Grade/0ecb8ba6eeae42e7bfd0d414d1bacee1" /></a>
<a href="https://codeclimate.com/github/dreamnettech/dreamtime/maintainability"><img src="https://api.codeclimate.com/v1/badges/8d325515768f221e235f/maintainability" /></a>
</p>
@@ -36,6 +37,12 @@ You can see how easy it is to install DreamTime on our [installation page](https

Feel free to contact us and leave your [feedback](https://time.dreamnet.tech/docs/support/feedback).

## Sponsors

Support this project by becoming a sponsor. Your logo will show up here and in the about section of our apps, with a link to your website. [[Become a sponsor](https://www.patreon.com/join/dreamnet/checkout?rid=4426478)]

## License

DreamTime is [GNU GPLv3 licensed](./LICENSE).
[GNU GPLv3](./LICENSE).

[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fdreamnettech%2Fdreamtime.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fdreamnettech%2Fdreamtime?ref=badge_large)

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

@@ -22,6 +22,14 @@
}

.swal2-html-container {
details {
@apply mt-6;

summary {
@apply mb-2 text-sm font-bold cursor-pointer outline-none;
}
}

pre {
@apply text-xs overflow-auto bg-black p-2;
max-height: 100px;

+ 29
- 9
src/assets/css/reset/_scrollbar.scss View File

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

*::-webkit-scrollbar-track
{
-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3);
border-radius: 10px;
@apply bg-dark-800;
}

// the entire scrollbar
*::-webkit-scrollbar
{
@apply bg-dark-800;
width: 10px;
@apply bg-dark-800;
}

// the buttons on the scrollbar (arrows pointing upwards and downwards).
*::-webkit-scrollbar-button {
@apply hidden;
}

// the draggable scrolling handle.
*::-webkit-scrollbar-thumb
{
@apply bg-dark-100;
transition: all .1s ease-in-out;

&:hover {
@apply bg-primary-700;
}
}
}

// he track (progress bar) of the scrollbar.
*::-webkit-scrollbar-track
{
-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3);
@apply bg-dark-800;
}

// the part of the track (progress bar) not covered by the handle.
*::-webkit-scrollbar-track-piece {
@apply bg-dark-800;
}

// the bottom corner of the scrollbar, where both horizontal and vertical scrollbars meet.
*::-webkit-scrollbar-corner {
@apply bg-dark-800;
}




+ 4
- 4
src/components/Layout/Navbar.vue View File

@@ -9,14 +9,14 @@
Settings
</nuxt-link>

<a id="guide" class="navbar__item" :href="manualURL" target="_blank">
Help
</a>

<nuxt-link v-if="unlockedBadTime" class="navbar__item" to="/games/badtime">
Bad Time
</nuxt-link>

<a id="guide" class="navbar__item" :href="manualURL" target="_blank">
Help
</a>

<a v-if="isDev" class="navbar__item" @click.prevent="createError">
Force Error
</a>

+ 2
- 2
src/components/Layout/Topbar.vue View File

@@ -80,7 +80,7 @@ export default {
try {
getCurrentWindow().minimize()
} catch (error) {
throw new Exception('There was a problem trying to minimize the window...', error)
throw new Exception('There was a problem trying to minimize the window.', error)
}
},

@@ -88,7 +88,7 @@ export default {
try {
getCurrentWindow().maximize()
} catch (error) {
throw new Exception('There was a problem trying to maximize the window...', error)
throw new Exception('There was a problem trying to maximize the window.', error)
}
},


+ 2
- 2
src/components/Nudity/PhotoRun.vue View File

@@ -239,8 +239,7 @@ export default {

<style lang="scss" scoped>
.photo-run {
@apply relative;
@apply bg-cover bg-center border-2 border-dark-100;
@apply relative border-2 border-dark-100;
background-image: url('~@/assets/images/curls.png'); /* Background pattern from Toptal Subtle Patterns */
min-height: 512px;
transition: all .15s linear;
@@ -268,6 +267,7 @@ export default {

.run__preview {
@apply absolute opacity-0 left-0 right-0 top-0 bottom-0 z-10;
@apply bg-cover bg-center;
transition: all .3s linear;
}
}

+ 1
- 1
src/components/Nudity/Upload.vue View File

@@ -13,7 +13,7 @@
Put in Queue
</option>
<option value="go-preferences">
Put in Pending and open preferences
Put in Pending and Open preferences
</option>
</select>
</box-item>

+ 5
- 5
src/components/Settings/Preference.vue View File

@@ -2,7 +2,7 @@
<section class="box box--items">
<div class="box__content">
<box-item :description="`Value: ${currentValue.size}`" :label="`${label} size`">
<VueSlider v-model="currentValue.size" :min="0.3" :max="2" :interval="0.05" />
<VueSlider v-model="currentValue.size" :min="min" :max="max" :interval="0.05" />
</box-item>

<box-item
@@ -39,8 +39,8 @@
<VueSlider
v-model="randomizeRange"
:min-range="0.05"
:min="minRange"
:max="maxRange"
:min="min"
:max="max"
:interval="0.05" />
</box-item>
</div>
@@ -59,11 +59,11 @@ export default {
type: String,
required: true,
},
minRange: {
min: {
type: Number,
default: 0.3,
},
maxRange: {
max: {
type: Number,
default: 2,
},

+ 34
- 27
src/components/Settings/SettingsPreferences.vue View File

@@ -1,25 +1,25 @@
<template>
<div class="c-preferences">
<section v-show="currentValue.advanced.transformMode !== 'import-maskfin'" class="box box--items">
<section v-show="currentValue.advanced.transformMode !== 'import-maskfin'" id="preferences-runs" class="box box--items">
<div class="box__header">
<h2 class="title">
Per run.
</h2>
<h3 class="subtitle">
Customize what will happen in each transformation.
Customize what will happen when you nudify.
</h3>
</div>

<div class="box__content">
<box-item
label="Runs."
description="Number of times the photo will be transformed.">
description="Number of times the photo will be nudified.">
<input v-model="currentValue.body.executions" type="number" min="1" class="input">
</box-item>

<box-item
label="Randomize."
description="Random body preferences will be set at each run.">
description="Set random body preferences at each run.">
<select v-model="currentValue.body.randomize" class="input">
<option :value="true">
Enabled
@@ -33,7 +33,7 @@
<box-item
v-show="!currentValue.body.randomize"
label="Progressive."
:description="`Body preferences will increase their value ${currentValue.body.progressive.rate} at each run.`">
:description="`Body preferences will increase ${currentValue.body.progressive.rate} at each run.`">
<select v-model="currentValue.body.progressive.enabled" class="input">
<option :value="true">
Enabled
@@ -45,8 +45,8 @@
</box-item>

<box-item
v-show="!currentValue.body.randomize"
label="Progressive Rate."
v-show="!currentValue.body.randomize && currentValue.body.progressive.enabled"
label="Progressive rate."
:description="`Value: ${currentValue.body.progressive.rate}`">
<VueSlider v-model="currentValue.body.progressive.rate" :min="0.1" :max="0.9" :interval="0.05" />
</box-item>
@@ -54,7 +54,7 @@
</section>

<!-- Boobs -->
<Preference v-model="currentValue.body.boobs" label="Boobs" />
<Preference id="preferences-body" v-model="currentValue.body.boobs" label="Boobs" />

<!-- Areola -->
<Preference v-model="currentValue.body.areola" label="Areola" />
@@ -63,13 +63,13 @@
<Preference v-model="currentValue.body.nipple" label="Nipple" />

<!-- Vagina -->
<Preference v-model="currentValue.body.vagina" label="Vagina" :max-range="1.5" />
<Preference v-model="currentValue.body.vagina" label="Vagina" :max="1.5" />

<!-- Pubic Hair -->
<Preference v-model="currentValue.body.pubicHair" label="Pubic Hair" :min-range="0" />
<Preference v-model="currentValue.body.pubicHair" label="Pubic Hair" :min="0" />

<!-- Advanced -->
<section class="box box--items">
<section id="preferences-advanced" class="box box--items">
<div class="box__header">
<h2 class="title">
Advanced.
@@ -81,8 +81,9 @@

<div class="box__content">
<box-item
id="preferences-advanced-scale"
label="Scale method."
description="Method to scale the photo to 512x512">
description="Method that will be used to scale the photo. Each option can offer different results in each photo.">
<select v-model="currentValue.advanced.scaleMode" class="input">
<option value="none">
None
@@ -106,8 +107,22 @@
</box-item>

<box-item
label="Transform method."
description="Transformation method, only recommended for advanced users.">
id="preferences-advanced-color"
label="Color transfer."
description="Use a experimental algorithm to try to recover the original colors of the photo.">
<select v-model="currentValue.advanced.useColorTransfer" class="input">
<option :value="true">
Enabled
</option>
<option :value="false">
Disabled
</option>
</select>
</box-item>

<box-item
label="Transformation method."
description="Advanced users. Indicates additional options for transformation.">
<select v-model="currentValue.advanced.transformMode" class="input">
<option value="normal">
Nudify
@@ -120,28 +135,20 @@
</option>
</select>
</box-item>

<box-item
label="Color transfer."
description="Use a experimental algorithm to try to recover the original colors of the photo.">
<select v-model="currentValue.advanced.useColorTransfer" class="input">
<option :value="true">
Enabled
</option>
<option :value="false">
Disabled
</option>
</select>
</box-item>
</div>
</section>
</div>
</template>

<script>
import { tutorial } from '~/modules'
import { VModel } from '~/mixins'

export default {
mixins: [VModel],

mounted() {
tutorial.preferences()
},
}
</script>

+ 1
- 1
src/components/UI/BoxItem.vue View File

@@ -135,7 +135,7 @@ export default {
transition: all .1s ease-in-out;

&:hover {
@apply bg-dark-600 text-white;
@apply bg-dark-700 text-white;
}
}


+ 31
- 11
src/modules/config/cli-errors.json View File

@@ -1,7 +1,7 @@
[
{
"query": "Found no NVIDIA driver on your system",
"message": "Found no NVIDIA driver on your system. Please check that you have an NVIDIA GPU and the latest drivers."
"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."
},
{
"query": "The NVIDIA driver on your system is too old",
@@ -15,21 +15,29 @@
"query": "Buy new RAM!",
"message": "You have run out of RAM on your system! Try a photo of smaller size or close all the programs you can."
},
{
"query": "Stopped to avoid memory problems",
"message": "You have run out of RAM on your system! Try a photo of smaller size or close all the programs you can."
},
{
"query": "CUDA out of memory",
"message": "You have run out of VRAM on your GPU! Try a photo of smaller size or close all the programs you can."
},
{
"query": "codec can't decode byte",
"message": "The algorithm had a problem decoding some characters, this may be because one of the folders is in a path with characters that do not belong to the English alphabet. You can change this in the Folders section of Settings."
"message": "There was a problem saving the nudified photo. Please make sure the folders in Settings do not have special characters or spaces."
},
{
"query": "The final result is not a valid image file",
"message": "There was a problem saving the nudified photo. Please make sure you have enough disk space and the folders in Settings do not have special characters or spaces."
},
{
"query": "invalid device ordinal",
"message": "The selected GPU is not a valid device, please make sure that the GPU option in Settings is valid."
"message": "The selected GPU is not a valid device. Please make sure that the GPU option in Settings is valid."
},
{
"query": "Image is not 512 x 512",
"message": "Your photo needs to be 512x512 to be transformed, please resize the photo with any of the DreamTime options or manually before uploading."
"message": "Your photo needs to be 512x512 to be nudified. Please resize the photo with any of the DreamTime options or manually before uploading."
},
{
"query": "loading Python",
@@ -41,22 +49,34 @@
},
{
"query": "file is not valid image",
"message": "There was a problem loading the photo, please make sure it is not corrupt."
"message": "There was a problem trying to load the photo. Please make sure it is a valid photo and has not been deleted."
},
{
"query": "cv2.error",
"message": "There was a problem loading the photo, please make sure it is not corrupt."
"message": "There was a problem trying to load the photo. Please make sure it is a valid photo and has not been deleted."
},
{
"query": "is not a valid file or directory or url",
"message": "There was a problem trying to load the photo. Please make sure it is a valid photo and has not been deleted."
},
{
"query": "file not a supported format",
"message": "There was a problem trying to load the photo. Please make sure it is a valid photo and has not been deleted."
},
{
"query": "not compiled with CUDA",
"message": "You have installed the CPU-only version of DreamPower. Please reinstall DreamPower to get GPU support."
},
{
"query": "file not a supported format",
"message": "There was a problem loading the photo, please make sure it is not corrupt and is of a valid format."
"query": "float division by zero",
"message": "There was a problem cropping the photo. Please make sure you position the cropper correctly."
},
{
"query": "The final result is not a valid image file",
"message": "The photo has been transformed but could not be saved. Please make sure you have enough disk space and that DreamTime can write to it."
"query": "Python was not found",
"message": "Python is not installed on the system. Please disable the Use Python option if you are not using the algorithm source code."
},
{
"query": "CUDA error",
"message": "Your GPU has reported a problem. Please make sure you have the latest drivers installed or reinstall it to fix any errors."
}
]

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

@@ -102,7 +102,7 @@ export class Consola {
}

if (logrocket.enabled) {
logrocket.track(event)
logrocket.track(`${category}.${event}`)
}

return this

+ 6
- 9
src/modules/consola/log.js View File

@@ -26,12 +26,6 @@ const LEVELS = [
'error',
]

/**
* @typedef {Object} LogOptions
* @property {string} title
* @property {boolean} quiet
*/

export class Log {
/**
* @type {Logger.Logger}
@@ -151,6 +145,10 @@ export class Log {
console.warn('Log could not be handled:', err)
}

if (this.error instanceof HandledError) {
return
}

this.handle().catch((err) => {
// eslint-disable-next-line no-console
console.warn('Log could not be handled:', err)
@@ -199,9 +197,8 @@ export class Log {
// bug tracking.
if (rollbar.enabled) {
try {
rollbarResponse = rollbar[this.level](this.error || this.message, {
rollbarResponse = rollbar[this.level](this.title || this.message, this.error, {
...this.extra,
title: this.title,
sessionURL: logrocket.sessionURL,
snapshot: {
system: system.snapshot,
@@ -245,7 +242,7 @@ export class Log {

if (isError(this.error)) {
const stack = he.encode(toString(this.error.stack))
html = `${html}<br><br><pre>${stack}</pre>`
html = `${html}<details><summary>More information</summary><pre>${stack}</pre></details>`
}

Swal.fire({

+ 10
- 3
src/modules/nudify/photo-run.js View File

@@ -11,6 +11,7 @@ import {
isNil, isEmpty, truncate, deburr, forIn, cloneDeep, random, toString,
} from 'lodash'
import deferred from 'deferred'
import Swal from 'sweetalert2/dist/sweetalert2.js'
import { File } from '../file'
import { Timer } from '../timer'
import cliErrors from '../config/cli-errors'
@@ -246,7 +247,7 @@ export class PhotoRun {

this.process.on('fail', (fileError) => {
if (fileError) {
def.reject(new Warning(`Run ${this.id} has failed!`, 'The photo has been transformed but could not be saved. Please make sure you have enough disk space and that DreamTime can write to it.', fileError))
def.reject(new Warning('Nudification failed!', 'The photo has been transformed but could not be saved. Please make sure you have enough disk space and that DreamTime can write to it.', fileError))
} else {
def.reject(this.getPowerError())
}
@@ -328,7 +329,13 @@ export class PhotoRun {
return null
}

const title = `Run ${this.id} has failed!`
if (Swal.isVisible()) {
// There is already an open modal,
// we avoid SPAM of errors to the user.
return null
}

const title = 'Nudification failed!'

const extra = {
terminal: this.cli.lines.map((item) => item.text),
@@ -336,7 +343,7 @@ export class PhotoRun {

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


+ 19
- 11
src/modules/nudify/photo.js View File

@@ -107,13 +107,12 @@ export class Photo {

/**
* @type {Object}
* @property {number} startX
* @property {number} startY
* @property {number} endX
* @property {number} endY
*/
overlay = {
startX: 0,
startY: 0,
endX: 0,
endY: 0,
}
overlay

/**
* @type {Consola}
@@ -152,13 +151,22 @@ export class Photo {
get scaleMode() {
const { scaleMode } = this.preferences.advanced

if (scaleMode === 'cropjs' && !this.fileCrop.exists) {
// no crop, automatically rescale for convenience
return 'auto-rescale'
if (scaleMode === 'cropjs') {
if (!this.canModify) {
this.consola.warn('Wanted to use the cropper but we cannot modify.')
return 'auto-rescale'
}

if (!this.fileCrop.exists) {
this.consola.warn('Wanted to use the cropper but the file does not exist.')

// The Cropper has not been used.
return 'auto-rescale'
}
}

if ((scaleMode === 'cropjs' || scaleMode === 'overlay') && !this.canModify) {
// this file can't be modified
if (scaleMode === 'overlay' && isNil(this.overlay)) {
// The Cropper has not been used.
return 'auto-rescale'
}


+ 5
- 3
src/modules/services/logrocket.js View File

@@ -34,7 +34,7 @@ class LogRocketService extends BaseService {
* @type {boolean}
*/
get can() {
return isString(this.accessToken) && process.env.name === 'production'
return isString(this.accessToken) && settings.telemetry?.dom && process.env.name === 'production'
}

/**
@@ -71,7 +71,7 @@ class LogRocketService extends BaseService {
},
},
dom: {
isEnabled: settings.telemetry?.dom || true,
isEnabled: true,
baseHref: $provider.ngrok.getAddress() || nucleus.urls?.internal?.cdn,
},
}
@@ -85,7 +85,7 @@ class LogRocketService extends BaseService {
try {
LogRocket.init(this.accessToken, this.config)

LogRocket.identify(settings.payload.user, {
LogRocket.identify(settings.user, {
settings: settings.payload,
})

@@ -94,6 +94,8 @@ class LogRocketService extends BaseService {

consola.info('LogRocket enabled!')
consola.debug(`Access Token: ${this.accessToken}`)
consola.debug(`User: ${settings.user}`)
consola.debug(this.config)
} catch (err) {
consola.warn('LogRocket setup failed!', err)
}

+ 17
- 13
src/modules/services/nucleus.js View File

@@ -10,7 +10,7 @@
import { isNil } from 'lodash'
import axios from 'axios'
import { BaseService } from './base'
import { settings } from '../system'
import { settings } from '../system/settings'
import { Consola } from '../consola'

const { system } = $provider
@@ -36,6 +36,19 @@ export class NucleusService extends BaseService {
return !isNil(this.appId)
}

/**
* @type {Object}
*/
get config() {
return {
disableTracking: false,
disableErrorReports: true,
userId: settings.user,
version: process.env.npm_package_version,
persist: true,
}
}

/**
* Setup service
*/
@@ -47,28 +60,19 @@ export class NucleusService extends BaseService {
try {
const Nucleus = require('nucleus-nodejs')

// nucleus configuration
const config = {
disableTracking: settings.telemetry.enabled === false,
disableErrorReports: true,
userId: settings.user,
version: process.env.npm_package_version,
persist: true,
}

Nucleus.init(this.appId, config)
Nucleus.init(this.appId, this.config)

Nucleus.appStarted()

this.service = Nucleus
this.enabled = true

await this.fetchData()
setInterval(this.fetchData.bind(this), 15 * 60 * 1000)

this.enabled = true

consola.info('Nucleus enabled!')
consola.debug(`App ID: ${this.appId}`)
consola.debug(this.config)
} catch (err) {
consola.warn('Nucleus setup failed!', err)
}

+ 2
- 1
src/modules/services/rollbar.js View File

@@ -31,7 +31,7 @@ class RollbarService extends BaseService {
* @type {string}
*/
get accessToken() {
return process.env.ROLLBAR_ACCESS_TOKEN || nucleus.keys?.rollbarKey
return process.env.ROLLBAR_ACCESS_TOKEN || nucleus.keys?.rollbarKey2
}

/**
@@ -104,6 +104,7 @@ class RollbarService extends BaseService {

consola.info('Rollbar started!')
consola.debug(`Access Token: ${this.accessToken}`)
consola.debug(this.config)
} catch (err) {
consola.warn('Rollbar setup failed!', err)
}

+ 1
- 1
src/modules/system/achievements.js View File

@@ -33,7 +33,7 @@ export const achievements = {
html: 'You\'re gonna have a bad time.',
toast: true,
position: 'bottom-end',
timer: 6000,
timer: 15000,
timerProgressBar: true,
})


+ 72
- 0
src/modules/tutorial.js View File

@@ -83,4 +83,76 @@ export const tutorial = {

localStorage.setItem('tutorial.upload', 'true')
},

badtime() {
const seen = localStorage.getItem('tutorial.badtime')

if (!isNil(seen)) {
return
}

const intro = introJs()

intro.setOptions({
showBullets: false,
overlayOpacity: 0.7,
steps: [
{
intro: 'You have unlocked the BadTime easter-egg! Use the arrows on your keyboard to play while your photos are nudified in the background. Try to survive as long as possible! 💀🎮',
},
],
})

intro.start()

localStorage.setItem('tutorial.badtime', 'true')
},

preferences() {
const seen = localStorage.getItem('tutorial.preferences')

if (!isNil(seen)) {
return
}

const intro = introJs()

intro.setOptions({
showBullets: false,
overlayOpacity: 0.7,
steps: [
{
intro: 'Photo preferences are an important part of DreamTime, each photo has its set of preferences with which it works best. Let me give you some information.',
},

{
element: '#preferences-runs',
intro: 'In this section you can find the options to execute several transformations in the same photo. The best way to take advantage of them is to increase the number of runs and activate the Randomize or Progressive option so that each run has different preferences and you can save the result that you like best.',
},

{
element: '#preferences-body',
intro: 'In this section you can customize the size of the body parts, this depends entirely on your tastes!',
},

{
element: '#preferences-advanced-scale',
intro: 'This option can dramatically increase or decrease the quality of the result. If you come from DeepNude, the Manual Crop option will be the one you feel most comfortable with, but we recommend you experiment with the other options and find the ideal one for your photo.',
},

{
element: '#preferences-advanced-color',
intro: 'Activating this option will apply an algorithm that could restore the original colors of the photo, it does not always work but it is worth trying.',
},

{
intro: 'That\'s all for now, as we said before we recommend you experiment with these preferences, with a little practice you will start creating amazing nudes!',
},
],
})

intro.start()

localStorage.setItem('tutorial.preferences', 'true')
},
}

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

@@ -23,7 +23,7 @@ import { Consola } from '../consola'
const { system } = $provider
const { getPath } = $provider.paths
const { existsSync, statSync, download } = $provider.fs
const { dialog } = $provider.api
const { dialog, app } = $provider.api
const { platform } = $provider.util

const extRegex = /(?:\.([^.]+))?$/
@@ -188,17 +188,19 @@ export class BaseUpdater {
/**
*
*/
async setup() {
async setup(required = false) {
this.enabled = false

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

if (!nucleus.enabled) {
this.consola.warn('No connection with Nucleus.')
return
if (!nucleus.enabled) {
this.consola.warn('No connection with Nucleus.')
return
}
}

if (!this.can) {
@@ -209,11 +211,11 @@ export class BaseUpdater {
try {
this.http = axios.create({
baseURL: `${GITHUB_API}/${this.githubRepo}`,
timeout: 3000,
timeout: 6000,
})

await this._fetchReleases()
this.consola.info(`Current: ${this.currentVersion} - Latest Compatible: ${this.latestCompatibleVersion}`)
this.consola.info(`Current: ${this.currentVersion} - Latest: ${this.latestCompatibleVersion}`)

this.refresh()

@@ -223,11 +225,27 @@ export class BaseUpdater {
this.sendNotification()
}
} catch (err) {
this.consola.warn('Unable to fetch the latest version information.', err)
this.consola.warn('Unable to fetch the latest version!', err)

if (required) {
dialog.showMessageBoxSync({
type: 'error',
title: 'Connect to Internet.',
message: 'There was a problem getting information on some components needed to download. Please make sure you are connected to the Internet just for this time. DreamTime will restart...',
})

// Restart.
app.relaunch()
app.quit()
}
}
}

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

this.downloadUrls = this._getDownloadUrls()
}


+ 7
- 0
src/modules/updater/checkpoints.js View File

@@ -23,6 +23,13 @@ class CheckpointsUpdater extends BaseUpdater {
return 'checkpoints'
}

/**
* @type {string}
*/
get githubRepo() {
return super.githubRepo || 'dreamnettech/dreampower-checkpoints'
}

/**
* @type {string}
*/

+ 9
- 2
src/modules/updater/dreampower.js View File

@@ -27,6 +27,13 @@ class DreamPowerUpdater extends BaseUpdater {
return 'dreampower'
}

/**
* @type {string}
*/
get githubRepo() {
return super.githubRepo || 'dreamnettech/dreampower'
}

/**
* @type {string}
*/
@@ -87,10 +94,10 @@ class DreamPowerUpdater extends BaseUpdater {
/**
*
*/
async setup() {
async setup(required = false) {
this._currentVersion = await this._getCurrentVersion()

await super.setup()
await super.setup(required)
}

/**

+ 2
- 2
src/package.json View File

@@ -4,7 +4,7 @@
"description": "An open-source and super-improved version of DeepNude.",
"author": "DreamNet",
"homepage": "https://time.dreamnet.tech",
"version": "1.3.3",
"version": "1.3.4",
"main": "electron/dist/index.js",
"license": "GPL-3.0-only",
"private": true,
@@ -155,4 +155,4 @@
"tailwindcss-alpha": "hacknug/tailwindcss-alpha#feature/tests",
"worker-loader": "^2.0.0"
}
}
}

+ 31
- 2
src/pages/about.vue View File

@@ -74,14 +74,39 @@
:version="item.version" />
</div>
</section>
</div>

<div class="about__columns">
<!-- Sponsors -->
<section class="box box--items is-contributors">
<div class="box__content">
<box-item
icon="thumbs-up"
label="Sponsors"
description="Incredible services that support the project." />

<box-item
v-for="(item, index) in sponsors"
:key="index"
:label="item.label"
:description="item.description"
:href="item.href"
:icon="item.icon" />

<box-item
label="Become a sponsor"
icon="check-circle"
href="https://www.patreon.com/join/dreamnet/checkout?rid=4426478" />
</div>
</section>

<!-- Supporters -->
<section class="box box--items is-contributors">
<div class="box__content">
<box-item
icon="grin-hearts"
icon="heart"
label="Supporters"
description="Wonderful people who have helped us make this possible." />
description="Wonderful people that without them this would not be possible." />

<box-item
v-for="(item, index) in supporters"
@@ -158,6 +183,10 @@ export default {
}
},

sponsors() {
return nucleus.sponsors || []
},

supporters() {
return nucleus.supporters || []
},

+ 1
- 0
src/pages/dreamnet.vue View File

@@ -106,6 +106,7 @@ export default {
@apply absolute h-full w-full;
@apply flex items-center justify-center;
@apply px-6 bg-black-80 opacity-0;
backdrop-filter: blur(6px);
}

.header__content {

+ 3
- 1
src/pages/games/badtime.vue View File

@@ -1,6 +1,7 @@
<template>
<div class="badtime">
<iframe
id="badtime"
src="https://badtime.dreamnet.tech"
name="badtime"
scrolling="no"
@@ -12,7 +13,7 @@
</template>

<script>
import { events } from '~/modules'
import { events, tutorial } from '~/modules'

export default {
mounted() {
@@ -21,6 +22,7 @@ export default {

methods: {
unlock() {
tutorial.badtime()
events.emit('achievements.badtime')
},
},

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

@@ -159,6 +159,6 @@ export default {
}

.nudify__content {
@apply flex-1;
@apply flex-1 overflow-x-auto;
}
</style>

+ 10
- 16
src/pages/nudify/_id/crop.vue View File

@@ -1,7 +1,7 @@
<template>
<div class="nudify-cropper">
<div class="cropper__crop">
<canvas ref="cropCanvas" />
<canvas ref="cropCanvas" data-private />
</div>

<div class="cropper__help">
@@ -19,11 +19,7 @@

<div class="box__content">
<p>
This tool allows you to manually crop the photo so that the selected area is resized to 512x512
</p>

<p>
<font-awesome-icon icon="mouse-pointer" /> Move the photo by dragging it with the mouse, you can zoom in or out using the mouse wheel.
This tool allows you to manually select the area you want to be cropped from the photo and resized.
</p>
</div>
</section>
@@ -31,19 +27,17 @@
<section class="box">
<div class="box__header">
<h2 class="title">
<font-awesome-icon icon="question-circle" /> How to obtain better results?
<font-awesome-icon icon="mouse-pointer" /> Commands
</h2>
</div>

<div class="box__content">
<p>
<ul>
<li>Only one person should appear in the photo.</li>
<li>The person is standing in a straight position without crossing arms or legs.</li>
<li>The person is looking towards the camera.</li>
<li>The person wears light clothes. Bikinis work better.</li>
<li>The person's body is visible and unobstructed.</li>
</ul>
- Increase or decrease the zoom with the mouse wheel.
</p>

<p>
- Move the photo by dragging it with the mouse.
</p>
</div>
</section>
@@ -51,13 +45,13 @@
<section class="box">
<div class="box__header">
<h2 class="title">
<font-awesome-icon icon="exclamation-triangle" /> Use at your own risk.
<font-awesome-icon icon="exclamation-triangle" /> Warning.
</h2>
</div>

<div class="box__content">
<p>
This tool can dramatically decrease the quality of the photo, its use is not recommended.
This tool can dramatically decrease the quality of some photos. (blurry photos)
</p>
</div>
</section>

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

@@ -1,6 +1,6 @@
<template>
<div class="nudify-editor">
<div ref="imageEditor" class="editor" />
<div ref="imageEditor" class="editor" data-private />
</div>
</template>


+ 20
- 11
src/pages/nudify/_id/overlay.vue View File

@@ -1,7 +1,7 @@
<template>
<div class="nudify-cropper">
<div class="cropper__crop">
<canvas ref="cropCanvas" />
<canvas ref="cropCanvas" data-private />
</div>

<div class="cropper__help">
@@ -19,15 +19,29 @@

<div class="box__content">
<p>
This tool allows you to select which area of the photo you want to cut, transform and then restore to the original photo.
This tool allows you to manually select the area you want to be cropped, nudified and then restored to the original photo.
</p>

<p>
It is perfect for big photos where you just want to transform a specific area but you don't want to lose everything else.
It is perfect to preserve the original dimensions of the photo and only nudify a specific area.
</p>
</div>
</section>

<section class="box">
<div class="box__header">
<h2 class="title">
<font-awesome-icon icon="mouse-pointer" /> Commands
</h2>
</div>

<div class="box__content">
<p>
- Increase or decrease the zoom with the mouse wheel.
</p>

<p>
<font-awesome-icon icon="mouse-pointer" /> Move the photo by dragging it with the mouse, you can zoom in or out using the mouse wheel.
- Move the photo by dragging it with the mouse.
</p>
</div>
</section>
@@ -35,18 +49,13 @@
<section class="box">
<div class="box__header">
<h2 class="title">
<font-awesome-icon icon="question-circle" /> How to obtain better results?
<font-awesome-icon icon="exclamation-triangle" /> Warning.
</h2>
</div>

<div class="box__content">
<p>
<ul>
<li>The person is standing in a straight position without crossing arms or legs.</li>
<li>The person is looking towards the camera.</li>
<li>The person wears light clothes. Bikinis work better.</li>
<li>The person's body is visible and unobstructed.</li>
</ul>
This tool can dramatically decrease the quality of some photos. (blurry photos)
</p>
</div>
</section>

+ 1
- 1
src/pages/settings/app.vue View File

@@ -13,7 +13,7 @@
Put in Queue
</option>
<option value="go-preferences">
Put in Pending and open preferences
Put in Pending and Open preferences
</option>
</select>
</box-item>

+ 4
- 4
src/pages/settings/folders.vue View File

@@ -8,25 +8,25 @@
<div class="box__content">
<box-item
label="DreamPower"
description="Location of DreamPower (also known as CLI)">
description="Algorithm location.">
<input v-model="currentValue.folders.cli" readonly class="input" title="Change" @click.prevent="changePower">
</box-item>

<box-item
label="Models"
description="Location where the transformed photos will be saved.">
description="Location where all nudified photos will be saved.">
<input v-model="currentValue.folders.models" class="input" readonly title="Change" @click.prevent="changeModels">
</box-item>

<box-item
label="Cropped"
description="Location where the cropped photos will be saved. We recommend selecting a temporary folder.">
description="Location where the cropped and editor photos will be saved before nudifying.">
<input v-model="currentValue.folders.cropped" class="input" readonly title="Change" @click.prevent="changeCropped">
</box-item>

<box-item
label="Masks"
description="Location where the algorithm masks photos will be saved. We recommend selecting a temporary folder.">
description="Location where the algorithm masks photos will be saved.">
<input v-model="currentValue.folders.masks" class="input" readonly title="Change" @click.prevent="changeMasks">
</box-item>
</div>

+ 2
- 2
src/pages/settings/processing.vue View File

@@ -5,7 +5,7 @@
<box-item
v-if="!isMacOS"
label="Device."
description="Device that will be used to transform photos. GPU is faster.">
description="Device that will be used to nudify. GPU is faster.">
<select v-model="currentValue.processing.device" class="input">
<option value="CPU">
CPU
@@ -30,7 +30,7 @@
<box-item
v-if="currentValue.processing.device === 'GPU'"
label="GPU."
description="Graphics card that will be used to transform the photos.">
description="Graphics card to use.">
<select v-model="currentValue.processing.gpus[0]" class="input">
<option v-for="(device, index) in $provider.system.graphics" :key="index" :value="index">
{{ device.model }}

+ 2
- 2
src/plugins/boot.js View File

@@ -39,8 +39,8 @@ export default async ({ app }, inject) => {
// This information is needed for the wizard.
await Promise.all([
dreamtime.setup(),
dreampower.setup(),
checkpoints.setup(),
dreampower.setup(true),
checkpoints.setup(true),
])
} else {
Promise.all([

Loading…
Cancel
Save