Merge branch 'master' of github.com:laurent22/joplin

pull/1964/head
Laurent Cozic 2019-10-07 23:15:14 +02:00
commit 154d303463
6 changed files with 136 additions and 65 deletions

View File

@ -1,22 +0,0 @@
---
name: Feature request
about: Report an accepted feature request.
title: ''
labels: 'enhancement'
---
⚠🚨⛔⛔⛔⛔⛔ ⬇ STOP & READ THIS ⬇ ⛔⛔⛔⛔⛔🚨⚠
A feature request that has not been accepted on the forum will be closed!
⚠🚨⛔⛔⛔⛔⛔ ⬆ STOP & READ THIS ⬆ ⛔⛔⛔⛔⛔🚨⚠
<!--
Please search open issues first - many features have already been requested!
-->
## Has it been discussed in the forum? Link to topic.
<!--
Feature requests must be discussed and accepted in the forum first. https://discourse.joplinapp.org
Please provide a link to the topic.
Feature requests without a link to the discussion/topic on the forum will be closed.
-->

View File

@ -1538,7 +1538,7 @@ msgid "Enable Fountain syntax support"
msgstr "Attiva supporto sintassi Fountain" msgstr "Attiva supporto sintassi Fountain"
msgid "Show tray icon" msgid "Show tray icon"
msgstr "Visualizza tray icon" msgstr "Visualizza nella barra delle applicazioni"
msgid "Note: Does not work in all desktop environments." msgid "Note: Does not work in all desktop environments."
msgstr "Nota: non funziona in tutti gli ambienti desktop." msgstr "Nota: non funziona in tutti gli ambienti desktop."
@ -1548,12 +1548,12 @@ msgid ""
"this setting so that your notes are constantly being synchronised, thus " "this setting so that your notes are constantly being synchronised, thus "
"reducing the number of conflicts." "reducing the number of conflicts."
msgstr "" msgstr ""
"Questo consentirà Joplin di essere in esecuzione in background. E " "Questo consentirà a Joplin di essere in esecuzione in background. E "
"raccomandata lattivazione di questa impostazione per sincronizzare " "raccomandata lattivazione di questa impostazione per sincronizzare "
"costantemente le tue note e quindi ridurre il numero di conflitti." "costantemente le tue note e quindi ridurre il numero di conflitti."
msgid "Start application minimised in the tray icon" msgid "Start application minimised in the tray icon"
msgstr "Avvia applicazione minimizzata nellicona del vassoio" msgstr "Avvia applicazione minimizzata nella barra delle applicazioni"
msgid "Global zoom percentage" msgid "Global zoom percentage"
msgstr "Percentuale di zoom globale" msgstr "Percentuale di zoom globale"

View File

@ -245,7 +245,16 @@ class MainScreenComponent extends React.Component {
} else if (command.name === 'toggleSidebar') { } else if (command.name === 'toggleSidebar') {
this.toggleSidebar(); this.toggleSidebar();
} else if (command.name === 'showModalMessage') { } else if (command.name === 'showModalMessage') {
this.setState({ modalLayer: { visible: true, message: command.message } }); this.setState({
modalLayer: {
visible: true,
message:
<div className="modal-message">
<div id="loading-animation" />
<div className="text">{command.message}</div>
</div>,
},
});
} else if (command.name === 'hideModalMessage') { } else if (command.name === 'hideModalMessage') {
this.setState({ modalLayer: { visible: false, message: '' } }); this.setState({ modalLayer: { visible: false, message: '' } });
} else if (command.name === 'editAlarm') { } else if (command.name === 'editAlarm') {

View File

@ -149,3 +149,30 @@ a {
outline: 0 none; outline: 0 none;
} }
.modal-message {
display: flex;
justify-content: center;
align-items: center;
color: grey;
font-size: 1.2em;
margin: 40px 20px;
}
.modal-message #loading-animation {
margin-right: 20px;
width: 20px;
height: 20px;
border: 5px solid lightgrey;
border-top: 4px solid white;
border-radius: 50%;
transition-property: transform;
animation-name: rotate;
animation-duration: 1.2s;
animation-iteration-count: infinite;
animation-timing-function: linear;
}
@keyframes rotate {
from {transform: rotate(0deg);}
to {transform: rotate(360deg);}
}

View File

