mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-07-09 03:04:54 -04:00
Style/update mobile styles (#1008)
* update styling for mobile * remove Coming Soon
This commit is contained in:
parent
faf88ff820
commit
6a5fd8e4f8
@ -1,6 +1,13 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<v-chip v-for="(time, index) in allTimes" :key="index" label color="accent custom-transparent" class="ma-1">
|
<v-chip
|
||||||
|
v-for="(time, index) in allTimes"
|
||||||
|
:key="index"
|
||||||
|
:small="$vuetify.breakpoint.smAndDown"
|
||||||
|
label
|
||||||
|
color="accent custom-transparent"
|
||||||
|
class="ma-1"
|
||||||
|
>
|
||||||
<v-icon left>
|
<v-icon left>
|
||||||
{{ $globals.icons.clockOutline }}
|
{{ $globals.icons.clockOutline }}
|
||||||
</v-icon>
|
</v-icon>
|
||||||
@ -58,7 +65,7 @@ export default defineComponent({
|
|||||||
return {
|
return {
|
||||||
showCards,
|
showCards,
|
||||||
allTimes,
|
allTimes,
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
@ -36,8 +36,8 @@
|
|||||||
<v-icon> {{ $globals.icons.search }}</v-icon>
|
<v-icon> {{ $globals.icons.search }}</v-icon>
|
||||||
</v-btn>
|
</v-btn>
|
||||||
<v-btn v-if="$auth.loggedIn" text @click="$auth.logout()">
|
<v-btn v-if="$auth.loggedIn" text @click="$auth.logout()">
|
||||||
<v-icon left>{{ $globals.icons.logout }}</v-icon>
|
<v-icon :left="$vuetify.breakpoint.smAndUp">{{ $globals.icons.logout }}</v-icon>
|
||||||
{{ $t("user.logout") }}
|
{{ $vuetify.breakpoint.smAndUp ? $t("user.logout") : "" }}
|
||||||
</v-btn>
|
</v-btn>
|
||||||
<v-btn v-else text nuxt to="/login">
|
<v-btn v-else text nuxt to="/login">
|
||||||
<v-icon left>{{ $globals.icons.user }}</v-icon>
|
<v-icon left>{{ $globals.icons.user }}</v-icon>
|
||||||
|
@ -245,7 +245,7 @@
|
|||||||
"insert-section": "Insert Section",
|
"insert-section": "Insert Section",
|
||||||
"instructions": "Instructions",
|
"instructions": "Instructions",
|
||||||
"key-name-required": "Key Name Required",
|
"key-name-required": "Key Name Required",
|
||||||
"landscape-view-coming-soon": "Landscape View (Coming Soon)",
|
"landscape-view-coming-soon": "Landscape View",
|
||||||
"milligrams": "milligrams",
|
"milligrams": "milligrams",
|
||||||
"new-key-name": "New Key Name",
|
"new-key-name": "New Key Name",
|
||||||
"no-white-space-allowed": "No White Space Allowed",
|
"no-white-space-allowed": "No White Space Allowed",
|
||||||
@ -437,7 +437,7 @@
|
|||||||
"tags": "Tags",
|
"tags": "Tags",
|
||||||
"untagged-count": "Untagged {count}"
|
"untagged-count": "Untagged {count}"
|
||||||
},
|
},
|
||||||
"tool":{
|
"tool": {
|
||||||
"tools": "Tools"
|
"tools": "Tools"
|
||||||
},
|
},
|
||||||
"user": {
|
"user": {
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
<v-card v-if="skeleton" :color="`white ${false ? 'darken-2' : 'lighten-4'}`" class="pa-3">
|
<v-card v-if="skeleton" :color="`white ${false ? 'darken-2' : 'lighten-4'}`" class="pa-3">
|
||||||
<v-skeleton-loader class="mx-auto" height="700px" type="card"></v-skeleton-loader>
|
<v-skeleton-loader class="mx-auto" height="700px" type="card"></v-skeleton-loader>
|
||||||
</v-card>
|
</v-card>
|
||||||
<v-card v-else-if="recipe" :flat="$vuetify.breakpoint.mobile" class="d-print-none">
|
<v-card v-else-if="recipe" :flat="$vuetify.breakpoint.smAndDown" class="d-print-none">
|
||||||
<!-- Recipe Header -->
|
<!-- Recipe Header -->
|
||||||
<div class="d-flex justify-end flex-wrap align-stretch">
|
<div class="d-flex justify-end flex-wrap align-stretch">
|
||||||
<v-card v-if="!enableLandscape" width="50%" flat class="d-flex flex-column justify-center align-center">
|
<v-card v-if="!enableLandscape" width="50%" flat class="d-flex flex-column justify-center align-center">
|
||||||
@ -39,13 +39,6 @@
|
|||||||
class="d-print-none"
|
class="d-print-none"
|
||||||
@error="hideImage = true"
|
@error="hideImage = true"
|
||||||
>
|
>
|
||||||
<RecipeTimeCard
|
|
||||||
v-if="enableLandscape"
|
|
||||||
:class="true ? undefined : 'force-bottom'"
|
|
||||||
:prep-time="recipe.prepTime"
|
|
||||||
:total-time="recipe.totalTime"
|
|
||||||
:perform-time="recipe.performTime"
|
|
||||||
/>
|
|
||||||
</v-img>
|
</v-img>
|
||||||
</div>
|
</div>
|
||||||
<v-divider></v-divider>
|
<v-divider></v-divider>
|
||||||
@ -57,7 +50,7 @@
|
|||||||
:logged-in="$auth.loggedIn"
|
:logged-in="$auth.loggedIn"
|
||||||
:open="form"
|
:open="form"
|
||||||
:recipe-id="recipe.id"
|
:recipe-id="recipe.id"
|
||||||
class="ml-auto"
|
class="ml-auto mt-n8 pb-4"
|
||||||
@close="closeEditor"
|
@close="closeEditor"
|
||||||
@json="toggleJson"
|
@json="toggleJson"
|
||||||
@edit="
|
@edit="
|
||||||
@ -88,10 +81,27 @@
|
|||||||
</div>
|
</div>
|
||||||
<!-- Recipe Title Section -->
|
<!-- Recipe Title Section -->
|
||||||
<template v-if="!form && enableLandscape">
|
<template v-if="!form && enableLandscape">
|
||||||
<v-card-title class="pa-0 ma-0 headline">
|
<v-card-title class="px-0 py-2 ma-0 headline">
|
||||||
{{ recipe.name }}
|
{{ recipe.name }}
|
||||||
</v-card-title>
|
</v-card-title>
|
||||||
<VueMarkdown :source="recipe.description"> </VueMarkdown>
|
<VueMarkdown :source="recipe.description"> </VueMarkdown>
|
||||||
|
|
||||||
|
<div class="pb-2 d-flex justify-center flex-wrap">
|
||||||
|
<RecipeTimeCard
|
||||||
|
class="d-flex justify-center flex-wrap"
|
||||||
|
:prep-time="recipe.prepTime"
|
||||||
|
:total-time="recipe.totalTime"
|
||||||
|
:perform-time="recipe.performTime"
|
||||||
|
/>
|
||||||
|
<RecipeRating
|
||||||
|
v-if="enableLandscape && $vuetify.breakpoint.smAndDown"
|
||||||
|
:key="recipe.slug"
|
||||||
|
:value="recipe.rating"
|
||||||
|
:name="recipe.name"
|
||||||
|
:slug="recipe.slug"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<v-divider></v-divider>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template v-else-if="form">
|
<template v-else-if="form">
|
||||||
@ -152,7 +162,7 @@
|
|||||||
<BaseButton @click="addIngredient"> {{ $t("general.new") }} </BaseButton>
|
<BaseButton @click="addIngredient"> {{ $t("general.new") }} </BaseButton>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="d-flex justify-space-between align-center pb-3">
|
<div class="d-flex justify-space-between align-center pt-2 pb-3">
|
||||||
<v-tooltip v-if="!form" small top color="secondary darken-1">
|
<v-tooltip v-if="!form" small top color="secondary darken-1">
|
||||||
<template #activator="{ on, attrs }">
|
<template #activator="{ on, attrs }">
|
||||||
<v-btn
|
<v-btn
|
||||||
@ -190,7 +200,7 @@
|
|||||||
<v-spacer></v-spacer>
|
<v-spacer></v-spacer>
|
||||||
|
|
||||||
<RecipeRating
|
<RecipeRating
|
||||||
v-if="enableLandscape"
|
v-if="enableLandscape && $vuetify.breakpoint.smAndUp"
|
||||||
:key="recipe.slug"
|
:key="recipe.slug"
|
||||||
:value="recipe.rating"
|
:value="recipe.rating"
|
||||||
:name="recipe.name"
|
:name="recipe.name"
|
||||||
@ -425,9 +435,9 @@
|
|||||||
</v-card>
|
</v-card>
|
||||||
</v-card>
|
</v-card>
|
||||||
<div
|
<div
|
||||||
v-if="recipe"
|
v-if="recipe && wakeIsSupported"
|
||||||
class="d-print-none d-flex px-2"
|
class="d-print-none d-flex px-2"
|
||||||
:class="$vuetify.breakpoint.mobile ? 'justify-center' : 'justify-end'"
|
:class="$vuetify.breakpoint.smAndDown ? 'justify-center' : 'justify-end'"
|
||||||
>
|
>
|
||||||
<v-switch v-model="wakeLock" small label="Keep Screen Awake" />
|
<v-switch v-model="wakeLock" small label="Keep Screen Awake" />
|
||||||
</div>
|
</div>
|
||||||
@ -533,7 +543,7 @@ export default defineComponent({
|
|||||||
// ===============================================================
|
// ===============================================================
|
||||||
// Screen Lock
|
// Screen Lock
|
||||||
|
|
||||||
const { isSupported, isActive, request, release } = useWakeLock();
|
const { isSupported: wakeIsSupported, isActive, request, release } = useWakeLock();
|
||||||
|
|
||||||
const wakeLock = computed({
|
const wakeLock = computed({
|
||||||
get: () => isActive,
|
get: () => isActive,
|
||||||
@ -547,14 +557,14 @@ export default defineComponent({
|
|||||||
});
|
});
|
||||||
|
|
||||||
async function lockScreen() {
|
async function lockScreen() {
|
||||||
if (isSupported) {
|
if (wakeIsSupported) {
|
||||||
console.log("Wake Lock Requested");
|
console.log("Wake Lock Requested");
|
||||||
await request("screen");
|
await request("screen");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async function unlockScreen() {
|
async function unlockScreen() {
|
||||||
if (isSupported || isActive) {
|
if (wakeIsSupported || isActive) {
|
||||||
console.log("Wake Lock Released");
|
console.log("Wake Lock Released");
|
||||||
await release();
|
await release();
|
||||||
}
|
}
|
||||||
@ -790,6 +800,7 @@ export default defineComponent({
|
|||||||
|
|
||||||
return {
|
return {
|
||||||
// Wake Lock
|
// Wake Lock
|
||||||
|
wakeIsSupported,
|
||||||
isActive,
|
isActive,
|
||||||
lockScreen,
|
lockScreen,
|
||||||
unlockScreen,
|
unlockScreen,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user