Ivan Starkov 4a5aadf5ec Assets view mode (#951)
## Description

1. What is this PR about (link the issue and add a short description)

In view mode, we need to prevent users from deleting / creating assets
in UI. (Server-side protection already done in the previous PR)

The other way can be just to hide buttons from the UI.
Also tooltip duration for disabled actions can be smaller.

## Steps for reproduction

Share the Link with View permissions.
Open that link in incognito mode.
Try to create/delete an asset

<img width="265" alt="image"
src="https://user-images.githubusercontent.com/5077042/216938724-d8e0e3b3-28fe-405e-8997-0a8dd84a105e.png">


<img width="355" alt="image"
src="https://user-images.githubusercontent.com/5077042/216938784-a1a59926-b41e-4193-8584-8387cae221f6.png">

<img width="263" alt="image"
src="https://user-images.githubusercontent.com/5077042/216939092-13d59ddd-c601-4ebb-b536-d7c0bd4a572a.png">

<img width="308" alt="image"
src="https://user-images.githubusercontent.com/5077042/216940665-f185e9b7-84c3-4ad7-8c61-43b3447a5777.png">


## Code Review

- [ ] hi @kof, I need you to do
  - conceptual review (architecture, feature-correctness)
  - detailed review (read every line)
  - test it on preview

## Before requesting a review

- [ ] made a self-review
- [ ] added inline comments where things may be not obvious (the "why",
not "what")

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
5de6)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio-designer/blob/main/apps/designer/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `designer/env-check.js` if mandatory
2023-02-06 15:56:05 +03:00
2023-02-03 11:41:41 +03:00
2022-07-04 19:59:42 +02:00
2023-01-29 18:05:13 +03:00
2023-02-06 15:56:05 +03:00
2023-02-06 13:07:15 +01:00
2022-07-22 19:18:21 +00:00
2022-06-22 15:00:00 +02:00
2022-03-13 04:22:21 +00:00
2023-01-31 12:13:37 +04:00
2023-02-06 13:07:15 +01:00
2022-04-13 12:14:56 +01:00
2023-01-29 18:04:48 +03:00

Webstudio Designer

Webstudio Designer is a NoCode Visual Tool inspired by Webflow. It is the place where you can build your site or app visually.

Contributing

Don't hesitate to reach out of you have questions around contributing to the project.

Contributing guide

Community

Twitter

Discussions

Discord

Languages
TypeScript 98.9%
PLpgSQL 0.5%
CSS 0.3%
Shell 0.2%
JavaScript 0.1%