Compare commits

..

No commits in common. "3f92fcb96e8eb2768d721434760b2ad1b5889ba1" and "aa0c98adcfa7eadb7efff6365ab4ea6950b7c47c" have entirely different histories.

3 changed files with 2 additions and 39 deletions

View file

@ -833,8 +833,6 @@ quitFullView: "Exit full view"
addDescription: "Add description"
userPagePinTip: "You can display notes here by selecting \"Pin to profile\" from the menu of individual notes."
notSpecifiedMentionWarning: "This note contains mentions of users not included as recipients"
cwAndNonsensitiveFilesWarning: "This note has a content warning but its attachments are not marked as sensitive"
setAllFilesSensitive: "Mark all attachments sensitive"
info: "About"
userInfo: "User information"
unknown: "Unknown"

View file

@ -1,6 +1,6 @@
{
"name": "sharkey",
"version": "2024.3.1+egirls.1",
"version": "2024.3.1+egirls.0",
"codename": "shonk",
"repository": {
"type": "git",

View file

@ -65,7 +65,6 @@ SPDX-License-Identifier: AGPL-3.0-only
</div>
</div>
<MkInfo v-if="hasNotSpecifiedMentions" warn :class="$style.hasNotSpecifiedMentions">{{ i18n.ts.notSpecifiedMentionWarning }} - <button class="_textButton" @click="addMissingMention()">{{ i18n.ts.add }}</button></MkInfo>
<MkInfo v-if="useCw && hasNonsensitiveFiles" warn :class="$style.hasCwAndNonsensitiveFiles ">{{ i18n.ts.cwAndNonsensitiveFilesWarning }} - <button class="_textButton" @click="setAllFilesSensitive()">{{ i18n.ts.setAllFilesSensitive }}</button></MkInfo>
<input v-show="useCw" ref="cwInputEl" v-model="cw" :class="$style.cw" :placeholder="i18n.ts.annotation" @keydown="onKeydown">
<div :class="[$style.textOuter, { [$style.withCw]: useCw }]">
<div v-if="channel" :class="$style.colorBar" :style="{ background: channel.color }"></div>
@ -199,8 +198,6 @@ const autocomplete = ref(null);
const draghover = ref(false);
const quoteId = ref<string | null>(null);
const hasNotSpecifiedMentions = ref(false);
const hasNonsensitiveFiles = ref(false);
watch(files, () => updateNonsensitiveFiles());
const recentHashtags = ref(JSON.parse(miLocalStorage.getItem('hashtags') ?? '[]'));
const imeText = ref('');
const showingOptions = ref(false);
@ -357,8 +354,6 @@ if (defaultStore.state.keepCw && props.reply && props.reply.cw) {
cw.value = props.reply.cw;
}
hasNonsensitiveFiles.value = files.value.length !== 0 && files.value.some((file) => !file.isSensitive);
function watchForDraft() {
watch(text, () => saveDraft());
watch(useCw, () => saveDraft());
@ -423,10 +418,6 @@ function focus() {
}
}
function updateNonsensitiveFiles() {
hasNonsensitiveFiles.value = files.value.length !== 0 && files.value.some((file) => !file.isSensitive);
}
function chooseFileFrom(ev) {
if (props.mock) return;
@ -435,14 +426,10 @@ function chooseFileFrom(ev) {
files.value.push(file);
}
});
updateNonsensitiveFiles();
}
function detachFile(id) {
files.value = files.value.filter(x => x.id !== id);
updateNonsensitiveFiles();
}
function updateFileSensitive(file, sensitive) {
@ -450,20 +437,14 @@ function updateFileSensitive(file, sensitive) {
emit('fileChangeSensitive', file.id, sensitive);
}
files.value[files.value.findIndex(x => x.id === file.id)].isSensitive = sensitive;
updateNonsensitiveFiles();
}
function updateFileName(file, name) {
files.value[files.value.findIndex(x => x.id === file.id)].name = name;
updateNonsensitiveFiles();
}
function replaceFile(file: Misskey.entities.DriveFile, newFile: Misskey.entities.DriveFile): void {
files.value[files.value.findIndex(x => x.id === file.id)] = newFile;
updateNonsensitiveFiles();
}
function upload(file: File, name?: string): void {
@ -471,25 +452,9 @@ function upload(file: File, name?: string): void {
uploadFile(file, defaultStore.state.uploadFolder, name).then(res => {
files.value.push(res);
updateNonsensitiveFiles();
});
}
function setAllFilesSensitive() {
for (let file of files.value.values()) {
console.log(file, file.isSensitive);
if (!file.isSensitive) {
misskeyApi('drive/files/update', {
fileId: file.id,
isSensitive: true,
}).then((file) => {
console.log(file.id);
updateFileSensitive(file, file.isSensitive);
});
}
}
}
function setVisibility() {
if (props.channel) {
visibility.value = 'public';
@ -1233,7 +1198,7 @@ defineExpose({
background: var(--X4);
}
.hasNotSpecifiedMentions, .hasCwAndNonsensitiveFiles {
.hasNotSpecifiedMentions {
margin: 0 20px 16px 20px;
}