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

Use icons to represent model types #521

Merged
merged 1 commit into from
Apr 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions app/angular/components/icons/conceptual/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" height="20" viewBox="0 -960 960 960"><path d="M479.995-95.463q-59.995 0-102.033-42.042-42.038-42.042-42.038-102.034 0-53.265 33.615-93.171 33.616-39.906 84.462-48.888v-84.403h-206v-111.922H141.925v-264.152h264.152v264.152H300v59.924h372v-62.386q-50.846-8.538-84.461-48.444-33.616-39.906-33.616-93.17 0-59.992 42.044-102.034 42.043-42.042 102.038-42.042 59.994 0 102.032 42.042t42.038 102.034q0 53.264-33.615 93.17t-84.461 48.444v114.384h-218v84.403q50.846 8.982 84.462 48.888 33.615 39.906 33.615 93.171 0 59.992-42.044 102.034-42.043 42.042-102.037 42.042Zm218.227-534.459q38.239 0 65.047-27.031t26.808-65.269q0-38.239-27.031-65.047t-65.27-26.808q-38.239 0-65.046 27.031-26.808 27.031-26.808 65.27t27.031 65.046q27.031 26.808 65.269 26.808Zm-504.299 0h160.155v-160.155H193.923v160.155Zm286.3 482.46q38.239 0 65.047-27.031t26.808-65.269q0-38.239-27.031-65.047t-65.27-26.808q-38.239 0-65.047 27.031t-26.808 65.27q0 38.238 27.031 65.046 27.031 26.808 65.27 26.808ZM274.001-709.999Zm423.998-12ZM480-239.539Z"/></svg>
10 changes: 10 additions & 0 deletions app/angular/components/icons/conceptual/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import angular from "angular";
import template from "./index.html";
import "./index.scss";

const iconConceptual = function () {};

export default angular.module("app.iconConceptual", []).component("iconConceptual", {
template,
controller: iconConceptual
}).name;
10 changes: 10 additions & 0 deletions app/angular/components/icons/conceptual/index.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
icon-conceptual {
position: relative;
display: inline-block;
}

icon-conceptual svg {
display: block;
position: relative;
top: 5px;
}
1 change: 1 addition & 0 deletions app/angular/components/icons/logic/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" height="20" viewBox="0 -960 960 960"><path d="M228.309-164.001q-26.308 0-45.308-19t-19-45.308v-503.382q0-27.008 19-45.658 19-18.65 45.308-18.65h503.382q27.008 0 45.658 18.65 18.65 18.65 18.65 45.658v503.382q0 26.308-18.65 45.308t-45.658 19H228.309ZM216-602.537h528v-129.154q0-4.616-3.846-8.463-3.847-3.846-8.463-3.846H228.309q-4.616 0-8.463 3.846-3.846 3.847-3.846 8.463v129.154Zm0 193.076h528v-141.078H216v141.078ZM228.309-216h503.382q4.616 0 8.463-3.846 3.846-3.847 3.846-8.463v-129.154H216v129.154q0 4.616 3.846 8.463 3.847 3.846 8.463 3.846Zm51.077-424.923v-64.307h64.307v64.307h-64.307Zm0 193.077v-64.308h64.307v64.308h-64.307Zm0 193.076v-64.307h64.307v64.307h-64.307Z"/></svg>
10 changes: 10 additions & 0 deletions app/angular/components/icons/logic/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import angular from "angular";
import template from "./index.html";
import "./index.scss";

const iconLogic = function () {};

export default angular.module("app.iconLogic", []).component("iconLogic", {
template,
controller: iconLogic
}).name;
10 changes: 10 additions & 0 deletions app/angular/components/icons/logic/index.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
icon-logic {
position: relative;
display: inline-block;
}

