mirror of
https://github.com/mue/mue.git
synced 2026-07-02 20:53:17 +02:00
feat: copy notes toast (wip) and light theme tooltips
This commit is contained in:
@@ -5,8 +5,8 @@
|
||||
|
||||
.tooltipTitle {
|
||||
width: 60px;
|
||||
background-color: #000000;
|
||||
color: #ffffff;
|
||||
background-color: #ffffff;
|
||||
color: #000000;
|
||||
text-align: center;
|
||||
font-size: 0.6rem;
|
||||
border-radius: 6px;
|
||||
@@ -24,5 +24,10 @@
|
||||
|
||||
.tooltip:hover .tooltipTitle {
|
||||
visibility: visible;
|
||||
opacity: 1;
|
||||
opacity: 0.8;
|
||||
}
|
||||
|
||||
.dark .tooltip {
|
||||
background-color: #000000;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
@@ -81,5 +81,9 @@
|
||||
.download {
|
||||
text-decoration: underline;
|
||||
cursor: pointer;
|
||||
|
||||
&:hover {
|
||||
opacity: 0.8;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,9 +3,10 @@ import React from 'react';
|
||||
import TextareaAutosize from '@material-ui/core/TextareaAutosize';
|
||||
import CopyIcon from '@material-ui/icons/FileCopyRounded';
|
||||
import NotesIcon from '@material-ui/icons/AssignmentRounded';
|
||||
|
||||
import Pin from './Pin';
|
||||
|
||||
import { toast } from 'react-toastify';
|
||||
|
||||
export default class Notes extends React.PureComponent {
|
||||
constructor() {
|
||||
super();
|
||||
@@ -32,6 +33,12 @@ export default class Notes extends React.PureComponent {
|
||||
}
|
||||
}
|
||||
|
||||
// todo: fix this
|
||||
copy() {
|
||||
navigator.clipboard.writeText(this.state.notes);
|
||||
toast(window.language.toasts.copy);
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
const noteContainer = document.getElementById('noteContainer');
|
||||
|
||||
@@ -53,7 +60,7 @@ export default class Notes extends React.PureComponent {
|
||||
</div>
|
||||
<TextareaAutosize rowsMax={50} placeholder={this.language.placeholder} value={this.state.notes} onChange={this.setNotes}/>
|
||||
<button onClick={this.pin} className='pinNote'><Pin/></button>
|
||||
<button onClick={() => navigator.clipboard.writeText(this.state.notes)} className='saveNote'><CopyIcon/></button>
|
||||
<button onClick={this.copy} className='copyNote'><CopyIcon/></button>
|
||||
</span>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -36,8 +36,9 @@
|
||||
|
||||
textarea {
|
||||
border: none;
|
||||
width: 200px;
|
||||
resize: none;
|
||||
background: none;
|
||||
width: 200px;
|
||||
height: 100px;
|
||||
margin: 10px;
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
cursor: initial;
|
||||
user-select: none;
|
||||
padding: 20px;
|
||||
background-color: rgba(0, 0, 0, 0.3);
|
||||
background-color: rgba(0, 0, 0, 0.5);
|
||||
border-radius: 20px;
|
||||
|
||||
span {
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
.saveNote {
|
||||
.copyNote {
|
||||
@extend %settingsButton;
|
||||
|
||||
background-color: map-get($button-colours, 'other');
|
||||
|
||||
@@ -360,7 +360,8 @@
|
||||
}
|
||||
},
|
||||
"toasts": {
|
||||
"quote": "Kopierte Zitate",
|
||||
"quote": "Kopierte zitate",
|
||||
"note": "Kopierte notizen",
|
||||
"reset": "Reset successfully",
|
||||
"installed": "Erfolgreich installiert",
|
||||
"uninstalled": "Erfolgreich entfernt",
|
||||
|
||||
@@ -361,6 +361,7 @@
|
||||
},
|
||||
"toasts": {
|
||||
"quote": "Quote copied",
|
||||
"note": "Notes copied",
|
||||
"reset": "Reset successfully",
|
||||
"installed": "Successfully installed",
|
||||
"uninstalled": "Successfully removed",
|
||||
|
||||
@@ -361,6 +361,7 @@
|
||||
},
|
||||
"toasts": {
|
||||
"quote": "Quote copied",
|
||||
"note": "Notes copied",
|
||||
"reset": "Reset successfully",
|
||||
"installed": "Successfully installed",
|
||||
"uninstalled": "Successfully removed",
|
||||
|
||||
@@ -361,6 +361,7 @@
|
||||
},
|
||||
"toasts": {
|
||||
"quote": "Cita copiada",
|
||||
"note": "Notes copied",
|
||||
"reset": "Restablecido correctamente",
|
||||
"installed": "Instalado correctamente",
|
||||
"uninstalled": "Retirado correctamente",
|
||||
|
||||
@@ -361,6 +361,7 @@
|
||||
},
|
||||
"toasts": {
|
||||
"quote": "Citation copiée",
|
||||
"note": "Remarques copiée",
|
||||
"reset": "Réinitialisé avec succès",
|
||||
"installed": "Installé avec succès",
|
||||
"uninstalled": "Enlevé avec succès",
|
||||
|
||||
@@ -361,6 +361,7 @@
|
||||
},
|
||||
"toasts": {
|
||||
"quote": "Het citaat is gekopieerd",
|
||||
"note": "Notes copied",
|
||||
"reset": "Het herstellen is voltooid",
|
||||
"installed": "De installatie is voltooid",
|
||||
"uninstalled": "Het verwijderen is voltooid",
|
||||
|
||||
@@ -361,6 +361,7 @@
|
||||
},
|
||||
"toasts": {
|
||||
"quote": "Sitat kopiert",
|
||||
"note": "Notes copied",
|
||||
"reset": "Tilbakestillte vellykket",
|
||||
"installed": "Installert",
|
||||
"uninstalled": "Fjernet",
|
||||
|
||||
@@ -361,6 +361,7 @@
|
||||
},
|
||||
"toasts": {
|
||||
"quote": "Цитата скопирована!",
|
||||
"note": "Notes copied",
|
||||
"reset": "Сброшено!",
|
||||
"installed": "Успешно установлено",
|
||||
"uninstalled": "Успешно удалено",
|
||||
|
||||
@@ -361,6 +361,7 @@
|
||||
},
|
||||
"toasts": {
|
||||
"quote": "名言已复制",
|
||||
"note": "Notes copied",
|
||||
"reset": "重置成功",
|
||||
"installed": "安装成功",
|
||||
"uninstalled": "卸载成功",
|
||||
|
||||
Reference in New Issue
Block a user