summaryrefslogtreecommitdiff
path: root/src/client/components/cw-button.vue
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2021-11-12 02:02:25 +0900
committersyuilo <Syuilotan@yahoo.co.jp>2021-11-12 02:02:25 +0900
commit0e4a111f81cceed275d9bec2695f6e401fb654d8 (patch)
tree40874799472fa07416f17b50a398ac33b7771905 /src/client/components/cw-button.vue
parentupdate deps (diff)
downloadmisskey-0e4a111f81cceed275d9bec2695f6e401fb654d8.tar.gz
misskey-0e4a111f81cceed275d9bec2695f6e401fb654d8.tar.bz2
misskey-0e4a111f81cceed275d9bec2695f6e401fb654d8.zip
refactoring
Resolve #7779
Diffstat (limited to 'src/client/components/cw-button.vue')
-rw-r--r--src/client/components/cw-button.vue70
1 files changed, 0 insertions, 70 deletions
diff --git a/src/client/components/cw-button.vue b/src/client/components/cw-button.vue
deleted file mode 100644
index 3a172f5d5e..0000000000
--- a/src/client/components/cw-button.vue
+++ /dev/null
@@ -1,70 +0,0 @@
-<template>
-<button class="nrvgflfu _button" @click="toggle">
- <b>{{ modelValue ? $ts._cw.hide : $ts._cw.show }}</b>
- <span v-if="!modelValue">{{ label }}</span>
-</button>
-</template>
-
-<script lang="ts">
-import { defineComponent } from 'vue';
-import { length } from 'stringz';
-import { concat } from '../../prelude/array';
-
-export default defineComponent({
- props: {
- modelValue: {
- type: Boolean,
- required: true
- },
- note: {
- type: Object,
- required: true
- }
- },
-
- computed: {
- label(): string {
- return concat([
- this.note.text ? [this.$t('_cw.chars', { count: length(this.note.text) })] : [],
- this.note.files && this.note.files.length !== 0 ? [this.$t('_cw.files', { count: this.note.files.length }) ] : [],
- this.note.poll != null ? [this.$ts.poll] : []
- ] as string[][]).join(' / ');
- }
- },
-
- methods: {
- length,
-
- toggle() {
- this.$emit('update:modelValue', !this.modelValue);
- }
- }
-});
-</script>
-
-<style lang="scss" scoped>
-.nrvgflfu {
- display: inline-block;
- padding: 4px 8px;
- font-size: 0.7em;
- color: var(--cwFg);
- background: var(--cwBg);
- border-radius: 2px;
-
- &:hover {
- background: var(--cwHoverBg);
- }
-
- > span {
- margin-left: 4px;
-
- &:before {
- content: '(';
- }
-
- &:after {
- content: ')';
- }
- }
-}
-</style>