diff --git a/frontend/src/views/Share.vue b/frontend/src/views/Share.vue
index 0bbf6436..b033461f 100644
--- a/frontend/src/views/Share.vue
+++ b/frontend/src/views/Share.vue
@@ -77,7 +77,7 @@
style="
position: -webkit-sticky;
position: sticky;
- top:-20.6em;
+ top:-20.5em;
z-index:999;"
>
@@ -192,8 +219,9 @@
-
-
-
-
+ {{ req.items.length - showLimit }}
-
-
+
+
({
error: null,
- showLimit: 100,
password: "",
attemptedPasswordLogin: false,
hash: null,
token: null,
clip: null,
tag: false,
+ loopMode: "once",
}),
watch: {
$route: function () {
- this.showLimit = 100;
this.fetchData();
},
@@ -337,7 +357,7 @@ export default {
},
},
methods: {
- ...mapMutations(["resetSelected", "updateRequest", "setLoading"]),
+ ...mapMutations(["resetSelected", "updateRequest", "setLoading", "addSelected"]),
base64: function (name) {
return window.btoa(unescape(encodeURIComponent(name)));
},
@@ -351,6 +371,40 @@ export default {
this.tag = true;
}
},
+ switchMusic(switchX) {
+ let i = this.req.items[this.selected[0]].index + switchX
+ while (true) {
+ if(switchX == -1 && i == -1) {
+ i = this.req.items.length + switchX;
+ } else if (switchX == 1 && i == this.req.items.length) {
+ i = 0;
+ }
+ if (this.req.items[i].type == "audio") {
+ this.resetSelected();
+ this.addSelected(i);
+ document.getElementById(i).scrollIntoView({block:"center", behavior:"smooth",});
+ document.getElementById('myaudio').play();
+ this.tag = true;
+ break;
+ }
+ i = i + switchX;
+ }
+ },
+ switchLoopMode() {
+ if (this.loopMode == "once") {
+ this.loopMode = "singleLoop";
+ } else if (this.loopMode == "singleLoop") {
+ this.loopMode = "listLoop";
+ } else {
+ this.loopMode = "once";
+ }
+ console.log(this.loopMode);
+ },
+ playEnd() {
+ if (this.loopMode == "singleLoop") document.getElementById('myaudio').play();
+ if (this.loopMode == "listLoop") this.switchMusic(1);
+ },
+
fetchData: async function () {
// Reset view information.
this.$store.commit("setReload", false);
@@ -443,11 +497,22 @@ export default {
#listing.list{
height: auto;
}
+ @media (max-width: 736px) {
+ header {
+ height: 3.5em;
+ }
+ }
+
+
+