mirror of
https://github.com/Kvan7/Exiled-Exchange-2.git
synced 2026-09-24 21:55:41 +00:00
cfg image-strip
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 304 KiB |
+17
-1
@@ -54,7 +54,7 @@ type WidgetWellKnownFlag =
|
||||
'hide-on-blur(close)'
|
||||
|
||||
export const defaultConfig: Config = {
|
||||
configVersion: 2,
|
||||
configVersion: 3,
|
||||
priceCheckKey: 'D',
|
||||
priceCheckKeyHold: 'Ctrl',
|
||||
priceCheckLocked: 'Ctrl + Alt + D',
|
||||
@@ -203,6 +203,22 @@ export const defaultConfig: Config = {
|
||||
{ id: 5, text: '"Map Device" "Rarity: Normal"' },
|
||||
{ id: 6, text: 'Tane Laboratory' }
|
||||
]
|
||||
},
|
||||
{
|
||||
wmId: 6,
|
||||
wmType: 'image-strip',
|
||||
wmTitle: 'Cheat sheets',
|
||||
wmWants: 'hide',
|
||||
wmZorder: 6,
|
||||
wmFlags: ['invisible-on-blur'],
|
||||
anchor: {
|
||||
pos: 'tc',
|
||||
x: 50,
|
||||
y: 10
|
||||
},
|
||||
images: [
|
||||
{ url: 'syndicate.jpg' }
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
+9
-1
@@ -60,7 +60,15 @@ export const config = (() => {
|
||||
}))
|
||||
}
|
||||
}
|
||||
config.set('widgets', widgets)
|
||||
|
||||
if (config.configVersion < 3) {
|
||||
config.widgets.push({
|
||||
...defaultConfig.widgets.find(w => w.wmType === 'image-strip')!,
|
||||
wmId: Math.max(0, ...config.widgets.map(_ => _.wmId)) + 1,
|
||||
wmZorder: null
|
||||
})
|
||||
|
||||
config.configVersion = 3
|
||||
}
|
||||
|
||||
store.store = config
|
||||
|
||||
@@ -143,6 +143,9 @@ export default {
|
||||
if (this.moveHandles === 'corners') {
|
||||
return ['tl', 'tr', 'br', 'bl']
|
||||
}
|
||||
if (this.moveHandles === 'top-bottom') {
|
||||
return ['tl', 'tc', 'tr', 'br', 'bc', 'bl']
|
||||
}
|
||||
return []
|
||||
}
|
||||
},
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<widget :config="config" v-slot="{ isEditing, isMoving }">
|
||||
<widget :config="config" v-slot="{ isEditing, isMoving }" move-handles="top-bottom">
|
||||
<div class="widget-default-style p-1" style="min-width: 5rem;">
|
||||
<template>
|
||||
<div v-if="!isEditing" class="text-gray-100 m-1 leading-4 text-center">{{ config.wmTitle || 'Untitled' }}</div>
|
||||
@@ -55,7 +55,7 @@ export default {
|
||||
y: 10
|
||||
})
|
||||
this.$set(this.config, 'images', [{
|
||||
url: 'syndicate.png'
|
||||
url: 'syndicate.jpg'
|
||||
}])
|
||||
this.wm.show(this.config.wmId)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user