pinafore/src/routes/_pages/settings/instances/[instanceName].html
Nolan Lawson 4bd181d3cc
fix: update Sapper to latest (#775)
* fix: update to latest sapper

fixes #416

* fix error and debug pages

* requestIdleCallback makes column switching feel way nicer than double rAF

* add export feature

* add better csp info

* workaround for sapper sub-page issue

* clarify in readme about exporting

* fix now config

* switch from rIC to triple raf

* style-loader is no longer used

* update theming guide
2018-12-11 07:31:48 -08:00

49 lines
No EOL
1.7 KiB
HTML

<SettingsLayout page='settings/instances/{params.instanceName}' label={params.instanceName}>
<h1 class="instance-name-h1">{params.instanceName}</h1>
{#if verifyCredentials}
<h2>Logged in as:</h2>
<InstanceUserProfile {verifyCredentials} />
<h2>Push notifications:</h2>
<PushNotificationSettings {instanceName} />
<h2>Theme:</h2>
<ThemeSettings {instanceName} />
<InstanceActions {instanceName} />
{/if}
</SettingsLayout>
<style>
.instance-name-h1 {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
</style>
<script>
import { store } from '../../../_store/store'
import SettingsLayout from '../../../_components/settings/SettingsLayout.html'
import InstanceUserProfile from '../../../_components/settings/instance/InstanceUserProfile.html'
import PushNotificationSettings from '../../../_components/settings/instance/PushNotificationSettings.html'
import ThemeSettings from '../../../_components/settings/instance/ThemeSettings.html'
import InstanceActions from '../../../_components/settings/instance/InstanceActions.html'
import { updateVerifyCredentialsForInstance } from '../../../_actions/instances'
export default {
async oncreate () {
let { instanceName } = this.get()
await updateVerifyCredentialsForInstance(instanceName)
},
store: () => store,
computed: {
instanceName: ({ params }) => params.instanceName,
verifyCredentials: ({ $verifyCredentials, instanceName }) => $verifyCredentials && $verifyCredentials[instanceName]
},
components: {
SettingsLayout,
InstanceUserProfile,
PushNotificationSettings,
ThemeSettings,
InstanceActions
}
}
</script>