mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-05 04:53:01 +00:00
add context menu options placeholder function
This commit is contained in:
@@ -21,7 +21,7 @@
|
|||||||
import { paths } from "@/config";
|
import { paths } from "@/config";
|
||||||
|
|
||||||
defineProps<{
|
defineProps<{
|
||||||
bio: string;
|
bio: string | null;
|
||||||
images: {
|
images: {
|
||||||
artist: string;
|
artist: string;
|
||||||
album: string;
|
album: string;
|
||||||
@@ -65,12 +65,14 @@ defineProps<{
|
|||||||
width: 10rem;
|
width: 10rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$rectpos: calc(50% - 5rem);
|
||||||
|
|
||||||
.rect {
|
.rect {
|
||||||
width: 10rem;
|
width: 10rem;
|
||||||
height: 10rem;
|
height: 10rem;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
bottom: 0rem;
|
bottom: 0rem;
|
||||||
left: 7rem;
|
left: $rectpos;
|
||||||
transform: rotate(15deg) translate(-1rem, 1rem);
|
transform: rotate(15deg) translate(-1rem, 1rem);
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
transition: all 0.5s ease-in-out;
|
transition: all 0.5s ease-in-out;
|
||||||
@@ -85,8 +87,8 @@ defineProps<{
|
|||||||
position: absolute;
|
position: absolute;
|
||||||
width: 7rem;
|
width: 7rem;
|
||||||
height: 7rem;
|
height: 7rem;
|
||||||
left: 15rem;
|
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
|
left: calc($rectpos + 7rem);
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
box-shadow: 0 0 2rem rgb(0, 0, 0);
|
box-shadow: 0 0 2rem rgb(0, 0, 0);
|
||||||
transition: all 0.25s ease-in-out;
|
transition: all 0.25s ease-in-out;
|
||||||
|
|||||||
+13
-1
@@ -3,10 +3,22 @@ import normalize from "../composables/normalizeContextMenu";
|
|||||||
import { Option } from "../interfaces";
|
import { Option } from "../interfaces";
|
||||||
import { ContextSrc } from "../composables/enums";
|
import { ContextSrc } from "../composables/enums";
|
||||||
|
|
||||||
|
function getPlaceholders(length: number) {
|
||||||
|
let list: Option[] = [];
|
||||||
|
|
||||||
|
for (let index = 0; index < length; index++) {
|
||||||
|
list.push("" as Option);
|
||||||
|
}
|
||||||
|
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
|
getPlaceholders(5);
|
||||||
|
|
||||||
export default defineStore("context-menu", {
|
export default defineStore("context-menu", {
|
||||||
state: () => ({
|
state: () => ({
|
||||||
visible: false,
|
visible: false,
|
||||||
options: <Option[]>[],
|
options: getPlaceholders(5),
|
||||||
x: 500,
|
x: 500,
|
||||||
y: 500,
|
y: 500,
|
||||||
normalizedX: false,
|
normalizedX: false,
|
||||||
|
|||||||
Reference in New Issue
Block a user