icon-logic svg {
display: block;
position: relative;
top: 5px;
}
2 changes: 1 addition & 1 deletion app/angular/conceptual/conceptual.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<header class="workspace-header">
<div class="page-header clearfix">
<div class="document-info pull-left">
<h2 class="h4">{{ 'Conceptual model of:' | translate }} {{$ctrl.model.name}}</h2>
<h2 class="h4"><icon-conceptual title="{{'Conceptual model' | translate}}"></icon-conceptual> {{$ctrl.model.name}}</h2>
<status-bar updated-at="$ctrl.modelState.updatedAt"></status-bar>
</div>
<aside class="header-actions pull-right">
Expand Down
2 changes: 1 addition & 1 deletion app/angular/logic/logic.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<header class="workspace-header">
<div class="page-header clearfix">
<div class="document-info pull-left">
<h2 class="h4 pull-left">{{ 'Logical model of:' | translate }} {{$ctrl.model.name}}</h2>
<h2 class="h4"><icon-logic title="{{'Logic model' | translate}}"></icon-logic> {{$ctrl.model.name}}</h2>
<status-bar updated-at="$ctrl.modelState.updatedAt"></status-bar>
</div>
<aside class="header-actions pull-right">
Expand Down
6 changes: 5 additions & 1 deletion app/angular/workspace/workspace.html
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,11 @@ <h2 class="h2 pull-left">{{ 'Models' | translate }}</h2>
</thead>
<tbody>
<tr ng-repeat="model in $ctrl.models" class="listLine">
<td ng-click="$ctrl.openModel(model)">{{model.typeName}}</td>
<td ng-click="$ctrl.openModel(model)">
<icon-conceptual ng-if="model.type === 'conceptual'" aria-hidden="true"></icon-conceptual>
<icon-logic ng-if="model.type === 'logic'" aria-hidden="true"></icon-logic>
<span>{{model.typeName}}</span>
</td>
<td ng-click="$ctrl.openModel(model)">{{model.name}}</td>
<td ng-click="$ctrl.openModel(model)">{{model.authorName}}</td>
<td ng-click="$ctrl.openModel(model)">{{model.created | date:'dd/MM/yyyy'}}</td>
Expand Down
5 changes: 5 additions & 0 deletions app/angular/workspace/workspace.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ import modelDuplicatorComponent from "../components/duplicateModelModal";
import modelDeleterComponent from "../components/deleteModelModal";
import modelRenameComponent from "../components/renameModelModal";
import bugReportButton from "../components/bugReportButton";
import iconConceptual from "../components/icons/conceptual";
import iconLogic from "../components/icons/logic";


const ListController = function (
$state,
Expand Down Expand Up @@ -162,6 +165,8 @@ export default angular
modelDeleterComponent,
modelRenameComponent,
bugReportButton,
iconConceptual,
iconLogic
])
.component("workspace", {
template,
Expand Down
2 changes: 0 additions & 2 deletions app/i18n/languages/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ export default {
'FK': 'FK',
'Source': 'Source',
'Cardinality': 'Cardinality',
'Logical model of:': 'Logical model of:',
'Save (CTRL S)': 'Save (CTRL S)',
'Undo (CTRL Z)': 'Undo (CTRL Z)',
'Redo (CTRL SHIFT Z)': 'Redo (CTRL SHIFT Z)',
Expand All @@ -39,7 +38,6 @@ export default {
'Composed': 'Composed',
'Associative entity': 'Associative entity',
'Transform': 'Transform',
'Conceptual model of:': 'Conceptual model of:',
'Generate logical model': 'Generate logical model',
'Next': 'Next',
'New model': 'New model',
Expand Down
2 changes: 0 additions & 2 deletions app/i18n/languages/pt_BR.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ export default {
'FK': 'FK',
'Source': 'Origem',
'Cardinality': 'Cardinalidade',
'Logical model of:': 'Modelagem lógica de:',
'Save (CTRL S)': 'Salvar (CTRL S)',
'Undo (CTRL Z)': 'Desfazer (CTRL Z)',
'Redo (CTRL SHIFT Z)': 'Refazer (CTRL SHIFT Z)',
Expand All @@ -39,7 +38,6 @@ export default {
'Composed': 'Composto',
'Associative entity': 'Entidade associativa',
'Transform': 'Transformar',
'Conceptual model of:': 'Modelagem conceitual de:',
'Generate logical model': 'Gerar modelagem lógica',
'Next': 'Avançar',
'New model': 'Novo modelo',
Expand Down