mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-23 18:37:30 -07:00
fix #2266
This commit is contained in:
parent
7797c38191
commit
320f657712
4 changed files with 15 additions and 7 deletions
|
@ -44,7 +44,12 @@ import Vue from 'vue';
|
||||||
import * as anime from 'animejs';
|
import * as anime from 'animejs';
|
||||||
|
|
||||||
export default Vue.extend({
|
export default Vue.extend({
|
||||||
props: ['source', 'compact', 'v'],
|
data() {
|
||||||
|
return {
|
||||||
|
v: this.$store.state.device.visibility
|
||||||
|
}
|
||||||
|
},
|
||||||
|
props: ['source', 'compact'],
|
||||||
mounted() {
|
mounted() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
const popover = this.$refs.popover as any;
|
const popover = this.$refs.popover as any;
|
||||||
|
@ -92,6 +97,7 @@ export default Vue.extend({
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
choose(visibility) {
|
choose(visibility) {
|
||||||
|
this.$store.commit('device/setVisibility', visibility);
|
||||||
this.$emit('chosen', visibility);
|
this.$emit('chosen', visibility);
|
||||||
this.$destroy();
|
this.$destroy();
|
||||||
},
|
},
|
||||||
|
|
|
@ -99,7 +99,7 @@ export default Vue.extend({
|
||||||
useCw: false,
|
useCw: false,
|
||||||
cw: null,
|
cw: null,
|
||||||
geo: null,
|
geo: null,
|
||||||
visibility: 'public',
|
visibility: this.$store.state.device.visibility,
|
||||||
visibleUsers: [],
|
visibleUsers: [],
|
||||||
autocomplete: null,
|
autocomplete: null,
|
||||||
draghover: false,
|
draghover: false,
|
||||||
|
@ -326,8 +326,7 @@ export default Vue.extend({
|
||||||
|
|
||||||
setVisibility() {
|
setVisibility() {
|
||||||
const w = (this as any).os.new(MkVisibilityChooser, {
|
const w = (this as any).os.new(MkVisibilityChooser, {
|
||||||
source: this.$refs.visibilityButton,
|
source: this.$refs.visibilityButton
|
||||||
v: this.visibility
|
|
||||||
});
|
});
|
||||||
w.$once('chosen', v => {
|
w.$once('chosen', v => {
|
||||||
this.visibility = v;
|
this.visibility = v;
|
||||||
|
|
|
@ -94,7 +94,7 @@ export default Vue.extend({
|
||||||
files: [],
|
files: [],
|
||||||
poll: false,
|
poll: false,
|
||||||
geo: null,
|
geo: null,
|
||||||
visibility: 'public',
|
visibility: this.$store.state.device.visibility,
|
||||||
visibleUsers: [],
|
visibleUsers: [],
|
||||||
useCw: false,
|
useCw: false,
|
||||||
cw: null,
|
cw: null,
|
||||||
|
@ -240,8 +240,7 @@ export default Vue.extend({
|
||||||
setVisibility() {
|
setVisibility() {
|
||||||
const w = (this as any).os.new(MkVisibilityChooser, {
|
const w = (this as any).os.new(MkVisibilityChooser, {
|
||||||
source: this.$refs.visibilityButton,
|
source: this.$refs.visibilityButton,
|
||||||
compact: true,
|
compact: true
|
||||||
v: this.visibility
|
|
||||||
});
|
});
|
||||||
w.$once('chosen', v => {
|
w.$once('chosen', v => {
|
||||||
this.visibility = v;
|
this.visibility = v;
|
||||||
|
|
|
@ -110,6 +110,10 @@ export default (os: MiOS) => new Vuex.Store({
|
||||||
src: x.src,
|
src: x.src,
|
||||||
arg: x.arg
|
arg: x.arg
|
||||||
};
|
};
|
||||||
|
},
|
||||||
|
|
||||||
|
setVisibility(state, visibility) {
|
||||||
|
state.visibility = visibility;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue