From bf0eb99fe46bb01d706b014c7d69cd95e30a9da1 Mon Sep 17 00:00:00 2001 From: Nolan Lawson Date: Sun, 28 Oct 2018 15:28:22 -0700 Subject: [PATCH] refactor instance settings (#581) --- .../settings/instance/InstanceActions.html | 49 ++++ .../instance/InstanceUserProfile.html | 51 ++++ .../instance/PushNotificationSettings.html | 93 ++++++ .../settings/instance/ThemeSettings.html | 106 +++++++ .../settings/instances/[instanceName].html | 267 +----------------- 5 files changed, 313 insertions(+), 253 deletions(-) create mode 100644 routes/_components/settings/instance/InstanceActions.html create mode 100644 routes/_components/settings/instance/InstanceUserProfile.html create mode 100644 routes/_components/settings/instance/PushNotificationSettings.html create mode 100644 routes/_components/settings/instance/ThemeSettings.html diff --git a/routes/_components/settings/instance/InstanceActions.html b/routes/_components/settings/instance/InstanceActions.html new file mode 100644 index 0000000..18aa8fb --- /dev/null +++ b/routes/_components/settings/instance/InstanceActions.html @@ -0,0 +1,49 @@ +
+ {#if $loggedInInstancesInOrder.length > 1 && $currentInstance !== instanceName} + + {/if} + +
+ + \ No newline at end of file diff --git a/routes/_components/settings/instance/InstanceUserProfile.html b/routes/_components/settings/instance/InstanceUserProfile.html new file mode 100644 index 0000000..5756d75 --- /dev/null +++ b/routes/_components/settings/instance/InstanceUserProfile.html @@ -0,0 +1,51 @@ +
+
+ +
+ + {'@' + verifyCredentials.acct} + + + + +
+ + \ No newline at end of file diff --git a/routes/_components/settings/instance/PushNotificationSettings.html b/routes/_components/settings/instance/PushNotificationSettings.html new file mode 100644 index 0000000..a157d59 --- /dev/null +++ b/routes/_components/settings/instance/PushNotificationSettings.html @@ -0,0 +1,93 @@ +
+ {#if pushNotificationsSupport === false} +

Your browser doesn't support push notifications.

+ {:elseif $notificationPermission === "denied"} +

You have denied permission to show notifications.

+ {/if} +
+ + +
+ + +
+ + +
+ + +
+
+ + \ No newline at end of file diff --git a/routes/_components/settings/instance/ThemeSettings.html b/routes/_components/settings/instance/ThemeSettings.html new file mode 100644 index 0000000..9feff6a --- /dev/null +++ b/routes/_components/settings/instance/ThemeSettings.html @@ -0,0 +1,106 @@ +
+
+ {#each themeGroups as themeGroup} +
+ {#each themeGroup.themes as theme} +
+ +
+
+ +
+ {/each} +
+ {/each} +
+
+ + \ No newline at end of file diff --git a/routes/_pages/settings/instances/[instanceName].html b/routes/_pages/settings/instances/[instanceName].html index e0d98c4..7179059 100644 --- a/routes/_pages/settings/instances/[instanceName].html +++ b/routes/_pages/settings/instances/[instanceName].html @@ -3,286 +3,47 @@ {#if verifyCredentials}

Logged in as:

-
-
- -
- - {'@' + verifyCredentials.acct} - - - - -
+

Push notifications:

-
- {#if pushNotificationsSupport === false} -

Your browser doesn't support push notifications.

- {:elseif $notificationPermission === "denied"} -

You have denied permission to show notifications.

- {/if} -
- - -
- - -
- - -
- - -
-
+

Theme:

-
-
- {#each themeGroups as themeGroup} -
- {#each themeGroup.themes as theme} -
- -
-
- -
- {/each} -
- {/each} -
-
+ -
- {#if $loggedInInstancesInOrder.length > 1 && $currentInstance !== params.instanceName} - - {/if} - -
+ {/if} \ No newline at end of file