diff --git a/.DS_Store b/.DS_Store index 1a3312fc..bc281f0e 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/src/components/modals/main/scss/settings/modules/_reminder.scss b/src/components/modals/main/scss/settings/modules/_reminder.scss index 52a4be23..2a5aabff 100644 --- a/src/components/modals/main/scss/settings/modules/_reminder.scss +++ b/src/components/modals/main/scss/settings/modules/_reminder.scss @@ -18,3 +18,54 @@ @include modal-button(standard); } } + +.reminderSettingsHolder { + display: flex; + flex-flow: column; + @include themed() { + input[type='text'] { + width: 260px; + background: t($modal-sidebar); + border: 3px solid t($modal-sidebarActive); + color: t($color); + padding: 15px 20px; + border-radius: 4px; + display: flex !important; + cursor: pointer; + + &::-webkit-calendar-picker-indicator { + cursor: pointer; + } + } + .reminderSetting { + border-radius: t($borderRadius); + display: flex; + flex-flow: row; + justify-content: space-between; + align-items: center; + padding: 15px; + .link { + display: flex; + align-items: center; + gap: 20px; + } + div { + display: flex; + flex-flow: column; + gap: 10px; + align-items: center; + } + background: t($modal-sidebar); + .colorPicker { + align-items: center; + padding: 10px 15px 10px 15px; + border-radius: 100px; + display: flex; + flex-flow: row; + gap: 25px; + background: t($modal-sidebarActive); + box-shadow: 0 0 0 1px t($modal-sidebar); + } + } + } +} diff --git a/src/components/modals/main/settings/sections/Reminder.jsx b/src/components/modals/main/settings/sections/Reminder.jsx index 38a894f3..eef7e367 100644 --- a/src/components/modals/main/settings/sections/Reminder.jsx +++ b/src/components/modals/main/settings/sections/Reminder.jsx @@ -1,12 +1,20 @@ import variables from 'modules/variables'; import { PureComponent } from 'react'; import Header from '../Header'; - +import Text from '../Text'; +import { MdRemoveCircleOutline } from 'react-icons/md'; +import SettingsItem from '../SettingsItem'; export default class ReminderSettings extends PureComponent { constructor() { super(); this.state = { colour: localStorage.getItem('reminderColour') || '#ffa500', + reminder: JSON.parse(localStorage.getItem('reminder')) || [ + { + value: '', + done: false, + }, + ], }; } @@ -16,6 +24,15 @@ export default class ReminderSettings extends PureComponent { localStorage.setItem('reminderColour', colour); } + addReminder() { + let reminderTitle = this.state.todo; + reminderTitle.push({ + value: '', + done: false, + }); + this.updateReminderState(reminderTitle); + } + render() { const getMessage = (text) => variables.language.getMessage(variables.languagecode, text); return ( @@ -28,7 +45,7 @@ export default class ReminderSettings extends PureComponent { zoomSetting="zoomReminder" switch={true} /> - + */} + + + +
+
+
+
+ this.updateColour(event)} + value={this.state.colour} + > + +
+ + Remove + +
+
+ + + + +
+
+
); } diff --git a/src/components/widgets/background/PhotoInformation.jsx b/src/components/widgets/background/PhotoInformation.jsx index f93340f5..670f38a6 100644 --- a/src/components/widgets/background/PhotoInformation.jsx +++ b/src/components/widgets/background/PhotoInformation.jsx @@ -35,6 +35,8 @@ const downloadImage = async (info) => { variables.stats.postEvent('feature', 'Background download'); }; + + // todo: copy link to unsplash/pexels page not image url const copyImage = (info) => { variables.stats.postEvent('feature', 'Background copied'); @@ -134,6 +136,7 @@ export default function PhotoInformation({ info, url, api }) { ); } + const downloadEnabled = localStorage.getItem('downloadbtn') === 'true' && !info.offline && !info.photographerURL && api; const downloadBackground = () => { @@ -279,6 +282,7 @@ export default function PhotoInformation({ info, url, api }) { downloadImage(info)} /> + Description
{variables.language.getMessage( diff --git a/src/components/widgets/background/scss/_photoinformation.scss b/src/components/widgets/background/scss/_photoinformation.scss index d2232ba4..71cfd22b 100644 --- a/src/components/widgets/background/scss/_photoinformation.scss +++ b/src/components/widgets/background/scss/_photoinformation.scss @@ -190,6 +190,16 @@ transition: 0.8s cubic-bezier(0.075, 0.82, 0.165, 1); width: 300px; padding: 10px; + .link { + text-decoration: none; + cursor: pointer; + @include themed() { + color: t($link); + } + &:hover { + opacity: 0.8; + } + } &:hover { padding: 20px; height: auto; diff --git a/src/components/widgets/reminder/Reminder.jsx b/src/components/widgets/reminder/Reminder.jsx index 52285d89..687abe1d 100644 --- a/src/components/widgets/reminder/Reminder.jsx +++ b/src/components/widgets/reminder/Reminder.jsx @@ -1,7 +1,7 @@ import React from 'react'; import './reminder.scss'; - +import Tooltip from '../../helpers/tooltip/Tooltip' import { MdClose, MdSnooze, MdWork } from 'react-icons/md'; export default class Reminder extends React.PureComponent { @@ -21,8 +21,8 @@ export default class Reminder extends React.PureComponent { Time
- - + +
); diff --git a/vite.config.js b/vite.config.js index 5221c633..08e20bcc 100644 --- a/vite.config.js +++ b/vite.config.js @@ -2,8 +2,20 @@ import { defineConfig } from 'vite'; import react from '@vitejs/plugin-react'; import path from 'path'; +const isProd = process.env.NODE_ENV === 'production'; + + export default defineConfig({ plugins: [react()], + server: { + hmr: { + protocol: 'ws', + host: 'localhost', + } + }, + build: { + minify: isProd, + }, resolve: { extensions: ['.js', '.jsx'], alias: {