1
0
Fork 0
mirror of https://github.com/mealie-recipes/mealie.git synced 2025-07-22 22:59:41 +02:00

chore: make vue global components and layouts localizable (#1565)

This commit is contained in:
Philipp Fischbeck 2022-08-15 23:55:51 +02:00 committed by GitHub
parent 7af48d51be
commit ba15006bb1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
20 changed files with 193 additions and 153 deletions

View file

@ -109,40 +109,40 @@ export default defineComponent({
},
},
setup(props) {
const { $globals } = useContext();
const { $globals, i18n } = useContext();
const buttonOptions = {
create: {
text: "Create",
text: i18n.t("general.create"),
icon: $globals.icons.createAlt,
color: "success",
},
update: {
text: "Update",
text: i18n.t("general.update"),
icon: $globals.icons.edit,
color: "success",
},
save: {
text: "Save",
text: i18n.t("general.save"),
icon: $globals.icons.save,
color: "success",
},
edit: {
text: "Edit",
text: i18n.t("general.edit"),
icon: $globals.icons.edit,
color: "info",
},
delete: {
text: "Delete",
text: i18n.t("general.delete"),
icon: $globals.icons.delete,
color: "error",
},
cancel: {
text: "Cancel",
text: i18n.t("general.cancel"),
icon: $globals.icons.close,
color: "grey",
},
download: {
text: "Download",
text: i18n.t("general.download"),
icon: $globals.icons.download,
color: "info",
},
@ -189,13 +189,11 @@ export default defineComponent({
return buttonStyles.defaults;
});
const api = useUserApi();
function downloadFile() {
api.utils.download(props.downloadUrl);
}
return {
btnAttrs,
btnStyle,