Enhance mobile view

This commit is contained in:
Weng Tad 2021-02-16 23:53:07 +08:00
commit 344a6fd469
11 changed files with 104 additions and 31 deletions

View file

@ -9,6 +9,7 @@
/> />
<v-row> <v-row>
<v-col <v-col
:cols="12"
:sm="6" :sm="6"
:md="6" :md="6"
:lg="4" :lg="4"
@ -19,14 +20,14 @@
<v-card hover outlined @click="openDialog(backup)"> <v-card hover outlined @click="openDialog(backup)">
<v-card-text> <v-card-text>
<v-row align="center"> <v-row align="center">
<v-col cols="12" sm="2"> <v-col cols="2">
<v-icon large color="primary"> mdi-backup-restore </v-icon> <v-icon large color="primary">mdi-backup-restore</v-icon>
</v-col> </v-col>
<v-col cols="12" sm="10"> <v-col cols="10">
<div> <div class="text-truncate">
<strong>{{ backup.name }}</strong> <strong>{{ backup.name }}</strong>
</div> </div>
<div>{{ readableTime(backup.date) }}</div> <div class="text-truncate">{{ readableTime(backup.date) }}</div>
</v-col> </v-col>
</v-row> </v-row>
</v-card-text> </v-card-text>

View file

@ -1,7 +1,23 @@
<template> <template>
<div class="text-center"> <div class="text-center">
<v-dialog v-model="dialog" width="500"> <v-dialog
v-model="dialog"
width="500"
:fullscreen="$vuetify.breakpoint.xsOnly"
>
<v-card> <v-card>
<v-toolbar dark color="primary" v-show="$vuetify.breakpoint.xsOnly">
<v-btn icon dark @click="dialog = false">
<v-icon>mdi-close</v-icon>
</v-btn>
<v-toolbar-title></v-toolbar-title>
<v-spacer></v-spacer>
<v-toolbar-items>
<v-btn dark text @click="raiseEvent('import')">
{{ $t("general.import") }}
</v-btn>
</v-toolbar-items>
</v-toolbar>
<v-card-title> {{ name }} </v-card-title> <v-card-title> {{ name }} </v-card-title>
<v-card-subtitle class="mb-n3"> {{ date }} </v-card-subtitle> <v-card-subtitle class="mb-n3"> {{ date }} </v-card-subtitle>
<v-divider></v-divider> <v-divider></v-divider>
@ -72,7 +88,12 @@
<v-btn color="error" text @click="raiseEvent('delete')"> <v-btn color="error" text @click="raiseEvent('delete')">
{{ $t("general.delete") }} {{ $t("general.delete") }}
</v-btn> </v-btn>
<v-btn color="success" outlined @click="raiseEvent('import')"> <v-btn
color="success"
outlined
@click="raiseEvent('import')"
v-show="$vuetify.breakpoint.smAndUp"
>
{{ $t("general.import") }} {{ $t("general.import") }}
</v-btn> </v-btn>
</v-card-actions> </v-card-actions>

View file

@ -8,7 +8,7 @@
v-model="tag" v-model="tag"
></v-text-field> ></v-text-field>
</v-card-text> </v-card-text>
<v-card-actions class="mt-n9"> <v-card-actions class="mt-n9 flex-wrap">
<v-switch v-model="fullBackup" :label="switchLabel"></v-switch> <v-switch v-model="fullBackup" :label="switchLabel"></v-switch>
<v-spacer></v-spacer> <v-spacer></v-spacer>
<v-btn color="success" text @click="createBackup()"> <v-btn color="success" text @click="createBackup()">

View file

@ -7,7 +7,7 @@
<v-card-text> <v-card-text>
<v-row> <v-row>
<v-col cols="12" md="6" ss="12"> <v-col cols="12" md="6" sm="12">
<NewBackupCard @created="processFinished" /> <NewBackupCard @created="processFinished" />
</v-col> </v-col>
<v-col cols="12" md="6" sm="12"> <v-col cols="12" md="6" sm="12">

