style: move post schedule button inside "more!" menu
This commit is contained in:
parent
0cdf8dbcda
commit
cb0676ff5a
1 changed files with 32 additions and 34 deletions
|
@ -54,15 +54,6 @@
|
||||||
><i :class="icon('ph-eye-slash')"></i
|
><i :class="icon('ph-eye-slash')"></i
|
||||||
></span>
|
></span>
|
||||||
</button>
|
</button>
|
||||||
<button
|
|
||||||
v-if="editId == null"
|
|
||||||
v-tooltip="i18n.ts.scheduledPost"
|
|
||||||
class="_button schedule"
|
|
||||||
:class="{ active: scheduledAt }"
|
|
||||||
@click="setScheduledAt"
|
|
||||||
>
|
|
||||||
<i :class="icon('ph-clock')"></i>
|
|
||||||
</button>
|
|
||||||
<button
|
<button
|
||||||
ref="languageButton"
|
ref="languageButton"
|
||||||
v-tooltip="i18n.ts.language"
|
v-tooltip="i18n.ts.language"
|
||||||
|
@ -265,13 +256,12 @@
|
||||||
>
|
>
|
||||||
<i :class="icon('ph-plug')"></i>
|
<i :class="icon('ph-plug')"></i>
|
||||||
</button>
|
</button>
|
||||||
<!-- v-if="showMfmCheatsheet" -->
|
|
||||||
<button
|
<button
|
||||||
v-tooltip="i18n.ts._mfm.cheatSheet"
|
v-tooltip="i18n.ts.more"
|
||||||
class="_button right"
|
class="_button"
|
||||||
@click="openCheatSheet"
|
@click="showMoreMenu"
|
||||||
>
|
>
|
||||||
<i :class="icon('ph-question')"></i>
|
<i :class="icon('ph-dots-three-outline')"></i>
|
||||||
</button>
|
</button>
|
||||||
<div v-if="showBigPostButton">
|
<div v-if="showBigPostButton">
|
||||||
<button
|
<button
|
||||||
|
@ -553,7 +543,7 @@ if (
|
||||||
(props.reply.user.host != null && props.reply.user.host !== host))
|
(props.reply.user.host != null && props.reply.user.host !== host))
|
||||||
) {
|
) {
|
||||||
text.value = `@${props.reply.user.username}${
|
text.value = `@${props.reply.user.username}${
|
||||||
props.reply.user.host != null ? "@" + toASCII(props.reply.user.host) : ""
|
props.reply.user.host != null ? `@${toASCII(props.reply.user.host)}` : ""
|
||||||
} `;
|
} `;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -782,7 +772,7 @@ function setVisibility() {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
async function setScheduledAt() {
|
async function setSchedule() {
|
||||||
function getDateStr(type: "date" | "time", value: number) {
|
function getDateStr(type: "date" | "time", value: number) {
|
||||||
const tmp = document.createElement("input");
|
const tmp = document.createElement("input");
|
||||||
tmp.type = type;
|
tmp.type = type;
|
||||||
|
@ -1320,10 +1310,32 @@ async function insertEmoji(ev: MouseEvent) {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
async function openCheatSheet(ev: MouseEvent) {
|
async function openCheatSheet(_ev: MouseEvent) {
|
||||||
os.popup(XCheatSheet, {}, {}, "closed");
|
os.popup(XCheatSheet, {}, {}, "closed");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function showMoreMenu(ev: MouseEvent) {
|
||||||
|
os.popupMenu(
|
||||||
|
[
|
||||||
|
{
|
||||||
|
type: "button",
|
||||||
|
text: i18n.ts.scheduledPost,
|
||||||
|
icon: `${icon("ph-clock")}`,
|
||||||
|
accent: scheduledAt.value != null,
|
||||||
|
hidden: props.editId != null,
|
||||||
|
action: setSchedule,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: "button",
|
||||||
|
text: i18n.ts._mfm.cheatSheet,
|
||||||
|
icon: `${icon("ph-question")}`,
|
||||||
|
action: openCheatSheet,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
(ev.currentTarget ?? ev.target) as HTMLElement,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
function showActions(ev: MouseEvent) {
|
function showActions(ev: MouseEvent) {
|
||||||
os.popupMenu(
|
os.popupMenu(
|
||||||
postFormActions.map((action) => ({
|
postFormActions.map((action) => ({
|
||||||
|
@ -1482,14 +1494,6 @@ onMounted(() => {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
||||||
> .schedule {
|
|
||||||
width: 34px;
|
|
||||||
height: 34px;
|
|
||||||
&.active {
|
|
||||||
color: var(--accent);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
> .text-count {
|
> .text-count {
|
||||||
opacity: 0.7;
|
opacity: 0.7;
|
||||||
line-height: 66px;
|
line-height: 66px;
|
||||||
|
@ -1695,7 +1699,7 @@ onMounted(() => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&.max-width_500px {
|
&.max-width_500px, &.widget {
|
||||||
> header {
|
> header {
|
||||||
height: 50px;
|
height: 50px;
|
||||||
|
|
||||||
|
@ -1732,17 +1736,11 @@ onMounted(() => {
|
||||||
|
|
||||||
> footer {
|
> footer {
|
||||||
padding: 0 8px 8px 8px;
|
padding: 0 8px 8px 8px;
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
&.max-width_310px {
|
|
||||||
> .form {
|
|
||||||
> footer {
|
|
||||||
> button {
|
> button {
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
width: 44px;
|
width: 42px;
|
||||||
height: 44px;
|
height: 42px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue