Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[NEW] Subscription enabled marketplace #14948

Merged
merged 37 commits into from
Jul 21, 2019
Merged
Show file tree
Hide file tree
Changes from 29 commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
1f193b2
Show the subscription apps different from regular purchase prices
graywolf336 Jun 18, 2019
7c2d0ed
Update app download calls return a Buffer directly
d-gubert Jun 26, 2019
061a5d5
Add X-Apps-Engine-Version header to marketplace requests
d-gubert Jun 27, 2019
1c5f427
Add getActiveUserCount method to apps-engine user bridge
d-gubert Jul 5, 2019
8608799
Add distinction for purchase type on apps list
d-gubert Jul 5, 2019
4c5b94b
Fix the issues with displaying subscriptions
graywolf336 Jul 9, 2019
1993a52
Merge branch 'develop' into subscription-enabled-marketplace
d-gubert Jul 9, 2019
3aed5d0
Remove external federated users from active user count
d-gubert Jul 11, 2019
959c7f7
Merge branch 'develop' into subscription-enabled-marketplace
graywolf336 Jul 12, 2019
fcdf8eb
Merge branch 'develop' into subscription-enabled-marketplace
d-gubert Jul 12, 2019
91c98f3
Fix usage of federation module
d-gubert Jul 13, 2019
b934925
Change app installation to validate license
d-gubert Jul 16, 2019
3983256
Change the bridges to correctly query the workspace public key
d-gubert Jul 16, 2019
5d9c4ed
Change marketplaceUrl to marketplace-beta
d-gubert Jul 17, 2019
1a8bf1b
Update Apps and Marketplace styles (temp)
tassoevan Jul 17, 2019
212d1e4
Update price column on Marketplace
tassoevan Jul 18, 2019
b09f42c
Update status column on Marketplace
tassoevan Jul 18, 2019
343795b
Fix Marketplace app list update
tassoevan Jul 18, 2019
89b0469
Remove log from client orchestrator
d-gubert Jul 18, 2019
74f7858
Refactor server orchestrator
d-gubert Jul 18, 2019
bdfd0f4
Change rest api for license validation
d-gubert Jul 18, 2019
6d67cd1
Merge branch 'subscription-enabled-marketplace' of github.com:RocketC…
d-gubert Jul 18, 2019
a53ce58
Add popover to Marketplace app list
tassoevan Jul 19, 2019
b9d3c61
Merge remote-tracking branch 'origin/develop' into subscription-enabl…
d-gubert Jul 19, 2019
a46098c
Add card (subscription) icon
tassoevan Jul 19, 2019
02007de
Update active user count method
d-gubert Jul 19, 2019
583e572
Merge branch 'subscription-enabled-marketplace' of github.com:RocketC…
d-gubert Jul 19, 2019
13beec8
Update appManage template (partial)
tassoevan Jul 19, 2019
1cb4a19
Update appManage template
tassoevan Jul 20, 2019
8d30a6b
Add missing i18n strings
tassoevan Jul 20, 2019
9870060
Add cron routine to update apps info
d-gubert Jul 20, 2019
99f67ec
Add options parameter to new methods on model Users
d-gubert Jul 20, 2019
40e36b4
Merge remote-tracking branch 'origin/develop' into subscription-enabl…
d-gubert Jul 21, 2019
e0e4134
Revert testing settings
d-gubert Jul 21, 2019
bf6d5fd
Bump Apps-Engine version
d-gubert Jul 21, 2019
c1c3d22
Merge branch 'develop' into subscription-enabled-marketplace
d-gubert Jul 21, 2019
a013d70
Merge branch 'develop' into subscription-enabled-marketplace
d-gubert Jul 21, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions app/apps/assets/stylesheets/apps.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.rc-apps-section,
.rc-apps-marketplace {
display: flex;

Expand Down Expand Up @@ -300,6 +301,12 @@

height: 100vh;

margin-top: 20px;

& .rc-form-filters {
margin: 8px 0;
}

& .js-sort {
cursor: pointer;

Expand All @@ -321,6 +328,50 @@
font-size: 1rem;
}
}

& tbody .rc-table-tr:not(.table-no-click):not(.table-no-pointer):hover {
background-color: #f7f8fa;
}

& .rc-table-info {
margin: 0;
justify-content: center;

& .rc-table-title,
& .rc-table-subtitle {
font-size: 0.875rem;
line-height: 1.25rem;
}

& .rc-apps-categories {
display: flex;

height: 1.25rem;
margin: 0 -0.25rem;
align-items: center;
flex-wrap: wrap;

& .rc-apps-category {
overflow: hidden;
flex: 0 0 auto;

box-sizing: border-box;
margin: 0.125rem 0.25rem;
padding: 0.0625rem 0.25rem;

text-transform: none;
text-overflow: ellipsis;

color: #9da1a8;
border-radius: 9999px;
background-color: #eef0f3;

font-size: 0.625rem;
font-weight: 500;
line-height: 0.875rem;
}
}
}
}

@media (width <= 700px) {
Expand Down
147 changes: 147 additions & 0 deletions app/apps/client/admin/appManage.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@
#rocket-chat .content .rc-apps-details {
&__content {
justify-content: flex-start;
}

&__app-name {
flex: 0 0 1.75rem;

margin: 0;

letter-spacing: 0;
text-transform: none;

color: rgb(84, 88, 94);

font-family: inherit;
font-size: 1.375rem;
font-weight: normal;
line-height: 1.75rem;
}

&__app-info {
display: flex;
flex: 0 0 1.25rem;
flex-wrap: nowrap;

> span::after {
display: inline-block;

width: 1px;
height: 12px;
margin: 0 8px;

content: '';

background: rgb(203, 206, 209);
}

> span:last-child::after {
display: none;

content: none;
}
}

&__app-author {
letter-spacing: -0.2px;

color: rgb(158, 162, 168);

font-family: inherit;
font-size: 14px;
font-weight: 500;
line-height: 20px;
}

&__app-version {
letter-spacing: -0.2px;

color: rgb(158, 162, 168);

font-family: inherit;
font-size: 14px;
font-weight: normal;
line-height: 20px;
}

&__app-status {
display: flex;
flex: 1;

margin-top: 8px;
align-items: center;
}

&__app-install-status {
display: flex;

height: 40px;

letter-spacing: 0;

color: rgb(158, 162, 168);

font-family: inherit;
font-size: 14px;
font-weight: 500;
align-items: center;
flex-wrap: nowrap;

& > .rc-icon {
color: var(--rc-color-button-primary);
}
}

&__app-price {
letter-spacing: -0.2px;

color: rgb(157, 161, 168);

font-family: inherit;
font-size: 14px;
font-weight: normal;
line-height: 20px;

&::before {
display: inline-block;

width: 1px;
height: 12px;
margin: 0 16px;

content: '';

background: rgb(203, 206, 209);
}
}

&__app-button-wrapper {
flex: 1;
}

& .rc-button.loading {
padding: 0 1.5rem;

opacity: 0.6;

&::before {
display: none;
}

& > .rc-icon {
animation: spin 1s linear infinite;
}
}

&__app-menu-trigger {
padding: 0;

&::before {
display: inline-block;
flex: 1;

content: '';
}
}
}
103 changes: 52 additions & 51 deletions app/apps/client/admin/appManage.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@
{{/header}}
<div class="content">
{{#requiresPermission 'manage-apps'}}
{{#if hasError}}
{{#if error}}
<div class="apps-error error-color">
<i class="icon-attention"></i>
<p>{{theError}}</p>
<p>{{error}}</p>
</div>
{{else if isReady}}
<div class="rc-apps-details">
Expand All @@ -30,35 +30,60 @@
<div class="rc-apps-details__photo" style="background-image:url({{iconFileContent}})"></div>
{{/if}}
<div class="rc-apps-details__content">
<div class="rc-apps-details__row">
<h1>{{name}}</h1>
<h2 class="rc-apps-details__app-name">{{name}}</h2>
<div class="rc-apps-details__app-info">
{{#if author.name}}
<span class="rc-apps-details__app-author">by {{author.name}}</span>
{{/if}}
<span class="rc-apps-details__app-version">Version {{version}}</span>
</div>
{{#if author.name}}
<div class="rc-apps-details__version">
<strong class="rc-apps-details__author">by {{author.name}}</strong> | Version {{version}}
</div>
{{/if}}
<div class="rc-apps-details__row">

<div class="rc-apps-details__app-status">
{{#if isInstalled}}
{{#if newVersion}}
<button class="rc-button rc-button--primary js-install">{{> icon icon="circled-arrow-down"}} {{_ "Update_to_version" version=newVersion }}</button>
{{/if}}
<button class="rc-button rc-button--nude js-uninstall">{{> icon icon="trash"}} {{_ "Delete" }}</button>
{{#if isEnabled}}
<button class="rc-button rc-button--nude js-deactivate">{{> icon icon="ban"}} {{_ "Deactivate" }}</button>
{{else}}
<button class="rc-button rc-button--nude js-activate">{{> icon icon="check"}} {{_ "Activate" }}</button>
{{/if}}
<button class="rc-button rc-button--nude js-view-logs">{{> icon icon="list-alt"}} {{_ "View_Logs" }}</button>
{{else}}
{{#if hasPurchased}}
<button class="rc-button rc-button--primary js-install">{{> icon icon="download"}} {{_ "Purchased"}}</button>
{{else}}
{{#if $eq price 0}}
<button class="rc-button rc-button--primary js-purchase">{{> icon icon="circled-arrow-down"}} {{_ "Free"}}</button>
<span class="rc-apps-details__app-button-wrapper">
{{#if canUpdate}}
<button class="rc-button rc-button--primary js-install">
{{> icon icon="reload" block="rc-icon--default-size"}}
{{_ "Update_to_version" version=newVersion }}
</button>
{{else if isFromMarketplace}}
<span class="rc-apps-details__app-install-status">
{{> icon icon="checkmark-circled" block="rc-icon--default-size"}}
{{_ "Up to date"}}
</span>
{{else}}
<button class="rc-button rc-button--primary js-purchase">{{> icon icon="circled-arrow-down"}} {{displayPrice}}</button>
<span class="rc-apps-details__app-install-status">
{{> icon icon="checkmark-circled" block="rc-icon--default-size"}}
{{_ "Installed"}}
</span>
{{/if}}
</span>

<button class="rc-button rc-button--nude rc-apps-details__app-menu-trigger js-menu" data-app="{{appId}}">
{{> icon icon="menu" block="rc-icon--default-size"}}
</button>
{{else}}
{{#if canTrial}}
<button class="rc-button rc-button--primary js-purchase" data-app="{{appId}}">
{{> icon icon="circled-arrow-down" block="rc-icon--default-size"}}
{{_ "Start a trial"}}
</button>
{{else if canBuy}}
<button class="rc-button rc-button--primary js-purchase" data-app="{{appId}}">
{{> icon icon="circled-arrow-down" block="rc-icon--default-size"}}
{{_ "Buy"}}
</button>
{{else}}
<button class="rc-button rc-button--primary js-install" data-app="{{appId}}">
{{> icon icon="circled-arrow-down" block="rc-icon--default-size"}}
{{_ "Install"}}
</button>
{{/if}}

{{#if priceDisplay}}
<span class="rc-apps-details__app-price">
{{priceDisplay}}
</span>
{{/if}}
{{/if}}
</div>
Expand Down Expand Up @@ -390,30 +415,6 @@ <h2> {{_ "Settings"}} </h2>
</div>
{{/if}}
</div>
<!-- <div class="horizontal">
{{#if $eq editor 'color'}}
<div class="flex-grow-1">
<input class="input-monitor colorpicker-input" type="text" name="{{id}}" value="{{value}}" autocomplete="off"/>
<span class="colorpicker-swatch border-component-color" style="background-color: {{value}}"></span>
</div>
{{/if}}
{{#if $eq editor 'expression'}}
<div class="flex-grow-1">
<input class="input-monitor" type="" name="{{id}}" value="{{value}}"/>
</div>
{{/if}}
<div class="color-editor">
<div class="select-arrow">
<i class="icon-down-open secondary-font-color"></i>
</div>
<select name="color-editor">
{{#each allowedTypes}}
<option value="{{.}}" selected="{{$eq ../editor .}}">{{_ .}}</option>
{{/each}}
</select>
</div>
</div>
<div class="settings-description">Variable name: {{getColorVariable id}}</div> -->
{{ else if $eq type 'language'}}

<div class="rc-input">
Expand Down
Loading