wip
This commit is contained in:
parent
0d99d8f8e5
commit
339a7d64d7
|
@ -66,7 +66,7 @@ export default defineComponent({
|
||||||
let left;
|
let left;
|
||||||
let top;
|
let top;
|
||||||
|
|
||||||
if (this.$root.isMobile && !this.noCenter) {
|
if (os.isMobile && !this.noCenter) {
|
||||||
const x = rect.left + (this.fixed ? 0 : window.pageXOffset) + (this.source.offsetWidth / 2);
|
const x = rect.left + (this.fixed ? 0 : window.pageXOffset) + (this.source.offsetWidth / 2);
|
||||||
const y = rect.top + (this.fixed ? 0 : window.pageYOffset) + (this.source.offsetHeight / 2);
|
const y = rect.top + (this.fixed ? 0 : window.pageYOffset) + (this.source.offsetHeight / 2);
|
||||||
left = (x - (width / 2));
|
left = (x - (width / 2));
|
||||||
|
|
|
@ -565,7 +565,7 @@ export default defineComponent({
|
||||||
localOnly: this.localOnly,
|
localOnly: this.localOnly,
|
||||||
visibility: this.visibility,
|
visibility: this.visibility,
|
||||||
visibleUserIds: this.visibility == 'specified' ? this.visibleUsers.map(u => u.id) : undefined,
|
visibleUserIds: this.visibility == 'specified' ? this.visibleUsers.map(u => u.id) : undefined,
|
||||||
viaMobile: this.$root.isMobile
|
viaMobile: os.isMobile
|
||||||
};
|
};
|
||||||
|
|
||||||
// plugin
|
// plugin
|
||||||
|
|
|
@ -21,7 +21,7 @@ import { applyTheme, lightTheme } from '@/scripts/theme';
|
||||||
import { isDeviceDarkmode } from '@/scripts/is-device-darkmode';
|
import { isDeviceDarkmode } from '@/scripts/is-device-darkmode';
|
||||||
import { createPluginEnv } from '@/scripts/aiscript/api';
|
import { createPluginEnv } from '@/scripts/aiscript/api';
|
||||||
import { i18n, lang } from './i18n';
|
import { i18n, lang } from './i18n';
|
||||||
import { stream, sound } from '@/os';
|
import { stream, sound, isMobile } from '@/os';
|
||||||
|
|
||||||
console.info(`Misskey v${version}`);
|
console.info(`Misskey v${version}`);
|
||||||
|
|
||||||
|
@ -39,10 +39,6 @@ window.addEventListener('resize', () => {
|
||||||
});
|
});
|
||||||
//#endregion
|
//#endregion
|
||||||
|
|
||||||
// Detect the user agent
|
|
||||||
const ua = navigator.userAgent.toLowerCase();
|
|
||||||
const isMobile = /mobile|iphone|ipad|android/.test(ua);
|
|
||||||
|
|
||||||
// Get the <head> element
|
// Get the <head> element
|
||||||
const head = document.getElementsByTagName('head')[0];
|
const head = document.getElementsByTagName('head')[0];
|
||||||
|
|
||||||
|
|
|
@ -3,6 +3,9 @@ import Stream from '@/scripts/stream';
|
||||||
import { store } from '@/store';
|
import { store } from '@/store';
|
||||||
import { apiUrl } from '@/config';
|
import { apiUrl } from '@/config';
|
||||||
|
|
||||||
|
const ua = navigator.userAgent.toLowerCase();
|
||||||
|
export const isMobile = /mobile|iphone|ipad|android/.test(ua);
|
||||||
|
|
||||||
export const stream = new Stream();
|
export const stream = new Stream();
|
||||||
|
|
||||||
export const dialogCallbacks = {};
|
export const dialogCallbacks = {};
|
||||||
|
|
|
@ -24,14 +24,6 @@ export default defineComponent({
|
||||||
titleTemplate: title => title ? `${title} | ${(instanceName || 'Misskey')}` : (instanceName || 'Misskey')
|
titleTemplate: title => title ? `${title} | ${(instanceName || 'Misskey')}` : (instanceName || 'Misskey')
|
||||||
},
|
},
|
||||||
|
|
||||||
props: {
|
|
||||||
isMobile: {
|
|
||||||
type: Boolean,
|
|
||||||
required: false,
|
|
||||||
default: false,
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
deckmode
|
deckmode
|
||||||
|
|
Loading…
Reference in New Issue