tweak client

This commit is contained in:
syuilo 2022-06-20 21:05:18 +09:00
parent 8e20e27ff9
commit f995172c5d
2 changed files with 8 additions and 15 deletions

View File

@ -14,9 +14,9 @@
<div class="_formBlock"> <div class="_formBlock">
<MkSwitch v-model="isSensitive" @update:modelValue="toggleIsSensitive">NSFW</MkSwitch> <MkSwitch v-model="isSensitive" @update:modelValue="toggleIsSensitive">NSFW</MkSwitch>
</div> </div>
<div class="_formBlock"> <FormLink class="_formBlock" :to="file.url" :external="true">Open</FormLink>
<MkButton full @click="showUser"><i class="fas fa-external-link-square-alt"></i> {{ $ts.user }}</MkButton> <FormLink class="_formBlock" :to="`/user-info/${file.userId}`">{{ $ts.user }}</FormLink>
</div>
<div class="_formBlock"> <div class="_formBlock">
<MkButton full danger @click="del"><i class="fas fa-trash-alt"></i> {{ $ts.delete }}</MkButton> <MkButton full danger @click="del"><i class="fas fa-trash-alt"></i> {{ $ts.delete }}</MkButton>
</div> </div>
@ -35,6 +35,7 @@ import { computed } from 'vue';
import MkButton from '@/components/ui/button.vue'; import MkButton from '@/components/ui/button.vue';
import MkSwitch from '@/components/form/switch.vue'; import MkSwitch from '@/components/form/switch.vue';
import MkDriveFileThumbnail from '@/components/drive-file-thumbnail.vue'; import MkDriveFileThumbnail from '@/components/drive-file-thumbnail.vue';
import FormLink from '@/components/form/link.vue';
import bytes from '@/filters/bytes'; import bytes from '@/filters/bytes';
import * as os from '@/os'; import * as os from '@/os';
import { i18n } from '@/i18n'; import { i18n } from '@/i18n';
@ -56,10 +57,6 @@ async function fetch() {
fetch(); fetch();
function showUser() {
os.pageWindow(`/user-info/${file.userId}`);
}
async function del() { async function del() {
const { canceled } = await os.confirm({ const { canceled } = await os.confirm({
type: 'warning', type: 'warning',

View File

@ -8,7 +8,9 @@
<MkAvatar class="avatar" :user="user" :show-indicator="true"/> <MkAvatar class="avatar" :user="user" :show-indicator="true"/>
</div> </div>
<FormLink :to="userPage(user)">Profile</FormLink> <FormLink class="_formBlock" :to="userPage(user)">Profile</FormLink>
<FormLink v-if="user.url" class="_formBlock" :to="user.url" :external="true">Profile (remote)</FormLink>
<div class="_formBlock"> <div class="_formBlock">
<MkKeyValue :copy="acct(user)" oneline style="margin: 1em 0;"> <MkKeyValue :copy="acct(user)" oneline style="margin: 1em 0;">
@ -205,13 +207,7 @@ watch(() => user, () => {
}); });
}); });
const headerActions = $computed(() => user && user.url ? [{ const headerActions = $computed(() => []);
text: user.url,
icon: 'fas fa-external-link-alt',
handler: () => {
window.open(user.url, '_blank');
},
}] : []);
const headerTabs = $computed(() => []); const headerTabs = $computed(() => []);