зеркало из https://github.com/nextcloud/cookbook.git
Make app compatible with Vite
Signed-off-by: Christian Wolf <git@christianwolf.email>
This commit is contained in:
Родитель
aaa4c53d29
Коммит
11c8f6e0c4
|
@ -3,6 +3,7 @@
|
|||
"version": "0.11.2",
|
||||
"description": "",
|
||||
"license": "AGPL-3.0-or-later",
|
||||
"type": "module",
|
||||
"author": "",
|
||||
"homepage": "https://github.com/nextcloud/nextcloud-cookbook#readme",
|
||||
"repository": {
|
||||
|
|
|
@ -296,7 +296,7 @@ const deleteRecipe = async () => {
|
|||
// Confirm delete
|
||||
if (
|
||||
!(await showSimpleConfirmModal(
|
||||
// prettier-ignore
|
||||
/* prettier-ignore */
|
||||
t('cookbook', 'Are you sure you want to delete this recipe?'),
|
||||
))
|
||||
) {
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
</div>
|
||||
<div>
|
||||
{{
|
||||
// prettier-ignore
|
||||
/* prettier-ignore */
|
||||
t("cookbook", "You are logged in with a guest account. Therefore, you are not allowed to generate arbitrary files and folders on this Nextcloud instance. To be able to use the Cookbook app as a guest, you need to specify a folder where all recipes are stored. You will need write permission to this folder." )
|
||||
}}
|
||||
</div>
|
||||
|
|
|
@ -185,7 +185,7 @@ const openCategory = async (idx) => {
|
|||
} catch (e) {
|
||||
cat.recipes = [];
|
||||
await showSimpleAlertModal(
|
||||
// prettier-ignore
|
||||
/* prettier-ignore */
|
||||
t('cookbook', 'Failed to load category {category} recipes',
|
||||
{
|
||||
category: cat.name,
|
||||
|
@ -218,7 +218,7 @@ const categoryUpdateName = async (idx, newName) => {
|
|||
emitter.emit('categoryRenamed', [newName, oldName]);
|
||||
} catch (e) {
|
||||
await showSimpleAlertModal(
|
||||
// prettier-ignore
|
||||
/* prettier-ignore */
|
||||
t('cookbook','Failed to update name of category "{category}"',
|
||||
{
|
||||
category: oldName,
|
||||
|
@ -266,7 +266,7 @@ const downloadRecipe = async () => {
|
|||
// eslint-disable-next-line no-console
|
||||
console.error(e2);
|
||||
await showSimpleAlertModal(
|
||||
// prettier-ignore
|
||||
/* prettier-ignore */
|
||||
t('cookbook','The server reported an error. Please check.'),
|
||||
);
|
||||
}
|
||||
|
@ -274,7 +274,7 @@ const downloadRecipe = async () => {
|
|||
// eslint-disable-next-line no-console
|
||||
console.error(e2);
|
||||
await showSimpleAlertModal(
|
||||
// prettier-ignore
|
||||
/* prettier-ignore */
|
||||
t('cookbook', 'Could not query the server. This might be a network problem.'),
|
||||
);
|
||||
}
|
||||
|
@ -305,7 +305,7 @@ const getCategories = async () => {
|
|||
recipes: [
|
||||
{
|
||||
id: 0,
|
||||
// prettier-ignore
|
||||
/* prettier-ignore */
|
||||
name: t('cookbook','Loading category recipes …'),
|
||||
},
|
||||
],
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
type="text"
|
||||
:value="value"
|
||||
:placeholder="
|
||||
// prettier-ignore
|
||||
/* prettier-ignore */
|
||||
t('cookbook', 'Enter URL or select from your Nextcloud instance on the right')
|
||||
"
|
||||
@input="$emit('input', $event.target.value)"
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
</div>
|
||||
<div>
|
||||
{{
|
||||
// prettier-ignore
|
||||
/* prettier-ignore */
|
||||
t('cookbook', 'To get started, you may use the text box in the left navigation bar to import a new recipe. Click below to create a recipe from scratch.',)
|
||||
}}
|
||||
</div>
|
||||
|
|
|
@ -143,7 +143,7 @@
|
|||
<!-- Keep button together in a line with the last input so it does not get lonely -->
|
||||
<NcButton type="tertiary" @click="clearFilters">
|
||||
{{
|
||||
// TRANSLATORS Button text for applying recipe-filter values
|
||||
/* TRANSLATORS Button text for applying recipe-filter values */
|
||||
t('cookbook', 'Clear')
|
||||
}}
|
||||
</NcButton>
|
||||
|
|
|
@ -175,7 +175,7 @@
|
|||
<div class="d-flex flex-row justify-end mt-4">
|
||||
<NcButton type="tertiary" @click="clearFilters">
|
||||
{{
|
||||
// TRANSLATORS Button text for applying recipe-filter values
|
||||
/* TRANSLATORS Button text for applying recipe-filter values */
|
||||
t('cookbook', 'Clear')
|
||||
}}
|
||||
</NcButton>
|
||||
|
@ -185,7 +185,7 @@
|
|||
@click="submitFilters"
|
||||
>
|
||||
{{
|
||||
// TRANSLATORS Button text for applying recipe-filter values
|
||||
/* TRANSLATORS Button text for applying recipe-filter values */
|
||||
t('cookbook', 'Apply')
|
||||
}}
|
||||
</NcButton>
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
:name="keywordObj.name"
|
||||
:count="keywordObj.count"
|
||||
:title="
|
||||
// prettier-ignore
|
||||
/* prettier-ignore */
|
||||
t('cookbook','Keyword not contained in visible recipes')
|
||||
"
|
||||
class="keyword disabled"
|
||||
|
|
|
@ -73,7 +73,7 @@
|
|||
/>
|
||||
<label for="filters">
|
||||
{{
|
||||
// prettier-ignore
|
||||
/* prettier-ignore */
|
||||
t('cookbook', 'Show filters and sorting in recipe lists')
|
||||
}}
|
||||
</label>
|
||||
|
@ -89,7 +89,7 @@
|
|||
<fieldset>
|
||||
<legend class="settings-info-blocks__legend">
|
||||
{{
|
||||
// prettier-ignore
|
||||
/* prettier-ignore */
|
||||
t('cookbook', 'Control which blocks of information are shown in the recipe view. If you do not use some features and find them distracting, you may hide them.')
|
||||
}}
|
||||
</legend>
|
||||
|
@ -164,7 +164,7 @@
|
|||
>
|
||||
<legend class="settings-info-blocks__legend">
|
||||
{{
|
||||
// prettier-ignore
|
||||
/* prettier-ignore */
|
||||
t('cookbook', 'This allows to temporarily enable logging in the browser console in case of problems. You will not need these settings by default.')
|
||||
}}
|
||||
</legend>
|
||||
|
@ -273,7 +273,7 @@ watch(
|
|||
// Should this check the response of the query? To catch some errors that redirect the page
|
||||
} catch {
|
||||
await showSimpleAlertModal(
|
||||
// prettier-ignore
|
||||
/* prettier-ignore */
|
||||
t('cookbook','Could not set preference for image printing'),
|
||||
);
|
||||
printImage.value = oldVal;
|
||||
|
@ -308,7 +308,7 @@ watch(
|
|||
await store.dispatch('refreshConfig');
|
||||
} catch {
|
||||
await showSimpleAlertModal(
|
||||
// prettier-ignore
|
||||
/* prettier-ignore */
|
||||
t('cookbook','Could not set recipe update interval to {interval}',
|
||||
{
|
||||
interval: newVal,
|
||||
|
@ -368,7 +368,7 @@ const pickRecipeFolder = () => {
|
|||
})
|
||||
.catch(() =>
|
||||
showSimpleAlertModal(
|
||||
// prettier-ignore
|
||||
/* prettier-ignore */
|
||||
t('cookbook','Could not set recipe folder to {path}',
|
||||
{
|
||||
path
|
||||
|
|
|
@ -75,7 +75,7 @@
|
|||
<NcActionButton
|
||||
class="btn-enable-recipe-yield"
|
||||
:aria-label="
|
||||
// prettier-ignore
|
||||
/* prettier-ignore */
|
||||
t('cookbook', 'Toggle if the number of servings is present')
|
||||
"
|
||||
@click="toggleShowRecipeYield"
|
||||
|
@ -174,7 +174,7 @@ const log = getCurrentInstance().proxy.$log;
|
|||
const route = useRoute();
|
||||
const store = useStore();
|
||||
|
||||
// prettier-ignore
|
||||
/* prettier-ignore */
|
||||
const CONFIRM_MSG = t('cookbook', 'You have unsaved changes! Do you still want to leave?');
|
||||
|
||||
// ===================
|
||||
|
@ -257,7 +257,7 @@ const availableNutritionFields = ref([
|
|||
{
|
||||
key: 'calories',
|
||||
label: t('cookbook', 'Calories'),
|
||||
// prettier-ignore
|
||||
/* prettier-ignore */
|
||||
placeholder: t('cookbook','E.g.: 450 kcal (amount & unit)'),
|
||||
},
|
||||
{
|
||||
|
@ -293,7 +293,7 @@ const availableNutritionFields = ref([
|
|||
{
|
||||
key: 'servingSize',
|
||||
label: t('cookbook', 'Serving size'),
|
||||
// prettier-ignore
|
||||
/* prettier-ignore */
|
||||
placeholder: t('cookbook','Enter serving size (volume or mass)'),
|
||||
},
|
||||
{
|
||||
|
@ -496,7 +496,7 @@ const save = async () => {
|
|||
|
||||
default:
|
||||
await showSimpleAlertModal(
|
||||
// prettier-ignore
|
||||
/* prettier-ignore */
|
||||
t('cookbook','Unknown answer returned from server. See logs.'),
|
||||
);
|
||||
log.error(e.response);
|
||||
|
@ -508,7 +508,7 @@ const save = async () => {
|
|||
log.error(e);
|
||||
} else {
|
||||
await showSimpleAlertModal(
|
||||
// prettier-ignore
|
||||
/* prettier-ignore */
|
||||
t('cookbook','Could not start request to save recipe.'),
|
||||
);
|
||||
log.error(e);
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
:key="'keyw' + idx"
|
||||
:name="keyword"
|
||||
:title="
|
||||
// prettier-ignore
|
||||
/* prettier-ignore */
|
||||
t('cookbook','Search recipes with this keyword')
|
||||
"
|
||||
@keyword-clicked="keywordClicked(keyword)"
|
||||
|
@ -183,7 +183,7 @@
|
|||
<hr />
|
||||
<span class="icon-error" />
|
||||
{{
|
||||
// prettier-ignore
|
||||
/* prettier-ignore */
|
||||
t("cookbook", "The ingredient cannot be recalculated due to incorrect syntax. Please ensure the syntax follows this format: amount unit ingredient and that a specific number of portions is set for this function to work correctly. Examples: 200 g carrots or 1 pinch of salt.")
|
||||
}}
|
||||
</div>
|
||||
|
|
|
@ -72,7 +72,7 @@ const setup = async () => {
|
|||
} catch (e) {
|
||||
results.value = [];
|
||||
await showSimpleAlertModal(
|
||||
// prettier-ignore
|
||||
/* prettier-ignore */
|
||||
t('cookbook', 'Failed to load recipes with keywords: {tags}',
|
||||
{
|
||||
tags,
|
||||
|
@ -96,7 +96,7 @@ const setup = async () => {
|
|||
} catch (e) {
|
||||
results.value = [];
|
||||
await showSimpleAlertModal(
|
||||
// prettier-ignore
|
||||
/* prettier-ignore */
|
||||
t('cookbook', 'Failed to load category {category} recipes',
|
||||
{
|
||||
category: cat,
|
||||
|
|
|
@ -9,5 +9,16 @@ export default createAppConfig(
|
|||
createEmptyCSSEntryPoints: true,
|
||||
extractLicenseInformation: true,
|
||||
thirdPartyLicense: false,
|
||||
config: {
|
||||
resolve: {
|
||||
alias: {
|
||||
cookbook: resolve(__dirname, 'src'),
|
||||
icons: resolve(
|
||||
__dirname,
|
||||
'node_modules/vue-material-design-icons'
|
||||
),
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
)
|
||||
)
|
||||
|
|
Загрузка…
Ссылка в новой задаче