Export array from domain sections

This commit is contained in:
MattIPv4 2021-04-21 21:23:46 +01:00
parent e49ec084ac
commit f2e432cadd
2 changed files with 16 additions and 15 deletions
src/nginxconfig/templates
domain.vue
domain_sections

View File

@ -63,13 +63,12 @@ THE SOFTWARE.
import analytics from '../util/analytics';
import isChanged from '../util/is_changed';
import Presets from './domain_sections/presets';
import * as Sections from './domain_sections';
import Sections from './domain_sections';
const tabs = Object.values(Sections);
const delegated = {
hasUserInteraction: false,
presets: Presets.delegated,
...tabs.reduce((prev, tab) => {
...Sections.reduce((prev, tab) => {
prev[tab.key] = tab.delegated;
return prev;
}, {}),
@ -86,8 +85,8 @@ THE SOFTWARE.
},
data() {
return {
active: tabs[0].key,
tabs,
active: Sections[0].key,
tabs: Sections,
};
},
computed: {

View File

@ -1,5 +1,5 @@
/*
Copyright 2020 DigitalOcean
Copyright 2021 DigitalOcean
This code is licensed under the MIT License.
You may obtain a copy of the License at
@ -24,12 +24,14 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
export { default as Server } from './server';
export { default as HTTPS } from './https';
export { default as PHP } from './php';
export { default as Python } from './python';
export { default as ReverseProxy } from './reverse_proxy';
export { default as Routing } from './routing';
export { default as Logging } from './logging';
export { default as Restrict } from './restrict';
export { default as Onion } from './onion';
import Server from './server';
import HTTPS from './https';
import PHP from './php';
import Python from './python';
import ReverseProxy from './reverse_proxy';
import Routing from './routing';
import Logging from './logging';
import Restrict from './restrict';
import Onion from './onion';
export default [ Server, HTTPS, PHP, Python, ReverseProxy, Routing, Logging, Restrict, Onion ];