forked from mirrors/misskey
enhance(frontend): IDにUUIDを使うのをやめる (#16138)
* wip * Update flash-edit.vue
This commit is contained in:
@@ -66,7 +66,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { computed, defineAsyncComponent, ref, watch } from 'vue';
|
||||
import { v4 as uuid } from 'uuid';
|
||||
import { genId } from '@/utility/id.js';
|
||||
import MkInput from '@/components/MkInput.vue';
|
||||
import MkSelect from '@/components/MkSelect.vue';
|
||||
import MkButton from '@/components/MkButton.vue';
|
||||
@@ -104,7 +104,7 @@ const type = computed({
|
||||
set: (t) => {
|
||||
if (t === 'and') v.value.values = [];
|
||||
if (t === 'or') v.value.values = [];
|
||||
if (t === 'not') v.value.value = { id: uuid(), type: 'isRemote' };
|
||||
if (t === 'not') v.value.value = { id: genId(), type: 'isRemote' };
|
||||
if (t === 'roleAssignedTo') v.value.roleId = '';
|
||||
if (t === 'createdLessThan') v.value.sec = 86400;
|
||||
if (t === 'createdMoreThan') v.value.sec = 86400;
|
||||
@@ -119,7 +119,7 @@ const type = computed({
|
||||
});
|
||||
|
||||
function addValue() {
|
||||
v.value.values.push({ id: uuid(), type: 'isRemote' });
|
||||
v.value.values.push({ id: genId(), type: 'isRemote' });
|
||||
}
|
||||
|
||||
function valuesItemUpdated(item) {
|
||||
|
||||
@@ -21,7 +21,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||
<script lang="ts" setup>
|
||||
import { computed, ref } from 'vue';
|
||||
import * as Misskey from 'misskey-js';
|
||||
import { v4 as uuid } from 'uuid';
|
||||
import { genId } from '@/utility/id.js';
|
||||
import XEditor from './roles.editor.vue';
|
||||
import * as os from '@/os.js';
|
||||
import { misskeyApi } from '@/utility/misskey-api.js';
|
||||
@@ -55,7 +55,7 @@ if (props.id) {
|
||||
color: null,
|
||||
iconUrl: null,
|
||||
target: 'manual',
|
||||
condFormula: { id: uuid(), type: 'isRemote' },
|
||||
condFormula: { id: genId(), type: 'isRemote' },
|
||||
isPublic: false,
|
||||
isExplorable: false,
|
||||
asBadge: false,
|
||||
|
||||
Reference in New Issue
Block a user