wip
This commit is contained in:
parent
b31caeb7ca
commit
b2d9674627
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<x-popup :source="source" ref="popup" @closed="() => { $emit('closed'); destroyDom(); }">
|
<XModal :source="source" ref="popup" @closed="() => { $emit('closed'); destroyDom(); }">
|
||||||
<div class="omfetrab">
|
<div class="omfetrab">
|
||||||
<header>
|
<header>
|
||||||
<button v-for="(category, i) in categories"
|
<button v-for="(category, i) in categories"
|
||||||
|
@ -59,7 +59,7 @@
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</x-popup>
|
</XModal>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
|
@ -69,11 +69,11 @@ import { getStaticImageUrl } from '../scripts/get-static-image-url';
|
||||||
import { faAsterisk, faLeaf, faUtensils, faFutbol, faCity, faDice, faGlobe, faHistory, faUser } from '@fortawesome/free-solid-svg-icons';
|
import { faAsterisk, faLeaf, faUtensils, faFutbol, faCity, faDice, faGlobe, faHistory, faUser } from '@fortawesome/free-solid-svg-icons';
|
||||||
import { faHeart, faFlag, faLaugh } from '@fortawesome/free-regular-svg-icons';
|
import { faHeart, faFlag, faLaugh } from '@fortawesome/free-regular-svg-icons';
|
||||||
import { groupByX } from '../../prelude/array';
|
import { groupByX } from '../../prelude/array';
|
||||||
import XPopup from './popup.vue';
|
import XModal from './modal.vue';
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
components: {
|
components: {
|
||||||
XPopup,
|
XModal,
|
||||||
},
|
},
|
||||||
|
|
||||||
props: {
|
props: {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<x-modal :source="source" :no-center="noCenter" ref="popup" @click="" @closed="$store.commit('removeMenu', id)" :showing="showing">
|
<x-modal :source="source" :no-center="noCenter" ref="popup" @click="close()" @closed="$store.commit('removeMenu', id)" :showing="showing">
|
||||||
<div class="rrevdjwt" :class="{ left: align === 'left' }" ref="items" :style="{ width: width + 'px' }">
|
<div class="rrevdjwt" :class="{ left: align === 'left' }" ref="items" :style="{ width: width + 'px' }">
|
||||||
<template v-for="(item, i) in items.filter(item => item !== undefined)">
|
<template v-for="(item, i) in items.filter(item => item !== undefined)">
|
||||||
<div v-if="item === null" class="divider" :key="i"></div>
|
<div v-if="item === null" class="divider" :key="i"></div>
|
||||||
|
@ -43,6 +43,9 @@ export default defineComponent({
|
||||||
XModal
|
XModal
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
|
id: {
|
||||||
|
required: true
|
||||||
|
},
|
||||||
source: {
|
source: {
|
||||||
required: true
|
required: true
|
||||||
},
|
},
|
||||||
|
@ -98,7 +101,8 @@ export default defineComponent({
|
||||||
this.close();
|
this.close();
|
||||||
},
|
},
|
||||||
close() {
|
close() {
|
||||||
this.$refs.popup.close();
|
this.showing = false;
|
||||||
|
this.$store.commit('menuDone', { id: this.id });
|
||||||
},
|
},
|
||||||
focusUp() {
|
focusUp() {
|
||||||
focusPrev(document.activeElement);
|
focusPrev(document.activeElement);
|
||||||
|
|
|
@ -1,23 +1,23 @@
|
||||||
<template>
|
<template>
|
||||||
<x-popup :source="source" ref="popup" @closed="() => { $emit('closed'); destroyDom(); }" v-hotkey.global="keymap">
|
<XModal :source="source" ref="popup" @closed="() => { $emit('closed'); destroyDom(); }" v-hotkey.global="keymap">
|
||||||
<div class="rdfaahpb">
|
<div class="rdfaahpb">
|
||||||
<div class="buttons" ref="buttons" :class="{ showFocus }">
|
<div class="buttons" ref="buttons" :class="{ showFocus }">
|
||||||
<button class="_button" v-for="(reaction, i) in rs" :key="reaction" @click="react(reaction)" :tabindex="i + 1" :title="reaction" v-particle><x-reaction-icon :reaction="reaction"/></button>
|
<button class="_button" v-for="(reaction, i) in rs" :key="reaction" @click="react(reaction)" :tabindex="i + 1" :title="reaction" v-particle><x-reaction-icon :reaction="reaction"/></button>
|
||||||
</div>
|
</div>
|
||||||
<input class="text" v-model.trim="text" :placeholder="$t('enterEmoji')" @keyup.enter="reactText" @input="tryReactText" v-autocomplete="{ model: 'text' }">
|
<input class="text" v-model.trim="text" :placeholder="$t('enterEmoji')" @keyup.enter="reactText" @input="tryReactText" v-autocomplete="{ model: 'text' }">
|
||||||
</div>
|
</div>
|
||||||
</x-popup>
|
</XModal>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { defineComponent } from 'vue';
|
import { defineComponent } from 'vue';
|
||||||
import { emojiRegex } from '../../misc/emoji-regex';
|
import { emojiRegex } from '../../misc/emoji-regex';
|
||||||
import XReactionIcon from './reaction-icon.vue';
|
import XReactionIcon from './reaction-icon.vue';
|
||||||
import XPopup from './popup.vue';
|
import XModal from './modal.vue';
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
components: {
|
components: {
|
||||||
XPopup,
|
XModal,
|
||||||
XReactionIcon,
|
XReactionIcon,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<x-popup :source="source" ref="popup" @closed="closed">
|
<XModal :source="source" ref="popup" @closed="closed">
|
||||||
<div class="gqyayizv">
|
<div class="gqyayizv">
|
||||||
<button class="_button" @click="choose('public')" :class="{ active: v == 'public' }" data-index="1" key="public">
|
<button class="_button" @click="choose('public')" :class="{ active: v == 'public' }" data-index="1" key="public">
|
||||||
<div><fa :icon="faGlobe"/></div>
|
<div><fa :icon="faGlobe"/></div>
|
||||||
|
@ -39,18 +39,18 @@
|
||||||
<div><fa :icon="localOnly ? faToggleOn : faToggleOff"/></div>
|
<div><fa :icon="localOnly ? faToggleOn : faToggleOff"/></div>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</x-popup>
|
</XModal>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { defineComponent } from 'vue';
|
import { defineComponent } from 'vue';
|
||||||
import { faGlobe, faUnlock, faHome, faBiohazard, faToggleOn, faToggleOff } from '@fortawesome/free-solid-svg-icons';
|
import { faGlobe, faUnlock, faHome, faBiohazard, faToggleOn, faToggleOff } from '@fortawesome/free-solid-svg-icons';
|
||||||
import { faEnvelope } from '@fortawesome/free-regular-svg-icons';
|
import { faEnvelope } from '@fortawesome/free-regular-svg-icons';
|
||||||
import XPopup from './popup.vue';
|
import XModal from './modal.vue';
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
components: {
|
components: {
|
||||||
XPopup
|
XModal
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
source: {
|
source: {
|
||||||
|
|
|
@ -282,6 +282,15 @@ export const store = createStore({
|
||||||
state.menus.push(menu);
|
state.menus.push(menu);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
menuDone(state, { id: menuId }) {
|
||||||
|
const menu = state.menus.find(d => d.id === menuId);
|
||||||
|
menu.result = 'hoge';
|
||||||
|
},
|
||||||
|
|
||||||
|
removeMenu(state, menuId) {
|
||||||
|
state.menus = state.menus.filter(d => d.id !== menuId);
|
||||||
|
},
|
||||||
|
|
||||||
setPostForm(state, postForm) {
|
setPostForm(state, postForm) {
|
||||||
if (state.postForm != null && postForm != null) return;
|
if (state.postForm != null && postForm != null) return;
|
||||||
state.postForm = postForm;
|
state.postForm = postForm;
|
||||||
|
|
Loading…
Reference in New Issue