Skip to content

Commit

Permalink
Revert "feat: ファイル名をランダム化する機能を実装"
Browse files Browse the repository at this point in the history
This reverts commit 882d8ed.
  • Loading branch information
hideki0403 committed Jun 1, 2024
1 parent 3e2a94f commit 2944109
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 18 deletions.
2 changes: 0 additions & 2 deletions locales/ja-JP.yml
Original file line number Diff line number Diff line change
Expand Up @@ -999,8 +999,6 @@ enableAutoSensitive: "自動センシティブ判定"
enableAutoSensitiveDescription: "利用可能な場合は、機械学習を利用して自動でメディアにセンシティブフラグを設定します。この機能をオフにしても、サーバーによっては自動で設定されることがあります。"
activeEmailValidationDescription: "ユーザーのメールアドレスのバリデーションを、捨てアドかどうかや実際に通信可能かどうかなどを判定しより積極的に行います。オフにすると単に文字列として正しいかどうかのみチェックされます。"
quickSettings: "クイック設定"
filenameRandomize: "ファイル名をランダム化"
filenameRandomizeDescription: "ファイルのアップロード時にファイル名をランダムな文字列に変更します。以前にアップロードしたファイルのファイル名は変更されません。"
navbar: "ナビゲーションバー"
shuffle: "シャッフル"
account: "アカウント"
Expand Down
5 changes: 0 additions & 5 deletions packages/frontend/src/pages/settings/drive.vue
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,6 @@ SPDX-License-Identifier: AGPL-3.0-only
<template #label>{{ i18n.ts.enableAutoSensitive }}<span class="_beta">{{ i18n.ts.beta }}</span></template>
<template #caption>{{ i18n.ts.enableAutoSensitiveDescription }}</template>
</MkSwitch>
<MkSwitch v-model="filenameRandomize">
<template #label>{{ i18n.ts.filenameRandomize }}<span class="_beta">{{ i18n.ts.originalFeature }}</span></template>
<template #caption>{{ i18n.ts.filenameRandomizeDescription }}</template>
</MkSwitch>
</div>
</FormSection>
</div>
Expand Down Expand Up @@ -100,7 +96,6 @@ const meterStyle = computed(() => {
});

const keepOriginalUploading = computed(defaultStore.makeGetterSetter('keepOriginalUploading'));
const filenameRandomize = computed(defaultStore.makeGetterSetter('filenameRandomize'));

misskeyApi('drive').then(info => {
capacity.value = info.capacity;
Expand Down
5 changes: 0 additions & 5 deletions packages/frontend/src/pages/settings/privacy.vue
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,6 @@ SPDX-License-Identifier: AGPL-3.0-only
{{ i18n.ts.makeExplorable }}
<template #caption>{{ i18n.ts.makeExplorableDescription }}</template>
</MkSwitch>
<MkSwitch v-model="filenameRandomize">
<template #label>{{ i18n.ts.filenameRandomize }}<span class="_beta">{{ i18n.ts.originalFeature }}</span></template>
<template #caption>{{ i18n.ts.filenameRandomizeDescription }}</template>
</MkSwitch>
<MkSwitch v-model="hideFromSupporterPage" @update:modelValue="save()">
<template #label>{{ i18n.ts.hideFromSupporterPage }}<span class="_beta">{{ i18n.ts.originalFeature }}</span></template>
<template #caption>{{ i18n.ts.hideFromSupporterPageDescription }}</template>
Expand Down Expand Up @@ -137,7 +133,6 @@ const defaultNoteLocalOnly = computed(defaultStore.makeGetterSetter('defaultNote
const rememberNoteVisibility = computed(defaultStore.makeGetterSetter('rememberNoteVisibility'));
const rememberReactionAcceptance = computed(defaultStore.makeGetterSetter('rememberReactionAcceptance'));
const keepCw = computed(defaultStore.makeGetterSetter('keepCw'));
const filenameRandomize = computed(defaultStore.makeGetterSetter('filenameRandomize'));

async function reloadAsk() {
const { canceled } = await os.confirm({
Expand Down
3 changes: 1 addition & 2 deletions packages/frontend/src/scripts/upload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

import { reactive, ref } from 'vue';
import * as Misskey from 'misskey-js';
import { v4 as uuid } from 'uuid';
import { readAndCompressImage } from '@misskey-dev/browser-image-resizer';
import { getCompressionConfig } from './upload/compress-config.js';
import { defaultStore } from '@/store.js';
Expand Down Expand Up @@ -46,7 +45,7 @@ export function uploadFile(
reader.onload = async (): Promise<void> => {
const ctx = reactive<Uploading>({
id: id,
name: defaultStore.state.filenameRandomize ? uuid() : name ?? file.name ?? 'untitled',
name: name ?? file.name ?? 'untitled',
progressMax: undefined,
progressValue: undefined,
img: window.URL.createObjectURL(file),
Expand Down
4 changes: 0 additions & 4 deletions packages/frontend/src/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,10 +141,6 @@ export const defaultStore = markRaw(new Storage('base', {
where: 'account',
default: false,
},
filenameRandomize: {
where: 'account',
default: false,
},
memo: {
where: 'account',
default: null as null | string | Record<string, string>,
Expand Down

0 comments on commit 2944109

Please sign in to comment.