Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
sapphi-red committed Sep 22, 2020
1 parent c6442c1 commit 3ae8aa2
Show file tree
Hide file tree
Showing 8 changed files with 47 additions and 39 deletions.
3 changes: 3 additions & 0 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
</strong>
</noscript>
<div id="app"></div>
<div id="sidebar-opener"></div>
<div id="stamp-picker"></div>
<div id="message-menu-popup"></div>
<!-- built files will be auto injected -->
</body>
</html>
2 changes: 1 addition & 1 deletion src/components/Main/MainView/ChannelView/ChannelView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
:channel-id="channelId"
:entry-message-id="entryMessageId"
/>
<teleport v-if="!isSidebarOpen" to="sidebar-opener" :class="$style.opener">
<teleport v-if="!isSidebarOpen" to="#sidebar-opener" :class="$style.opener">
<channel-sidebar-hidden
@open="openSidebar"
:viewer-ids="viewerIds"
Expand Down
37 changes: 20 additions & 17 deletions src/components/Main/MainView/MessageInput/MessageInputTextArea.vue
Original file line number Diff line number Diff line change
@@ -1,21 +1,24 @@
<template>
<textarea-autosize
ref="textareaAutosizeRef"
:class="$style.container"
:value="text"
:readonly="isPosting"
placeholder="メッセージを送信"
rows="1"
:max-height="160"
@input="onInput"
@compositionupdate.native="onCompositionUpdate"
@before-input.native="onBeforeInput"
@keydown.native="onKeyDown"
@keyup.native="onKeyUp"
@focus.native="onFocus"
@blur.native="onBlur"
@paste.native="onPaste"
/>
<div>textarea</div>
<!--
<textarea-autosize
ref="textareaAutosizeRef"
:class="$style.container"
:value="text"
:readonly="isPosting"
placeholder="メッセージを送信"
rows="1"
:max-height="160"
@input="onInput"
@compositionupdate.native="onCompositionUpdate"
@before-input.native="onBeforeInput"
@keydown.native="onKeyDown"
@keyup.native="onKeyUp"
@focus.native="onFocus"
@blur.native="onBlur"
@paste.native="onPaste"
/>
-->
</template>

<script lang="ts">
Expand Down
35 changes: 19 additions & 16 deletions src/components/UI/Slider.vue
Original file line number Diff line number Diff line change
@@ -1,26 +1,29 @@
<template>
<vue-slider
:value="value"
@change="onChange"
:min="min"
:max="max"
:disabled="disabled"
:tooltip="tooltip"
:tooltip-formatter="tooltipFormatter"
:dot-size="12"
/>
<div>slider</div>
<!--
<vue-slider
:value="value"
@change="onChange"
:min="min"
:max="max"
:disabled="disabled"
:tooltip="tooltip"
:tooltip-formatter="tooltipFormatter"
:dot-size="12"
/>
-->
</template>

<script lang="ts">
import { defineComponent, PropType } from 'vue'
import VueSlider from 'vue-slider-component'
import { TooltipFormatter } from 'vue-slider-component/typings/typings'
// import VueSlider from 'vue-slider-component'
// import { TooltipFormatter } from 'vue-slider-component/typings/typings'
export default defineComponent({
name: 'Slider',
components: {
VueSlider
},
// components: {
// VueSlider
// },
props: {
value: {
type: [Number, String] as PropType<number | string>,
Expand All @@ -38,7 +41,7 @@ export default defineComponent({
type: Number,
default: 100
},
tooltipFormatter: [String, Function] as PropType<TooltipFormatter>,
tooltipFormatter: [String, Function], // as PropType<TooltipFormatter>,
tooltip: {
type: String as PropType<
'none' | 'always' | 'hover' | 'focus' | 'active'
Expand Down
4 changes: 2 additions & 2 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import router from './router'
import store from './store'
import boolAttr from './bool-attr'
import vClickOutside from 'v-click-outside'
import VueTextareaAutosize from 'vue-textarea-autosize'
// import VueTextareaAutosize from 'vue-textarea-autosize'
import { setupGlobalFuncs } from './markdown-bridge'
import { loadResizeObserver } from './resizeObserver'

Expand All @@ -21,7 +21,7 @@ import('katex/dist/katex.css')

app.use(boolAttr)
app.use(vClickOutside)
app.use(VueTextareaAutosize)
//app.use(VueTextareaAutosize)

app.mount('#app')

Expand Down
2 changes: 1 addition & 1 deletion src/store/ui/stampPicker/mutations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export const mutations = defineMutations<S>()({
state.selectHandler = (_: SelectedStampData) => {}
},
clearTeleportTargetName(state) {
state.teleportTargetName = ''
state.teleportTargetName = 'stamp-picker'
},
clearCurrentStampPaletteId(state) {
state.currentStampSet = {
Expand Down
2 changes: 1 addition & 1 deletion src/store/ui/stampPicker/state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export interface S {
}

export const state: S = {
teleportTargetName: '', // TODO validにする
teleportTargetName: 'stamp-picker',
selectHandler: defaultSelectHandler,
currentStampSet: {
type: 'history',
Expand Down
1 change: 0 additions & 1 deletion src/views/Main.vue
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
<stamp-picker-container />
<message-tools-menu-container />
<toast-container />
<div :id="teleportTargetName" />
</div>
<div v-else></div>
</template>
Expand Down

0 comments on commit 3ae8aa2

Please sign in to comment.