Skip to content

Commit

Permalink
Admin: Allow to set color theme according the access url - refs BT#21621
Browse files Browse the repository at this point in the history
  • Loading branch information
AngelFQC committed Jun 26, 2024
1 parent 9c6ed18 commit c1f8baf
Show file tree
Hide file tree
Showing 7 changed files with 483 additions and 426 deletions.
21 changes: 15 additions & 6 deletions assets/vue/services/colorThemeService.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,10 @@ const url = "/api/color_themes"
/**
* Gets the color themes
*
* @returns {Promise<Array>}
* @returns {Promise<{totalItems, items}>}
*/
async function getThemes() {
const { items } = await baseService.getCollection(url)

return items
async function findAll() {
return await baseService.getCollection(url)
}

/**
Expand All @@ -35,7 +33,18 @@ async function updateTheme({ iri = null, title, colors }) {
})
}

/**
* @param {string} iri
* @returns {Promise<Object>}
*/
async function changePlatformColorTheme(iri) {
return baseService.post("/api/access_url_rel_color_themes", {
colorTheme: iri,
})
}

export default {
getThemes,
findAll,
updateTheme,
changePlatformColorTheme,
}
Loading

0 comments on commit c1f8baf

Please sign in to comment.