feat: refine announcement (#11497)
* wip * Update read-announcement.ts * wip * wip * wip * Update index.d.ts * wip * Create 1691649257651-refine-announcement.js * wip * wip * wip * wip * wip * wip * Update announcements.vue * wip * wip * Update announcements.vue * wip * Update announcements.vue * wip * Update misskey-js.api.md * Update users.ts * Create MkAnnouncementDialog.stories.impl.ts * wip * wip * Create AnnouncementService.ts
This commit is contained in:
@@ -12,10 +12,15 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||
:class="$style.input"
|
||||
@keydown.enter="toggle"
|
||||
>
|
||||
<XButton :checked="checked" :disabled="disabled" @toggle="toggle" />
|
||||
<XButton :checked="checked" :disabled="disabled" @toggle="toggle"/>
|
||||
<span :class="$style.body">
|
||||
<!-- TODO: 無名slotの方は廃止 -->
|
||||
<span :class="$style.label" @click="toggle"><slot name="label"></slot><slot></slot></span>
|
||||
<span :class="$style.label">
|
||||
<span @click="toggle">
|
||||
<slot name="label"></slot><slot></slot>
|
||||
</span>
|
||||
<span v-if="helpText" v-tooltip:dialog="helpText" class="_button _help" :class="$style.help"><i class="ti ti-help-circle"></i></span>
|
||||
</span>
|
||||
<p :class="$style.caption"><slot name="caption"></slot></p>
|
||||
</span>
|
||||
</div>
|
||||
@@ -28,6 +33,7 @@ import XButton from '@/components/MkSwitch.button.vue';
|
||||
const props = defineProps<{
|
||||
modelValue: boolean | Ref<boolean>;
|
||||
disabled?: boolean;
|
||||
helpText?: string;
|
||||
}>();
|
||||
|
||||
const emit = defineEmits<{
|
||||
@@ -38,10 +44,6 @@ const checked = toRefs(props).modelValue;
|
||||
const toggle = () => {
|
||||
if (props.disabled) return;
|
||||
emit('update:modelValue', !checked.value);
|
||||
|
||||
if (!checked.value) {
|
||||
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -98,4 +100,10 @@ const toggle = () => {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
.help {
|
||||
margin-left: 0.5em;
|
||||
font-size: 85%;
|
||||
vertical-align: top;
|
||||
}
|
||||
</style>
|
||||
|
Reference in New Issue
Block a user