View file

@ -3,12 +3,12 @@
<v-card-text> <v-card-text>
<h2 class="mt-1 mb-1">Home Page</h2> <h2 class="mt-1 mb-1">Home Page</h2>
<v-row align="center" justify="center" dense class="mb-n7 pb-n5"> <v-row align="center" justify="center" dense class="mb-n7 pb-n5">
<v-col sm="2"> <v-col cols="12" sm="3" md="2">
<v-switch v-model="showRecent" label="Show Recent"></v-switch> <v-switch v-model="showRecent" label="Show Recent"></v-switch>
</v-col> </v-col>
<v-col> <v-col cols="12" sm="5" md="5">
<v-slider <v-slider
class="pt-4" class="pt-sm-4"
label="Card Per Section" label="Card Per Section"
v-model="showLimit" v-model="showLimit"
max="30" max="30"
@ -24,7 +24,7 @@
</v-card-text> </v-card-text>
<v-card-text> <v-card-text>
<v-row> <v-row>
<v-col> <v-col cols="12" sm="6">
<v-card outlined min-height="250"> <v-card outlined min-height="250">
<v-card-text class="pt-2 pb-1"> <v-card-text class="pt-2 pb-1">
<h3>Homepage Categories</h3> <h3>Homepage Categories</h3>
@ -64,7 +64,7 @@
</v-list> </v-list>
</v-card> </v-card>
</v-col> </v-col>
<v-col> <v-col cols="12" sm="6">
<v-card outlined min-height="250px"> <v-card outlined min-height="250px">
<v-card-text class="pt-2 pb-1"> <v-card-text class="pt-2 pb-1">
<h3> <h3>

View file

@ -14,7 +14,7 @@
<v-card-text> <v-card-text>
<h2 class="mt-1 mb-4">{{ $t("settings.language") }}</h2> <h2 class="mt-1 mb-4">{{ $t("settings.language") }}</h2>
<v-row> <v-row>
<v-col cols="3"> <v-col sm="3">
<v-select <v-select
dense dense
v-model="selectedLang" v-model="selectedLang"

View file

@ -21,14 +21,16 @@
> >
<v-card-text> <v-card-text>
<v-row align="center"> <v-row align="center">
<v-col cols="12" sm="2"> <v-col cols="2">
<v-icon large color="primary"> mdi-import </v-icon> <v-icon large color="primary">mdi-import</v-icon>
</v-col> </v-col>
<v-col cols="12" sm="10"> <v-col cols="10">
<div> <div class="text-truncate">
<strong>{{ migration.name }}</strong> <strong>{{ migration.name }}</strong>
</div> </div>
<div>{{ readableTime(migration.date) }}</div> <div class="text-truncate">
{{ readableTime(migration.date) }}
</div>
</v-col> </v-col>
</v-row> </v-row>
</v-card-text> </v-card-text>

View file

@ -17,7 +17,8 @@
<v-row dense> <v-row dense>
<v-col <v-col
:sm="12" :cols="12"
:sm="6"
:md="6" :md="6"
:lg="4" :lg="4"
:xl="3" :xl="3"

View file

