code review
This commit is contained in:
parent
aeecb70024
commit
51af8043c6
6 changed files with 14 additions and 7 deletions
|
@ -1,3 +1,9 @@
|
|||
tweakStores 1.2 - 2023.11.04
|
||||
===========================================================
|
||||
* Require Dotclear 2.28
|
||||
* Require PHP 8.1
|
||||
* Code review
|
||||
|
||||
tweakStores 1.1 - 2023.10.21
|
||||
===========================================================
|
||||
* Require Dotclear 2.28
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# README
|
||||
|
||||
[![Release](https://img.shields.io/badge/release-1.1-a2cbe9.svg)](https://git.dotclear.watch/JcDenis/tweakStores/releases)
|
||||
![Date](https://img.shields.io/badge/date-2023.10.21-c44d58.svg)
|
||||
[![Release](https://img.shields.io/badge/release-1.2-a2cbe9.svg)](https://git.dotclear.watch/JcDenis/tweakStores/releases)
|
||||
![Date](https://img.shields.io/badge/date-2023.11.04-c44d58.svg)
|
||||
[![Dotclear](https://img.shields.io/badge/dotclear-v2.28-137bbb.svg)](https://fr.dotclear.org/download)
|
||||
[![Dotaddict](https://img.shields.io/badge/dotaddict-official-9ac123.svg)](https://plugins.dotaddict.org/dc2/details/tweakStores)
|
||||
[![License](https://img.shields.io/badge/license-GPL--2.0-ececec.svg)](https://git.dotclear.watch/JcDenis/tweakStores/src/branch/master/LICENSE)
|
||||
|
|
|
@ -17,7 +17,7 @@ $this->registerModule(
|
|||
'Tweak stores',
|
||||
'Helper to manage external repositories',
|
||||
'Jean-Christian Denis and Contributors',
|
||||
'1.1',
|
||||
'1.2',
|
||||
[
|
||||
'requires' => [['core', '2.28']],
|
||||
'permissions' => 'My',
|
||||
|
|
|
@ -2,10 +2,10 @@
|
|||
<modules xmlns:da="http://dotaddict.org/da/">
|
||||
<module id="tweakStores">
|
||||
<name>Tweak stores</name>
|
||||
<version>1.1</version>
|
||||
<version>1.2</version>
|
||||
<author>Jean-Christian Denis and Contributors</author>
|
||||
<desc>Helper to manage external repositories</desc>
|
||||
<file>https://git.dotclear.watch/JcDenis/tweakStores/releases/download/v1.1/plugin-tweakStores.zip</file>
|
||||
<file>https://git.dotclear.watch/JcDenis/tweakStores/releases/download/v1.2/plugin-tweakStores.zip</file>
|
||||
<da:dcmin>2.28</da:dcmin>
|
||||
<da:details>https://git.dotclear.watch/JcDenis/tweakStores/src/branch/master/README.md</da:details>
|
||||
<da:support>https://git.dotclear.watch/JcDenis/tweakStores/issues</da:support>
|
||||
|
|
|
@ -300,7 +300,7 @@ class BackendBehaviors
|
|||
echo
|
||||
(new Para())->class('field')->items([
|
||||
(new Label(__('Your password:')))->for('tweakstore_pwd')->class('required'),
|
||||
(new Password(['your_pwd', 'tweakstore_pwd']))->size(20)->maxlenght(255)->required(true)->placeholder(__('Password'))->autocomplete('current-password'),
|
||||
(new Password(['your_pwd', 'tweakstore_pwd']))->size(20)->maxlength(255)->required(true)->placeholder(__('Password'))->autocomplete('current-password'),
|
||||
])->render() .
|
||||
'<p><input type="submit" name="tweakstore_write" id="tweakstore_write" value="' . __('Save to module directory') . '" /> ' .
|
||||
'<a class="hidden-if-no-js button" href="#' . My::id() . '" id="tweakstore_copy">' . __('Copy to clipboard') . '</a>' .
|
||||
|
@ -329,7 +329,7 @@ class BackendBehaviors
|
|||
// s_file_pattern
|
||||
(new Para())->items([
|
||||
(new Label(__('Predictable URL to zip file on the external repository')))->for('ts_file_pattern'),
|
||||
(new Input('ts_file_pattern'))->size(65)->maxlenght(255)->class('maximal')->value(self::settings()->file_pattern),
|
||||
(new Input('ts_file_pattern'))->size(65)->maxlength(255)->class('maximal')->value(self::settings()->file_pattern),
|
||||
]),
|
||||
(new Note())->text(__('You can use widcard like %author%, %type%, %id%, %version%.'))->class('form-note'),
|
||||
(new Note())->text(__('For example on github https://github.com/MyGitName/%id%/releases/download/v%version%/%type%-%id%.zip'))->class('form-note'),
|
||||
|
|
|
@ -19,6 +19,7 @@ class My extends MyPlugin
|
|||
public static function checkCustomContext(int $context): ?bool
|
||||
{
|
||||
return match ($context) {
|
||||
// Limit ot super admin
|
||||
self::MODULE => App::auth()->isSuperAdmin(),
|
||||
default => null,
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue