mirror of
https://iceshrimp.dev/crimekillz/iceshrimp-161sh.git
synced 2024-11-23 04:33:50 +01:00
commit
5054201636
@ -44,7 +44,12 @@ import Vue from 'vue';
|
||||
import * as anime from 'animejs';
|
||||
|
||||
export default Vue.extend({
|
||||
props: ['source', 'compact', 'v'],
|
||||
data() {
|
||||
return {
|
||||
v: this.$store.state.device.visibility
|
||||
}
|
||||
},
|
||||
props: ['source', 'compact'],
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
const popover = this.$refs.popover as any;
|
||||
@ -92,6 +97,7 @@ export default Vue.extend({
|
||||
},
|
||||
methods: {
|
||||
choose(visibility) {
|
||||
this.$store.commit('device/setVisibility', visibility);
|
||||
this.$emit('chosen', visibility);
|
||||
this.$destroy();
|
||||
},
|
||||
|
@ -99,7 +99,7 @@ export default Vue.extend({
|
||||
useCw: false,
|
||||
cw: null,
|
||||
geo: null,
|
||||
visibility: 'public',
|
||||
visibility: this.$store.state.device.visibility || 'public',
|
||||
visibleUsers: [],
|
||||
autocomplete: null,
|
||||
draghover: false,
|
||||
@ -326,8 +326,7 @@ export default Vue.extend({
|
||||
|
||||
setVisibility() {
|
||||
const w = (this as any).os.new(MkVisibilityChooser, {
|
||||
source: this.$refs.visibilityButton,
|
||||
v: this.visibility
|
||||
source: this.$refs.visibilityButton
|
||||
});
|
||||
w.$once('chosen', v => {
|
||||
this.visibility = v;
|
||||
|
@ -94,7 +94,7 @@ export default Vue.extend({
|
||||
files: [],
|
||||
poll: false,
|
||||
geo: null,
|
||||
visibility: 'public',
|
||||
visibility: this.$store.state.device.visibility || 'public',
|
||||
visibleUsers: [],
|
||||
useCw: false,
|
||||
cw: null,
|
||||
@ -240,8 +240,7 @@ export default Vue.extend({
|
||||
setVisibility() {
|
||||
const w = (this as any).os.new(MkVisibilityChooser, {
|
||||
source: this.$refs.visibilityButton,
|
||||
compact: true,
|
||||
v: this.visibility
|
||||
compact: true
|
||||
});
|
||||
w.$once('chosen', v => {
|
||||
this.visibility = v;
|
||||
|
@ -110,6 +110,10 @@ export default (os: MiOS) => new Vuex.Store({
|
||||
src: x.src,
|
||||
arg: x.arg
|
||||
};
|
||||
},
|
||||
|
||||
setVisibility(state, visibility) {
|
||||
state.visibility = visibility;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user