Merge branch 'develop' into test

This commit is contained in:
syuilo 2022-05-15 22:22:32 +09:00
commit bc24ec044c
13 changed files with 101 additions and 88 deletions

View File

@ -18,6 +18,10 @@ You should also include the user name that made the change.
- enhance: API: notifications/readは配列でも受け付けるように #7667 @tamaina - enhance: API: notifications/readは配列でも受け付けるように #7667 @tamaina
- enhance: プッシュ通知を複数アカウント対応に #7667 @tamaina - enhance: プッシュ通知を複数アカウント対応に #7667 @tamaina
- enhance: プッシュ通知にクリックやactionを設定 #7667 @tamaina - enhance: プッシュ通知にクリックやactionを設定 #7667 @tamaina
- replaced webpack with Vite @tamaina
- update dependencies @syuilo
- enhance: display URL of QR code for TOTP registration @syuilo
- make CAPTCHA required for signin to improve security @syuilo
### Bugfixes ### Bugfixes
- Client: fix settings page @tamaina - Client: fix settings page @tamaina
@ -25,6 +29,13 @@ You should also include the user name that made the change.
- Server: await promises when following or unfollowing users @Johann150 - Server: await promises when following or unfollowing users @Johann150
- Client: fix abuse reports page to be able to show all reports @Johann150 - Client: fix abuse reports page to be able to show all reports @Johann150
- Federation: Add rel attribute to host-meta @mei23 - Federation: Add rel attribute to host-meta @mei23
- Client: fix profile picture height in mentions @tamaina
- MFM: more animated functions support `speed` parameter @futchitwo
- Federation: Fix quote renotes containing no text being federated correctly @Johann150
- Server: fix missing foreign key for reports leading to reports page being unusable @Johann150
- Server: fix internal in-memory caching @Johann150
- Server: use correct order of attachments on notes @Johann150
- Server: prevent crash when processing certain PNGs @syuilo
## 12.110.1 (2022/04/23) ## 12.110.1 (2022/04/23)

View File

@ -1,6 +1,6 @@
FROM node:18.0.0-alpine3.15 AS base FROM node:18.0.0-alpine3.15 AS base
ENV NODE_ENV=production ARG NODE_ENV=production
WORKDIR /misskey WORKDIR /misskey
@ -31,5 +31,6 @@ COPY --from=builder /misskey/packages/backend/built ./packages/backend/built
COPY --from=builder /misskey/packages/client/node_modules ./packages/client/node_modules COPY --from=builder /misskey/packages/client/node_modules ./packages/client/node_modules
COPY . ./ COPY . ./
ENV NODE_ENV=production
CMD ["npm", "run", "migrateandstart"] CMD ["npm", "run", "migrateandstart"]

View File

@ -6,7 +6,7 @@
#───┘ URL └───────────────────────────────────────────────────── #───┘ URL └─────────────────────────────────────────────────────
# Final accessible URL seen by a user. # Final accessible URL seen by a user.
url: https://example.tld/ # url: https://example.tld/
# ONCE YOU HAVE STARTED THE INSTANCE, DO NOT CHANGE THE # ONCE YOU HAVE STARTED THE INSTANCE, DO NOT CHANGE THE
# URL SETTINGS AFTER THAT! # URL SETTINGS AFTER THAT!
@ -41,7 +41,7 @@ url: https://example.tld/
# You need to set Certificate in 'https' section. # You need to set Certificate in 'https' section.
# To use option 1, uncomment below line. # To use option 1, uncomment below line.
port: 3000 # A port that your Misskey server should listen. port: 3000 # A port that your Misskey server should listen.
# To use option 2, uncomment below lines. # To use option 2, uncomment below lines.
#port: 443 #port: 443
@ -89,8 +89,8 @@ redis:
# host: localhost # host: localhost
# port: 9200 # port: 9200
# ssl: false # ssl: false
# user: # user:
# pass: # pass:
# ┌───────────────┐ # ┌───────────────┐
#───┘ ID generation └─────────────────────────────────────────── #───┘ ID generation └───────────────────────────────────────────
@ -108,8 +108,7 @@ redis:
# ONCE YOU HAVE STARTED THE INSTANCE, DO NOT CHANGE THE # ONCE YOU HAVE STARTED THE INSTANCE, DO NOT CHANGE THE
# ID SETTINGS AFTER THAT! # ID SETTINGS AFTER THAT!
id: 'aid' id: "aid"
# ┌─────────────────────┐ # ┌─────────────────────┐
#───┘ Other configuration └───────────────────────────────────── #───┘ Other configuration └─────────────────────────────────────

