diff --git a/src/App.vue b/src/App.vue
index 6193776..fcf3990 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -8,32 +8,9 @@
width="300"
>
-
-
-
-
+
+
+
@@ -87,9 +64,9 @@ import Torrents from './components/Torrents.vue';
import AppFooter from './components/Footer.vue';
import LogsDialog from './components/dialogs/LogsDialog.vue';
import RssDialog from './components/dialogs/RssDialog.vue';
+import DrawerFooter from './components/drawer/DrawerFooter.vue';
import api from './Api';
-import { timeout } from './utils';
import Component from 'vue-class-component';
import { Watch } from 'vue-property-decorator';
import { MainData } from './types';
@@ -108,6 +85,7 @@ let appWrapEl: HTMLElement;
GlobalDialog,
GlobalSnackBar,
RssDialog,
+ DrawerFooter,
},
computed: {
...mapState([
@@ -203,18 +181,6 @@ export default class App extends Vue {
this.task = setTimeout(this.getMainData, this.config.updateInterval);
}
- async drawerFooterOpen(v: boolean) {
- if (!v) {
- return;
- }
-
- await timeout(3000);
-
- (this.$refs.end as HTMLElement).scrollIntoView({
- behavior: 'smooth',
- });
- }
-
onPaste(e: ClipboardEvent) {
if ((e.target as HTMLElement).tagName === 'INPUT') {
return;
@@ -238,26 +204,6 @@ export default class App extends Vue {
diff --git a/src/components/Torrents.vue b/src/components/Torrents.vue
index e880987..2e7e28c 100644
--- a/src/components/Torrents.vue
+++ b/src/components/Torrents.vue
@@ -610,7 +610,19 @@ export default class Torrents extends Vue {
}
::v-deep .v-data-footer {
- margin-right: 6em;
+ margin-right: 4em;
+
+ .phone-layout & {
+ justify-content: flex-start;
+
+ .v-data-footer__select {
+ display: none;
+ }
+
+ .v-data-footer__pagination {
+ margin-left: 0;
+ }
+ }
}
}
}
diff --git a/src/components/drawer/DrawerFooter.vue b/src/components/drawer/DrawerFooter.vue
new file mode 100644
index 0000000..3c8bba6
--- /dev/null
+++ b/src/components/drawer/DrawerFooter.vue
@@ -0,0 +1,180 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/locale/index.ts b/src/locale/index.ts
index c8785b2..9b85e81 100644
--- a/src/locale/index.ts
+++ b/src/locale/index.ts
@@ -9,6 +9,8 @@ export const translations = {
'zh-CN': zhCn,
}
+export type LocaleKey = keyof typeof translations | null;
+
const polyglot = new Polyglot({
phrases: translations.en
});
@@ -18,7 +20,7 @@ function matchLocale() {
for (const code of languages) {
if (code in translations) {
- return code as keyof typeof translations;
+ return (code as LocaleKey)!;
}
}
@@ -28,7 +30,7 @@ function matchLocale() {
export const defaultLocale = matchLocale()
function updateLocale() {
- let locale: keyof typeof translations | undefined | null = loadConfig()['locale'];
+ let locale: LocaleKey | undefined = loadConfig()['locale'];
if (!locale) {
locale = defaultLocale;