fix: when logo is updated from brand settings, update the login logo too

This commit is contained in:
Jannat Patel
2025-07-02 16:16:49 +05:30
parent b97e792893
commit fcfd87fd50
3 changed files with 7 additions and 1 deletions

View File

@@ -64,7 +64,7 @@ const saveSettings = createResource({
const update = () => {
let fieldsToSave = {}
let imageFields = ['favicon', 'banner_image', 'footer_logo']
let imageFields = ['favicon', 'banner_image']
props.fields.forEach((f) => {
if (imageFields.includes(f.name)) {
fieldsToSave[f.name] = f.value ? f.value.file_url : null
@@ -72,6 +72,8 @@ const update = () => {
fieldsToSave[f.name] = f.value
}
})
fieldsToSave['app_logo'] = fieldsToSave['banner_image']
saveSettings.submit(
{
fields: fieldsToSave,

View File

@@ -286,6 +286,9 @@ watch(
)
const loadFalcon = () => {
if (livecodeURL.data) {
falconURL.value = livecodeURL.data
}
return new Promise((resolve, reject) => {
const script = document.createElement('script')
script.src = `${falconURL.value}static/livecode.js`

View File

@@ -150,6 +150,7 @@ const exercises = createListResource({
cache: ['programmingExercises'],
fields: ['name', 'title', 'language', 'problem_statement'],
auto: true,
orderBy: 'modified desc',
})
usePageMeta(() => {