View File

@ -1,7 +1,8 @@
apiVersion: v1 apiVersion: v1
kind: ConfigMap kind: ConfigMap
metadata: metadata:
name: {{ include "misskey.fullname" . }}-config-file name: {{ include "misskey.fullname" . }}-configuration
data: data:
default.yml: |- default.yml: |-
{{ .Files.Get "files/default.yml"|indent 4 }} {{ .Files.Get "files/default.yml"|nindent 4 }}
url: {{ .Values.url }}

View File

@ -16,9 +16,12 @@ spec:
spec: spec:
containers: containers:
- name: misskey - name: misskey
image: okteto.dev/misskey:latest image: {{ .Values.image }}
env:
- name: NODE_ENV
value: {{ .Values.environment }}
volumeMounts: volumeMounts:
- name: config-file - name: {{ include "misskey.fullname" . }}-configuration
mountPath: /misskey/.config mountPath: /misskey/.config
readOnly: true readOnly: true
ports: ports:
@ -39,6 +42,6 @@ spec:
ports: ports:
- containerPort: 6379 - containerPort: 6379
volumes: volumes:
- name: config-file - name: {{ include "misskey.fullname" . }}-configuration
configMap: configMap:
name: {{ include "misskey.fullname" . }}-config-file name: {{ include "misskey.fullname" . }}-configuration

3
chart/values.yml Normal file
View File

@ -0,0 +1,3 @@
url: https://example.tld/
image: okteto.dev/misskey
environment: production

View File

@ -1,3 +0,0 @@
deploy:
- okteto build -t okteto.dev/misskey:latest
- helm upgrade --install misskey chart

6
okteto.yml Normal file
View File

@ -0,0 +1,6 @@
build:
misskey:
args:
- NODE_ENV=development
deploy:
- helm upgrade --install misskey chart --set image=${OKTETO_BUILD_MISSKEY_IMAGE} --set url="https://misskey-$(kubectl config view --minify -o jsonpath='{..namespace}').cloud.okteto.net" --set environment=development

View File

@ -177,7 +177,7 @@ export default define(meta, paramDef, async (ps, user) => {
userId: user.id, userId: user.id,
fileIds, fileIds,
}) })
.orderBy('array_position(ARRAY[:...fileIds], "id")') .orderBy('array_position(ARRAY[:...fileIds], "id"::text)')
.setParameters({ fileIds }) .setParameters({ fileIds })
.getMany(); .getMany();
} }

View File

@ -244,6 +244,11 @@ const append = (item: Item): void => {
items.value.push(item); items.value.push(item);
}; };
const removeItem = (finder: (item: Item) => boolean) => {
const i = items.value.findIndex(finder);
items.value.splice(i, 1);
};
const updateItem = (id: Item['id'], replacer: (old: Item) => Item): void => { const updateItem = (id: Item['id'], replacer: (old: Item) => Item): void => {
const i = items.value.findIndex(item => item.id === id); const i = items.value.findIndex(item => item.id === id);
items.value[i] = replacer(items.value[i]); items.value[i] = replacer(items.value[i]);
@ -276,6 +281,7 @@ defineExpose({
fetchMoreAhead, fetchMoreAhead,
prepend, prepend,
append, append,
removeItem,
updateItem, updateItem,
}); });
</script> </script>