@ -1,14 +1,5 @@
#!/bin/bash #!/bin/bash
set -e set -e
# Title
echo " _ _ _ "
echo " | | ___ _ __ | (_)_ __ "
echo " _ | |/ _ \| '_ \| | | '_ \ "
echo "| |_| | (_) | |_) | | | | | |"
echo " \___/ \___/| .__/|_|_|_| |_|"
echo " |_|"
echo ""
echo "Linux Installer and Updater"
#----------------------------------------------------- #-----------------------------------------------------
# Variables # Variables
@ -16,8 +7,20 @@ echo "Linux Installer and Updater"
COLOR_RED=`tput setaf 1` COLOR_RED=`tput setaf 1`
COLOR_GREEN=`tput setaf 2` COLOR_GREEN=`tput setaf 2`
COLOR_RESET=`tput sgr0` COLOR_RESET=`tput sgr0`
SILENT=false
# Check and warn if running as root. print() {
if [[ "$SILENT" == false ]] ; then
echo $1
fi
}
#-----------------------------------------------------
# ARGUMENTS
#-----------------------------------------------------
# --allow-root
## Check and warn if running as root.
if [[ $EUID = 0 ]] ; then if [[ $EUID = 0 ]] ; then
if [[ $* != *--allow-root* ]] ; then if [[ $* != *--allow-root* ]] ; then
echo "${COLOR_RED}It is not recommended (nor necessary) to run this script as root. To do so anyway, please use '--allow-root'${COLOR_RESET}" echo "${COLOR_RED}It is not recommended (nor necessary) to run this script as root. To do so anyway, please use '--allow-root'${COLOR_RESET}"
@ -25,53 +28,73 @@ if [[ $EUID = 0 ]] ; then
fi fi
fi fi
# --silent
## Mutes messages by console
if [[ $* == *--silent* ]] ; then
SILENT=true
fi
#-----------------------------------------------------
# START
#-----------------------------------------------------
# Title
print " _ _ _ "
print " | | ___ _ __ | (_)_ __ "
print " _ | |/ _ \| '_ \| | | '_ \ "
print "| |_| | (_) | |_) | | | | | |"
print " \___/ \___/| .__/|_|_|_| |_|"
print " |_|"
print ""
print "Linux Installer and Updater"
#----------------------------------------------------- #-----------------------------------------------------
# Download Joplin # Download Joplin
#----------------------------------------------------- #-----------------------------------------------------
# Get the latest version to download # Get the latest version to download
version=$(wget -qO - "https://api.github.com/repos/laurent22/joplin/releases/latest" | grep -Po '"tag_name": "v\K.*?(?=")') RELEASE_VERSION=$(wget -qO - "https://api.github.com/repos/laurent22/joplin/releases/latest" | grep -Po '"tag_name": "v\K.*?(?=")')
# Check if it's in the latest version # Check if it's in the latest version
if [[ ! -e ~/.joplin/VERSION ]] || [[ $(< ~/.joplin/VERSION) != "$version" ]]; then if [[ ! -e ~/.joplin/VERSION ]] || [[ $(< ~/.joplin/VERSION) != "$RELEASE_VERSION" ]]; then
echo 'Downloading Joplin...' print 'Downloading Joplin...'
# Delete previous version (in future versions joplin.desktop shouldn't exist) # Delete previous version (in future versions joplin.desktop shouldn't exist)
rm -f ~/.joplin/*.AppImage ~/.local/share/applications/joplin.desktop ~/.joplin/VERSION rm -f ~/.joplin/*.AppImage ~/.local/share/applications/joplin.desktop ~/.joplin/VERSION
# Creates the folder where the binary will be stored # Creates the folder where the binary will be stored
mkdir -p ~/.joplin/ mkdir -p ~/.joplin/
# Download the latest version # Download the latest version
wget -nv --show-progress -O ~/.joplin/Joplin.AppImage https://github.com/laurent22/joplin/releases/download/v$version/Joplin-$version-x86_64.AppImage wget -nv --show-progress -O ~/.joplin/Joplin.AppImage https://github.com/laurent22/joplin/releases/download/v$RELEASE_VERSION/Joplin-$RELEASE_VERSION-x86_64.AppImage
# Gives execution privileges # Gives execution privileges
chmod +x ~/.joplin/Joplin.AppImage chmod +x ~/.joplin/Joplin.AppImage
echo "${COLOR_GREEN}OK${COLOR_RESET}" print "${COLOR_GREEN}OK${COLOR_RESET}"
#----------------------------------------------------- #-----------------------------------------------------
# Icon # Icon
#----------------------------------------------------- #-----------------------------------------------------
# Download icon # Download icon
echo 'Downloading icon...' print 'Downloading icon...'
mkdir -p ~/.local/share/icons/hicolor/512x512/apps mkdir -p ~/.local/share/icons/hicolor/512x512/apps
wget -nv -O ~/.local/share/icons/hicolor/512x512/apps/joplin.png https://joplinapp.org/images/Icon512.png wget -nv -O ~/.local/share/icons/hicolor/512x512/apps/joplin.png https://joplinapp.org/images/Icon512.png
echo "${COLOR_GREEN}OK${COLOR_RESET}" print "${COLOR_GREEN}OK${COLOR_RESET}"
# Detect desktop environment # Detect desktop environment
if [ "$XDG_CURRENT_DESKTOP" = "" ] if [ "$XDG_CURRENT_DESKTOP" = "" ]
then then
desktop=$(echo "$XDG_DATA_DIRS" | sed 's/.*\(xfce\|kde\|gnome\).*/\1/') DESKTOP=$(echo "$XDG_DATA_DIRS" | sed 's/.*\(xfce\|kde\|gnome\).*/\1/')
else else
desktop=$XDG_CURRENT_DESKTOP DESKTOP=$XDG_CURRENT_DESKTOP
fi fi
desktop=${desktop,,} # convert to lower case DESKTOP=${DESKTOP,,} # convert to lower case
# Create icon for Gnome # Create icon for Gnome
echo 'Create Desktop icon.' echo 'Create Desktop icon.'
if [[ $desktop =~ .*gnome.*|.*kde.*|.*xfce.*|.*mate.*|.*lxqt.*|.*unity.*|.*x-cinnamon.*|.*deepin.* ]] if [[ $DESKTOP =~ .*gnome.*|.*kde.*|.*xfce.*|.*mate.*|.*lxqt.*|.*unity.*|.*x-cinnamon.*|.*deepin.* ]]
then then
: "${TMPDIR:=/tmp}" : "${TMPDIR:=/tmp}"
# This command extracts to squashfs-root by default and can't be changed... # This command extracts to squashfs-root by default and can't be changed...
@ -85,21 +108,22 @@ if [[ ! -e ~/.joplin/VERSION ]] || [[ $(< ~/.joplin/VERSION) != "$version" ]]; t
# On some systems this directory doesn't exist by default # On some systems this directory doesn't exist by default
mkdir -p ~/.local/share/applications mkdir -p ~/.local/share/applications
echo -e "[Desktop Entry]\nEncoding=UTF-8\nName=Joplin\nComment=Joplin for Desktop\nExec=/home/$USER/.joplin/Joplin.AppImage\nIcon=joplin\nStartupWMClass=Joplin\nType=Application\nCategories=Application;\n$APPIMAGE_VERSION" >> ~/.local/share/applications/appimagekit-joplin.desktop echo -e "[Desktop Entry]\nEncoding=UTF-8\nName=Joplin\nComment=Joplin for Desktop\nExec=/home/$USER/.joplin/Joplin.AppImage\nIcon=joplin\nStartupWMClass=Joplin\nType=Application\nCategories=Application;\n$APPIMAGE_VERSION" >> ~/.local/share/applications/appimagekit-joplin.desktop
echo "${COLOR_GREEN}OK${COLOR_RESET}" print "${COLOR_GREEN}OK${COLOR_RESET}"
else else
echo "${COLOR_RED}NOT DONE${COLOR_RESET}" print "${COLOR_RED}NOT DONE${COLOR_RESET}"
fi fi
#----------------------------------------------------- #-----------------------------------------------------
# Finish # Finish
#----------------------------------------------------- #-----------------------------------------------------
# Informs the user that it has been installed and cleans variables # Informs the user that it has been installed and cleans variables
echo "${COLOR_GREEN}Joplin version${COLOR_RESET}" $version "${COLOR_GREEN}installed.${COLOR_RESET}" print "${COLOR_GREEN}Joplin version${COLOR_RESET}" $RELEASE_VERSION "${COLOR_GREEN}installed.${COLOR_RESET}"
# Add version # Add version
echo $version > ~/.joplin/VERSION echo $RELEASE_VERSION > ~/.joplin/VERSION
else else
echo "${COLOR_GREEN}You already have the latest version${COLOR_RESET}" $version "${COLOR_GREEN}installed.${COLOR_RESET}" print "${COLOR_GREEN}You already have the latest version${COLOR_RESET}" $version "${COLOR_GREEN}installed.${COLOR_RESET}"
fi fi
echo 'Bye!'
unset version # Goodbye
print 'Bye!'

