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