Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions assets/scripts/components/screens/Settings.svelte
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
<script lang="ts">
import Skeleton from '../Skeleton.svelte'
import { createEventDispatcher } from 'svelte'

const dispatch = createEventDispatcher()

interface Props {
buildStatus: any
Expand All @@ -11,6 +8,8 @@
blogEnabled: any
showArticles: boolean | undefined
currentRepository: any
onUpdateTheme: (theme: {css: string}) => void
onToggleBlog: (activated: boolean) => Promise<void>
}

let {
Expand All @@ -19,7 +18,9 @@
deleteRepositoryUrl,
blogEnabled = $bindable(),
showArticles,
currentRepository
currentRepository,
onUpdateTheme,
onToggleBlog
}: Props = $props();

let notification = $state('')
Expand All @@ -35,7 +36,7 @@

// @ts-ignore
const saveTheme = e => {
dispatch('update-theme', { theme })
onUpdateTheme(theme)
notification =
'Le thème sera mis à jour après le déploiement des modifications (~ 2min)'

Expand All @@ -57,7 +58,7 @@

// @ts-ignore
const toggleBlog = e => {
dispatch('toggle-blog', { activated: e.target.checked })
onToggleBlog(e.target.checked)
if (e.target.checked) {
notification = 'Une section « Articles » a été ajoutée dans le menu'
} else {
Expand Down