mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 17:36:08 +08:00
core: move storage setting to ~/.hydro/env
This commit is contained in:
1 parent
12f2a4f2bb
commit
e6f933a531
4 files changed
+6
-5
No files matched your search
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "hydrooj",
|
||||
"version": "2.36.2",
|
||||
"version": "2.36.4",
|
||||
"bin": "bin/hydrooj.js",
|
||||
"main": "src/loader",
|
||||
"module": "src/loader",
|
||||
|
||||
@@ -99,7 +99,7 @@ class StorageService {
|
||||
endPointForUser,
|
||||
endPointForJudge,
|
||||
};
|
||||
if (process.env.MINIO_ACCESS_KEY && process.env.MINIO_SECRET_KEY) {
|
||||
if (process.env.MINIO_ACCESS_KEY) {
|
||||
logger.info('Using MinIO key from environment variables');
|
||||
this.opts.accessKey = process.env.MINIO_ACCESS_KEY;
|
||||
this.opts.secretKey = process.env.MINIO_SECRET_KEY;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@hydrooj/ui-default",
|
||||
"version": "4.21.6",
|
||||
"version": "4.21.7",
|
||||
"author": "undefined <i@undefined.moe>",
|
||||
"license": "AGPL-3.0",
|
||||
"main": "hydro.js",
|
||||
|
||||
@@ -8,14 +8,15 @@
|
||||
{% if not setting.flag|bitand(model.setting.FLAG_HIDDEN) %}
|
||||
{% set secret = setting.flag|bitand(model.setting.FLAG_SECRET) != 0 %}
|
||||
{% if setting.type == 'text' or setting.type == 'password' or setting.type == 'number' or setting.type == 'float' %}
|
||||
{% set isFileConfig = (setting.name === 'file.accessKey' or setting.name === 'file.secretKey') and process.env.MINIO_ACCESS_KEY %}
|
||||
{{ form.form_text({
|
||||
type:setting.type,
|
||||
label:setting.name,
|
||||
help_text:setting.desc,
|
||||
name:setting.key,
|
||||
value:'' if secret else (current[setting.key]|default(setting.value)),
|
||||
value:'' if (secret or isFileConfig) else (current[setting.key]|default(setting.value)),
|
||||
disabled:setting.disabled,
|
||||
placeholder:_('(Not changed)') if secret else ''
|
||||
placeholder:'Please edit in ~/.hydro/env instead' if isFileConfig else (_('(Not changed)') if secret else '')
|
||||
}) }}
|
||||
{% elif setting.type == 'select' %}
|
||||
{{ form.form_select({
|
||||
|
||||
Reference in new issue
Block a user