client: fix attached files and account switcher combination
All checks were successful
ci/woodpecker/push/lint-backend Pipeline was successful
ci/woodpecker/push/lint-client Pipeline was successful
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/lint-foundkey-js Pipeline was successful
ci/woodpecker/push/lint-sw Pipeline was successful
ci/woodpecker/push/test Pipeline was successful
All checks were successful
ci/woodpecker/push/lint-backend Pipeline was successful
ci/woodpecker/push/lint-client Pipeline was successful
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/lint-foundkey-js Pipeline was successful
ci/woodpecker/push/lint-sw Pipeline was successful
ci/woodpecker/push/test Pipeline was successful
fixes #342 Changelog: Fixed
This commit is contained in:
parent
0db3f1f8ed
commit
0cf8f78e23
2 changed files with 16 additions and 2 deletions
|
@ -710,6 +710,8 @@ botProtection: "Bot Protection"
|
|||
instanceBlocking: "Blocked Instances"
|
||||
selectAccount: "Select account"
|
||||
switchAccount: "Switch account"
|
||||
cannotAttachFileWhenAccountSwitched: "You cannot attach a file while switched to another account."
|
||||
cannotSwitchAccountWhenFileAttached: "You cannot switch accounts while files are attached."
|
||||
enabled: "Enabled"
|
||||
disabled: "Disabled"
|
||||
quickAction: "Quick actions"
|
||||
|
|
|
@ -7,7 +7,12 @@
|
|||
>
|
||||
<header>
|
||||
<button v-if="!fixed" class="cancel _button" @click="cancel"><i class="fas fa-times"></i></button>
|
||||
<button v-tooltip="i18n.ts.switchAccount" class="account _button" @click="openAccountMenu">
|
||||
<button
|
||||
v-tooltip="files.length > 0 ? i18n.ts.cannotSwitchAccountWhenFileAttached : i18n.ts.switchAccount"
|
||||
:disabled="files.length > 0"
|
||||
class="account _button"
|
||||
@click="openAccountMenu"
|
||||
>
|
||||
<MkAvatar :user="postAccount ?? $i" class="avatar"/>
|
||||
</button>
|
||||
<div>
|
||||
|
@ -45,7 +50,14 @@
|
|||
<XPollEditor v-if="poll" v-model="poll" @destroyed="poll = null"/>
|
||||
<XNotePreview v-if="showPreview" class="preview" :text="text"/>
|
||||
<footer>
|
||||
<button v-tooltip="i18n.ts.attachFile" class="_button" @click="chooseFileFrom"><i class="fas fa-photo-video"></i></button>
|
||||
<button
|
||||
v-tooltip="postAccount != null ? i18n.ts.cannotAttachFileWhenAccountSwitched : i18n.ts.attachFile"
|
||||
:disabled="postAccount != null"
|
||||
class="_button"
|
||||
@click="chooseFileFrom"
|
||||
>
|
||||
<i class="fas fa-photo-video"></i>
|
||||
</button>
|
||||
<button v-tooltip="i18n.ts.poll" class="_button" :class="{ active: poll }" @click="togglePoll"><i class="fas fa-poll-h"></i></button>
|
||||
<button v-tooltip="i18n.ts.useCw" class="_button" :class="{ active: useCw }" @click="useCw = !useCw"><i class="fas fa-eye-slash"></i></button>
|
||||
<button v-tooltip="i18n.ts.mention" class="_button" @click="insertMention"><i class="fas fa-at"></i></button>
|
||||
|
|
Loading…
Reference in a new issue