Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
ShelfNote
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Дмитрий Малюгин
ShelfNote
Commits
780bfb61
Commit
780bfb61
authored
7 months ago
by
Дмитрий Малюгин
Browse files
Options
Downloads
Patches
Plain Diff
clear code
parent
c06c9f59
No related branches found
No related tags found
1 merge request
!4
Entity of text
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
index.html
+3
-3
3 additions, 3 deletions
index.html
src/pages/HomePage.vue
+4
-15
4 additions, 15 deletions
src/pages/HomePage.vue
src/router/index.ts
+0
-3
0 additions, 3 deletions
src/router/index.ts
src/stores/authorization.ts
+0
-4
0 additions, 4 deletions
src/stores/authorization.ts
with
7 additions
and
25 deletions
index.html
+
3
−
3
View file @
780bfb61
...
...
@@ -8,7 +8,7 @@
<title>
ShelfNote
</title>
</head>
<body>
<div
id=
"app"
></div>
<script
type=
"module"
src=
"./src/main.ts"
></script>
<div
id=
"app"
></div>
<script
type=
"module"
src=
"./src/main.ts"
></script>
</body>
</html>
</html>
\ No newline at end of file
This diff is collapsed.
Click to expand it.
src/pages/HomePage.vue
+
4
−
15
View file @
780bfb61
...
...
@@ -14,25 +14,14 @@ const { height: entitiesHeight } = useElementSize(entitiesContainer);
const
dataStore
=
useDataStore
();
const
interfaceStore
=
useInterfaceStore
();
// const entities = ref(JSON.parse(localStorage.getItem('homeEntities') || '[]'));
const
entities
=
computed
(()
=>
dataStore
.
homeEntities
);
const
backgroundUrl
=
computed
<
string
>
(()
=>
interfaceStore
.
homeBackgroundUrl
);
const
addEntity
=
(
newEntity
:
IEntity
)
=>
{
console
.
log
(
'
entities.value
'
,
entities
.
value
);
const
prevState
=
[...
entities
.
value
];
prevState
.
push
(
newEntity
);
dataStore
.
editHomeEntities
(
prevState
);
// let prevValue = JSON.parse(localStorage.getItem('homeEntities') || '[]');
// prevValue.push(newEntity);
// localStorage.setItem('homeEntities', JSON.stringify(prevValue));
// entities.value.push(newEntity);
};
const
backgroundUrl
=
computed
<
string
>
(()
=>
interfaceStore
.
homeBackgroundUrl
);
watchEffect
(()
=>
{
console
.
log
(
'
entities:
'
,
entities
.
value
);
});
</
script
>
<
template
>
...
...
@@ -74,9 +63,9 @@ watchEffect(() => {
<p
class=
"mb-6"
>
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ad autem cum dolores doloribus
dolorum, earum illum nam nemo nesciunt odit pariatur quam quisquam reprehenderit
sapiente ullam unde ut vel, voluptatem! Lorem ipsum dolor sit amet, consectetur
adipisicing elit. Ad autem cum dolores doloribus
dolorum, earum illum nam nemo nesciunt odit pariatur quam quisquam reprehenderi
t
sapiente ullam unde ut vel, voluptatem!
sapiente ullam unde ut vel, voluptatem! Lorem ipsum dolor sit amet, consectetur
adipisicing elit. Ad autem cum dolores doloribus dolorum, earum illum nam nemo nesciun
t
odit pariatur quam quisquam reprehenderit
sapiente ullam unde ut vel, voluptatem!
</p>
<EntityItem
v-for=
"entitiesItem of entities"
...
...
This diff is collapsed.
Click to expand it.
src/router/index.ts
+
0
−
3
View file @
780bfb61
...
...
@@ -12,9 +12,6 @@ const router = createRouter({
{
path
:
'
/:sheetUuid
'
,
name
:
'
sheet
'
,
// route level code-splitting
// this generates a separate chunk (About.[hash].js) for this route
// which is lazy-loaded when the route is visited.
component
:
()
=>
import
(
'
../pages/[uuid]/SheetPage.vue
'
)
}
]
...
...
This diff is collapsed.
Click to expand it.
src/stores/authorization.ts
+
0
−
4
View file @
780bfb61
...
...
@@ -5,10 +5,6 @@ export const useAuthorizationStore = defineStore('authorizationStore', () => {
const
userUuid
=
ref
<
string
>
(
'
e786de50-f33c-4ef9-9dfe-329eed32b023
'
);
const
userNickName
=
ref
<
string
>
(
'
malyusgun
'
);
const
userData
=
ref
<
IUserData
|
null
>
();
// const doubleCount = computed(() => count.value * 2);
// function increment() {
// count.value++;
// }
return
{
userUuid
,
userNickName
,
userData
};
});
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment