summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2023-05-30 14:34:55 +0900
committersyuilo <Syuilotan@yahoo.co.jp>2023-05-30 14:34:55 +0900
commita3a47b8d35d1f563cfadf87ce077a24cf3bf7cb1 (patch)
tree253dd0c6ca2c73601b2a00d97c0b8cf9288240b0
parentrefactor (diff)
downloadsharkey-a3a47b8d35d1f563cfadf87ce077a24cf3bf7cb1.tar.gz
sharkey-a3a47b8d35d1f563cfadf87ce077a24cf3bf7cb1.tar.bz2
sharkey-a3a47b8d35d1f563cfadf87ce077a24cf3bf7cb1.zip
:art:
-rw-r--r--packages/frontend/src/components/MkMediaImage.vue40
-rw-r--r--packages/frontend/src/components/MkPostFormAttaches.vue2
-rw-r--r--packages/frontend/src/scripts/get-drive-file-menu.ts2
3 files changed, 16 insertions, 28 deletions
diff --git a/packages/frontend/src/components/MkMediaImage.vue b/packages/frontend/src/components/MkMediaImage.vue
index c1f8ab3a67..b21776eb49 100644
--- a/packages/frontend/src/components/MkMediaImage.vue
+++ b/packages/frontend/src/components/MkMediaImage.vue
@@ -32,7 +32,6 @@
<div v-if="image.comment" :class="$style.indicator">ALT</div>
<div v-if="image.isSensitive" :class="$style.indicator" style="color: var(--warn);">NSFW</div>
</div>
- <button v-tooltip="i18n.ts.hide" :class="$style.hide" class="_button" @click.stop.prevent="hide = true"><i class="ti ti-eye-off"></i></button>
<button :class="$style.menu" class="_button" @click.stop="showMenu"><i class="ti ti-dots"></i></button>
</template>
</div>
@@ -79,10 +78,16 @@ watch(() => props.image, () => {
});
function showMenu(ev: MouseEvent) {
- os.popupMenu([...(iAmModerator ? [{
- text: i18n.ts.markAsSensitive,
+ os.popupMenu([{
+ text: i18n.ts.hide,
icon: 'ti ti-eye-off',
action: () => {
+ hide = true;
+ },
+ }, ...(iAmModerator ? [{
+ text: i18n.ts.markAsSensitive,
+ icon: 'ti ti-eye-exclamation',
+ action: () => {
os.apiWithDialog('drive/files/update', { fileId: props.image.id, isSensitive: true });
},
}] : [])], ev.currentTarget ?? ev.target);
@@ -122,21 +127,6 @@ function showMenu(ev: MouseEvent) {
background-size: 16px 16px;
}
-.hide {
- display: block;
- position: absolute;
- border-radius: 6px;
- background-color: var(--accentedBg);
- -webkit-backdrop-filter: var(--blur, blur(15px));
- backdrop-filter: var(--blur, blur(15px));
- color: var(--accent);
- font-size: 0.8em;
- padding: 6px 8px;
- text-align: center;
- top: 12px;
- right: 12px;
-}
-
.menu {
display: block;
position: absolute;
@@ -148,8 +138,8 @@ function showMenu(ev: MouseEvent) {
font-size: 0.8em;
padding: 6px 8px;
text-align: center;
- bottom: 12px;
- right: 12px;
+ bottom: 10px;
+ right: 10px;
}
.imageContainer {
@@ -166,12 +156,10 @@ function showMenu(ev: MouseEvent) {
.indicators {
display: inline-flex;
position: absolute;
- top: 12px;
- left: 12px;
- text-align: center;
+ top: 10px;
+ left: 10px;
pointer-events: none;
opacity: .5;
- font-size: 14px;
gap: 6px;
}
@@ -182,7 +170,7 @@ function showMenu(ev: MouseEvent) {
color: var(--accentLighten);
display: inline-block;
font-weight: bold;
- font-size: 12px;
- padding: 2px 6px;
+ font-size: 0.8em;
+ padding: 2px 5px;
}
</style>
diff --git a/packages/frontend/src/components/MkPostFormAttaches.vue b/packages/frontend/src/components/MkPostFormAttaches.vue
index ee4d439cc3..18fa142ebc 100644
--- a/packages/frontend/src/components/MkPostFormAttaches.vue
+++ b/packages/frontend/src/components/MkPostFormAttaches.vue
@@ -93,7 +93,7 @@ function showFileMenu(file, ev: MouseEvent) {
action: () => { rename(file); },
}, {
text: file.isSensitive ? i18n.ts.unmarkAsSensitive : i18n.ts.markAsSensitive,
- icon: file.isSensitive ? 'ti ti-eye-off' : 'ti ti-eye',
+ icon: file.isSensitive ? 'ti ti-eye-exclamation' : 'ti ti-eye',
action: () => { toggleSensitive(file); },
}, {
text: i18n.ts.describeFile,
diff --git a/packages/frontend/src/scripts/get-drive-file-menu.ts b/packages/frontend/src/scripts/get-drive-file-menu.ts
index ed01b49054..060c8a1a11 100644
--- a/packages/frontend/src/scripts/get-drive-file-menu.ts
+++ b/packages/frontend/src/scripts/get-drive-file-menu.ts
@@ -73,7 +73,7 @@ export function getDriveFileMenu(file: Misskey.entities.DriveFile) {
action: () => rename(file),
}, {
text: file.isSensitive ? i18n.ts.unmarkAsSensitive : i18n.ts.markAsSensitive,
- icon: file.isSensitive ? 'ti ti-eye' : 'ti ti-eye-off',
+ icon: file.isSensitive ? 'ti ti-eye' : 'ti ti-eye-exclamation',
action: () => toggleSensitive(file),
}, {
text: i18n.ts.describeFile,