removed duplicate transitions
This commit is contained in:
parent
6d5ac93200
commit
cd0348e7f4
6 changed files with 41 additions and 8465 deletions
|
@ -430,7 +430,7 @@ Button {
|
||||||
// -----------------------------
|
// -----------------------------
|
||||||
// APPBAR
|
// APPBAR
|
||||||
.appbar {
|
.appbar {
|
||||||
z-index: 32;
|
z-index: 4;
|
||||||
min-height: 56;
|
min-height: 56;
|
||||||
margin: 8;
|
margin: 8;
|
||||||
padding: 4;
|
padding: 4;
|
||||||
|
@ -449,7 +449,7 @@ Button {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.toolbar {
|
.toolbar {
|
||||||
z-index: 24;
|
z-index: 4;
|
||||||
padding: 4;
|
padding: 4;
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
horizontal-alignment: left;
|
horizontal-alignment: left;
|
||||||
|
@ -526,7 +526,7 @@ Button {
|
||||||
.recipeTitle {
|
.recipeTitle {
|
||||||
@extend .tw;
|
@extend .tw;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
padding: 16 0;
|
padding: 16 8;
|
||||||
line-height: 4;
|
line-height: 4;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1038,13 +1038,7 @@ export default {
|
||||||
navigateTo(to, title, page) {
|
navigateTo(to, title, page) {
|
||||||
this.showTools = false;
|
this.showTools = false;
|
||||||
if (page) {
|
if (page) {
|
||||||
this.$navigateTo(to, {
|
this.$navigateTo(to);
|
||||||
transition: {
|
|
||||||
name: "fade",
|
|
||||||
duration: 250,
|
|
||||||
curve: "easeOut",
|
|
||||||
},
|
|
||||||
});
|
|
||||||
} else if (title !== this.currentComponent) {
|
} else if (title !== this.currentComponent) {
|
||||||
this.setComponent(title);
|
this.setComponent(title);
|
||||||
this.filterFavourites = to == "favourites";
|
this.filterFavourites = to == "favourites";
|
||||||
|
@ -1059,11 +1053,6 @@ export default {
|
||||||
filterFavourites: this.filterFavourites,
|
filterFavourites: this.filterFavourites,
|
||||||
filterTrylater: this.filterTrylater,
|
filterTrylater: this.filterTrylater,
|
||||||
},
|
},
|
||||||
transition: {
|
|
||||||
name: "fade",
|
|
||||||
duration: 250,
|
|
||||||
curve: "easeOut",
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
viewRecipe(recipeID) {
|
viewRecipe(recipeID) {
|
||||||
|
@ -1073,11 +1062,6 @@ export default {
|
||||||
filterTrylater: this.filterTrylater,
|
filterTrylater: this.filterTrylater,
|
||||||
recipeID,
|
recipeID,
|
||||||
},
|
},
|
||||||
transition: {
|
|
||||||
name: "fade",
|
|
||||||
duration: 250,
|
|
||||||
curve: "easeOut",
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
viewRandomRecipe() {
|
viewRandomRecipe() {
|
||||||
|
@ -1087,11 +1071,6 @@ export default {
|
||||||
filterTrylater: true,
|
filterTrylater: true,
|
||||||
recipeID: this.randomRecipeID(),
|
recipeID: this.randomRecipeID(),
|
||||||
},
|
},
|
||||||
transition: {
|
|
||||||
name: "fade",
|
|
||||||
duration: 250,
|
|
||||||
curve: "easeOut",
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
touchSelector({ object, action }, comp, title) {
|
touchSelector({ object, action }, comp, title) {
|
||||||
|
|
|
@ -273,11 +273,6 @@ export default {
|
||||||
filterTrylater: true,
|
filterTrylater: true,
|
||||||
recipeID,
|
recipeID,
|
||||||
},
|
},
|
||||||
transition: {
|
|
||||||
name: "fade",
|
|
||||||
duration: 250,
|
|
||||||
curve: "easeOut",
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -201,9 +201,7 @@ export default {
|
||||||
let filename = `${localize("EnRecipes")}_${formattedDate}.zip`;
|
let filename = `${localize("EnRecipes")}_${formattedDate}.zip`;
|
||||||
let fromPath = path.join(knownFolders.documents().path, "EnRecipes");
|
let fromPath = path.join(knownFolders.documents().path, "EnRecipes");
|
||||||
utils.Zip.zip(fromPath, this.backupFolder, filename)
|
utils.Zip.zip(fromPath, this.backupFolder, filename)
|
||||||
.then((res) => {
|
.then((res) => res && this.showExportSummary(filename))
|
||||||
if (res) this.showExportSummary(filename);
|
|
||||||
})
|
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
console.log("Backup error: ", err);
|
console.log("Backup error: ", err);
|
||||||
this.progress = null;
|
this.progress = null;
|
||||||
|
@ -278,9 +276,7 @@ export default {
|
||||||
if (uri) {
|
if (uri) {
|
||||||
let dest = knownFolders.temp().path;
|
let dest = knownFolders.temp().path;
|
||||||
utils.Zip.unzip(uri, dest)
|
utils.Zip.unzip(uri, dest)
|
||||||
.then((res) => {
|
.then((res) => res && this.validateZipContent(res, uri))
|
||||||
if (res) this.validateZipContent(res, uri);
|
|
||||||
})
|
|
||||||
.catch(() => this.failedImport(localize("buInc")));
|
.catch(() => this.failedImport(localize("buInc")));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -328,20 +324,15 @@ export default {
|
||||||
file: "mealPlans.json",
|
file: "mealPlans.json",
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
} else {
|
|
||||||
knownFolders.temp().clear();
|
|
||||||
this.progress = null;
|
|
||||||
this.failedImport(localize("buInc"));
|
|
||||||
}
|
|
||||||
if (Folder.exists(ImagesFolderPath)) {
|
|
||||||
const timer = setInterval(() => {
|
const timer = setInterval(() => {
|
||||||
if (this.importSummary.found) {
|
if (!this.progress) clearInterval(timer);
|
||||||
knownFolders.temp().clear();
|
if (this.progress && this.importSummary.found) {
|
||||||
this.importImages(uri);
|
Folder.exists(ImagesFolderPath)
|
||||||
clearInterval(timer);
|
? this.importImages(uri)
|
||||||
|
: this.showImportSummary();
|
||||||
}
|
}
|
||||||
}, 100);
|
}, 100);
|
||||||
}
|
} else this.failedImport(localize("buInc"));
|
||||||
},
|
},
|
||||||
isFileDataValid(file) {
|
isFileDataValid(file) {
|
||||||
const files = file.filter((e) => File.exists(e.path));
|
const files = file.filter((e) => File.exists(e.path));
|
||||||
|
@ -369,11 +360,11 @@ export default {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
} else {
|
} else this.failedImport(localize("buEmp"));
|
||||||
this.failedImport(localize("buEmp"));
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
failedImport(description) {
|
failedImport(description) {
|
||||||
|
this.progress = null;
|
||||||
|
knownFolders.temp().clear();
|
||||||
this.$showModal(ConfirmDialog, {
|
this.$showModal(ConfirmDialog, {
|
||||||
props: {
|
props: {
|
||||||
title: "impFail",
|
title: "impFail",
|
||||||
|
@ -431,17 +422,18 @@ export default {
|
||||||
if (res) {
|
if (res) {
|
||||||
this.showImportSummary();
|
this.showImportSummary();
|
||||||
this.unlinkBrokenImages();
|
this.unlinkBrokenImages();
|
||||||
this.exportFiles("delete");
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
showImportSummary() {
|
showImportSummary() {
|
||||||
|
this.progress = null;
|
||||||
|
knownFolders.temp().clear();
|
||||||
|
this.exportFiles("delete");
|
||||||
let { found, imported, updated } = this.importSummary;
|
let { found, imported, updated } = this.importSummary;
|
||||||
let exists = Math.abs(found - imported - updated) + updated;
|
let exists = Math.abs(found - imported - updated) + updated;
|
||||||
let importedNote = `\n${localize("recI")} ${imported}`;
|
let importedNote = `\n${localize("recI")} ${imported}`;
|
||||||
let existsNote = `\n${localize("recE")} ${exists}`;
|
let existsNote = `\n${localize("recE")} ${exists}`;
|
||||||
let updatedNote = `\n${localize("recU")} ${updated}`;
|
let updatedNote = `\n${localize("recU")} ${updated}`;
|
||||||
this.progress = null;
|
|
||||||
this.$showModal(ConfirmDialog, {
|
this.$showModal(ConfirmDialog, {
|
||||||
props: {
|
props: {
|
||||||
title: "impSuc",
|
title: "impSuc",
|
||||||
|
|
|
@ -324,7 +324,7 @@ export default {
|
||||||
onPageLoad(args) {
|
onPageLoad(args) {
|
||||||
const page = args.object;
|
const page = args.object;
|
||||||
page.bindingContext = new Observable();
|
page.bindingContext = new Observable();
|
||||||
this.busy = false;
|
this.busy = this.photoOpen = false;
|
||||||
this.setComponent("ViewRecipe");
|
this.setComponent("ViewRecipe");
|
||||||
if (this.yieldMultiplier == this.recipe.yield.quantity)
|
if (this.yieldMultiplier == this.recipe.yield.quantity)
|
||||||
this.yieldMultiplier = this.recipe.yield.quantity;
|
this.yieldMultiplier = this.recipe.yield.quantity;
|
||||||
|
@ -622,21 +622,28 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
shareRecipe() {
|
shareRecipe() {
|
||||||
let overview = `${this.recipe.title}\n\n${localize("stars")}: ${
|
let overview = `${this.recipe.title}\n\n`;
|
||||||
this.recipe.rating
|
if (this.recipe.rating)
|
||||||
}\n${localize("cui")}: ${localize(this.recipe.cuisine)}\n${localize(
|
overview += `${localize("stars")}: ${this.recipe.rating}\n`;
|
||||||
"cat"
|
overview += `${localize("cui")}: ${localize(
|
||||||
)}: ${localize(this.recipe.category)}\n${localize(
|
this.recipe.cuisine
|
||||||
"ts"
|
)}\n${localize("cat")}: ${localize(this.recipe.category)}\n`;
|
||||||
)}: ${this.recipe.tags.join(", ")}\n${localize(
|
if (this.recipe.tags.length)
|
||||||
"prepT"
|
overview += `${localize("ts")}: ${this.recipe.tags.join(", ")}\n`;
|
||||||
)}: ${this.formattedTime(this.recipe.prepTime)}\n${localize(
|
if (this.recipe.prepTime != "00:00")
|
||||||
"cookT"
|
overview += `${localize("prepT")}: ${this.formattedTime(
|
||||||
)}: ${this.formattedTime(this.recipe.cookTime)}\n${localize("yld")}: ${
|
this.recipe.prepTime
|
||||||
this.tempYieldQuantity
|
)}\n`;
|
||||||
} ${localize(this.recipe.yield.unit)}\n${localize(
|
if (this.recipe.cookTime != "00:00")
|
||||||
"Difficulty level"
|
overview += `${localize("cookT")}: ${this.formattedTime(
|
||||||
)}: ${localize(this.recipe.difficulty)}\n`;
|
this.recipe.cookTime
|
||||||
|
)}\n`;
|
||||||
|
overview += `${localize("yld")}: ${this.tempYieldQuantity} ${localize(
|
||||||
|
this.recipe.yield.unit
|
||||||
|
)}\n${localize("Difficulty level")}: ${localize(
|
||||||
|
this.recipe.difficulty
|
||||||
|
)}\n`;
|
||||||
|
|
||||||
let shareContent = overview;
|
let shareContent = overview;
|
||||||
if (this.recipe.ingredients.length) {
|
if (this.recipe.ingredients.length) {
|
||||||
let ingredients = `\n\n${localize("ings")}:\n\n`;
|
let ingredients = `\n\n${localize("ings")}:\n\n`;
|
||||||
|
|
8397
package-lock.json
generated
8397
package-lock.json
generated
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue