From 73a82f484517866d3bd7c1a286a691069e496912 Mon Sep 17 00:00:00 2001 From: alexsparkes Date: Wed, 13 Apr 2022 22:15:07 +0100 Subject: [PATCH] feat: Reminder settings UI --- .DS_Store | Bin 6148 -> 6148 bytes .../main/scss/settings/modules/_reminder.scss | 51 +++++++++++++++++ .../main/settings/sections/Reminder.jsx | 53 +++++++++++++++++- .../widgets/background/PhotoInformation.jsx | 4 ++ .../background/scss/_photoinformation.scss | 10 ++++ src/components/widgets/reminder/Reminder.jsx | 6 +- vite.config.js | 12 ++++ 7 files changed, 130 insertions(+), 6 deletions(-) diff --git a/.DS_Store b/.DS_Store index 1a3312fc3ee39bab9879dcecd51586b028b1627b..bc281f0e43b0aa54f78cdc0ba6f53c14354c7e88 100644 GIT binary patch delta 36 scmZoMXfc@J&&aniU^g=(-)0_`P{z&kS${B2zR9jPv7uozJI7ys0Nhy&jsO4v delta 134 zcmZoMXfc@J&nU1lU^g?Pz-AtnP)2Khh9rhWAWmh-VbEhpX2@sAV@PAjWJm|{vKWdz zbMljua`KZH7#IYAcs&s7{RaaEhRt!TzZn$;8Onj0lNbts#w0UjV;V9!fJKCfQERdv LyX9tfj=%f> 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: {