1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/armadietto_ynh.git synced 2024-09-03 18:06:18 +02:00

Merge pull request #9 from YunoHost-Apps/fix-config_panel

Fix config panel
This commit is contained in:
Benoît 2022-01-13 01:33:04 +01:00 committed by GitHub
commit 57d32e84b0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 76 additions and 62 deletions

View file

@ -29,13 +29,18 @@ Armadietto is maintained by the remoteStorage community, ([IRC](https://web.libe
**Shipped version:** 0.1.5 **Shipped version:** 0.1.5
### Installation option
User registration is not allowed out of the box.
This option can be enabled in the configuration panel.
### Application for remoteStorage ### Application for remoteStorage
[Click here](https://remotestorage.io/apps/) to see the list of applications that can be used with RemoteStorage. [Here](https://remotestorage.io/apps/) is a non-exhaustive list of apps that have integrated remoteStorage as a storage/sync option.
**Shipped version:** 0.0.2~ynh6 **Shipped version:** 0.0.5~ynh1

View file

@ -25,11 +25,16 @@ Armadietto est maintenu par la communauté remoteStorage, ([IRC](https://web.lib
**Version livrée:** 0.1.5 **Version livrée:** 0.1.5
### Option d'installation
L'inscription des utilisateurs n'est pas autorisée par défault.
Cette option peut être activée via le panneau de configutration.
### Application pour remoteStorage ### Application pour remoteStorage
[Cliquez ici](https://remotestorage.io/apps/) pour voir la liste des applications qui peuvent être utilisées avec RemoteStorage. [Cliquez ici](https://remotestorage.io/apps/) pour voir une liste non exhaustive d'applications ayant intégré remoteStorage comme option de stockage/synchronisation.
**Version incluse :** 0.0.2~ynh6 **Version incluse :** 0.0.5~ynh1

25
actions.toml Normal file
View file

@ -0,0 +1,25 @@
[is_signup]
name = "Signup activation"
description = "Allow visitors to register and create an account?"
command = "/bin/bash scripts/actions/is_signup"
accepted_return_codes = [0]
# [is_signup.arguments]
# [is_signup.arguments.is_signup]
# type = "boolean"
# ask.en = "Allow signup?"
# # default = false
[public_private]
name = "Private / Public"
description = "TODO"
command = "/bin/bash scripts/actions/public_private"
accepted_return_codes = [0]
[public_private.arguments]
[public_private.arguments.is_public]
type = "boolean"
ask.en = "Is it a public app?"
default = true

View file

@ -10,26 +10,22 @@
admin="armadietto" admin="armadietto"
language="fr" language="fr"
is_public=1 is_public=1
is_signup=true is_signup=0
port="8008" port="8008"
; Checks ; Checks
pkg_linter=1 pkg_linter=1
setup_sub_dir=0
setup_root=1 setup_root=1
setup_nourl=0
setup_private=1 setup_private=1
setup_public=1 setup_public=1
upgrade=1 upgrade=1
# 0.0.2~ynh5 # 0.0.2~ynh5
upgrade=1 from_commit=d185b84698a9f7e83eff6bf6dd5606f35282a536 upgrade=1 from_commit=d185b84698a9f7e83eff6bf6dd5606f35282a536
backup_restore=1 backup_restore=1
multi_instance=0
port_already_use=0
change_url=1 change_url=1
;;; Options ;;; Options
Email= Email=
Notification=none Notification=none
;;; Upgrade options ;;; Upgrade options
; commit=d185b84698a9f7e83eff6bf6dd5606f35282a536 ; commit=d185b84698a9f7e83eff6bf6dd5606f35282a536
name= Upgrade to version 0.0.2~ynh6 name= Upgrade from version 0.0.2~ynh6
manifest_arg=domain=DOMAIN&path=PATH&admin=USER&language=fr&is_public=1&is_signup=true&port=8008& manifest_arg=domain=DOMAIN&path=PATH&admin=USER&language=fr&is_public=1&is_signup=0&port=8008&

View file

@ -1,11 +0,0 @@
#=================================================
# ARMADIETTO CONFIGURATION
#=================================================
final_path: __FINALPATH__
datadir: __DATADIR__
port: __PORT__
domain: __DOMAIN__
is_signup: __IS_SIGNUP__

View file

@ -6,8 +6,8 @@ After=network.target
Type=simple Type=simple
User=__APP__ User=__APP__
Group=__APP__ Group=__APP__
WorkingDirectory=__FINALPATH__/ WorkingDirectory=__FINAL_PATH__/
ExecStart=__YNH_NODE__ __FINALPATH__/server ExecStart=__YNH_NODE__ __FINAL_PATH__/server
Restart=always Restart=always
Environment=__YNH_NODE_LOAD_PATH__ Environment=__YNH_NODE_LOAD_PATH__
Environment=NODE_ENV=production Environment=NODE_ENV=production

View file

@ -1,16 +1,15 @@
version = "1.0" version = "1.0"
name= "Armadietto configuration panel"
[main] [main]
name = "Armadietto signup configuration" name = "Settings"
[main.is_signup] [main.global_config]
name = "Signup configuration" name = "Access options"
[main.is_signup.signup] services = ["nginx", "__APP__"]
ask.en = "Allow signups?"
ask.fr = "Accepter les inscriptions ?" [main.global_config.is_signup]
ask = "Allow signups?"
type = "boolean" type = "boolean"
default = true help = "Would you like to allow visitors to register and create an account?"
help.en = "Would you like to allow visitors to register and create an account?" bind = "signup:__FINALPATH__/server.js"
help.fr = "Souhaitez-vous autoriser les visiteurs à s'inscrire et créer un compte ?"

View file

@ -12,7 +12,12 @@ Armadietto is maintained by the remoteStorage community, ([IRC](https://web.libe
**Shipped version:** 0.1.5 **Shipped version:** 0.1.5
### Installation option
User registration is not allowed out of the box.
This option can be enabled in the configuration panel.
### Application for remoteStorage ### Application for remoteStorage
[Click here](https://remotestorage.io/apps/) to see the list of applications that can be used with RemoteStorage. [Here](https://remotestorage.io/apps/) is a non-exhaustive list of apps that have integrated remoteStorage as a storage/sync option.

View file

@ -12,6 +12,11 @@ Armadietto est maintenu par la communauté remoteStorage, ([IRC](https://web.lib
**Version livrée:** 0.1.5 **Version livrée:** 0.1.5
### Option d'installation
L'inscription des utilisateurs n'est pas autorisée par défault.
Cette option peut être activée via le panneau de configutration.
### Application pour remoteStorage ### Application pour remoteStorage
[Cliquez ici](https://remotestorage.io/apps/) pour voir la liste des applications qui peuvent être utilisées avec RemoteStorage. [Cliquez ici](https://remotestorage.io/apps/) pour voir une liste non exhaustive d'applications ayant intégré remoteStorage comme option de stockage/synchronisation.

View file

@ -6,7 +6,7 @@
"en": "A remoteStorage server running as a nodejs web service with systemd", "en": "A remoteStorage server running as a nodejs web service with systemd",
"fr": "Un serveur remoteStorage excécuté en tant que service web nodejs par systemd" "fr": "Un serveur remoteStorage excécuté en tant que service web nodejs par systemd"
}, },
"version": "0.0.2~ynh6", "version": "0.0.5~ynh1",
"url": "https://github.com/remotestorage/armadietto", "url": "https://github.com/remotestorage/armadietto",
"upstream": { "upstream": {
"license": "MIT", "license": "MIT",
@ -40,19 +40,6 @@
"en": "Would you like to restrein the access to this web site?", "en": "Would you like to restrein the access to this web site?",
"fr": "Souhaitez-vous limiter l'accès à ce site web ?" "fr": "Souhaitez-vous limiter l'accès à ce site web ?"
} }
},
{
"name": "is_signup",
"type": "boolean",
"ask": {
"en": "Allow signups?",
"fr": "Accepter les inscriptions ?"
},
"help": {
"en": "Would you like to allow visitors to register and create an account?",
"fr": "Souhaitez-vous autoriser les visiteurs à s'inscrire et créer un compte ?"
},
"default": true
} }
] ]
} }

View file

@ -27,7 +27,7 @@ ynh_abort_if_errors
domain=$YNH_APP_ARG_DOMAIN domain=$YNH_APP_ARG_DOMAIN
path_url="/" path_url="/"
is_public=$YNH_APP_ARG_IS_PUBLIC is_public=$YNH_APP_ARG_IS_PUBLIC
is_signup=$YNH_APP_ARG_IS_SIGNUP is_signup="0"
app=$YNH_APP_INSTANCE_NAME app=$YNH_APP_INSTANCE_NAME
@ -106,10 +106,10 @@ ynh_system_user_create --username=$app
#================================================= #=================================================
ynh_script_progression --message="Adding a configuration file..." --weight=1 ynh_script_progression --message="Adding a configuration file..." --weight=1
ynh_add_config --template="../conf/config.sample.yml" --destination="$final_path/config.yml" # ynh_add_config --template="../conf/config.yml" --destination="$final_path/config.yml"
chmod 400 "$final_path/config.yml" # chmod 400 "$final_path/config.yml"
chown $app:$app "$final_path/config.yml" # chown $app:$app "$final_path/config.yml"
#================================================= #=================================================
# SETUP SYSTEMD # SETUP SYSTEMD

View file

@ -93,8 +93,6 @@ ynh_system_user_create --username=$app
ynh_script_progression --message="Setting up and create final app path..." --weight=1 ynh_script_progression --message="Setting up and create final app path..." --weight=1
ynh_app_setting_set $app final_path $final_path ynh_app_setting_set $app final_path $final_path
# Download, check integrity, uncompress and patch the source from app.src
# ynh_setup_source --dest_dir="$final_path"
# Create final_path # Create final_path
mkdir -p "$final_path" mkdir -p "$final_path"
@ -114,10 +112,10 @@ ynh_use_nodejs
#================================================= #=================================================
ynh_script_progression --message="Adding a configuration file..." --weight=2 ynh_script_progression --message="Adding a configuration file..." --weight=2
ynh_add_config --template="../conf/config.sample.yml" --destination="$final_path/config.yml" # ynh_add_config --template="../conf/config.yml" --destination="$final_path/config.yml"
chmod 400 "$final_path/config.yml" # chmod 400 "$final_path/config.yml"
chown $app:$app "$final_path/config.yml" # chown $app:$app "$final_path/config.yml"
#================================================= #=================================================
# CREATE DATA DIRECTORY # CREATE DATA DIRECTORY
@ -162,10 +160,10 @@ fi
#================================================= #=================================================
ynh_script_progression --message="Updating a configuration file..." --weight=2 ynh_script_progression --message="Updating a configuration file..." --weight=2
ynh_add_config --template="../conf/config.sample.yml" --destination="$final_path/config.yml" # ynh_add_config --template="../conf/config.yml" --destination="$final_path/config.yml"
chmod 400 "$final_path/config.yml" # chmod 400 "$final_path/config.yml"
chown $app:$app "$final_path/config.yml" # chown $app:$app "$final_path/config.yml"
### Same as during install ### Same as during install
### ###