Fix tab order (#255)

* Export array from domain sections

* Export array from global sections

* Export array from setup sections
pull/261/head
Matt (IPv4) Cowley 2021-04-21 21:46:39 +01:00 committed by GitHub
parent e49ec084ac
commit 47371a1216
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 41 additions and 39 deletions

View File

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

View File

@ -1,5 +1,5 @@
/* /*
Copyright 2020 DigitalOcean Copyright 2021 DigitalOcean
This code is licensed under the MIT License. This code is licensed under the MIT License.
You may obtain a copy of the License at 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. THE SOFTWARE.
*/ */
export { default as Server } from './server'; import Server from './server';
export { default as HTTPS } from './https'; import HTTPS from './https';
export { default as PHP } from './php'; import PHP from './php';
export { default as Python } from './python'; import Python from './python';
export { default as ReverseProxy } from './reverse_proxy'; import ReverseProxy from './reverse_proxy';
export { default as Routing } from './routing'; import Routing from './routing';
export { default as Logging } from './logging'; import Logging from './logging';
export { default as Restrict } from './restrict'; import Restrict from './restrict';
export { default as Onion } from './onion'; import Onion from './onion';
export default [ Server, HTTPS, PHP, Python, ReverseProxy, Routing, Logging, Restrict, Onion ];

View File

@ -56,10 +56,9 @@ THE SOFTWARE.
<script> <script>
import analytics from '../util/analytics'; import analytics from '../util/analytics';
import isChanged from '../util/is_changed'; import isChanged from '../util/is_changed';
import * as Sections from './global_sections'; import Sections from './global_sections';
const tabs = Object.values(Sections); const delegated = Sections.reduce((prev, tab) => {
const delegated = tabs.reduce((prev, tab) => {
prev[tab.key] = tab.delegated; prev[tab.key] = tab.delegated;
return prev; return prev;
}, {}); }, {});
@ -72,8 +71,8 @@ THE SOFTWARE.
}, },
data() { data() {
return { return {
active: tabs[0].key, active: Sections[0].key,
tabs, tabs: Sections,
}; };
}, },
computed: { computed: {

View File

@ -24,12 +24,14 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE. THE SOFTWARE.
*/ */
export { default as HTTPS } from './https'; import HTTPS from './https';
export { default as Security } from './security'; import Security from './security';
export { default as Python } from './python'; import Python from './python';
export { default as ReverseProxy } from './reverse_proxy'; import ReverseProxy from './reverse_proxy';
export { default as Performance } from './performance'; import Performance from './performance';
export { default as Logging } from './logging'; import Logging from './logging';
export { default as NGINX } from './nginx'; import NGINX from './nginx';
export { default as Docker } from './docker'; import Docker from './docker';
export { default as Tools } from './tools'; import Tools from './tools';
export default [ HTTPS, Security, Python, ReverseProxy, Performance, Logging, NGINX, Docker, Tools ];

View File

@ -64,9 +64,7 @@ THE SOFTWARE.
import Tar from 'memory-tar-create'; import Tar from 'memory-tar-create';
import ClipboardJS from 'clipboard'; import ClipboardJS from 'clipboard';
import analytics from '../util/analytics'; import analytics from '../util/analytics';
import * as Sections from './setup_sections'; import Sections from './setup_sections';
const tabs = Object.values(Sections);
export default { export default {
name: 'Setup', name: 'Setup',
@ -75,8 +73,8 @@ THE SOFTWARE.
}, },
data() { data() {
return { return {
active: tabs[0].key, active: Sections[0].key,
tabs, tabs: Sections,
}; };
}, },
computed: { computed: {

View File

@ -1,5 +1,5 @@
/* /*
Copyright 2020 DigitalOcean Copyright 2021 DigitalOcean
This code is licensed under the MIT License. This code is licensed under the MIT License.
You may obtain a copy of the License at You may obtain a copy of the License at
@ -24,7 +24,9 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE. THE SOFTWARE.
*/ */
export { default as Download } from './download'; import Download from './download';
export { default as SSL } from './ssl'; import SSL from './ssl';
export { default as Certbot } from './certbot'; import Certbot from './certbot';
export { default as GoLive } from './go_live'; import GoLive from './go_live';
export default [ Download, SSL, Certbot, GoLive ];