chore: 🚨 lint
This commit is contained in:
parent
5ad42e73c9
commit
5d06aa5f13
3
.gitignore
vendored
3
.gitignore
vendored
@ -32,6 +32,9 @@ coverage
|
|||||||
# docker dev config
|
# docker dev config
|
||||||
/dev/docker-compose.yml
|
/dev/docker-compose.yml
|
||||||
|
|
||||||
|
# ESLint
|
||||||
|
.eslintcache
|
||||||
|
|
||||||
# misskey
|
# misskey
|
||||||
built
|
built
|
||||||
db
|
db
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
{
|
{
|
||||||
"extends": ["@eslint-sets/vue3", "@eslint-sets/vue3-ts"],
|
"extends": ["@eslint-sets/vue3", "@eslint-sets/vue3-ts"],
|
||||||
"plugins": ["file-progress", "prettier"],
|
"plugins": ["file-progress", "prettier"],
|
||||||
|
"ignorePatterns": ["**/*.json5"],
|
||||||
"rules": {
|
"rules": {
|
||||||
"file-progress/activate": 1
|
"file-progress/activate": 1
|
||||||
}
|
}
|
||||||
|
@ -5,8 +5,8 @@
|
|||||||
"watch": "pnpm vite build --watch --mode development",
|
"watch": "pnpm vite build --watch --mode development",
|
||||||
"build": "pnpm vite build",
|
"build": "pnpm vite build",
|
||||||
"build:debug": "pnpm run build",
|
"build:debug": "pnpm run build",
|
||||||
"lint": "pnpm rome check **/*.ts --apply && pnpm run lint:vue",
|
"lint": "pnpm rome check **/*.ts --apply ; pnpm run lint:vue",
|
||||||
"lint:vue": "pnpm paralint --ext .vue --fix '**/*.vue' --cache",
|
"lint:vue": "pnpm eslint src --fix '**/*.vue' --cache ; pnpm run format",
|
||||||
"format": "pnpm rome format * --write && pnpm prettier --write '**/*.{scss,vue}' --cache --cache-strategy metadata"
|
"format": "pnpm rome format * --write && pnpm prettier --write '**/*.{scss,vue}' --cache --cache-strategy metadata"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
@ -16,7 +16,7 @@
|
|||||||
"@phosphor-icons/web": "^2.0.3",
|
"@phosphor-icons/web": "^2.0.3",
|
||||||
"@rollup/plugin-alias": "5.0.0",
|
"@rollup/plugin-alias": "5.0.0",
|
||||||
"@rollup/plugin-json": "6.0.0",
|
"@rollup/plugin-json": "6.0.0",
|
||||||
"@rollup/pluginutils": "^5.0.3",
|
"@rollup/pluginutils": "^5.0.4",
|
||||||
"@syuilo/aiscript": "0.11.1",
|
"@syuilo/aiscript": "0.11.1",
|
||||||
"@types/escape-regexp": "0.0.1",
|
"@types/escape-regexp": "0.0.1",
|
||||||
"@types/glob": "8.1.0",
|
"@types/glob": "8.1.0",
|
||||||
@ -28,15 +28,15 @@
|
|||||||
"@types/seedrandom": "3.0.5",
|
"@types/seedrandom": "3.0.5",
|
||||||
"@types/throttle-debounce": "5.0.0",
|
"@types/throttle-debounce": "5.0.0",
|
||||||
"@types/tinycolor2": "1.4.3",
|
"@types/tinycolor2": "1.4.3",
|
||||||
"@types/uuid": "9.0.2",
|
"@types/uuid": "9.0.3",
|
||||||
"@vitejs/plugin-vue": "4.3.1",
|
"@vitejs/plugin-vue": "4.3.4",
|
||||||
"@vue/compiler-sfc": "3.3.4",
|
"@vue/compiler-sfc": "3.3.4",
|
||||||
"autobind-decorator": "2.4.0",
|
"autobind-decorator": "2.4.0",
|
||||||
"autosize": "6.0.1",
|
"autosize": "6.0.1",
|
||||||
"blurhash": "2.0.5",
|
"blurhash": "2.0.5",
|
||||||
"broadcast-channel": "5.2.0",
|
"broadcast-channel": "5.3.0",
|
||||||
"browser-image-resizer": "github:misskey-dev/browser-image-resizer",
|
"browser-image-resizer": "github:misskey-dev/browser-image-resizer",
|
||||||
"chart.js": "4.3.3",
|
"chart.js": "4.4.0",
|
||||||
"chartjs-adapter-date-fns": "3.0.0",
|
"chartjs-adapter-date-fns": "3.0.0",
|
||||||
"chartjs-chart-matrix": "^2.0.1",
|
"chartjs-chart-matrix": "^2.0.1",
|
||||||
"chartjs-plugin-gradient": "0.6.1",
|
"chartjs-plugin-gradient": "0.6.1",
|
||||||
@ -63,36 +63,35 @@
|
|||||||
"katex": "0.16.8",
|
"katex": "0.16.8",
|
||||||
"matter-js": "0.19.0",
|
"matter-js": "0.19.0",
|
||||||
"mfm-js": "0.23.3",
|
"mfm-js": "0.23.3",
|
||||||
"paralint": "^1.2.1",
|
|
||||||
"photoswipe": "5.3.8",
|
"photoswipe": "5.3.8",
|
||||||
"prettier": "3.0.2",
|
"prettier": "3.0.3",
|
||||||
"prettier-plugin-vue": "1.1.6",
|
"prettier-plugin-vue": "1.1.6",
|
||||||
"prismjs": "1.29.0",
|
"prismjs": "1.29.0",
|
||||||
"punycode": "2.3.0",
|
"punycode": "2.3.0",
|
||||||
"rndstr": "1.0.0",
|
"rndstr": "1.0.0",
|
||||||
"rollup": "3.28.0",
|
"rollup": "3.28.1",
|
||||||
"s-age": "1.1.2",
|
"s-age": "1.1.2",
|
||||||
"sass": "1.66.0",
|
"sass": "1.66.1",
|
||||||
"seedrandom": "3.0.5",
|
"seedrandom": "3.0.5",
|
||||||
"strict-event-emitter-types": "2.0.0",
|
"strict-event-emitter-types": "2.0.0",
|
||||||
"stringz": "2.1.0",
|
"stringz": "2.1.0",
|
||||||
"swiper": "10.2.0",
|
"swiper": "10.2.0",
|
||||||
"syuilo-password-strength": "0.0.1",
|
"syuilo-password-strength": "0.0.1",
|
||||||
"textarea-caret": "3.1.0",
|
"textarea-caret": "3.1.0",
|
||||||
"three": "0.155.0",
|
"three": "0.156.0",
|
||||||
"throttle-debounce": "5.0.0",
|
"throttle-debounce": "5.0.0",
|
||||||
"tinycolor2": "1.6.0",
|
"tinycolor2": "1.6.0",
|
||||||
"tsc-alias": "1.8.7",
|
"tsc-alias": "1.8.7",
|
||||||
"tsconfig-paths": "4.2.0",
|
"tsconfig-paths": "4.2.0",
|
||||||
"twemoji-parser": "14.0.0",
|
"twemoji-parser": "14.0.0",
|
||||||
"typescript": "5.1.6",
|
"typescript": "5.2.2",
|
||||||
"unicode-emoji-json": "^0.4.0",
|
"unicode-emoji-json": "^0.4.0",
|
||||||
"uuid": "9.0.0",
|
"uuid": "9.0.0",
|
||||||
"vanilla-tilt": "1.8.1",
|
"vanilla-tilt": "1.8.1",
|
||||||
"vite": "4.4.9",
|
"vite": "4.4.9",
|
||||||
"vite-plugin-compression": "^0.5.1",
|
"vite-plugin-compression": "^0.5.1",
|
||||||
"vue": "3.3.4",
|
"vue": "3.3.4",
|
||||||
"vue-draggable-plus": "^0.2.5",
|
"vue-draggable-plus": "^0.2.6",
|
||||||
"vue-isyourpasswordsafe": "^2.0.0",
|
"vue-isyourpasswordsafe": "^2.0.0",
|
||||||
"vue-plyr": "^7.0.0",
|
"vue-plyr": "^7.0.0",
|
||||||
"vue-prism-editor": "2.0.0-alpha.2"
|
"vue-prism-editor": "2.0.0-alpha.2"
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
import { defineAsyncComponent, reactive } from "vue";
|
import { defineAsyncComponent, reactive } from "vue";
|
||||||
import * as misskey from "firefish-js";
|
import type * as misskey from "firefish-js";
|
||||||
import { i18n } from "./i18n";
|
import { i18n } from "./i18n";
|
||||||
import { del, get, set } from "@/scripts/idb-proxy";
|
import { del, get, set } from "@/scripts/idb-proxy";
|
||||||
import { apiUrl } from "@/config";
|
import { apiUrl } from "@/config";
|
||||||
import { waiting, api, popup, popupMenu, success, alert } from "@/os";
|
import { alert, api, popup, popupMenu, success, waiting } from "@/os";
|
||||||
import { unisonReload, reloadChannel } from "@/scripts/unison-reload";
|
import { reloadChannel, unisonReload } from "@/scripts/unison-reload";
|
||||||
|
|
||||||
// TODO: 他のタブと永続化されたstateを同期
|
// TODO: 他のタブと永続化されたstateを同期
|
||||||
|
|
||||||
@ -28,7 +28,7 @@ export async function signout() {
|
|||||||
|
|
||||||
const accounts = await getAccounts();
|
const accounts = await getAccounts();
|
||||||
|
|
||||||
//#region Remove service worker registration
|
// #region Remove service worker registration
|
||||||
try {
|
try {
|
||||||
if (navigator.serviceWorker.controller) {
|
if (navigator.serviceWorker.controller) {
|
||||||
const registration = await navigator.serviceWorker.ready;
|
const registration = await navigator.serviceWorker.ready;
|
||||||
@ -52,7 +52,7 @@ export async function signout() {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
} catch (err) {}
|
} catch (err) {}
|
||||||
//#endregion
|
// #endregion
|
||||||
|
|
||||||
document.cookie = "igi=; path=/";
|
document.cookie = "igi=; path=/";
|
||||||
|
|
||||||
|
@ -199,7 +199,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { onBeforeUnmount, onMounted, ref, shallowRef, computed } from "vue";
|
import { computed, onBeforeUnmount, onMounted, ref, shallowRef } from "vue";
|
||||||
import * as Acct from "firefish-js/built/acct";
|
import * as Acct from "firefish-js/built/acct";
|
||||||
import MkModal from "@/components/MkModal.vue";
|
import MkModal from "@/components/MkModal.vue";
|
||||||
import MkButton from "@/components/MkButton.vue";
|
import MkButton from "@/components/MkButton.vue";
|
||||||
@ -281,7 +281,9 @@ const modal = shallowRef<InstanceType<typeof MkModal>>();
|
|||||||
const inputValue = ref<string | number | null>(props.input?.default ?? null);
|
const inputValue = ref<string | number | null>(props.input?.default ?? null);
|
||||||
const selectedValue = ref(props.select?.default ?? null);
|
const selectedValue = ref(props.select?.default ?? null);
|
||||||
|
|
||||||
let disabledReason = ref<null | "charactersExceeded" | "charactersBelow">(null);
|
const disabledReason = ref<null | "charactersExceeded" | "charactersBelow">(
|
||||||
|
null,
|
||||||
|
);
|
||||||
const okButtonDisabled = computed<boolean>(() => {
|
const okButtonDisabled = computed<boolean>(() => {
|
||||||
if (props.input) {
|
if (props.input) {
|
||||||
if (props.input.minLength) {
|
if (props.input.minLength) {
|
||||||
|
@ -39,7 +39,7 @@
|
|||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed, defineAsyncComponent, ref } from "vue";
|
import { computed, defineAsyncComponent, ref } from "vue";
|
||||||
import * as Misskey from "firefish-js";
|
import type * as Misskey from "firefish-js";
|
||||||
import copyToClipboard from "@/scripts/copy-to-clipboard";
|
import copyToClipboard from "@/scripts/copy-to-clipboard";
|
||||||
import MkDriveFileThumbnail from "@/components/MkDriveFileThumbnail.vue";
|
import MkDriveFileThumbnail from "@/components/MkDriveFileThumbnail.vue";
|
||||||
import bytes from "@/filters/bytes";
|
import bytes from "@/filters/bytes";
|
||||||
@ -160,7 +160,7 @@ function rename() {
|
|||||||
if (canceled) return;
|
if (canceled) return;
|
||||||
os.api("drive/files/update", {
|
os.api("drive/files/update", {
|
||||||
fileId: props.file.id,
|
fileId: props.file.id,
|
||||||
name: name,
|
name,
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -179,7 +179,7 @@ function describe() {
|
|||||||
{
|
{
|
||||||
done: (result) => {
|
done: (result) => {
|
||||||
if (!result || result.canceled) return;
|
if (!result || result.canceled) return;
|
||||||
let comment = result.result;
|
const comment = result.result;
|
||||||
os.api("drive/files/update", {
|
os.api("drive/files/update", {
|
||||||
fileId: props.file.id,
|
fileId: props.file.id,
|
||||||
comment: comment.length === 0 ? null : comment,
|
comment: comment.length === 0 ? null : comment,
|
||||||
|
@ -38,7 +38,7 @@
|
|||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed, defineAsyncComponent, ref } from "vue";
|
import { computed, defineAsyncComponent, ref } from "vue";
|
||||||
import * as Misskey from "firefish-js";
|
import type * as Misskey from "firefish-js";
|
||||||
import * as os from "@/os";
|
import * as os from "@/os";
|
||||||
import { i18n } from "@/i18n";
|
import { i18n } from "@/i18n";
|
||||||
import { defaultStore } from "@/store";
|
import { defaultStore } from "@/store";
|
||||||
@ -131,7 +131,7 @@ function onDrop(ev: DragEvent) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
//#region ドライブのファイル
|
// #region ドライブのファイル
|
||||||
const driveFile = ev.dataTransfer.getData(_DATA_TRANSFER_DRIVE_FILE_);
|
const driveFile = ev.dataTransfer.getData(_DATA_TRANSFER_DRIVE_FILE_);
|
||||||
if (driveFile != null && driveFile !== "") {
|
if (driveFile != null && driveFile !== "") {
|
||||||
const file = JSON.parse(driveFile);
|
const file = JSON.parse(driveFile);
|
||||||
@ -141,9 +141,9 @@ function onDrop(ev: DragEvent) {
|
|||||||
folderId: props.folder.id,
|
folderId: props.folder.id,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
//#endregion
|
// #endregion
|
||||||
|
|
||||||
//#region ドライブのフォルダ
|
// #region ドライブのフォルダ
|
||||||
const driveFolder = ev.dataTransfer.getData(_DATA_TRANSFER_DRIVE_FOLDER_);
|
const driveFolder = ev.dataTransfer.getData(_DATA_TRANSFER_DRIVE_FOLDER_);
|
||||||
if (driveFolder != null && driveFolder !== "") {
|
if (driveFolder != null && driveFolder !== "") {
|
||||||
const folder = JSON.parse(driveFolder);
|
const folder = JSON.parse(driveFolder);
|
||||||
@ -175,7 +175,7 @@ function onDrop(ev: DragEvent) {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
//#endregion
|
// #endregion
|
||||||
}
|
}
|
||||||
|
|
||||||
function onDragstart(ev: DragEvent) {
|
function onDragstart(ev: DragEvent) {
|
||||||
@ -207,7 +207,7 @@ function rename() {
|
|||||||
if (canceled) return;
|
if (canceled) return;
|
||||||
os.api("drive/folders/update", {
|
os.api("drive/folders/update", {
|
||||||
folderId: props.folder.id,
|
folderId: props.folder.id,
|
||||||
name: name,
|
name,
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref } from "vue";
|
import { ref } from "vue";
|
||||||
import * as Misskey from "firefish-js";
|
import type * as Misskey from "firefish-js";
|
||||||
import * as os from "@/os";
|
import * as os from "@/os";
|
||||||
import { i18n } from "@/i18n";
|
import { i18n } from "@/i18n";
|
||||||
|
|
||||||
@ -86,7 +86,7 @@ function onDrop(ev: DragEvent) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
//#region ドライブのファイル
|
// #region ドライブのファイル
|
||||||
const driveFile = ev.dataTransfer.getData(_DATA_TRANSFER_DRIVE_FILE_);
|
const driveFile = ev.dataTransfer.getData(_DATA_TRANSFER_DRIVE_FILE_);
|
||||||
if (driveFile != null && driveFile !== "") {
|
if (driveFile != null && driveFile !== "") {
|
||||||
const file = JSON.parse(driveFile);
|
const file = JSON.parse(driveFile);
|
||||||
@ -96,9 +96,9 @@ function onDrop(ev: DragEvent) {
|
|||||||
folderId: props.folder ? props.folder.id : null,
|
folderId: props.folder ? props.folder.id : null,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
//#endregion
|
// #endregion
|
||||||
|
|
||||||
//#region ドライブのフォルダ
|
// #region ドライブのフォルダ
|
||||||
const driveFolder = ev.dataTransfer.getData(_DATA_TRANSFER_DRIVE_FOLDER_);
|
const driveFolder = ev.dataTransfer.getData(_DATA_TRANSFER_DRIVE_FOLDER_);
|
||||||
if (driveFolder != null && driveFolder !== "") {
|
if (driveFolder != null && driveFolder !== "") {
|
||||||
const folder = JSON.parse(driveFolder);
|
const folder = JSON.parse(driveFolder);
|
||||||
@ -110,7 +110,7 @@ function onDrop(ev: DragEvent) {
|
|||||||
parentId: props.folder ? props.folder.id : null,
|
parentId: props.folder ? props.folder.id : null,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
//#endregion
|
// #endregion
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -139,7 +139,7 @@ import {
|
|||||||
ref,
|
ref,
|
||||||
watch,
|
watch,
|
||||||
} from "vue";
|
} from "vue";
|
||||||
import * as Misskey from "firefish-js";
|
import type * as Misskey from "firefish-js";
|
||||||
import MkButton from "./MkButton.vue";
|
import MkButton from "./MkButton.vue";
|
||||||
import XNavFolder from "@/components/MkDrive.navFolder.vue";
|
import XNavFolder from "@/components/MkDrive.navFolder.vue";
|
||||||
import XFolder from "@/components/MkDrive.folder.vue";
|
import XFolder from "@/components/MkDrive.folder.vue";
|
||||||
@ -294,7 +294,7 @@ function onDrop(ev: DragEvent): any {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
//#region ドライブのファイル
|
// #region ドライブのファイル
|
||||||
const driveFile = ev.dataTransfer.getData(_DATA_TRANSFER_DRIVE_FILE_);
|
const driveFile = ev.dataTransfer.getData(_DATA_TRANSFER_DRIVE_FILE_);
|
||||||
if (driveFile != null && driveFile !== "") {
|
if (driveFile != null && driveFile !== "") {
|
||||||
const file = JSON.parse(driveFile);
|
const file = JSON.parse(driveFile);
|
||||||
@ -305,9 +305,9 @@ function onDrop(ev: DragEvent): any {
|
|||||||
folderId: folder.value ? folder.value.id : null,
|
folderId: folder.value ? folder.value.id : null,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
//#endregion
|
// #endregion
|
||||||
|
|
||||||
//#region ドライブのフォルダ
|
// #region ドライブのフォルダ
|
||||||
const driveFolder = ev.dataTransfer.getData(_DATA_TRANSFER_DRIVE_FOLDER_);
|
const driveFolder = ev.dataTransfer.getData(_DATA_TRANSFER_DRIVE_FOLDER_);
|
||||||
if (driveFolder != null && driveFolder !== "") {
|
if (driveFolder != null && driveFolder !== "") {
|
||||||
const droppedFolder = JSON.parse(driveFolder);
|
const droppedFolder = JSON.parse(driveFolder);
|
||||||
@ -339,7 +339,7 @@ function onDrop(ev: DragEvent): any {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
//#endregion
|
// #endregion
|
||||||
}
|
}
|
||||||
|
|
||||||
function selectLocalFile() {
|
function selectLocalFile() {
|
||||||
@ -354,7 +354,7 @@ function urlUpload() {
|
|||||||
}).then(({ canceled, result: url }) => {
|
}).then(({ canceled, result: url }) => {
|
||||||
if (canceled || !url) return;
|
if (canceled || !url) return;
|
||||||
os.api("drive/files/upload-from-url", {
|
os.api("drive/files/upload-from-url", {
|
||||||
url: url,
|
url,
|
||||||
folderId: folder.value ? folder.value.id : undefined,
|
folderId: folder.value ? folder.value.id : undefined,
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -372,7 +372,7 @@ function createFolder() {
|
|||||||
}).then(({ canceled, result: name }) => {
|
}).then(({ canceled, result: name }) => {
|
||||||
if (canceled) return;
|
if (canceled) return;
|
||||||
os.api("drive/folders/create", {
|
os.api("drive/folders/create", {
|
||||||
name: name,
|
name,
|
||||||
parentId: folder.value ? folder.value.id : undefined,
|
parentId: folder.value ? folder.value.id : undefined,
|
||||||
}).then((createdFolder) => {
|
}).then((createdFolder) => {
|
||||||
addFolder(createdFolder, true);
|
addFolder(createdFolder, true);
|
||||||
@ -389,7 +389,7 @@ function renameFolder(folderToRename: Misskey.entities.DriveFolder) {
|
|||||||
if (canceled) return;
|
if (canceled) return;
|
||||||
os.api("drive/folders/update", {
|
os.api("drive/folders/update", {
|
||||||
folderId: folderToRename.id,
|
folderId: folderToRename.id,
|
||||||
name: name,
|
name,
|
||||||
}).then((updatedFolder) => {
|
}).then((updatedFolder) => {
|
||||||
// FIXME: 画面を更新するために自分自身に移動
|
// FIXME: 画面を更新するために自分自身に移動
|
||||||
move(updatedFolder);
|
move(updatedFolder);
|
||||||
|
@ -68,7 +68,7 @@ const is = computed(() => {
|
|||||||
"application/x-tar",
|
"application/x-tar",
|
||||||
"application/gzip",
|
"application/gzip",
|
||||||
"application/x-7z-compressed",
|
"application/x-7z-compressed",
|
||||||
].some((archiveType) => archiveType === props.file.type)
|
].includes(props.file.type)
|
||||||
)
|
)
|
||||||
return "archive";
|
return "archive";
|
||||||
return "unknown";
|
return "unknown";
|
||||||
|
@ -37,7 +37,7 @@
|
|||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref } from "vue";
|
import { ref } from "vue";
|
||||||
import * as Misskey from "firefish-js";
|
import type * as Misskey from "firefish-js";
|
||||||
import XDrive from "@/components/MkDrive.vue";
|
import XDrive from "@/components/MkDrive.vue";
|
||||||
import XModalWindow from "@/components/MkModalWindow.vue";
|
import XModalWindow from "@/components/MkModalWindow.vue";
|
||||||
import number from "@/filters/number";
|
import number from "@/filters/number";
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import {} from "vue";
|
import {} from "vue";
|
||||||
import * as Misskey from "firefish-js";
|
import type * as Misskey from "firefish-js";
|
||||||
import XDrive from "@/components/MkDrive.vue";
|
import XDrive from "@/components/MkDrive.vue";
|
||||||
import XWindow from "@/components/MkWindow.vue";
|
import XWindow from "@/components/MkWindow.vue";
|
||||||
import { i18n } from "@/i18n";
|
import { i18n } from "@/i18n";
|
||||||
|
@ -48,7 +48,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref, watch, onMounted } from "vue";
|
import { onMounted, ref, watch } from "vue";
|
||||||
import { addSkinTone } from "@/scripts/emojilist";
|
import { addSkinTone } from "@/scripts/emojilist";
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<FocusTrap v-bind:active="isActive">
|
<FocusTrap :active="isActive">
|
||||||
<div
|
<div
|
||||||
class="omfetrab"
|
class="omfetrab"
|
||||||
:class="['s' + size, 'w' + width, 'h' + height, { asDrawer }]"
|
:class="['s' + size, 'w' + width, 'h' + height, { asDrawer }]"
|
||||||
@ -163,14 +163,15 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref, computed, watch, onMounted } from "vue";
|
import { computed, onMounted, ref, watch } from "vue";
|
||||||
import * as Misskey from "firefish-js";
|
import type * as Misskey from "firefish-js";
|
||||||
|
import { FocusTrap } from "focus-trap-vue";
|
||||||
import XSection from "@/components/MkEmojiPicker.section.vue";
|
import XSection from "@/components/MkEmojiPicker.section.vue";
|
||||||
|
import type { UnicodeEmojiDef } from "@/scripts/emojilist";
|
||||||
import {
|
import {
|
||||||
emojilist,
|
emojilist,
|
||||||
unicodeEmojiCategories,
|
|
||||||
UnicodeEmojiDef,
|
|
||||||
getNicelyLabeledCategory,
|
getNicelyLabeledCategory,
|
||||||
|
unicodeEmojiCategories,
|
||||||
} from "@/scripts/emojilist";
|
} from "@/scripts/emojilist";
|
||||||
import { getStaticImageUrl } from "@/scripts/get-static-image-url";
|
import { getStaticImageUrl } from "@/scripts/get-static-image-url";
|
||||||
import Ripple from "@/components/MkRipple.vue";
|
import Ripple from "@/components/MkRipple.vue";
|
||||||
@ -180,7 +181,6 @@ import { deviceKind } from "@/scripts/device-kind";
|
|||||||
import { emojiCategories, instance } from "@/instance";
|
import { emojiCategories, instance } from "@/instance";
|
||||||
import { i18n } from "@/i18n";
|
import { i18n } from "@/i18n";
|
||||||
import { defaultStore } from "@/store";
|
import { defaultStore } from "@/store";
|
||||||
import { FocusTrap } from "focus-trap-vue";
|
|
||||||
|
|
||||||
const props = withDefaults(
|
const props = withDefaults(
|
||||||
defineProps<{
|
defineProps<{
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref } from "vue";
|
import { ref } from "vue";
|
||||||
import * as Misskey from "firefish-js";
|
import type * as Misskey from "firefish-js";
|
||||||
import * as os from "@/os";
|
import * as os from "@/os";
|
||||||
|
|
||||||
const meta = ref<Misskey.entities.DetailedInstanceMetadata>();
|
const meta = ref<Misskey.entities.DetailedInstanceMetadata>();
|
||||||
|
@ -1,14 +1,15 @@
|
|||||||
<template>
|
<template>
|
||||||
<button
|
<button
|
||||||
v-if="!hideMenu"
|
v-if="!hideMenu"
|
||||||
|
v-tooltip="i18n.ts.menu"
|
||||||
class="menu _button"
|
class="menu _button"
|
||||||
@click.stop="menu"
|
@click.stop="menu"
|
||||||
v-tooltip="i18n.ts.menu"
|
|
||||||
>
|
>
|
||||||
<i class="ph-dots-three-outline ph-bold ph-lg"></i>
|
<i class="ph-dots-three-outline ph-bold ph-lg"></i>
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
v-if="$i != null && $i.id != user.id"
|
v-if="$i != null && $i.id != user.id"
|
||||||
|
v-tooltip="full ? null : `${state} ${user.name || user.username}`"
|
||||||
class="kpoogebi _button follow-button"
|
class="kpoogebi _button follow-button"
|
||||||
:class="{
|
:class="{
|
||||||
wait,
|
wait,
|
||||||
@ -18,9 +19,8 @@
|
|||||||
blocking: isBlocking,
|
blocking: isBlocking,
|
||||||
}"
|
}"
|
||||||
:disabled="wait"
|
:disabled="wait"
|
||||||
@click.stop="onClick"
|
|
||||||
:aria-label="`${state} ${user.name || user.username}`"
|
:aria-label="`${state} ${user.name || user.username}`"
|
||||||
v-tooltip="full ? null : `${state} ${user.name || user.username}`"
|
@click.stop="onClick"
|
||||||
>
|
>
|
||||||
<template v-if="!wait">
|
<template v-if="!wait">
|
||||||
<template v-if="isBlocking">
|
<template v-if="isBlocking">
|
||||||
@ -88,13 +88,13 @@ const props = withDefaults(
|
|||||||
|
|
||||||
const isBlocking = computed(() => props.user.isBlocking);
|
const isBlocking = computed(() => props.user.isBlocking);
|
||||||
|
|
||||||
let state = ref(i18n.ts.processing);
|
const state = ref(i18n.ts.processing);
|
||||||
|
|
||||||
let isFollowing = ref(props.user.isFollowing);
|
const isFollowing = ref(props.user.isFollowing);
|
||||||
let hasPendingFollowRequestFromYou = ref(
|
const hasPendingFollowRequestFromYou = ref(
|
||||||
props.user.hasPendingFollowRequestFromYou,
|
props.user.hasPendingFollowRequestFromYou,
|
||||||
);
|
);
|
||||||
let wait = ref(false);
|
const wait = ref(false);
|
||||||
const connection = stream.useChannel("main");
|
const connection = stream.useChannel("main");
|
||||||
|
|
||||||
if (props.user.isFollowing == null) {
|
if (props.user.isFollowing == null) {
|
||||||
|
@ -64,7 +64,6 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref } from "vue";
|
import { ref } from "vue";
|
||||||
|
|
||||||
import {} from "vue";
|
|
||||||
import XModalWindow from "@/components/MkModalWindow.vue";
|
import XModalWindow from "@/components/MkModalWindow.vue";
|
||||||
import MkButton from "@/components/MkButton.vue";
|
import MkButton from "@/components/MkButton.vue";
|
||||||
import MkInput from "@/components/form/input.vue";
|
import MkInput from "@/components/form/input.vue";
|
||||||
@ -77,11 +76,11 @@ const emit = defineEmits<{
|
|||||||
(ev: "closed"): void;
|
(ev: "closed"): void;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
let dialog: InstanceType<typeof XModalWindow> = ref();
|
const dialog: InstanceType<typeof XModalWindow> = ref();
|
||||||
|
|
||||||
let username = ref("");
|
const username = ref("");
|
||||||
let email = ref("");
|
const email = ref("");
|
||||||
let processing = ref(false);
|
const processing = ref(false);
|
||||||
|
|
||||||
async function onSubmit() {
|
async function onSubmit() {
|
||||||
processing.value = true;
|
processing.value = true;
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { defineComponent, defineAsyncComponent } from "vue";
|
import { defineAsyncComponent, defineComponent } from "vue";
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
components: {
|
components: {
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { onMounted, nextTick, watch, shallowRef, ref } from "vue";
|
import { nextTick, onMounted, ref, shallowRef, watch } from "vue";
|
||||||
import { Chart } from "chart.js";
|
import { Chart } from "chart.js";
|
||||||
import * as os from "@/os";
|
import * as os from "@/os";
|
||||||
import { defaultStore } from "@/store";
|
import { defaultStore } from "@/store";
|
||||||
@ -26,8 +26,8 @@ const props = defineProps<{
|
|||||||
const rootEl = shallowRef<HTMLDivElement>(null);
|
const rootEl = shallowRef<HTMLDivElement>(null);
|
||||||
const chartEl = shallowRef<HTMLCanvasElement>(null);
|
const chartEl = shallowRef<HTMLCanvasElement>(null);
|
||||||
const now = new Date();
|
const now = new Date();
|
||||||
let chartInstance: Chart = null;
|
let chartInstance: Chart = null,
|
||||||
let fetching = ref(true);
|
fetching = ref(true);
|
||||||
|
|
||||||
const { handler: externalTooltipHandler } = useChartTooltip({
|
const { handler: externalTooltipHandler } = useChartTooltip({
|
||||||
position: "middle",
|
position: "middle",
|
||||||
@ -233,7 +233,7 @@ async function renderChart() {
|
|||||||
return ["Active: " + v.v];
|
return ["Active: " + v.v];
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
//mode: 'index',
|
// mode: 'index',
|
||||||
animation: {
|
animation: {
|
||||||
duration: 0,
|
duration: 0,
|
||||||
},
|
},
|
||||||
|
@ -28,7 +28,6 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref } from "vue";
|
import { ref } from "vue";
|
||||||
|
|
||||||
import {} from "vue";
|
|
||||||
import type * as misskey from "firefish-js";
|
import type * as misskey from "firefish-js";
|
||||||
import bytes from "@/filters/bytes";
|
import bytes from "@/filters/bytes";
|
||||||
import number from "@/filters/number";
|
import number from "@/filters/number";
|
||||||
|
@ -49,7 +49,7 @@ const props = withDefaults(
|
|||||||
);
|
);
|
||||||
|
|
||||||
const canvas = ref<HTMLCanvasElement>();
|
const canvas = ref<HTMLCanvasElement>();
|
||||||
let loaded = ref(false);
|
const loaded = ref(false);
|
||||||
|
|
||||||
function draw() {
|
function draw() {
|
||||||
if (props.hash == null || canvas.value == null) return;
|
if (props.hash == null || canvas.value == null) return;
|
||||||
|
@ -11,8 +11,8 @@
|
|||||||
v-if="closeable"
|
v-if="closeable"
|
||||||
v-tooltip="i18n.ts.close"
|
v-tooltip="i18n.ts.close"
|
||||||
class="_buttonIcon close"
|
class="_buttonIcon close"
|
||||||
@click.stop="close"
|
|
||||||
:aria-label="i18n.t('close')"
|
:aria-label="i18n.t('close')"
|
||||||
|
@click.stop="close"
|
||||||
>
|
>
|
||||||
<i class="ph-x ph-bold ph-lg"></i>
|
<i class="ph-x ph-bold ph-lg"></i>
|
||||||
</button>
|
</button>
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref } from "vue";
|
import { ref } from "vue";
|
||||||
|
|
||||||
import * as firefish from "firefish-js";
|
import type * as firefish from "firefish-js";
|
||||||
import MkMiniChart from "@/components/MkMiniChart.vue";
|
import MkMiniChart from "@/components/MkMiniChart.vue";
|
||||||
import * as os from "@/os";
|
import * as os from "@/os";
|
||||||
import { getProxiedImageUrlNullable } from "@/scripts/media-proxy";
|
import { getProxiedImageUrlNullable } from "@/scripts/media-proxy";
|
||||||
@ -35,7 +35,7 @@ const props = defineProps<{
|
|||||||
instance: firefish.entities.Instance;
|
instance: firefish.entities.Instance;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
let chartValues = ref<number[] | null>(null);
|
const chartValues = ref<number[] | null>(null);
|
||||||
|
|
||||||
os.apiGet("charts/instance", {
|
os.apiGet("charts/instance", {
|
||||||
host: props.instance.host,
|
host: props.instance.host,
|
||||||
|
@ -58,11 +58,11 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref } from "vue";
|
import { ref } from "vue";
|
||||||
|
|
||||||
|
import type { Instance } from "firefish-js/built/entities";
|
||||||
import MkInput from "@/components/form/input.vue";
|
import MkInput from "@/components/form/input.vue";
|
||||||
import XModalWindow from "@/components/MkModalWindow.vue";
|
import XModalWindow from "@/components/MkModalWindow.vue";
|
||||||
import * as os from "@/os";
|
import * as os from "@/os";
|
||||||
import { i18n } from "@/i18n";
|
import { i18n } from "@/i18n";
|
||||||
import { Instance } from "firefish-js/built/entities";
|
|
||||||
|
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
(ev: "ok", selected: Instance): void;
|
(ev: "ok", selected: Instance): void;
|
||||||
@ -70,10 +70,10 @@ const emit = defineEmits<{
|
|||||||
(ev: "closed"): void;
|
(ev: "closed"): void;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
let hostname = ref("");
|
const hostname = ref("");
|
||||||
let instances: Instance[] = ref([]);
|
const instances: Instance[] = ref([]);
|
||||||
let selected: Instance | null = ref(null);
|
const selected: Instance | null = ref(null);
|
||||||
let dialogEl = ref<InstanceType<typeof XModalWindow>>();
|
const dialogEl = ref<InstanceType<typeof XModalWindow>>();
|
||||||
|
|
||||||
let searchOrderLatch = 0;
|
let searchOrderLatch = 0;
|
||||||
const search = () => {
|
const search = () => {
|
||||||
|
@ -116,11 +116,11 @@ import { initChart } from "@/scripts/init-chart";
|
|||||||
initChart();
|
initChart();
|
||||||
|
|
||||||
const chartLimit = 500;
|
const chartLimit = 500;
|
||||||
let chartSpan = ref<"hour" | "day">("hour");
|
const chartSpan = ref<"hour" | "day">("hour");
|
||||||
let chartSrc = ref("active-users");
|
const chartSrc = ref("active-users");
|
||||||
let heatmapSrc = ref("active-users");
|
const heatmapSrc = ref("active-users");
|
||||||
let subDoughnutEl = shallowRef<HTMLCanvasElement>();
|
const subDoughnutEl = shallowRef<HTMLCanvasElement>();
|
||||||
let pubDoughnutEl = shallowRef<HTMLCanvasElement>();
|
const pubDoughnutEl = shallowRef<HTMLCanvasElement>();
|
||||||
|
|
||||||
const { handler: externalTooltipHandler1 } = useChartTooltip({
|
const { handler: externalTooltipHandler1 } = useChartTooltip({
|
||||||
position: "middle",
|
position: "middle",
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<div
|
<div
|
||||||
class="hpaizdrt"
|
|
||||||
v-tooltip="capitalize(instance.softwareName)"
|
|
||||||
ref="ticker"
|
ref="ticker"
|
||||||
|
v-tooltip="capitalize(instance.softwareName)"
|
||||||
|
class="hpaizdrt"
|
||||||
:style="bg"
|
:style="bg"
|
||||||
>
|
>
|
||||||
<img class="icon" :src="getInstanceIcon(instance)" aria-hidden="true" />
|
<img class="icon" :src="getInstanceIcon(instance)" aria-hidden="true" />
|
||||||
@ -26,7 +26,7 @@ const props = defineProps<{
|
|||||||
};
|
};
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
let ticker = ref<HTMLElement | null>(null);
|
const ticker = ref<HTMLElement | null>(null);
|
||||||
|
|
||||||
// if no instance data is given, this is for the local instance
|
// if no instance data is given, this is for the local instance
|
||||||
const instance = props.instance ?? {
|
const instance = props.instance ?? {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="media" v-size="{ max: [350] }">
|
<div v-size="{ max: [350] }" class="media">
|
||||||
<button v-if="hide" class="hidden" @click="hide = false">
|
<button v-if="hide" class="hidden" @click="hide = false">
|
||||||
<ImgWithBlurhash
|
<ImgWithBlurhash
|
||||||
:hash="media.blurhash"
|
:hash="media.blurhash"
|
||||||
@ -89,7 +89,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { watch, ref, computed } from "vue";
|
import { computed, ref, watch } from "vue";
|
||||||
import VuePlyr from "vue-plyr";
|
import VuePlyr from "vue-plyr";
|
||||||
import "vue-plyr/dist/vue-plyr.css";
|
import "vue-plyr/dist/vue-plyr.css";
|
||||||
import type * as misskey from "firefish-js";
|
import type * as misskey from "firefish-js";
|
||||||
@ -104,7 +104,7 @@ const props = defineProps<{
|
|||||||
raw?: boolean;
|
raw?: boolean;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
let hide = ref(true);
|
const hide = ref(true);
|
||||||
|
|
||||||
const plyr = ref();
|
const plyr = ref();
|
||||||
|
|
||||||
|
@ -71,7 +71,7 @@ const props = withDefaults(
|
|||||||
);
|
);
|
||||||
|
|
||||||
const audioEl = ref<HTMLAudioElement | null>();
|
const audioEl = ref<HTMLAudioElement | null>();
|
||||||
let hide = ref(true);
|
const hide = ref(true);
|
||||||
|
|
||||||
function volumechange() {
|
function volumechange() {
|
||||||
if (audioEl.value)
|
if (audioEl.value)
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { onMounted, ref } from "vue";
|
import { onMounted, ref } from "vue";
|
||||||
import * as misskey from "firefish-js";
|
import type * as misskey from "firefish-js";
|
||||||
import PhotoSwipeLightbox from "photoswipe/lightbox";
|
import PhotoSwipeLightbox from "photoswipe/lightbox";
|
||||||
import PhotoSwipe from "photoswipe";
|
import PhotoSwipe from "photoswipe";
|
||||||
import "photoswipe/style.css";
|
import "photoswipe/style.css";
|
||||||
@ -125,11 +125,11 @@ onMounted(() => {
|
|||||||
className: "pwsp__alt-text-container",
|
className: "pwsp__alt-text-container",
|
||||||
appendTo: "wrapper",
|
appendTo: "wrapper",
|
||||||
onInit: (el, pwsp) => {
|
onInit: (el, pwsp) => {
|
||||||
let textBox = document.createElement("p");
|
const textBox = document.createElement("p");
|
||||||
textBox.className = "pwsp__alt-text";
|
textBox.className = "pwsp__alt-text";
|
||||||
el.appendChild(textBox);
|
el.appendChild(textBox);
|
||||||
|
|
||||||
let preventProp = function (ev: Event): void {
|
const preventProp = function (ev: Event): void {
|
||||||
ev.stopPropagation();
|
ev.stopPropagation();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { nextTick, onMounted, ref } from "vue";
|
import { nextTick, onMounted, ref } from "vue";
|
||||||
import MkMenu from "./MkMenu.vue";
|
import MkMenu from "./MkMenu.vue";
|
||||||
import { MenuItem } from "@/types/menu";
|
import type { MenuItem } from "@/types/menu";
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
items: MenuItem[];
|
items: MenuItem[];
|
||||||
|
@ -14,8 +14,8 @@
|
|||||||
width: width && !asDrawer ? width + 'px' : '',
|
width: width && !asDrawer ? width + 'px' : '',
|
||||||
maxHeight: maxHeight ? maxHeight + 'px' : '',
|
maxHeight: maxHeight ? maxHeight + 'px' : '',
|
||||||
}"
|
}"
|
||||||
@contextmenu.self="(e) => e.preventDefault()"
|
|
||||||
tabindex="-1"
|
tabindex="-1"
|
||||||
|
@contextmenu.self="(e) => e.preventDefault()"
|
||||||
>
|
>
|
||||||
<template v-for="item in items2">
|
<template v-for="item in items2">
|
||||||
<div v-if="item === null" class="divider"></div>
|
<div v-if="item === null" class="divider"></div>
|
||||||
@ -47,7 +47,7 @@
|
|||||||
v-if="item.avatar"
|
v-if="item.avatar"
|
||||||
:user="item.avatar"
|
:user="item.avatar"
|
||||||
class="avatar"
|
class="avatar"
|
||||||
disableLink
|
disable-link
|
||||||
/>
|
/>
|
||||||
<span :style="item.textStyle || ''">{{
|
<span :style="item.textStyle || ''">{{
|
||||||
item.text
|
item.text
|
||||||
@ -100,7 +100,7 @@
|
|||||||
<MkAvatar
|
<MkAvatar
|
||||||
:user="item.user"
|
:user="item.user"
|
||||||
class="avatar"
|
class="avatar"
|
||||||
disableLink
|
disable-link
|
||||||
/><MkUserName :user="item.user" />
|
/><MkUserName :user="item.user" />
|
||||||
<span
|
<span
|
||||||
v-if="item.indicate"
|
v-if="item.indicate"
|
||||||
@ -168,7 +168,7 @@
|
|||||||
v-if="item.avatar"
|
v-if="item.avatar"
|
||||||
:user="item.avatar"
|
:user="item.avatar"
|
||||||
class="avatar"
|
class="avatar"
|
||||||
disableLink
|
disable-link
|
||||||
/>
|
/>
|
||||||
<span :style="item.textStyle || ''">{{
|
<span :style="item.textStyle || ''">{{
|
||||||
item.text
|
item.text
|
||||||
@ -210,11 +210,16 @@ import {
|
|||||||
ref,
|
ref,
|
||||||
watch,
|
watch,
|
||||||
} from "vue";
|
} from "vue";
|
||||||
|
import { FocusTrap } from "focus-trap-vue";
|
||||||
import FormSwitch from "@/components/form/switch.vue";
|
import FormSwitch from "@/components/form/switch.vue";
|
||||||
import { MenuItem, InnerMenuItem, MenuPending, MenuAction } from "@/types/menu";
|
import type {
|
||||||
|
InnerMenuItem,
|
||||||
|
MenuAction,
|
||||||
|
MenuItem,
|
||||||
|
MenuPending,
|
||||||
|
} from "@/types/menu";
|
||||||
import * as os from "@/os";
|
import * as os from "@/os";
|
||||||
import { i18n } from "@/i18n";
|
import { i18n } from "@/i18n";
|
||||||
import { FocusTrap } from "focus-trap-vue";
|
|
||||||
|
|
||||||
const XChild = defineAsyncComponent(() => import("./MkMenu.child.vue"));
|
const XChild = defineAsyncComponent(() => import("./MkMenu.child.vue"));
|
||||||
const focusTrap = ref();
|
const focusTrap = ref();
|
||||||
@ -233,13 +238,13 @@ const emit = defineEmits<{
|
|||||||
(ev: "close", actioned?: boolean): void;
|
(ev: "close", actioned?: boolean): void;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
let itemsEl = ref<HTMLDivElement>();
|
const itemsEl = ref<HTMLDivElement>();
|
||||||
|
|
||||||
let items2: InnerMenuItem[] = ref([]);
|
const items2: InnerMenuItem[] = ref([]);
|
||||||
|
|
||||||
let child = ref<InstanceType<typeof XChild>>();
|
const child = ref<InstanceType<typeof XChild>>();
|
||||||
|
|
||||||
let childShowingItem = ref<MenuItem | null>();
|
const childShowingItem = ref<MenuItem | null>();
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
() => props.items,
|
() => props.items,
|
||||||
@ -267,8 +272,8 @@ watch(
|
|||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
let childMenu = ref<MenuItem[] | null>();
|
const childMenu = ref<MenuItem[] | null>();
|
||||||
let childTarget = ref<HTMLElement | null>();
|
const childTarget = ref<HTMLElement | null>();
|
||||||
|
|
||||||
function closeChild() {
|
function closeChild() {
|
||||||
childMenu.value = null;
|
childMenu.value = null;
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { watch, ref } from "vue";
|
import { ref, watch } from "vue";
|
||||||
import { v4 as uuid } from "uuid";
|
import { v4 as uuid } from "uuid";
|
||||||
import tinycolor from "tinycolor2";
|
import tinycolor from "tinycolor2";
|
||||||
import { useInterval } from "@/scripts/use-interval";
|
import { useInterval } from "@/scripts/use-interval";
|
||||||
@ -37,10 +37,10 @@ const props = defineProps<{
|
|||||||
const viewBoxX = 50;
|
const viewBoxX = 50;
|
||||||
const viewBoxY = 50;
|
const viewBoxY = 50;
|
||||||
const gradientId = uuid();
|
const gradientId = uuid();
|
||||||
let polylinePoints = ref("");
|
const polylinePoints = ref("");
|
||||||
let polygonPoints = ref("");
|
const polygonPoints = ref("");
|
||||||
let headX = ref<number | null>(null);
|
const headX = ref<number | null>(null);
|
||||||
let headY = ref<number | null>(null);
|
const headY = ref<number | null>(null);
|
||||||
const accent = tinycolor(
|
const accent = tinycolor(
|
||||||
getComputedStyle(document.documentElement).getPropertyValue("--accent"),
|
getComputedStyle(document.documentElement).getPropertyValue("--accent"),
|
||||||
);
|
);
|
||||||
|
@ -25,6 +25,7 @@
|
|||||||
<div
|
<div
|
||||||
v-show="manualShowing != null ? manualShowing : showing"
|
v-show="manualShowing != null ? manualShowing : showing"
|
||||||
v-hotkey.global="keymap"
|
v-hotkey.global="keymap"
|
||||||
|
v-focus
|
||||||
:class="[
|
:class="[
|
||||||
$style.root,
|
$style.root,
|
||||||
{
|
{
|
||||||
@ -44,7 +45,6 @@
|
|||||||
'--transformOrigin': transformOrigin,
|
'--transformOrigin': transformOrigin,
|
||||||
}"
|
}"
|
||||||
tabindex="-1"
|
tabindex="-1"
|
||||||
v-focus
|
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
class="_modalBg data-cy-bg"
|
class="_modalBg data-cy-bg"
|
||||||
@ -78,20 +78,20 @@
|
|||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import {
|
import {
|
||||||
|
computed,
|
||||||
nextTick,
|
nextTick,
|
||||||
onMounted,
|
onMounted,
|
||||||
watch,
|
|
||||||
provide,
|
|
||||||
onUnmounted,
|
onUnmounted,
|
||||||
|
provide,
|
||||||
ref,
|
ref,
|
||||||
shallowRef,
|
shallowRef,
|
||||||
computed,
|
watch,
|
||||||
} from "vue";
|
} from "vue";
|
||||||
|
import { FocusTrap } from "focus-trap-vue";
|
||||||
import * as os from "@/os";
|
import * as os from "@/os";
|
||||||
import { isTouchUsing } from "@/scripts/touch";
|
import { isTouchUsing } from "@/scripts/touch";
|
||||||
import { defaultStore } from "@/store";
|
import { defaultStore } from "@/store";
|
||||||
import { deviceKind } from "@/scripts/device-kind";
|
import { deviceKind } from "@/scripts/device-kind";
|
||||||
import { FocusTrap } from "focus-trap-vue";
|
|
||||||
|
|
||||||
function getFixedContainer(el: Element | null): Element | null {
|
function getFixedContainer(el: Element | null): Element | null {
|
||||||
if (el == null || el.tagName === "BODY") return null;
|
if (el == null || el.tagName === "BODY") return null;
|
||||||
@ -139,13 +139,13 @@ const emit = defineEmits<{
|
|||||||
|
|
||||||
provide("modal", true);
|
provide("modal", true);
|
||||||
|
|
||||||
let maxHeight = ref<number>();
|
const maxHeight = ref<number>();
|
||||||
let fixed = ref(false);
|
const fixed = ref(false);
|
||||||
let transformOrigin = ref("center");
|
const transformOrigin = ref("center");
|
||||||
let showing = ref(true);
|
const showing = ref(true);
|
||||||
let content = shallowRef<HTMLElement>();
|
const content = shallowRef<HTMLElement>();
|
||||||
const zIndex = os.claimZIndex(props.zPriority);
|
const zIndex = os.claimZIndex(props.zPriority);
|
||||||
let useSendAnime = ref(false);
|
const useSendAnime = ref(false);
|
||||||
const type = computed<ModalTypes>(() => {
|
const type = computed<ModalTypes>(() => {
|
||||||
if (props.preferType === "auto") {
|
if (props.preferType === "auto") {
|
||||||
if (
|
if (
|
||||||
@ -164,7 +164,7 @@ const type = computed<ModalTypes>(() => {
|
|||||||
const isEnableBgTransparent = computed(
|
const isEnableBgTransparent = computed(
|
||||||
() => props.transparentBg && type.value === "popup",
|
() => props.transparentBg && type.value === "popup",
|
||||||
);
|
);
|
||||||
let transitionName = computed(() =>
|
const transitionName = computed(() =>
|
||||||
defaultStore.state.animation
|
defaultStore.state.animation
|
||||||
? useSendAnime.value
|
? useSendAnime.value
|
||||||
? "send"
|
? "send"
|
||||||
@ -175,7 +175,7 @@ let transitionName = computed(() =>
|
|||||||
: "modal"
|
: "modal"
|
||||||
: "",
|
: "",
|
||||||
);
|
);
|
||||||
let transitionDuration = computed(() =>
|
const transitionDuration = computed(() =>
|
||||||
transitionName.value === "send"
|
transitionName.value === "send"
|
||||||
? 400
|
? 400
|
||||||
: transitionName.value === "modal-popup"
|
: transitionName.value === "modal-popup"
|
||||||
@ -235,8 +235,7 @@ const align = () => {
|
|||||||
const width = content.value!.offsetWidth;
|
const width = content.value!.offsetWidth;
|
||||||
const height = content.value!.offsetHeight;
|
const height = content.value!.offsetHeight;
|
||||||
|
|
||||||
let left;
|
let left, top;
|
||||||
let top;
|
|
||||||
|
|
||||||
const x = srcRect.left + (fixed.value ? 0 : window.pageXOffset);
|
const x = srcRect.left + (fixed.value ? 0 : window.pageXOffset);
|
||||||
const y = srcRect.top + (fixed.value ? 0 : window.pageYOffset);
|
const y = srcRect.top + (fixed.value ? 0 : window.pageYOffset);
|
||||||
@ -321,8 +320,8 @@ const align = () => {
|
|||||||
left = 0;
|
left = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
let transformOriginX = "center";
|
let transformOriginX = "center",
|
||||||
let transformOriginY = "center";
|
transformOriginY = "center";
|
||||||
|
|
||||||
if (
|
if (
|
||||||
top >=
|
top >=
|
||||||
|
@ -28,8 +28,8 @@
|
|||||||
</span>
|
</span>
|
||||||
<button
|
<button
|
||||||
class="_button"
|
class="_button"
|
||||||
@click="$refs.modal.close()"
|
|
||||||
:aria-label="i18n.t('close')"
|
:aria-label="i18n.t('close')"
|
||||||
|
@click="$refs.modal.close()"
|
||||||
>
|
>
|
||||||
<i class="ph-x ph-bold ph-lg"></i>
|
<i class="ph-x ph-bold ph-lg"></i>
|
||||||
</button>
|
</button>
|
||||||
@ -52,7 +52,8 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ComputedRef, provide, ref, computed } from "vue";
|
import type { ComputedRef } from "vue";
|
||||||
|
import { computed, provide, ref } from "vue";
|
||||||
import MkModal from "@/components/MkModal.vue";
|
import MkModal from "@/components/MkModal.vue";
|
||||||
import { popout as _popout } from "@/scripts/popout";
|
import { popout as _popout } from "@/scripts/popout";
|
||||||
import copyToClipboard from "@/scripts/copy-to-clipboard";
|
import copyToClipboard from "@/scripts/copy-to-clipboard";
|
||||||
@ -60,7 +61,8 @@ import { url } from "@/config";
|
|||||||
import * as os from "@/os";
|
import * as os from "@/os";
|
||||||
import { mainRouter, routes } from "@/router";
|
import { mainRouter, routes } from "@/router";
|
||||||
import { i18n } from "@/i18n";
|
import { i18n } from "@/i18n";
|
||||||
import { PageMetadata, provideMetadataReceiver } from "@/scripts/page-metadata";
|
import type { PageMetadata } from "@/scripts/page-metadata";
|
||||||
|
import { provideMetadataReceiver } from "@/scripts/page-metadata";
|
||||||
import { Router } from "@/nirax";
|
import { Router } from "@/nirax";
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
@ -76,12 +78,12 @@ const router = new Router(routes, props.initialPath);
|
|||||||
|
|
||||||
router.addListener("push", (ctx) => {});
|
router.addListener("push", (ctx) => {});
|
||||||
|
|
||||||
let pageMetadata = ref<null | ComputedRef<PageMetadata>>();
|
const pageMetadata = ref<null | ComputedRef<PageMetadata>>();
|
||||||
let rootEl = ref();
|
const rootEl = ref();
|
||||||
let modal = ref<InstanceType<typeof MkModal>>();
|
const modal = ref<InstanceType<typeof MkModal>>();
|
||||||
let path = ref(props.initialPath);
|
const path = ref(props.initialPath);
|
||||||
let width = ref(860);
|
const width = ref(860);
|
||||||
let height = ref(660);
|
const height = ref(660);
|
||||||
const history = [];
|
const history = [];
|
||||||
|
|
||||||
provide("router", router);
|
provide("router", router);
|
||||||
|
@ -25,10 +25,10 @@
|
|||||||
<div ref="headerEl" class="header">
|
<div ref="headerEl" class="header">
|
||||||
<button
|
<button
|
||||||
v-if="props.withOkButton"
|
v-if="props.withOkButton"
|
||||||
|
v-tooltip="i18n.ts.close"
|
||||||
:aria-label="i18n.t('close')"
|
:aria-label="i18n.t('close')"
|
||||||
class="_button"
|
class="_button"
|
||||||
@click="$emit('close')"
|
@click="$emit('close')"
|
||||||
v-tooltip="i18n.ts.close"
|
|
||||||
>
|
>
|
||||||
<i class="ph-x ph-bold ph-lg"></i>
|
<i class="ph-x ph-bold ph-lg"></i>
|
||||||
</button>
|
</button>
|
||||||
@ -92,9 +92,9 @@ const emit = defineEmits<{
|
|||||||
(event: "ok"): void;
|
(event: "ok"): void;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
let modal = shallowRef<InstanceType<typeof MkModal>>();
|
const modal = shallowRef<InstanceType<typeof MkModal>>();
|
||||||
let rootEl = shallowRef<HTMLElement>();
|
const rootEl = shallowRef<HTMLElement>();
|
||||||
let headerEl = shallowRef<HTMLElement>();
|
const headerEl = shallowRef<HTMLElement>();
|
||||||
|
|
||||||
const close = (ev) => {
|
const close = (ev) => {
|
||||||
modal.value?.close(ev);
|
modal.value?.close(ev);
|
||||||
|
@ -1,15 +1,15 @@
|
|||||||
<template>
|
<template>
|
||||||
<div
|
<div
|
||||||
:aria-label="accessibleLabel"
|
|
||||||
v-if="!muted.muted"
|
v-if="!muted.muted"
|
||||||
v-show="!isDeleted"
|
v-show="!isDeleted"
|
||||||
|
:id="appearNote.id"
|
||||||
ref="el"
|
ref="el"
|
||||||
v-hotkey="keymap"
|
v-hotkey="keymap"
|
||||||
v-size="{ max: [500, 350] }"
|
v-size="{ max: [500, 350] }"
|
||||||
|
:aria-label="accessibleLabel"
|
||||||
class="tkcbzcuz note-container"
|
class="tkcbzcuz note-container"
|
||||||
:tabindex="!isDeleted ? '-1' : null"
|
:tabindex="!isDeleted ? '-1' : null"
|
||||||
:class="{ renote: isRenote }"
|
:class="{ renote: isRenote }"
|
||||||
:id="appearNote.id"
|
|
||||||
>
|
>
|
||||||
<MkNoteSub
|
<MkNoteSub
|
||||||
v-if="appearNote.reply && !detailedView && !collapsedReply"
|
v-if="appearNote.reply && !detailedView && !collapsedReply"
|
||||||
@ -19,10 +19,10 @@
|
|||||||
<div
|
<div
|
||||||
v-if="!detailedView"
|
v-if="!detailedView"
|
||||||
class="note-context"
|
class="note-context"
|
||||||
@click="noteClick"
|
|
||||||
:class="{
|
:class="{
|
||||||
collapsedReply: collapsedReply && appearNote.reply,
|
collapsedReply: collapsedReply && appearNote.reply,
|
||||||
}"
|
}"
|
||||||
|
@click="noteClick"
|
||||||
>
|
>
|
||||||
<div class="line"></div>
|
<div class="line"></div>
|
||||||
<div v-if="appearNote._prId_" class="info">
|
<div v-if="appearNote._prId_" class="info">
|
||||||
@ -87,11 +87,11 @@
|
|||||||
</div>
|
</div>
|
||||||
<article
|
<article
|
||||||
class="article"
|
class="article"
|
||||||
@contextmenu.stop="onContextmenu"
|
|
||||||
@click="noteClick"
|
|
||||||
:style="{
|
:style="{
|
||||||
cursor: expandOnNoteClick && !detailedView ? 'pointer' : '',
|
cursor: expandOnNoteClick && !detailedView ? 'pointer' : '',
|
||||||
}"
|
}"
|
||||||
|
@contextmenu.stop="onContextmenu"
|
||||||
|
@click="noteClick"
|
||||||
>
|
>
|
||||||
<div class="main">
|
<div class="main">
|
||||||
<div class="header-container">
|
<div class="header-container">
|
||||||
@ -103,8 +103,8 @@
|
|||||||
class="text"
|
class="text"
|
||||||
:note="appearNote"
|
:note="appearNote"
|
||||||
:detailed="true"
|
:detailed="true"
|
||||||
:detailedView="detailedView"
|
:detailed-view="detailedView"
|
||||||
:parentId="appearNote.parentId"
|
:parent-id="appearNote.parentId"
|
||||||
@push="(e) => router.push(notePage(e))"
|
@push="(e) => router.push(notePage(e))"
|
||||||
@focusfooter="footerEl.focus()"
|
@focusfooter="footerEl.focus()"
|
||||||
@expanded="(e) => setPostExpanded(e)"
|
@expanded="(e) => setPostExpanded(e)"
|
||||||
@ -171,7 +171,7 @@
|
|||||||
class="button"
|
class="button"
|
||||||
:note="appearNote"
|
:note="appearNote"
|
||||||
:count="appearNote.renoteCount"
|
:count="appearNote.renoteCount"
|
||||||
:detailedView="detailedView"
|
:detailed-view="detailedView"
|
||||||
/>
|
/>
|
||||||
<XStarButtonNoEmoji
|
<XStarButtonNoEmoji
|
||||||
v-if="!enableEmojiReactions"
|
v-if="!enableEmojiReactions"
|
||||||
@ -212,9 +212,9 @@
|
|||||||
appearNote.myReaction != null
|
appearNote.myReaction != null
|
||||||
"
|
"
|
||||||
ref="reactButton"
|
ref="reactButton"
|
||||||
|
v-tooltip.noDelay.bottom="i18n.ts.removeReaction"
|
||||||
class="button _button reacted"
|
class="button _button reacted"
|
||||||
@click.stop="undoReact(appearNote)"
|
@click.stop="undoReact(appearNote)"
|
||||||
v-tooltip.noDelay.bottom="i18n.ts.removeReaction"
|
|
||||||
>
|
>
|
||||||
<i class="ph-minus ph-bold ph-lg"></i>
|
<i class="ph-minus ph-bold ph-lg"></i>
|
||||||
</button>
|
</button>
|
||||||
@ -259,8 +259,8 @@ import { computed, inject, onMounted, ref } from "vue";
|
|||||||
import * as mfm from "mfm-js";
|
import * as mfm from "mfm-js";
|
||||||
import type { Ref } from "vue";
|
import type { Ref } from "vue";
|
||||||
import type * as misskey from "firefish-js";
|
import type * as misskey from "firefish-js";
|
||||||
import MkNoteSub from "@/components/MkNoteSub.vue";
|
|
||||||
import MkSubNoteContent from "./MkSubNoteContent.vue";
|
import MkSubNoteContent from "./MkSubNoteContent.vue";
|
||||||
|
import MkNoteSub from "@/components/MkNoteSub.vue";
|
||||||
import XNoteHeader from "@/components/MkNoteHeader.vue";
|
import XNoteHeader from "@/components/MkNoteHeader.vue";
|
||||||
import XRenoteButton from "@/components/MkRenoteButton.vue";
|
import XRenoteButton from "@/components/MkRenoteButton.vue";
|
||||||
import XReactionsViewer from "@/components/MkReactionsViewer.vue";
|
import XReactionsViewer from "@/components/MkReactionsViewer.vue";
|
||||||
@ -271,7 +271,7 @@ import MkVisibility from "@/components/MkVisibility.vue";
|
|||||||
import copyToClipboard from "@/scripts/copy-to-clipboard";
|
import copyToClipboard from "@/scripts/copy-to-clipboard";
|
||||||
import { url } from "@/config";
|
import { url } from "@/config";
|
||||||
import { pleaseLogin } from "@/scripts/please-login";
|
import { pleaseLogin } from "@/scripts/please-login";
|
||||||
import { focusPrev, focusNext } from "@/scripts/focus";
|
import { focusNext, focusPrev } from "@/scripts/focus";
|
||||||
import { getWordSoftMute } from "@/scripts/check-word-mute";
|
import { getWordSoftMute } from "@/scripts/check-word-mute";
|
||||||
import { useRouter } from "@/router";
|
import { useRouter } from "@/router";
|
||||||
import { userPage } from "@/filters/user";
|
import { userPage } from "@/filters/user";
|
||||||
@ -297,7 +297,7 @@ const props = defineProps<{
|
|||||||
|
|
||||||
const inChannel = inject("inChannel", null);
|
const inChannel = inject("inChannel", null);
|
||||||
|
|
||||||
let note = ref(deepClone(props.note));
|
const note = ref(deepClone(props.note));
|
||||||
|
|
||||||
const softMuteReasonI18nSrc = (what?: string) => {
|
const softMuteReasonI18nSrc = (what?: string) => {
|
||||||
if (what === "note") return i18n.ts.userSaysSomethingReason;
|
if (what === "note") return i18n.ts.userSaysSomethingReason;
|
||||||
@ -333,7 +333,7 @@ const starButton = ref<InstanceType<typeof XStarButton>>();
|
|||||||
const renoteButton = ref<InstanceType<typeof XRenoteButton>>();
|
const renoteButton = ref<InstanceType<typeof XRenoteButton>>();
|
||||||
const renoteTime = ref<HTMLElement>();
|
const renoteTime = ref<HTMLElement>();
|
||||||
const reactButton = ref<HTMLElement>();
|
const reactButton = ref<HTMLElement>();
|
||||||
let appearNote = computed(() =>
|
const appearNote = computed(() =>
|
||||||
isRenote ? (note.value.renote as misskey.entities.Note) : note.value,
|
isRenote ? (note.value.renote as misskey.entities.Note) : note.value,
|
||||||
);
|
);
|
||||||
const isMyRenote = $i && $i.id === note.value.userId;
|
const isMyRenote = $i && $i.id === note.value.userId;
|
||||||
@ -385,7 +385,7 @@ function react(viaKeyboard = false): void {
|
|||||||
(reaction) => {
|
(reaction) => {
|
||||||
os.api("notes/reactions/create", {
|
os.api("notes/reactions/create", {
|
||||||
noteId: appearNote.value.id,
|
noteId: appearNote.value.id,
|
||||||
reaction: reaction,
|
reaction,
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
() => {
|
() => {
|
||||||
@ -516,7 +516,7 @@ function showRenoteMenu(viaKeyboard = false): void {
|
|||||||
],
|
],
|
||||||
renoteTime.value,
|
renoteTime.value,
|
||||||
{
|
{
|
||||||
viaKeyboard: viaKeyboard,
|
viaKeyboard,
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -560,7 +560,7 @@ function readPromo() {
|
|||||||
isDeleted.value = true;
|
isDeleted.value = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
let postIsExpanded = ref(false);
|
const postIsExpanded = ref(false);
|
||||||
|
|
||||||
function setPostExpanded(val: boolean) {
|
function setPostExpanded(val: boolean) {
|
||||||
postIsExpanded.value = val;
|
postIsExpanded.value = val;
|
||||||
|
@ -10,27 +10,27 @@
|
|||||||
:class="{ renote: isRenote }"
|
:class="{ renote: isRenote }"
|
||||||
>
|
>
|
||||||
<MkNoteSub
|
<MkNoteSub
|
||||||
v-if="conversation"
|
|
||||||
v-for="note in conversation"
|
v-for="note in conversation"
|
||||||
|
v-if="conversation"
|
||||||
:key="note.id"
|
:key="note.id"
|
||||||
class="reply-to"
|
class="reply-to"
|
||||||
:note="note"
|
:note="note"
|
||||||
:detailedView="true"
|
:detailed-view="true"
|
||||||
/>
|
/>
|
||||||
<MkLoading v-else-if="note.reply" mini />
|
<MkLoading v-else-if="note.reply" mini />
|
||||||
<MkNoteSub
|
<MkNoteSub
|
||||||
v-if="note.reply"
|
v-if="note.reply"
|
||||||
:note="note.reply"
|
:note="note.reply"
|
||||||
class="reply-to"
|
class="reply-to"
|
||||||
:detailedView="true"
|
:detailed-view="true"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<MkNote
|
<MkNote
|
||||||
ref="noteEl"
|
ref="noteEl"
|
||||||
@contextmenu.stop="onContextmenu"
|
|
||||||
tabindex="-1"
|
tabindex="-1"
|
||||||
:note="note"
|
:note="note"
|
||||||
detailedView
|
detailed-view
|
||||||
|
@contextmenu.stop="onContextmenu"
|
||||||
></MkNote>
|
></MkNote>
|
||||||
|
|
||||||
<MkTab v-model="tab" :style="'underline'" @update:modelValue="loadTab">
|
<MkTab v-model="tab" :style="'underline'" @update:modelValue="loadTab">
|
||||||
@ -41,22 +41,22 @@
|
|||||||
}}</span>
|
}}</span>
|
||||||
{{ i18n.ts._notification._types.reply }}
|
{{ i18n.ts._notification._types.reply }}
|
||||||
</option>
|
</option>
|
||||||
<option value="renotes" v-if="note.renoteCount > 0">
|
<option v-if="note.renoteCount > 0" value="renotes">
|
||||||
<!-- <i class="ph-repeat ph-bold ph-lg"></i> -->
|
<!-- <i class="ph-repeat ph-bold ph-lg"></i> -->
|
||||||
<span class="count">{{ note.renoteCount }}</span>
|
<span class="count">{{ note.renoteCount }}</span>
|
||||||
{{ i18n.ts._notification._types.renote }}
|
{{ i18n.ts._notification._types.renote }}
|
||||||
</option>
|
</option>
|
||||||
<option value="reactions" v-if="reactionsCount > 0">
|
<option v-if="reactionsCount > 0" value="reactions">
|
||||||
<!-- <i class="ph-smiley ph-bold ph-lg"></i> -->
|
<!-- <i class="ph-smiley ph-bold ph-lg"></i> -->
|
||||||
<span class="count">{{ reactionsCount }}</span>
|
<span class="count">{{ reactionsCount }}</span>
|
||||||
{{ i18n.ts.reaction }}
|
{{ i18n.ts.reaction }}
|
||||||
</option>
|
</option>
|
||||||
<option value="quotes" v-if="directQuotes?.length > 0">
|
<option v-if="directQuotes?.length > 0" value="quotes">
|
||||||
<!-- <i class="ph-quotes ph-bold ph-lg"></i> -->
|
<!-- <i class="ph-quotes ph-bold ph-lg"></i> -->
|
||||||
<span class="count">{{ directQuotes.length }}</span>
|
<span class="count">{{ directQuotes.length }}</span>
|
||||||
{{ i18n.ts._notification._types.quote }}
|
{{ i18n.ts._notification._types.quote }}
|
||||||
</option>
|
</option>
|
||||||
<option value="clips" v-if="clips?.length > 0">
|
<option v-if="clips?.length > 0" value="clips">
|
||||||
<!-- <i class="ph-paperclip ph-bold ph-lg"></i> -->
|
<!-- <i class="ph-paperclip ph-bold ph-lg"></i> -->
|
||||||
<span class="count">{{ clips.length }}</span>
|
<span class="count">{{ clips.length }}</span>
|
||||||
{{ i18n.ts.clips }}
|
{{ i18n.ts.clips }}
|
||||||
@ -64,26 +64,26 @@
|
|||||||
</MkTab>
|
</MkTab>
|
||||||
|
|
||||||
<MkNoteSub
|
<MkNoteSub
|
||||||
v-if="directReplies && tab === 'replies'"
|
|
||||||
v-for="note in directReplies"
|
v-for="note in directReplies"
|
||||||
|
v-if="directReplies && tab === 'replies'"
|
||||||
:key="note.id"
|
:key="note.id"
|
||||||
:note="note"
|
:note="note"
|
||||||
class="reply"
|
class="reply"
|
||||||
:conversation="replies"
|
:conversation="replies"
|
||||||
:detailedView="true"
|
:detailed-view="true"
|
||||||
:parentId="note.id"
|
:parent-id="note.id"
|
||||||
/>
|
/>
|
||||||
<MkLoading v-else-if="tab === 'replies' && note.repliesCount > 0" />
|
<MkLoading v-else-if="tab === 'replies' && note.repliesCount > 0" />
|
||||||
|
|
||||||
<MkNoteSub
|
<MkNoteSub
|
||||||
v-if="directQuotes && tab === 'quotes'"
|
|
||||||
v-for="note in directQuotes"
|
v-for="note in directQuotes"
|
||||||
|
v-if="directQuotes && tab === 'quotes'"
|
||||||
:key="note.id"
|
:key="note.id"
|
||||||
:note="note"
|
:note="note"
|
||||||
class="reply"
|
class="reply"
|
||||||
:conversation="replies"
|
:conversation="replies"
|
||||||
:detailedView="true"
|
:detailed-view="true"
|
||||||
:parentId="note.id"
|
:parent-id="note.id"
|
||||||
/>
|
/>
|
||||||
<MkLoading v-else-if="tab === 'quotes' && directQuotes.length > 0" />
|
<MkLoading v-else-if="tab === 'quotes' && directQuotes.length > 0" />
|
||||||
|
|
||||||
@ -94,8 +94,8 @@
|
|||||||
:pagination="pagination"
|
:pagination="pagination"
|
||||||
> -->
|
> -->
|
||||||
<MkUserCardMini
|
<MkUserCardMini
|
||||||
v-if="tab === 'renotes' && renotes"
|
|
||||||
v-for="item in renotes"
|
v-for="item in renotes"
|
||||||
|
v-if="tab === 'renotes' && renotes"
|
||||||
:key="item.user.id"
|
:key="item.user.id"
|
||||||
:user="item.user"
|
:user="item.user"
|
||||||
:with-chart="false"
|
:with-chart="false"
|
||||||
@ -151,11 +151,12 @@
|
|||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { onMounted, onUnmounted, onUpdated, ref } from "vue";
|
import { onMounted, onUnmounted, onUpdated, ref } from "vue";
|
||||||
import * as misskey from "firefish-js";
|
import type * as misskey from "firefish-js";
|
||||||
|
import type { NoteUpdatedEvent } from "firefish-js/built/streaming.types";
|
||||||
import MkTab from "@/components/MkTab.vue";
|
import MkTab from "@/components/MkTab.vue";
|
||||||
import MkNote from "@/components/MkNote.vue";
|
import MkNote from "@/components/MkNote.vue";
|
||||||
import MkNoteSub from "@/components/MkNoteSub.vue";
|
import MkNoteSub from "@/components/MkNoteSub.vue";
|
||||||
import XRenoteButton from "@/components/MkRenoteButton.vue";
|
import type XRenoteButton from "@/components/MkRenoteButton.vue";
|
||||||
import MkUserCardMini from "@/components/MkUserCardMini.vue";
|
import MkUserCardMini from "@/components/MkUserCardMini.vue";
|
||||||
import MkReactedUsers from "@/components/MkReactedUsers.vue";
|
import MkReactedUsers from "@/components/MkReactedUsers.vue";
|
||||||
import { pleaseLogin } from "@/scripts/please-login";
|
import { pleaseLogin } from "@/scripts/please-login";
|
||||||
@ -170,16 +171,15 @@ import { getNoteMenu } from "@/scripts/get-note-menu";
|
|||||||
import { useNoteCapture } from "@/scripts/use-note-capture";
|
import { useNoteCapture } from "@/scripts/use-note-capture";
|
||||||
import { deepClone } from "@/scripts/clone";
|
import { deepClone } from "@/scripts/clone";
|
||||||
import { stream } from "@/stream";
|
import { stream } from "@/stream";
|
||||||
import { NoteUpdatedEvent } from "firefish-js/built/streaming.types";
|
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
note: misskey.entities.Note;
|
note: misskey.entities.Note;
|
||||||
pinned?: boolean;
|
pinned?: boolean;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
let tab = ref("replies");
|
const tab = ref("replies");
|
||||||
|
|
||||||
let note = ref(deepClone(props.note));
|
const note = ref(deepClone(props.note));
|
||||||
|
|
||||||
const softMuteReasonI18nSrc = (what?: string) => {
|
const softMuteReasonI18nSrc = (what?: string) => {
|
||||||
if (what === "note") return i18n.ts.userSaysSomethingReason;
|
if (what === "note") return i18n.ts.userSaysSomethingReason;
|
||||||
@ -214,12 +214,12 @@ const muted = ref(
|
|||||||
);
|
);
|
||||||
const translation = ref(null);
|
const translation = ref(null);
|
||||||
const translating = ref(false);
|
const translating = ref(false);
|
||||||
let conversation = ref<null | misskey.entities.Note[]>([]);
|
const conversation = ref<null | misskey.entities.Note[]>([]);
|
||||||
const replies = ref<misskey.entities.Note[]>([]);
|
const replies = ref<misskey.entities.Note[]>([]);
|
||||||
let directReplies = ref<null | misskey.entities.Note[]>([]);
|
const directReplies = ref<null | misskey.entities.Note[]>([]);
|
||||||
let directQuotes = ref<null | misskey.entities.Note[]>([]);
|
const directQuotes = ref<null | misskey.entities.Note[]>([]);
|
||||||
let clips = ref();
|
const clips = ref();
|
||||||
let renotes = ref();
|
const renotes = ref();
|
||||||
let isScrolling;
|
let isScrolling;
|
||||||
|
|
||||||
const reactionsCount = Object.values(props.note.reactions).reduce(
|
const reactionsCount = Object.values(props.note.reactions).reduce(
|
||||||
@ -238,7 +238,7 @@ const keymap = {
|
|||||||
|
|
||||||
useNoteCapture({
|
useNoteCapture({
|
||||||
rootEl: el,
|
rootEl: el,
|
||||||
note: note,
|
note,
|
||||||
isDeletedRef: isDeleted,
|
isDeletedRef: isDeleted,
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -260,7 +260,7 @@ function react(viaKeyboard = false): void {
|
|||||||
(reaction) => {
|
(reaction) => {
|
||||||
os.api("notes/reactions/create", {
|
os.api("notes/reactions/create", {
|
||||||
noteId: note.value.id,
|
noteId: note.value.id,
|
||||||
reaction: reaction,
|
reaction,
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
() => {
|
() => {
|
||||||
|
@ -49,7 +49,6 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref } from "vue";
|
import { ref } from "vue";
|
||||||
|
|
||||||
import {} from "vue";
|
|
||||||
import type * as misskey from "firefish-js";
|
import type * as misskey from "firefish-js";
|
||||||
import { defaultStore } from "@/store";
|
import { defaultStore } from "@/store";
|
||||||
import MkVisibility from "@/components/MkVisibility.vue";
|
import MkVisibility from "@/components/MkVisibility.vue";
|
||||||
@ -63,7 +62,7 @@ const props = defineProps<{
|
|||||||
pinned?: boolean;
|
pinned?: boolean;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
let note = ref(props.note);
|
const note = ref(props.note);
|
||||||
|
|
||||||
const showTicker =
|
const showTicker =
|
||||||
defaultStore.state.instanceTicker === "always" ||
|
defaultStore.state.instanceTicker === "always" ||
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div v-size="{ min: [350, 500] }" class="fefdfafb">
|
<div v-size="{ min: [350, 500] }" class="fefdfafb">
|
||||||
<MkAvatar class="avatar" :user="$i" disableLink />
|
<MkAvatar class="avatar" :user="$i" disable-link />
|
||||||
<div class="main">
|
<div class="main">
|
||||||
<div class="header">
|
<div class="header">
|
||||||
<MkUserName :user="$i" />
|
<MkUserName :user="$i" />
|
||||||
@ -11,7 +11,7 @@
|
|||||||
:text="preprocess(text).trim()"
|
:text="preprocess(text).trim()"
|
||||||
:author="$i"
|
:author="$i"
|
||||||
:i="$i"
|
:i="$i"
|
||||||
advancedMfm
|
advanced-mfm
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import * as misskey from "firefish-js";
|
import type * as misskey from "firefish-js";
|
||||||
import XNoteHeader from "@/components/MkNoteHeader.vue";
|
import XNoteHeader from "@/components/MkNoteHeader.vue";
|
||||||
import MkSubNoteContent from "@/components/MkSubNoteContent.vue";
|
import MkSubNoteContent from "@/components/MkSubNoteContent.vue";
|
||||||
|
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
<template>
|
<template>
|
||||||
<article
|
<article
|
||||||
v-if="!muted.muted || muted.what === 'reply'"
|
v-if="!muted.muted || muted.what === 'reply'"
|
||||||
|
:id="detailedView ? appearNote.id : null"
|
||||||
ref="el"
|
ref="el"
|
||||||
v-size="{ max: [450, 500] }"
|
v-size="{ max: [450, 500] }"
|
||||||
class="wrpstxzv"
|
class="wrpstxzv"
|
||||||
:id="detailedView ? appearNote.id : null"
|
|
||||||
tabindex="-1"
|
tabindex="-1"
|
||||||
:class="{
|
:class="{
|
||||||
children: depth > 1,
|
children: depth > 1,
|
||||||
@ -16,8 +16,8 @@
|
|||||||
<div v-if="conversation && depth > 1" class="line"></div>
|
<div v-if="conversation && depth > 1" class="line"></div>
|
||||||
<div
|
<div
|
||||||
class="main"
|
class="main"
|
||||||
@click="noteClick"
|
|
||||||
:style="{ cursor: expandOnNoteClick ? 'pointer' : '' }"
|
:style="{ cursor: expandOnNoteClick ? 'pointer' : '' }"
|
||||||
|
@click="noteClick"
|
||||||
>
|
>
|
||||||
<div class="avatar-container">
|
<div class="avatar-container">
|
||||||
<MkAvatar class="avatar" :user="appearNote.user" />
|
<MkAvatar class="avatar" :user="appearNote.user" />
|
||||||
@ -32,9 +32,9 @@
|
|||||||
<MkSubNoteContent
|
<MkSubNoteContent
|
||||||
class="text"
|
class="text"
|
||||||
:note="note"
|
:note="note"
|
||||||
:parentId="parentId"
|
:parent-id="parentId"
|
||||||
:conversation="conversation"
|
:conversation="conversation"
|
||||||
:detailedView="detailedView"
|
:detailed-view="detailedView"
|
||||||
@focusfooter="footerEl.focus()"
|
@focusfooter="footerEl.focus()"
|
||||||
/>
|
/>
|
||||||
<div v-if="translating || translation" class="translation">
|
<div v-if="translating || translation" class="translation">
|
||||||
@ -117,9 +117,9 @@
|
|||||||
appearNote.myReaction != null
|
appearNote.myReaction != null
|
||||||
"
|
"
|
||||||
ref="reactButton"
|
ref="reactButton"
|
||||||
|
v-tooltip.noDelay.bottom="i18n.ts.removeReaction"
|
||||||
class="button _button reacted"
|
class="button _button reacted"
|
||||||
@click.stop="undoReact(appearNote)"
|
@click.stop="undoReact(appearNote)"
|
||||||
v-tooltip.noDelay.bottom="i18n.ts.removeReaction"
|
|
||||||
>
|
>
|
||||||
<i class="ph-minus ph-bold ph-lg"></i>
|
<i class="ph-minus ph-bold ph-lg"></i>
|
||||||
</button>
|
</button>
|
||||||
@ -137,17 +137,17 @@
|
|||||||
</div>
|
</div>
|
||||||
<template v-if="conversation">
|
<template v-if="conversation">
|
||||||
<MkNoteSub
|
<MkNoteSub
|
||||||
v-if="replyLevel < 11 && depth < 5"
|
|
||||||
v-for="reply in replies"
|
v-for="reply in replies"
|
||||||
|
v-if="replyLevel < 11 && depth < 5"
|
||||||
:key="reply.id"
|
:key="reply.id"
|
||||||
:note="reply"
|
:note="reply"
|
||||||
class="reply"
|
class="reply"
|
||||||
:class="{ single: replies.length == 1 }"
|
:class="{ single: replies.length == 1 }"
|
||||||
:conversation="conversation"
|
:conversation="conversation"
|
||||||
:depth="replies.length == 1 ? depth : depth + 1"
|
:depth="replies.length == 1 ? depth : depth + 1"
|
||||||
:replyLevel="replyLevel + 1"
|
:reply-level="replyLevel + 1"
|
||||||
:parentId="appearNote.id"
|
:parent-id="appearNote.id"
|
||||||
:detailedView="detailedView"
|
:detailed-view="detailedView"
|
||||||
/>
|
/>
|
||||||
<div v-else-if="replies.length > 0" class="more">
|
<div v-else-if="replies.length > 0" class="more">
|
||||||
<div class="line"></div>
|
<div class="line"></div>
|
||||||
@ -177,9 +177,9 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { inject, ref, computed } from "vue";
|
import { computed, inject, ref } from "vue";
|
||||||
import type { Ref } from "vue";
|
import type { Ref } from "vue";
|
||||||
import * as misskey from "firefish-js";
|
import type * as misskey from "firefish-js";
|
||||||
import XNoteHeader from "@/components/MkNoteHeader.vue";
|
import XNoteHeader from "@/components/MkNoteHeader.vue";
|
||||||
import MkSubNoteContent from "@/components/MkSubNoteContent.vue";
|
import MkSubNoteContent from "@/components/MkSubNoteContent.vue";
|
||||||
import XReactionsViewer from "@/components/MkReactionsViewer.vue";
|
import XReactionsViewer from "@/components/MkReactionsViewer.vue";
|
||||||
@ -223,7 +223,7 @@ const props = withDefaults(
|
|||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
let note = ref(deepClone(props.note));
|
const note = ref(deepClone(props.note));
|
||||||
|
|
||||||
const softMuteReasonI18nSrc = (what?: string) => {
|
const softMuteReasonI18nSrc = (what?: string) => {
|
||||||
if (what === "note") return i18n.ts.userSaysSomethingReason;
|
if (what === "note") return i18n.ts.userSaysSomethingReason;
|
||||||
@ -247,7 +247,7 @@ const menuButton = ref<HTMLElement>();
|
|||||||
const starButton = ref<InstanceType<typeof XStarButton>>();
|
const starButton = ref<InstanceType<typeof XStarButton>>();
|
||||||
const renoteButton = ref<InstanceType<typeof XRenoteButton>>();
|
const renoteButton = ref<InstanceType<typeof XRenoteButton>>();
|
||||||
const reactButton = ref<HTMLElement>();
|
const reactButton = ref<HTMLElement>();
|
||||||
let appearNote = computed(() =>
|
const appearNote = computed(() =>
|
||||||
isRenote ? (note.value.renote as misskey.entities.Note) : note.value,
|
isRenote ? (note.value.renote as misskey.entities.Note) : note.value,
|
||||||
);
|
);
|
||||||
const isDeleted = ref(false);
|
const isDeleted = ref(false);
|
||||||
@ -291,7 +291,7 @@ function react(viaKeyboard = false): void {
|
|||||||
(reaction) => {
|
(reaction) => {
|
||||||
os.api("notes/reactions/create", {
|
os.api("notes/reactions/create", {
|
||||||
noteId: appearNote.value.id,
|
noteId: appearNote.value.id,
|
||||||
reaction: reaction,
|
reaction,
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
() => {
|
() => {
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template #default="{ items: notes }">
|
<template #default="{ items: notes }">
|
||||||
<div class="giivymft" :class="{ noGap }" ref="tlEl">
|
<div ref="tlEl" class="giivymft" :class="{ noGap }">
|
||||||
<XList
|
<XList
|
||||||
ref="notes"
|
ref="notes"
|
||||||
v-slot="{ item: note }"
|
v-slot="{ item: note }"
|
||||||
|
@ -219,7 +219,7 @@
|
|||||||
<MkFollowButton
|
<MkFollowButton
|
||||||
:user="notification.user"
|
:user="notification.user"
|
||||||
:full="true"
|
:full="true"
|
||||||
:hideMenu="true"
|
:hide-menu="true"
|
||||||
/></div
|
/></div
|
||||||
></span>
|
></span>
|
||||||
<span
|
<span
|
||||||
@ -273,8 +273,8 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref, onMounted, onUnmounted, watch } from "vue";
|
import { onMounted, onUnmounted, ref, watch } from "vue";
|
||||||
import * as misskey from "firefish-js";
|
import type * as misskey from "firefish-js";
|
||||||
import XReactionIcon from "@/components/MkReactionIcon.vue";
|
import XReactionIcon from "@/components/MkReactionIcon.vue";
|
||||||
import MkFollowButton from "@/components/MkFollowButton.vue";
|
import MkFollowButton from "@/components/MkFollowButton.vue";
|
||||||
import XReactionTooltip from "@/components/MkReactionTooltip.vue";
|
import XReactionTooltip from "@/components/MkReactionTooltip.vue";
|
||||||
@ -310,8 +310,7 @@ const defaultReaction = ["⭐", "👍", "❤️"].includes(instance.defaultReact
|
|||||||
? instance.defaultReaction
|
? instance.defaultReaction
|
||||||
: "⭐";
|
: "⭐";
|
||||||
|
|
||||||
let readObserver: IntersectionObserver | undefined;
|
let readObserver: IntersectionObserver | undefined, connection;
|
||||||
let connection;
|
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
if (!props.notification.isRead) {
|
if (!props.notification.isRead) {
|
||||||
|
@ -41,7 +41,6 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed, ref } from "vue";
|
import { computed, ref } from "vue";
|
||||||
|
|
||||||
import {} from "vue";
|
|
||||||
import { notificationTypes } from "firefish-js";
|
import { notificationTypes } from "firefish-js";
|
||||||
import MkSwitch from "./form/switch.vue";
|
import MkSwitch from "./form/switch.vue";
|
||||||
import MkInfo from "./MkInfo.vue";
|
import MkInfo from "./MkInfo.vue";
|
||||||
@ -65,12 +64,12 @@ const props = withDefaults(
|
|||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
let includingTypes = computed(() => props.includingTypes || []);
|
const includingTypes = computed(() => props.includingTypes || []);
|
||||||
|
|
||||||
const dialog = ref<InstanceType<typeof XModalWindow>>();
|
const dialog = ref<InstanceType<typeof XModalWindow>>();
|
||||||
|
|
||||||
let typesMap = ref<Record<(typeof notificationTypes)[number], boolean>>({});
|
const typesMap = ref<Record<(typeof notificationTypes)[number], boolean>>({});
|
||||||
let useGlobalSetting = ref(
|
const useGlobalSetting = ref(
|
||||||
(includingTypes.value === null || includingTypes.value.length === 0) &&
|
(includingTypes.value === null || includingTypes.value.length === 0) &&
|
||||||
props.showGlobalToggle,
|
props.showGlobalToggle,
|
||||||
);
|
);
|
||||||
|
@ -28,7 +28,7 @@ const emit = defineEmits<{
|
|||||||
}>();
|
}>();
|
||||||
|
|
||||||
const zIndex = os.claimZIndex("high");
|
const zIndex = os.claimZIndex("high");
|
||||||
let showing = ref(true);
|
const showing = ref(true);
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
window.setTimeout(() => {
|
window.setTimeout(() => {
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
"
|
"
|
||||||
:key="notification.id"
|
:key="notification.id"
|
||||||
:note="notification.note"
|
:note="notification.note"
|
||||||
:collapsedReply="
|
:collapsed-reply="
|
||||||
notification.type === 'reply' ||
|
notification.type === 'reply' ||
|
||||||
(notification.type === 'mention' &&
|
(notification.type === 'mention' &&
|
||||||
notification.note.replyId != null)
|
notification.note.replyId != null)
|
||||||
@ -46,9 +46,10 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { onUnmounted, onMounted, computed, ref } from "vue";
|
import { computed, onMounted, onUnmounted, ref } from "vue";
|
||||||
import { notificationTypes } from "firefish-js";
|
import type { notificationTypes } from "firefish-js";
|
||||||
import MkPagination, { Paging } from "@/components/MkPagination.vue";
|
import type { Paging } from "@/components/MkPagination.vue";
|
||||||
|
import MkPagination from "@/components/MkPagination.vue";
|
||||||
import XNotification from "@/components/MkNotification.vue";
|
import XNotification from "@/components/MkNotification.vue";
|
||||||
import XList from "@/components/MkDateSeparatedList.vue";
|
import XList from "@/components/MkDateSeparatedList.vue";
|
||||||
import XNote from "@/components/MkNote.vue";
|
import XNote from "@/components/MkNote.vue";
|
||||||
|
@ -8,8 +8,8 @@
|
|||||||
:buttons-left="buttonsLeft"
|
:buttons-left="buttonsLeft"
|
||||||
:buttons-right="buttonsRight"
|
:buttons-right="buttonsRight"
|
||||||
:contextmenu="contextmenu"
|
:contextmenu="contextmenu"
|
||||||
@closed="$emit('closed')"
|
|
||||||
class="page-window"
|
class="page-window"
|
||||||
|
@closed="$emit('closed')"
|
||||||
>
|
>
|
||||||
<template #header>
|
<template #header>
|
||||||
<template v-if="pageMetadata?.value">
|
<template v-if="pageMetadata?.value">
|
||||||
@ -30,7 +30,8 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ComputedRef, provide, ref, computed } from "vue";
|
import type { ComputedRef } from "vue";
|
||||||
|
import { computed, provide, ref } from "vue";
|
||||||
import RouterView from "@/components/global/RouterView.vue";
|
import RouterView from "@/components/global/RouterView.vue";
|
||||||
import XWindow from "@/components/MkWindow.vue";
|
import XWindow from "@/components/MkWindow.vue";
|
||||||
import { popout as _popout } from "@/scripts/popout";
|
import { popout as _popout } from "@/scripts/popout";
|
||||||
@ -39,7 +40,8 @@ import { url } from "@/config";
|
|||||||
import { mainRouter, routes } from "@/router";
|
import { mainRouter, routes } from "@/router";
|
||||||
import { Router } from "@/nirax";
|
import { Router } from "@/nirax";
|
||||||
import { i18n } from "@/i18n";
|
import { i18n } from "@/i18n";
|
||||||
import { PageMetadata, provideMetadataReceiver } from "@/scripts/page-metadata";
|
import type { PageMetadata } from "@/scripts/page-metadata";
|
||||||
|
import { provideMetadataReceiver } from "@/scripts/page-metadata";
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
initialPath: string;
|
initialPath: string;
|
||||||
@ -51,8 +53,8 @@ defineEmits<{
|
|||||||
|
|
||||||
const router = new Router(routes, props.initialPath);
|
const router = new Router(routes, props.initialPath);
|
||||||
|
|
||||||
let pageMetadata = ref<null | ComputedRef<PageMetadata>>();
|
const pageMetadata = ref<null | ComputedRef<PageMetadata>>();
|
||||||
let windowEl = ref<InstanceType<typeof XWindow>>();
|
const windowEl = ref<InstanceType<typeof XWindow>>();
|
||||||
const history = ref<{ path: string; key: any }[]>([
|
const history = ref<{ path: string; key: any }[]>([
|
||||||
{
|
{
|
||||||
path: router.getCurrentPath(),
|
path: router.getCurrentPath(),
|
||||||
|
@ -63,29 +63,22 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import {
|
import type { ComputedRef } from "vue";
|
||||||
computed,
|
import { computed, isRef, onActivated, onDeactivated, ref, watch } from "vue";
|
||||||
ComputedRef,
|
import type * as misskey from "firefish-js";
|
||||||
isRef,
|
|
||||||
onActivated,
|
|
||||||
onDeactivated,
|
|
||||||
ref,
|
|
||||||
watch,
|
|
||||||
} from "vue";
|
|
||||||
import * as misskey from "firefish-js";
|
|
||||||
import * as os from "@/os";
|
import * as os from "@/os";
|
||||||
import {
|
import {
|
||||||
onScrollTop,
|
|
||||||
isTopVisible,
|
|
||||||
getScrollPosition,
|
|
||||||
getScrollContainer,
|
getScrollContainer,
|
||||||
|
getScrollPosition,
|
||||||
|
isTopVisible,
|
||||||
|
onScrollTop,
|
||||||
} from "@/scripts/scroll";
|
} from "@/scripts/scroll";
|
||||||
import MkButton from "@/components/MkButton.vue";
|
import MkButton from "@/components/MkButton.vue";
|
||||||
import { i18n } from "@/i18n";
|
import { i18n } from "@/i18n";
|
||||||
|
|
||||||
export type Paging<
|
export interface Paging<
|
||||||
E extends keyof misskey.Endpoints = keyof misskey.Endpoints,
|
E extends keyof misskey.Endpoints = keyof misskey.Endpoints,
|
||||||
> = {
|
> {
|
||||||
endpoint: E;
|
endpoint: E;
|
||||||
limit: number;
|
limit: number;
|
||||||
params?:
|
params?:
|
||||||
@ -104,7 +97,7 @@ export type Paging<
|
|||||||
reversed?: boolean;
|
reversed?: boolean;
|
||||||
|
|
||||||
offsetMode?: boolean;
|
offsetMode?: boolean;
|
||||||
};
|
}
|
||||||
|
|
||||||
const SECOND_FETCH_LIMIT = 30;
|
const SECOND_FETCH_LIMIT = 30;
|
||||||
|
|
||||||
@ -123,7 +116,10 @@ const emit = defineEmits<{
|
|||||||
(ev: "queue", count: number): void;
|
(ev: "queue", count: number): void;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
type Item = { id: string; [another: string]: unknown };
|
interface Item {
|
||||||
|
id: string;
|
||||||
|
[another: string]: unknown;
|
||||||
|
}
|
||||||
|
|
||||||
const rootEl = ref<HTMLElement>();
|
const rootEl = ref<HTMLElement>();
|
||||||
const items = ref<Item[]>([]);
|
const items = ref<Item[]>([]);
|
||||||
@ -207,12 +203,12 @@ const refresh = async (): void => {
|
|||||||
})
|
})
|
||||||
.then(
|
.then(
|
||||||
(res) => {
|
(res) => {
|
||||||
let ids = items.value.reduce(
|
const ids = items.value.reduce(
|
||||||
(a, b) => {
|
(a, b) => {
|
||||||
a[b.id] = true;
|
a[b.id] = true;
|
||||||
return a;
|
return a;
|
||||||
},
|
},
|
||||||
{} as { [id: string]: boolean },
|
{} as Record<string, boolean>,
|
||||||
);
|
);
|
||||||
|
|
||||||
for (let i = 0; i < res.length; i++) {
|
for (let i = 0; i < res.length; i++) {
|
||||||
@ -364,7 +360,7 @@ const prepend = (item: Item): void => {
|
|||||||
// オーバーフローしたら古いアイテムは捨てる
|
// オーバーフローしたら古いアイテムは捨てる
|
||||||
if (items.value.length >= props.displayLimit) {
|
if (items.value.length >= props.displayLimit) {
|
||||||
// このやり方だとVue 3.2以降アニメーションが動かなくなる
|
// このやり方だとVue 3.2以降アニメーションが動かなくなる
|
||||||
//items.value = items.value.slice(-props.displayLimit);
|
// items.value = items.value.slice(-props.displayLimit);
|
||||||
while (items.value.length >= props.displayLimit) {
|
while (items.value.length >= props.displayLimit) {
|
||||||
items.value.shift();
|
items.value.shift();
|
||||||
}
|
}
|
||||||
@ -394,7 +390,7 @@ const prepend = (item: Item): void => {
|
|||||||
// オーバーフローしたら古いアイテムは捨てる
|
// オーバーフローしたら古いアイテムは捨てる
|
||||||
if (items.value.length >= props.displayLimit) {
|
if (items.value.length >= props.displayLimit) {
|
||||||
// このやり方だとVue 3.2以降アニメーションが動かなくなる
|
// このやり方だとVue 3.2以降アニメーションが動かなくなる
|
||||||
//this.items = items.value.slice(0, props.displayLimit);
|
// this.items = items.value.slice(0, props.displayLimit);
|
||||||
while (items.value.length >= props.displayLimit) {
|
while (items.value.length >= props.displayLimit) {
|
||||||
items.value.pop();
|
items.value.pop();
|
||||||
}
|
}
|
||||||
|
@ -53,7 +53,7 @@
|
|||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed, ref } from "vue";
|
import { computed, ref } from "vue";
|
||||||
import * as misskey from "firefish-js";
|
import type * as misskey from "firefish-js";
|
||||||
import { sum } from "@/scripts/array";
|
import { sum } from "@/scripts/array";
|
||||||
import { pleaseLogin } from "@/scripts/please-login";
|
import { pleaseLogin } from "@/scripts/please-login";
|
||||||
import * as os from "@/os";
|
import * as os from "@/os";
|
||||||
|
@ -16,8 +16,8 @@
|
|||||||
</MkInput>
|
</MkInput>
|
||||||
<button
|
<button
|
||||||
class="_button"
|
class="_button"
|
||||||
@click="remove(i)"
|
|
||||||
:aria-label="i18n.t('remove')"
|
:aria-label="i18n.t('remove')"
|
||||||
|
@click="remove(i)"
|
||||||
>
|
>
|
||||||
<i class="ph-x ph-bold ph-lg"></i>
|
<i class="ph-x ph-bold ph-lg"></i>
|
||||||
</button>
|
</button>
|
||||||
|
@ -5,9 +5,9 @@
|
|||||||
:z-priority="'high'"
|
:z-priority="'high'"
|
||||||
:src="src"
|
:src="src"
|
||||||
:transparent-bg="true"
|
:transparent-bg="true"
|
||||||
|
tabindex="-1"
|
||||||
@click="modal?.close()"
|
@click="modal?.close()"
|
||||||
@closed="emit('closed')"
|
@closed="emit('closed')"
|
||||||
tabindex="-1"
|
|
||||||
>
|
>
|
||||||
<MkMenu
|
<MkMenu
|
||||||
:items="items"
|
:items="items"
|
||||||
@ -28,7 +28,7 @@ import { ref } from "vue";
|
|||||||
|
|
||||||
import MkModal from "./MkModal.vue";
|
import MkModal from "./MkModal.vue";
|
||||||
import MkMenu from "./MkMenu.vue";
|
import MkMenu from "./MkMenu.vue";
|
||||||
import { MenuItem } from "@/types/menu";
|
import type { MenuItem } from "@/types/menu";
|
||||||
|
|
||||||
defineProps<{
|
defineProps<{
|
||||||
items: MenuItem[];
|
items: MenuItem[];
|
||||||
@ -43,7 +43,7 @@ const emit = defineEmits<{
|
|||||||
(ev: "closed"): void;
|
(ev: "closed"): void;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
let modal = ref<InstanceType<typeof MkModal>>();
|
const modal = ref<InstanceType<typeof MkModal>>();
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
@ -86,8 +86,8 @@
|
|||||||
{{ i18n.ts.quoteAttached
|
{{ i18n.ts.quoteAttached
|
||||||
}}<button
|
}}<button
|
||||||
class="_button"
|
class="_button"
|
||||||
@click="quoteId = null"
|
|
||||||
:aria-label="i18n.t('removeQuote')"
|
:aria-label="i18n.t('removeQuote')"
|
||||||
|
@click="quoteId = null"
|
||||||
>
|
>
|
||||||
<i class="ph-x ph-bold ph-lg"></i>
|
<i class="ph-x ph-bold ph-lg"></i>
|
||||||
</button>
|
</button>
|
||||||
@ -99,8 +99,8 @@
|
|||||||
<MkAcct :user="u" />
|
<MkAcct :user="u" />
|
||||||
<button
|
<button
|
||||||
class="_button"
|
class="_button"
|
||||||
@click="removeVisibleUser(u)"
|
|
||||||
:aria-label="i18n.t('removeRecipient')"
|
:aria-label="i18n.t('removeRecipient')"
|
||||||
|
@click="removeVisibleUser(u)"
|
||||||
>
|
>
|
||||||
<i class="ph-x ph-bold ph-lg"></i>
|
<i class="ph-x ph-bold ph-lg"></i>
|
||||||
</button>
|
</button>
|
||||||
@ -234,16 +234,16 @@
|
|||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import {
|
import {
|
||||||
|
computed,
|
||||||
|
defineAsyncComponent,
|
||||||
inject,
|
inject,
|
||||||
watch,
|
|
||||||
nextTick,
|
nextTick,
|
||||||
onMounted,
|
onMounted,
|
||||||
defineAsyncComponent,
|
|
||||||
ref,
|
ref,
|
||||||
computed,
|
watch,
|
||||||
} from "vue";
|
} from "vue";
|
||||||
import * as mfm from "mfm-js";
|
import * as mfm from "mfm-js";
|
||||||
import * as misskey from "firefish-js";
|
import type * as misskey from "firefish-js";
|
||||||
import autosize from "autosize";
|
import autosize from "autosize";
|
||||||
import insertTextAtCursor from "insert-text-at-cursor";
|
import insertTextAtCursor from "insert-text-at-cursor";
|
||||||
import { length } from "stringz";
|
import { length } from "stringz";
|
||||||
@ -315,40 +315,42 @@ const cwInputEl = ref<HTMLInputElement | null>(null);
|
|||||||
const hashtagsInputEl = ref<HTMLInputElement | null>(null);
|
const hashtagsInputEl = ref<HTMLInputElement | null>(null);
|
||||||
const visibilityButton = ref<HTMLElement | null>(null);
|
const visibilityButton = ref<HTMLElement | null>(null);
|
||||||
|
|
||||||
let posting = ref(false);
|
const posting = ref(false);
|
||||||
let text = ref(props.initialText ?? "");
|
const text = ref(props.initialText ?? "");
|
||||||
let files = ref(props.initialFiles ?? []);
|
const files = ref(props.initialFiles ?? []);
|
||||||
let poll = ref<{
|
const poll = ref<{
|
||||||
choices: string[];
|
choices: string[];
|
||||||
multiple: boolean;
|
multiple: boolean;
|
||||||
expiresAt: string | null;
|
expiresAt: string | null;
|
||||||
expiredAfter: string | null;
|
expiredAfter: string | null;
|
||||||
} | null>(null);
|
} | null>(null);
|
||||||
let useCw = ref(false);
|
const useCw = ref(false);
|
||||||
let showPreview = ref(false);
|
const showPreview = ref(false);
|
||||||
let cw = ref<string | null>(null);
|
const cw = ref<string | null>(null);
|
||||||
let localOnly = ref<boolean>(
|
const localOnly = ref<boolean>(
|
||||||
props.initialLocalOnly ?? defaultStore.state.rememberNoteVisibility
|
props.initialLocalOnly ?? defaultStore.state.rememberNoteVisibility
|
||||||
? defaultStore.state.localOnly
|
? defaultStore.state.localOnly
|
||||||
: defaultStore.state.defaultNoteLocalOnly,
|
: defaultStore.state.defaultNoteLocalOnly,
|
||||||
);
|
);
|
||||||
let visibility = ref(
|
const visibility = ref(
|
||||||
props.initialVisibility ??
|
props.initialVisibility ??
|
||||||
((defaultStore.state.rememberNoteVisibility
|
((defaultStore.state.rememberNoteVisibility
|
||||||
? defaultStore.state.visibility
|
? defaultStore.state.visibility
|
||||||
: defaultStore.state
|
: defaultStore.state
|
||||||
.defaultNoteVisibility) as (typeof misskey.noteVisibilities)[number]),
|
.defaultNoteVisibility) as (typeof misskey.noteVisibilities)[number]),
|
||||||
);
|
);
|
||||||
let visibleUsers = ref([]);
|
const visibleUsers = ref([]);
|
||||||
if (props.initialVisibleUsers) {
|
if (props.initialVisibleUsers) {
|
||||||
props.initialVisibleUsers.forEach(pushVisibleUser);
|
props.initialVisibleUsers.forEach(pushVisibleUser);
|
||||||
}
|
}
|
||||||
let autocomplete = ref(null);
|
const autocomplete = ref(null);
|
||||||
let draghover = ref(false);
|
const draghover = ref(false);
|
||||||
let quoteId = ref(null);
|
const quoteId = ref(null);
|
||||||
let hasNotSpecifiedMentions = ref(false);
|
const hasNotSpecifiedMentions = ref(false);
|
||||||
let recentHashtags = ref(JSON.parse(localStorage.getItem("hashtags") || "[]"));
|
const recentHashtags = ref(
|
||||||
let imeText = ref("");
|
JSON.parse(localStorage.getItem("hashtags") || "[]"),
|
||||||
|
);
|
||||||
|
const imeText = ref("");
|
||||||
|
|
||||||
const typing = throttle(3000, () => {
|
const typing = throttle(3000, () => {
|
||||||
if (props.channel) {
|
if (props.channel) {
|
||||||
@ -415,8 +417,8 @@ const maxTextLength = computed((): number => {
|
|||||||
const canPost = computed((): boolean => {
|
const canPost = computed((): boolean => {
|
||||||
return (
|
return (
|
||||||
!posting.value &&
|
!posting.value &&
|
||||||
(1 <= textLength.value ||
|
(textLength.value >= 1 ||
|
||||||
1 <= files.value.length ||
|
files.value.length >= 1 ||
|
||||||
!!poll.value ||
|
!!poll.value ||
|
||||||
!!props.renote) &&
|
!!props.renote) &&
|
||||||
textLength.value <= maxTextLength.value &&
|
textLength.value <= maxTextLength.value &&
|
||||||
@ -816,14 +818,14 @@ function onDrop(ev): void {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
//#region ドライブのファイル
|
// #region ドライブのファイル
|
||||||
const driveFile = ev.dataTransfer.getData(_DATA_TRANSFER_DRIVE_FILE_);
|
const driveFile = ev.dataTransfer.getData(_DATA_TRANSFER_DRIVE_FILE_);
|
||||||
if (driveFile != null && driveFile !== "") {
|
if (driveFile != null && driveFile !== "") {
|
||||||
const file = JSON.parse(driveFile);
|
const file = JSON.parse(driveFile);
|
||||||
files.value.push(file);
|
files.value.push(file);
|
||||||
ev.preventDefault();
|
ev.preventDefault();
|
||||||
}
|
}
|
||||||
//#endregion
|
// #endregion
|
||||||
}
|
}
|
||||||
|
|
||||||
function saveDraft() {
|
function saveDraft() {
|
||||||
@ -896,7 +898,7 @@ async function post() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let token = undefined;
|
let token;
|
||||||
|
|
||||||
if (postAccount.value) {
|
if (postAccount.value) {
|
||||||
const storedAccounts = await getAccounts();
|
const storedAccounts = await getAccounts();
|
||||||
@ -976,7 +978,7 @@ function showActions(ev) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
let postAccount = ref<misskey.entities.UserDetailed | null>(null);
|
const postAccount = ref<misskey.entities.UserDetailed | null>(null);
|
||||||
|
|
||||||
function openAccountMenu(ev: MouseEvent) {
|
function openAccountMenu(ev: MouseEvent) {
|
||||||
openAccountMenu_(
|
openAccountMenu_(
|
||||||
|
@ -8,9 +8,9 @@
|
|||||||
delay-on-touch-only="true"
|
delay-on-touch-only="true"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
class="file"
|
|
||||||
v-for="element in _files"
|
v-for="element in _files"
|
||||||
:key="element.id"
|
:key="element.id"
|
||||||
|
class="file"
|
||||||
@click="showFileMenu(element, $event)"
|
@click="showFileMenu(element, $event)"
|
||||||
@contextmenu.prevent="showFileMenu(element, $event)"
|
@contextmenu.prevent="showFileMenu(element, $event)"
|
||||||
>
|
>
|
||||||
@ -30,7 +30,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { defineAsyncComponent, ref, computed } from "vue";
|
import { computed, defineAsyncComponent, ref } from "vue";
|
||||||
import { VueDraggable } from "vue-draggable-plus";
|
import { VueDraggable } from "vue-draggable-plus";
|
||||||
import MkDriveFileThumbnail from "@/components/MkDriveFileThumbnail.vue";
|
import MkDriveFileThumbnail from "@/components/MkDriveFileThumbnail.vue";
|
||||||
import * as os from "@/os";
|
import * as os from "@/os";
|
||||||
@ -105,10 +105,11 @@ async function describe(file) {
|
|||||||
{
|
{
|
||||||
done: (result) => {
|
done: (result) => {
|
||||||
if (!result || result.canceled) return;
|
if (!result || result.canceled) return;
|
||||||
let comment = result.result.length === 0 ? null : result.result;
|
const comment =
|
||||||
|
result.result.length === 0 ? null : result.result;
|
||||||
os.api("drive/files/update", {
|
os.api("drive/files/update", {
|
||||||
fileId: file.id,
|
fileId: file.id,
|
||||||
comment: comment,
|
comment,
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
file.comment = comment;
|
file.comment = comment;
|
||||||
});
|
});
|
||||||
|
@ -21,8 +21,7 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { shallowRef } from "vue";
|
import { shallowRef } from "vue";
|
||||||
|
|
||||||
import {} from "vue";
|
import type * as misskey from "firefish-js";
|
||||||
import * as misskey from "firefish-js";
|
|
||||||
import MkModal from "@/components/MkModal.vue";
|
import MkModal from "@/components/MkModal.vue";
|
||||||
import MkPostForm from "@/components/MkPostForm.vue";
|
import MkPostForm from "@/components/MkPostForm.vue";
|
||||||
|
|
||||||
@ -48,8 +47,8 @@ const emit = defineEmits<{
|
|||||||
(ev: "closed"): void;
|
(ev: "closed"): void;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
let modal = shallowRef<InstanceType<typeof MkModal>>();
|
const modal = shallowRef<InstanceType<typeof MkModal>>();
|
||||||
let form = shallowRef<InstanceType<typeof MkPostForm>>();
|
const form = shallowRef<InstanceType<typeof MkPostForm>>();
|
||||||
|
|
||||||
function onPosted() {
|
function onPosted() {
|
||||||
modal.value.close({
|
modal.value.close({
|
||||||
|
@ -76,12 +76,12 @@ defineProps<{
|
|||||||
}>();
|
}>();
|
||||||
|
|
||||||
// ServiceWorker registration
|
// ServiceWorker registration
|
||||||
let registration = ref<ServiceWorkerRegistration | undefined>();
|
const registration = ref<ServiceWorkerRegistration | undefined>();
|
||||||
// If this browser supports push notification
|
// If this browser supports push notification
|
||||||
let supported = ref(false);
|
const supported = ref(false);
|
||||||
// If this browser has already subscribed to push notification
|
// If this browser has already subscribed to push notification
|
||||||
let pushSubscription = ref<PushSubscription | null>(null);
|
const pushSubscription = ref<PushSubscription | null>(null);
|
||||||
let pushRegistrationInServer = ref<
|
const pushRegistrationInServer = ref<
|
||||||
| {
|
| {
|
||||||
state?: string;
|
state?: string;
|
||||||
key?: string;
|
key?: string;
|
||||||
@ -209,6 +209,6 @@ if (navigator.serviceWorker == null) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
defineExpose({
|
defineExpose({
|
||||||
pushRegistrationInServer: pushRegistrationInServer,
|
pushRegistrationInServer,
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
@ -36,8 +36,8 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { onMounted, watch, ref } from "vue";
|
import { onMounted, ref, watch } from "vue";
|
||||||
import * as misskey from "firefish-js";
|
import type * as misskey from "firefish-js";
|
||||||
import MkReactionIcon from "@/components/MkReactionIcon.vue";
|
import MkReactionIcon from "@/components/MkReactionIcon.vue";
|
||||||
import MkUserCardMini from "@/components/MkUserCardMini.vue";
|
import MkUserCardMini from "@/components/MkUserCardMini.vue";
|
||||||
import * as os from "@/os";
|
import * as os from "@/os";
|
||||||
@ -46,10 +46,10 @@ const props = defineProps<{
|
|||||||
noteId: misskey.entities.Note["id"];
|
noteId: misskey.entities.Note["id"];
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
let note = ref<misskey.entities.Note>();
|
const note = ref<misskey.entities.Note>();
|
||||||
let tab = ref<string>();
|
const tab = ref<string>();
|
||||||
let reactions = ref<string[]>();
|
const reactions = ref<string[]>();
|
||||||
let users = ref();
|
const users = ref();
|
||||||
|
|
||||||
watch(tab, async () => {
|
watch(tab, async () => {
|
||||||
const res = await os.api("notes/reactions", {
|
const res = await os.api("notes/reactions", {
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed, ref } from "vue";
|
import { computed, ref } from "vue";
|
||||||
import * as misskey from "firefish-js";
|
import type * as misskey from "firefish-js";
|
||||||
import XDetails from "@/components/MkReactionsViewer.details.vue";
|
import XDetails from "@/components/MkReactionsViewer.details.vue";
|
||||||
import XReactionIcon from "@/components/MkReactionIcon.vue";
|
import XReactionIcon from "@/components/MkReactionIcon.vue";
|
||||||
import * as os from "@/os";
|
import * as os from "@/os";
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed, ref } from "vue";
|
import { computed, ref } from "vue";
|
||||||
import * as misskey from "firefish-js";
|
import type * as misskey from "firefish-js";
|
||||||
import { $i } from "@/account";
|
import { $i } from "@/account";
|
||||||
import XReaction from "@/components/MkReactionsViewer.reaction.vue";
|
import XReaction from "@/components/MkReactionsViewer.reaction.vue";
|
||||||
|
|
||||||
|
@ -12,9 +12,9 @@
|
|||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
v-else
|
v-else
|
||||||
|
v-tooltip.noDelay.bottom="i18n.ts.disabled"
|
||||||
class="eddddedb _button"
|
class="eddddedb _button"
|
||||||
disabled="true"
|
disabled="true"
|
||||||
v-tooltip.noDelay.bottom="i18n.ts.disabled"
|
|
||||||
>
|
>
|
||||||
<i class="ph-repeat ph-bold ph-lg"></i>
|
<i class="ph-repeat ph-bold ph-lg"></i>
|
||||||
</button>
|
</button>
|
||||||
@ -31,7 +31,7 @@ import { $i } from "@/account";
|
|||||||
import { useTooltip } from "@/scripts/use-tooltip";
|
import { useTooltip } from "@/scripts/use-tooltip";
|
||||||
import { i18n } from "@/i18n";
|
import { i18n } from "@/i18n";
|
||||||
import { defaultStore } from "@/store";
|
import { defaultStore } from "@/store";
|
||||||
import { MenuItem } from "@/types/menu";
|
import type { MenuItem } from "@/types/menu";
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
note: misskey.entities.Note;
|
note: misskey.entities.Note;
|
||||||
@ -70,7 +70,7 @@ useTooltip(buttonRef, async (showing) => {
|
|||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
let hasRenotedBefore = ref(false);
|
const hasRenotedBefore = ref(false);
|
||||||
os.api("notes/renotes", {
|
os.api("notes/renotes", {
|
||||||
noteId: props.note.id,
|
noteId: props.note.id,
|
||||||
userId: $i.id,
|
userId: $i.id,
|
||||||
@ -82,7 +82,7 @@ os.api("notes/renotes", {
|
|||||||
const renote = (viaKeyboard = false, ev?: MouseEvent) => {
|
const renote = (viaKeyboard = false, ev?: MouseEvent) => {
|
||||||
pleaseLogin();
|
pleaseLogin();
|
||||||
|
|
||||||
let buttonActions: Array<MenuItem> = [];
|
const buttonActions: Array<MenuItem> = [];
|
||||||
|
|
||||||
if (props.note.visibility === "public") {
|
if (props.note.visibility === "public") {
|
||||||
buttonActions.push({
|
buttonActions.push({
|
||||||
@ -191,7 +191,7 @@ const renote = (viaKeyboard = false, ev?: MouseEvent) => {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (canRenote) {
|
if (canRenote.value) {
|
||||||
buttonActions.push({
|
buttonActions.push({
|
||||||
text: `${i18n.ts.renote} (${i18n.ts.local})`,
|
text: `${i18n.ts.renote} (${i18n.ts.local})`,
|
||||||
icon: "ph-hand-fist ph-bold ph-lg",
|
icon: "ph-hand-fist ph-bold ph-lg",
|
||||||
|
@ -9,8 +9,8 @@
|
|||||||
</button>
|
</button>
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { i18n } from "@/i18n";
|
|
||||||
import { ref } from "vue";
|
import { ref } from "vue";
|
||||||
|
import { i18n } from "@/i18n";
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
modelValue: boolean;
|
modelValue: boolean;
|
||||||
|
@ -160,7 +160,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { defineAsyncComponent, ref, computed } from "vue";
|
import { computed, defineAsyncComponent, ref } from "vue";
|
||||||
import { toUnicode } from "punycode/";
|
import { toUnicode } from "punycode/";
|
||||||
import MkButton from "@/components/MkButton.vue";
|
import MkButton from "@/components/MkButton.vue";
|
||||||
import MkInput from "@/components/form/input.vue";
|
import MkInput from "@/components/form/input.vue";
|
||||||
@ -172,17 +172,17 @@ import { login } from "@/account";
|
|||||||
import { instance } from "@/instance";
|
import { instance } from "@/instance";
|
||||||
import { i18n } from "@/i18n";
|
import { i18n } from "@/i18n";
|
||||||
|
|
||||||
let signing = ref(false);
|
const signing = ref(false);
|
||||||
let user = ref(null);
|
const user = ref(null);
|
||||||
let username = ref("");
|
const username = ref("");
|
||||||
let password = ref("");
|
const password = ref("");
|
||||||
let token = ref("");
|
const token = ref("");
|
||||||
let host = ref(toUnicode(configHost));
|
const host = ref(toUnicode(configHost));
|
||||||
let totpLogin = ref(false);
|
const totpLogin = ref(false);
|
||||||
let challengeData = ref(null);
|
const challengeData = ref(null);
|
||||||
let queryingKey = ref(false);
|
const queryingKey = ref(false);
|
||||||
let hCaptchaResponse = ref(null);
|
const hCaptchaResponse = ref(null);
|
||||||
let reCaptchaResponse = ref(null);
|
const reCaptchaResponse = ref(null);
|
||||||
|
|
||||||
const meta = computed(() => instance);
|
const meta = computed(() => instance);
|
||||||
|
|
||||||
|
@ -14,7 +14,6 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref } from "vue";
|
import { ref } from "vue";
|
||||||
|
|
||||||
import {} from "vue";
|
|
||||||
import MkSignin from "@/components/MkSignin.vue";
|
import MkSignin from "@/components/MkSignin.vue";
|
||||||
import XModalWindow from "@/components/MkModalWindow.vue";
|
import XModalWindow from "@/components/MkModalWindow.vue";
|
||||||
import { i18n } from "@/i18n";
|
import { i18n } from "@/i18n";
|
||||||
|
@ -284,7 +284,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref, computed } from "vue";
|
import { computed, ref } from "vue";
|
||||||
|
|
||||||
import getPasswordStrength from "syuilo-password-strength";
|
import getPasswordStrength from "syuilo-password-strength";
|
||||||
import { toUnicode } from "punycode/";
|
import { toUnicode } from "punycode/";
|
||||||
@ -314,15 +314,15 @@ const emit = defineEmits<{
|
|||||||
|
|
||||||
const host = toUnicode(config.host);
|
const host = toUnicode(config.host);
|
||||||
|
|
||||||
let hcaptcha = ref();
|
const hcaptcha = ref();
|
||||||
let recaptcha = ref();
|
const recaptcha = ref();
|
||||||
|
|
||||||
let username: string = ref("");
|
const username: string = ref("");
|
||||||
let password: string = ref("");
|
const password: string = ref("");
|
||||||
let retypedPassword: string = ref("");
|
const retypedPassword: string = ref("");
|
||||||
let invitationCode: string = ref("");
|
const invitationCode: string = ref("");
|
||||||
let email = ref("");
|
const email = ref("");
|
||||||
let usernameState:
|
const usernameState:
|
||||||
| null
|
| null
|
||||||
| "wait"
|
| "wait"
|
||||||
| "ok"
|
| "ok"
|
||||||
@ -331,8 +331,8 @@ let usernameState:
|
|||||||
| "invalid-format"
|
| "invalid-format"
|
||||||
| "min-range"
|
| "min-range"
|
||||||
| "max-range" = ref(null);
|
| "max-range" = ref(null);
|
||||||
let invitationState: null | "entered" = ref(null);
|
const invitationState: null | "entered" = ref(null);
|
||||||
let emailState:
|
const emailState:
|
||||||
| null
|
| null
|
||||||
| "wait"
|
| "wait"
|
||||||
| "ok"
|
| "ok"
|
||||||
@ -343,12 +343,12 @@ let emailState:
|
|||||||
| "unavailable:smtp"
|
| "unavailable:smtp"
|
||||||
| "unavailable"
|
| "unavailable"
|
||||||
| "error" = ref(null);
|
| "error" = ref(null);
|
||||||
let passwordStrength: "" | "low" | "medium" | "high" = ref("");
|
const passwordStrength: "" | "low" | "medium" | "high" = ref("");
|
||||||
let passwordRetypeState: null | "match" | "not-match" = ref(null);
|
const passwordRetypeState: null | "match" | "not-match" = ref(null);
|
||||||
let submitting: boolean = ref(false);
|
const submitting: boolean = ref(false);
|
||||||
let ToSAgreement: boolean = ref(false);
|
const ToSAgreement: boolean = ref(false);
|
||||||
let hCaptchaResponse = ref(null);
|
const hCaptchaResponse = ref(null);
|
||||||
let reCaptchaResponse = ref(null);
|
const reCaptchaResponse = ref(null);
|
||||||
|
|
||||||
const shouldDisableSubmitting = computed((): boolean => {
|
const shouldDisableSubmitting = computed((): boolean => {
|
||||||
return (
|
return (
|
||||||
|
@ -79,8 +79,8 @@ const el = ref<HTMLElement>();
|
|||||||
const width = ref(0);
|
const width = ref(0);
|
||||||
const height = ref(0);
|
const height = ref(0);
|
||||||
const colors = ["#eb6f92", "#9ccfd8", "#f6c177", "#f6c177", "#f6c177"];
|
const colors = ["#eb6f92", "#9ccfd8", "#f6c177", "#f6c177", "#f6c177"];
|
||||||
let stop = false;
|
let stop = false,
|
||||||
let ro: ResizeObserver | undefined;
|
ro: ResizeObserver | undefined;
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
if (!reducedMotion()) {
|
if (!reducedMotion()) {
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
<template>
|
<template>
|
||||||
<button
|
<button
|
||||||
|
ref="buttonRef"
|
||||||
v-tooltip.noDelay.bottom="i18n.ts._gallery.like"
|
v-tooltip.noDelay.bottom="i18n.ts._gallery.like"
|
||||||
class="button _button"
|
class="button _button"
|
||||||
:class="$style.root"
|
:class="$style.root"
|
||||||
ref="buttonRef"
|
|
||||||
@click.stop="toggleStar($event)"
|
@click.stop="toggleStar($event)"
|
||||||
>
|
>
|
||||||
<span v-if="!reacted">
|
<span v-if="!reacted">
|
||||||
|
@ -13,13 +13,13 @@
|
|||||||
</MkA>
|
</MkA>
|
||||||
<MkA
|
<MkA
|
||||||
v-else-if="!detailed && note.replyId"
|
v-else-if="!detailed && note.replyId"
|
||||||
|
v-tooltip="i18n.ts.jumpToPrevious"
|
||||||
:to="
|
:to="
|
||||||
detailedView
|
detailedView
|
||||||
? `#${note.replyId}`
|
? `#${note.replyId}`
|
||||||
: `${notePage(note)}#${note.replyId}`
|
: `${notePage(note)}#${note.replyId}`
|
||||||
"
|
"
|
||||||
behavior="browser"
|
behavior="browser"
|
||||||
v-tooltip="i18n.ts.jumpToPrevious"
|
|
||||||
class="reply-icon"
|
class="reply-icon"
|
||||||
@click.stop
|
@click.stop
|
||||||
>
|
>
|
||||||
@ -46,18 +46,18 @@
|
|||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
<XShowMoreButton
|
<XShowMoreButton
|
||||||
ref="showMoreButton"
|
|
||||||
v-if="isLong && collapsed"
|
v-if="isLong && collapsed"
|
||||||
|
ref="showMoreButton"
|
||||||
v-model="collapsed"
|
v-model="collapsed"
|
||||||
v-on:keydown="focusFooter"
|
@keydown="focusFooter"
|
||||||
></XShowMoreButton>
|
></XShowMoreButton>
|
||||||
<XCwButton
|
<XCwButton
|
||||||
ref="cwButton"
|
|
||||||
v-if="note.cw && !showContent"
|
v-if="note.cw && !showContent"
|
||||||
|
ref="cwButton"
|
||||||
v-model="showContent"
|
v-model="showContent"
|
||||||
:note="note"
|
:note="note"
|
||||||
v-on:keydown="focusFooter"
|
@keydown="focusFooter"
|
||||||
v-on:update:model-value="(val) => emit('expanded', val)"
|
@update:model-value="(val) => emit('expanded', val)"
|
||||||
/>
|
/>
|
||||||
<div
|
<div
|
||||||
class="body"
|
class="body"
|
||||||
@ -85,13 +85,13 @@
|
|||||||
</MkA>
|
</MkA>
|
||||||
<MkA
|
<MkA
|
||||||
v-else-if="!detailed && note.replyId"
|
v-else-if="!detailed && note.replyId"
|
||||||
|
v-tooltip="i18n.ts.jumpToPrevious"
|
||||||
:to="
|
:to="
|
||||||
detailedView
|
detailedView
|
||||||
? `#${note.replyId}`
|
? `#${note.replyId}`
|
||||||
: `${notePage(note)}#${note.replyId}`
|
: `${notePage(note)}#${note.replyId}`
|
||||||
"
|
"
|
||||||
behavior="browser"
|
behavior="browser"
|
||||||
v-tooltip="i18n.ts.jumpToPrevious"
|
|
||||||
class="reply-icon"
|
class="reply-icon"
|
||||||
@click.stop
|
@click.stop
|
||||||
>
|
>
|
||||||
@ -139,7 +139,7 @@
|
|||||||
(showMoreButton && collapsed)
|
(showMoreButton && collapsed)
|
||||||
"
|
"
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
v-on:focus="
|
@focus="
|
||||||
cwButton?.focus();
|
cwButton?.focus();
|
||||||
showMoreButton?.focus();
|
showMoreButton?.focus();
|
||||||
"
|
"
|
||||||
@ -157,9 +157,9 @@
|
|||||||
</div>
|
</div>
|
||||||
<MkButton
|
<MkButton
|
||||||
v-if="hasMfm && defaultStore.state.animatedMfm"
|
v-if="hasMfm && defaultStore.state.animatedMfm"
|
||||||
@click.stop="toggleMfm"
|
|
||||||
mini
|
mini
|
||||||
rounded
|
rounded
|
||||||
|
@click.stop="toggleMfm"
|
||||||
>
|
>
|
||||||
<template v-if="disableMfm">
|
<template v-if="disableMfm">
|
||||||
<i class="ph-play ph-bold"></i> {{ i18n.ts._mfm.play }}
|
<i class="ph-play ph-bold"></i> {{ i18n.ts._mfm.play }}
|
||||||
@ -177,7 +177,7 @@
|
|||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref } from "vue";
|
import { ref } from "vue";
|
||||||
import * as misskey from "firefish-js";
|
import type * as misskey from "firefish-js";
|
||||||
import * as mfm from "mfm-js";
|
import * as mfm from "mfm-js";
|
||||||
import * as os from "@/os";
|
import * as os from "@/os";
|
||||||
import XNoteSimple from "@/components/MkNoteSimple.vue";
|
import XNoteSimple from "@/components/MkNoteSimple.vue";
|
||||||
@ -222,7 +222,7 @@ const urls = props.note.text
|
|||||||
? extractUrlFromMfm(mfm.parse(props.note.text)).slice(0, 5)
|
? extractUrlFromMfm(mfm.parse(props.note.text)).slice(0, 5)
|
||||||
: null;
|
: null;
|
||||||
|
|
||||||
let showContent = ref(false);
|
const showContent = ref(false);
|
||||||
|
|
||||||
const mfms = props.note.text
|
const mfms = props.note.text
|
||||||
? extractMfmWithAnimation(mfm.parse(props.note.text))
|
? extractMfmWithAnimation(mfm.parse(props.note.text))
|
||||||
@ -230,7 +230,7 @@ const mfms = props.note.text
|
|||||||
|
|
||||||
const hasMfm = ref(mfms && mfms.length > 0);
|
const hasMfm = ref(mfms && mfms.length > 0);
|
||||||
|
|
||||||
let disableMfm = ref(defaultStore.state.animatedMfm);
|
const disableMfm = ref(defaultStore.state.animatedMfm);
|
||||||
|
|
||||||
async function toggleMfm() {
|
async function toggleMfm() {
|
||||||
if (disableMfm.value) {
|
if (disableMfm.value) {
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { onMounted, watch, onBeforeUnmount, ref } from "vue";
|
import { onBeforeUnmount, onMounted, ref, watch } from "vue";
|
||||||
import tinycolor from "tinycolor2";
|
import tinycolor from "tinycolor2";
|
||||||
|
|
||||||
const loaded = !!window.TagCanvas;
|
const loaded = !!window.TagCanvas;
|
||||||
@ -39,11 +39,11 @@ const idForTags = Array.from(Array(16))
|
|||||||
],
|
],
|
||||||
)
|
)
|
||||||
.join("");
|
.join("");
|
||||||
let available = ref(false);
|
const available = ref(false);
|
||||||
let rootEl = ref<HTMLElement | null>(null);
|
const rootEl = ref<HTMLElement | null>(null);
|
||||||
let canvasEl = ref<HTMLCanvasElement | null>(null);
|
const canvasEl = ref<HTMLCanvasElement | null>(null);
|
||||||
let tagsEl = ref<HTMLElement | null>(null);
|
const tagsEl = ref<HTMLElement | null>(null);
|
||||||
let width = ref(300);
|
const width = ref(300);
|
||||||
|
|
||||||
watch(available, () => {
|
watch(available, () => {
|
||||||
try {
|
try {
|
||||||
@ -56,7 +56,7 @@ watch(available, () => {
|
|||||||
initial: [-0.03, -0.01],
|
initial: [-0.03, -0.01],
|
||||||
frontSelect: true,
|
frontSelect: true,
|
||||||
imageRadius: 8,
|
imageRadius: 8,
|
||||||
//dragControl: true,
|
// dragControl: true,
|
||||||
dragThreshold: 3,
|
dragThreshold: 3,
|
||||||
wheelZoom: false,
|
wheelZoom: false,
|
||||||
reverse: true,
|
reverse: true,
|
||||||
|
@ -12,8 +12,8 @@
|
|||||||
<div v-if="queue > 0" class="new">
|
<div v-if="queue > 0" class="new">
|
||||||
<button
|
<button
|
||||||
class="_buttonPrimary _shadow"
|
class="_buttonPrimary _shadow"
|
||||||
@click="tlComponent.scrollTop()"
|
|
||||||
:class="{ instant: !$store.state.animation }"
|
:class="{ instant: !$store.state.animation }"
|
||||||
|
@click="tlComponent.scrollTop()"
|
||||||
>
|
>
|
||||||
{{ i18n.ts.newNoteRecived }}
|
{{ i18n.ts.newNoteRecived }}
|
||||||
<i class="ph-arrow-up ph-bold"></i>
|
<i class="ph-arrow-up ph-bold"></i>
|
||||||
@ -28,7 +28,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed, provide, onUnmounted, ref } from "vue";
|
import { computed, onUnmounted, provide, ref } from "vue";
|
||||||
import XNotes from "@/components/MkNotes.vue";
|
import XNotes from "@/components/MkNotes.vue";
|
||||||
import MkInfo from "@/components/MkInfo.vue";
|
import MkInfo from "@/components/MkInfo.vue";
|
||||||
import { stream } from "@/stream";
|
import { stream } from "@/stream";
|
||||||
@ -45,7 +45,7 @@ const props = defineProps<{
|
|||||||
sound?: boolean;
|
sound?: boolean;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
let queue = ref(0);
|
const queue = ref(0);
|
||||||
|
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
(ev: "note"): void;
|
(ev: "note"): void;
|
||||||
@ -83,13 +83,7 @@ const onChangeFollowing = () => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
let endpoint;
|
let endpoint, query, connection, connection2, tlHint, tlHintClosed;
|
||||||
let query;
|
|
||||||
let connection;
|
|
||||||
let connection2;
|
|
||||||
|
|
||||||
let tlHint;
|
|
||||||
let tlHintClosed;
|
|
||||||
|
|
||||||
if (props.src === "antenna") {
|
if (props.src === "antenna") {
|
||||||
endpoint = "antennas/notes";
|
endpoint = "antennas/notes";
|
||||||
@ -223,7 +217,7 @@ function closeHint() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const pagination = {
|
const pagination = {
|
||||||
endpoint: endpoint,
|
endpoint,
|
||||||
limit: 10,
|
limit: 10,
|
||||||
params: query,
|
params: query,
|
||||||
};
|
};
|
||||||
|
@ -30,7 +30,7 @@ const emit = defineEmits<{
|
|||||||
}>();
|
}>();
|
||||||
|
|
||||||
const zIndex = os.claimZIndex("high");
|
const zIndex = os.claimZIndex("high");
|
||||||
let showing = ref(true);
|
const showing = ref(true);
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
window.setTimeout(() => {
|
window.setTimeout(() => {
|
||||||
|
@ -6,10 +6,10 @@
|
|||||||
:with-ok-button="true"
|
:with-ok-button="true"
|
||||||
:ok-button-disabled="false"
|
:ok-button-disabled="false"
|
||||||
:can-close="false"
|
:can-close="false"
|
||||||
|
style="padding: 12px"
|
||||||
@close="dialog.close()"
|
@close="dialog.close()"
|
||||||
@closed="$emit('closed')"
|
@closed="$emit('closed')"
|
||||||
@ok="ok()"
|
@ok="ok()"
|
||||||
style="padding: 12px"
|
|
||||||
>
|
>
|
||||||
<template #header>{{ title || i18n.ts.generateAccessToken }}</template>
|
<template #header>{{ title || i18n.ts.generateAccessToken }}</template>
|
||||||
<div v-if="information" class="_section">
|
<div v-if="information" class="_section">
|
||||||
@ -19,7 +19,7 @@
|
|||||||
<div style="margin-bottom: 16px">
|
<div style="margin-bottom: 16px">
|
||||||
<b>{{ i18n.ts.name }}</b>
|
<b>{{ i18n.ts.name }}</b>
|
||||||
</div>
|
</div>
|
||||||
<MkInput style="margin-bottom: 16px" v-model="name" />
|
<MkInput v-model="name" style="margin-bottom: 16px" />
|
||||||
</div>
|
</div>
|
||||||
<div class="_section">
|
<div class="_section">
|
||||||
<div style="margin-bottom: 16px">
|
<div style="margin-bottom: 16px">
|
||||||
@ -32,10 +32,10 @@
|
|||||||
i18n.ts.enableAll
|
i18n.ts.enableAll
|
||||||
}}</MkButton>
|
}}</MkButton>
|
||||||
<MkSwitch
|
<MkSwitch
|
||||||
style="margin-bottom: 6px"
|
|
||||||
v-for="kind in initialPermissions || kinds"
|
v-for="kind in initialPermissions || kinds"
|
||||||
:key="kind"
|
:key="kind"
|
||||||
v-model="permissions[kind]"
|
v-model="permissions[kind]"
|
||||||
|
style="margin-bottom: 6px"
|
||||||
>{{ i18n.t(`_permissions.${kind}`) }}</MkSwitch
|
>{{ i18n.t(`_permissions.${kind}`) }}</MkSwitch
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
@ -45,7 +45,6 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref } from "vue";
|
import { ref } from "vue";
|
||||||
|
|
||||||
import {} from "vue";
|
|
||||||
import { permissions as kinds } from "firefish-js";
|
import { permissions as kinds } from "firefish-js";
|
||||||
import MkInput from "./form/input.vue";
|
import MkInput from "./form/input.vue";
|
||||||
import MkSwitch from "./form/switch.vue";
|
import MkSwitch from "./form/switch.vue";
|
||||||
@ -75,8 +74,8 @@ const emit = defineEmits<{
|
|||||||
}>();
|
}>();
|
||||||
|
|
||||||
const dialog = ref<InstanceType<typeof XModalWindow>>();
|
const dialog = ref<InstanceType<typeof XModalWindow>>();
|
||||||
let name = ref(props.initialName);
|
const name = ref(props.initialName);
|
||||||
let permissions = ref({});
|
const permissions = ref({});
|
||||||
|
|
||||||
if (props.initialPermissions) {
|
if (props.initialPermissions) {
|
||||||
for (const kind of props.initialPermissions) {
|
for (const kind of props.initialPermissions) {
|
||||||
|
@ -230,7 +230,7 @@ const isGlobalTimelineAvailable =
|
|||||||
!instance.disableGlobalTimeline ||
|
!instance.disableGlobalTimeline ||
|
||||||
($i != null && ($i.isModerator || $i.isAdmin));
|
($i != null && ($i.isModerator || $i.isAdmin));
|
||||||
|
|
||||||
let timelines = ["home"];
|
const timelines = ["home"];
|
||||||
|
|
||||||
if (isLocalTimelineAvailable) {
|
if (isLocalTimelineAvailable) {
|
||||||
timelines.push("local");
|
timelines.push("local");
|
||||||
|
@ -33,7 +33,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { shallowRef, ref } from "vue";
|
import { ref, shallowRef } from "vue";
|
||||||
import MkModal from "@/components/MkModal.vue";
|
import MkModal from "@/components/MkModal.vue";
|
||||||
import MkSparkle from "@/components/MkSparkle.vue";
|
import MkSparkle from "@/components/MkSparkle.vue";
|
||||||
import MkButton from "@/components/MkButton.vue";
|
import MkButton from "@/components/MkButton.vue";
|
||||||
@ -43,8 +43,8 @@ import * as os from "@/os";
|
|||||||
|
|
||||||
const modal = shallowRef<InstanceType<typeof MkModal>>();
|
const modal = shallowRef<InstanceType<typeof MkModal>>();
|
||||||
|
|
||||||
let newRelease = ref(false);
|
const newRelease = ref(false);
|
||||||
let data = ref(Object);
|
const data = ref(Object);
|
||||||
|
|
||||||
os.api("release").then((res) => {
|
os.api("release").then((res) => {
|
||||||
data.value = res;
|
data.value = res;
|
||||||
|
@ -20,10 +20,10 @@
|
|||||||
<img :src="thumbnail" loading="lazy" />
|
<img :src="thumbnail" loading="lazy" />
|
||||||
<button
|
<button
|
||||||
v-if="tweetId"
|
v-if="tweetId"
|
||||||
class="_button"
|
|
||||||
v-tooltip="
|
v-tooltip="
|
||||||
tweetExpanded ? i18n.ts.close : i18n.ts.expandTweet
|
tweetExpanded ? i18n.ts.close : i18n.ts.expandTweet
|
||||||
"
|
"
|
||||||
|
class="_button"
|
||||||
@click.stop.prevent="tweetExpanded = !tweetExpanded"
|
@click.stop.prevent="tweetExpanded = !tweetExpanded"
|
||||||
>
|
>
|
||||||
<i
|
<i
|
||||||
@ -34,10 +34,10 @@
|
|||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
v-else-if="player.url"
|
v-else-if="player.url"
|
||||||
class="_button"
|
|
||||||
v-tooltip="
|
v-tooltip="
|
||||||
playerEnabled ? i18n.ts.close : i18n.ts.enablePlayer
|
playerEnabled ? i18n.ts.close : i18n.ts.enablePlayer
|
||||||
"
|
"
|
||||||
|
class="_button"
|
||||||
@click.stop.prevent="playerEnabled = !playerEnabled"
|
@click.stop.prevent="playerEnabled = !playerEnabled"
|
||||||
>
|
>
|
||||||
<i
|
<i
|
||||||
@ -100,7 +100,7 @@
|
|||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { onUnmounted, ref } from "vue";
|
import { onUnmounted, ref } from "vue";
|
||||||
import { url as local, lang } from "@/config";
|
import { lang, url as local } from "@/config";
|
||||||
import { i18n } from "@/i18n";
|
import { i18n } from "@/i18n";
|
||||||
import { defaultStore } from "@/store";
|
import { defaultStore } from "@/store";
|
||||||
|
|
||||||
@ -117,22 +117,22 @@ const props = withDefaults(
|
|||||||
const self = props.url.startsWith(local);
|
const self = props.url.startsWith(local);
|
||||||
const attr = self ? "to" : "href";
|
const attr = self ? "to" : "href";
|
||||||
const target = self ? null : "_blank";
|
const target = self ? null : "_blank";
|
||||||
let fetching = ref(true);
|
const fetching = ref(true);
|
||||||
let title = ref<string | null>(null);
|
const title = ref<string | null>(null);
|
||||||
let description = ref<string | null>(null);
|
const description = ref<string | null>(null);
|
||||||
let thumbnail = ref<string | null>(null);
|
const thumbnail = ref<string | null>(null);
|
||||||
let icon = ref<string | null>(null);
|
const icon = ref<string | null>(null);
|
||||||
let sitename = ref<string | null>(null);
|
const sitename = ref<string | null>(null);
|
||||||
let player = ref({
|
const player = ref({
|
||||||
url: null,
|
url: null,
|
||||||
width: null,
|
width: null,
|
||||||
height: null,
|
height: null,
|
||||||
});
|
});
|
||||||
let playerEnabled = ref(false);
|
const playerEnabled = ref(false);
|
||||||
let tweetId = ref<string | null>(null);
|
const tweetId = ref<string | null>(null);
|
||||||
let tweetExpanded = ref(props.detail);
|
const tweetExpanded = ref(props.detail);
|
||||||
const embedId = `embed${Math.random().toString().replace(/\D/, "")}`;
|
const embedId = `embed${Math.random().toString().replace(/\D/, "")}`;
|
||||||
let tweetHeight = ref(150);
|
const tweetHeight = ref(150);
|
||||||
|
|
||||||
const requestUrl = new URL(props.url);
|
const requestUrl = new URL(props.url);
|
||||||
if (!["http:", "https:"].includes(requestUrl.protocol))
|
if (!["http:", "https:"].includes(requestUrl.protocol))
|
||||||
|
@ -28,8 +28,8 @@ const emit = defineEmits<{
|
|||||||
}>();
|
}>();
|
||||||
|
|
||||||
const zIndex = os.claimZIndex("middle");
|
const zIndex = os.claimZIndex("middle");
|
||||||
let top = ref(0);
|
const top = ref(0);
|
||||||
let left = ref(0);
|
const left = ref(0);
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
const rect = props.source.getBoundingClientRect();
|
const rect = props.source.getBoundingClientRect();
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref } from "vue";
|
import { ref } from "vue";
|
||||||
|
|
||||||
import * as misskey from "firefish-js";
|
import type * as misskey from "firefish-js";
|
||||||
import MkMiniChart from "@/components/MkMiniChart.vue";
|
import MkMiniChart from "@/components/MkMiniChart.vue";
|
||||||
import * as os from "@/os";
|
import * as os from "@/os";
|
||||||
import { acct, userPage } from "@/filters/user";
|
import { acct, userPage } from "@/filters/user";
|
||||||
@ -43,7 +43,7 @@ const props = withDefaults(
|
|||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
let chartValues = ref<number[] | null>(null);
|
const chartValues = ref<number[] | null>(null);
|
||||||
|
|
||||||
if (props.withChart) {
|
if (props.withChart) {
|
||||||
os.apiGet("charts/user/notes", {
|
os.apiGet("charts/user/notes", {
|
||||||
|
@ -88,7 +88,7 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref } from "vue";
|
import { ref } from "vue";
|
||||||
|
|
||||||
import * as misskey from "firefish-js";
|
import type * as misskey from "firefish-js";
|
||||||
import MkFollowButton from "@/components/MkFollowButton.vue";
|
import MkFollowButton from "@/components/MkFollowButton.vue";
|
||||||
import XShowMoreButton from "@/components/MkShowMoreButton.vue";
|
import XShowMoreButton from "@/components/MkShowMoreButton.vue";
|
||||||
import MkNumber from "@/components/MkNumber.vue";
|
import MkNumber from "@/components/MkNumber.vue";
|
||||||
@ -100,13 +100,13 @@ const props = defineProps<{
|
|||||||
detailed?: boolean;
|
detailed?: boolean;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
let isLong = ref(
|
const isLong = ref(
|
||||||
props.detailed &&
|
props.detailed &&
|
||||||
props.user.description &&
|
props.user.description &&
|
||||||
(props.user.description.split("\n").length > 9 ||
|
(props.user.description.split("\n").length > 9 ||
|
||||||
props.user.description.length > 400),
|
props.user.description.length > 400),
|
||||||
);
|
);
|
||||||
let collapsed = ref(isLong.value);
|
const collapsed = ref(isLong.value);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
@ -27,7 +27,8 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref } from "vue";
|
import { ref } from "vue";
|
||||||
import MkUserInfo from "@/components/MkUserInfo.vue";
|
import MkUserInfo from "@/components/MkUserInfo.vue";
|
||||||
import MkPagination, { Paging } from "@/components/MkPagination.vue";
|
import type { Paging } from "@/components/MkPagination.vue";
|
||||||
|
import MkPagination from "@/components/MkPagination.vue";
|
||||||
import { i18n } from "@/i18n";
|
import { i18n } from "@/i18n";
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed } from "vue";
|
import { computed } from "vue";
|
||||||
|
|
||||||
import * as misskey from "firefish-js";
|
import type * as misskey from "firefish-js";
|
||||||
import { i18n } from "@/i18n";
|
import { i18n } from "@/i18n";
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
|
@ -29,9 +29,9 @@
|
|||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { onMounted, ref } from "vue";
|
import { onMounted, ref } from "vue";
|
||||||
import MkUserInfo from "@/components/MkUserInfo.vue";
|
|
||||||
import * as Acct from "firefish-js/built/acct";
|
import * as Acct from "firefish-js/built/acct";
|
||||||
import type * as misskey from "firefish-js";
|
import type * as misskey from "firefish-js";
|
||||||
|
import MkUserInfo from "@/components/MkUserInfo.vue";
|
||||||
import * as os from "@/os";
|
import * as os from "@/os";
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
@ -47,9 +47,9 @@ const emit = defineEmits<{
|
|||||||
}>();
|
}>();
|
||||||
|
|
||||||
const zIndex = os.claimZIndex("middle");
|
const zIndex = os.claimZIndex("middle");
|
||||||
let user = ref<misskey.entities.UserDetailed | null>(null);
|
const user = ref<misskey.entities.UserDetailed | null>(null);
|
||||||
let top = ref(0);
|
const top = ref(0);
|
||||||
let left = ref(0);
|
const left = ref(0);
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
if (typeof props.q === "object") {
|
if (typeof props.q === "object") {
|
||||||
|
@ -46,7 +46,7 @@
|
|||||||
:user="user"
|
:user="user"
|
||||||
class="avatar"
|
class="avatar"
|
||||||
:show-indicator="true"
|
:show-indicator="true"
|
||||||
disableLink
|
disable-link
|
||||||
/>
|
/>
|
||||||
<div class="body">
|
<div class="body">
|
||||||
<MkUserName :user="user" class="name" />
|
<MkUserName :user="user" class="name" />
|
||||||
@ -74,7 +74,7 @@
|
|||||||
:user="user"
|
:user="user"
|
||||||
class="avatar"
|
class="avatar"
|
||||||
:show-indicator="true"
|
:show-indicator="true"
|
||||||
disableLink
|
disable-link
|
||||||
/>
|
/>
|
||||||
<div class="body">
|
<div class="body">
|
||||||
<MkUserName :user="user" class="name" />
|
<MkUserName :user="user" class="name" />
|
||||||
@ -89,7 +89,7 @@
|
|||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { onMounted, ref } from "vue";
|
import { onMounted, ref } from "vue";
|
||||||
import * as misskey from "firefish-js";
|
import type * as misskey from "firefish-js";
|
||||||
import MkInput from "@/components/form/input.vue";
|
import MkInput from "@/components/form/input.vue";
|
||||||
import FormSplit from "@/components/form/split.vue";
|
import FormSplit from "@/components/form/split.vue";
|
||||||
import XModalWindow from "@/components/MkModalWindow.vue";
|
import XModalWindow from "@/components/MkModalWindow.vue";
|
||||||
@ -103,12 +103,12 @@ const emit = defineEmits<{
|
|||||||
(ev: "closed"): void;
|
(ev: "closed"): void;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
let username = ref("");
|
const username = ref("");
|
||||||
let host = ref("");
|
const host = ref("");
|
||||||
let users: misskey.entities.UserDetailed[] = ref([]);
|
const users: misskey.entities.UserDetailed[] = ref([]);
|
||||||
let recentUsers: misskey.entities.UserDetailed[] = ref([]);
|
const recentUsers: misskey.entities.UserDetailed[] = ref([]);
|
||||||
let selected: misskey.entities.UserDetailed | null = ref(null);
|
const selected: misskey.entities.UserDetailed | null = ref(null);
|
||||||
let dialogEl = ref();
|
const dialogEl = ref();
|
||||||
|
|
||||||
const search = () => {
|
const search = () => {
|
||||||
if (username.value === "" && host.value === "") {
|
if (username.value === "" && host.value === "") {
|
||||||
|
@ -42,7 +42,7 @@
|
|||||||
:user="user"
|
:user="user"
|
||||||
class="avatar"
|
class="avatar"
|
||||||
:show-indicator="true"
|
:show-indicator="true"
|
||||||
disableLink
|
disable-link
|
||||||
/>
|
/>
|
||||||
<div class="body">
|
<div class="body">
|
||||||
<MkUserName :user="user" class="name" />
|
<MkUserName :user="user" class="name" />
|
||||||
@ -70,7 +70,7 @@
|
|||||||
:user="user"
|
:user="user"
|
||||||
class="avatar"
|
class="avatar"
|
||||||
:show-indicator="true"
|
:show-indicator="true"
|
||||||
disableLink
|
disable-link
|
||||||
/>
|
/>
|
||||||
<div class="body">
|
<div class="body">
|
||||||
<MkUserName :user="user" class="name" />
|
<MkUserName :user="user" class="name" />
|
||||||
@ -85,7 +85,7 @@
|
|||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { onMounted, ref } from "vue";
|
import { onMounted, ref } from "vue";
|
||||||
import * as misskey from "firefish-js";
|
import type * as misskey from "firefish-js";
|
||||||
import MkInput from "@/components/form/input.vue";
|
import MkInput from "@/components/form/input.vue";
|
||||||
import FormSplit from "@/components/form/split.vue";
|
import FormSplit from "@/components/form/split.vue";
|
||||||
import XModalWindow from "@/components/MkModalWindow.vue";
|
import XModalWindow from "@/components/MkModalWindow.vue";
|
||||||
@ -99,11 +99,11 @@ const emit = defineEmits<{
|
|||||||
(ev: "closed"): void;
|
(ev: "closed"): void;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
let username = ref("");
|
const username = ref("");
|
||||||
let users: misskey.entities.UserDetailed[] = ref([]);
|
const users: misskey.entities.UserDetailed[] = ref([]);
|
||||||
let recentUsers: misskey.entities.UserDetailed[] = ref([]);
|
const recentUsers: misskey.entities.UserDetailed[] = ref([]);
|
||||||
let selected: misskey.entities.UserDetailed | null = ref(null);
|
const selected: misskey.entities.UserDetailed | null = ref(null);
|
||||||
let dialogEl = ref();
|
const dialogEl = ref();
|
||||||
|
|
||||||
const search = () => {
|
const search = () => {
|
||||||
if (username.value === "") {
|
if (username.value === "") {
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
>
|
>
|
||||||
<div class="beaffaef">
|
<div class="beaffaef">
|
||||||
<div v-for="u in users" :key="u.id" class="user">
|
<div v-for="u in users" :key="u.id" class="user">
|
||||||
<MkAvatar class="avatar" :user="u" disableLink />
|
<MkAvatar class="avatar" :user="u" disable-link />
|
||||||
<MkUserName class="name" :user="u" :nowrap="true" />
|
<MkUserName class="name" :user="u" :nowrap="true" />
|
||||||
</div>
|
</div>
|
||||||
<div v-if="users.length < count" class="omitted">
|
<div v-if="users.length < count" class="omitted">
|
||||||
|
@ -2,13 +2,13 @@
|
|||||||
<span v-if="note.visibility !== 'public'" :class="$style.visibility">
|
<span v-if="note.visibility !== 'public'" :class="$style.visibility">
|
||||||
<i
|
<i
|
||||||
v-if="note.visibility === 'home'"
|
v-if="note.visibility === 'home'"
|
||||||
class="ph-house ph-bold ph-lg"
|
|
||||||
v-tooltip="i18n.ts._visibility.home"
|
v-tooltip="i18n.ts._visibility.home"
|
||||||
|
class="ph-house ph-bold ph-lg"
|
||||||
></i>
|
></i>
|
||||||
<i
|
<i
|
||||||
v-else-if="note.visibility === 'followers'"
|
v-else-if="note.visibility === 'followers'"
|
||||||
class="ph-lock ph-bold ph-lg"
|
|
||||||
v-tooltip="i18n.ts._visibility.followers"
|
v-tooltip="i18n.ts._visibility.followers"
|
||||||
|
class="ph-lock ph-bold ph-lg"
|
||||||
></i>
|
></i>
|
||||||
<i
|
<i
|
||||||
v-else-if="note.visibility === 'specified'"
|
v-else-if="note.visibility === 'specified'"
|
||||||
@ -18,8 +18,8 @@
|
|||||||
</span>
|
</span>
|
||||||
<span v-if="note.localOnly" :class="$style.localOnly"
|
<span v-if="note.localOnly" :class="$style.localOnly"
|
||||||
><i
|
><i
|
||||||
class="ph-hand-fist ph-bold ph-lg"
|
|
||||||
v-tooltip="i18n.ts._visibility.localOnly"
|
v-tooltip="i18n.ts._visibility.localOnly"
|
||||||
|
class="ph-hand-fist ph-bold ph-lg"
|
||||||
></i
|
></i
|
||||||
></span>
|
></span>
|
||||||
</template>
|
</template>
|
||||||
|
@ -122,8 +122,8 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { nextTick, watch, shallowRef, ref } from "vue";
|
import { nextTick, ref, shallowRef, watch } from "vue";
|
||||||
import * as misskey from "firefish-js";
|
import type * as misskey from "firefish-js";
|
||||||
import MkModal from "@/components/MkModal.vue";
|
import MkModal from "@/components/MkModal.vue";
|
||||||
import { i18n } from "@/i18n";
|
import { i18n } from "@/i18n";
|
||||||
|
|
||||||
@ -147,8 +147,8 @@ const emit = defineEmits<{
|
|||||||
(ev: "closed"): void;
|
(ev: "closed"): void;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
let v = ref(props.currentVisibility);
|
const v = ref(props.currentVisibility);
|
||||||
let localOnly = ref(props.currentLocalOnly);
|
const localOnly = ref(props.currentLocalOnly);
|
||||||
|
|
||||||
watch(localOnly, () => {
|
watch(localOnly, () => {
|
||||||
emit("changeLocalOnly", localOnly.value);
|
emit("changeLocalOnly", localOnly.value);
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { watch, shallowRef } from "vue";
|
import { shallowRef, watch } from "vue";
|
||||||
import MkModal from "@/components/MkModal.vue";
|
import MkModal from "@/components/MkModal.vue";
|
||||||
|
|
||||||
const modal = shallowRef<InstanceType<typeof MkModal>>();
|
const modal = shallowRef<InstanceType<typeof MkModal>>();
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="vjoppmmu">
|
<div class="vjoppmmu">
|
||||||
<template v-if="edit">
|
<template v-if="edit">
|
||||||
<header tabindex="-1" v-focus>
|
<header v-focus tabindex="-1">
|
||||||
<MkSelect
|
<MkSelect
|
||||||
v-model="widgetAdderSelected"
|
v-model="widgetAdderSelected"
|
||||||
style="margin-bottom: var(--margin)"
|
style="margin-bottom: var(--margin)"
|
||||||
@ -39,8 +39,8 @@
|
|||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
class="remove _button"
|
class="remove _button"
|
||||||
@click.prevent.stop="removeWidget(element)"
|
|
||||||
:aria-label="i18n.t('close')"
|
:aria-label="i18n.t('close')"
|
||||||
|
@click.prevent.stop="removeWidget(element)"
|
||||||
>
|
>
|
||||||
<i class="ph-x ph-bold ph-lg"></i>
|
<i class="ph-x ph-bold ph-lg"></i>
|
||||||
</button>
|
</button>
|
||||||
@ -72,7 +72,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref, computed } from "vue";
|
import { computed, ref } from "vue";
|
||||||
import { v4 as uuid } from "uuid";
|
import { v4 as uuid } from "uuid";
|
||||||
import { VueDraggable } from "vue-draggable-plus";
|
import { VueDraggable } from "vue-draggable-plus";
|
||||||
import MkSelect from "@/components/form/select.vue";
|
import MkSelect from "@/components/form/select.vue";
|
||||||
@ -81,11 +81,11 @@ import { widgets as widgetDefs } from "@/widgets";
|
|||||||
import * as os from "@/os";
|
import * as os from "@/os";
|
||||||
import { i18n } from "@/i18n";
|
import { i18n } from "@/i18n";
|
||||||
|
|
||||||
type Widget = {
|
interface Widget {
|
||||||
name: string;
|
name: string;
|
||||||
id: string;
|
id: string;
|
||||||
data: Record<string, any>;
|
data: Record<string, any>;
|
||||||
};
|
}
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
widgets: Widget[];
|
widgets: Widget[];
|
||||||
@ -141,7 +141,7 @@ function onContextmenu(widget: Widget, ev: MouseEvent) {
|
|||||||
["INPUT", "TEXTAREA", "IMG", "VIDEO", "CANVAS"].includes(
|
["INPUT", "TEXTAREA", "IMG", "VIDEO", "CANVAS"].includes(
|
||||||
ev.target.tagName,
|
ev.target.tagName,
|
||||||
) ||
|
) ||
|
||||||
ev.target.attributes["contenteditable"]
|
ev.target.attributes.contenteditable
|
||||||
)
|
)
|
||||||
return;
|
return;
|
||||||
if (window.getSelection()?.toString() !== "") return;
|
if (window.getSelection()?.toString() !== "") return;
|
||||||
|
@ -118,7 +118,7 @@
|
|||||||
import { onBeforeUnmount, onMounted, provide, ref } from "vue";
|
import { onBeforeUnmount, onMounted, provide, ref } from "vue";
|
||||||
import contains from "@/scripts/contains";
|
import contains from "@/scripts/contains";
|
||||||
import * as os from "@/os";
|
import * as os from "@/os";
|
||||||
import { MenuItem } from "@/types/menu";
|
import type { MenuItem } from "@/types/menu";
|
||||||
|
|
||||||
const minHeight = 50;
|
const minHeight = 50;
|
||||||
const minWidth = 250;
|
const minWidth = 250;
|
||||||
@ -170,14 +170,14 @@ const emit = defineEmits<{
|
|||||||
|
|
||||||
provide("inWindow", true);
|
provide("inWindow", true);
|
||||||
|
|
||||||
let rootEl = ref<HTMLElement | null>();
|
const rootEl = ref<HTMLElement | null>();
|
||||||
let showing = ref(true);
|
const showing = ref(true);
|
||||||
let beforeClickedAt = 0;
|
let beforeClickedAt = 0,
|
||||||
let maximized = ref(false);
|
maximized = ref(false),
|
||||||
let unMaximizedTop = "";
|
unMaximizedTop = "",
|
||||||
let unMaximizedLeft = "";
|
unMaximizedLeft = "",
|
||||||
let unMaximizedWidth = "";
|
unMaximizedWidth = "",
|
||||||
let unMaximizedHeight = "";
|
unMaximizedHeight = "";
|
||||||
|
|
||||||
function close() {
|
function close() {
|
||||||
showing.value = false;
|
showing.value = false;
|
||||||
@ -280,8 +280,8 @@ function onHeaderMousedown(evt: MouseEvent) {
|
|||||||
const windowHeight = main.offsetHeight;
|
const windowHeight = main.offsetHeight;
|
||||||
|
|
||||||
function move(x: number, y: number) {
|
function move(x: number, y: number) {
|
||||||
let moveLeft = x - moveBaseX;
|
let moveLeft = x - moveBaseX,
|
||||||
let moveTop = y - moveBaseY;
|
moveTop = y - moveBaseY;
|
||||||
|
|
||||||
// 下はみ出し
|
// 下はみ出し
|
||||||
if (moveTop + windowHeight > browserHeight)
|
if (moveTop + windowHeight > browserHeight)
|
||||||
|
@ -24,7 +24,8 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { toRefs, Ref, ref } from "vue";
|
import type { Ref } from "vue";
|
||||||
|
import { ref, toRefs } from "vue";
|
||||||
import * as os from "@/os";
|
import * as os from "@/os";
|
||||||
import Ripple from "@/components/MkRipple.vue";
|
import Ripple from "@/components/MkRipple.vue";
|
||||||
import { i18n } from "@/i18n";
|
import { i18n } from "@/i18n";
|
||||||
@ -38,7 +39,7 @@ const emit = defineEmits<{
|
|||||||
(ev: "update:modelValue", v: boolean): void;
|
(ev: "update:modelValue", v: boolean): void;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
let button = ref<HTMLElement>();
|
const button = ref<HTMLElement>();
|
||||||
const checked = toRefs(props).modelValue;
|
const checked = toRefs(props).modelValue;
|
||||||
const toggle = () => {
|
const toggle = () => {
|
||||||
if (props.disabled) return;
|
if (props.disabled) return;
|
||||||
|
@ -36,7 +36,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { watch, computed, ref } from "vue";
|
import { computed, ref, watch } from "vue";
|
||||||
import type * as misskey from "firefish-js";
|
import type * as misskey from "firefish-js";
|
||||||
import { getStaticImageUrl } from "@/scripts/get-static-image-url";
|
import { getStaticImageUrl } from "@/scripts/get-static-image-url";
|
||||||
import { extractAvgColorFromBlurhash } from "@/scripts/extract-avg-color-from-blurhash";
|
import { extractAvgColorFromBlurhash } from "@/scripts/extract-avg-color-from-blurhash";
|
||||||
@ -74,7 +74,7 @@ function onClick(ev: MouseEvent) {
|
|||||||
emit("click", ev);
|
emit("click", ev);
|
||||||
}
|
}
|
||||||
|
|
||||||
let color = ref();
|
const color = ref();
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
() => props.user.avatarBlurhash,
|
() => props.user.avatarBlurhash,
|
||||||
|
@ -122,13 +122,13 @@
|
|||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import {
|
import {
|
||||||
|
computed,
|
||||||
inject,
|
inject,
|
||||||
nextTick,
|
nextTick,
|
||||||
onMounted,
|
onMounted,
|
||||||
onUnmounted,
|
onUnmounted,
|
||||||
ref,
|
ref,
|
||||||
watch,
|
watch,
|
||||||
computed,
|
|
||||||
} from "vue";
|
} from "vue";
|
||||||
import MkFollowButton from "@/components/MkFollowButton.vue";
|
import MkFollowButton from "@/components/MkFollowButton.vue";
|
||||||
import { popupMenu } from "@/os";
|
import { popupMenu } from "@/os";
|
||||||
@ -178,7 +178,7 @@ const tabRefs = {};
|
|||||||
const tabHighlightEl = ref<HTMLElement | null>(null);
|
const tabHighlightEl = ref<HTMLElement | null>(null);
|
||||||
const tabsEl = ref<HTMLElement | null>(null);
|
const tabsEl = ref<HTMLElement | null>(null);
|
||||||
const bg = ref(null);
|
const bg = ref(null);
|
||||||
let narrow = ref(false);
|
const narrow = ref(false);
|
||||||
const hasTabs = computed(() => props.tabs && props.tabs.length > 0);
|
const hasTabs = computed(() => props.tabs && props.tabs.length > 0);
|
||||||
const hasActions = computed(() => props.actions && props.actions.length > 0);
|
const hasActions = computed(() => props.actions && props.actions.length > 0);
|
||||||
const show = computed(() => {
|
const show = computed(() => {
|
||||||
|
@ -22,8 +22,8 @@ import { inject, onMounted, onUnmounted, provide, ref, watch } from "vue";
|
|||||||
const headerEl = ref<HTMLElement>();
|
const headerEl = ref<HTMLElement>();
|
||||||
const bodyEl = ref<HTMLElement>();
|
const bodyEl = ref<HTMLElement>();
|
||||||
|
|
||||||
let headerHeight = ref<string | undefined>(),
|
const headerHeight = ref<string | undefined>();
|
||||||
childStickyTop = ref(0);
|
const childStickyTop = ref(0);
|
||||||
const parentStickyTop = inject<Ref<number>>(CURRENT_STICKY_TOP, ref(0));
|
const parentStickyTop = inject<Ref<number>>(CURRENT_STICKY_TOP, ref(0));
|
||||||
provide(CURRENT_STICKY_TOP, childStickyTop);
|
provide(CURRENT_STICKY_TOP, childStickyTop);
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { onMounted, onUnmounted, ref, computed } from "vue";
|
import { computed, onMounted, onUnmounted, ref } from "vue";
|
||||||
import { i18n } from "@/i18n";
|
import { i18n } from "@/i18n";
|
||||||
import { dateTimeFormat } from "@/scripts/intl-const";
|
import { dateTimeFormat } from "@/scripts/intl-const";
|
||||||
|
|
||||||
@ -37,7 +37,7 @@ const _time =
|
|||||||
const invalid = Number.isNaN(_time);
|
const invalid = Number.isNaN(_time);
|
||||||
const absolute = !invalid ? dateTimeFormat.format(_time) : i18n.ts._ago.invalid;
|
const absolute = !invalid ? dateTimeFormat.format(_time) : i18n.ts._ago.invalid;
|
||||||
|
|
||||||
let now = ref((props.origin ?? new Date()).getTime());
|
const now = ref((props.origin ?? new Date()).getTime());
|
||||||
const relative = computed<string>(() => {
|
const relative = computed<string>(() => {
|
||||||
if (props.mode === "absolute") return ""; // absoluteではrelativeを使わないので計算しない
|
if (props.mode === "absolute") return ""; // absoluteではrelativeを使わないので計算しない
|
||||||
if (invalid) return i18n.ts._ago.invalid;
|
if (invalid) return i18n.ts._ago.invalid;
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { inject, onBeforeUnmount, provide, shallowRef, ref } from "vue";
|
import { inject, onBeforeUnmount, provide, ref, shallowRef } from "vue";
|
||||||
import type { Resolved, Router } from "@/nirax";
|
import type { Resolved, Router } from "@/nirax";
|
||||||
import { defaultStore } from "@/store";
|
import { defaultStore } from "@/store";
|
||||||
|
|
||||||
@ -48,11 +48,11 @@ function resolveNested(current: Resolved, d = 0): Resolved | null {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const current = resolveNested(router.current)!;
|
const current = resolveNested(router.current)!;
|
||||||
let currentPageComponent = shallowRef(current.route.component),
|
const currentPageComponent = shallowRef(current.route.component);
|
||||||
currentPageProps = ref(current.props),
|
const currentPageProps = ref(current.props);
|
||||||
key = ref(
|
const key = ref(
|
||||||
current.route.path + JSON.stringify(Object.fromEntries(current.props)),
|
current.route.path + JSON.stringify(Object.fromEntries(current.props)),
|
||||||
);
|
);
|
||||||
|
|
||||||
function onChange({ resolved, key: newKey }) {
|
function onChange({ resolved, key: newKey }) {
|
||||||
const current = resolveNested(resolved);
|
const current = resolveNested(resolved);
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { h, defineComponent } from "vue";
|
import { defineComponent, h } from "vue";
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
props: {
|
props: {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { App } from "vue";
|
import type { App } from "vue";
|
||||||
|
|
||||||
import Mfm from "./global/MkMisskeyFlavoredMarkdown.vue";
|
import Mfm from "./global/MkMisskeyFlavoredMarkdown.vue";
|
||||||
import MkA from "./global/MkA.vue";
|
import MkA from "./global/MkA.vue";
|
||||||
|
@ -498,7 +498,7 @@ export default defineComponent({
|
|||||||
// (see the issue #9816 on Codeberg)
|
// (see the issue #9816 on Codeberg)
|
||||||
if (token.props.content.slice(-6).toLowerCase() === "search") {
|
if (token.props.content.slice(-6).toLowerCase() === "search") {
|
||||||
const sentinel = "#";
|
const sentinel = "#";
|
||||||
let ast2 = (isPlain ? mfm.parseSimple : mfm.parse)(
|
const ast2 = (isPlain ? mfm.parseSimple : mfm.parse)(
|
||||||
token.props.content.slice(0, -6) + sentinel,
|
token.props.content.slice(0, -6) + sentinel,
|
||||||
);
|
);
|
||||||
if (
|
if (
|
||||||
|
@ -9,7 +9,8 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { defineComponent, PropType } from "vue";
|
import type { PropType } from "vue";
|
||||||
|
import { defineComponent } from "vue";
|
||||||
import XText from "./page.text.vue";
|
import XText from "./page.text.vue";
|
||||||
import XSection from "./page.section.vue";
|
import XSection from "./page.section.vue";
|
||||||
import XImage from "./page.image.vue";
|
import XImage from "./page.image.vue";
|
||||||
@ -25,8 +26,8 @@ import XCounter from "./page.counter.vue";
|
|||||||
import XRadioButton from "./page.radio-button.vue";
|
import XRadioButton from "./page.radio-button.vue";
|
||||||
import XCanvas from "./page.canvas.vue";
|
import XCanvas from "./page.canvas.vue";
|
||||||
import XNote from "./page.note.vue";
|
import XNote from "./page.note.vue";
|
||||||
import { Hpml } from "@/scripts/hpml/evaluator";
|
import type { Hpml } from "@/scripts/hpml/evaluator";
|
||||||
import { Block } from "@/scripts/hpml/block";
|
import type { Block } from "@/scripts/hpml/block";
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
components: {
|
components: {
|
||||||
|
@ -7,11 +7,12 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { defineComponent, PropType, unref } from "vue";
|
import type { PropType } from "vue";
|
||||||
|
import { defineComponent, unref } from "vue";
|
||||||
import MkButton from "../MkButton.vue";
|
import MkButton from "../MkButton.vue";
|
||||||
import * as os from "@/os";
|
import * as os from "@/os";
|
||||||
import { ButtonBlock } from "@/scripts/hpml/block";
|
import type { ButtonBlock } from "@/scripts/hpml/block";
|
||||||
import { Hpml } from "@/scripts/hpml/evaluator";
|
import type { Hpml } from "@/scripts/hpml/evaluator";
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
components: {
|
components: {
|
||||||
|
@ -5,9 +5,10 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { defineComponent, onMounted, PropType, Ref, ref } from "vue";
|
import type { PropType, Ref } from "vue";
|
||||||
import { CanvasBlock } from "@/scripts/hpml/block";
|
import { defineComponent, onMounted, ref } from "vue";
|
||||||
import { Hpml } from "@/scripts/hpml/evaluator";
|
import type { CanvasBlock } from "@/scripts/hpml/block";
|
||||||
|
import type { Hpml } from "@/scripts/hpml/evaluator";
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
props: {
|
props: {
|
||||||
|
@ -7,10 +7,11 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { computed, defineComponent, PropType } from "vue";
|
import type { PropType } from "vue";
|
||||||
|
import { computed, defineComponent } from "vue";
|
||||||
import MkButton from "../MkButton.vue";
|
import MkButton from "../MkButton.vue";
|
||||||
import { CounterVarBlock } from "@/scripts/hpml/block";
|
import type { CounterVarBlock } from "@/scripts/hpml/block";
|
||||||
import { Hpml } from "@/scripts/hpml/evaluator";
|
import type { Hpml } from "@/scripts/hpml/evaluator";
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
components: {
|
components: {
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user