Description: Refactor.

This commit is contained in:
lain 2020-08-06 16:41:56 +02:00
parent bf95dfb240
commit 03da653a12
1 changed files with 37 additions and 58 deletions

View File

@ -12,6 +12,36 @@
compress: false compress: false
] ]
frontend_options = [
%{
key: "name",
type: :string,
description: "Name of the installed Admin frontend"
},
%{
key: "ref",
type: :string,
description: "reference of the installed Admin frontend to be used"
},
%{
key: "git",
type: :string,
description: "URL of the git repository of the frontend"
},
%{
key: "build_url",
type: :string,
description:
"Either an url to a zip file containing the frontend or a template to build it by inserting the `ref`. The string `${ref}` will be replaced by the configured `ref`.",
example: "https://some.url/builds/${ref}.zip"
},
%{
key: "build_dir",
type: :string,
description: "The directory inside the zip file "
}
]
config :pleroma, :config_description, [ config :pleroma, :config_description, [
%{ %{
group: :pleroma, group: :pleroma,
@ -3552,69 +3582,18 @@
key: :primary, key: :primary,
type: :map, type: :map,
description: "Primary frontend, the one that is served for all pages by default", description: "Primary frontend, the one that is served for all pages by default",
children: [ children: frontend_options
%{
key: "name",
type: :string,
description: "Name of the installed primary frontend"
},
%{
key: "ref",
type: :string,
description: "reference of the installed primary frontend to be used"
},
%{
key: "git",
type: :string,
description: "URL of the git repository of the frontend"
},
%{
key: "build_url",
type: :string,
description:
"Either an url to a zip file containing the frontend or a template to build it by inserting the `ref`. The string `${ref}` will be replaced by the configured `ref`.",
example: "https://some.url/builds/${ref}.zip"
},
%{
key: "build_dir",
type: :string,
description: "The directory inside the zip file "
}
]
}, },
%{ %{
key: :admin, key: :admin,
type: :map, type: :map,
description: "Admin frontend", description: "Admin frontend",
children: [ children: frontend_options
%{
key: "name",
type: :string,
description: "Name of the installed Admin frontend"
}, },
%{ %{
key: "ref", key: :available,
type: :string, type: :map,
description: "reference of the installed Admin frontend to be used" description: "A map containing frontends that we have some knowledge of"
},
%{
key: "git",
type: :string,
description: "URL of the git repository of the frontend"
},
%{
key: "build_url",
type: :string,
description:
"Either an url to a zip file containing the frontend or a template to build it by inserting the `ref`. The string `${ref}` will be replaced by the configured `ref`.",
example: "https://some.url/builds/${ref}.zip"
},
%{
key: "build_dir",
type: :string,
description: "The directory inside the zip file "
}
]
} }
] ]
} }