@ -3,7 +3,13 @@
<div class="text-center"> <div class="text-center">
<h3>{{ buttonText }}</h3> <h3>{{ buttonText }}</h3>
</div> </div>
<v-text-field v-model="color" hide-details class="ma-0 pa-0" solo> <v-text-field
v-model="color"
hide-details
class="ma-0 pa-0"
solo
v-show="$vuetify.breakpoint.mdAndUp"
>
<template v-slot:append> <template v-slot:append>
<v-menu <v-menu
v-model="menu" v-model="menu"
@ -17,12 +23,27 @@
</template> </template>
<v-card> <v-card>
<v-card-text class="pa-0"> <v-card-text class="pa-0">
<v-color-picker v-model="color" flat show-swatches /> <v-color-picker v-model="color" flat mode="hexa" show-swatches />
</v-card-text> </v-card-text>
</v-card> </v-card>
</v-menu> </v-menu>
</template> </template>
</v-text-field> </v-text-field>
<div class="text-center" v-show="$vuetify.breakpoint.smAndDown">
<v-menu
v-model="menu"
top
nudge-bottom="105"
nudge-left="16"
:close-on-content-click="false"
>
<template v-slot:activator="{ on, attrs }">
<v-chip label :color="`${color}`" dark v-bind="attrs" v-on="on">
{{ color }}
</v-chip>
</template>
</v-menu>
</div>
</div> </div>
</template> </template>
@ -36,7 +57,7 @@ export default {
return { return {
dialog: false, dialog: false,
swatches: false, swatches: false,
color: "#1976D2", color: this.value || "#1976D2",
mask: "!#XXXXXXXX", mask: "!#XXXXXXXX",
menu: false, menu: false,
}; };

View file

@ -14,7 +14,7 @@
}} }}
</p> </p>
<v-row dense align="center"> <v-row dense align="center">
<v-col cols="12"> <v-col cols="6">
<v-btn-toggle <v-btn-toggle
v-model="selectedDarkMode" v-model="selectedDarkMode"
color="primary " color="primary "
@ -22,12 +22,25 @@
@change="setStoresDarkMode" @change="setStoresDarkMode"
> >
<v-btn value="system"> <v-btn value="system">
{{ $t("settings.theme.default-to-system") }} <v-icon>mdi-desktop-tower-monitor</v-icon>
<span class="ml-1" v-show="$vuetify.breakpoint.smAndUp">
{{ $t("settings.theme.default-to-system") }}
</span>
</v-btn> </v-btn>
<v-btn value="light"> {{ $t("settings.theme.light") }} </v-btn> <v-btn value="light">
<v-icon>mdi-white-balance-sunny</v-icon>
<span class="ml-1" v-show="$vuetify.breakpoint.smAndUp">
{{ $t("settings.theme.light") }}
</span>
</v-btn>
<v-btn value="dark"> {{ $t("settings.theme.dark") }} </v-btn> <v-btn value="dark">
<v-icon>mdi-weather-night</v-icon>
<span class="ml-1" v-show="$vuetify.breakpoint.smAndUp">
{{ $t("settings.theme.dark") }}
</span>
</v-btn>
</v-btn-toggle> </v-btn-toggle>
</v-col> </v-col>
</v-row></v-card-text </v-row></v-card-text
@ -45,7 +58,7 @@
<v-form ref="form" lazy-validation> <v-form ref="form" lazy-validation>
<v-row dense align="center"> <v-row dense align="center">
<v-col md="4" sm="3"> <v-col cols="12" md="4" sm="3">
<v-select <v-select
:label="$t('settings.theme.saved-color-theme')" :label="$t('settings.theme.saved-color-theme')"
:items="availableThemes" :items="availableThemes"

View file

@ -1,7 +1,21 @@
<template> <template>
<v-dialog v-model="dialog" max-width="900px"> <v-dialog
v-model="dialog"
max-width="900px"
:fullscreen="$vuetify.breakpoint.xsOnly"
>
<v-card> <v-card>
<v-card-title> {{ title }} </v-card-title> <v-toolbar dark color="primary" v-show="$vuetify.breakpoint.xsOnly">
<v-btn icon dark @click="dialog = false">
<v-icon>mdi-close</v-icon>
</v-btn>
<v-toolbar-title>{{ title }}</v-toolbar-title>
<v-spacer></v-spacer>
<v-toolbar-items></v-toolbar-items>
</v-toolbar>
<v-card-title v-show="$vuetify.breakpoint.smAndUp">
{{ title }}
</v-card-title>
<v-card-text class="mt-3"> <v-card-text class="mt-3">
<v-row> <v-row>
<v-col> <v-col>