mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-01 20:28:46 -05:00
import app view refactor
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
// containing all data and functions regarding the different integrations
|
||||
|
||||
export const INTEGRATIONS = [
|
||||
{id: 'DEFAULT', name: "Tandoor", import: true, export: true, help_url: 'https://docs.tandoor.dev/features/import_export/#default'},
|
||||
{id: 'DEFAULT', name: "Tandoor", import: true, export: true, help_url: 'https://docs.tandoor.dev/features/import_export/#default', img_src: 'https://raw.githubusercontent.com/TandoorRecipes/recipes/develop/docs/logo_color.svg'},
|
||||
{id: 'CHEFTAP', name: "Cheftap", import: true, export: false, help_url: 'https://docs.tandoor.dev/features/import_export/#cheftap'},
|
||||
{id: 'CHOWDOWN', name: "Chowdown", import: true, export: false, help_url: 'https://docs.tandoor.dev/features/import_export/#chowdown'},
|
||||
{id: 'COOKBOOKAPP', name: "CookBookApp", import: true, export: false, help_url: 'https://docs.tandoor.dev/features/import_export/#cookbookapp'},
|
||||
|
||||
@@ -147,6 +147,45 @@ export class StandardToasts {
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Utility function to get random food icon from fontawesome
|
||||
* */
|
||||
|
||||
export const RandomIconMixin = {
|
||||
name: "RandomIconMixin",
|
||||
methods: {
|
||||
getRandomFoodIcon: function () {
|
||||
return getRandomFoodIcon()
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
export function getRandomFoodIcon() {
|
||||
let icons = [
|
||||
'fas fa-hamburger',
|
||||
'fas fa-utensils',
|
||||
'fas fa-apple-alt',
|
||||
'fas fa-bacon',
|
||||
'fas fa-bread-slice',
|
||||
'fas fa-candy-cane',
|
||||
'fas fa-carrot',
|
||||
'fas fa-cheese',
|
||||
'fas fa-cookie',
|
||||
'fas fa-drumstick-bite',
|
||||
'fas fa-egg',
|
||||
'fas fa-fish',
|
||||
'fas fa-hotdog',
|
||||
'fas fa-ice-cream',
|
||||
'fas fa-lemon',
|
||||
'fas fa-pepper-hot',
|
||||
'fas fa-pizza-slice',
|
||||
'fas fa-cookie-bite'
|
||||
|
||||
]
|
||||
|
||||
return icons[Math.floor(Math.random() * icons.length)];
|
||||
}
|
||||
|
||||
/*
|
||||
* Utility functions to use djangos gettext
|
||||
* */
|
||||
|
||||
Reference in New Issue
Block a user