View File

@ -24,6 +24,39 @@ This is a quick summary of the Markdown syntax.
| **Link** | <pre>This is detected as a link:<br><br>`https://joplinapp.org`<br><br>And this is a link with a title:<br><br>`[Joplin](https://joplinapp.org)`</pre> | This is detected as a link:<br><br>https://joplinapp.org<br><br>And this is a link with a title:<br><br>[Joplin](https://joplinapp.org) | **Link** | <pre>This is detected as a link:<br><br>`https://joplinapp.org`<br><br>And this is a link with a title:<br><br>`[Joplin](https://joplinapp.org)`</pre> | This is detected as a link:<br><br>https://joplinapp.org<br><br>And this is a link with a title:<br><br>[Joplin](https://joplinapp.org)
| **Images** | <pre>`![Joplin icon](https://git.io/JenGk)`</pre> | ![Here's Joplin icon](https://git.io/JenGk) | **Images** | <pre>`![Joplin icon](https://git.io/JenGk)`</pre> | ![Here's Joplin icon](https://git.io/JenGk)
| **Horizontal Rule** | <pre>One rule:<br>\*\*\*<br>Another rule:<br>\-\-\-</pre> | One rule:<hr><br>Another rule:<br><hr> | **Horizontal Rule** | <pre>One rule:<br>\*\*\*<br>Another rule:<br>\-\-\-</pre> | One rule:<hr><br>Another rule:<br><hr>
| **Tables** | [See below](#tables) |
### Tables
Tables are created using pipes `|` and and hyphens `-`. This is a Markdown table:
| First Header | Second Header |
| ------------- | ------------- |
| Content Cell | Content Cell |
| Content Cell | Content Cell |
Which is rendered as:
| First Header | Second Header |
| ------------- | ------------- |
| Content Cell | Content Cell |
| Content Cell | Content Cell |
Note that there must be at least 3 dashes separating each header cell.
Colons can be used to align columns:
| Tables | Are | Cool |
| ------------- |:-------------:| -----:|
| col 3 is | right-aligned | $1600 |
| col 2 is | centered | $12 |
Which is rendered as:
| Tables | Are | Cool |
| ------------- |:-------------:| -----:|
| col 3 is | right-aligned | $1600 |
| col 2 is | centered | $12 |
## Joplin Extras ## Joplin Extras
@ -90,4 +123,4 @@ Joplin supports a number of plugins that can be toggled on top the standard Mark
| [Emoji](https://github.com/markdown-it/markdown-it-emoji) | `:smile:` :smile: | See [this list](https://gist.github.com/rxaviers/7360908) for more emoji | no | | [Emoji](https://github.com/markdown-it/markdown-it-emoji) | `:smile:` :smile: | See [this list](https://gist.github.com/rxaviers/7360908) for more emoji | no |
| [Insert](https://github.com/markdown-it/markdown-it-ins) | `++inserted++` | Transforms into `<ins>inserted</ins>` (<ins>inserted</ins>) | no | | [Insert](https://github.com/markdown-it/markdown-it-ins) | `++inserted++` | Transforms into `<ins>inserted</ins>` (<ins>inserted</ins>) | no |
| [Multitable](https://github.com/RedBug312/markdown-it-multimd-table) | See [MultiMarkdown](https://fletcher.github.io/MultiMarkdown-6/syntax/tables.html) page | Adds more power and customization to markdown tables | no | | [Multitable](https://github.com/RedBug312/markdown-it-multimd-table) | See [MultiMarkdown](https://fletcher.github.io/MultiMarkdown-6/syntax/tables.html) page | Adds more power and customization to markdown tables | no |
| [Fountain](https://fountain.io) | <code>\`\`\`fountain</code><br/>Your screenplay...<br/><code>\`\`\`</code> | Adds support for the Fountain markup language, a plain text markup language for screenwriting | no | | [Fountain](https://fountain.io) | <code>\`\`\`fountain</code><br/>Your screenplay...<br/><code>\`\`\`</code> | Adds support for the Fountain markup language, a plain text markup language for screenwriting | no |