Skip to content

Commit

Permalink
feat: create streamer mode box with separate alert-based component
Browse files Browse the repository at this point in the history
Signed-off-by: Alexander Trost <[email protected]>
  • Loading branch information
galexrt committed Oct 11, 2024
1 parent 45adafd commit 98275b2
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 16 deletions.
6 changes: 2 additions & 4 deletions app/components/auth/account/AccountInfo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import ChangeUsernameModal from '~/components/auth/account/ChangeUsernameModal.v
import DebugInfo from '~/components/auth/account/DebugInfo.vue';
import OAuth2Connections from '~/components/auth/account/OAuth2Connections.vue';
import CopyToClipboardButton from '~/components/partials/CopyToClipboardButton.vue';
import StreamerModeAlert from '~/components/partials/StreamerModeAlert.vue';
import DataErrorBlock from '~/components/partials/data/DataErrorBlock.vue';
import DataNoDataBlock from '~/components/partials/data/DataNoDataBlock.vue';
import DataPendingBlock from '~/components/partials/data/DataPendingBlock.vue';
Expand Down Expand Up @@ -75,10 +76,7 @@ const selectedTab = computed({
<div>
<template v-if="streamerMode">
<UDashboardPanelContent class="pb-24">
<UDashboardSection
:title="$t('system.streamer_mode.title')"
:description="$t('system.streamer_mode.description')"
/>
<StreamerModeAlert />
</UDashboardPanelContent>
</template>
<template v-else>
Expand Down
12 changes: 12 additions & 0 deletions app/components/partials/StreamerModeAlert.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<template>
<UAlert
:title="$t('system.streamer_mode.title')"
:description="$t('system.streamer_mode.description')"
icon="i-mdi-broadcast"
color="amber"
variant="subtle"
:actions="[
{ label: $t('common.settings'), to: '/settings', variant: 'outline', color: 'black', icon: 'i-mdi-cog-outline' },
]"
/>
</template>
5 changes: 1 addition & 4 deletions app/components/rector/AppConfig.vue
Original file line number Diff line number Diff line change
Expand Up @@ -273,10 +273,7 @@ const onSubmitThrottle = useThrottleFn(async (event: FormSubmitEvent<Schema>) =>
</UDashboardNavbar>

<UDashboardPanelContent class="pb-24">
<UDashboardSection
:title="$t('system.streamer_mode.title')"
:description="$t('system.streamer_mode.description')"
/>
<StreamerModeAlert />
</UDashboardPanelContent>
</template>
<template v-else>
Expand Down
5 changes: 1 addition & 4 deletions app/components/rector/JobProps.vue
Original file line number Diff line number Diff line change
Expand Up @@ -250,10 +250,7 @@ const onSubmitThrottle = useThrottleFn(async (event: FormSubmitEvent<Schema>) =>
</UDashboardNavbar>

<UDashboardPanelContent class="pb-24">
<UDashboardSection
:title="$t('system.streamer_mode.title')"
:description="$t('system.streamer_mode.description')"
/>
<StreamerModeAlert />
</UDashboardPanelContent>
</template>
<template v-else>
Expand Down
5 changes: 1 addition & 4 deletions app/components/rector/filestore/FileList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,7 @@ const previewTypes = ['jpg', 'jpeg', 'png', 'webp'];
</UDashboardNavbar>

<UDashboardPanelContent class="pb-24">
<UDashboardSection
:title="$t('system.streamer_mode.title')"
:description="$t('system.streamer_mode.description')"
/>
<StreamerModeAlert />
</UDashboardPanelContent>
</template>
<template v-else>
Expand Down

0 comments on commit 98275b2

Please sign in to comment.