View File

@ -27,85 +27,71 @@
</XModalWindow> </XModalWindow>
</template> </template>
<script lang="ts"> <script lang="ts" setup>
import { defineComponent } from 'vue'; import { } from 'vue';
import XModalWindow from '@/components/ui/modal-window.vue'; import XModalWindow from '@/components/ui/modal-window.vue';
import MkButton from '@/components/ui/button.vue'; import MkButton from '@/components/ui/button.vue';
import MkInput from '@/components/form/input.vue'; import MkInput from '@/components/form/input.vue';
import * as os from '@/os'; import * as os from '@/os';
import { unique } from '@/scripts/array'; import { unique } from '@/scripts/array';
import { i18n } from '@/i18n';
import { emojiCategories } from '@/instance';
export default defineComponent({ const props = defineProps<{
components: { emoji: any,
XModalWindow, }>();
MkButton,
MkInput,
},
props: { let dialog = $ref(null);
emoji: { let name: string = $ref(props.emoji.name);
required: true, let category: string = $ref(props.emoji.category);
let aliases: string = $ref(props.emoji.aliases.join(' '));
let categories: string[] = $ref(emojiCategories);
const emit = defineEmits<{
(ev: 'done', v: { deleted?: boolean, updated?: any }): void,
(ev: 'closed'): void
}>();
function ok() {
update();
}
async function update() {
await os.apiWithDialog('admin/emoji/update', {
id: props.emoji.id,
name,
category,
aliases: aliases.split(' '),
});
emit('done', {
updated: {
id: props.emoji.id,
name,
category,
aliases: aliases.split(' '),
} }
}, });
emits: ['done', 'closed'], dialog.close();
}
data() { async function del() {
return { const { canceled } = await os.confirm({
name: this.emoji.name, type: 'warning',
category: this.emoji.category, text: i18n.t('removeAreYouSure', { x: name }),
aliases: this.emoji.aliases?.join(' '), });
categories: [], if (canceled) return;
}
},
created() { os.api('admin/emoji/delete', {
os.api('meta', { detail: false }).then(({ emojis }) => { id: props.emoji.id
this.categories = unique(emojis.map((x: any) => x.category || '').filter((x: string) => x !== '')); }).then(() => {
emit('done', {
deleted: true
}); });
}, dialog.close();
});
methods: { }
ok() {
this.update();
},
async update() {
await os.apiWithDialog('admin/emoji/update', {
id: this.emoji.id,
name: this.name,
category: this.category,
aliases: this.aliases.split(' '),
});
this.$emit('done', {
updated: {
name: this.name,
category: this.category,
aliases: this.aliases.split(' '),
}
});
this.$refs.dialog.close();
},
async del() {
const { canceled } = await os.confirm({
type: 'warning',
text: this.$t('removeAreYouSure', { x: this.emoji.name }),
});
if (canceled) return;
os.api('admin/emoji/delete', {
id: this.emoji.id
}).then(() => {
this.$emit('done', {
deleted: true
});
this.$refs.dialog.close();
});
},
}
});
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>

View File

@ -135,12 +135,12 @@ const edit = (emoji) => {
}, { }, {
done: result => { done: result => {
if (result.updated) { if (result.updated) {
emojisPaginationComponent.value.replaceItem(item => item.id === emoji.id, { emojisPaginationComponent.value.updateItem(result.updated.id, (oldEmoji: any) => ({
...emoji, ...oldEmoji,
...result.updated ...result.updated
}); }));
} else if (result.deleted) { } else if (result.deleted) {
emojisPaginationComponent.value.removeItem(item => item.id === emoji.id); emojisPaginationComponent.value.removeItem((item) => item.id === emoji.id);
} }
}, },
}, 'closed'); }, 'closed');