diff --git a/backend/src/app/rpc/commands/files.clj b/backend/src/app/rpc/commands/files.clj index 83cbfed23..66b76aa62 100644 --- a/backend/src/app/rpc/commands/files.clj +++ b/backend/src/app/rpc/commands/files.clj @@ -375,6 +375,21 @@ [{:keys [::rpc/profile-id]} {:keys [modified-at revn]}] (str profile-id (dt/format-instant modified-at :iso) revn)) + + +(sv/defmethod ::hey + {::doc/added "1.17" + ::rpc/auth false} + [_ _] + (str (rand-int 100))) + +(sv/defmethod ::ho + {::doc/added "1.17" + ::rpc/auth false} + [_ _] + (str (rand-int 1000))) + + (sv/defmethod ::get-file "Retrieve a file by its ID. Only authenticated users." {::doc/added "1.17" diff --git a/frontend/src/app/main.cljs b/frontend/src/app/main.cljs index 50690807d..65321cabb 100644 --- a/frontend/src/app/main.cljs +++ b/frontend/src/app/main.cljs @@ -37,7 +37,7 @@ (log/setup! {:app :info}) (when (= :browser cf/target) - (log/info :message "Welcome to penpot" + (log/info :message "Hey!,Welcome to penpot" :version (:full cf/version) :asserts *assert* :build-date cf/build-date diff --git a/frontend/src/app/main/data/users.cljs b/frontend/src/app/main/data/users.cljs index 06ff50642..82ad2a730 100644 --- a/frontend/src/app/main/data/users.cljs +++ b/frontend/src/app/main/data/users.cljs @@ -518,6 +518,29 @@ (->> (rp/cmd! :get-access-tokens) (rx/map access-tokens-fetched))))) + + + + +(defn heyhey-fetched + [value] + (ptk/reify ::heyhey-fetched + ptk/UpdateEvent + (update [_ state] + (assoc state :hey-value value)))) + + + +(defn fetch-heyhey + [] + (ptk/reify ::fetch-heyhey + ptk/WatchEvent + (watch [_ _ _] + (->> (rp/cmd! :hey) + (rx/map heyhey-fetched))))) + + + ;; --- EVENT: create-access-token (defn access-token-created diff --git a/frontend/src/app/main/ui/settings/access_tokens.cljs b/frontend/src/app/main/ui/settings/access_tokens.cljs index 2444324ed..6c9b329b6 100644 --- a/frontend/src/app/main/ui/settings/access_tokens.cljs +++ b/frontend/src/app/main/ui/settings/access_tokens.cljs @@ -260,16 +260,21 @@ [:& access-token-actions {:on-delete on-delete}]]])) +(def hey-ref + (l/derived :hey-value st/state)) + (mf/defc access-tokens-page [] (mf/with-effect [] (dom/set-html-title (tr "title.settings.access-tokens")) - (st/emit! (du/fetch-access-tokens))) + (st/emit! (du/fetch-access-tokens)) + (st/emit! (du/fetch-heyhey))) - (let [tokens (mf/deref tokens-ref)] - [:div.dashboard-access-tokens + (let [tokens (mf/deref tokens-ref) + hey (mf/deref hey-ref)] + [:div.dashboard-access-tokens {:style {:background "pink"}} [:div - [:& access-tokens-hero] + [:div {:on-click #(st/emit! (du/fetch-heyhey))} hey] (if (empty? tokens) [:div.access-tokens-empty [:div (tr "dashboard.access-tokens.empty.no-access-tokens")] diff --git a/version.txt b/version.txt index 815d5ca06..66e2ae6c2 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -1.19.0 +1.19.1