mirror of
https://github.com/penpot/penpot.git
synced 2025-06-03 16:11:40 +02:00
🐛 Fix Update main component thumbnail
This commit is contained in:
parent
88c7ac379b
commit
4fc892a856
6 changed files with 72 additions and 22 deletions
|
@ -1,7 +1,18 @@
|
|||
(ns app.common.thumbnails
|
||||
(:require [cuerdas.core :as str]))
|
||||
(:require
|
||||
[app.common.uuid :as uuid]
|
||||
[cuerdas.core :as str]))
|
||||
|
||||
(defn fmt-object-id
|
||||
"Returns ids formatted as a string (object-id)"
|
||||
[file-id page-id frame-id tag]
|
||||
(str/ffmt "%/%/%/%" file-id page-id frame-id tag))
|
||||
|
||||
(defn file-id?
|
||||
"Returns ids formatted as a string (file-id)"
|
||||
[object-id file-id]
|
||||
(str/starts-with? object-id (str/concat file-id "/")))
|
||||
|
||||
(defn get-file-id
|
||||
[object-id]
|
||||
(uuid/uuid (str/slice object-id 0 (str/index-of object-id "/"))))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue